Pebble Foundation Classes  0.2.0
C++ for Pebble
Pebble::AppWindow Class Reference

Base class for application windows. More...

#include <pebble_window.hpp>

Inheritance diagram for Pebble::AppWindow:
Collaboration diagram for Pebble::AppWindow:

Public Member Functions

 AppWindow ()
 
virtual ~AppWindow ()
 Destroys the underlying Pebble window.
 
- Public Member Functions inherited from 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)
 
- Public Member Functions inherited from Pebble::Layer
 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

- Protected Attributes inherited from Pebble::Window
::Windowwindow_
 
- Protected Attributes inherited from Pebble::Layer
::Layerlayer_
 

Detailed Description

Base class for application windows.

Constructor & Destructor Documentation

◆ AppWindow()

Pebble::AppWindow::AppWindow ( )
inline

Constructs a new Window and initalizes it with the default values. This constructor also sets up all the window events.

Member Function Documentation

◆ OnAppear()

virtual void Pebble::AppWindow::OnAppear ( )
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.

◆ OnDisappear()

virtual void Pebble::AppWindow::OnDisappear ( )
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.

◆ OnLoad()

virtual void Pebble::AppWindow::OnLoad ( )
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.

◆ OnUnload()

virtual void Pebble::AppWindow::OnUnload ( )
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.


The documentation for this class was generated from the following file: