]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: control.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling, Julian Smart | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef __GTKCONTROLH__ | |
11 | #define __GTKCONTROLH__ | |
12 | ||
13 | #ifdef __GNUG__ | |
14 | #pragma interface | |
15 | #endif | |
16 | ||
17 | #include "wx/defs.h" | |
18 | #include "wx/object.h" | |
19 | #include "wx/list.h" | |
20 | #include "wx/window.h" | |
21 | ||
22 | //----------------------------------------------------------------------------- | |
23 | // classes | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
26 | class wxControl; | |
27 | ||
28 | //----------------------------------------------------------------------------- | |
29 | // wxControl | |
30 | //----------------------------------------------------------------------------- | |
31 | ||
32 | extern const wxChar* wxControlNameStr; | |
33 | ||
34 | class wxControl : public wxControlBase | |
35 | { | |
36 | public: | |
37 | wxControl(); | |
38 | wxControl(wxWindow *parent, wxWindowID id, | |
39 | const wxPoint& pos = wxDefaultPosition, | |
40 | const wxSize& size = wxDefaultSize, long style = 0, | |
41 | const wxValidator& validator = wxDefaultValidator, | |
42 | const wxString& name = wxControlNameStr) | |
43 | { | |
44 | Create(parent, id, pos, size, style, validator, name); | |
45 | } | |
46 | ||
47 | bool Create(wxWindow *parent, wxWindowID id, | |
48 | const wxPoint& pos = wxDefaultPosition, | |
49 | const wxSize& size = wxDefaultSize, long style = 0, | |
50 | const wxValidator& validator = wxDefaultValidator, | |
51 | const wxString& name = wxControlNameStr); | |
52 | ||
53 | // this function will filter out '&' characters and will put the accelerator | |
54 | // char (the one immediately after '&') into m_chAccel (TODO not yet) | |
55 | virtual void SetLabel( const wxString &label ); | |
56 | virtual wxString GetLabel() const; | |
57 | ||
58 | protected: | |
59 | virtual wxSize DoGetBestSize() const; | |
60 | ||
61 | wxString m_label; | |
62 | char m_chAccel; // enabled to avoid breaking binary compatibility later on | |
63 | ||
64 | private: | |
65 | DECLARE_DYNAMIC_CLASS(wxControl) | |
66 | }; | |
67 | ||
68 | #endif // __GTKCONTROLH__ |