Olivier Goffart
9a909142a8
Disable wayland dependency by default
2020-10-10 16:10:22 +02:00
Simon Hausmann
67f387e628
Prepare for relative resource loading from the web
...
Pass the base url as path to the interpreter
2020-10-08 20:42:46 +02:00
Olivier Goffart
4169254169
StandardListView in rust
2020-10-08 16:22:16 +02:00
Simon Hausmann
a472ca7c28
Automatically embed resources when cross-compiling
...
Don't assume that the file system is the same
2020-10-06 23:00:17 +02:00
Olivier Goffart
1b506a1b03
Move ther model code from the rust API to the corelib
...
We will need it in the dynamic component
2020-10-02 18:11:35 +02:00
Olivier Goffart
c7e5b39973
Layout the items in the ListView
2020-10-02 18:07:39 +02:00
Olivier Goffart
f10c2bfd7c
More ListView WIP
2020-10-02 18:07:39 +02:00
Olivier Goffart
dec06be70c
WIP ListView
2020-10-02 18:07:39 +02:00
Olivier Goffart
4cf61b5617
Make the "remove done items" button work in the Todo rust example
2020-09-30 17:57:19 +02:00
Olivier Goffart
2050f08f1e
Ability to make change to the model property
2020-09-30 15:04:32 +02:00
Olivier Goffart
2337eb097b
Refatoring of the rust Repeater so we can take track of which items are dirty
...
So we do not recreate items unless they were removed and re-added
2020-09-29 14:20:43 +02:00
Olivier Goffart
d9262373aa
Put RepeaterInner in a RefCell instead of having every field in a refcell
2020-09-29 14:20:43 +02:00
Simon Hausmann
e5dfb3a4c0
Implement basic focus handling
...
Similar to the mouse_grabber, we use a VisitChildrenResult field to
track the focus item within a component. Unlike the mouse grabber
however, it is set/cleared using dedicated focus events.
The key event now routes the key event directly to the focus item.
The focus can be requested via set_focus_item on a window, which the
TextItem does.
2020-09-25 10:43:47 +02:00
Simon Hausmann
aa5babffe1
Prepare for key event delivery to a specific focus item
...
Begin by routing key events through the component. In the future that
will direct the event to the focus item.
2020-09-25 10:06:15 +02:00
Simon Hausmann
2b76e9277a
Prepare for allowing an item mouse handler to request focus
...
In the future the TextInput will request focus on mouse click,for
example.
Pass the outer-most component through to ItemVTable's input_event.
For the purpose of disambiguating this component from any nested
component instantiated by a repeater or so, it's called the
app_component.
The ComponentVTable takes a reference to a ComponentRefPin instead of a
ComponentRefPin by value, as the vtable macro gets confused otherwise
and thinks it's a self argument.
2020-09-25 10:06:15 +02:00
Simon Hausmann
7ca66d62b9
Fix crash in TextInput when deleting a left-directed selection
...
When selecting to the left, the anchor remains to the right of the cursor.
When deleting such a selection, we fetch the cursor and anchor using a helper
method, which ensures that the anchor is to the left of the cursor.
Finally when setting the cursor then to the anchor, we need to also
set the anchor, since both were swapped.
This also add an automated test for this scenario.
2020-09-23 17:33:09 +02:00
Olivier Goffart
e3459f39d4
Parse two ways bindings
2020-09-23 14:06:08 +02:00
Olivier Goffart
b36a9004ef
Move the RepeaterInner in a Rc and use that for the ModelPeer
2020-09-21 15:23:24 +02:00
Simon Hausmann
7053aee0c8
Pass the ComponentWindow to ItemVTable::input_event
2020-09-18 16:18:48 +02:00
Olivier Goffart
cbd8c6aefc
Documentation for the newly added struct type
2020-09-17 13:14:01 +02:00
Olivier Goffart
8134fe5088
Support for named type as property
2020-09-17 13:14:01 +02:00
Olivier Goffart
913d680333
Recactor rust Model after first round of API review
...
- Remove EmptyModel and use an Option
- Make ModelRc a type alias
- Rename ArrayModel into VecModel
2020-09-16 14:25:57 +02:00
Simon Hausmann
625cb6c6b8
Add a constructor to Text and let the color default to black
...
We really shouldn't require specifying a color for every Text {} element just in order
to see *some* text.
For Rectangle OTOH transparent is a good default (and thus for Color), hence
this change just to Text.
Right now the constructor bit is also a bit repetitive, this could
perhaps be folded into BuiltinItem to generate the ffi, default impl and
forward to an init function if it exists.
2020-09-16 08:20:13 +02:00
Simon Hausmann
546818ee55
Add key event data structures and event function boiler plate
2020-09-15 11:16:55 +02:00
Olivier Goffart
0d8a38577d
Todo example: make the "add todo" button do something
2020-09-14 16:38:45 +02:00
Olivier Goffart
4de2e57175
Use a Model trait in the rust backend
2020-09-14 14:02:34 +02:00
Simon Hausmann
3c2172d043
Use new-style intra-crate rust-doc links instead of relying on .html links
2020-09-09 18:53:59 +02:00
Olivier Goffart
8761ca80a3
Add SharedArray::push and adjust a bit the API
2020-09-09 18:47:15 +02:00
Simon Hausmann
e87a650c46
Add SharedArray to the public Rust API
2020-09-08 22:54:58 +02:00
Simon Hausmann
19cce012a0
Add ARGBColor<T> to the color API
...
As discussed in the last API review, this replaces the as_rgba_f32/u8
"accessor" functions by returning a struct with named fields.
2020-09-08 22:11:23 +02:00
Olivier Goffart
16f5cf42e3
Actually compute the layout of elements within a for loop
2020-09-07 14:04:14 +02:00
Simon Hausmann
ccce46748f
Remove trailing slash from docs symlink
...
Windows git seems to like that better
2020-09-07 11:22:55 +02:00
Olivier Goffart
8465773b9b
More fix for windows, make sure that slashes are escaped in the sixtyfps macro
2020-09-05 18:34:04 +02:00
Simon Hausmann
ff9c118e07
Propagate warnings to the end of the compilation step and print them
2020-09-04 20:34:20 +02:00
Simon Hausmann
6278a7168a
Include the example preview also in the C++ documentation
...
The template system used by Sphinx makes this rather easy, just the selector for the
HTML element to inject to needs to be extended.
2020-09-04 11:44:08 +02:00
Simon Hausmann
a539dab848
Improve placement of live preview
...
As the commented out code suggested, place the preview canvas as a floating element
into the code box, along with a label.
2020-09-04 10:12:34 +02:00
Simon Hausmann
7690ab6b6d
Reindent/Reformat the docs integration html
...
That'll make further edits easier to read in the diffs.
2020-09-04 10:12:34 +02:00
Simon Hausmann
dcb923c1df
Simplify markdown links to C++/Rust docs
...
and also offer them conveniently in the primary readme.
2020-09-03 17:35:07 +02:00
Olivier Goffart
51d48aad32
Some doc changes
2020-09-03 16:57:48 +02:00
Simon Hausmann
670091a773
Remove sixtyfps::EasingCurve from the public Rust API
...
It's not needed in public API usage right now.
2020-09-03 15:48:17 +02:00
Olivier Goffart
8a7afbc238
Documents the elements
2020-09-02 18:57:24 +02:00
Olivier Goffart
f1ad78bc25
Qt style support for the rust backend
...
Need to set the SIXTYFPS_STYLE=native env variable while compiling
2020-09-01 12:25:11 +02:00
Olivier Goffart
6d41b1981d
Move the Qt style to a new backend: the Qt backend
...
Currently the Qt backend still redirect everything to the GL backend,
but the goal is to use QPainter and QWindow
This also adds a "default" backend, whose goal is to select the proper
backend at compile time
2020-08-31 17:26:04 +02:00
Simon Hausmann
5dbd0b213c
Add support for grid layout padding
2020-08-28 15:06:14 +02:00
Simon Hausmann
c1aa4b28c6
Add support for children insertion points for components
...
Sometimes re-usable components need to act as containers that allow the
user to place other items inside. The component needs to be able to
control the placement of these user-provided elements. That is what the
new
$children
expression inside elements does.
2020-08-28 15:05:21 +02:00
Olivier Goffart
ef16733a88
Attempt to render the documentation example.
...
Need polishing
2020-08-27 19:34:17 +02:00
Simon Hausmann
1fec49fc10
Small typo fixes
2020-08-26 20:56:25 +02:00
Simon Hausmann
fdd522a7e4
Link to the "website" from the Rust docs
2020-08-26 18:58:35 +02:00
Simon Hausmann
48879f057a
Link to the self-hosted rust online docs
2020-08-26 18:57:02 +02:00
Simon Hausmann
1b7d25efab
Provide a convenient way to get to the "website" via the docs
...
These markdown files are also included in other locations (Rust or C++), so
a way to get back to a future website is helpful.
2020-08-26 14:46:06 +02:00