]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_statctrls.i
No animate contrib anymore
[wxWidgets.git] / wxPython / src / _statctrls.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _statctrls.i
3 // Purpose: SWIG interface defs for wxStaticBox, wxStaticLine,
4 // wxStaticText, wxStaticBitmap
5 //
6 // Author: Robin Dunn
7 //
8 // Created: 10-June-1998
9 // RCS-ID: $Id$
10 // Copyright: (c) 2003 by Total Control Software
11 // Licence: wxWindows license
12 /////////////////////////////////////////////////////////////////////////////
13
14 // Not a %module
15
16
17 //---------------------------------------------------------------------------
18
19 MAKE_CONST_WXSTRING(StaticBitmapNameStr);
20 MAKE_CONST_WXSTRING(StaticBoxNameStr);
21 MAKE_CONST_WXSTRING(StaticTextNameStr);
22 MAKE_CONST_WXSTRING(StaticLineNameStr);
23
24 //---------------------------------------------------------------------------
25 %newgroup
26
27 MustHaveApp(wxStaticBox);
28
29 class wxStaticBox : public wxControl {
30 public:
31 %pythonAppend wxStaticBox "self._setOORInfo(self)"
32 %pythonAppend wxStaticBox() ""
33 %typemap(out) wxStaticBox*; // turn off this typemap
34
35 wxStaticBox(wxWindow* parent, wxWindowID id=-1,
36 const wxString& label = wxPyEmptyString,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = 0,
40 const wxString& name = wxPyStaticBoxNameStr);
41 %RenameCtor(PreStaticBox, wxStaticBox());
42
43 // Turn it back on again
44 %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
45
46 bool Create(wxWindow* parent, wxWindowID id=-1,
47 const wxString& label = wxPyEmptyString,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = 0,
51 const wxString& name = wxPyStaticBoxNameStr);
52
53 static wxVisualAttributes
54 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
55 };
56
57
58 //---------------------------------------------------------------------------
59 %newgroup
60
61
62 MustHaveApp(wxStaticLine);
63
64 class wxStaticLine : public wxControl {
65 public:
66 %pythonAppend wxStaticLine "self._setOORInfo(self)"
67 %pythonAppend wxStaticLine() ""
68
69 wxStaticLine( wxWindow *parent, wxWindowID id=-1,
70 const wxPoint &pos = wxDefaultPosition,
71 const wxSize &size = wxDefaultSize,
72 long style = wxLI_HORIZONTAL,
73 const wxString& name = wxPyStaticLineNameStr);
74 %RenameCtor(PreStaticLine, wxStaticLine());
75
76 bool Create( wxWindow *parent, wxWindowID id=-1,
77 const wxPoint &pos = wxDefaultPosition,
78 const wxSize &size = wxDefaultSize,
79 long style = wxLI_HORIZONTAL,
80 const wxString& name = wxPyStaticLineNameStr);
81
82 // is the line vertical?
83 bool IsVertical() const;
84
85 // get the default size for the "lesser" dimension of the static line
86 static int GetDefaultSize();
87
88 static wxVisualAttributes
89 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
90 };
91
92
93 //---------------------------------------------------------------------------
94 %newgroup
95
96 MustHaveApp(wxStaticText);
97
98 class wxStaticText : public wxControl {
99 public:
100 %pythonAppend wxStaticText "self._setOORInfo(self)"
101 %pythonAppend wxStaticText() ""
102
103 wxStaticText(wxWindow* parent, wxWindowID id=-1,
104 const wxString& label = wxPyEmptyString,
105 const wxPoint& pos = wxDefaultPosition,
106 const wxSize& size = wxDefaultSize,
107 long style = 0,
108 const wxString& name = wxPyStaticTextNameStr);
109 %RenameCtor(PreStaticText, wxStaticText());
110
111 bool Create(wxWindow* parent, wxWindowID id=-1,
112 const wxString& label = wxPyEmptyString,
113 const wxPoint& pos = wxDefaultPosition,
114 const wxSize& size = wxDefaultSize,
115 long style = 0,
116 const wxString& name = wxPyStaticTextNameStr);
117
118 DocDeclStr(
119 void , Wrap(int width),
120 "This functions wraps the control's label so that each of its lines
121 becomes at most ``width`` pixels wide if possible (the lines are
122 broken at words boundaries so it might not be the case if words are
123 too long). If ``width`` is negative, no wrapping is done.", "");
124
125
126 static wxVisualAttributes
127 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
128 };
129
130 //---------------------------------------------------------------------------
131 %newgroup
132
133 MustHaveApp(wxStaticBitmap);
134
135 class wxStaticBitmap : public wxControl {
136 public:
137 %pythonAppend wxStaticBitmap "self._setOORInfo(self)"
138 %pythonAppend wxStaticBitmap() ""
139
140 wxStaticBitmap(wxWindow* parent, wxWindowID id=-1,
141 const wxBitmap& bitmap = wxNullBitmap,
142 const wxPoint& pos = wxDefaultPosition,
143 const wxSize& size = wxDefaultSize,
144 long style = 0,
145 const wxString& name = wxPyStaticBitmapNameStr);
146 %RenameCtor(PreStaticBitmap, wxStaticBitmap());
147
148 bool Create(wxWindow* parent, wxWindowID id=-1,
149 const wxBitmap& bitmap = wxNullBitmap,
150 const wxPoint& pos = wxDefaultPosition,
151 const wxSize& size = wxDefaultSize,
152 long style = 0,
153 const wxString& name = wxPyStaticBitmapNameStr);
154
155 wxBitmap GetBitmap();
156 void SetBitmap(const wxBitmap& bitmap);
157 void SetIcon(const wxIcon& icon);
158
159 static wxVisualAttributes
160 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
161 };
162
163 //---------------------------------------------------------------------------
164 //---------------------------------------------------------------------------