Alexandre Bury
781d9c1a03
Can now change dialog button alignment
2015-06-02 19:36:22 -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
6c6f929430
Better UTF-8 support in views
...
EditView, TextView, Dialog and Button should now properly display and
layout non-ascii text.
The lorem example now includes greek text to show this.
2015-05-28 17:32:28 -07:00
Alexandre Bury
3adb95c7ab
Add support for Shift and Ctrl input
...
Careful: Ctrl-4 and ctrl-\ currently make ncurses crash.
Also some letters combine with Ctrl to make other codes. Run stty -a to
see some mappings.
Basically, you'll have issues with:
C,I,J,M,Q,S,Z
and non-letters.
2015-05-28 14:44:10 -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
abb09cf4bb
Split style and color
...
Color is a color-pair
Style is an attribute, like Bold or Reversed
2015-05-26 21:45:00 -07:00
Alexandre Bury
5407c53545
Dialog gives focus to its content first
2015-05-26 17:10:47 -07:00
Alexandre Bury
44899bdcd6
Add/fix some doc
2015-05-26 16:48:27 -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
dca9d7f662
Use usize for Vec2 instead of u32
...
Much less casts needed now.
2015-05-25 14:46:29 -07:00
Alexandre Bury
a2b4273589
Fix warnings
2015-05-23 17:11:58 -07:00
Alexandre Bury
081b7545b9
Remove viewpath in callbacks
2015-05-23 17:07:22 -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
d9652ac728
Add animated example.
2015-05-22 16:28:05 -07:00
Alexandre Bury
b2e52dc702
Add some (non-doc) comments.
2015-05-22 00:43:58 -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
919e60d4ce
Add lines and boxes to printer.
...
Dialog now draws its box.
2015-05-20 10:31:38 -07:00
Alexandre Bury
7d301e1980
Add documentation
2015-05-19 17:31:52 -07:00
Alexandre Bury
c8136c67e0
Add focus system
...
May need to add a direction to take_focus
2015-05-19 15:54:11 -07:00
Alexandre Bury
ca5c485847
Fix Button on_key_event
...
KEY_ENTER is actually almost never called. The return key sends the
ascii code for '\n' instead.
2015-05-19 10:58:42 -07:00
Alexandre Bury
04121414e1
Add proper draw and layout to Dialog
2015-05-18 19:41:35 -07:00
Alexandre Bury
68819c89bf
Fixed variable case warnings
2015-05-18 15:31:55 -07:00
Alexandre Bury
1fcca9b3a9
Rename module vec2 -> vec
...
Margins may be moved to vec::Vec4 some day
2015-05-18 11:51:30 -07:00
Alexandre Bury
74f0fee9b6
Add Dialog skeleton
2015-05-16 14:02:15 -07:00