#include <sprk.h>

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

Public Member Functions

void Assign (Layout const &in_that)
 
void AttachViewBack (View const &in_view, HPS::Rectangle const &in_position=HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f))
 
void AttachViewFront (View const &in_view, HPS::Rectangle const &in_position=HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f))
 
void BringToFront (size_t in_layer)
 
void Delete ()
 
void DetachLayer (size_t in_layer)
 
void DetachView (View const &in_view)
 
bool Equals (Layout const &in_that) const
 
View GetAttachedView (size_t in_layer=0) const
 
IncludeKey GetAttachedViewIncludeLink (size_t in_layer) const
 
View GetFrontView () const
 
size_t GetLayerAt (HPS::WindowPoint const &in_point) const
 
size_t GetLayerCount () const
 
SegmentKey GetLayerSegmentKey (size_t in_layer) const
 
UTF8 GetName () const
 
CanvasArray GetOwningCanvases ()
 
CanvasArray const GetOwningCanvases () const
 
Rectangle GetPosition (size_t in_layer) const
 
SegmentKey GetSegmentKey ()
 
SegmentKey const GetSegmentKey () const
 
 Layout (Layout const &that)
 
HPS::Type ObjectType () const
 
bool operator!= (Layout const &in_that) const
 
Layoutoperator= (Layout const &in_that)
 
bool operator== (Layout const &in_that) const
 
void ReassignLayer (size_t in_layer, HPS::View in_view)
 
void RepositionLayer (size_t in_layer, HPS::Rectangle const &in_position)
 
bool ShowLayerAt (HPS::WindowPoint const &in_point) const
 
void Update () const
 
void Update (HPS::Window::UpdateType in_type, HPS::Time in_time_limit=-1.0) const
 
UpdateNotifier UpdateWithNotifier () const
 
UpdateNotifier UpdateWithNotifier (HPS::Window::UpdateType in_type, HPS::Time in_time_limit=-1.0) const
 
- Public Member Functions inherited from HPS::Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::Layout
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- 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

◆ AttachViewBack()

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.

◆ AttachViewFront()

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.

◆ BringToFront()

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

◆ Delete()

void HPS::Layout::Delete ( )

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

◆ DetachLayer()

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

Detaches this Layer from this Layout

Parameters
in_layerThe Layer to detach.

◆ DetachView()

void HPS::Layout::DetachView ( View const &  in_view)

Detaches this View from this Layout

Parameters
in_viewThe View to detach.

◆ GetAttachedView()

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.

◆ GetAttachedViewIncludeLink()

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.

◆ GetFrontView()

View HPS::Layout::GetFrontView ( ) const

Returns the View assigned to the layer shown on top of the window

◆ GetLayerAt()

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

Parameters
in_pointA point in Window coordinates.
Returns
The position within the layer list of the top layer at position in_point.

◆ GetLayerCount()

size_t HPS::Layout::GetLayerCount ( ) const

Returns the number of Layers currently associated with this Layout

◆ GetLayerSegmentKey()

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.

◆ GetName()

UTF8 HPS::Layout::GetName ( ) const

Get the name used when creating this Layout.

◆ GetOwningCanvases()

CanvasArray HPS::Layout::GetOwningCanvases ( )

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

◆ GetPosition()

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.

◆ GetSegmentKey()

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.

◆ ObjectType()

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

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

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

Reimplemented from HPS::Object.

◆ ReassignLayer()

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.

◆ RepositionLayer()

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.

◆ ShowLayerAt()

bool HPS::Layout::ShowLayerAt ( HPS::WindowPoint const &  in_point) const

Returns whether a layer is present at the specified position.

Parameters
in_pointA point in Window coordinates.
Returns
true if a layer is present at in_point, false otherwise.

◆ Update() [1/2]

void HPS::Layout::Update ( ) const

Redraws the Layout and all Canvases it appears in, including all of its child components.

◆ Update() [2/2]

void HPS::Layout::Update ( HPS::Window::UpdateType  in_type,
HPS::Time  in_time_limit = -1.0 
) const

Redraws the Layout and all Canvases it appears in, including all of its child components using the specified parameters.

Parameters
in_typeone of the enum values specified by HPS::Window::UpdateType
in_time_limitthe maximum amount of time, in seconds, to spend updating.

◆ UpdateWithNotifier() [1/2]

UpdateNotifier HPS::Layout::UpdateWithNotifier ( ) const

Redraws the Layout and all Canvases it appears in, including all of its child components using the default options, and also returns a notifier to facilitate tracking the update progress.

Returns
An UpdateNotifier object that can be used to find out information about the update.

◆ UpdateWithNotifier() [2/2]

UpdateNotifier HPS::Layout::UpdateWithNotifier ( HPS::Window::UpdateType  in_type,
HPS::Time  in_time_limit = -1.0 
) const

Redraws the Layout and all Canvases it appears in, including all of its child components using the specified, and also returns a notifier to facilitate tracking the update progress.

Returns
HPS::UpdateNotifier to facilitate tracking the update progress.
Parameters
in_typeone of the enum values specified by HPS::Window::UpdateType
in_time_limitthe maximum amount of time, in seconds, to spend updating this HPS::Canvas
Returns
An UpdateNotifier object that can be used to find out information about the update.

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