Commit Graph

178 Commits

Author SHA1 Message Date
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
8b6022a398 Add popup mode to SelectView
Single-line, opens a popup on selection.
2016-07-19 23:47:27 -07:00
Alexandre Bury
783fa0f1e2 Fix typo in docs 2016-07-19 20:50:21 -07:00
Alexandre Bury
a1d0231e2c Make Menubar a proper View 2016-07-19 20:44:50 -07:00
Alexandre Bury
2065be3e88 Add some doc to the menu module 2016-07-19 20:28:34 -07:00
Alexandre Bury
4120203844 More fixes for insufficient space. 2016-07-17 01:20:41 -07:00
Alexandre Bury
8750185f8c Don't crash on insufficient space 2016-07-16 22:06:28 -07:00
Alexandre Bury
ab3a55abaf Add enabled state to Button 2016-07-16 18:49:17 -07:00
Alexandre Bury
58a04bbb13 Add enabled state to SelectView 2016-07-16 18:46:18 -07:00
Alexandre Bury
02b6b6601f Add enabled state to Checkbox 2016-07-16 18:36:54 -07:00
Alexandre Bury
77a623674a Add on_change callback to CheckBox 2016-07-16 18:18:33 -07:00
Alexandre Bury
05f66b8e1b Add macro'd Default implementations 2016-07-16 17:28:42 -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
5b25893496 Rustfmt 2016-07-16 13:52:28 -07:00
Alexandre Bury
a22c92a1a1 Add ListView
Also added `examples/list_view.rs`.
2016-07-16 13:25:21 -07:00
Alexandre Bury
99993ab1ec Clear screen when hiding menubar
Otherwise it's visible but inactive
2016-07-16 01:07:37 -07:00
Alexandre Bury
2b54d6df28 Make View::draw take a &self (instead of a &mut self)
TrackedView, the only user of the mutability, now uses internal
mutability with a Cell.
2016-07-15 23:44:38 -07:00
Alexandre Bury
ef6f83751c Remove unused file 2016-07-15 11:17:09 -07:00
Alexandre Bury
1010c825ae Added doc for event module 2016-07-14 23:25:32 -07:00
Alexandre Bury
2ed8552e4b More doc fixes 2016-07-14 22:53:16 -07:00
Alexandre Bury
b4fafbec83 Fix some documentation 2016-07-14 22:50:35 -07:00
Alexandre Bury
bd5c45ac0e Fix clippy warnings 2016-07-14 22:32:43 -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
7f17a4ff74 Don't expose single-item modules
Instead, pub-use it from the root.
2016-07-13 23:18:59 -07:00
Alexandre Bury
d9e4512752 Fix linear layout focus switch 2016-07-13 22:16:55 -07:00
Alexandre Bury
5059e21cb1 Fix focus in LinearLayout
Focus now at least works. #42 is still open though.
2016-07-13 22:11:03 -07:00
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
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
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
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
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