Canvas

class HPS.Canvas : public HPS.Sprocket

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.

Subclassed by HPS.D3DImageCanvas

Public Functions

void Assign (HPS.Canvas in_that)
void AttachLayout (HPS.Layout 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.

Param in_layout

the Layout to attach to this HPS.Canvas.

void AttachViewAsLayout (HPS.View in_view)

Attaches a View to this HPS.Canvas using an implicit Layout that covers the whole window.

Param in_view

the View to attach to this HPS.Canvas.

Canvas ()
Canvas (HPS.Canvas that)
void Delete ()

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

void DetachLayout ()

Detaches the Layout from this Canvas.

override void Dispose ()
bool Equals (HPS.Canvas in_that)
override bool Equals (Object obj)
HPS.Layout GetAttachedLayout ()

Returns the Layout that is currently attached to this Canvas.

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

float GetFrameRate ()

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

Return

Returns frame rate in number of frames per second.

HPS.View GetFrontView ()

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

override int GetHashCode ()
string GetName ()

Get the name used when creating this Canvas.

HPS.PortfolioKey GetPortfolioKey ()

Returns the HPS.PortfolioKey associated with this CanvasSegmentKey.

HPS.WindowKey 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.

override HPS.Type ObjectType ()

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

Return

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

void SetFrameRate ()

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

void SetFrameRate (float in_frame_rate)

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

Param in_frame_rate

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

void Update ()

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

void Update (HPS.Window.UpdateType in_type)

Redraws the entire Canvas, including all of its child components using the specified parameters.

Param in_type

one of the enum values specified by HPS.Window.UpdateType

void Update (HPS.Window.UpdateType in_type, double in_time_limit)

Redraws the entire Canvas, including all of its child components using the specified parameters.

Param in_type

one of the enum values specified by HPS.Window.UpdateType

Param in_time_limit

the maximum amount of time, in seconds, to spend updating this HPS.Canvas

HPS.UpdateNotifier UpdateWithNotifier ()

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.

Return

An UpdateNotifier object used to find out information about the update.

HPS.UpdateNotifier UpdateWithNotifier (HPS.Window.UpdateType in_type)

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

Param in_type

one of the enum values specified by HPS.Window.UpdateType

Return

An UpdateNotifier object used to find out information about the update.

HPS.UpdateNotifier UpdateWithNotifier (HPS.Window.UpdateType in_type, double in_time_limit)

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

Param in_type

one of the enum values specified by HPS.Window.UpdateType

Param in_time_limit

the maximum amount of time, in seconds, to spend updating this HPS.Canvas

Return

An UpdateNotifier object used to find out information about the update.

Public Static Functions

bool operator!= (HPS.Canvas a, HPS.Canvas b)
bool operator== (HPS.Canvas a, HPS.Canvas b)