Alexandre Bury
0fd3bc113f
Fix layout bug in StackView
...
Only skip padding for non-centered views
2016-07-02 19:46:23 -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
1863e48b07
Add MenuPopup view
2016-07-02 01:01:09 -07:00
Alexandre Bury
1b1d7166a1
Replace SizeRequest with simple Vec2
...
We may go back to an enum though, to handle text views in LinearLayouts.
But the previous Fixed/AtMost/Unknown distinction was useless.
2016-07-02 00:47:38 -07:00
Alexandre Bury
c958093b74
Add TrackedView to cache the view size
2016-07-01 20:23:58 -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
985009e51c
More ncurses isolation
...
Also some renaming in the theme module
2016-06-30 23:38:01 -07:00
Alexandre Bury
4dcb2ea901
Remove debug println
2016-06-29 17:51:26 -07:00
Alexandre Bury
5751a293e5
Push most ncurses-specific code into separate trait
...
Prepare backend change.
Still not isolated is the color setup in `theme`.
2016-06-29 17:37:51 -07:00
Alexandre Bury
d02c30ae9f
Fix clippy warnings
2016-06-27 22:40:11 -07:00
Alexandre Bury
80b219f34a
Apply rustfmt
2016-06-27 22:10:59 -07:00
Alexandre Bury
34f235daf0
Use UTF-8 drawing characters for printer methods
...
Instead of ncurses chtype.
2016-06-26 15:03:12 -07:00
Alexandre Bury
ed785940dd
Fix typo in doc
2016-06-26 09:45:53 -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
af47abeaad
Edit view now support content larger than display
...
It then scrolls horizontally
2015-07-30 15:40:03 +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
4fff7882aa
Fix focus state in linear layout
2015-06-08 15:47:09 -07:00
Alexandre Bury
df11b4f1f0
Update documentation
2015-06-08 15:38:10 -07:00
Alexandre Bury
daaff26e1c
Add input support to linear layouts
2015-06-08 15:11:44 -07:00
Alexandre Bury
d5a796a4cd
Fix dialog button alignment
2015-06-08 15:11:36 -07:00
Alexandre Bury
40af72a567
BugFix in LinearLayout
...
And add a simple linear example.
2015-06-08 12:23:36 -07:00
Alexandre Bury
df5ff808e3
Basic linear layout implementation
...
Not tested yet
2015-06-07 20:58:10 -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
cb523e88ae
Fix doc-tests
2015-06-04 11:40:35 -07:00
Alexandre Bury
a77a40558f
Add some doc.
2015-06-03 15:36:51 -07:00
Alexandre Bury
781d9c1a03
Can now change dialog button alignment
2015-06-02 19:36:22 -07:00
Alexandre Bury
7545d7170c
Add a background to the scrollbar
...
Currently use the pipe character: |
2015-06-02 17:44:31 -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
1656cdd8f6
Add Align property to TextView
...
Can change its horizontal and vertical alignment for when the allocated
size is bigger than the requirements.
2015-06-01 19:43:15 -07:00
Alexandre Bury
2a423b8408
Select views now highlight the entire line
...
And scrollviews have an extra padding column between the content and the
scrollbar.
2015-06-01 15:48:31 -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
a30a77f39b
Letter-search in SelectView wraps back
2015-05-31 19:09:30 -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
e07a0319f2
Add Home/End navigation to text views.
2015-05-28 17:48:21 -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
9ab4848180
Better char selection in EditView
2015-05-27 00:15:19 -07:00
Alexandre Bury
8d70338214
Prints cursor in EditView
2015-05-27 00:01:37 -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
97d97afa8d
Fix warnings
2015-05-26 17:08:27 -07:00