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