|
Pebble Foundation Classes
0.2.0
C++ for Pebble
|
Layer that is automatically managed and contains an OnUpdate callback for drawing. More...
#include <pebble_layer.hpp>


Public Member Functions | |
| CustomLayer (GRect frame) | |
Public Member Functions inherited from Pebble::SimpleLayer | |
| SimpleLayer (GRect frame) | |
| virtual | ~SimpleLayer () |
| Destroys the underlying AppLayer. | |
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 () |
Protected Member Functions | |
| virtual void | OnUpdate (const GContext &ctx)=0 |
Additional Inherited Members | |
Static Protected Member Functions inherited from Pebble::SimpleLayer | |
| static SimpleLayer & | GetFromData (::Layer *layer) |
Protected Attributes inherited from Pebble::Layer | |
| ::Layer * | layer_ |
Layer that is automatically managed and contains an OnUpdate callback for drawing.
This subclass of layer creates and destroys the underlying Pebble OS layer structure automatically. This type of layer must be sublcassed to provide an implementation for the OnUpdate callback method.
|
inline |
Creates a layer and sets its frame and bounds. Default values:
bounds : origin (0, 0) and a size equal to the frame that is passed in.clips : truehidden : false | frame | The frame at which the layer should be initialized. |
|
protectedpure virtual |
The layer's render function. The system will call this method automatically when the layer needs to redraw.
| ctx | The destination graphics context to draw into |