]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/button.h
changed wxUSE_DRAGIMAG to wxUSE_DRAGIMAGE and use it everywhere now
[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
20class WXDLLEXPORT wxButton: public wxControl
21{
22 DECLARE_DYNAMIC_CLASS(wxButton)
23 public:
24 inline wxButton() {}
25 inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize, long style = 0,
57c4d796 28#if wxUSE_VALIDATORS
0e320a79 29 const wxValidator& validator = wxDefaultValidator,
57c4d796 30#endif
0e320a79
DW
31 const wxString& name = wxButtonNameStr)
32 {
33 Create(parent, id, label, pos, size, style, validator, name);
34 }
35
36 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize, long style = 0,
57c4d796 39#if wxUSE_VALIDATORS
0e320a79 40 const wxValidator& validator = wxDefaultValidator,
57c4d796 41#endif
0e320a79
DW
42 const wxString& name = wxButtonNameStr);
43
1408104d
DW
44 virtual ~wxButton();
45
0e320a79 46 virtual void SetDefault();
1408104d
DW
47
48 static wxSize GetDefaultSize();
49
0e320a79 50 virtual void Command(wxCommandEvent& event);
d88de032
DW
51 virtual bool OS2Command(WXUINT param, WXWORD id);
52 virtual WXHBRUSH OnCtlColor(WXHDC pDC,
53 WXHWND pWnd,
54 WXUINT nCtlColor,
55 WXUINT message,
56 WXWPARAM wParam,
57 WXLPARAM lParam);
58protected:
59 // send a notification event, return TRUE if processed
60 bool SendClickEvent();
61
e78c4d50 62 virtual wxSize DoGetBestSize() const;
0e320a79
DW
63};
64
65#endif
66 // _WX_BUTTON_H_