Public Member Functions | List of all members
HPS::Layout Class Reference

#include <sprk.h>

Inheritance diagram for HPS::Layout:
HPS::Sprocket HPS::Object

Public Member Functions

 Layout (Layout const &that)
 
HPS::Type ObjectType () const
 
void Delete ()
 
Layoutoperator= (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
 
- Public Member Functions inherited from HPS::Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
Objectoperator= (Object const &other_object)
 
 Object (Object &&in_that)
 
Objectoperator= (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

- Public Types inherited from HPS::Sprocket
enum  UpdateType { Synchronous, Asynchronous }
 
- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

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.

Member Function Documentation

void HPS::Layout::AttachViewBack ( View const &  in_view,
HPS::Rectangle const &  in_position = HPS::Rectangle(-1.0f, 1.0f,-1.0f, 1.0f) 
)

Attached a View to this Layout, and places it to the back of the layer list

Parameters
in_viewThe View to be attached to this Layer.
in_positionA Rectangle describing the position this View occupies with respect to the window.
void HPS::Layout::AttachViewFront ( View const &  in_view,
HPS::Rectangle const &  in_position = HPS::Rectangle(-1.0f, 1.0f,-1.0f, 1.0f) 
)

Attached a View to this Layout, and places it to the front of the layer list

Parameters
in_viewThe View to be attached to this Layer.
in_positionA Rectangle describing the position this View occupies with respect to the window.
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.

Parameters
in_layerThe layer to be moved to the front
void HPS::Layout::Delete ( )

Deletes this Layout. If the Layout has Views attached, they are not destroyed.

void HPS::Layout::DetachLayer ( size_t  in_layer)

Detaches this Layer from this Layout

Parameters
in_layerThe Layer to detach.
void HPS::Layout::DetachView ( View const &  in_view)

Detaches this View from this Layout

Parameters
in_viewThe View to detach.
View HPS::Layout::GetAttachedView ( size_t  in_layer = 0) const

Returns the View assigned to the specified Layer

Parameters
in_layerThe Layer of interest.
Returns
The View associated to in_layer.
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

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.

UTF8 HPS::Layout::GetName ( ) const

Get the name used when creating this Layout.

CanvasArray HPS::Layout::GetOwningCanvases ( )

Returns an array containing the Canvas this Layout is included in.

Rectangle HPS::Layout::GetPosition ( size_t  in_layer) const

Returns the position assigned to the specified Layer

Parameters
in_layerThe layer of interest.
Returns
The position of in_layer.
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.

HPS::Type HPS::Layout::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS::Object.

void HPS::Layout::ReassignLayer ( size_t  in_layer,
HPS::View  in_view 
)

Reassigns a Layer to a different View.

Parameters
in_layerThe layer to be reassigned.
in_viewThe View in_layer will be assigned to.
void HPS::Layout::RepositionLayer ( size_t  in_layer,
HPS::Rectangle const &  in_position 
)

Changes the position of layer with respect to its window.

Parameters
in_layerThe layer to be repositioned.
in_positionThe new position for the layer.
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.

Parameters
in_controlone of the enum values specified by HPS::Window::UpdateControl
time_limitthe maximum amount of time, in seconds, to spend updating this HPS::Layout

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