]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/cocoa/stattext.h | |
3 | // Purpose: wxStaticText class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/02/15 | |
7 | // Copyright: (c) 2003 David Elliott | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef __WX_COCOA_STATTEXT_H__ | |
12 | #define __WX_COCOA_STATTEXT_H__ | |
13 | ||
14 | #include "wx/cocoa/NSTextField.h" | |
15 | ||
16 | // ======================================================================== | |
17 | // wxStaticText | |
18 | // ======================================================================== | |
19 | class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase, protected wxCocoaNSTextField | |
20 | { | |
21 | DECLARE_DYNAMIC_CLASS(wxStaticText) | |
22 | DECLARE_EVENT_TABLE() | |
23 | WX_DECLARE_COCOA_OWNER(NSTextField,NSControl,NSView) | |
24 | // ------------------------------------------------------------------------ | |
25 | // initialization | |
26 | // ------------------------------------------------------------------------ | |
27 | public: | |
28 | wxStaticText() {} | |
29 | wxStaticText(wxWindow *parent, wxWindowID winid, | |
30 | const wxString& label, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, long style = 0, | |
33 | const wxString& name = wxStaticTextNameStr) | |
34 | { | |
35 | Create(parent, winid, label, pos, size, style, name); | |
36 | } | |
37 | ||
38 | bool Create(wxWindow *parent, wxWindowID winid, | |
39 | const wxString& label, | |
40 | const wxPoint& pos = wxDefaultPosition, | |
41 | const wxSize& size = wxDefaultSize, long style = 0, | |
42 | const wxString& name = wxStaticTextNameStr); | |
43 | virtual ~wxStaticText(); | |
44 | ||
45 | // ------------------------------------------------------------------------ | |
46 | // Cocoa specifics | |
47 | // ------------------------------------------------------------------------ | |
48 | protected: | |
49 | virtual void Cocoa_didChangeText(void); | |
50 | // ------------------------------------------------------------------------ | |
51 | // Implementation | |
52 | // ------------------------------------------------------------------------ | |
53 | public: | |
54 | virtual void SetLabel(const wxString& label); | |
55 | virtual wxString GetLabel() const; | |
56 | }; | |
57 | ||
58 | #endif // __WX_COCOA_STATTEXT_H__ |