]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/button.h
Correct compilation conditions for wxURL::SetProxy.
[wxWidgets.git] / include / wx / palmos / button.h
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/button.h
3// Purpose: wxButton class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
db101bd3 5// Modified by: Wlodzimierz ABX Skiba - native wxButton implementation
ffecfa5a 6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
db101bd3 8// Copyright: (c) William Osborne, Wlodzimierz Skiba
ffecfa5a
JS
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BUTTON_H_
13#define _WX_BUTTON_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "button.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// Pushbutton
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxButton : public wxButtonBase
24{
25public:
26 wxButton() { }
27 wxButton(wxWindow *parent,
28 wxWindowID id,
db101bd3 29 const wxString& label = wxEmptyString,
ffecfa5a
JS
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = 0,
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxButtonNameStr)
35 {
36 Create(parent, id, label, pos, size, style, validator, name);
37 }
38
39 bool Create(wxWindow *parent,
40 wxWindowID id,
41 const wxString& label,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxButtonNameStr);
47
48 virtual ~wxButton();
49
50 virtual void SetDefault();
51
52 // implementation from now on
53 virtual void Command(wxCommandEvent& event);
ffecfa5a 54
a152561c
WS
55 // send a notification event, return true if processed
56 bool SendClickEvent();
57
ffecfa5a
JS
58 virtual void ApplyParentThemeBackground(const wxColour& bg)
59 {
60 // avoide switching into owner-drawn mode
61 wxControl::SetBackgroundColour(bg);
62 }
ffecfa5a
JS
63
64protected:
ffecfa5a
JS
65
66 // default button handling
67 void SetTmpDefault();
68 void UnsetTmpDefault();
69
70 // set or unset BS_DEFPUSHBUTTON style
71 static void SetDefaultStyle(wxButton *btn, bool on);
72
73 // usually overridden base class virtuals
74 virtual wxSize DoGetBestSize() const;
ffecfa5a
JS
75
76private:
77 DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
78};
79
80#endif
81 // _WX_BUTTON_H_