root / trunk / install / launcher / izpack-launcher-1.3_linux / src / wx / include / wx / msw / button.h @ 6834
History | View | Annotate | Download (2.49 KB)
1 |
/////////////////////////////////////////////////////////////////////////////
|
---|---|
2 |
// Name: wx/msw/button.h
|
3 |
// Purpose: wxButton class
|
4 |
// Author: Julian Smart
|
5 |
// Modified by:
|
6 |
// Created: 01/02/97
|
7 |
// RCS-ID: $Id: button.h 6834 2006-08-24 08:23:24Z jmvivo $
|
8 |
// Copyright: (c) Julian Smart
|
9 |
// Licence: wxWindows licence
|
10 |
/////////////////////////////////////////////////////////////////////////////
|
11 |
|
12 |
#ifndef _WX_BUTTON_H_
|
13 |
#define _WX_BUTTON_H_
|
14 |
|
15 |
// ----------------------------------------------------------------------------
|
16 |
// Pushbutton
|
17 |
// ----------------------------------------------------------------------------
|
18 |
|
19 |
class WXDLLEXPORT wxButton : public wxButtonBase |
20 |
{ |
21 |
public:
|
22 |
wxButton() { } |
23 |
wxButton(wxWindow *parent, |
24 |
wxWindowID id, |
25 |
const wxString& label,
|
26 |
const wxPoint& pos = wxDefaultPosition,
|
27 |
const wxSize& size = wxDefaultSize,
|
28 |
long style = 0, |
29 |
const wxValidator& validator = wxDefaultValidator,
|
30 |
const wxString& name = wxButtonNameStr)
|
31 |
{ |
32 |
Create(parent, id, label, pos, size, style, validator, name); |
33 |
} |
34 |
|
35 |
bool Create(wxWindow *parent,
|
36 |
wxWindowID id, |
37 |
const wxString& label,
|
38 |
const wxPoint& pos = wxDefaultPosition,
|
39 |
const wxSize& size = wxDefaultSize,
|
40 |
long style = 0, |
41 |
const wxValidator& validator = wxDefaultValidator,
|
42 |
const wxString& name = wxButtonNameStr);
|
43 |
|
44 |
virtual ~wxButton(); |
45 |
|
46 |
virtual void SetDefault();
|
47 |
|
48 |
// implementation from now on
|
49 |
virtual void Command(wxCommandEvent& event);
|
50 |
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
51 |
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
52 |
|
53 |
#ifdef __WIN32__
|
54 |
// coloured buttons support
|
55 |
virtual bool SetBackgroundColour(const wxColour &colour); |
56 |
virtual bool SetForegroundColour(const wxColour &colour); |
57 |
|
58 |
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
59 |
|
60 |
private:
|
61 |
void MakeOwnerDrawn();
|
62 |
#endif // __WIN32__ |
63 |
|
64 |
protected:
|
65 |
// send a notification event, return TRUE if processed
|
66 |
bool SendClickEvent();
|
67 |
|
68 |
// default button handling
|
69 |
void SetTmpDefault();
|
70 |
void UnsetTmpDefault();
|
71 |
|
72 |
// set or unset BS_DEFPUSHBUTTON style
|
73 |
static void SetDefaultStyle(wxButton *btn, bool on); |
74 |
|
75 |
// usually overridden base class virtuals
|
76 |
virtual wxSize DoGetBestSize() const;
|
77 |
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; |
78 |
|
79 |
private:
|
80 |
DECLARE_DYNAMIC_CLASS(wxButton) |
81 |
}; |
82 |
|
83 |
#endif
|
84 |
// _WX_BUTTON_H_
|