]> git.saurik.com Git - wxWidgets.git/blob - include/wx/control.h
it didn't compile at all...
[wxWidgets.git] / include / wx / control.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/control.h
3 // Purpose: wxControl common interface
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 26.07.99
7 // RCS-ID: $Id$
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CONTROL_H_BASE_
13 #define _WX_CONTROL_H_BASE_
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #ifdef __GNUG__
20 #pragma interface "controlbase.h"
21 #endif
22
23 #include "wx/window.h" // base class
24
25 // ----------------------------------------------------------------------------
26 // wxControl is the base class for all controls
27 // ----------------------------------------------------------------------------
28
29 class WXDLLEXPORT wxControlBase : public wxWindow
30 {
31 public:
32 // simulates the event of given type (i.e. wxButton::Command() is just as
33 // if the button was clicked)
34 virtual void Command(wxCommandEvent &event);
35
36 protected:
37 // creates the control (calls wxWindowBase::CreateBase inside) and adds it
38 // to the list of parents children
39 bool CreateControl(wxWindowBase *parent,
40 wxWindowID id,
41 const wxPoint& pos,
42 const wxSize& size,
43 long style,
44 #if wxUSE_VALIDATORS
45 # if defined(__VISAGECPP__)
46 const wxValidator* validator,
47 # else
48 const wxValidator& validator,
49 # endif
50 #endif
51 const wxString& name);
52
53 // an overloaded version for the controls without validators
54 bool CreateControl(wxWindowBase *parent,
55 wxWindowID id,
56 const wxPoint& pos,
57 const wxSize& size,
58 long style,
59 const wxString& name)
60 {
61 return CreateControl(parent, id, pos, size, style,
62 wxDefaultValidator, name);
63 }
64
65 // inherit colour and font settings from the parent window
66 void InheritAttributes();
67 };
68
69 // ----------------------------------------------------------------------------
70 // include platform-dependent wxControl declarations
71 // ----------------------------------------------------------------------------
72
73 #if defined(__WXMSW__)
74 #include "wx/msw/control.h"
75 #elif defined(__WXMOTIF__)
76 #include "wx/motif/control.h"
77 #elif defined(__WXGTK__)
78 #include "wx/gtk/control.h"
79 #elif defined(__WXQT__)
80 #include "wx/qt/control.h"
81 #elif defined(__WXMAC__)
82 #include "wx/mac/control.h"
83 #elif defined(__WXPM__)
84 #include "wx/os2/control.h"
85 #elif defined(__WXSTUBS__)
86 #include "wx/stubs/control.h"
87 #endif
88
89 #endif
90 // _WX_CONTROL_H_BASE_