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