]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk1/bmpbuttn.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / gtk1 / bmpbuttn.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk1/bmpbutton.h
3// Purpose:
4// Author: Robert Roebling
5// Copyright: (c) 1998 Robert Roebling
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9
10#ifndef __BMPBUTTONH__
11#define __BMPBUTTONH__
12
13// ----------------------------------------------------------------------------
14// wxBitmapButton
15// ----------------------------------------------------------------------------
16
17class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
18{
19public:
20 wxBitmapButton() { Init(); }
21
22 wxBitmapButton(wxWindow *parent,
23 wxWindowID id,
24 const wxBitmap& bitmap,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 long style = wxBU_AUTODRAW,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxButtonNameStr)
30 {
31 Init();
32
33 Create(parent, id, bitmap, pos, size, style, validator, name);
34 }
35
36 bool Create(wxWindow *parent,
37 wxWindowID id,
38 const wxBitmap& bitmap,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxBU_AUTODRAW,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxButtonNameStr);
44
45 void SetLabel( const wxString &label );
46 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
47
48 virtual bool Enable(bool enable = TRUE);
49
50 // implementation
51 // --------------
52
53 void GTKSetHasFocus();
54 void GTKSetNotFocus();
55 void StartSelect();
56 void EndSelect();
57 void DoApplyWidgetStyle(GtkRcStyle *style);
58
59 bool m_hasFocus:1;
60 bool m_isSelected:1;
61
62protected:
63 virtual void OnSetBitmap();
64 virtual wxSize DoGetBestSize() const;
65
66 void Init();
67
68private:
69 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
70};
71
72#endif // __BMPBUTTONH__