Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Control.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 #ifndef CONTROL_H
00005 #define CONTROL_H
00006 
00007 #include "Component.h"
00008 #include "Cursor.h"
00009 
00010 namespace wkgl {
00011 
00012 class Control : public Component
00013 {
00014   protected:
00015     Control* parent;
00016     int     showstate;        
00017     int     width;            
00018     int     height;           
00019     int     x;                
00020     int     y;                
00021     BOOL    ax;               
00022     BOOL    ay;               
00023     Cursor  *cursor;          
00024     String className;         
00025     String *label;            
00026     WNDCLASSEX wndclass;      
00027     DWORD   style;            
00028     DWORD   exstyle;          
00029     static  TEXTMETRIC  finfo;
00030 
00031   public:
00035     Control();
00036 
00040     ~Control();
00041 
00045     virtual void setStyle( LFLAG style, bool extended = false );
00046 
00050     virtual LFLAG getStyle( bool extended = false );
00051 
00055     virtual LRESULT sendEventToParent( UINT message, WPARAM wParam, 
00056                                        LPARAM lParam );
00057 
00061     virtual LRESULT sendEventToChild( HWND child, UINT message, 
00062                                       WPARAM wParam, LPARAM lParam );
00063 
00067     virtual LRESULT sendEventToChild( Component* child, UINT message, 
00068                                       WPARAM wParam, LPARAM lParam );
00069 
00073     LRESULT sendMessage( UINT msg, WPARAM wParam, LPARAM lParam );
00074 
00078     virtual BOOL show();
00079 
00083     virtual BOOL hide();
00084 
00088     virtual void setSize( int width, int height );
00089 
00093     virtual void setWidth( int width );
00094 
00098     virtual void setHeight( int height );
00099 
00103     virtual int getWidth();
00104 
00108     virtual int getHeight();
00109 
00113     virtual void setText( const char* label );
00114 
00118     virtual void setText( String label );
00119 
00123     virtual void getText(char* buf, int buf_len = 30 );
00124 
00128     virtual void getText(String& buf, int buf_len = 30 );
00129 
00133     virtual int getX();
00134 
00138     virtual int getY();
00139 
00143     virtual void setX( int x );
00144 
00148     virtual void setY( int y );
00149 
00153     virtual BOOL autoPositionX();
00154 
00158     virtual BOOL autoPositionY();
00159 
00163     virtual void setautoPositionX( BOOL a );
00164 
00168     virtual void setautoPositionY( BOOL a );
00169 
00173     virtual void setPosition( int x, int y );
00174 
00178     virtual void setCursor( Cursor* cur );
00179 
00183     virtual Cursor* getCursor();
00184 
00188     virtual WNDCLASSEX getWndClass();
00189 
00193     virtual String* getClassName();
00194 
00200     virtual BOOL create( Control* parent ) = 0;
00201 
00205     virtual void paint();
00206 
00207   protected:
00211     void createControl( Component *parent, String *classname, 
00212                         String *label, int width, int height, int x, int y, 
00213                         int style, int exstyle );
00214 
00218     void getCharSize();
00219 };
00220 }
00221 #endif

Generated on Tue Apr 29 03:18:49 2003 for GuiLib by doxygen1.2.18