1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxStaticBox, wxStaticLine,
4 // wxStaticText, wxStaticBitmap
8 // Created: 10-June-1998
10 // Copyright: (c) 2003 by Total Control Software
11 // Licence: wxWindows license
12 /////////////////////////////////////////////////////////////////////////////
17 //---------------------------------------------------------------------------
19 MAKE_CONST_WXSTRING(StaticBitmapNameStr);
20 MAKE_CONST_WXSTRING(StaticBoxNameStr);
21 MAKE_CONST_WXSTRING(StaticTextNameStr);
22 MAKE_CONST_WXSTRING(StaticLineNameStr);
24 //---------------------------------------------------------------------------
27 MustHaveApp(wxStaticBox);
29 class wxStaticBox : public wxControl {
31 %pythonAppend wxStaticBox "self._setOORInfo(self)"
32 %pythonAppend wxStaticBox() ""
33 %typemap(out) wxStaticBox*; // turn off this typemap
35 wxStaticBox(wxWindow* parent, wxWindowID id=-1,
36 const wxString& label = wxPyEmptyString,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
40 const wxString& name = wxPyStaticBoxNameStr);
41 %RenameCtor(PreStaticBox, wxStaticBox());
43 // Turn it back on again
44 %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
46 bool Create(wxWindow* parent, wxWindowID id=-1,
47 const wxString& label = wxPyEmptyString,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
51 const wxString& name = wxPyStaticBoxNameStr);
53 static wxVisualAttributes
54 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
58 //---------------------------------------------------------------------------
62 MustHaveApp(wxStaticLine);
64 class wxStaticLine : public wxControl {
66 %pythonAppend wxStaticLine "self._setOORInfo(self)"
67 %pythonAppend wxStaticLine() ""
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());
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);
82 // is the line vertical?
83 bool IsVertical() const;
85 // get the default size for the "lesser" dimension of the static line
86 static int GetDefaultSize();
88 static wxVisualAttributes
89 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
93 //---------------------------------------------------------------------------
96 MustHaveApp(wxStaticText);
102 wxST_ELLIPSIZE_START,
103 wxST_ELLIPSIZE_MIDDLE,
108 class wxStaticText : public wxControl {
110 %pythonAppend wxStaticText "self._setOORInfo(self)"
111 %pythonAppend wxStaticText() ""
113 wxStaticText(wxWindow* parent, wxWindowID id=-1,
114 const wxString& label = wxPyEmptyString,
115 const wxPoint& pos = wxDefaultPosition,
116 const wxSize& size = wxDefaultSize,
118 const wxString& name = wxPyStaticTextNameStr);
119 %RenameCtor(PreStaticText, wxStaticText());
121 bool Create(wxWindow* parent, wxWindowID id=-1,
122 const wxString& label = wxPyEmptyString,
123 const wxPoint& pos = wxDefaultPosition,
124 const wxSize& size = wxDefaultSize,
126 const wxString& name = wxPyStaticTextNameStr);
129 void , Wrap(int width),
130 "This functions wraps the control's label so that each of its lines
131 becomes at most ``width`` pixels wide if possible (the lines are
132 broken at words boundaries so it might not be the case if words are
133 too long). If ``width`` is negative, no wrapping is done.", "");
135 bool IsEllipsized() const;
138 static wxString , RemoveMarkup(const wxString& str),
139 "Removes the markup accepted by wx.StaticText when wx.ST_MARKUP is
140 used, and then returns the cleaned string.
145 static wxString , EscapeMarkup(const wxString& str),
146 "Escapes the alls special symbols (<>\"\'&) present inside the given
147 string using the corresponding entities (< > " '
151 static wxVisualAttributes
152 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
155 //---------------------------------------------------------------------------
158 MustHaveApp(wxStaticBitmap);
160 class wxStaticBitmap : public wxControl {
162 %pythonAppend wxStaticBitmap "self._setOORInfo(self)"
163 %pythonAppend wxStaticBitmap() ""
165 wxStaticBitmap(wxWindow* parent, wxWindowID id=-1,
166 const wxBitmap& bitmap = wxNullBitmap,
167 const wxPoint& pos = wxDefaultPosition,
168 const wxSize& size = wxDefaultSize,
170 const wxString& name = wxPyStaticBitmapNameStr);
171 %RenameCtor(PreStaticBitmap, wxStaticBitmap());
173 bool Create(wxWindow* parent, wxWindowID id=-1,
174 const wxBitmap& bitmap = wxNullBitmap,
175 const wxPoint& pos = wxDefaultPosition,
176 const wxSize& size = wxDefaultSize,
178 const wxString& name = wxPyStaticBitmapNameStr);
180 wxBitmap GetBitmap();
181 void SetBitmap(const wxBitmap& bitmap);
182 void SetIcon(const wxIcon& icon);
184 static wxVisualAttributes
185 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
188 //---------------------------------------------------------------------------
189 //---------------------------------------------------------------------------