object representing an entire application, supplies the main render loop, mapping of actions
More...
|
| | Application (const ApplicationID &id, bool allow_multiple_instances=false) |
| | construct new action
|
| |
| | Application (detail::ApplicationInternal *internal) |
| | construct from internal
|
| |
|
| ~Application () |
| | destroy action, should only be called at the very end of main
|
| |
|
| Application (const Application &)=delete |
| | copy ctor delete
|
| |
|
| Application (Application &&) noexcept |
| | move ctor
|
| |
|
Application & | operator= (const Application &)=delete |
| | copy assignment deleted
|
| |
|
Application & | operator= (Application &&) noexcept |
| | move assignment
|
| |
| | operator NativeObject () const override |
| |
|
| operator GtkApplication * () const |
| | expose as GtkApplication
|
| |
| NativeObject | get_internal () const override |
| | expose internally managed object, \for_internal_use_only
|
| |
| ApplicationID | get_id () const |
| | get id
|
| |
| int | run () |
| | start the main render loop
|
| |
|
void | quit () |
| | immediately exit the application, this forces mousetrap::Application::run to return
|
| |
|
void | hold () |
| | mark the application such that quitting regularly will be prevented, use mousetrap::Application::release to undo this
|
| |
|
void | release () |
| | undo a previous mousetrap::Application::hold()
|
| |
|
void | mark_as_busy () |
| | mark that the application is currently doing a long-running application. Call mousetrap::Application::unmark_as_busy to undo this
|
| |
|
void | unmark_as_busy () |
| | undo a previous call to mousetrap::Application::mark_as_busy
|
| |
|
bool | get_is_marked_as_busy () const |
| | get whether mark_as_busy was called
|
| |
|
bool | get_is_holding () const |
| | get whether application is currently holding, preventing exiting
|
| |
| void | add_action (const Action &action) |
| | add an action to application, see the manual page on actions for details
|
| |
| void | remove_action (const ActionID &id) |
| | remove an action from application
|
| |
| Action | get_action (const ActionID &id) |
| | lookup action based on action id
|
| |
| bool | has_action (const ActionID &id) |
| | check if application has an action with given id registered
|
| |
| void | set_current_theme (Theme) |
| | set the current style theme, this will affect all windows
|
| |
| Theme | get_current_theme () const |
| | get current style theme
|
| |
| void | set_signal_blocked (const std::string &signal_id, bool b) |
| | block a signal by id \for_internal_use_only
|
| |
| bool | get_signal_blocked (const std::string &signal_id) const |
| | get whether a signal is currently blocked
|
| |
| std::vector< std::string > | get_all_signal_names () |
| | get list of possible signal ids \for_internal_use_only
|
| |
| template<typename Function_t > |
| void | connect_signal (const std::string &signal_id, Function_t *function, void *data=nullptr) |
| | connect static function to signal, does not work with lambdas \for_internal_use_only
|
| |
| void | disconnect_signal (const std::string &signal_id) |
| | disconnect signal, it may not be invoked until reconnected, if signal is not registered, does nothing. For internal use only
|
| |
| virtual | operator NativeObject () const =0 |
| | expose as NativeObject, this is the GLib instance that signals are emitted on \for_internal_use_only
|
| |
| virtual NativeObject | get_internal () const |
| | expose internally managed object, \for_internal_use_only
|
| |
| void | connect_signal_activate (Function_t f, Data_t data) |
| | connect handler, will be invoked when signal is emitted. Data is passed to the signal handler function
|
| |
| void | connect_signal_activate (Function_t f) |
| | connect handler, will be invoked when signal is emitted
|
| |
|
void | set_signal_activate_blocked (bool b) |
| |
|
bool | get_signal_activate_blocked () const |
| |
| void | emit_signal_activate () |
| | invoke signal handler manually
|
| |
|
void | disconnect_signal_activate () |
| |
| void | connect_signal_shutdown (Function_t f, Data_t data) |
| | connect handler, will be invoked when signal is emitted. Data is passed to the signal handler function
|
| |
| void | connect_signal_shutdown (Function_t f) |
| | connect handler, will be invoked when signal is emitted
|
| |
| void | set_signal_shutdown_blocked (bool b) |
| | Set whether signal emission should trigger the signal handler.
|
| |
| bool | get_signal_shutdown_blocked () const |
| | get whether signal emission should trigger the signal handler
|
| |
| void | emit_signal_shutdown () |
| | invoke signal handler manually
|
| |
| void | disconnect_signal_shutdown () |
| | disconnect the signal handler
|
| |
object representing an entire application, supplies the main render loop, mapping of actions
| signal id | signature | emitted when... |
activate | (Application&, (Data_t)) -> void | Widget is activated, usually by pressing Enter while it is in focus or otherwise triggering interaction with it |
shutdown | (Application&, (Data_t)) -> void | Application was requested to close, usually by the last window being closed |