]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/button.h
hack to allow icons in wxStaticBitmap as well as bitmaps
[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
bfc6fde4 25class WXDLLEXPORT wxButton : public wxControl
2bda0e17 26{
bfc6fde4
VZ
27DECLARE_DYNAMIC_CLASS(wxButton)
28
29public:
30 wxButton() { }
31 wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize, long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
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 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxButtonNameStr);
45
46 virtual void SetDefault();
47 virtual void SetLabel(const wxString& label);
48 virtual wxString GetLabel() const ;
49 virtual void Command(wxCommandEvent& event);
50 virtual bool MSWCommand(WXUINT param, WXWORD id);
51 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
52 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
53
54protected:
55 virtual void DoSetSize(int x, int y,
56 int width, int height,
57 int sizeFlags = wxSIZE_AUTO);
2bda0e17
KB
58};
59
60#endif
bbcdf8bc 61 // _WX_BUTTON_H_