Commit Graph

1402 Commits

Author SHA1 Message Date
Alexandre Bury
9390504290 Add documentation to BoxView 2016-07-13 21:30:30 -07:00
Alexandre Bury
e166869c51 Add some documentation to view module 2016-07-13 20:52:24 -07:00
Alexandre Bury
03c400ad44 Fix linear layout in constrained space 2016-07-13 01:19:05 -07:00
Alexandre Bury
12593c8ea8 Rustfmt on xy.rs 2016-07-12 21:33:50 -07:00
Alexandre Bury
4fe7df220a Add basic test to Vec2 2016-07-12 21:33:24 -07:00
Alexandre Bury
7f530e34b7 Add XY generic struct 2016-07-12 21:03:17 -07:00
Alexandre Bury
f35aebd66e Fix case in Readme 2016-07-11 23:50:08 -07:00
Alexandre Bury
309c471a63 Add #![deny(missing_docs)]
And fill the appropriate missing ones
2016-07-11 20:26:33 -07:00
Alexandre Bury
c597c262fe Add single-orientation FullView
full_width and full_height
2016-07-11 19:35:18 -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
c07e8b6aee Rustfmt 2016-07-10 19:11:21 -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
99bf28dfd6 Add needs_relayout method to View trait.
Purely optimization-focused trait (it is safe to ignore it entirely).
Allows view groups to take shortcuts if they know their children didn't
change since last time.
2016-07-10 17:41:49 -07:00
Alexandre Bury
3640a10a2b Bump version to 0.0.3 2016-07-09 19:07:16 -07:00
Alexandre Bury
4b095a0652 Apply rustfmt 2016-07-09 19:05:51 -07:00
Alexandre Bury
08ab18608b Clear the screen only on window resize and layer removal
Should actually also be done if a layer shrinks.
Luckily, clear can be called anytime, as draw() is the last action
performed in the event loop - so it's safe to clear the screen in any
event callback, or even during layout.
2016-07-09 18:49:37 -07:00
Alexandre Bury
9b2dec2a7f Use proper bounds for dialogs
Buttons height was not removed from the budget for get_min_size
2016-07-09 18:36:07 -07:00
Alexandre Bury
455a2a817c Invalidate TextView cache on content change 2016-07-09 18:26:52 -07:00
Alexandre Bury
2860467f29 Cache layout in TextView
Calling either get_min_size or layout will cache the results, so the
next call with the same constraints will not re-compute everything.
2016-07-09 18:23:58 -07:00
Alexandre Bury
30e9316df1 Add cache: cargo to .travis.yml
Hopefully makes travis builds faster?
2016-07-05 19:17:15 -07:00
Alexandre Bury
4498d206f5 Support wide characters in TextViews
Added some japanese paragraphs to the lorem example.
2016-07-04 21:30:13 -07:00
Alexandre Bury
cc72aa4ddc Better wide char support 2016-07-04 16:04:32 -07:00
Alexandre Bury
cb7a1e37a4 Add git dependency to readme
For people who can't wait for a release.
2016-07-03 13:16:22 -07:00
Alexandre Bury
9b587e353c Add dot to Cargo description 2016-07-02 22:28:09 -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
e127392e8a Add impl Default for Menubar
To make clippy happy
2016-07-02 19:47:11 -07:00
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
c2300bb8c7 Add rustfmt.toml 2016-07-02 00:57:07 -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
ba26ab965b Don't run example on cargo test
Apparently it fails on travis (??)
2016-06-29 17:46:39 -07:00
Alexandre Bury
8bbab10d1c Add .bk files to gitignore
Added by rustfmt
2016-06-29 17:38:12 -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
69e58a76db Merge pull request #35 from GuillaumeGomez/patch-1
Just because indentation
2016-06-29 09:24:21 -07:00
Guillaume Gomez
0534cf5a7a Just because indentation 2016-06-29 15:06:28 +02: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
80b219f34a Apply rustfmt 2016-06-27 22:10:59 -07:00
Alexandre Bury
042e631d9f Add base for menubar
Cursive now has a global menubar, with a `select_menubar()` method.
2016-06-27 21:59:42 -07:00
Alexandre Bury
43230534ff Add menu tree 2016-06-27 21:55:46 -07:00
Alexandre Bury
4efd84f311 Remove list of examples in Cargo.toml 2016-06-27 21:53:27 -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