◆ AddChild()
void Pebble::Layer::AddChild |
( |
Layer & |
child | ) |
|
|
inline |
Adds the child layer to a given parent layer, making it appear in front of its parent and in front of any existing child layers of the parent. If the child layer was already part of a layer hierarchy, it will be removed from its old parent first. If added successfully, the parent (and children) will be marked dirty automatically.
- Parameters
-
parent | The layer to which to add the child layer |
child | The layer to add to the parent layer |
◆ GetBounds()
GRect Pebble::Layer::GetBounds |
( |
| ) |
|
|
inline |
Gets the bounds of the layer
- Returns
- The bounds of the layer
- See also
- layer_set_bounds
◆ GetClips()
bool Pebble::Layer::GetClips |
( |
| ) |
|
|
inline |
Gets whether clipping is enabled for the layer. If enabled, whatever the layer and its children will draw using their .update_proc
callbacks, will be clipped by the this layer's frame.
- Parameters
-
layer | The layer for which to get the clipping property |
- Returns
- True if clipping is enabled for the layer, false if clipping is not enabled for the layer.
◆ GetFrame()
GRect Pebble::Layer::GetFrame |
( |
| ) |
|
|
inline |
Gets the frame of the layer, which is it's bounding box relative to the coordinate system of its parent layer. If the frame has changed, layer_mark_dirty() will be called automatically.
- Returns
- The frame of the layer
- See also
- layer_set_frame
◆ GetHidden()
bool Pebble::Layer::GetHidden |
( |
| ) |
|
|
inline |
Gets the visibility of the layer.
- Parameters
-
layer | The layer for which to get the visibility |
- Returns
- True if the layer is hidden, false if it is not hidden.
◆ InsertAboveSibling()
void Pebble::Layer::InsertAboveSibling |
( |
Layer & |
above_sibling_layer | ) |
|
|
inline |
Inserts the layer as a sibling in front of another layer. The above_layer has to be a child of a parent layer, otherwise this function will be a noop. If inserted successfully, the parent (and children) will be marked dirty automatically.
- Parameters
-
layer_to_insert | The layer to insert into the hierarchy |
above_sibling_layer | The layer that will be used as the sibling layer below which the insertion will take place |
◆ InsertBelowSibling()
void Pebble::Layer::InsertBelowSibling |
( |
Layer & |
below_sibling_layer | ) |
|
|
inline |
Inserts the layer as a sibling behind another layer. The below_layer has to be a child of a parent layer, otherwise this function will be a noop. If inserted successfully, the parent (and children) will be marked dirty automatically.
- Parameters
-
layer_to_insert | The layer to insert into the hierarchy |
below_sibling_layer | The layer that will be used as the sibling layer above which the insertion will take place |
◆ MarkDirty()
void Pebble::Layer::MarkDirty |
( |
| ) |
|
|
inline |
Marks the complete layer as "dirty", awaiting to be asked by the system to redraw itself. Typically, this function is called whenever state has changed that affects what the layer is displaying.
- The layer's
.update_proc
will not be called before this function returns, but will be called asynchronously, shortly.
- Internally, a call to this function will schedule a re-render of the window that the layer belongs to. In effect, all layers in that window's layer hierarchy will be asked to redraw.
- If an earlier re-render request is still pending, this function is a no-op.
◆ RemoveChildLayers()
void Pebble::Layer::RemoveChildLayers |
( |
| ) |
|
|
inline |
Removes child layers from given layer If removed successfully, the child's parent layer will be marked dirty automatically.
◆ RemoveFromParent()
void Pebble::Layer::RemoveFromParent |
( |
| ) |
|
|
inline |
Gets the window that the layer is currently attached to.
- Parameters
-
layer | The layer for which to get the window |
- Returns
- The window that this layer is currently attached to, or
NULL
if it has not been added to a window's layer hierarchy.
- See also
- window_get_root_layer()
-
layer_add_child() Removes the layer from its current parent layer If removed successfully, the child's parent layer will be marked dirty automatically.
- Parameters
-
◆ SetBounds()
void Pebble::Layer::SetBounds |
( |
GRect |
bounds | ) |
|
|
inline |
Sets the bounds of the layer, which is it's bounding box relative to its frame. If the bounds has changed, layer_mark_dirty() will be called automatically.
- Parameters
-
- See also
- layer_set_frame()
◆ SetClips()
void Pebble::Layer::SetClips |
( |
bool |
clips | ) |
|
|
inline |
Sets whether clipping is enabled for the layer. If enabled, whatever the layer and its children will draw using their .update_proc
callbacks, will be clipped by the this layer's frame. If the clipping has changed, layer_mark_dirty() will be called automatically.
- Parameters
-
layer | The layer for which to set the clipping property |
clips | Supply true to make the layer clip to its frame, or false to make it non-clipping. |
◆ SetFrame()
void Pebble::Layer::SetFrame |
( |
GRect |
frame | ) |
|
|
inline |
Sets the frame of the layer, which is it's bounding box relative to the coordinate system of its parent layer. The size of the layer's bounds will be extended automatically, so that the bounds cover the new frame.
- Parameters
-
- See also
- layer_set_bounds()
◆ SetHidden()
void Pebble::Layer::SetHidden |
( |
bool |
hidden | ) |
|
|
inline |
Sets the visibility of the layer. If the visibility has changed, layer_mark_dirty() will be called automatically on the parent layer.
- Parameters
-
layer | The layer for which to set the visibility |
hidden | Supply true to make the layer hidden, or false to make it non-hidden. |
The documentation for this class was generated from the following file: