bmpbuttn.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/bmpbuttn.h
  3. // Purpose: wxBitmapButton class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_OSX_BMPBUTTN_H_
  11. #define _WX_OSX_BMPBUTTN_H_
  12. #include "wx/button.h"
  13. #define wxDEFAULT_BUTTON_MARGIN 4
  14. class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
  15. {
  16. public:
  17. wxBitmapButton()
  18. {
  19. SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN);
  20. }
  21. wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
  22. const wxPoint& pos = wxDefaultPosition,
  23. const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
  24. const wxValidator& validator = wxDefaultValidator,
  25. const wxString& name = wxButtonNameStr)
  26. {
  27. Create(parent, id, bitmap, pos, size, style, validator, name);
  28. }
  29. bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
  30. const wxPoint& pos = wxDefaultPosition,
  31. const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
  32. const wxValidator& validator = wxDefaultValidator,
  33. const wxString& name = wxButtonNameStr);
  34. protected:
  35. virtual wxSize DoGetBestSize() const;
  36. DECLARE_DYNAMIC_CLASS(wxBitmapButton)
  37. };
  38. #endif // _WX_OSX_BMPBUTTN_H_