]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/anybutton.h
Add more checks for Intel compiler.
[wxWidgets.git] / include / wx / osx / anybutton.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: anybutton.h
3 // Purpose: wxAnyButton class
4 // Author: Stefan Csomor
5 // Created: 1998-01-01 (extracted from button.h)
6 // Copyright: (c) Stefan Csomor
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_OSX_ANYBUTTON_H_
11 #define _WX_OSX_ANYBUTTON_H_
12
13 // Any button
14 class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
15 {
16 public:
17 wxAnyButton() {}
18
19 static wxSize GetDefaultSize();
20
21 virtual void SetLabel(const wxString& label);
22
23 protected:
24 virtual wxSize DoGetBestSize() const ;
25
26 void OnEnterWindow( wxMouseEvent& event);
27 void OnLeaveWindow( wxMouseEvent& event);
28
29 virtual wxBitmap DoGetBitmap(State which) const;
30 virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
31 virtual void DoSetBitmapPosition(wxDirection dir);
32
33 virtual void DoSetBitmapMargins(int x, int y)
34 {
35 m_marginX = x;
36 m_marginY = y;
37 InvalidateBestSize();
38 }
39
40 #if wxUSE_MARKUP && wxOSX_USE_COCOA
41 virtual bool DoSetLabelMarkup(const wxString& markup);
42 #endif // wxUSE_MARKUP && wxOSX_USE_COCOA
43
44
45 // the margins around the bitmap
46 int m_marginX;
47 int m_marginY;
48
49 // the bitmaps for the different state of the buttons, all of them may be
50 // invalid and the button only shows a bitmap at all if State_Normal bitmap
51 // is valid
52 wxBitmap m_bitmaps[State_Max];
53
54 wxDECLARE_NO_COPY_CLASS(wxAnyButton);
55 DECLARE_EVENT_TABLE()
56 };
57
58 #endif // _WX_OSX_ANYBUTTON_H_