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