]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/button.h
use a virtual function instead of wxDynamicCast(wxMDIParentFrame) in wxFrame code...
[wxWidgets.git] / include / wx / gtk / button.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/button.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_GTK_BUTTON_H_
11#define _WX_GTK_BUTTON_H_
12
13//-----------------------------------------------------------------------------
14// wxButton
15//-----------------------------------------------------------------------------
16
17class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
18{
19public:
20 wxButton();
21 wxButton(wxWindow *parent, wxWindowID id,
22 const wxString& label = wxEmptyString,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize, long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxButtonNameStr)
27 {
28 Create(parent, id, label, pos, size, style, validator, name);
29 }
30
31 virtual ~wxButton();
32
33 bool Create(wxWindow *parent, wxWindowID id,
34 const wxString& label = wxEmptyString,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxButtonNameStr);
39
40 virtual wxWindow *SetDefault();
41 virtual void SetLabel( const wxString &label );
42 virtual bool Enable( bool enable = TRUE );
43
44 // implementation
45 // --------------
46
47 static wxVisualAttributes
48 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
49
50 // helper to allow access to protected member from GTK callback
51 void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); }
52
53protected:
54 virtual wxSize DoGetBestSize() const;
55 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
56
57 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
58
59private:
60 DECLARE_DYNAMIC_CLASS(wxButton)
61};
62
63#endif // _WX_GTK_BUTTON_H_