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
13enum
14{
15    wxCONTROL_DISABLED,
16    wxCONTROL_FOCUSED,
17    wxCONTROL_PRESSED,
18    wxCONTROL_SPECIAL,
19    wxCONTROL_ISDEFAULT,
20    wxCONTROL_ISSUBMENU,
21    wxCONTROL_EXPANDED,
22    wxCONTROL_SIZEGRIP,
23    wxCONTROL_FLAT,
24    wxCONTROL_CURRENT,
25    wxCONTROL_SELECTED,
26    wxCONTROL_CHECKED,
27    wxCONTROL_CHECKABLE,
28    wxCONTROL_UNDETERMINED
29};
30
31enum wxTitleBarButton
32{
33    wxTITLEBAR_BUTTON_CLOSE,
34    wxTITLEBAR_BUTTON_MAXIMIZE,
35    wxTITLEBAR_BUTTON_ICONIZE,
36    wxTITLEBAR_BUTTON_RESTORE,
37    wxTITLEBAR_BUTTON_HELP
38};
39
40enum wxHeaderSortIconType
41{
42    wxHDR_SORT_ICON_NONE,
43    wxHDR_SORT_ICON_UP,
44    wxHDR_SORT_ICON_DOWN
45};
46
47struct wxSplitterRenderParams
48{
49    %Docstring
50        SplitterRenderParams(widthSash_, border_, isSens_)
51
52        This is just a simple struct used as a return value of
53        wxRendererNative::GetSplitterParams().
54    %End
55    %TypeHeaderCode
56        #include <wx/renderer.h>
57    %End
58
59    wxSplitterRenderParams(
60        wxCoord widthSash_,
61        wxCoord border_,
62        bool isSens_
63    );
64
65    const wxCoord border;
66
67    const bool isHotSensitive;
68
69    const wxCoord widthSash;
70
71};  // end of class wxSplitterRenderParams
72
73
74struct wxHeaderButtonParams
75{
76    %Docstring
77        HeaderButtonParams()
78
79        This struct can optionally be used with
80        wxRendererNative::DrawHeaderButton() to specify custom values used to
81        draw the text or bitmap label.
82    %End
83    %TypeHeaderCode
84        #include <wx/renderer.h>
85    %End
86
87    wxHeaderButtonParams();
88
89    wxColour m_arrowColour;
90
91    wxColour m_selectionColour;
92
93    wxString m_labelText;
94
95    wxFont m_labelFont;
96
97    wxColour m_labelColour;
98
99    wxBitmap m_labelBitmap;
100
101    int m_labelAlignment;
102
103};  // end of class wxHeaderButtonParams
104
105
106class wxRendererNative
107{
108    %Docstring
109        First, a brief introduction to wxRendererNative and why it is needed.
110    %End
111    %TypeHeaderCode
112        #include <wx/renderer.h>
113    %End
114
115public:
116    virtual
117    ~wxRendererNative();
118
119    virtual
120    void DrawCheckBox(
121        wxWindow * win,
122        wxDC & dc,
123        const wxRect & rect,
124        int flags = 0
125    ) = 0;
126    %Docstring
127        DrawCheckBox(win, dc, rect, flags=0)
128
129        Draw a check box.
130    %End
131
132    virtual
133    void DrawComboBoxDropButton(
134        wxWindow * win,
135        wxDC & dc,
136        const wxRect & rect,
137        int flags = 0
138    ) = 0;
139    %Docstring
140        DrawComboBoxDropButton(win, dc, rect, flags=0)
141
142        Draw a button like the one used by wxComboBox to show a drop down
143        window.
144    %End
145
146    virtual
147    void DrawDropArrow(
148        wxWindow * win,
149        wxDC & dc,
150        const wxRect & rect,
151        int flags = 0
152    ) = 0;
153    %Docstring
154        DrawDropArrow(win, dc, rect, flags=0)
155
156        Draw a drop down arrow that is suitable for use outside a combo box.
157    %End
158
159    virtual
160    void DrawFocusRect(
161        wxWindow * win,
162        wxDC & dc,
163        const wxRect & rect,
164        int flags = 0
165    ) = 0;
166    %Docstring
167        DrawFocusRect(win, dc, rect, flags=0)
168
169        Draw a focus rectangle using the specified rectangle.
170    %End
171
172    virtual
173    int DrawHeaderButton(
174        wxWindow * win,
175        wxDC & dc,
176        const wxRect & rect,
177        int flags = 0,
178        wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
179        wxHeaderButtonParams * params = NULL
180    ) = 0;
181    %Docstring
182        DrawHeaderButton(win, dc, rect, flags=0, sortArrow=HDR_SORT_ICON_NONE, params=None) -> int
183
184        Draw the header control button (used, for example, by wxListCtrl).
185    %End
186
187    virtual
188    int DrawHeaderButtonContents(
189        wxWindow * win,
190        wxDC & dc,
191        const wxRect & rect,
192        int flags = 0,
193        wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
194        wxHeaderButtonParams * params = NULL
195    ) = 0;
196    %Docstring
197        DrawHeaderButtonContents(win, dc, rect, flags=0, sortArrow=HDR_SORT_ICON_NONE, params=None) -> int
198
199        Draw the contents of a header control button (label, sort arrows,
200        etc.).
201    %End
202
203    virtual
204    void DrawItemSelectionRect(
205        wxWindow * win,
206        wxDC & dc,
207        const wxRect & rect,
208        int flags = 0
209    ) = 0;
210    %Docstring
211        DrawItemSelectionRect(win, dc, rect, flags=0)
212
213        Draw a selection rectangle underneath the text as used e.g.
214    %End
215
216    virtual
217    void DrawPushButton(
218        wxWindow * win,
219        wxDC & dc,
220        const wxRect & rect,
221        int flags = 0
222    ) = 0;
223    %Docstring
224        DrawPushButton(win, dc, rect, flags=0)
225
226        Draw a blank push button that looks very similar to wxButton.
227    %End
228
229    virtual
230    void DrawSplitterBorder(
231        wxWindow * win,
232        wxDC & dc,
233        const wxRect & rect,
234        int flags = 0
235    ) = 0;
236    %Docstring
237        DrawSplitterBorder(win, dc, rect, flags=0)
238
239        Draw the border for sash window: this border must be such that the
240        sash drawn by DrawSplitterSash() blends into it well.
241    %End
242
243    virtual
244    void DrawSplitterSash(
245        wxWindow * win,
246        wxDC & dc,
247        const wxSize & size,
248        wxCoord position,
249        wxOrientation orient,
250        int flags = 0
251    ) = 0;
252    %Docstring
253        DrawSplitterSash(win, dc, size, position, orient, flags=0)
254
255        Draw a sash.
256    %End
257
258    virtual
259    void DrawTreeItemButton(
260        wxWindow * win,
261        wxDC & dc,
262        const wxRect & rect,
263        int flags = 0
264    ) = 0;
265    %Docstring
266        DrawTreeItemButton(win, dc, rect, flags=0)
267
268        Draw the expanded/collapsed icon for a tree control item.
269    %End
270
271    virtual
272    void DrawChoice(
273        wxWindow * win,
274        wxDC & dc,
275        const wxRect & rect,
276        int flags = 0
277    ) = 0;
278    %Docstring
279        DrawChoice(win, dc, rect, flags=0)
280
281        Draw a native wxChoice.
282    %End
283
284    virtual
285    void DrawComboBox(
286        wxWindow * win,
287        wxDC & dc,
288        const wxRect & rect,
289        int flags = 0
290    ) = 0;
291    %Docstring
292        DrawComboBox(win, dc, rect, flags=0)
293
294        Draw a native wxComboBox.
295    %End
296
297    virtual
298    void DrawTextCtrl(
299        wxWindow * win,
300        wxDC & dc,
301        const wxRect & rect,
302        int flags = 0
303    ) = 0;
304    %Docstring
305        DrawTextCtrl(win, dc, rect, flags=0)
306
307        Draw a native wxTextCtrl frame.
308    %End
309
310    virtual
311    void DrawRadioBitmap(
312        wxWindow * win,
313        wxDC & dc,
314        const wxRect & rect,
315        int flags = 0
316    ) = 0;
317    %Docstring
318        DrawRadioBitmap(win, dc, rect, flags=0)
319
320        Draw a native wxRadioButton bitmap.
321    %End
322
323    virtual
324    wxSize GetCheckBoxSize(
325        wxWindow * win
326    ) = 0;
327    %Docstring
328        GetCheckBoxSize(win) -> Size
329
330        Returns the size of a check box.
331    %End
332
333    virtual
334    int GetHeaderButtonHeight(
335        wxWindow * win
336    ) = 0;
337    %Docstring
338        GetHeaderButtonHeight(win) -> int
339
340        Returns the height of a header button, either a fixed platform height
341        if available, or a generic height based on the win window's font.
342    %End
343
344    virtual
345    int GetHeaderButtonMargin(
346        wxWindow * win
347    ) = 0;
348    %Docstring
349        GetHeaderButtonMargin(win) -> int
350
351        Returns the horizontal margin on the left and right sides of header
352        button's label.
353    %End
354
355    virtual
356    wxSplitterRenderParams GetSplitterParams(
357        const wxWindow * win
358    ) = 0;
359    %Docstring
360        GetSplitterParams(win) -> SplitterRenderParams
361
362        Get the splitter parameters, see wxSplitterRenderParams.
363    %End
364
365    virtual
366    wxRendererVersion GetVersion() const = 0;
367    %Docstring
368        GetVersion() -> RendererVersion
369
370        This function is used for version checking: Load() refuses to load any
371        shared libraries implementing an older or incompatible version.
372    %End
373
374    static
375    wxRendererNative & Get();
376    %Docstring
377        Get() -> RendererNative
378
379        Return the currently used renderer.
380    %End
381    %PreMethodCode
382        if (!wxPyCheckForApp()) return NULL;
383    %End
384
385    static
386    wxRendererNative & GetDefault();
387    %Docstring
388        GetDefault() -> RendererNative
389
390        Return the default (native) implementation for this platform  this is
391        also the one used by default but this may be changed by calling Set()
392        in which case the return value of this method may be different from
393        the return value of Get().
394    %End
395    %PreMethodCode
396        if (!wxPyCheckForApp()) return NULL;
397    %End
398
399    static
400    wxRendererNative & GetGeneric();
401    %Docstring
402        GetGeneric() -> RendererNative
403
404        Return the generic implementation of the renderer.
405    %End
406    %PreMethodCode
407        if (!wxPyCheckForApp()) return NULL;
408    %End
409
410    static
411    wxRendererNative * Load(
412        const wxString & name
413    );
414    %Docstring
415        Load(name) -> RendererNative
416
417        Load the renderer from the specified DLL, the returned pointer must be
418        deleted by caller if not NULL when it is not used any more.
419    %End
420
421    static
422    wxRendererNative * Set(
423        wxRendererNative * renderer
424    );
425    %Docstring
426        Set(renderer) -> RendererNative
427
428        Set the renderer to use, passing NULL reverts to using the default
429        renderer (the global renderer must always exist).
430    %End
431    %PreMethodCode
432        if (!wxPyCheckForApp()) return NULL;
433    %End
434
435    private:
436        wxRendererNative(const wxRendererNative&);
437
438
439    public:
440
441
442    %Property(name=Version, get=GetVersion)
443};  // end of class wxRendererNative
444
445
446class wxDelegateRendererNative : wxRendererNative
447{
448    %Docstring
449        DelegateRendererNative()
450        DelegateRendererNative(rendererNative)
451
452        wxDelegateRendererNative allows reuse of renderers code by forwarding
453        all the wxRendererNative methods to the given object and thus allowing
454        you to only modify some of its methods  without having to reimplement
455        all of them.
456    %End
457    %TypeHeaderCode
458        #include <wx/renderer.h>
459    %End
460
461public:
462    wxDelegateRendererNative();
463    %PreMethodCode
464        if (!wxPyCheckForApp()) return NULL;
465    %End
466
467    wxDelegateRendererNative(
468        wxRendererNative & rendererNative
469    );
470    %PreMethodCode
471        if (!wxPyCheckForApp()) return NULL;
472    %End
473
474    virtual
475    int DrawHeaderButton(
476        wxWindow * win,
477        wxDC & dc,
478        const wxRect & rect,
479        int flags = 0,
480        wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
481        wxHeaderButtonParams * params = NULL
482    );
483    %Docstring
484        DrawHeaderButton(win, dc, rect, flags=0, sortArrow=HDR_SORT_ICON_NONE, params=None) -> int
485
486        Draw the header control button (used, for example, by wxListCtrl).
487    %End
488
489    virtual
490    int DrawHeaderButtonContents(
491        wxWindow * win,
492        wxDC & dc,
493        const wxRect & rect,
494        int flags = 0,
495        wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
496        wxHeaderButtonParams * params = NULL
497    );
498    %Docstring
499        DrawHeaderButtonContents(win, dc, rect, flags=0, sortArrow=HDR_SORT_ICON_NONE, params=None) -> int
500
501        Draw the contents of a header control button (label, sort arrows,
502        etc.).
503    %End
504
505    virtual
506    int GetHeaderButtonHeight(
507        wxWindow * win
508    );
509    %Docstring
510        GetHeaderButtonHeight(win) -> int
511
512        Returns the height of a header button, either a fixed platform height
513        if available, or a generic height based on the win window's font.
514    %End
515
516    virtual
517    int GetHeaderButtonMargin(
518        wxWindow * win
519    );
520    %Docstring
521        GetHeaderButtonMargin(win) -> int
522
523        Returns the horizontal margin on the left and right sides of header
524        button's label.
525    %End
526
527    virtual
528    void DrawTreeItemButton(
529        wxWindow * win,
530        wxDC & dc,
531        const wxRect & rect,
532        int flags = 0
533    );
534    %Docstring
535        DrawTreeItemButton(win, dc, rect, flags=0)
536
537        Draw the expanded/collapsed icon for a tree control item.
538    %End
539
540    virtual
541    void DrawSplitterBorder(
542        wxWindow * win,
543        wxDC & dc,
544        const wxRect & rect,
545        int flags = 0
546    );
547    %Docstring
548        DrawSplitterBorder(win, dc, rect, flags=0)
549
550        Draw the border for sash window: this border must be such that the
551        sash drawn by DrawSplitterSash() blends into it well.
552    %End
553
554    virtual
555    void DrawSplitterSash(
556        wxWindow * win,
557        wxDC & dc,
558        const wxSize & size,
559        wxCoord position,
560        wxOrientation orient,
561        int flags = 0
562    );
563    %Docstring
564        DrawSplitterSash(win, dc, size, position, orient, flags=0)
565
566        Draw a sash.
567    %End
568
569    virtual
570    void DrawComboBoxDropButton(
571        wxWindow * win,
572        wxDC & dc,
573        const wxRect & rect,
574        int flags = 0
575    );
576    %Docstring
577        DrawComboBoxDropButton(win, dc, rect, flags=0)
578
579        Draw a button like the one used by wxComboBox to show a drop down
580        window.
581    %End
582
583    virtual
584    void DrawDropArrow(
585        wxWindow * win,
586        wxDC & dc,
587        const wxRect & rect,
588        int flags = 0
589    );
590    %Docstring
591        DrawDropArrow(win, dc, rect, flags=0)
592
593        Draw a drop down arrow that is suitable for use outside a combo box.
594    %End
595
596    virtual
597    void DrawCheckBox(
598        wxWindow * win,
599        wxDC & dc,
600        const wxRect & rect,
601        int flags = 0
602    );
603    %Docstring
604        DrawCheckBox(win, dc, rect, flags=0)
605
606        Draw a check box.
607    %End
608
609    virtual
610    wxSize GetCheckBoxSize(
611        wxWindow * win
612    );
613    %Docstring
614        GetCheckBoxSize(win) -> Size
615
616        Returns the size of a check box.
617    %End
618
619    virtual
620    void DrawPushButton(
621        wxWindow * win,
622        wxDC & dc,
623        const wxRect & rect,
624        int flags = 0
625    );
626    %Docstring
627        DrawPushButton(win, dc, rect, flags=0)
628
629        Draw a blank push button that looks very similar to wxButton.
630    %End
631
632    virtual
633    void DrawItemSelectionRect(
634        wxWindow * win,
635        wxDC & dc,
636        const wxRect & rect,
637        int flags = 0
638    );
639    %Docstring
640        DrawItemSelectionRect(win, dc, rect, flags=0)
641
642        Draw a selection rectangle underneath the text as used e.g.
643    %End
644
645    virtual
646    void DrawFocusRect(
647        wxWindow * win,
648        wxDC & dc,
649        const wxRect & rect,
650        int flags = 0
651    );
652    %Docstring
653        DrawFocusRect(win, dc, rect, flags=0)
654
655        Draw a focus rectangle using the specified rectangle.
656    %End
657
658    virtual
659    wxSplitterRenderParams GetSplitterParams(
660        const wxWindow * win
661    );
662    %Docstring
663        GetSplitterParams(win) -> SplitterRenderParams
664
665        Get the splitter parameters, see wxSplitterRenderParams.
666    %End
667
668    virtual
669    wxRendererVersion GetVersion() const;
670    %Docstring
671        GetVersion() -> RendererVersion
672
673        This function is used for version checking: Load() refuses to load any
674        shared libraries implementing an older or incompatible version.
675    %End
676
677    private:
678        wxDelegateRendererNative(const wxDelegateRendererNative&);
679
680
681    void DrawTitleBarBitmap(wxWindow* win,  wxDC& dc,  const wxRect& rect,  wxTitleBarButton button,  int flags = 0);
682    %Docstring
683        DrawTitleBarBitmap(win, dc, rect, button, flags=0)
684
685        Draw a title bar button in the given state.
686    %End
687    %MethodCode
688        PyErr_Clear();
689        Py_BEGIN_ALLOW_THREADS
690        _wxDelegateRendererNative_DrawTitleBarBitmap(sipCpp, win, dc, rect, button, flags);
691        Py_END_ALLOW_THREADS
692        if (PyErr_Occurred()) sipIsErr = 1;
693    %End
694    %TypeCode
695    void _wxDelegateRendererNative_DrawTitleBarBitmap(wxDelegateRendererNative* self, wxWindow* win, wxDC* dc, const wxRect* rect, wxTitleBarButton button, int flags)
696    {
697        #ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
698            self->DrawTitleBarBitmap(win, *dc, *rect, button, flags);
699        #else
700            wxPyRaiseNotImplemented();
701        #endif
702    }
703    %End
704
705    public:
706
707
708    %Property(name=Version, get=GetVersion)
709};  // end of class wxDelegateRendererNative
710
711
712struct wxRendererVersion
713{
714    %Docstring
715        RendererVersion(version_, age_)
716
717        This simple struct represents the wxRendererNative interface version
718        and is only used as the return value of
719        wxRendererNative::GetVersion().
720    %End
721    %TypeHeaderCode
722        #include <wx/renderer.h>
723    %End
724
725    wxRendererVersion(
726        int version_,
727        int age_
728    );
729
730    const int age;
731
732    const int version;
733
734    static
735    bool IsCompatible(
736        const wxRendererVersion & ver
737    );
738    %Docstring
739        IsCompatible(ver) -> bool
740
741        Checks if the main program is compatible with the renderer having the
742        version ver, returns true if it is and false otherwise.
743    %End
744
745};  // end of class wxRendererVersion
746
747
748
749//---------------------------------------------------------------------------
750
751