Rename call_* to invoke_* for callbacks

Fixes #187
This commit is contained in:
Simon Hausmann 2021-03-15 17:01:05 +01:00
parent b27034efa5
commit 8372d3f6d8
27 changed files with 69 additions and 68 deletions

View file

@ -161,7 +161,7 @@ struct MainWindow {
inline auto get_todo_model () const -> std::shared_ptr<sixtyfps::Model<TodoItem>>;
inline void set_todo_model (const std::shared_ptr<sixtyfps::Model<TodoItem>> &value) const;
inline void call_todo_added (sixtyfps::SharedString arg_0) const;
inline void invoke_todo_added (sixtyfps::SharedString arg_0) const;
template<typename Functor> inline void on_todo_added (Functor && callback_handler) const;
//...

View file

@ -18,7 +18,7 @@ This class will have the following public member functions:
* A getter `get_<property_name>` returning the property type.
* A setter `set_<property_name>` taking the new value of the property by const reference
- for each callbacks:
* `call_<callback_name>` function which takes the callback argument as parameter and call the callback.
* `invoke_<callback_name>` function which takes the callback argument as parameter and call the callback.
* `on_<callback_name>` functin wich takes a functor as an argument and sets the callback handler
for this callback. the functor must accept the type parameter of the callback
@ -64,7 +64,7 @@ public:
inline void set_user_name (const sixtyfps::SharedString &value) const;
/// Call this function to call the `hello` callback
inline void call_hello () const;
inline void invoke_hello () const;
/// Sets the callback handler for the `hello` callback.
template<typename Functor> inline void on_hello (Functor && callback_handler) const;