]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/button.h
fixed wxImage->wxBitmap conversion for images with alpha channel
[wxWidgets.git] / include / wx / motif / button.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: button.h
3// Purpose: wxButton class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BUTTON_H_
13#define _WX_BUTTON_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
83df96d6 16#pragma interface "button.h"
9b6dbb09
JS
17#endif
18
9b6dbb09 19// Pushbutton
a63b0098 20class WXDLLEXPORT wxButton: public wxButtonBase
9b6dbb09 21{
31528cd3 22 DECLARE_DYNAMIC_CLASS(wxButton)
83df96d6 23
31528cd3
VZ
24public:
25 wxButton() { }
26 wxButton(wxWindow *parent,
83df96d6
JS
27 wxWindowID id,
28 const wxString& label,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize, long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxButtonNameStr)
31528cd3
VZ
33 {
34 Create(parent, id, label, pos, size, style, validator, name);
35 }
83df96d6 36
401e3b6e
VS
37 wxButton(wxWindow *parent, wxWindowID id, wxStockItemID stock,
38 const wxString& descriptiveLabel = wxEmptyString,
39 const wxPoint& pos = wxDefaultPosition,
40 long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxButtonNameStr)
43 {
44 Create(parent, id, stock, descriptiveLabel, pos, style, validator, name);
45 }
46
31528cd3 47 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
83df96d6
JS
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize, long style = 0,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxButtonNameStr);
52
401e3b6e
VS
53 bool Create(wxWindow *parent, wxWindowID id, wxStockItemID stock,
54 const wxString& descriptiveLabel = wxEmptyString,
55 const wxPoint& pos = wxDefaultPosition,
56 long style = 0,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxButtonNameStr)
59 {
60 return CreateStock(parent, id, stock, descriptiveLabel,
61 pos, style, validator, name);
62 }
63
31528cd3
VZ
64 virtual void SetDefault();
65 virtual void Command(wxCommandEvent& event);
83df96d6 66
4d194d63
MB
67 static wxSize GetDefaultSize();
68
31528cd3 69 // Implementation
458ca8c1
MB
70private:
71 virtual wxSize DoGetBestSize() const;
e04b7e8e 72 wxSize OldGetBestSize() const;
458ca8c1 73 void SetDefaultShadowThicknessAndResize();
9b6dbb09
JS
74};
75
76#endif
83df96d6 77// _WX_BUTTON_H_