]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/button.h
Made some treectrl sample icons transparent; added toolbar.h to wx.h
[wxWidgets.git] / include / wx / os2 / button.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: button.h
3// Purpose: wxButton class
4// Author: David Webster
5// Modified by:
6// Created: 10/13/99
7// RCS-ID: $Id$
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BUTTON_H_
13#define _WX_BUTTON_H_
14
15#include "wx/control.h"
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,
28#if wxUSE_VALIDATORS
29# if defined(__VISAGECPP__)
30 const wxValidator* validator = wxDefaultValidator,
31# else
32 const wxValidator& validator = wxDefaultValidator,
33# endif
34#endif
35 const wxString& name = wxButtonNameStr)
36 {
37 Create(parent, id, label, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize, long style = 0,
43#if wxUSE_VALIDATORS
44# if defined(__VISAGECPP__)
45 const wxValidator* validator = wxDefaultValidator,
46# else
47 const wxValidator& validator = wxDefaultValidator,
48# endif
49#endif
50 const wxString& name = wxButtonNameStr);
51
52 virtual ~wxButton();
53
54 virtual void SetDefault();
55
56 static wxSize GetDefaultSize();
57
58 virtual void Command(wxCommandEvent& event);
59 virtual bool OS2Command(WXUINT param, WXWORD id);
60 virtual WXHBRUSH OnCtlColor(WXHDC pDC,
61 WXHWND pWnd,
62 WXUINT nCtlColor,
63 WXUINT message,
64 WXWPARAM wParam,
65 WXLPARAM lParam);
66protected:
67 // send a notification event, return TRUE if processed
68 bool SendClickEvent();
69
70 virtual wxSize DoGetBestSize();
71};
72
73#endif
74 // _WX_BUTTON_H_