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

CUI_ResizeButton.h

Go to the documentation of this file.
00001 
00015 #ifndef CUI_ResizeButton_H
00016 #define CUI_ResizeButton_H
00017 
00018 #include "CUI_Button.h"
00019 
00020 #define UI_RESIZE_NONE  0
00021 #define UI_RESIZE_MIN   1
00022 #define UI_RESIZE_MAX   2
00023 
00025 
00039 class GLGUI_ENTRY CUI_ResizeButton : public CUI_Button
00040 {
00041 public: 
00043         CUI_ResizeButton( CUI_UI *ui = NULL, float x = 0, float y = 0, float x2 = 1, float y2 = 1,
00044                                 CUI_Frame *parent = NULL, IUI_Shader *shader = NULL,
00045                                 IUI_Shader *cursor = NULL, CUI_CoordSys *coordsys = NULL,
00046                                 // widget
00047                                 char *text = NULL, IUI_Font *font = NULL, float textscale = 0.8,
00048                                 IUI_Border *border = NULL,
00049                                 // button
00050                                 IUI_Shader *hover = NULL, IUI_Shader *disable = NULL,
00051                                 IUI_Shader *click = NULL,
00052                                 // resize button
00053                                 unsigned short xresize = UI_RESIZE_NONE,
00054                                 unsigned short yresize = UI_RESIZE_NONE,
00055                                 float minimumWidth = 0.1,
00056                                 float minimumHeight = 0.1
00057                                 );
00059         virtual ~CUI_ResizeButton();
00060 
00062         virtual bool IsDraggable( ) {return true; }
00063 
00065 
00066         virtual bool Drag( float x, float y, float dx, float dy, int &id, int &numparam, void **param );
00067 
00069         virtual bool SetResizing( unsigned short x, unsigned short y )
00070         { m_xresize = x; m_yresize = y; return false; }
00071 
00073         virtual bool SetMinimumSize( float width, float height )
00074         { m_minimumWidth = width; m_minimumHeight = height; return false; }
00075 
00076 protected:
00077 
00079         unsigned short m_xresize;
00080 
00082         unsigned short m_yresize;
00083 
00085         float m_minimumWidth;
00086 
00088         float m_minimumHeight;
00089 
00090 };
00091 
00092 #endif

Generated on Mon Sep 29 23:07:02 2003 for glGUI by doxygen 1.3.4