|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Global application state. More...
#include <cc/Application>
Public Member Functions | |
| Application () | |
| Get global application state (initializes on first call) | |
| Application (int argc, char *argv[]) | |
| Initialize global application state. | |
| String | orgName () const |
| Get organization name. | |
| Application & | orgName (const String &newValue) |
| Set organization name | |
| String | appName () const |
| Get application name. | |
| Application & | appName (const String &newValue) |
| Set application name | |
| String | userDataPath () |
| Get platform specific path for application specfic user data. | |
| int | run () |
| Run the application's event loop. | |
| void | quit () |
| Exit the application's event loop. | |
| Control | hoverControl () const |
| The control the pointer is currently hovering over. | |
| Control | pressedControl () const |
| The control which is currently pressed by the user. | |
| Control | focusControl () const |
| The control which currently holds the input focus. | |
| Window | focusWindow () const |
| The window which currently holds the input focus. | |
| Window | appWindow () const |
| Get the applications primary window. | |
| double | textZoom () const |
| Get the text zoom factor. | |
| Application & | textZoom (Definition< double > &&f) |
| Define the text zoom factor. | |
| Application & | textZoom (double newValue) |
| Set the text zoom factor | |
| FontSmoothing | fontSmoothing () const |
| Get the application default font smoothing. | |
| Application & | fontSmoothing (FontSmoothing newValue) |
| Set the application default font smoothing | |
| String | clipboardText () const |
| Get the current clipboard text. | |
| Application & | clipboardText (const String &text) |
| Set the current clipboard text | |
| double | minMouseDragDistance () const |
| Get the minimal mouse drag distance. | |
| Application & | minMouseDragDistance (double newValue) |
| Set the minimal mouse drag distance | |
| double | minFingerDragDistance () const |
| Get the minimal touch input drag distance. | |
| Application & | minFingerDragDistance (double newValue) |
| Set the minimal touch input drag distance | |
| bool | pointerIsDragged (const PointerEvent &event, Point dragStart) const |
| Check if this is a drag operation | |
| void | postEvent (Function< void()> &&doNext) |
| Push a custom event to the application's event loop. | |
Public Member Functions inherited from Object | |
| Object ()=default | |
| Create a null object. | |
| operator bool () const | |
| Check if this is a non-null object. | |
| bool | isNull () const |
| Check if this is a null object. | |
| template<class T > | |
| bool | is () const |
| Check if this object is of type T. | |
| template<class T > | |
| T | as () const |
| Cast this object to type T. | |
| bool | isWeak () const |
| Check if the underlying object reference is weak. | |
| bool | operator== (const Object &other) const |
| Equality operator. | |
| std::strong_ordering | operator<=> (const Object &other) const |
| Ordering operator. | |
| long | useCount () const |
| Reference count. | |
Protected Member Functions | |
| Application (State *state) | |
| void | hoverControl (const Control &control) |
| void | pressedControl (const Control &control) |
| void | focusControl (const Control &control) |
| void | disengage (const View &view) |
| State & | me () |
| const State & | me () const |
Protected Member Functions inherited from Singleton | |
| Singleton ()=default | |
| Create a null singleton. | |
| Singleton (State *state) | |
| Initialize singleton object with instance state. | |
Protected Member Functions inherited from Object | |
| template<class T > | |
| T | weak () const |
| template<class T > | |
| void | initOnce () |
| Create the object state when called the first time. | |
| template<class T > | |
| void | initOncePerThread () |
| Create a distinct object state for each thread when called the first time in that thread. | |
| Object (State *newState) | |
| Initialize object with newState. | |
| Object (State *state, Alias) | |
| Object (State *state, Weak) | |
| Object & | operator= (std::nullptr_t) |
Additional Inherited Members | |
Static Protected Member Functions inherited from Singleton | |
| template<class T > | |
| static Handle< T > & | handle () |
| template<class T > | |
| static void | destroy () |
| template<class T > | |
| static T * | instance () |
| Get access to the singleton instance. | |
Static Protected Member Functions inherited from Object | |
| template<class T > | |
| static T | alias (const State *state) |
| Create an alias object for the given state. | |
| template<class T > | |
| static T | weak (const State *state) |
Protected Attributes inherited from Object | |
| Handle< State > | me |
| Internal object state | |
Global application state.
| Application | ( | ) |
Get global application state (initializes on first call)
| Application | ( | int | argc, |
| char * | argv[] ) |
Initialize global application state.
| String orgName | ( | ) | const |
Get organization name.
| Application & orgName | ( | const String & | newValue | ) |
Set organization name
| String appName | ( | ) | const |
Get application name.
| Application & appName | ( | const String & | newValue | ) |
Set application name
| String userDataPath | ( | ) |
Get platform specific path for application specfic user data.
| int run | ( | ) |
Run the application's event loop.
| void quit | ( | ) |
Exit the application's event loop.
| Control hoverControl | ( | ) | const |
The control the pointer is currently hovering over.
| Control pressedControl | ( | ) | const |
The control which is currently pressed by the user.
| Control focusControl | ( | ) | const |
The control which currently holds the input focus.
| Window focusWindow | ( | ) | const |
The window which currently holds the input focus.
| Window appWindow | ( | ) | const |
Get the applications primary window.
| double textZoom | ( | ) | const |
Get the text zoom factor.
| Application & textZoom | ( | Definition< double > && | f | ) |
Define the text zoom factor.
| Application & textZoom | ( | double | newValue | ) |
Set the text zoom factor
| FontSmoothing fontSmoothing | ( | ) | const |
Get the application default font smoothing.
| Application & fontSmoothing | ( | FontSmoothing | newValue | ) |
Set the application default font smoothing
| String clipboardText | ( | ) | const |
Get the current clipboard text.
| Application & clipboardText | ( | const String & | text | ) |
Set the current clipboard text
| double minMouseDragDistance | ( | ) | const |
Get the minimal mouse drag distance.
| Application & minMouseDragDistance | ( | double | newValue | ) |
Set the minimal mouse drag distance
| double minFingerDragDistance | ( | ) | const |
Get the minimal touch input drag distance.
| Application & minFingerDragDistance | ( | double | newValue | ) |
Set the minimal touch input drag distance
| bool pointerIsDragged | ( | const PointerEvent & | event, |
| Point | dragStart ) const |
Check if this is a drag operation
| void postEvent | ( | Function< void()> && | doNext | ) |
Push a custom event to the application's event loop.
| doNext | Function which will be evaluated in the application's foreground thread |