< Home

< Table of Contents

REFERENCE MANUAL

Layout Class Reference

#include <sprk.h>

Inheritance diagram for Layout:
Sprocket Object

Public Member Functions

void Assign (Layout const &in_that)
 
void AttachViewBack (View const &in_view, Rectangle const &in_position=Rectangle(-1.0f, 1.0f,-1.0f, 1.0f))
 
void AttachViewFront (View const &in_view, Rectangle const &in_position=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 (WindowPoint const &in_point) const
 
size_t GetLayerCount () 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)
 
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, View in_view)
 
void RepositionLayer (size_t in_layer, Rectangle const &in_position)
 
bool ShowLayerAt (WindowPoint const &in_point) const
 
void Update (Sprocket::UpdateType in_update_type=Sprocket::UpdateType::Asynchronous) const
 
void Update (Window::UpdateControl const in_control, Time const time_limit=-1.) const
 
- Public Member Functions inherited from Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Additional Inherited Members

- Public Types inherited from Sprocket
enum  UpdateType { Synchronous, Asynchronous }
 
- Static Public Member Functions inherited from 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 SegmentKey.

Member Function Documentation

void Layout::AttachViewBack ( View const &  in_view,
Rectangle const &  in_position = 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 Layout::AttachViewFront ( View const &  in_view,
Rectangle const &  in_position = 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 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 Layout::Delete ( )

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

void Layout::DetachLayer ( size_t  in_layer)

Detaches this Layer from this Layout

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

Detaches this View from this Layout

Parameters
in_viewThe View to detach.
View 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 Layout::GetAttachedViewIncludeLink ( size_t  in_layer) const

Returns the IncludeKey associated with this Layout. The include key links the Layout with the View.

View Layout::GetFrontView ( ) const

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

UTF8 Layout::GetName ( ) const

Get the name used when creating this Layout.

CanvasArray Layout::GetOwningCanvases ( )

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

Rectangle 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 Layout::GetSegmentKey ( )

Each of the four display hierarchy objects (Canvas, Layout, View, Model) are backed by a SegmentKey. This function returns the SegmentKey that is associated with this Layout.

Type 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 Object.

void Layout::ReassignLayer ( size_t  in_layer,
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 Layout::RepositionLayer ( size_t  in_layer,
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 Layout::Update ( Sprocket::UpdateType  in_update_type = Sprocket::UpdateType::Asynchronous) const

Redraws the subcomponents of this Layout.

void Layout::Update ( Window::UpdateControl const  in_control,
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 Window::UpdateControl
time_limitthe maximum amount of time, in seconds, to spend updating this Layout

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