Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_DraggableFrame Class Reference

A frame that can be dragged around inside its parent's area. More...

#include <CUI_DraggableFrame.h>

Inheritance diagram for CUI_DraggableFrame:

CUI_Frame List of all members.

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


Detailed Description

A frame that can be dragged around inside its parent's area.

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


Member Function Documentation

bool CUI_DraggableFrame::Click int &  id,
int &  numparam,
void **  param
[virtual]
 

what to do when clicked

Parameter list (new position):
float x float y

Reimplemented from CUI_Frame.

virtual void CUI_DraggableFrame::DeleteParam void *  param  )  [inline, virtual]
 

Delete a parameter allocated by this frame.

Draggable frames return 2 floats

Reimplemented from CUI_Frame.

bool CUI_DraggableFrame::Drag float  x,
float  y,
float  dx,
float  dy,
int &  id,
int &  numparam,
void **  param
[virtual]
 

what to do when dragged

updates the coordinate system view area based on cursor position

Reimplemented from CUI_Frame.


The documentation for this class was generated from the following files:
Generated on Mon Sep 29 23:07:03 2003 for glGUI by doxygen 1.3.4