button.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/motif/button.h
  3. // Purpose: wxButton class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 17/09/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_BUTTON_H_
  11. #define _WX_BUTTON_H_
  12. // Pushbutton
  13. class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
  14. {
  15. public:
  16. wxButton() { }
  17. wxButton(wxWindow *parent,
  18. wxWindowID id,
  19. const wxString& label = wxEmptyString,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize, long style = 0,
  22. const wxValidator& validator = wxDefaultValidator,
  23. const wxString& name = wxButtonNameStr)
  24. {
  25. Create(parent, id, label, pos, size, style, validator, name);
  26. }
  27. bool Create(wxWindow *parent, wxWindowID id,
  28. const wxString& label = wxEmptyString,
  29. const wxPoint& pos = wxDefaultPosition,
  30. const wxSize& size = wxDefaultSize, long style = 0,
  31. const wxValidator& validator = wxDefaultValidator,
  32. const wxString& name = wxButtonNameStr);
  33. virtual wxWindow *SetDefault();
  34. virtual void Command(wxCommandEvent& event);
  35. static wxSize GetDefaultSize();
  36. // Implementation
  37. virtual wxSize GetMinSize() const;
  38. protected:
  39. virtual wxSize DoGetBestSize() const;
  40. private:
  41. wxSize OldGetBestSize() const;
  42. wxSize OldGetMinSize() const;
  43. void SetDefaultShadowThicknessAndResize();
  44. DECLARE_DYNAMIC_CLASS(wxButton)
  45. };
  46. #endif // _WX_BUTTON_H_