REFERENCE MANUAL
#include <sprk.h>
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 () |
Type | ObjectType () const |
bool | operator!= (Canvas const &in_that) const |
Canvas & | operator= (Canvas const &in_that) |
bool | operator== (Canvas const &in_that) const |
void | SetFrameRate (float in_frame_rate=20) |
void | Update (Sprocket::UpdateType in_update_type=Sprocket::UpdateType::Asynchronous) const |
void | Update (Window::UpdateControl const in_control, Time const time_limit=-1.) const |
UpdateNotifier | UpdateWithNotifier () const |
UpdateNotifier | UpdateWithNotifier (Window::UpdateControl const in_control, Time const time_limit=-1.) const |
![]() | |
Sprocket (Sprocket &&in_that) | |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (Type in_mask) const |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
Type | Type () const |
Additional Inherited Members | |
![]() | |
enum | UpdateType { Synchronous, Asynchronous } |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
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 WindowKey.
void Canvas::AttachLayout | ( | Layout const & | in_layout | ) |
void Canvas::AttachViewAsLayout | ( | View const & | in_view | ) |
void Canvas::Delete | ( | ) |
Layout Canvas::GetAttachedLayout | ( | ) | const |
IncludeKey Canvas::GetAttachedLayoutIncludeLink | ( | ) | const |
Returns the IncludeKey that attaches the current layout to this Canvas.
float Canvas::GetFrameRate | ( | ) | const |
Returns true if frame rate is active for this Canvas.
View Canvas::GetFrontView | ( | ) | const |
Views can overlap. This function returns a reference to the frontmost View.
PortfolioKey Canvas::GetPortfolioKey | ( | ) |
Returns the PortfolioKey associated with this Canvas' SegmentKey.
WindowKey Canvas::GetWindowKey | ( | ) |
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 Canvas.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from Object.
void Canvas::SetFrameRate | ( | float | in_frame_rate = 20 | ) |
Sets the maximum frame rate for this Canvas in number of frames per second.
in_frame_rate | Frame rate in number of frames per second. Pass 0 to disable frame rate. |
void Canvas::Update | ( | Sprocket::UpdateType | in_update_type = Sprocket::UpdateType::Asynchronous | ) | const |
Redraws the entire Canvas, including all of its child components.
void Canvas::Update | ( | Window::UpdateControl const | in_control, |
Time const | time_limit = -1. |
||
) | const |
Redraws the entire Canvas, including all of its child components using the specified parameters.
in_control | one of the enum values specified by Window::UpdateControl |
time_limit | the maximum amount of time, in seconds, to spend updating this Canvas |
UpdateNotifier Canvas::UpdateWithNotifier | ( | ) | const |
Redraws the entire Canvas, including all of its child components, and also returns an UpdateNotifier to facilitate tracking the update progress.
UpdateNotifier Canvas::UpdateWithNotifier | ( | Window::UpdateControl const | in_control, |
Time const | time_limit = -1. |
||
) | const |
Redraws the entire Canvas, including all of its child components using the specified parameters, and also returns an UpdateNotifier to facilitate tracking the update progress.
in_control | one of the enum values specified by Window::UpdateControl |
time_limit | the maximum amount of time, in seconds, to spend updating this Canvas |