]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_statctrls.i
Forgot this part of the event change patch from 2_8
[wxWidgets.git] / wxPython / src / _statctrls.i
CommitLineData
d14a1e28
RD
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
b2dc1044
RD
19MAKE_CONST_WXSTRING(StaticBitmapNameStr);
20MAKE_CONST_WXSTRING(StaticBoxNameStr);
21MAKE_CONST_WXSTRING(StaticTextNameStr);
83dea146 22MAKE_CONST_WXSTRING(StaticLineNameStr);
d14a1e28
RD
23
24//---------------------------------------------------------------------------
25%newgroup
26
ab1f7d2a
RD
27MustHaveApp(wxStaticBox);
28
d14a1e28
RD
29class wxStaticBox : public wxControl {
30public:
2b9048c5
RD
31 %pythonAppend wxStaticBox "self._setOORInfo(self)"
32 %pythonAppend wxStaticBox() ""
b39c3fa0 33 %typemap(out) wxStaticBox*; // turn off this typemap
d14a1e28 34
d5573410
RD
35 wxStaticBox(wxWindow* parent, wxWindowID id=-1,
36 const wxString& label = wxPyEmptyString,
d14a1e28
RD
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = 0,
40 const wxString& name = wxPyStaticBoxNameStr);
1b8c7ba6 41 %RenameCtor(PreStaticBox, wxStaticBox());
d14a1e28 42
b39c3fa0
RD
43 // Turn it back on again
44 %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
45
d5573410
RD
46 bool Create(wxWindow* parent, wxWindowID id=-1,
47 const wxString& label = wxPyEmptyString,
d14a1e28
RD
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = 0,
51 const wxString& name = wxPyStaticBoxNameStr);
880715c9
RD
52
53 static wxVisualAttributes
54 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
55};
56
57
58//---------------------------------------------------------------------------
59%newgroup
60
61
ab1f7d2a
RD
62MustHaveApp(wxStaticLine);
63
d14a1e28
RD
64class wxStaticLine : public wxControl {
65public:
2b9048c5
RD
66 %pythonAppend wxStaticLine "self._setOORInfo(self)"
67 %pythonAppend wxStaticLine() ""
d14a1e28 68
d5573410 69 wxStaticLine( wxWindow *parent, wxWindowID id=-1,
d14a1e28
RD
70 const wxPoint &pos = wxDefaultPosition,
71 const wxSize &size = wxDefaultSize,
72 long style = wxLI_HORIZONTAL,
83dea146 73 const wxString& name = wxPyStaticLineNameStr);
1b8c7ba6 74 %RenameCtor(PreStaticLine, wxStaticLine());
d14a1e28 75
d5573410 76 bool Create( wxWindow *parent, wxWindowID id=-1,
d14a1e28
RD
77 const wxPoint &pos = wxDefaultPosition,
78 const wxSize &size = wxDefaultSize,
79 long style = wxLI_HORIZONTAL,
83dea146 80 const wxString& name = wxPyStaticLineNameStr);
d14a1e28
RD
81
82 // is the line vertical?
83 bool IsVertical() const;
84
85 // get the default size for the "lesser" dimension of the static line
fa42d122 86 static int GetDefaultSize();
d14a1e28 87
880715c9
RD
88 static wxVisualAttributes
89 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
90};
91
92
93//---------------------------------------------------------------------------
94%newgroup
95
ab1f7d2a
RD
96MustHaveApp(wxStaticText);
97
70ee3690
RD
98enum {
99 wxST_NO_AUTORESIZE,
100 wxST_MARKUP,
101
102 wxST_ELLIPSIZE_START,
103 wxST_ELLIPSIZE_MIDDLE,
104 wxST_ELLIPSIZE_END
105};
106
107
d14a1e28
RD
108class wxStaticText : public wxControl {
109public:
2b9048c5
RD
110 %pythonAppend wxStaticText "self._setOORInfo(self)"
111 %pythonAppend wxStaticText() ""
d14a1e28 112
d5573410
RD
113 wxStaticText(wxWindow* parent, wxWindowID id=-1,
114 const wxString& label = wxPyEmptyString,
d14a1e28
RD
115 const wxPoint& pos = wxDefaultPosition,
116 const wxSize& size = wxDefaultSize,
117 long style = 0,
118 const wxString& name = wxPyStaticTextNameStr);
1b8c7ba6 119 %RenameCtor(PreStaticText, wxStaticText());
d14a1e28 120
d5573410
RD
121 bool Create(wxWindow* parent, wxWindowID id=-1,
122 const wxString& label = wxPyEmptyString,
d14a1e28
RD
123 const wxPoint& pos = wxDefaultPosition,
124 const wxSize& size = wxDefaultSize,
125 long style = 0,
126 const wxString& name = wxPyStaticTextNameStr);
880715c9 127
02b800ce
RD
128 DocDeclStr(
129 void , Wrap(int width),
130 "This functions wraps the control's label so that each of its lines
131becomes at most ``width`` pixels wide if possible (the lines are
132broken at words boundaries so it might not be the case if words are
133too long). If ``width`` is negative, no wrapping is done.", "");
70ee3690
RD
134
135 bool IsEllipsized() const;
02b800ce 136
70ee3690
RD
137 DocDeclStr(
138 static wxString , RemoveMarkup(const wxString& str),
139 "Removes the markup accepted by wx.StaticText when wx.ST_MARKUP is
140used, and then returns the cleaned string.
141 ", "");
02b800ce 142
70ee3690
RD
143
144 DocDeclStr(
145 static wxString , EscapeMarkup(const wxString& str),
146 "Escapes the alls special symbols (<>\"\'&) present inside the given
147string using the corresponding entities (&lt; &gt; &quot; &apos;
148&amp;)", "");
149
150
880715c9
RD
151 static wxVisualAttributes
152 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
153};
154
155//---------------------------------------------------------------------------
156%newgroup
157
ab1f7d2a
RD
158MustHaveApp(wxStaticBitmap);
159
d14a1e28
RD
160class wxStaticBitmap : public wxControl {
161public:
8179a168
RD
162 %pythonAppend wxStaticBitmap "self._setOORInfo(self)"
163 %pythonAppend wxStaticBitmap() ""
d14a1e28 164
d5573410
RD
165 wxStaticBitmap(wxWindow* parent, wxWindowID id=-1,
166 const wxBitmap& bitmap = wxNullBitmap,
d14a1e28
RD
167 const wxPoint& pos = wxDefaultPosition,
168 const wxSize& size = wxDefaultSize,
169 long style = 0,
170 const wxString& name = wxPyStaticBitmapNameStr);
1b8c7ba6 171 %RenameCtor(PreStaticBitmap, wxStaticBitmap());
d14a1e28 172
d5573410
RD
173 bool Create(wxWindow* parent, wxWindowID id=-1,
174 const wxBitmap& bitmap = wxNullBitmap,
d14a1e28
RD
175 const wxPoint& pos = wxDefaultPosition,
176 const wxSize& size = wxDefaultSize,
177 long style = 0,
178 const wxString& name = wxPyStaticBitmapNameStr);
179
180 wxBitmap GetBitmap();
181 void SetBitmap(const wxBitmap& bitmap);
182 void SetIcon(const wxIcon& icon);
880715c9
RD
183
184 static wxVisualAttributes
185 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
186};
187
188//---------------------------------------------------------------------------
189//---------------------------------------------------------------------------