]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/button.h
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / include / wx / gtk / button.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
6b0d8a01 2// Name: wx/gtk/button.h
7be740a3 3// Purpose: wxGTK wxButton class declaration
c801d85f 4// Author: Robert Roebling
01111366 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
0416c418
PC
9#ifndef _WX_GTK_BUTTON_H_
10#define _WX_GTK_BUTTON_H_
c801d85f
KB
11
12//-----------------------------------------------------------------------------
13// wxButton
14//-----------------------------------------------------------------------------
15
7be740a3 16class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
c801d85f 17{
738f9e5a 18public:
b4354db1 19 wxButton() {}
5f7bcb48
VS
20 wxButton(wxWindow *parent, wxWindowID id,
21 const wxString& label = wxEmptyString,
6de97a3b
RR
22 const wxPoint& pos = wxDefaultPosition,
23 const wxSize& size = wxDefaultSize, long style = 0,
24 const wxValidator& validator = wxDefaultValidator,
25 const wxString& name = wxButtonNameStr)
26 {
401e3b6e 27 Create(parent, id, label, pos, size, style, validator, name);
6de97a3b 28 }
401e3b6e 29
5f7bcb48
VS
30 bool Create(wxWindow *parent, wxWindowID id,
31 const wxString& label = wxEmptyString,
6de97a3b
RR
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize, long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxButtonNameStr);
6b0d8a01 36
94aff5ff 37 virtual wxWindow *SetDefault();
6b0d8a01 38 virtual void SetLabel( const wxString &label );
8dbf4589 39
20e05ffb
RR
40 // implementation
41 // --------------
6b0d8a01 42
9d522606
RD
43 static wxVisualAttributes
44 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
45
6f02a879
VZ
46 // helper to allow access to protected member from GTK callback
47 void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); }
48
b4a4eafb
VZ
49 // called from GTK callbacks: they update the button state and call
50 // GTKUpdateBitmap()
51 void GTKMouseEnters();
52 void GTKMouseLeaves();
53 void GTKPressed();
54 void GTKReleased();
55
db434467
RR
56protected:
57 virtual wxSize DoGetBestSize() const;
ef5c70f9
VZ
58 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
59
de1cc378
VZ
60#if wxUSE_MARKUP
61 virtual bool DoSetLabelMarkup(const wxString& markup);
62#endif // wxUSE_MARKUP
63
738f9e5a 64private:
b545684e
PC
65 typedef wxButtonBase base_type;
66
de1cc378
VZ
67 // Return the GtkLabel used by this button.
68 GtkLabel *GTKGetLabel() const;
69
738f9e5a 70 DECLARE_DYNAMIC_CLASS(wxButton)
c801d85f
KB
71};
72
0416c418 73#endif // _WX_GTK_BUTTON_H_