]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/button.h
The Image sample now does anti-aliasing, oh well.
[wxWidgets.git] / include / wx / msw / button.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: button.h
3// Purpose: wxButton class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc
JS
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_BUTTON_H_
13#define _WX_BUTTON_H_
2bda0e17
KB
14
15#ifdef __GNUG__
16#pragma interface "button.h"
17#endif
18
19#include "wx/control.h"
20#include "wx/gdicmn.h"
21
22WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
23
24// Pushbutton
25class WXDLLEXPORT wxButton: public wxControl
26{
27 DECLARE_DYNAMIC_CLASS(wxButton)
28 public:
29 inline wxButton(void) {}
debe6624 30 inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
2bda0e17 31 const wxPoint& pos = wxDefaultPosition,
debe6624 32 const wxSize& size = wxDefaultSize, long style = 0,
2bda0e17
KB
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxButtonNameStr)
35 {
36 Create(parent, id, label, pos, size, style, validator, name);
37 }
38
debe6624 39 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
2bda0e17 40 const wxPoint& pos = wxDefaultPosition,
debe6624 41 const wxSize& size = wxDefaultSize, long style = 0,
2bda0e17
KB
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxButtonNameStr);
44
debe6624 45 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
4fabb575
JS
46 void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
47 { wxWindow::SetSize(rect, sizeFlags); }
48 void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
49
2bda0e17
KB
50 virtual void SetDefault(void);
51 virtual void SetLabel(const wxString& label);
52 virtual wxString GetLabel(void) const ;
53 virtual void Command(wxCommandEvent& event);
debe6624
JS
54 virtual bool MSWCommand(WXUINT param, WXWORD id);
55 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
2bda0e17
KB
56 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
57};
58
59#endif
bbcdf8bc 60 // _WX_BUTTON_H_