]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/button.h
Set/GetTitle out of wxWindowBase, forked and put to gtk/window.h and mgl/window.h...
[wxWidgets.git] / include / wx / os2 / button.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: button.h
3// Purpose: wxButton class
d88de032 4// Author: David Webster
0e320a79 5// Modified by:
d88de032 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
d88de032
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BUTTON_H_
13#define _WX_BUTTON_H_
14
0e320a79 15#include "wx/control.h"
0e320a79
DW
16
17WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
18
19// Pushbutton
210a651b 20class WXDLLEXPORT wxButton: public wxButtonBase
0e320a79 21{
0e320a79
DW
22 public:
23 inline wxButton() {}
24 inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize, long style = 0,
57c4d796 27#if wxUSE_VALIDATORS
0e320a79 28 const wxValidator& validator = wxDefaultValidator,
57c4d796 29#endif
0e320a79
DW
30 const wxString& name = wxButtonNameStr)
31 {
32 Create(parent, id, label, pos, size, style, validator, name);
33 }
34
35 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize, long style = 0,
57c4d796 38#if wxUSE_VALIDATORS
0e320a79 39 const wxValidator& validator = wxDefaultValidator,
57c4d796 40#endif
0e320a79
DW
41 const wxString& name = wxButtonNameStr);
42
1408104d
DW
43 virtual ~wxButton();
44
0e320a79 45 virtual void SetDefault();
1408104d
DW
46
47 static wxSize GetDefaultSize();
48
0e320a79 49 virtual void Command(wxCommandEvent& event);
d88de032
DW
50 virtual bool OS2Command(WXUINT param, WXWORD id);
51 virtual WXHBRUSH OnCtlColor(WXHDC pDC,
52 WXHWND pWnd,
53 WXUINT nCtlColor,
54 WXUINT message,
55 WXWPARAM wParam,
56 WXLPARAM lParam);
57protected:
58 // send a notification event, return TRUE if processed
59 bool SendClickEvent();
60
e78c4d50 61 virtual wxSize DoGetBestSize() const;
210a651b
DW
62private:
63 DECLARE_DYNAMIC_CLASS(wxButton)
0e320a79
DW
64};
65
66#endif
67 // _WX_BUTTON_H_