#include <DraWin.h>
Public Member Functions | |
DraWin () | |
Default constructor. The list 0 is created by default. | |
~DraWin () | |
Destructor. | |
virtual ResourcePlate | getPlate () const =0 |
Gets the plate. | |
bool | addList (Time timeout, unsigned int &listNum) |
Add a drawing list. | |
bool | swapList (Time timeout, unsigned int listNum) |
Draw the last pushed objects, delete previous objects. | |
bool | pushObj (DraWinObj *draWinObj, Time timeout, unsigned int listNum=0) |
Push an object in the list. Push a pointer to a drawing object in a drawing list, the object must be allocated before the object will be visible only when swapList will be called. | |
bool | overlapObj (DraWinObj *draWinObj, Time timeout, unsigned int listNum=0) |
Overlap an object in the list. Add a pointer to a drawing object in a drawing list, the object must be allocated before the object will be suddenly visible. If the number of objects in the list excedes DRA_WIN_RES_LIST_SIZE older objects are removed (wake effect). | |
bool | clearList (Time timeout, unsigned int listNum) |
Identic to swapList. Draw the last pushed objects, delete previous objects. | |
bool | accuList (Time timeout, unsigned int listNum) |
Identic to swapList. Draw the last pushed objects, delete previous objects. | |
Public Attributes | |
DraWinVar | _draWinVar |
DraWin parameters. | |
Protected Member Functions | |
int | _listsTrylock () |
int | _listsUnlock () |
Protected Attributes | |
vector< DraWinList * > | _draWinLists |
lists of _drawWinList pointers (mobile pointers used to toggle between A and B) | |
vector< DraWinList * > | _draWinListsA |
lists of the first bank of _drawWinLists pointers | |
vector< DraWinList * > | _draWinListsB |
lists of the second bank of _drawWinLists pointers | |
vector< unsigned int > | _indexA |
vector< unsigned int > | _indexB |
MipResources::DraWin::DraWin | ( | ) | [inline] |
Default constructor. The list 0 is created by default.
MipResources::DraWin::~DraWin | ( | ) | [inline] |
Destructor.
int MipResources::DraWin::_listsTrylock | ( | ) | [inline, protected] |
Try to lock the mutex of _drawWinLists (non blocking)
int MipResources::DraWin::_listsUnlock | ( | ) | [inline, protected] |
Unlock the mutex of _drawWinLists
virtual ResourcePlate MipResources::DraWin::getPlate | ( | ) | const [pure virtual] |
Gets the plate.
Implements MipResources::Resource.
Implemented in MipResources::DraWinGL, MipResources::DraWinQt2D, and MipResources::DraWinGL.
bool MipResources::DraWin::addList | ( | Time | timeout, | |
unsigned int & | listNum | |||
) |
Add a drawing list.
[in] | timeout | Timeout for adding retries. |
[out] | listNum | Number of the list, use it to push and to swap. |
bool MipResources::DraWin::swapList | ( | Time | timeout, | |
unsigned int | listNum | |||
) |
Draw the last pushed objects, delete previous objects.
[in] | timeout | Timeout for swapping retries |
[out] | listNum | Number of the list to swap. |
bool MipResources::DraWin::pushObj | ( | DraWinObj * | draWinObj, | |
Time | timeout, | |||
unsigned int | listNum = 0 | |||
) |
Push an object in the list. Push a pointer to a drawing object in a drawing list, the object must be allocated before the object will be visible only when swapList will be called.
[in] | draWinObj | Valid pointer to a drawing object to be pushed. |
[in] | timeout | Timeout for pushing retries. |
[in] | listNum | Number of the list to use (inf not specified the default 0 is used). |
bool MipResources::DraWin::overlapObj | ( | DraWinObj * | draWinObj, | |
Time | timeout, | |||
unsigned int | listNum = 0 | |||
) |
Overlap an object in the list. Add a pointer to a drawing object in a drawing list, the object must be allocated before the object will be suddenly visible. If the number of objects in the list excedes DRA_WIN_RES_LIST_SIZE older objects are removed (wake effect).
[in] | draWinObj | Valid pointer to a drawing object to be overlapped. |
[in] | timeout | Timeout for pushing retries. |
[in] | listNum | Number of the list to use (inf not specified the default 0 is used). |
bool MipResources::DraWin::clearList | ( | Time | timeout, | |
unsigned int | listNum | |||
) | [inline] |
Identic to swapList. Draw the last pushed objects, delete previous objects.
[in] | timeout | Timeout for swapping retries |
[out] | listNum | Number of the list to swap. |
bool MipResources::DraWin::accuList | ( | Time | timeout, | |
unsigned int | listNum | |||
) | [inline] |
Identic to swapList. Draw the last pushed objects, delete previous objects.
[in] | timeout | Timeout for swapping retries |
[out] | listNum | Number of the list to swap. |
vector<DraWinList*> MipResources::DraWin::_draWinLists [protected] |
lists of _drawWinList pointers (mobile pointers used to toggle between A and B)
vector<DraWinList*> MipResources::DraWin::_draWinListsA [protected] |
lists of the first bank of _drawWinLists pointers
vector<DraWinList*> MipResources::DraWin::_draWinListsB [protected] |
lists of the second bank of _drawWinLists pointers
vector<unsigned int> MipResources::DraWin::_indexA [protected] |
vector<unsigned int> MipResources::DraWin::_indexB [protected] |
DraWin parameters.