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

CUI_ResizeButton Class Reference

A button that can be dragged to resize its parent frame. More...

#include <CUI_ResizeButton.h>

Inheritance diagram for CUI_ResizeButton:

CUI_Button CUI_Widget CUI_Frame List of all members.

Public Member Functions

 CUI_ResizeButton (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, char *text=NULL, IUI_Font *font=NULL, float textscale=0.8, IUI_Border *border=NULL, IUI_Shader *hover=NULL, IUI_Shader *disable=NULL, IUI_Shader *click=NULL, unsigned short xresize=UI_RESIZE_NONE, unsigned short yresize=UI_RESIZE_NONE, float minimumWidth=0.1, float minimumHeight=0.1)
 constructor

virtual ~CUI_ResizeButton ()
 destructor

virtual bool IsDraggable ()
 is draggable

virtual bool Drag (float x, float y, float dx, float dy, int &id, int &numparam, void **param)
 Update the cursor's position as this is being dragged (in global space).

virtual bool SetResizing (unsigned short x, unsigned short y)
 Set the resizing flags.

virtual bool SetMinimumSize (float width, float height)
 Set minimum width and height.


Protected Attributes

unsigned short m_xresize
 what to resize in the x-dimension

unsigned short m_yresize
 what to resize in the y-dimension

float m_minimumWidth
 the minimum width to allow

float m_minimumHeight
 the minimum height to allow


Detailed Description

A button that can be dragged to resize its parent frame.

Each dimension has a flag that can be set. Based on that. the drag function updates the parent's coordinates.

Generally used as a edge or corner resizer.

Can also be used for moving by setting MIN & MAX.

Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED

UI_DISABLED
UI_INACTIVE


Member Function Documentation

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

Update the cursor's position as this is being dragged (in global space).

dragging resizes the parent based on dx,dy and resize flags

Reimplemented from CUI_Frame.


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