#include <CUI_DraggableFrame.h>
Inheritance diagram for CUI_DraggableFrame:
Public Member Functions | |
CUI_DraggableFrame (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, bool clipToParent=true) | |
constructor | |
virtual | ~CUI_DraggableFrame () |
destructor | |
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. | |
virtual bool | SetClipToParent (bool cliptoparent) |
Set clip to parent flag - if true, restrict rendering to the boundary of its parent. | |
Protected Attributes | |
bool | m_clipToParent |
keep the frame within the boundaries of its parent |
A very simple class. All the functionality is elsewhere, it just needs to have a Drag function that updates its position.
Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED
UI_DISABLED
UI_INACTIVE
|
what to do when clicked
Parameter list (new position): Reimplemented from CUI_Frame. |
|
Delete a parameter allocated by this frame. Draggable frames return 2 floats Reimplemented from CUI_Frame. |
|
what to do when dragged updates the coordinate system view area based on cursor position Reimplemented from CUI_Frame. |