Pebble Foundation Classes
0.2.0
C++ for Pebble
|
Base class for application windows. More...
#include <pebble_window.hpp>
Public Member Functions | |
AppWindow () | |
virtual | ~AppWindow () |
Destroys the underlying Pebble window. | |
![]() | |
Window (::Window *window) | |
virtual | ~Window () |
Window destructor | |
operator::Window * () | |
Instances of this class can be automatically converted to Pebble window pointers. | |
void | StackPush (bool animated) |
bool | StackContainsWindow () const |
bool | WindowIsTop () |
bool | StackRemove (bool animated) |
bool | IsLoaded () const |
inline ::ClickConfigProvider | GetClickConfigProvider () const |
Gets the current click configuration provider of the window. | |
void | SetBackgroundColor (GColor background_color) |
![]() | |
Layer (::Layer *layer) | |
Wraps an existing TextLayer. | |
operator::Layer * () | |
Instances of this class can be automatically converted to Pebble Layers. | |
operator const ::Layer * () const | |
void | MarkDirty () |
void | SetFrame (GRect frame) |
void | SetFrame (int16_t x, int16_t y, int16_t w, int16_t h) |
void | SetFrame (GPoint origin, GSize size) |
GRect | GetFrame () |
void | SetBounds (GRect bounds) |
GRect | GetBounds () |
void | RemoveFromParent () |
void | RemoveChildLayers () |
void | AddChild (Layer &child) |
void | InsertBelowSibling (Layer &below_sibling_layer) |
void | InsertAboveSibling (Layer &above_sibling_layer) |
void | SetHidden (bool hidden) |
bool | GetHidden () |
void | SetClips (bool clips) |
bool | GetClips () |
Static Public Member Functions | |
template<class T > | |
static T & | Get (::Window *window) |
Returns an object of the template class type from the specified window's user data. | |
Protected Member Functions | |
virtual void | OnLoad () |
virtual void | OnUnload () |
virtual void | OnAppear () |
virtual void | OnDisappear () |
void | SetClickConfigProvider (::ClickConfigProvider click_config_provider) |
Sets the click config provider of this window to a local method. | |
Additional Inherited Members | |
![]() | |
::Window * | window_ |
![]() | |
::Layer * | layer_ |
Base class for application windows.
|
inline |
Constructs a new Window and initalizes it with the default values. This constructor also sets up all the window events.
|
inlineprotectedvirtual |
OnAppear handler: called when the window comes on the screen (again). E.g. when second-top-most window gets revealed (again) after popping the top-most window, but also when the window is pushed for the first time. This is a good moment to start timers related to the window, or reset the UI, etc.
|
inlineprotectedvirtual |
OnDisappear handler: called when the window leaves the screen, e.g. when another window is pushed, or this window is popped. Good moment to stop timers related to the window.
|
inlineprotectedvirtual |
OnLoad handler: called when the window is pushed to the screen when it's not loaded. This is a good moment to do the layout of the window.
|
inlineprotectedvirtual |
OnUnload handler: called when the window is deinited, but could be used in the future to free resources bound to windows that are not on screen.