#include <sprk.h>
Public Member Functions | |
Layout (Layout const &that) | |
HPS::Type | ObjectType () const |
void | Delete () |
Layout & | operator= (Layout const &in_that) |
void | Assign (Layout const &in_that) |
bool | Equals (Layout const &in_that) const |
bool | operator!= (Layout const &in_that) const |
bool | operator== (Layout const &in_that) const |
UTF8 | GetName () const |
size_t | GetLayerCount () const |
void | AttachViewFront (View const &in_view, HPS::Rectangle const &in_position=HPS::Rectangle(-1.0f, 1.0f,-1.0f, 1.0f)) |
void | AttachViewBack (View const &in_view, HPS::Rectangle const &in_position=HPS::Rectangle(-1.0f, 1.0f,-1.0f, 1.0f)) |
void | DetachLayer (size_t in_layer) |
void | DetachView (View const &in_view) |
void | BringToFront (size_t in_layer) |
void | ReassignLayer (size_t in_layer, HPS::View in_view) |
void | RepositionLayer (size_t in_layer, HPS::Rectangle const &in_position) |
View | GetFrontView () const |
View | GetAttachedView (size_t in_layer=0) const |
Rectangle | GetPosition (size_t in_layer) const |
IncludeKey | GetAttachedViewIncludeLink (size_t in_layer) const |
SegmentKey | GetLayerSegmentKey (size_t in_layer) const |
size_t | GetLayerAt (HPS::WindowPoint const &in_point) const |
bool | ShowLayerAt (HPS::WindowPoint const &in_point) const |
SegmentKey | GetSegmentKey () |
SegmentKey const | GetSegmentKey () const |
CanvasArray | GetOwningCanvases () |
CanvasArray const | GetOwningCanvases () const |
void | Update (HPS::Sprocket::UpdateType in_update_type=Sprocket::UpdateType::Asynchronous) const |
void | Update (HPS::Window::UpdateControl const in_control, HPS::Time const time_limit=-1.) const |
![]() | |
Sprocket (HPS::Sprocket const &in_that)=default | |
Sprocket (Sprocket &&in_that) | |
![]() | |
Object (Object const &that) | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Additional Inherited Members | |
![]() | |
enum | UpdateType { Synchronous, Asynchronous } |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The Layout class is one of the four core display classes used in a Visualize application. It is meant to be used as part of a display hierarchy along with the Canvas, View, and Model objects. The parent of the Layout is the Canvas, and a Layout can have multiple Views. The Layout is meant to describe the way the Views are presented in the Canvas. Like the other three core objects, the Layout is backed by a HPS::SegmentKey.
void HPS::Layout::AttachViewBack | ( | View const & | in_view, |
HPS::Rectangle const & | in_position = HPS::Rectangle(-1.0f, 1.0f,-1.0f, 1.0f) |
||
) |
void HPS::Layout::AttachViewFront | ( | View const & | in_view, |
HPS::Rectangle const & | in_position = HPS::Rectangle(-1.0f, 1.0f,-1.0f, 1.0f) |
||
) |
void HPS::Layout::BringToFront | ( | size_t | in_layer | ) |
Brings a Layer to the front of the list, causing to be drawn on top of the other layers.
in_layer | The layer to be moved to the front |
void HPS::Layout::Delete | ( | ) |
void HPS::Layout::DetachLayer | ( | size_t | in_layer | ) |
Detaches this Layer from this Layout
in_layer | The Layer to detach. |
void HPS::Layout::DetachView | ( | View const & | in_view | ) |
View HPS::Layout::GetAttachedView | ( | size_t | in_layer = 0 | ) | const |
IncludeKey HPS::Layout::GetAttachedViewIncludeLink | ( | size_t | in_layer | ) | const |
Returns the IncludeKey associated with this Layout. The include key links the Layer segment key with the View.
View HPS::Layout::GetFrontView | ( | ) | const |
Returns the View assigned to the layer shown on top of the window
size_t HPS::Layout::GetLayerAt | ( | HPS::WindowPoint const & | in_point | ) | const |
Returns the position within the layer list of the top layer at a specified position
in_point | A point in Window coordinates. |
size_t HPS::Layout::GetLayerCount | ( | ) | const |
Returns the number of Layers currently associated with this Layout
SegmentKey HPS::Layout::GetLayerSegmentKey | ( | size_t | in_layer | ) | const |
Returns the backing SegmentKey associated with a given layer. The owner of this key is the layout segment key.
CanvasArray HPS::Layout::GetOwningCanvases | ( | ) |
Rectangle HPS::Layout::GetPosition | ( | size_t | in_layer | ) | const |
Returns the position assigned to the specified Layer
in_layer | The layer of interest. |
SegmentKey HPS::Layout::GetSegmentKey | ( | ) |
Each of the four display hierarchy objects (HPS::Canvas, HPS::Layout, HPS::View, HPS::Model) are backed by a HPS::SegmentKey. This function returns the HPS::SegmentKey that is associated with this HPS::Layout.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Object.
void HPS::Layout::ReassignLayer | ( | size_t | in_layer, |
HPS::View | in_view | ||
) |
void HPS::Layout::RepositionLayer | ( | size_t | in_layer, |
HPS::Rectangle const & | in_position | ||
) |
Changes the position of layer with respect to its window.
in_layer | The layer to be repositioned. |
in_position | The new position for the layer. |
bool HPS::Layout::ShowLayerAt | ( | HPS::WindowPoint const & | in_point | ) | const |
Returns whether a layer is present at the specified position.
in_point | A point in Window coordinates. |
void HPS::Layout::Update | ( | HPS::Sprocket::UpdateType | in_update_type = Sprocket::UpdateType::Asynchronous | ) | const |
Redraws the subcomponents of this Layout.
void HPS::Layout::Update | ( | HPS::Window::UpdateControl const | in_control, |
HPS::Time const | time_limit = -1. |
||
) | const |
Redraws the subcomponents of this Layout using the specified parameters.
in_control | one of the enum values specified by HPS::Window::UpdateControl |
time_limit | the maximum amount of time, in seconds, to spend updating this HPS::Layout |