#include <CUI_DraggableViewFrame.h>
Inheritance diagram for CUI_DraggableViewFrame:

Public Member Functions | |
| CUI_DraggableViewFrame (CUI_UI *ui=NULL, float x=0, float y=0, float x2=1, float y2=1, CUI_Frame *parent=NULL, IUI_Shader *shader=NULL, IUI_Shader *cursor=NULL, CUI_CoordSys *coordsys=NULL, float keyScrollAmount=0.5) | |
| constructor | |
| virtual | ~CUI_DraggableViewFrame () |
| destructor | |
| virtual bool | SetView (float width, float height) |
| set the width and height for the view area | |
| virtual bool | ProcessKey (unsigned long key) |
| Process a incoming key. | |
| virtual bool | SetKeyScrollAmount (float amount) |
| Set the amount to scroll by when an arrow key is pressed. | |
| virtual bool | IsClickable () |
| this frame is clickable | |
| virtual bool | Click (int &id, int &numparam, void **param) |
| what to do when clicked | |
| virtual bool | IsDraggable () |
| this frame is draggable | |
| virtual bool | Drag (float x, float y, float dx, float dy, int &id, int &numparam, void **param) |
| what to do when dragged | |
| virtual void | DeleteParam (void *param) |
| Delete a parameter allocated by this frame. | |
Protected Attributes | |
| float | m_viewWidth |
| width of the view area (in parent's coordinate system) | |
| float | m_viewHeight |
| height of the view area (in parent's coordinate system) | |
| float | m_keyScrollAmount |
| the amount to scroll by upon key commands | |
A very simple class. All the functionality is elsewhere, it just needs to have a Drag function that updates the viewable window.
You absolutely MUST specify a specific coordinate system for an instance of this object. Telling it to use the default (by not specifying a coordsys) can cause serious problems for app.
Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED
UI_DISABLED
UI_INACTIVE
|
||||||||||||||||
|
what to do when clicked reset the last cursor position Reimplemented from CUI_Frame. |
|
|
Delete a parameter allocated by this frame. Draggable frames return no param Reimplemented from CUI_Frame. |
|
||||||||||||||||||||||||||||||||
|
what to do when dragged updates the coordinate system view area based on cursor position Reimplemented from CUI_Frame. |
1.3.4