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

CUI_DraggableViewFrame Class Reference

A frame that has a draggable window space. More...

#include <CUI_DraggableViewFrame.h>

Inheritance diagram for CUI_DraggableViewFrame:

CUI_Frame List of all members.

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


Detailed Description

A frame that has a draggable window space.

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


Member Function Documentation

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

what to do when clicked

reset the last cursor position

Reimplemented from CUI_Frame.

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

Delete a parameter allocated by this frame.

Draggable frames return no param

Reimplemented from CUI_Frame.

bool CUI_DraggableViewFrame::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