From dba7934c9d1b520ff7b48cd0d80cc52f8be6a052 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 16 Sep 2006 18:12:37 +0000 Subject: [PATCH] added more properties git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_cmndlgs.i | 2 +- wxPython/src/_dataobj.i | 1 + wxPython/src/_display.i | 4 ++++ wxPython/src/_event.i | 7 +++++++ wxPython/src/_validator.i | 1 + wxPython/src/_vscroll.i | 13 +++++++++++++ wxPython/src/gtk/_core.py | 7 +++++++ wxPython/src/gtk/_misc.py | 4 ++++ wxPython/src/gtk/_windows.py | 13 ++++++++++++- wxPython/src/mac/_core.py | 7 +++++++ wxPython/src/mac/_misc.py | 4 ++++ wxPython/src/mac/_windows.py | 13 ++++++++++++- wxPython/src/msw/_core.py | 7 +++++++ wxPython/src/msw/_misc.py | 4 ++++ wxPython/src/msw/_windows.py | 13 ++++++++++++- 15 files changed, 96 insertions(+), 4 deletions(-) diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index ac40159bad..0d4f248359 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -827,7 +827,7 @@ boolean values, ``(continue, skip)`` where ``continue`` is ``True`` unless the Cancel button has been pressed, and ``skip`` is ``False`` unless the Skip button (if any) has been pressed. -If the ``continue`` return value is ``false``, the application can either +If the ``continue`` return value is ``False``, the application can either immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. ", ""); diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index aa34db08a5..a0c3428c20 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -837,6 +837,7 @@ public: void , SetURL(const wxString& url), "Set the URL.", ""); + %property(URL, GetURL, SetURL, doc="See `GetURL` and `SetURL`"); }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/_display.i b/wxPython/src/_display.i index fb8433d933..95496984e5 100644 --- a/wxPython/src/_display.i +++ b/wxPython/src/_display.i @@ -72,6 +72,10 @@ means unspecified/known", ""); // refresh frequency in Hz, 0 means unspecified/unknown int refresh; + + %property(Depth, GetDepth, doc="See `GetDepth`"); + %property(Height, GetHeight, doc="See `GetHeight`"); + %property(Width, GetWidth, doc="See `GetWidth`"); }; diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index c070cf5188..f90a8495ed 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -2164,6 +2164,10 @@ The mode may be one of the following values: all windows, or only to those which specify that they will process the events.", ""); + %property(Checked, GetChecked, Check, doc="See `GetChecked`"); + %property(Enabled, GetEnabled, Enable, doc="See `GetEnabled`"); + %property(Shown, GetShown, Show, doc="See `GetShown`"); + %property(Text, GetText, SetText, doc="See `GetText` and `SetText`"); }; //--------------------------------------------------------------------------- @@ -2406,6 +2410,7 @@ public: wxWindow *, GetWindow() const, "Returns the window that this event refers to.", ""); + %property(Window, GetWindow, doc="See `GetWindow`"); }; @@ -2427,6 +2432,8 @@ public: DocDeclStr( wxWindow *, GetWindow() const, "Returns the window that this event refers to.", ""); + + %property(Window, GetWindow, doc="See `GetWindow`"); }; diff --git a/wxPython/src/_validator.i b/wxPython/src/_validator.i index 1d36c338de..4c72e8b05a 100644 --- a/wxPython/src/_validator.i +++ b/wxPython/src/_validator.i @@ -63,6 +63,7 @@ public: static bool IsSilent(); static void SetBellOnError(int doIt = true); + %property(Window, GetWindow, SetWindow, doc="See `GetWindow` and `SetWindow`"); }; diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index f1d3b7705f..c6523aedc1 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -220,6 +220,12 @@ public: // get the total height of the lines between lineMin (inclusive) and // lineMax (exclusive) wxCoord GetLinesHeight(size_t lineMin, size_t lineMax) const; + + %property(FirstVisibleLine, GetFirstVisibleLine, doc="See `GetFirstVisibleLine`"); + %property(LastVisibleLine, GetLastVisibleLine, doc="See `GetLastVisibleLine`"); + %property(LineCount, GetLineCount, SetLineCount, doc="See `GetLineCount` and `SetLineCount`"); + %property(VisibleBegin, GetVisibleBegin, doc="See `GetVisibleBegin`"); + %property(VisibleEnd, GetVisibleEnd, doc="See `GetVisibleEnd`"); }; @@ -465,6 +471,13 @@ public: virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; + + %property(FirstSelected, GetFirstSelected, doc="See `GetFirstSelected`"); + %property(ItemCount, GetItemCount, SetItemCount, doc="See `GetItemCount` and `SetItemCount`"); + %property(Margins, GetMargins, SetMargins, doc="See `GetMargins` and `SetMargins`"); + %property(SelectedCount, GetSelectedCount, doc="See `GetSelectedCount`"); + %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`"); + %property(SelectionBackground, GetSelectionBackground, SetSelectionBackground, doc="See `GetSelectionBackground` and `SetSelectionBackground`"); }; diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 3c6f4141ab..6bb56cd99b 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -5876,6 +5876,10 @@ class UpdateUIEvent(CommandEvent): return _core_.UpdateUIEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) + Checked = property(GetChecked,Check,doc="See `GetChecked`") + Enabled = property(GetEnabled,Enable,doc="See `GetEnabled`") + Shown = property(GetShown,Show,doc="See `GetShown`") + Text = property(GetText,SetText,doc="See `GetText` and `SetText`") _core_.UpdateUIEvent_swigregister(UpdateUIEvent) def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): @@ -6280,6 +6284,7 @@ class WindowCreateEvent(CommandEvent): """ return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) + Window = property(GetWindow,doc="See `GetWindow`") _core_.WindowCreateEvent_swigregister(WindowCreateEvent) class WindowDestroyEvent(CommandEvent): @@ -6319,6 +6324,7 @@ class WindowDestroyEvent(CommandEvent): """ return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) + Window = property(GetWindow,doc="See `GetWindow`") _core_.WindowDestroyEvent_swigregister(WindowDestroyEvent) #--------------------------------------------------------------------------- @@ -10218,6 +10224,7 @@ class Validator(EvtHandler): return _core_.Validator_SetBellOnError(*args, **kwargs) SetBellOnError = staticmethod(SetBellOnError) + Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`") _core_.Validator_swigregister(Validator) def Validator_IsSilent(*args): diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index 14adc5847f..c564c231bb 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -5216,6 +5216,7 @@ class URLDataObject(DataObject): """ return _misc_.URLDataObject_SetURL(*args, **kwargs) + URL = property(GetURL,SetURL,doc="See `GetURL` and `SetURL`") _misc_.URLDataObject_swigregister(URLDataObject) class MetafileDataObject(DataObjectSimple): @@ -5777,6 +5778,9 @@ class VideoMode(object): h = property(_misc_.VideoMode_h_get, _misc_.VideoMode_h_set) bpp = property(_misc_.VideoMode_bpp_get, _misc_.VideoMode_bpp_set) refresh = property(_misc_.VideoMode_refresh_get, _misc_.VideoMode_refresh_set) + Depth = property(GetDepth,doc="See `GetDepth`") + Height = property(GetHeight,doc="See `GetHeight`") + Width = property(GetWidth,doc="See `GetWidth`") _misc_.VideoMode_swigregister(VideoMode) class Display(object): diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index fea11d0686..4e63144f83 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -1884,6 +1884,11 @@ class VScrolledWindow(Panel): """GetLinesHeight(self, size_t lineMin, size_t lineMax) -> int""" return _windows_.VScrolledWindow_GetLinesHeight(*args, **kwargs) + FirstVisibleLine = property(GetFirstVisibleLine,doc="See `GetFirstVisibleLine`") + LastVisibleLine = property(GetLastVisibleLine,doc="See `GetLastVisibleLine`") + LineCount = property(GetLineCount,SetLineCount,doc="See `GetLineCount` and `SetLineCount`") + VisibleBegin = property(GetVisibleBegin,doc="See `GetVisibleBegin`") + VisibleEnd = property(GetVisibleEnd,doc="See `GetVisibleEnd`") _windows_.VScrolledWindow_swigregister(VScrolledWindow) def PreVScrolledWindow(*args, **kwargs): @@ -2006,6 +2011,12 @@ class VListBox(VScrolledWindow): """OnDrawBackground(self, DC dc, Rect rect, size_t n)""" return _windows_.VListBox_OnDrawBackground(*args, **kwargs) + FirstSelected = property(GetFirstSelected,doc="See `GetFirstSelected`") + ItemCount = property(GetItemCount,SetItemCount,doc="See `GetItemCount` and `SetItemCount`") + Margins = property(GetMargins,SetMargins,doc="See `GetMargins` and `SetMargins`") + SelectedCount = property(GetSelectedCount,doc="See `GetSelectedCount`") + Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`") + SelectionBackground = property(GetSelectionBackground,SetSelectionBackground,doc="See `GetSelectionBackground` and `SetSelectionBackground`") _windows_.VListBox_swigregister(VListBox) VListBoxNameStr = cvar.VListBoxNameStr @@ -2877,7 +2888,7 @@ class ProgressDialog(Frame): unless the Cancel button has been pressed, and ``skip`` is ``False`` unless the Skip button (if any) has been pressed. - If the ``continue`` return value is ``false``, the application can either + If the ``continue`` return value is ``False``, the application can either immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 3c6f4141ab..6bb56cd99b 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -5876,6 +5876,10 @@ class UpdateUIEvent(CommandEvent): return _core_.UpdateUIEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) + Checked = property(GetChecked,Check,doc="See `GetChecked`") + Enabled = property(GetEnabled,Enable,doc="See `GetEnabled`") + Shown = property(GetShown,Show,doc="See `GetShown`") + Text = property(GetText,SetText,doc="See `GetText` and `SetText`") _core_.UpdateUIEvent_swigregister(UpdateUIEvent) def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): @@ -6280,6 +6284,7 @@ class WindowCreateEvent(CommandEvent): """ return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) + Window = property(GetWindow,doc="See `GetWindow`") _core_.WindowCreateEvent_swigregister(WindowCreateEvent) class WindowDestroyEvent(CommandEvent): @@ -6319,6 +6324,7 @@ class WindowDestroyEvent(CommandEvent): """ return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) + Window = property(GetWindow,doc="See `GetWindow`") _core_.WindowDestroyEvent_swigregister(WindowDestroyEvent) #--------------------------------------------------------------------------- @@ -10218,6 +10224,7 @@ class Validator(EvtHandler): return _core_.Validator_SetBellOnError(*args, **kwargs) SetBellOnError = staticmethod(SetBellOnError) + Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`") _core_.Validator_swigregister(Validator) def Validator_IsSilent(*args): diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index c2e981778b..0235fec37b 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -5216,6 +5216,7 @@ class URLDataObject(DataObject): """ return _misc_.URLDataObject_SetURL(*args, **kwargs) + URL = property(GetURL,SetURL,doc="See `GetURL` and `SetURL`") _misc_.URLDataObject_swigregister(URLDataObject) class MetafileDataObject(DataObjectSimple): @@ -5785,6 +5786,9 @@ class VideoMode(object): h = property(_misc_.VideoMode_h_get, _misc_.VideoMode_h_set) bpp = property(_misc_.VideoMode_bpp_get, _misc_.VideoMode_bpp_set) refresh = property(_misc_.VideoMode_refresh_get, _misc_.VideoMode_refresh_set) + Depth = property(GetDepth,doc="See `GetDepth`") + Height = property(GetHeight,doc="See `GetHeight`") + Width = property(GetWidth,doc="See `GetWidth`") _misc_.VideoMode_swigregister(VideoMode) class Display(object): diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index cc0b036c7c..82e6f18799 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -1864,6 +1864,11 @@ class VScrolledWindow(Panel): """GetLinesHeight(self, size_t lineMin, size_t lineMax) -> int""" return _windows_.VScrolledWindow_GetLinesHeight(*args, **kwargs) + FirstVisibleLine = property(GetFirstVisibleLine,doc="See `GetFirstVisibleLine`") + LastVisibleLine = property(GetLastVisibleLine,doc="See `GetLastVisibleLine`") + LineCount = property(GetLineCount,SetLineCount,doc="See `GetLineCount` and `SetLineCount`") + VisibleBegin = property(GetVisibleBegin,doc="See `GetVisibleBegin`") + VisibleEnd = property(GetVisibleEnd,doc="See `GetVisibleEnd`") _windows_.VScrolledWindow_swigregister(VScrolledWindow) def PreVScrolledWindow(*args, **kwargs): @@ -1986,6 +1991,12 @@ class VListBox(VScrolledWindow): """OnDrawBackground(self, DC dc, Rect rect, size_t n)""" return _windows_.VListBox_OnDrawBackground(*args, **kwargs) + FirstSelected = property(GetFirstSelected,doc="See `GetFirstSelected`") + ItemCount = property(GetItemCount,SetItemCount,doc="See `GetItemCount` and `SetItemCount`") + Margins = property(GetMargins,SetMargins,doc="See `GetMargins` and `SetMargins`") + SelectedCount = property(GetSelectedCount,doc="See `GetSelectedCount`") + Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`") + SelectionBackground = property(GetSelectionBackground,SetSelectionBackground,doc="See `GetSelectionBackground` and `SetSelectionBackground`") _windows_.VListBox_swigregister(VListBox) VListBoxNameStr = cvar.VListBoxNameStr @@ -2857,7 +2868,7 @@ class ProgressDialog(Frame): unless the Cancel button has been pressed, and ``skip`` is ``False`` unless the Skip button (if any) has been pressed. - If the ``continue`` return value is ``false``, the application can either + If the ``continue`` return value is ``False``, the application can either immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 81b2f232bd..9135aa2849 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -5876,6 +5876,10 @@ class UpdateUIEvent(CommandEvent): return _core_.UpdateUIEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) + Checked = property(GetChecked,Check,doc="See `GetChecked`") + Enabled = property(GetEnabled,Enable,doc="See `GetEnabled`") + Shown = property(GetShown,Show,doc="See `GetShown`") + Text = property(GetText,SetText,doc="See `GetText` and `SetText`") _core_.UpdateUIEvent_swigregister(UpdateUIEvent) def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): @@ -6280,6 +6284,7 @@ class WindowCreateEvent(CommandEvent): """ return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) + Window = property(GetWindow,doc="See `GetWindow`") _core_.WindowCreateEvent_swigregister(WindowCreateEvent) class WindowDestroyEvent(CommandEvent): @@ -6319,6 +6324,7 @@ class WindowDestroyEvent(CommandEvent): """ return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) + Window = property(GetWindow,doc="See `GetWindow`") _core_.WindowDestroyEvent_swigregister(WindowDestroyEvent) #--------------------------------------------------------------------------- @@ -10222,6 +10228,7 @@ class Validator(EvtHandler): return _core_.Validator_SetBellOnError(*args, **kwargs) SetBellOnError = staticmethod(SetBellOnError) + Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`") _core_.Validator_swigregister(Validator) def Validator_IsSilent(*args): diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index c2e981778b..0235fec37b 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -5216,6 +5216,7 @@ class URLDataObject(DataObject): """ return _misc_.URLDataObject_SetURL(*args, **kwargs) + URL = property(GetURL,SetURL,doc="See `GetURL` and `SetURL`") _misc_.URLDataObject_swigregister(URLDataObject) class MetafileDataObject(DataObjectSimple): @@ -5785,6 +5786,9 @@ class VideoMode(object): h = property(_misc_.VideoMode_h_get, _misc_.VideoMode_h_set) bpp = property(_misc_.VideoMode_bpp_get, _misc_.VideoMode_bpp_set) refresh = property(_misc_.VideoMode_refresh_get, _misc_.VideoMode_refresh_set) + Depth = property(GetDepth,doc="See `GetDepth`") + Height = property(GetHeight,doc="See `GetHeight`") + Width = property(GetWidth,doc="See `GetWidth`") _misc_.VideoMode_swigregister(VideoMode) class Display(object): diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index 016d08db16..2eac3a7e22 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -1892,6 +1892,11 @@ class VScrolledWindow(Panel): """GetLinesHeight(self, size_t lineMin, size_t lineMax) -> int""" return _windows_.VScrolledWindow_GetLinesHeight(*args, **kwargs) + FirstVisibleLine = property(GetFirstVisibleLine,doc="See `GetFirstVisibleLine`") + LastVisibleLine = property(GetLastVisibleLine,doc="See `GetLastVisibleLine`") + LineCount = property(GetLineCount,SetLineCount,doc="See `GetLineCount` and `SetLineCount`") + VisibleBegin = property(GetVisibleBegin,doc="See `GetVisibleBegin`") + VisibleEnd = property(GetVisibleEnd,doc="See `GetVisibleEnd`") _windows_.VScrolledWindow_swigregister(VScrolledWindow) def PreVScrolledWindow(*args, **kwargs): @@ -2014,6 +2019,12 @@ class VListBox(VScrolledWindow): """OnDrawBackground(self, DC dc, Rect rect, size_t n)""" return _windows_.VListBox_OnDrawBackground(*args, **kwargs) + FirstSelected = property(GetFirstSelected,doc="See `GetFirstSelected`") + ItemCount = property(GetItemCount,SetItemCount,doc="See `GetItemCount` and `SetItemCount`") + Margins = property(GetMargins,SetMargins,doc="See `GetMargins` and `SetMargins`") + SelectedCount = property(GetSelectedCount,doc="See `GetSelectedCount`") + Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`") + SelectionBackground = property(GetSelectionBackground,SetSelectionBackground,doc="See `GetSelectionBackground` and `SetSelectionBackground`") _windows_.VListBox_swigregister(VListBox) VListBoxNameStr = cvar.VListBoxNameStr @@ -2885,7 +2896,7 @@ class ProgressDialog(Frame): unless the Cancel button has been pressed, and ``skip`` is ``False`` unless the Skip button (if any) has been pressed. - If the ``continue`` return value is ``false``, the application can either + If the ``continue`` return value is ``False``, the application can either immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. -- 2.45.2