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 _propgrid.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13const int wxPG_DEFAULT_STYLE;
14const int wxPGMAN_DEFAULT_STYLE;
15enum wxPG_WINDOW_STYLES
16{
17    wxPG_AUTO_SORT,
18    wxPG_HIDE_CATEGORIES,
19    wxPG_ALPHABETIC_MODE,
20    wxPG_BOLD_MODIFIED,
21    wxPG_SPLITTER_AUTO_CENTER,
22    wxPG_TOOLTIPS,
23    wxPG_HIDE_MARGIN,
24    wxPG_STATIC_SPLITTER,
25    wxPG_STATIC_LAYOUT,
26    wxPG_LIMITED_EDITING,
27    wxPG_TOOLBAR,
28    wxPG_DESCRIPTION,
29    wxPG_NO_INTERNAL_BORDER
30};
31
32enum wxPG_EX_WINDOW_STYLES
33{
34    wxPG_EX_INIT_NOCAT,
35    wxPG_EX_NO_FLAT_TOOLBAR,
36    wxPG_EX_MODE_BUTTONS,
37    wxPG_EX_HELP_AS_TOOLTIPS,
38    wxPG_EX_NATIVE_DOUBLE_BUFFERING,
39    wxPG_EX_AUTO_UNSPECIFIED_VALUES,
40    wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES,
41    wxPG_EX_HIDE_PAGE_BUTTONS,
42    wxPG_EX_MULTIPLE_SELECTION,
43    wxPG_EX_ENABLE_TLP_TRACKING,
44    wxPG_EX_NO_TOOLBAR_DIVIDER,
45    wxPG_EX_TOOLBAR_SEPARATOR
46};
47
48enum wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS
49{
50    wxPG_VFB_STAY_IN_PROPERTY,
51    wxPG_VFB_BEEP,
52    wxPG_VFB_MARK_CELL,
53    wxPG_VFB_SHOW_MESSAGE,
54    wxPG_VFB_SHOW_MESSAGEBOX,
55    wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR,
56    wxPG_VFB_DEFAULT
57};
58
59enum wxPG_KEYBOARD_ACTIONS
60{
61    wxPG_ACTION_INVALID,
62    wxPG_ACTION_NEXT_PROPERTY,
63    wxPG_ACTION_PREV_PROPERTY,
64    wxPG_ACTION_EXPAND_PROPERTY,
65    wxPG_ACTION_COLLAPSE_PROPERTY,
66    wxPG_ACTION_CANCEL_EDIT,
67    wxPG_ACTION_EDIT,
68    wxPG_ACTION_PRESS_BUTTON,
69    wxPG_ACTION_MAX
70};
71
72typedef unsigned char wxPGVFBFlags   /NoTypeName/;
73
74wxEventType wxEVT_PG_SELECTED   /PyName=wxEVT_PG_SELECTED/;
75
76wxEventType wxEVT_PG_CHANGING   /PyName=wxEVT_PG_CHANGING/;
77
78wxEventType wxEVT_PG_CHANGED   /PyName=wxEVT_PG_CHANGED/;
79
80wxEventType wxEVT_PG_HIGHLIGHTED   /PyName=wxEVT_PG_HIGHLIGHTED/;
81
82wxEventType wxEVT_PG_RIGHT_CLICK   /PyName=wxEVT_PG_RIGHT_CLICK/;
83
84wxEventType wxEVT_PG_PAGE_CHANGED   /PyName=wxEVT_PG_PAGE_CHANGED/;
85
86wxEventType wxEVT_PG_ITEM_COLLAPSED   /PyName=wxEVT_PG_ITEM_COLLAPSED/;
87
88wxEventType wxEVT_PG_ITEM_EXPANDED   /PyName=wxEVT_PG_ITEM_EXPANDED/;
89
90wxEventType wxEVT_PG_DOUBLE_CLICK   /PyName=wxEVT_PG_DOUBLE_CLICK/;
91
92wxEventType wxEVT_PG_LABEL_EDIT_BEGIN   /PyName=wxEVT_PG_LABEL_EDIT_BEGIN/;
93
94wxEventType wxEVT_PG_LABEL_EDIT_ENDING   /PyName=wxEVT_PG_LABEL_EDIT_ENDING/;
95
96wxEventType wxEVT_PG_COL_BEGIN_DRAG   /PyName=wxEVT_PG_COL_BEGIN_DRAG/;
97
98wxEventType wxEVT_PG_COL_DRAGGING   /PyName=wxEVT_PG_COL_DRAGGING/;
99
100wxEventType wxEVT_PG_COL_END_DRAG   /PyName=wxEVT_PG_COL_END_DRAG/;
101
102class wxPGValidationInfo
103{
104    %Docstring
105        Used to convey validation information to and from functions that
106        actually perform validation.
107    %End
108    %TypeHeaderCode
109        #include <wx/propgrid/propgrid.h>
110    %End
111
112public:
113    wxPGVFBFlags GetFailureBehavior();
114    %Docstring
115        GetFailureBehavior() -> PGVFBFlags
116    %End
117
118    const wxString & GetFailureMessage() const;
119    %Docstring
120        GetFailureMessage() -> String
121
122        Returns current failure message.
123    %End
124
125    wxPGVariant & GetValue();
126    %Docstring
127        GetValue() -> PGVariant
128
129        Returns reference to pending value.
130    %End
131
132    void SetFailureBehavior(
133        wxPGVFBFlags failureBehavior
134    );
135    %Docstring
136        SetFailureBehavior(failureBehavior)
137
138        Set validation failure behaviour.
139    %End
140
141    void SetFailureMessage(
142        const wxString & message
143    );
144    %Docstring
145        SetFailureMessage(message)
146
147        Set current failure message.
148    %End
149
150    public:
151
152
153    %Property(name=FailureBehavior, get=GetFailureBehavior, set=SetFailureBehavior)
154    %Property(name=FailureMessage, get=GetFailureMessage, set=SetFailureMessage)
155    %Property(name=Value, get=GetValue)
156};  // end of class wxPGValidationInfo
157
158
159const char* wxPropertyGridNameStr;
160
161class wxPropertyGrid : wxControl, wxPropertyGridInterface
162{
163    %Docstring
164        PropertyGrid()
165        PropertyGrid(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=PG_DEFAULT_STYLE, name=PropertyGridNameStr)
166
167        wxPropertyGrid is a specialized grid for editing properties - in other
168        words name = value pairs.
169    %End
170    %TypeHeaderCode
171        #include <wx/propgrid/propgrid.h>
172    %End
173
174public:
175    wxPropertyGrid();
176    %PreMethodCode
177        if (!wxPyCheckForApp()) return NULL;
178    %End
179
180    wxPropertyGrid(
181        wxWindow * parent   /TransferThis/,
182        wxWindowID id = wxID_ANY,
183        const wxPoint & pos = wxDefaultPosition,
184        const wxSize & size = wxDefaultSize,
185        long style = wxPG_DEFAULT_STYLE,
186        const wxString & name = wxPropertyGridNameStr
187    );
188    %PreMethodCode
189        if (!wxPyCheckForApp()) return NULL;
190    %End
191
192    ~wxPropertyGrid();
193
194    void DoShowPropertyError(
195        wxPGProperty * property,
196        const wxString & msg
197    );
198    %Docstring
199        DoShowPropertyError(property, msg)
200
201        Override in derived class to display error messages in custom manner
202        (these message usually only result from validation failure).
203    %End
204
205    void DoHidePropertyError(
206        wxPGProperty * property
207    );
208    %Docstring
209        DoHidePropertyError(property)
210
211        Override in derived class to hide an error displayed by
212        DoShowPropertyError().
213    %End
214
215    wxStatusBar * GetStatusBar();
216    %Docstring
217        GetStatusBar() -> wx.StatusBar
218
219        Return wxStatusBar that is used by this wxPropertyGrid.
220    %End
221
222    void EditorsValueWasModified();
223    %Docstring
224        EditorsValueWasModified()
225
226        Call when editor widget's contents is modified.
227    %End
228
229    void EditorsValueWasNotModified();
230    %Docstring
231        EditorsValueWasNotModified()
232
233        Reverse of EditorsValueWasModified().
234    %End
235
236    wxPGVariant GetUncommittedPropertyValue();
237    %Docstring
238        GetUncommittedPropertyValue() -> PGVariant
239
240        Returns most up-to-date value of selected property.
241    %End
242
243    bool IsEditorsValueModified() const;
244    %Docstring
245        IsEditorsValueModified() -> bool
246
247        Returns true if editor's value was marked modified.
248    %End
249
250    void ShowPropertyError(
251        const wxPGPropArgCls & id,
252        const wxString & msg
253    );
254    %Docstring
255        ShowPropertyError(id, msg)
256
257        Shows an brief error message that is related to a property.
258    %End
259
260    bool WasValueChangedInEvent() const;
261    %Docstring
262        WasValueChangedInEvent() -> bool
263
264        You can use this member function, for instance, to detect in
265        wxPGProperty::OnEvent() if wxPGProperty::SetValueInEvent() was already
266        called in wxPGEditor::OnEvent().
267    %End
268
269    void AddActionTrigger(
270        int action,
271        int keycode,
272        int modifiers = 0
273    );
274    %Docstring
275        AddActionTrigger(action, keycode, modifiers=0)
276
277        Adds given key combination to trigger given action.
278    %End
279
280    bool AddToSelection(
281        const wxPGPropArgCls & id
282    );
283    %Docstring
284        AddToSelection(id) -> bool
285
286        Adds given property into selection.
287    %End
288
289    void BeginLabelEdit(
290        unsigned int colIndex = 0
291    );
292    %Docstring
293        BeginLabelEdit(colIndex=0)
294
295        Creates label editor wxTextCtrl for given column, for property that is
296        currently selected.
297    %End
298
299    bool ChangePropertyValue(
300        const wxPGPropArgCls & id,
301        wxPGVariant newValue
302    );
303    %Docstring
304        ChangePropertyValue(id, newValue) -> bool
305
306        Changes value of a property, as if from an editor.
307    %End
308
309    void CenterSplitter(
310        bool enableAutoResizing = false
311    );
312    %Docstring
313        CenterSplitter(enableAutoResizing=False)
314
315        Centers the splitter.
316    %End
317
318    void Clear();
319    %Docstring
320        Clear()
321
322        Deletes all properties.
323    %End
324
325    void ClearActionTriggers(
326        int action
327    );
328    %Docstring
329        ClearActionTriggers(action)
330
331        Clears action triggers for given action.
332    %End
333
334    bool CommitChangesFromEditor(
335        wxUint32 flags = 0
336    );
337    %Docstring
338        CommitChangesFromEditor(flags=0) -> bool
339
340        Forces updating the value of property from the editor control.
341    %End
342
343    bool Create(
344        wxWindow * parent   /TransferThis/,
345        wxWindowID id = wxID_ANY,
346        const wxPoint & pos = wxDefaultPosition,
347        const wxSize & size = wxDefaultSize,
348        long style = wxPG_DEFAULT_STYLE,
349        const wxString & name = wxPropertyGridNameStr
350    );
351    %Docstring
352        Create(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=PG_DEFAULT_STYLE, name=PropertyGridNameStr) -> bool
353
354        Two step creation.
355    %End
356
357    void DedicateKey(
358        int keycode
359    );
360    %Docstring
361        DedicateKey(keycode)
362
363        Dedicates a specific keycode to wxPropertyGrid.
364    %End
365
366    bool EnableCategories(
367        bool enable
368    );
369    %Docstring
370        EnableCategories(enable) -> bool
371
372        Enables or disables (shows/hides) categories according to parameter
373        enable.
374    %End
375
376    void EndLabelEdit(
377        bool commit = true
378    );
379    %Docstring
380        EndLabelEdit(commit=True)
381
382        Destroys label editor wxTextCtrl, if any.
383    %End
384
385    bool EnsureVisible(
386        const wxPGPropArgCls & id
387    );
388    %Docstring
389        EnsureVisible(id) -> bool
390
391        Scrolls and/or expands items to ensure that the given item is visible.
392    %End
393
394    wxSize FitColumns();
395    %Docstring
396        FitColumns() -> wx.Size
397
398        Reduces column sizes to minimum possible, while still retaining fully
399        visible grid contents (labels, images).
400    %End
401
402    wxTextCtrl * GetLabelEditor() const;
403    %Docstring
404        GetLabelEditor() -> wx.TextCtrl
405
406        Returns currently active label editor, NULL if none.
407    %End
408
409    wxWindow * GetPanel();
410    %Docstring
411        GetPanel() -> wx.Window
412
413        Returns wxWindow that the properties are painted on, and which should
414        be used as the parent for editor controls.
415    %End
416
417    wxColour GetCaptionBackgroundColour() const;
418    %Docstring
419        GetCaptionBackgroundColour() -> wx.Colour
420
421        Returns current category caption background colour.
422    %End
423
424    wxFont & GetCaptionFont();
425    %Docstring
426        GetCaptionFont() -> wx.Font
427
428        Returns current category caption font.
429    %End
430
431    wxColour GetCaptionForegroundColour() const;
432    %Docstring
433        GetCaptionForegroundColour() -> wx.Colour
434
435        Returns current category caption text colour.
436    %End
437
438    wxColour GetCellBackgroundColour() const;
439    %Docstring
440        GetCellBackgroundColour() -> wx.Colour
441
442        Returns current cell background colour.
443    %End
444
445    wxColour GetCellDisabledTextColour() const;
446    %Docstring
447        GetCellDisabledTextColour() -> wx.Colour
448
449        Returns current cell text colour when disabled.
450    %End
451
452    wxColour GetCellTextColour() const;
453    %Docstring
454        GetCellTextColour() -> wx.Colour
455
456        Returns current cell text colour.
457    %End
458
459    unsigned int GetColumnCount() const;
460    %Docstring
461        GetColumnCount() -> unsignedint
462
463        Returns number of columns currently on grid.
464    %End
465
466    wxColour GetEmptySpaceColour() const;
467    %Docstring
468        GetEmptySpaceColour() -> wx.Colour
469
470        Returns colour of empty space below properties.
471    %End
472
473    int GetFontHeight() const;
474    %Docstring
475        GetFontHeight() -> int
476
477        Returns height of highest characters of used font.
478    %End
479
480    wxPropertyGrid * GetGrid();
481    %Docstring
482        GetGrid() -> PropertyGrid
483
484        Returns pointer to itself.
485    %End
486
487    wxRect GetImageRect(
488        wxPGProperty * property,
489        int item
490    ) const;
491    %Docstring
492        GetImageRect(property, item) -> wx.Rect
493
494        Returns rectangle of custom paint image.
495    %End
496
497    wxSize GetImageSize(
498        wxPGProperty * property = NULL,
499        int item = -1
500    ) const;
501    %Docstring
502        GetImageSize(property=None, item=-1) -> wx.Size
503
504        Returns size of the custom paint image in front of property.
505    %End
506
507    wxPGProperty * GetLastItem(
508        int flags = wxPG_ITERATE_DEFAULT
509    );
510    %Docstring
511        GetLastItem(flags=PG_ITERATE_DEFAULT) -> PGProperty
512
513        Returns last item which could be iterated using given flags.
514    %End
515
516    wxColour GetLineColour() const;
517    %Docstring
518        GetLineColour() -> wx.Colour
519
520        Returns colour of lines between cells.
521    %End
522
523    wxColour GetMarginColour() const;
524    %Docstring
525        GetMarginColour() -> wx.Colour
526
527        Returns background colour of margin.
528    %End
529
530    wxPGProperty * GetRoot() const;
531    %Docstring
532        GetRoot() -> PGProperty
533
534        Returns "root property".
535    %End
536
537    int GetRowHeight() const;
538    %Docstring
539        GetRowHeight() -> int
540
541        Returns height of a single grid row (in pixels).
542    %End
543
544    wxPGProperty * GetSelectedProperty() const;
545    %Docstring
546        GetSelectedProperty() -> PGProperty
547
548        Returns currently selected property.
549    %End
550
551    wxPGProperty * GetSelection() const;
552    %Docstring
553        GetSelection() -> PGProperty
554
555        Returns currently selected property.
556    %End
557
558    wxColour GetSelectionBackgroundColour() const;
559    %Docstring
560        GetSelectionBackgroundColour() -> wx.Colour
561
562        Returns current selection background colour.
563    %End
564
565    wxColour GetSelectionForegroundColour() const;
566    %Docstring
567        GetSelectionForegroundColour() -> wx.Colour
568
569        Returns current selection text colour.
570    %End
571
572    int GetSplitterPosition(
573        unsigned int splitterIndex = 0
574    ) const;
575    %Docstring
576        GetSplitterPosition(splitterIndex=0) -> int
577
578        Returns current splitter x position.
579    %End
580
581    wxTextCtrl * GetEditorTextCtrl() const;
582    %Docstring
583        GetEditorTextCtrl() -> wx.TextCtrl
584
585        Returns wxTextCtrl active in currently selected property, if any.
586    %End
587
588    const wxPGCell & GetUnspecifiedValueAppearance() const;
589    %Docstring
590        GetUnspecifiedValueAppearance() -> PGCell
591
592        Returns current appearance of unspecified value cells.
593    %End
594
595    wxString GetUnspecifiedValueText(
596        int argFlags = 0
597    ) const;
598    %Docstring
599        GetUnspecifiedValueText(argFlags=0) -> String
600
601        Returns (visual) text representation of the unspecified property
602        value.
603    %End
604
605    int GetVerticalSpacing() const;
606    %Docstring
607        GetVerticalSpacing() -> int
608
609        Returns current vertical spacing.
610    %End
611
612    wxPropertyGridHitTestResult HitTest(
613        const wxPoint & pt
614    ) const;
615    %Docstring
616        HitTest(pt) -> PropertyGridHitTestResult
617
618        Returns information about arbitrary position in the grid.
619    %End
620
621    bool IsAnyModified() const;
622    %Docstring
623        IsAnyModified() -> bool
624
625        Returns true if any property has been modified by the user.
626    %End
627
628    bool IsEditorFocused() const;
629    %Docstring
630        IsEditorFocused() -> bool
631
632        Returns true if a property editor control has focus.
633    %End
634
635    bool IsFrozen() const;
636    %Docstring
637        IsFrozen() -> bool
638
639        Returns true if updating is frozen (ie.
640    %End
641
642    void MakeColumnEditable(
643        unsigned int column,
644        bool editable = true
645    );
646    %Docstring
647        MakeColumnEditable(column, editable=True)
648
649        Makes given column editable by user.
650    %End
651
652    void OnTLPChanging(
653        wxWindow * newTLP
654    );
655    %Docstring
656        OnTLPChanging(newTLP)
657
658        It is recommended that you call this function any time your code
659        causes wxPropertyGrid's top-level parent to change.
660    %End
661
662    void RefreshEditor();
663    %Docstring
664        RefreshEditor()
665
666        Refreshes any active editor control.
667    %End
668
669    void RefreshProperty(
670        wxPGProperty * p
671    );
672    %Docstring
673        RefreshProperty(p)
674
675        Redraws given property.
676    %End
677
678    void ResetColours();
679    %Docstring
680        ResetColours()
681
682        Resets all colours to the original system values.
683    %End
684
685    void ResetColumnSizes(
686        bool enableAutoResizing = false
687    );
688    %Docstring
689        ResetColumnSizes(enableAutoResizing=False)
690
691        Resets column sizes and splitter positions, based on proportions.
692    %End
693
694    bool RemoveFromSelection(
695        const wxPGPropArgCls & id
696    );
697    %Docstring
698        RemoveFromSelection(id) -> bool
699
700        Removes given property from selection.
701    %End
702
703    bool SelectProperty(
704        const wxPGPropArgCls & id,
705        bool focus = false
706    );
707    %Docstring
708        SelectProperty(id, focus=False) -> bool
709
710        Selects a property.
711    %End
712
713    void SetCaptionBackgroundColour(
714        const wxColour & col
715    );
716    %Docstring
717        SetCaptionBackgroundColour(col)
718
719        Sets category caption background colour.
720    %End
721
722    void SetCaptionTextColour(
723        const wxColour & col
724    );
725    %Docstring
726        SetCaptionTextColour(col)
727
728        Sets category caption text colour.
729    %End
730
731    void SetCellBackgroundColour(
732        const wxColour & col
733    );
734    %Docstring
735        SetCellBackgroundColour(col)
736
737        Sets default cell background colour - applies to property cells.
738    %End
739
740    void SetCellDisabledTextColour(
741        const wxColour & col
742    );
743    %Docstring
744        SetCellDisabledTextColour(col)
745
746        Sets cell text colour for disabled properties.
747    %End
748
749    void SetCellTextColour(
750        const wxColour & col
751    );
752    %Docstring
753        SetCellTextColour(col)
754
755        Sets default cell text colour - applies to property name and value
756        text.
757    %End
758
759    void SetColumnCount(
760        int colCount
761    );
762    %Docstring
763        SetColumnCount(colCount)
764
765        Set number of columns (2 or more).
766    %End
767
768    void SetCurrentCategory(
769        const wxPGPropArgCls & id
770    );
771    %Docstring
772        SetCurrentCategory(id)
773
774        Sets the 'current' category - Append will add non-category properties
775        under it.
776    %End
777
778    void SetEmptySpaceColour(
779        const wxColour & col
780    );
781    %Docstring
782        SetEmptySpaceColour(col)
783
784        Sets colour of empty space below properties.
785    %End
786
787    void SetLineColour(
788        const wxColour & col
789    );
790    %Docstring
791        SetLineColour(col)
792
793        Sets colour of lines between cells.
794    %End
795
796    void SetMarginColour(
797        const wxColour & col
798    );
799    %Docstring
800        SetMarginColour(col)
801
802        Sets background colour of margin.
803    %End
804
805    void SetSelection(
806        const wxArrayPGProperty & newSelection
807    );
808    %Docstring
809        SetSelection(newSelection)
810
811        Set entire new selection from given list of properties.
812    %End
813
814    void SetSelectionBackgroundColour(
815        const wxColour & col
816    );
817    %Docstring
818        SetSelectionBackgroundColour(col)
819
820        Sets selection background colour - applies to selected property name
821        background.
822    %End
823
824    void SetSelectionTextColour(
825        const wxColour & col
826    );
827    %Docstring
828        SetSelectionTextColour(col)
829
830        Sets selection foreground colour - applies to selected property name
831        text.
832    %End
833
834    void SetSplitterPosition(
835        int newxpos,
836        int col = 0
837    );
838    %Docstring
839        SetSplitterPosition(newxpos, col=0)
840
841        Sets x coordinate of the splitter.
842    %End
843
844    void SetSplitterLeft(
845        bool privateChildrenToo = false
846    );
847    %Docstring
848        SetSplitterLeft(privateChildrenToo=False)
849
850        Moves splitter as left as possible, while still allowing all labels to
851        be shown in full.
852    %End
853
854    void SetUnspecifiedValueAppearance(
855        const wxPGCell & cell
856    );
857    %Docstring
858        SetUnspecifiedValueAppearance(cell)
859
860        Sets appearance of value cells representing an unspecified property
861        value.
862    %End
863
864    void SetVerticalSpacing(
865        int vspacing
866    );
867    %Docstring
868        SetVerticalSpacing(vspacing)
869
870        Sets vertical spacing.
871    %End
872
873    static
874    void AutoGetTranslation(
875        bool enable
876    );
877    %Docstring
878        AutoGetTranslation(enable)
879
880        This static function enables or disables automatic use of
881        wxGetTranslation() for following strings: wxEnumProperty list labels,
882        wxFlagsProperty child property labels.
883    %End
884
885    static
886    wxPGEditor * RegisterEditorClass(
887        wxPGEditor * editor   /Transfer/,
888        bool noDefCheck = false
889    );
890    %Docstring
891        RegisterEditorClass(editor, noDefCheck=False) -> PGEditor
892
893        Forwards to DoRegisterEditorClass with empty name.
894    %End
895
896    static
897    wxPGEditor * DoRegisterEditorClass(
898        wxPGEditor * editor   /Transfer/,
899        const wxString & name,
900        bool noDefCheck = false
901    );
902    %Docstring
903        DoRegisterEditorClass(editor, name, noDefCheck=False) -> PGEditor
904
905        Registers a new editor class.
906    %End
907
908    public:
909    virtual wxPoint GetClientAreaOrigin() const;
910    virtual bool Validate();
911    virtual bool TransferDataToWindow();
912    virtual bool TransferDataFromWindow();
913    virtual void InitDialog();
914    virtual bool AcceptsFocus() const;
915    virtual bool AcceptsFocusRecursively() const;
916    virtual bool AcceptsFocusFromKeyboard() const;
917    virtual void AddChild( wxWindowBase *child );
918    virtual void RemoveChild( wxWindowBase *child );
919    virtual void InheritAttributes();
920    virtual bool ShouldInheritColours() const;
921    virtual void OnInternalIdle();
922    virtual wxWindow *GetMainWindowOfCompositeControl();
923    virtual bool InformFirstDirection(int direction, int size, int availableOtherDir);
924    virtual void SetCanFocus(bool canFocus);
925    virtual bool Destroy();
926    virtual void SetValidator( const wxValidator &validator );
927    virtual wxValidator* GetValidator();
928
929
930    protected:
931    virtual bool ProcessEvent(wxEvent & event);
932    virtual void DoEnable(bool enable);
933    virtual void DoGetPosition(int *x, int *y) const;
934    virtual void DoGetSize(int *width, int *height) const;
935    virtual void DoGetClientSize(int *width, int *height) const;
936    virtual wxSize DoGetBestSize() const;
937    virtual wxSize DoGetBestClientSize() const;
938    virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
939    virtual void DoSetClientSize(int width, int height);
940    virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH );
941    virtual wxSize DoGetBorderSize() const;
942    virtual void DoMoveWindow(int x, int y, int width, int height);
943    virtual void DoSetWindowVariant( wxWindowVariant variant);
944    virtual wxBorder GetDefaultBorder() const;
945    virtual wxBorder GetDefaultBorderForControl() const;
946    virtual void DoFreeze();
947    virtual void DoThaw();
948    virtual bool HasTransparentBackground();
949    virtual bool TryBefore(wxEvent& event);
950    virtual bool TryAfter(wxEvent& event);
951
952
953    public:
954
955
956    static
957    wxVisualAttributes GetClassDefaultAttributes(
958        wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL
959    );
960    %Docstring
961        GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes
962    %End
963    %PreMethodCode
964        if (!wxPyCheckForApp()) return NULL;
965    %End
966
967    public:
968
969
970    %Property(name=CaptionBackgroundColour, get=GetCaptionBackgroundColour, set=SetCaptionBackgroundColour)
971    %Property(name=CaptionFont, get=GetCaptionFont)
972    %Property(name=CaptionForegroundColour, get=GetCaptionForegroundColour)
973    %Property(name=CellBackgroundColour, get=GetCellBackgroundColour, set=SetCellBackgroundColour)
974    %Property(name=CellDisabledTextColour, get=GetCellDisabledTextColour, set=SetCellDisabledTextColour)
975    %Property(name=CellTextColour, get=GetCellTextColour, set=SetCellTextColour)
976    %Property(name=ColumnCount, get=GetColumnCount, set=SetColumnCount)
977    %Property(name=EditorTextCtrl, get=GetEditorTextCtrl)
978    %Property(name=EmptySpaceColour, get=GetEmptySpaceColour, set=SetEmptySpaceColour)
979    %Property(name=FontHeight, get=GetFontHeight)
980    %Property(name=Grid, get=GetGrid)
981    %Property(name=ImageSize, get=GetImageSize)
982    %Property(name=LabelEditor, get=GetLabelEditor)
983    %Property(name=LastItem, get=GetLastItem)
984    %Property(name=LineColour, get=GetLineColour, set=SetLineColour)
985    %Property(name=MarginColour, get=GetMarginColour, set=SetMarginColour)
986    %Property(name=Panel, get=GetPanel)
987    %Property(name=Root, get=GetRoot)
988    %Property(name=RowHeight, get=GetRowHeight)
989    %Property(name=SelectedProperty, get=GetSelectedProperty)
990    %Property(name=Selection, get=GetSelection, set=SetSelection)
991    %Property(name=SelectionBackgroundColour, get=GetSelectionBackgroundColour, set=SetSelectionBackgroundColour)
992    %Property(name=SelectionForegroundColour, get=GetSelectionForegroundColour)
993    %Property(name=SplitterPosition, get=GetSplitterPosition, set=SetSplitterPosition)
994    %Property(name=StatusBar, get=GetStatusBar)
995    %Property(name=UncommittedPropertyValue, get=GetUncommittedPropertyValue)
996    %Property(name=UnspecifiedValueAppearance, get=GetUnspecifiedValueAppearance, set=SetUnspecifiedValueAppearance)
997    %Property(name=UnspecifiedValueText, get=GetUnspecifiedValueText)
998    %Property(name=VerticalSpacing, get=GetVerticalSpacing, set=SetVerticalSpacing)
999};  // end of class wxPropertyGrid
1000
1001
1002%Extract(id=pycode_propgrid)
1003_PropertyGrid__init__orig = PropertyGrid.__init__
1004def _PropertyGrid__init__(self, *args, **kw):
1005    _PropertyGrid__init__orig(self, *args, **kw)
1006    self.DoDefaultTypeMappings()
1007    self.edited_objects = {}
1008    self.DoDefaultValueTypeMappings()
1009    if not hasattr(self.__class__, '_vt2setter'):
1010        self.__class__._vt2setter = {}
1011PropertyGrid.__init__ = _PropertyGrid__init__
1012
1013%End
1014
1015class wxPropertyGridEvent : wxCommandEvent
1016{
1017    %Docstring
1018        PropertyGridEvent(commandType=0, id=0)
1019        PropertyGridEvent(event)
1020
1021        A property grid event holds information about events associated with
1022        wxPropertyGrid objects.
1023    %End
1024    %TypeHeaderCode
1025        #include <wx/propgrid/propgrid.h>
1026    %End
1027
1028public:
1029    wxPropertyGridEvent(
1030        wxEventType commandType = 0,
1031        int id = 0
1032    );
1033
1034    wxPropertyGridEvent(
1035        const wxPropertyGridEvent & event
1036    );
1037
1038    ~wxPropertyGridEvent();
1039
1040    bool CanVeto() const;
1041    %Docstring
1042        CanVeto() -> bool
1043
1044        Returns true if you can veto the action that the event is signaling.
1045    %End
1046
1047    unsigned int GetColumn() const;
1048    %Docstring
1049        GetColumn() -> unsignedint
1050
1051        Returns the column index associated with this event.
1052    %End
1053
1054    wxPGProperty * GetMainParent() const;
1055    %Docstring
1056        GetMainParent() -> PGProperty
1057
1058        Returns highest level non-category, non-root parent of property for
1059        which event occurred.
1060    %End
1061
1062    wxPGProperty * GetProperty() const;
1063    %Docstring
1064        GetProperty() -> PGProperty
1065
1066        Returns property associated with this event.
1067    %End
1068
1069    wxPGVFBFlags GetValidationFailureBehavior() const;
1070    %Docstring
1071        GetValidationFailureBehavior() -> PGVFBFlags
1072
1073        Returns current validation failure flags.
1074    %End
1075
1076    wxString GetPropertyName() const;
1077    %Docstring
1078        GetPropertyName() -> String
1079
1080        Returns name of the associated property.
1081    %End
1082
1083    wxPGVariant GetPropertyValue() const;
1084    %Docstring
1085        GetPropertyValue() -> PGVariant
1086
1087        Returns value of the associated property.
1088    %End
1089
1090    void SetCanVeto(
1091        bool canVeto
1092    );
1093    %Docstring
1094        SetCanVeto(canVeto)
1095
1096        Set if event can be vetoed.
1097    %End
1098
1099    void SetProperty(
1100        wxPGProperty * p
1101    );
1102    %Docstring
1103        SetProperty(p)
1104
1105        Changes the property associated with this event.
1106    %End
1107
1108    void SetValidationFailureBehavior(
1109        wxPGVFBFlags flags
1110    );
1111    %Docstring
1112        SetValidationFailureBehavior(flags)
1113
1114        Set override validation failure behaviour.
1115    %End
1116
1117    void SetValidationFailureMessage(
1118        const wxString & message
1119    );
1120    %Docstring
1121        SetValidationFailureMessage(message)
1122
1123        Sets custom failure message for this time only.
1124    %End
1125
1126    void Veto(
1127        bool veto = true
1128    );
1129    %Docstring
1130        Veto(veto=True)
1131
1132        Call this from your event handler to veto action that the event is
1133        signaling.
1134    %End
1135
1136    bool WasVetoed() const;
1137    %Docstring
1138        WasVetoed() -> bool
1139
1140        Returns true if event was vetoed.
1141    %End
1142
1143    public:
1144    virtual wxEvent* Clone() const /Factory/;
1145
1146
1147    private:
1148        wxPropertyGridEvent& operator=(const wxPropertyGridEvent&);
1149
1150
1151    public:
1152
1153
1154    %Property(name=Column, get=GetColumn)
1155    %Property(name=MainParent, get=GetMainParent)
1156    %Property(name=Property, get=GetProperty, set=SetProperty)
1157    %Property(name=PropertyName, get=GetPropertyName)
1158    %Property(name=PropertyValue, get=GetPropertyValue)
1159    %Property(name=ValidationFailureBehavior, get=GetValidationFailureBehavior, set=SetValidationFailureBehavior)
1160};  // end of class wxPropertyGridEvent
1161
1162
1163%Extract(id=pycode_propgrid)
1164EVT_PG_CHANGED = wx.PyEventBinder( wxEVT_PG_CHANGED, 1 )
1165EVT_PG_CHANGING = wx.PyEventBinder( wxEVT_PG_CHANGING, 1 )
1166EVT_PG_SELECTED = wx.PyEventBinder( wxEVT_PG_SELECTED, 1 )
1167EVT_PG_HIGHLIGHTED = wx.PyEventBinder( wxEVT_PG_HIGHLIGHTED, 1 )
1168EVT_PG_RIGHT_CLICK = wx.PyEventBinder( wxEVT_PG_RIGHT_CLICK, 1 )
1169EVT_PG_PAGE_CHANGED = wx.PyEventBinder( wxEVT_PG_PAGE_CHANGED, 1 )
1170EVT_PG_ITEM_COLLAPSED = wx.PyEventBinder( wxEVT_PG_ITEM_COLLAPSED, 1 )
1171EVT_PG_ITEM_EXPANDED = wx.PyEventBinder( wxEVT_PG_ITEM_EXPANDED, 1 )
1172EVT_PG_DOUBLE_CLICK = wx.PyEventBinder( wxEVT_PG_DOUBLE_CLICK, 1 )
1173EVT_PG_LABEL_EDIT_BEGIN = wx.PyEventBinder( wxEVT_PG_LABEL_EDIT_BEGIN, 1 )
1174EVT_PG_LABEL_EDIT_ENDING = wx.PyEventBinder( wxEVT_PG_LABEL_EDIT_ENDING, 1 )
1175EVT_PG_COL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_PG_COL_BEGIN_DRAG, 1 )
1176EVT_PG_COL_DRAGGING = wx.PyEventBinder( wxEVT_PG_COL_DRAGGING, 1 )
1177EVT_PG_COL_END_DRAG = wx.PyEventBinder( wxEVT_PG_COL_END_DRAG, 1 )
1178
1179%End
1180
1181        enum {
1182            wxPG_SUBID1,
1183            wxPG_SUBID2,
1184            wxPG_SUBID_TEMP1,
1185        };
1186
1187
1188
1189//---------------------------------------------------------------------------
1190
1191