home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2233.zip / wxOS2-2_3_3.zip / wxWindows-2.3.3 / include / wx / os2 / button.h < prev    next >
C/C++ Source or Header  |  2002-08-31  |  3KB  |  102 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        button.h
  3. // Purpose:     wxButton class
  4. // Author:      David Webster
  5. // Modified by:
  6. // Created:     10/13/99
  7. // RCS-ID:      $Id: BUTTON.H,v 1.13 2002/08/30 21:20:42 DW Exp $
  8. // Copyright:   (c) David Webster
  9. // Licence:     wxWindows licence
  10. /////////////////////////////////////////////////////////////////////////////
  11.  
  12. #ifndef _WX_BUTTON_H_
  13. #define _WX_BUTTON_H_
  14.  
  15. #include "wx/control.h"
  16.  
  17. // Pushbutton
  18. class WXDLLEXPORT wxButton: public wxButtonBase
  19. {
  20.  public:
  21.     inline wxButton() {}
  22.     inline wxButton( wxWindow*          pParent
  23.                     ,wxWindowID         vId
  24.                     ,const wxString&    rsLabel
  25.                     ,const wxPoint&     rPos = wxDefaultPosition
  26.                     ,const wxSize&      rSize = wxDefaultSize
  27.                     ,long               lStyle = 0
  28. #if wxUSE_VALIDATORS
  29.                     ,const wxValidator& rValidator = wxDefaultValidator
  30. #endif
  31.                     ,const wxString&    rsName = wxButtonNameStr
  32.                    )
  33.     {
  34.         Create( pParent
  35.                ,vId
  36.                ,rsLabel
  37.                ,rPos
  38.                ,rSize
  39.                ,lStyle
  40. #if wxUSE_VALIDATORS
  41.                ,rValidator
  42. #endif
  43.                ,rsName
  44.               );
  45.     }
  46.  
  47.     bool Create( wxWindow*          pParent
  48.                 ,wxWindowID         vId
  49.                 ,const wxString&    rsLabel
  50.                 ,const wxPoint&     rPos = wxDefaultPosition
  51.                 ,const wxSize&      rSize = wxDefaultSize
  52.                 ,long               lStyle = 0
  53. #if wxUSE_VALIDATORS
  54.                 ,const wxValidator& rValidator = wxDefaultValidator
  55. #endif
  56.                 ,const wxString&    rsName = wxButtonNameStr
  57.                );
  58.  
  59.     virtual ~wxButton();
  60.  
  61.     virtual void     SetDefault(void);
  62.     static wxSize    GetDefaultSize(void);
  63.     virtual void     Command(wxCommandEvent& rEvent);
  64.     virtual bool     OS2Command( WXUINT uParam
  65.                                 ,WXWORD vId
  66.                                );
  67.     virtual WXHBRUSH OnCtlColor( WXHDC    hDC
  68.                                 ,WXHWND   hWnd
  69.                                 ,WXUINT   uCtlColor
  70.                                 ,WXUINT   uMessage
  71.                                 ,WXWPARAM wParam
  72.                                 ,WXLPARAM lParam
  73.                                );
  74.     void          MakeOwnerDrawn(void);
  75.  
  76.     virtual MRESULT WindowProc( WXUINT   uMsg
  77.                                ,WXWPARAM wParam
  78.                                ,WXLPARAM lParam
  79.                               );
  80.  
  81. protected:
  82.  
  83.     bool            SendClickEvent(void);
  84.     void            SetTmpDefault(void);
  85.     void            UnsetTmpDefault(void);
  86.  
  87.     static void     SetDefaultStyle( wxButton* pButton
  88.                                     ,bool      bOn
  89.                                    );
  90.  
  91.     virtual wxSize  DoGetBestSize(void) const;
  92.     virtual WXDWORD OS2GetStyle( long     style
  93.                                 ,WXDWORD* exstyle
  94.                                ) const;
  95. private:
  96.   DECLARE_DYNAMIC_CLASS(wxButton)
  97. }; // end of CLASS wxButton
  98.  
  99. #endif
  100.     // _WX_BUTTON_H_
  101.  
  102.