Olivier Goffart
929166f06c
Change what is accepted by ModelRc::new and ModelRc::from
...
- ModelRc::new constructs a ModelRc from a impl Model
- ModelRc::form constructs a ModelRc from a `Rc<dyn Model>` or `Rc<impl Model>`
2022-01-31 14:44:35 +01:00
Tobias Hunger
018c1a6666
Rename ModelHandle to SharedModel
...
This patch is mostly a rename now, but also contains a few small
cleanups.
SharedModel implements the Model trait itself and gracefully falls back
to an empty model is no Model was provided. This allows for some small
simplifications.
Also make sure to use the same comparision for SharedModels everywhere.
This fixes the last remaining clippy errors we had.
2022-01-30 01:26:35 +01:00
Tobias Hunger
e3c4209b1f
Change Model::row_data to return an Option<T> ( #873 )
...
Change Model::row_data to return an Option<T> (rust) or std::optional<T> (c++)
Co-authored-by: Olivier Goffart <olivier@woboq.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-01-26 13:55:38 +01:00
Tobias Hunger
bfca0e3573
Mass update copyright messages to be more REUSE compliant
2021-12-22 10:06:12 +01:00
Olivier Goffart
07e2532c0b
Printer Demo: rename PrinterQueue component
...
PrinterQueue -> PrineterQueueView
PrinterQueueData -> PrinterQueue
2021-08-27 16:55:07 +02:00
Olivier Goffart
fefc7f31d0
Port the printer demo to use exported globals
2021-08-27 16:55:07 +02:00
Tobias Hunger
9c12421c18
Janitor: Fix clippy::option_map_unit_fn
2021-08-05 23:41:56 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Olivier Goffart
baebd27b60
Printerdemo: don't panic on wasm
...
because we would use unsupported time functions
2021-04-23 19:09:16 +02:00
Simon Hausmann
f7ce1ba8b4
Generate registration code for custom fonts imported in .60 files
...
This removes the need to manually register fonts. This is initially
applied to the printer demo, but the other demos and removal of the
public manual registration API will come in follow-up commits.
2021-04-14 09:30:32 +02:00
Olivier Goffart
5237161d51
printerdemo rust: Add some progess
2021-02-22 11:17:39 +01:00
Olivier Goffart
87f08a3753
Some rust code to control the print queue
2021-02-22 11:17:39 +01:00
Simon Hausmann
38bdc8f08c
Include the Noto Sans font in the Rust build
2021-02-22 11:17:39 +01:00
Simon Hausmann
1592866661
Start working on the new printer demo design
2021-02-22 11:17:38 +01:00
Simon Hausmann
7047856d4e
Replace FooRc with Foo and without ComponentHandle in examples and tests
2020-12-03 08:13:24 +01:00
Simon Hausmann
08b8a8cb83
Port the examples away from the ComponentHandle based API
2020-12-03 08:13:15 +01:00
Simon Hausmann
c73edd503b
Fix tapping on the quit icon in the wasm printer demo
...
Don't let that make the demo become dysfunctional.
2020-11-26 14:56:18 +01:00
Olivier Goffart
47bf84d85d
Printer demo: some logic for the Fax page
2020-10-20 15:06:24 +02:00
Simon Hausmann
d771143f68
Make it possible to exit the printer demo
...
... by clicking on the power button :-)
Calling exit is a big rough, but simplest and fastest for now.
2020-10-07 15:53:07 +02:00
Olivier Goffart
8361ef4019
Start code egeneration for the two ways binding
...
This is only meant to include the cases in which the property are optimized.
Does not work yet for the dynamic component
2020-09-24 14:37:16 +02:00
Olivier Goffart
221bb853d7
Change the exaple to used named struct for models
2020-09-17 14:00:50 +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
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
9ecaf11eed
Various additions to the Rust Color API
...
As discussed in the most recent API review.
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
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
0751552068
Printer demo: the ink data now comes from the native code
2020-09-04 15:49:33 +02:00
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692
Apply license headers to all non-binary/non-json sources
2020-08-17 17:55:20 +02:00
Simon Hausmann
3596059eab
Add wasm build for the printer demo
2020-08-05 15:02:36 +02:00
Olivier Goffart
3becd69bc5
Skeleton for the printerdemo
2020-08-04 10:11:02 +02:00