1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxControl common interface
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CONTROL_H_BASE_
13 #define _WX_CONTROL_H_BASE_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
20 #pragma interface "controlbase.h"
23 #include "wx/window.h" // base class
25 // ----------------------------------------------------------------------------
26 // wxControl is the base class for all controls
27 // ----------------------------------------------------------------------------
29 class WXDLLEXPORT wxControlBase
: public wxWindow
33 virtual ~wxControlBase() {} // Added min for Mac X
35 // simulates the event of given type (i.e. wxButton::Command() is just as
36 // if the button was clicked)
37 virtual void Command(wxCommandEvent
&event
);
40 // creates the control (calls wxWindowBase::CreateBase inside) and adds it
41 // to the list of parents children
42 bool CreateControl(wxWindowBase
*parent
,
47 const wxValidator
& validator
,
48 const wxString
& name
);
50 // inherit colour and font settings from the parent window
51 void InheritAttributes();
53 // initialize the common fields of wxCommandEvent
54 void InitCommandEvent(wxCommandEvent
& event
) const;
57 // ----------------------------------------------------------------------------
58 // include platform-dependent wxControl declarations
59 // ----------------------------------------------------------------------------
61 #if defined(__WXMSW__)
62 #include "wx/msw/control.h"
63 #elif defined(__WXMOTIF__)
64 #include "wx/motif/control.h"
65 #elif defined(__WXGTK__)
66 #include "wx/gtk/control.h"
67 #elif defined(__WXQT__)
68 #include "wx/qt/control.h"
69 #elif defined(__WXMAC__)
70 #include "wx/mac/control.h"
71 #elif defined(__WXPM__)
72 #include "wx/os2/control.h"
73 #elif defined(__WXSTUBS__)
74 #include "wx/stubs/control.h"
78 // _WX_CONTROL_H_BASE_