#include <sprk.h>

Inheritance diagram for HPS::Canvas:
HPS::Sprocket HPS::Object

Public Member Functions

void Assign (Canvas const &in_that)
 
void AttachLayout (Layout const &in_layout)
 
void AttachViewAsLayout (View const &in_view)
 
 Canvas (Canvas const &that)
 
void Delete ()
 
void DetachLayout ()
 
bool Equals (Canvas const &in_that) const
 
Layout GetAttachedLayout () const
 
IncludeKey GetAttachedLayoutIncludeLink () const
 
float GetFrameRate () const
 
View GetFrontView () const
 
UTF8 GetName () const
 
PortfolioKey const GetPortfolioKey () const
 
PortfolioKey GetPortfolioKey ()
 
WindowKey const GetWindowKey () const
 
WindowKey GetWindowKey ()
 
HPS::Type ObjectType () const
 
bool operator!= (Canvas const &in_that) const
 
Canvasoperator= (Canvas const &in_that)
 
bool operator== (Canvas const &in_that) const
 
void SetFrameRate (float in_frame_rate=20)
 
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::Canvas
 
- 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 Canvas 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 Layout, View, and Model objects. The Canvas is the top-level object of the hierarchy and roughly correlates to a window. The Canvas is backed by an HPS::WindowKey.

Member Function Documentation

◆ AttachLayout()

void HPS::Canvas::AttachLayout ( Layout const &  in_layout)

Attaches a layout to this HPS::Canvas. There can only be one layout per HPS::Canvas. If a Layout is already attached to this Canvas, the new Layout will replace the old one.

Parameters
in_layoutthe Layout to attach to this HPS::Canvas.

◆ AttachViewAsLayout()

void HPS::Canvas::AttachViewAsLayout ( View const &  in_view)

Attaches a View to this HPS::Canvas using an implicit Layout that convers the whole window. If a Layout is already attached to this Canvas, the new Layout will replace the old one.

Parameters
in_viewthe View to attach to this HPS::Canvas.

◆ Delete()

void HPS::Canvas::Delete ( )

Deletes this Canvas, and the Window that backs it. If the Canvas has Layouts attached, they are not destroyed.

◆ DetachLayout()

void HPS::Canvas::DetachLayout ( )

Detaches the Layout from this Canvas.

◆ GetAttachedLayout()

Layout HPS::Canvas::GetAttachedLayout ( ) const

Returns the Layout that is currently attached to this Canvas.

◆ GetAttachedLayoutIncludeLink()

IncludeKey HPS::Canvas::GetAttachedLayoutIncludeLink ( ) const

Returns the IncludeKey that attaches the current layout to this Canvas.

◆ GetFrameRate()

float HPS::Canvas::GetFrameRate ( ) const

Returns frame rate as a float value for this HPS::Canvas.

Returns
Returns frame rate in number of frames per second.

◆ GetFrontView()

View HPS::Canvas::GetFrontView ( ) const

Views can overlap. This function returns a reference to the frontmost View.

◆ GetName()

UTF8 HPS::Canvas::GetName ( ) const

Get the name used when creating this Canvas.

◆ GetPortfolioKey()

PortfolioKey HPS::Canvas::GetPortfolioKey ( )

Returns the HPS::PortfolioKey associated with this Canvas' SegmentKey.

◆ GetWindowKey()

WindowKey HPS::Canvas::GetWindowKey ( )

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 Canvas.

◆ ObjectType()

HPS::Type HPS::Canvas::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.

◆ SetFrameRate()

void HPS::Canvas::SetFrameRate ( float  in_frame_rate = 20)

Sets the minimum frame rate for this HPS::Canvas in number of frames per second.

Parameters
in_frame_rateFrame rate in number of frames per second. Pass 0 to disable frame rate.

◆ Update() [1/2]

void HPS::Canvas::Update ( ) const

Redraws the entire Canvas, including all of its child components using the default options.

◆ Update() [2/2]

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

Redraws the entire Canvas, 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 this HPS::Canvas

◆ UpdateWithNotifier() [1/2]

UpdateNotifier HPS::Canvas::UpdateWithNotifier ( ) const

Redraws the entire Canvas, 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::Canvas::UpdateWithNotifier ( HPS::Window::UpdateType  in_type,
HPS::Time  in_time_limit = -1.0 
) const

Redraws the entire Canvas, including all of its child components using the specified parameters, and also returns an

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: