Commit Graph

218 Commits

Author SHA1 Message Date
Alexandre Bury
c1c9322319 Add panel view 2016-07-25 13:35:46 -07:00
Alexandre Bury
6c71ac14b0 More linear progress bar progression
Each cell should receive the same number of ticks
2016-07-25 12:18:05 -07:00
Alexandre Bury
e29511e757 Add ProgressBar
Also make Callback its own NewType to add comversion methods.
2016-07-24 23:01:09 -07:00
Alexandre Bury
10e072c140 Allow loading themes from content.
Made `load_theme` thake a `&str` and Added `load_theme_file`.
2016-07-24 16:56:22 -07:00
Alexandre Bury
f28ac264f1 Add prelude import module
Update examples to use it.
2016-07-20 21:25:14 -07:00
Alexandre Bury
64d176ffa5 Add proper select popup placement
Added a popup select to the `list_view` example
2016-07-20 00:30:00 -07:00
Alexandre Bury
267eddc263 Use compile-time include for examples
Instead of trying to read the file at runtime.
2016-07-17 18:43:22 -07:00
Alexandre Bury
77a623674a Add on_change callback to CheckBox 2016-07-16 18:18:33 -07:00
Alexandre Bury
d4afdf024f Add checkbox view 2016-07-16 17:22:24 -07:00
Alexandre Bury
5ee8706582 Add scrollable flag to TextViews 2016-07-16 17:08:17 -07:00
Alexandre Bury
a22c92a1a1 Add ListView
Also added `examples/list_view.rs`.
2016-07-16 13:25:21 -07:00
Alexandre Bury
d633684e41 Fix examples 2016-07-16 11:20:40 -07:00
Alexandre Bury
91fdf96066 Add Direction enum
And add a Direction argument to take_focus
2016-07-14 22:23:06 -07:00
Alexandre Bury
1b34934df7 Fix printer::Printer imports 2016-07-13 23:25:54 -07:00
Alexandre Bury
03c400ad44 Fix linear layout in constrained space 2016-07-13 01:19:05 -07:00
Alexandre Bury
b7a270f258 Split width and height in BoxView
They are now both optional
2016-07-11 19:24:50 -07:00
Alexandre Bury
6e0819f723 Simplify Event enum
Now properly unify Alt/Ctrl/Shift handling
2016-07-10 18:27:26 -07:00
Alexandre Bury
d89c83f0ed MenuPopup now supports PageUp/Down and Home/End 2016-07-02 20:53:13 -07:00
Alexandre Bury
692c310656 Better Menu API
Now offer non-chainable methods as well.
2016-07-02 20:44:27 -07:00
Alexandre Bury
e439b422da Fix warnings in menubar example 2016-07-02 19:48:21 -07:00
Alexandre Bury
8220fe529e Better menubar example
Added scrolling support, and left/right navigation
2016-07-02 19:37:38 -07:00
Alexandre Bury
1d54764cdb Working menubar example
Also update callback: use Rc instead of Box
2016-07-02 15:02:42 -07:00
Alexandre Bury
87cd1ce23f Add position parameter to stack view layers
Can be centered, absolute or relative to the previous layer.
Can be set independently for each axis.
2016-07-01 19:19:43 -07:00
Alexandre Bury
d0d4380d5a Add menubar example
Not working yet, but at least it shows how the API should be used.
2016-06-28 01:13:44 -07:00
Alexandre Bury
d02c30ae9f Fix clippy warnings 2016-06-27 22:40:11 -07:00
Alexandre Bury
654223411d Apply rustfmt to examples 2016-06-25 17:11:42 -07:00
Alexandre Bury
58bd274df0 Update Readme & run rustfmt 2016-06-25 16:39:05 -07:00
Alexandre Bury
07c3c99e54 Update for new ncurses version 2016-03-15 15:39:08 -07:00
Alexandre Bury
fa4b52ee81 Simplified examples 2015-07-30 14:51:12 +02:00
Alexandre Bury
ac85a1f288 Fixed bug with dialog without buttons 2015-07-28 21:54:32 +02:00
Alexandre Bury
36fbc1ce5b Add some convenient ID methods 2015-07-28 15:57:52 +02:00
Alexandre Bury
25a298a2eb Fix dialog layout and input 2015-06-08 22:24:59 -07:00
Alexandre Bury
df11b4f1f0 Update documentation 2015-06-08 15:38:10 -07:00
Alexandre Bury
40af72a567 BugFix in LinearLayout
And add a simple linear example.
2015-06-08 12:23:36 -07:00
Alexandre Bury
e5cb687990 Refactor themes and colors
And adds a theme example.
TODO: Shadow & Borders support
2015-06-05 18:26:40 -07:00
Alexandre Bury
781d9c1a03 Can now change dialog button alignment 2015-06-02 19:36:22 -07:00
Alexandre Bury
0b159d6bf1 Add align support to SelectView
And moved some alignment offset computation to the align module.
2015-06-02 14:23:51 -07:00
Alexandre Bury
f81a9b2768 Update examples for focusless draw 2015-06-01 09:20:06 -07:00
Alexandre Bury
b64a6b8c34 Add on_select callback for SelectView
And updated the select example to use that instead of an OK button.
This also removes the need for an ID selector.
2015-05-31 20:51:12 -07:00
Alexandre Bury
c8b2bc943d Minor fixes
And some doc
2015-05-31 16:58:55 -07:00
Alexandre Bury
323805b52f Add scrolling to SelectView
Scrolling functionalities are stored in ScrollBase. Both TextView and
SelectView use it.
Also add letter search to SelectView (currently case sensitive).
And made the cities example bigger with a long list of capitals.
2015-05-31 16:38:53 -07:00
Alexandre Bury
db39069260 Fix focus for stack and text views.
And updated Lorem example with a Quit button under the scrollable text.
2015-05-30 21:54:06 -07:00
Alexandre Bury
6b781684ef Rename ListView -> SelectView
And added documentation.
2015-05-30 21:32:24 -07:00
Alexandre Bury
969650ab1a Add basic ListView
Show a selection among a list of items.
Maybe should be called SelectView?
TODO:
* Scrolling
* Error handling with empty list
* Action on Enter on an item
2015-05-30 21:05:34 -07:00
Alexandre Bury
3d1507c3cf Add UTF-8 input support
Didn't the proper methods in the standard lib, so I implemented a simple
utf-8 char reader.
2015-05-27 22:17:52 -07:00
Alexandre Bury
f9c9e56518 Transform ncurses i32 key into Event enum
Prepares support for unicode char input spanning multiple ncurses
characters.
2015-05-27 18:04:33 -07:00
Alexandre Bury
ca09885978 Add key_codes example
Prints the code on key press. Useful tool.
2015-05-27 16:55:49 -07:00
Alexandre Bury
c3496c9870 Update edit example
Added top padding to dialog and a `!` to message.
2015-05-26 23:49:07 -07:00
Alexandre Bury
44899bdcd6 Add/fix some doc 2015-05-26 16:48:27 -07:00
Alexandre Bury
3460f8123d EditView can now have a minimum size 2015-05-26 16:11:22 -07:00
Alexandre Bury
e8fcaabd6c Add EditView
TODO: proper visualization:
* Display cursor when focused (instead of color change)
* Do not use HIGHLIGHT, but something like INVERTED
2015-05-26 15:48:35 -07:00
Alexandre Bury
25e1ca6074 Rename Margins -> Vec4
And move it to the vec module
2015-05-25 14:56:51 -07:00
Alexandre Bury
cb03f79e24 Update lorem example
Load text before initializing ncurses.
2015-05-25 11:37:28 -07:00
Alexandre Bury
222c4465d9 Fix bad TextView layout 2015-05-25 01:32:55 -07:00
Alexandre Bury
eb6af9b981 Update mutation example
Don't show the popup at start, let the user read the text.
2015-05-23 20:28:03 -07:00
Alexandre Bury
081b7545b9 Remove viewpath in callbacks 2015-05-23 17:07:22 -07:00
Alexandre Bury
5a4c34361c Update mutation example 2015-05-23 16:46:38 -07:00
Alexandre Bury
7e823435cd Stop using ncurses::WINDOW
Overlap is a mess. Let's do it ourselve.
2015-05-23 15:58:06 -07:00
Alexandre Bury
d9b56574d2 Add selector by ID 2015-05-23 10:33:29 -07:00
Alexandre Bury
7e4873f5b7 Fix logs demo 2015-05-22 17:24:02 -07:00
Alexandre Bury
e59a2d4dd7 Don't panic in log generator 2015-05-22 17:12:39 -07:00
Alexandre Bury
94e723d3f0 Add some doc 2015-05-22 16:57:29 -07:00
Alexandre Bury
d9652ac728 Add animated example. 2015-05-22 16:28:05 -07:00
Alexandre Bury
3df17cc64b Improved lorem example
TODO: add margins around the textview?
2015-05-22 00:06:33 -07:00
Alexandre Bury
25726140d8 Add colors and styles to printer 2015-05-21 23:29:49 -07:00
Alexandre Bury
b8b7638667 Add lorem example with long text and line wrapping 2015-05-18 11:36:15 -07:00
Alexandre Bury
74f0fee9b6 Add Dialog skeleton 2015-05-16 14:02:15 -07:00
Alexandre Bury
a8c8855831 Moved example to separate directory
And add it to Cargo.toml
2015-05-16 13:09:38 -07:00