]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_statctrls.i
Minor tweaks to bring up to date with CVS changes
[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);
d14a1e28
RD
22
23//---------------------------------------------------------------------------
24%newgroup
25
ab1f7d2a
RD
26MustHaveApp(wxStaticBox);
27
d14a1e28
RD
28class wxStaticBox : public wxControl {
29public:
2b9048c5
RD
30 %pythonAppend wxStaticBox "self._setOORInfo(self)"
31 %pythonAppend wxStaticBox() ""
b39c3fa0 32 %typemap(out) wxStaticBox*; // turn off this typemap
d14a1e28 33
d5573410
RD
34 wxStaticBox(wxWindow* parent, wxWindowID id=-1,
35 const wxString& label = wxPyEmptyString,
d14a1e28
RD
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = 0,
39 const wxString& name = wxPyStaticBoxNameStr);
1b8c7ba6 40 %RenameCtor(PreStaticBox, wxStaticBox());
d14a1e28 41
b39c3fa0
RD
42 // Turn it back on again
43 %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
44
d5573410
RD
45 bool Create(wxWindow* parent, wxWindowID id=-1,
46 const wxString& label = wxPyEmptyString,
d14a1e28
RD
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = 0,
50 const wxString& name = wxPyStaticBoxNameStr);
880715c9
RD
51
52 static wxVisualAttributes
53 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
54};
55
56
57//---------------------------------------------------------------------------
58%newgroup
59
60
ab1f7d2a
RD
61MustHaveApp(wxStaticLine);
62
d14a1e28
RD
63class wxStaticLine : public wxControl {
64public:
2b9048c5
RD
65 %pythonAppend wxStaticLine "self._setOORInfo(self)"
66 %pythonAppend wxStaticLine() ""
d14a1e28 67
d5573410 68 wxStaticLine( wxWindow *parent, wxWindowID id=-1,
d14a1e28
RD
69 const wxPoint &pos = wxDefaultPosition,
70 const wxSize &size = wxDefaultSize,
71 long style = wxLI_HORIZONTAL,
72 const wxString& name = wxPyStaticTextNameStr);
1b8c7ba6 73 %RenameCtor(PreStaticLine, wxStaticLine());
d14a1e28 74
d5573410 75 bool Create( wxWindow *parent, wxWindowID id=-1,
d14a1e28
RD
76 const wxPoint &pos = wxDefaultPosition,
77 const wxSize &size = wxDefaultSize,
78 long style = wxLI_HORIZONTAL,
79 const wxString& name = wxPyStaticTextNameStr);
80
81 // is the line vertical?
82 bool IsVertical() const;
83
84 // get the default size for the "lesser" dimension of the static line
fa42d122 85 static int GetDefaultSize();
d14a1e28 86
880715c9
RD
87 static wxVisualAttributes
88 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
89};
90
91
92//---------------------------------------------------------------------------
93%newgroup
94
ab1f7d2a
RD
95MustHaveApp(wxStaticText);
96
d14a1e28
RD
97class wxStaticText : public wxControl {
98public:
2b9048c5
RD
99 %pythonAppend wxStaticText "self._setOORInfo(self)"
100 %pythonAppend wxStaticText() ""
d14a1e28 101
d5573410
RD
102 wxStaticText(wxWindow* parent, wxWindowID id=-1,
103 const wxString& label = wxPyEmptyString,
d14a1e28
RD
104 const wxPoint& pos = wxDefaultPosition,
105 const wxSize& size = wxDefaultSize,
106 long style = 0,
107 const wxString& name = wxPyStaticTextNameStr);
1b8c7ba6 108 %RenameCtor(PreStaticText, wxStaticText());
d14a1e28 109
d5573410
RD
110 bool Create(wxWindow* parent, wxWindowID id=-1,
111 const wxString& label = wxPyEmptyString,
d14a1e28
RD
112 const wxPoint& pos = wxDefaultPosition,
113 const wxSize& size = wxDefaultSize,
114 long style = 0,
115 const wxString& name = wxPyStaticTextNameStr);
880715c9 116
02b800ce
RD
117 DocDeclStr(
118 void , Wrap(int width),
119 "This functions wraps the control's label so that each of its lines
120becomes at most ``width`` pixels wide if possible (the lines are
121broken at words boundaries so it might not be the case if words are
122too long). If ``width`` is negative, no wrapping is done.", "");
123
124
880715c9
RD
125 static wxVisualAttributes
126 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
127};
128
129//---------------------------------------------------------------------------
130%newgroup
131
ab1f7d2a
RD
132MustHaveApp(wxStaticBitmap);
133
d14a1e28
RD
134class wxStaticBitmap : public wxControl {
135public:
8179a168
RD
136 %pythonAppend wxStaticBitmap "self._setOORInfo(self)"
137 %pythonAppend wxStaticBitmap() ""
d14a1e28 138
d5573410
RD
139 wxStaticBitmap(wxWindow* parent, wxWindowID id=-1,
140 const wxBitmap& bitmap = wxNullBitmap,
d14a1e28
RD
141 const wxPoint& pos = wxDefaultPosition,
142 const wxSize& size = wxDefaultSize,
143 long style = 0,
144 const wxString& name = wxPyStaticBitmapNameStr);
1b8c7ba6 145 %RenameCtor(PreStaticBitmap, wxStaticBitmap());
d14a1e28 146
d5573410
RD
147 bool Create(wxWindow* parent, wxWindowID id=-1,
148 const wxBitmap& bitmap = wxNullBitmap,
d14a1e28
RD
149 const wxPoint& pos = wxDefaultPosition,
150 const wxSize& size = wxDefaultSize,
151 long style = 0,
152 const wxString& name = wxPyStaticBitmapNameStr);
153
154 wxBitmap GetBitmap();
155 void SetBitmap(const wxBitmap& bitmap);
156 void SetIcon(const wxIcon& icon);
880715c9
RD
157
158 static wxVisualAttributes
159 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
160};
161
162//---------------------------------------------------------------------------
163//---------------------------------------------------------------------------