ADTF Display Toolbox
Loading...
Searching...
No Matches
cDrawer

cDrawer class. More...

#include <drawer.h>

Inheritance diagram for cDrawer:
[legend]

Public Member Functions

 cDrawer ()
 Constructor.
 
virtual ~cDrawer ()=default
 Destructor.
 
tInt GetZOrder () const override
 The ZOrder defines the order of drawing the objects, if there are in the same coordinate space level.
 
tBool IsVisible () const override
 
virtual tResult Draw (const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > &) override
 This method is where the user code defines what is drawn on the canvas.
 
tResult OnDraw (const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > &pCanvas) override
 This method is called from the drawer manager to draw on the give canvas.
 
virtual tResult ContextCreated (const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > &) override
 This method can be overwritten to define the desired behavior during the OnCreateContext event.
 
tResult OnCreateContext (const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > &pCanvas) final override
 This oneshot method is called once when the transition from runlevel 4 to runlevel 5 occurs The use of this function is purely to call the ContextCreated Callbacks within the user implementation.
 
virtual tResult ContextDestroyed () override
 This method can be overwritten to define the desired behavior during the OnDestroyContext event.
 
tResult OnDestroyContext () final
 This oneshot method is called once when the transition from runlevel 5 to runlevel 4 occurs The use of this function is purely to call the ContextCreated Callbacks within the user implementation.
 
- Public Member Functions inherited from cDrawerImplementation
tVoid ApplyMatrix (const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > &pCanvas)
 This method is called before Drawing.
 
tVoid SetMatrix (tFloat32 fTransX, tFloat32 fTransY, tFloat32 fScaleX, tFloat32 fScaleY, tFloat32 fRotate)
 SetMatrix sets all parameter for the matrix to use in ApplyMatrix() Draw() don't need them because the matrix is applied before Draw() is called.
 

Additional Inherited Members

- Protected Member Functions inherited from cDrawerImplementation
tInt GetZOrderImpl () const
 The ZOrder defines the order of drawing the objects, if there are in the same coordinate space level.
 
tBool IsVisibleImpl () const
 IsVisible() is not the same as IsActive()!
 
tResult OnDrawImpl (dengar::IDrawer *pDrawer, const ucom::ant::iobject_ptr< graphicslib::ICanvas > &pCanvas)
 
tResult Register (dengar::IDrawer *pDrawer)
 
tVoid ClearChildren ()
 
- Static Protected Member Functions inherited from cDrawerImplementation
static tVoid LogDrawerError (tResult nResult, dengar::IDrawer *pDrawer)
 
- Protected Attributes inherited from cDrawerImplementation
base::property_variable< tInt > m_nZOrder
 
base::property_variable< tBool > m_bVisible
 
base::property_variable< tFloat32 > m_fTransX {0.0}
 
base::property_variable< tFloat32 > m_fTransY {0.0}
 
base::property_variable< tFloat32 > m_fScaleX {0.0}
 
base::property_variable< tFloat32 > m_fScaleY {0.0}
 
base::property_variable< tFloat32 > m_fRotate {0.0}
 
ucom::ant::object_ptr< streaming::IBindingObject > m_pBindingClient
 
ucom::object_ptr< drawerlib::cDrawerManager > m_pDrawerManager
 

Detailed Description

cDrawer class.

A cDrawer derived class behaves like a Filter and extends its functionality by IDrawer methods, a Draw method and the coordinate space handling.

A cDrawer shares the Canvas with the containing Filter (based on cFilter) and handles Mouse and Keyboard events.

If the parent property is set, then the coordinate space is placed inside the referenced coordinate space. The parent property can contain the name of any drawer instantiated in the current filter graph. If no parent is set, the 2DDisplay coordinate space aka world is the parent.

Definition at line 300 of file drawer.h.

Constructor & Destructor Documentation

◆ cDrawer()

cDrawer ( )
inline

Constructor.

Definition at line 306 of file drawer.h.

Member Function Documentation

◆ ContextCreated()

virtual tResult ContextCreated ( const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > & )
inlineoverridevirtual

This method can be overwritten to define the desired behavior during the OnCreateContext event.

Parameters
pCanvas[in/out] Pointer to the current Canvas object
Returns
standard result

Definition at line 390 of file drawer.h.

◆ ContextDestroyed()

virtual tResult ContextDestroyed ( )
inlineoverridevirtual

This method can be overwritten to define the desired behavior during the OnDestroyContext event.

Returns
standard result

Definition at line 436 of file drawer.h.

◆ Draw()

virtual tResult Draw ( const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > & )
inlineoverridevirtual

This method is where the user code defines what is drawn on the canvas.

Parameters
pCanvas[in/out] Pointer to the current Canvas object
Returns
always NO_ERROR because the base class cDrawer has nothing to draw

Definition at line 368 of file drawer.h.

◆ GetZOrder()

tInt GetZOrder ( ) const
inlineoverride

The ZOrder defines the order of drawing the objects, if there are in the same coordinate space level.

Returns
the current ZOrder value

Definition at line 349 of file drawer.h.

◆ IsVisible()

tBool IsVisible ( ) const
inlineoverride

Definition at line 357 of file drawer.h.

◆ OnCreateContext()

tResult OnCreateContext ( const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > & pCanvas)
inlinefinaloverride

This oneshot method is called once when the transition from runlevel 4 to runlevel 5 occurs The use of this function is purely to call the ContextCreated Callbacks within the user implementation.

It is not intended to be overridden by Drawer implementations.

Parameters
pCanvas[in/out] Pointer to the current Canvas object
Returns
standard result

Definition at line 402 of file drawer.h.

◆ OnDestroyContext()

tResult OnDestroyContext ( )
inlinefinal

This oneshot method is called once when the transition from runlevel 5 to runlevel 4 occurs The use of this function is purely to call the ContextCreated Callbacks within the user implementation.

It is not intended to be overridden by Drawer implementations.

Returns
standard result

Definition at line 447 of file drawer.h.

◆ OnDraw()

tResult OnDraw ( const ucom::ant::iobject_ptr< graphicslib::dengar::ICanvas > & pCanvas)
inlineoverride

This method is called from the drawer manager to draw on the give canvas.

Parameters
pCanvas[in/out] Pointer to the current Canvas object
Returns
always NO_ERROR because the base class cDrawer has nothing to draw

Definition at line 379 of file drawer.h.