1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13const int wxSTB_SIZEGRIP;
14const int wxSTB_SHOW_TIPS;
15const int wxSTB_ELLIPSIZE_START;
16const int wxSTB_ELLIPSIZE_MIDDLE;
17const int wxSTB_ELLIPSIZE_END;
18const int wxSTB_DEFAULT_STYLE;
19const int wxSB_NORMAL;
20const int wxSB_FLAT;
21const int wxSB_RAISED;
22const int wxSB_SUNKEN;
23const char* wxStatusBarNameStr;
24
25class wxStatusBar : wxControl
26{
27    %Docstring
28        StatusBar()
29        StatusBar(parent, id=ID_ANY, style=STB_DEFAULT_STYLE, name=StatusBarNameStr)
30
31        A status bar is a narrow window that can be placed along the bottom of
32        a frame to give small amounts of status information.
33    %End
34    %TypeHeaderCode
35        #include <wx/statusbr.h>
36    %End
37
38public:
39    wxStatusBar();
40    %PreMethodCode
41        if (!wxPyCheckForApp()) return NULL;
42    %End
43
44    wxStatusBar(
45        wxWindow * parent   /TransferThis/,
46        wxWindowID id = wxID_ANY,
47        long style = wxSTB_DEFAULT_STYLE,
48        const wxString & name = wxStatusBarNameStr
49    );
50    %PreMethodCode
51        if (!wxPyCheckForApp()) return NULL;
52    %End
53
54    ~wxStatusBar();
55
56    bool Create(
57        wxWindow * parent   /TransferThis/,
58        wxWindowID id = wxID_ANY,
59        long style = wxSTB_DEFAULT_STYLE,
60        const wxString & name = wxStatusBarNameStr
61    );
62    %Docstring
63        Create(parent, id=ID_ANY, style=STB_DEFAULT_STYLE, name=StatusBarNameStr) -> bool
64
65        Creates the window, for two-step construction.
66    %End
67
68    wxRect* GetFieldRect(int i);
69    %Docstring
70        GetFieldRect(i) -> Rect
71
72        Returns the size and position of a field's internal bounding
73        rectangle.
74    %End
75    %MethodCode
76        PyErr_Clear();
77        Py_BEGIN_ALLOW_THREADS
78        sipRes = _wxStatusBar_GetFieldRect(sipCpp, i);
79        Py_END_ALLOW_THREADS
80        if (PyErr_Occurred()) sipIsErr = 1;
81    %End
82    %TypeCode
83    wxRect* _wxStatusBar_GetFieldRect(wxStatusBar* self, int i)
84    {
85        wxRect* r = new wxRect;
86        self->GetFieldRect(i, *r);
87        return r;
88    }
89    %End
90
91    int GetFieldsCount() const;
92    %Docstring
93        GetFieldsCount() -> int
94
95        Returns the number of fields in the status bar.
96    %End
97
98    const wxStatusBarPane & GetField(
99        int n
100    ) const;
101    %Docstring
102        GetField(n) -> StatusBarPane
103
104        Returns the wxStatusBarPane representing the n-th field.
105    %End
106
107    wxSize GetBorders() const;
108    %Docstring
109        GetBorders() -> Size
110
111        Returns the horizontal and vertical borders used when rendering the
112        field text inside the field area.
113    %End
114
115    wxString GetStatusText(
116        int i = 0
117    ) const;
118    %Docstring
119        GetStatusText(i=0) -> String
120
121        Returns the string associated with a status bar field.
122    %End
123
124    int GetStatusWidth(
125        int n
126    ) const;
127    %Docstring
128        GetStatusWidth(n) -> int
129
130        Returns the width of the n-th field.
131    %End
132
133    int GetStatusStyle(
134        int n
135    ) const;
136    %Docstring
137        GetStatusStyle(n) -> int
138
139        Returns the style of the n-th field.
140    %End
141
142    void PopStatusText(
143        int field = 0
144    );
145    %Docstring
146        PopStatusText(field=0)
147
148        Restores the text to the value it had before the last call to
149        PushStatusText().
150    %End
151
152    void PushStatusText(
153        const wxString & string,
154        int field = 0
155    );
156    %Docstring
157        PushStatusText(string, field=0)
158
159        Saves the current field text in a per-field stack, and sets the field
160        text to the string passed as argument.
161    %End
162
163    void SetFieldsCount(
164        int number = 1,
165        const wxArrayInt* widths = NULL
166    );
167    %Docstring
168        SetFieldsCount(number=1, widths=None)
169
170        Sets the number of fields, and optionally the field widths.
171    %End
172    %MethodCode
173        PyErr_Clear();
174        Py_BEGIN_ALLOW_THREADS
175        _wxStatusBar_SetFieldsCount(sipCpp, number, widths);
176        Py_END_ALLOW_THREADS
177        if (PyErr_Occurred()) sipIsErr = 1;
178    %End
179    %TypeCode
180    void _wxStatusBar_SetFieldsCount(wxStatusBar* self, int number, const wxArrayInt* widths)
181    {
182        if (widths) {
183            const int* ptr = &widths->front();
184            self->SetFieldsCount(number, ptr);
185            }
186        else {
187            self->SetFieldsCount(number);
188            }
189    }
190    %End
191
192    void SetMinHeight(
193        int height
194    );
195    %Docstring
196        SetMinHeight(height)
197
198        Sets the minimal possible height for the status bar.
199    %End
200
201    void SetStatusStyles(
202        const wxArrayInt& styles
203    );
204    %Docstring
205        SetStatusStyles(styles)
206
207        Sets the styles of the fields in the status line which can make fields
208        appear flat or raised instead of the standard sunken 3D border.
209    %End
210    %MethodCode
211        PyErr_Clear();
212        Py_BEGIN_ALLOW_THREADS
213        _wxStatusBar_SetStatusStyles(sipCpp, styles);
214        Py_END_ALLOW_THREADS
215        if (PyErr_Occurred()) sipIsErr = 1;
216    %End
217    %TypeCode
218    void _wxStatusBar_SetStatusStyles(wxStatusBar* self, const wxArrayInt* styles)
219    {
220        const int* ptr = &styles->front();
221        self->SetStatusStyles(styles->size(), ptr);
222    }
223    %End
224
225    void SetStatusText(
226        const wxString & text,
227        int i = 0
228    );
229    %Docstring
230        SetStatusText(text, i=0)
231
232        Sets the status text for the i-th field.
233    %End
234
235    void SetStatusWidths(
236        const wxArrayInt& widths
237    );
238    %Docstring
239        SetStatusWidths(widths)
240
241        Sets the widths of the fields in the status line.
242    %End
243    %MethodCode
244        PyErr_Clear();
245        Py_BEGIN_ALLOW_THREADS
246        _wxStatusBar_SetStatusWidths(sipCpp, widths);
247        Py_END_ALLOW_THREADS
248        if (PyErr_Occurred()) sipIsErr = 1;
249    %End
250    %TypeCode
251    void _wxStatusBar_SetStatusWidths(wxStatusBar* self, const wxArrayInt* widths)
252    {
253        const int* ptr = &widths->front();
254        self->SetStatusWidths(widths->size(), ptr);
255    }
256    %End
257
258    public:
259    virtual wxPoint GetClientAreaOrigin() const;
260    virtual bool Validate();
261    virtual bool TransferDataToWindow();
262    virtual bool TransferDataFromWindow();
263    virtual void InitDialog();
264    virtual bool AcceptsFocus() const;
265    virtual bool AcceptsFocusRecursively() const;
266    virtual bool AcceptsFocusFromKeyboard() const;
267    virtual void AddChild( wxWindowBase *child );
268    virtual void RemoveChild( wxWindowBase *child );
269    virtual void InheritAttributes();
270    virtual bool ShouldInheritColours() const;
271    virtual void OnInternalIdle();
272    virtual wxWindow *GetMainWindowOfCompositeControl();
273    virtual bool InformFirstDirection(int direction, int size, int availableOtherDir);
274    virtual void SetCanFocus(bool canFocus);
275    virtual bool Destroy();
276    virtual void SetValidator( const wxValidator &validator );
277    virtual wxValidator* GetValidator();
278
279
280    protected:
281    virtual bool ProcessEvent(wxEvent & event);
282    virtual void DoEnable(bool enable);
283    virtual void DoGetPosition(int *x, int *y) const;
284    virtual void DoGetSize(int *width, int *height) const;
285    virtual void DoGetClientSize(int *width, int *height) const;
286    virtual wxSize DoGetBestSize() const;
287    virtual wxSize DoGetBestClientSize() const;
288    virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
289    virtual void DoSetClientSize(int width, int height);
290    virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH );
291    virtual wxSize DoGetBorderSize() const;
292    virtual void DoMoveWindow(int x, int y, int width, int height);
293    virtual void DoSetWindowVariant( wxWindowVariant variant);
294    virtual wxBorder GetDefaultBorder() const;
295    virtual wxBorder GetDefaultBorderForControl() const;
296    virtual void DoFreeze();
297    virtual void DoThaw();
298    virtual bool HasTransparentBackground();
299    virtual bool TryBefore(wxEvent& event);
300    virtual bool TryAfter(wxEvent& event);
301
302
303    public:
304
305
306    static
307    wxVisualAttributes GetClassDefaultAttributes(
308        wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL
309    );
310    %Docstring
311        GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
312    %End
313    %PreMethodCode
314        if (!wxPyCheckForApp()) return NULL;
315    %End
316
317    public:
318
319
320    %Property(name=Borders, get=GetBorders)
321    %Property(name=FieldRect, get=GetFieldRect)
322    %Property(name=FieldsCount, get=GetFieldsCount, set=SetFieldsCount)
323    %Property(name=StatusText, get=GetStatusText, set=SetStatusText)
324};  // end of class wxStatusBar
325
326
327class wxStatusBarPane
328{
329    %Docstring
330        StatusBarPane(style=SB_NORMAL, width=0)
331
332        A status bar pane data container used by wxStatusBar.
333    %End
334    %TypeHeaderCode
335        #include <wx/statusbr.h>
336    %End
337
338public:
339    wxStatusBarPane(
340        int style = wxSB_NORMAL,
341        int width = 0
342    );
343
344    int GetWidth() const;
345    %Docstring
346        GetWidth() -> int
347
348        Returns the pane width; it maybe negative, indicating a variable-width
349        field.
350    %End
351
352    int GetStyle() const;
353    %Docstring
354        GetStyle() -> int
355
356        Returns the pane style.
357    %End
358
359    wxString GetText() const;
360    %Docstring
361        GetText() -> String
362
363        Returns the text currently shown in this pane.
364    %End
365
366    bool IsEllipsized() const;
367    %Docstring
368        IsEllipsized() -> bool
369    %End
370
371    void SetIsEllipsized(
372        bool isEllipsized
373    );
374    %Docstring
375        SetIsEllipsized(isEllipsized)
376    %End
377
378    void SetWidth(
379        int width
380    );
381    %Docstring
382        SetWidth(width)
383    %End
384
385    void SetStyle(
386        int style
387    );
388    %Docstring
389        SetStyle(style)
390    %End
391
392    bool SetText(
393        const wxString & text
394    );
395    %Docstring
396        SetText(text) -> bool
397
398        Set text.
399    %End
400
401    bool PushText(
402        const wxString & text
403    );
404    %Docstring
405        PushText(text) -> bool
406
407        Save the existing text on top of a stack and make the new text
408        current.
409    %End
410
411    bool PopText();
412    %Docstring
413        PopText() -> bool
414
415        Restore the message saved by the last call to Push() (unless it was
416        changed by an intervening call to SetText()) and return true if we
417        really restored anything.
418    %End
419
420    public:
421
422
423    %Property(name=Style, get=GetStyle, set=SetStyle)
424    %Property(name=Text, get=GetText, set=SetText)
425    %Property(name=Width, get=GetWidth, set=SetWidth)
426};  // end of class wxStatusBarPane
427
428
429
430//---------------------------------------------------------------------------
431
432