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