From 41e2b43ea4fd82f188cf6f62b71c67bca8844ae9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 12 May 2004 02:07:04 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_controls.py | 963 ++++++++++++++------------------ wxPython/src/gtk/_core.py | 657 +++++++++------------- wxPython/src/gtk/_core_wrap.cpp | 2 +- wxPython/src/gtk/_gdi.py | 179 ++---- wxPython/src/gtk/_gdi_wrap.cpp | 46 +- wxPython/src/gtk/_misc.py | 317 +++-------- wxPython/src/gtk/_misc_wrap.cpp | 2 +- wxPython/src/gtk/_windows.py | 458 +++++---------- wxPython/src/gtk/calendar.py | 76 +-- wxPython/src/gtk/grid.py | 43 +- wxPython/src/gtk/grid_wrap.cpp | 10 +- wxPython/src/gtk/html.py | 28 +- 12 files changed, 1038 insertions(+), 1743 deletions(-) diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 8d9f184b8a..fbab293e26 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -18,29 +18,6 @@ class Button(_core.Control): A button is a control that contains a text string, and is one of the most common elements of a GUI. It may be placed on a dialog box or panel, or indeed almost any other window. - - Window Styles - ------------- - ============== ========================================== - wx.BU_LEFT Left-justifies the label. WIN32 only. - wx.BU_TOP Aligns the label to the top of the button. - WIN32 only. - wx.BU_RIGHT Right-justifies the bitmap label. WIN32 only. - wx.BU_BOTTOM Aligns the label to the bottom of the button. - WIN32 only. - wx.BU_EXACTFIT Creates the button as small as possible - instead of making it of the standard size - (which is the default behaviour.) - ============== ========================================== - - Events - ------ - ============ ========================================== - EVT_BUTTON Sent when the button is clicked. - ============ ========================================== - - :see: `wx.BitmapButton` - """ def __repr__(self): return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -89,15 +66,15 @@ class Button(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Button_GetClassDefaultAttributes(*args, **kwargs) @@ -134,15 +111,15 @@ def Button_GetClassDefaultAttributes(*args, **kwargs): """ Button_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Button_GetClassDefaultAttributes(*args, **kwargs) @@ -152,35 +129,6 @@ class BitmapButton(Button): single bitmap, and wxWidgets will draw all button states using this bitmap. If the application needs more control, additional bitmaps for the selected state, unpressed focused state, and greyed-out state may be supplied. - - Window Styles - ------------- - ============== ============================================= - wx.BU_AUTODRAW If this is specified, the button will be drawn - automatically using the label bitmap only, - providing a 3D-look border. If this style is - not specified, the button will be drawn - without borders and using all provided - bitmaps. WIN32 only. - wx.BU_LEFT Left-justifies the label. WIN32 only. - wx.BU_TOP Aligns the label to the top of the button. WIN32 - only. - wx.BU_RIGHT Right-justifies the bitmap label. WIN32 only. - wx.BU_BOTTOM Aligns the label to the bottom of the - button. WIN32 only. - wx.BU_EXACTFIT Creates the button as small as possible - instead of making it of the standard size - (which is the default behaviour.) - ============== ============================================= - - Events - ------ - =========== ================================== - EVT_BUTTON Sent when the button is clicked. - =========== ================================== - - :see: `wx.Button`, `wx.Bitmap` - """ def __repr__(self): return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -320,31 +268,6 @@ class CheckBox(_core.Control): wx.CHK_3STATE style flag is set) it can have a third state, called the mixed or undetermined state. Often this is used as a "Does Not Apply" state. - - Window Styles - ------------- - ================================= =============================== - wx.CHK_2STATE Create a 2-state checkbox. - This is the default. - wx.CHK_3STATE Create a 3-state checkbox. - wx.CHK_ALLOW_3RD_STATE_FOR_USER By default a user can't set a - 3-state checkbox to the - third state. It can only be - done from code. Using this - flags allows the user to set - the checkbox to the third - state by clicking. - wx.ALIGN_RIGHT Makes the - text appear on the left of - the checkbox. - ================================= =============================== - - Events - ------ - =============================== =============================== - EVT_CHECKBOX Sent when checkbox is clicked. - =============================== =============================== - """ def __repr__(self): return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -443,15 +366,15 @@ class CheckBox(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.CheckBox_GetClassDefaultAttributes(*args, **kwargs) @@ -479,15 +402,15 @@ def CheckBox_GetClassDefaultAttributes(*args, **kwargs): """ CheckBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.CheckBox_GetClassDefaultAttributes(*args, **kwargs) @@ -498,13 +421,6 @@ class Choice(_core.ControlWithItems): A Choice control is used to select one of a list of strings. Unlike a `wx.ListBox`, only the selection is visible until the user pulls down the menu of choices. - - Events - ------ - ================ ========================================== - EVT_CHOICE Sent when an item in the list is selected. - ================ ========================================== - """ def __repr__(self): return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -527,8 +443,6 @@ class Choice(_core.ControlWithItems): Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool - - Actually create the GUI Choice control for 2-phase creation """ return _controls_.Choice_Create(*args, **kwargs) @@ -561,15 +475,15 @@ class Choice(_core.ControlWithItems): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Choice_GetClassDefaultAttributes(*args, **kwargs) @@ -597,15 +511,15 @@ def Choice_GetClassDefaultAttributes(*args, **kwargs): """ Choice_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Choice_GetClassDefaultAttributes(*args, **kwargs) @@ -613,9 +527,12 @@ def Choice_GetClassDefaultAttributes(*args, **kwargs): class ComboBox(_core.Control,_core.ItemContainer): """ - A combobox is like a combination of an edit control and a listbox. It can be - displayed as static list with editable or read-only text field; or a drop-down - list with text field. + A combobox is like a combination of an edit control and a + listbox. It can be displayed as static list with editable or + read-only text field; or a drop-down list with text field. + + A combobox permits a single selection only. Combobox items are + numbered from zero. """ def __repr__(self): return "<%s.%s; proxy of C++ wxComboBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -623,8 +540,8 @@ class ComboBox(_core.Control,_core.ItemContainer): """ __init__(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, - List choices=[], long style=0, Validator validator=DefaultValidator, - String name=ComboBoxNameStr) -> ComboBox + List choices=[], long style=0, Validator validator=DefaultValidator, + String name=ComboBoxNameStr) -> ComboBox Constructor, creates and shows a ComboBox control. """ @@ -640,8 +557,6 @@ class ComboBox(_core.Control,_core.ItemContainer): Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool - - Actually create the GUI wxComboBox control for 2-phase creation """ return _controls_.ComboBox_Create(*args, **kwargs) @@ -770,15 +685,15 @@ class ComboBox(_core.Control,_core.ItemContainer): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs) @@ -806,15 +721,15 @@ def ComboBox_GetClassDefaultAttributes(*args, **kwargs): """ ComboBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs) @@ -889,15 +804,15 @@ class Gauge(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs) @@ -921,15 +836,15 @@ def Gauge_GetClassDefaultAttributes(*args, **kwargs): """ Gauge_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs) @@ -962,15 +877,15 @@ class StaticBox(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticBox_GetClassDefaultAttributes(*args, **kwargs) @@ -996,15 +911,15 @@ def StaticBox_GetClassDefaultAttributes(*args, **kwargs): """ StaticBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticBox_GetClassDefaultAttributes(*args, **kwargs) @@ -1046,15 +961,15 @@ class StaticLine(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticLine_GetClassDefaultAttributes(*args, **kwargs) @@ -1081,15 +996,15 @@ def StaticLine_GetClassDefaultAttributes(*args, **kwargs): """ StaticLine_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticLine_GetClassDefaultAttributes(*args, **kwargs) @@ -1122,15 +1037,15 @@ class StaticText(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticText_GetClassDefaultAttributes(*args, **kwargs) @@ -1153,15 +1068,15 @@ def StaticText_GetClassDefaultAttributes(*args, **kwargs): """ StaticText_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticText_GetClassDefaultAttributes(*args, **kwargs) @@ -1206,15 +1121,15 @@ class StaticBitmap(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticBitmap_GetClassDefaultAttributes(*args, **kwargs) @@ -1237,15 +1152,15 @@ def StaticBitmap_GetClassDefaultAttributes(*args, **kwargs): """ StaticBitmap_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.StaticBitmap_GetClassDefaultAttributes(*args, **kwargs) @@ -1280,7 +1195,7 @@ class ListBox(_core.ControlWithItems): """ Insert(self, String item, int pos, PyObject clientData=None) - Insert an item into the control before the item at the pos index, + Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. """ return _controls_.ListBox_Insert(*args, **kwargs) @@ -1361,15 +1276,15 @@ class ListBox(_core.ControlWithItems): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ListBox_GetClassDefaultAttributes(*args, **kwargs) @@ -1393,15 +1308,15 @@ def ListBox_GetClassDefaultAttributes(*args, **kwargs): """ ListBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ListBox_GetClassDefaultAttributes(*args, **kwargs) @@ -1724,11 +1639,7 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_IsMultiLine(*args, **kwargs) def GetSelection(*args, **kwargs): - """ - GetSelection() -> (from, to) - - If the return values from and to are the same, there is no selection. - """ + """GetSelection() -> (from, to)""" return _controls_.TextCtrl_GetSelection(*args, **kwargs) def GetStringSelection(*args, **kwargs): @@ -1808,13 +1719,7 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_ShowPosition(*args, **kwargs) def HitTest(*args, **kwargs): - """ - HitTest(Point pt) -> (result, row, col) - - Find the character at position given in pixels. - NB: pt is in device coords (not adjusted for the client area - origin nor scrolling) - """ + """HitTest(Point pt) -> (result, row, col)""" return _controls_.TextCtrl_HitTest(*args, **kwargs) def Copy(*args, **kwargs): @@ -1897,15 +1802,15 @@ class TextCtrl(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -1928,15 +1833,15 @@ def TextCtrl_GetClassDefaultAttributes(*args, **kwargs): """ TextCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -2036,18 +1941,6 @@ class ScrollBar(_core.Control): bool refresh=True) Sets the scrollbar properties of a built-in scrollbar. - - orientation: Determines the scrollbar whose page size is to be - set. May be wx.HORIZONTAL or wx.VERTICAL. - - position: The position of the scrollbar in scroll units. - - thumbSize: The size of the thumb, or visible portion of the - scrollbar, in scroll units. - - range: The maximum position of the scrollbar. - - refresh: True to redraw the scrollbar, false otherwise. """ return _controls_.ScrollBar_SetScrollbar(*args, **kwargs) @@ -2055,15 +1948,15 @@ class ScrollBar(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs) @@ -2087,15 +1980,15 @@ def ScrollBar_GetClassDefaultAttributes(*args, **kwargs): """ ScrollBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs) @@ -2164,15 +2057,15 @@ class SpinButton(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs) @@ -2197,15 +2090,15 @@ def SpinButton_GetClassDefaultAttributes(*args, **kwargs): """ SpinButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs) @@ -2266,15 +2159,15 @@ class SpinCtrl(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -2297,15 +2190,15 @@ def SpinCtrl_GetClassDefaultAttributes(*args, **kwargs): """ SpinCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -2428,15 +2321,15 @@ class RadioBox(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs) @@ -2461,15 +2354,15 @@ def RadioBox_GetClassDefaultAttributes(*args, **kwargs): """ RadioBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs) @@ -2510,15 +2403,15 @@ class RadioButton(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs) @@ -2541,15 +2434,15 @@ def RadioButton_GetClassDefaultAttributes(*args, **kwargs): """ RadioButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs) @@ -2669,15 +2562,15 @@ class Slider(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs) @@ -2701,15 +2594,15 @@ def Slider_GetClassDefaultAttributes(*args, **kwargs): """ Slider_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs) @@ -2761,15 +2654,15 @@ class ToggleButton(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs) @@ -2793,15 +2686,15 @@ def ToggleButton_GetClassDefaultAttributes(*args, **kwargs): """ ToggleButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs) @@ -2894,15 +2787,15 @@ class BookCtrl(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.BookCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -2920,15 +2813,15 @@ def BookCtrl_GetClassDefaultAttributes(*args, **kwargs): """ BookCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.BookCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -3014,11 +2907,7 @@ class Notebook(BookCtrl): return _controls_.Notebook_SetTabSize(*args, **kwargs) def HitTest(*args, **kwargs): - """ - HitTest(Point pt) -> (tab, where) - - Returns the tab which is hit, and flags indicating where using wx.NB_HITTEST_ flags. - """ + """HitTest(Point pt) -> (tab, where)""" return _controls_.Notebook_HitTest(*args, **kwargs) def CalcSizeFromPage(*args, **kwargs): @@ -3029,15 +2918,15 @@ class Notebook(BookCtrl): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs) @@ -3060,15 +2949,15 @@ def Notebook_GetClassDefaultAttributes(*args, **kwargs): """ Notebook_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs) @@ -3765,15 +3654,15 @@ class ToolBar(ToolBarBase): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs) @@ -3796,15 +3685,15 @@ def ToolBar_GetClassDefaultAttributes(*args, **kwargs): """ ToolBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs) @@ -4379,10 +4268,10 @@ class ListCtrl(_core.Control): """ SetWindowStyleFlag(self, long style) - Sets the style of the window. Please note that some styles cannot - be changed after the window creation and that Refresh() might - need to be called after changing the others for the change to - take place immediately. + Sets the style of the window. Please note that some styles cannot be + changed after the window creation and that Refresh() might need to be + called after changing the others for the change to take place + immediately. """ return _controls_.ListCtrl_SetWindowStyleFlag(*args, **kwargs) @@ -4463,12 +4352,7 @@ class ListCtrl(_core.Control): return _controls_.ListCtrl_FindItemAtPos(*args, **kwargs) def HitTest(*args, **kwargs): - """ - HitTest(Point point) -> (item, where) - - Determines which item (if any) is at the specified point, - giving details in the second return value (see wxLIST_HITTEST_... flags.) - """ + """HitTest(Point point) -> (item, where)""" return _controls_.ListCtrl_HitTest(*args, **kwargs) def InsertItem(*args, **kwargs): @@ -4593,15 +4477,15 @@ class ListCtrl(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -4624,15 +4508,15 @@ def ListCtrl_GetClassDefaultAttributes(*args, **kwargs): """ ListCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -5256,15 +5140,7 @@ class TreeCtrl(_core.Control): return _controls_.TreeCtrl_SortChildren(*args, **kwargs) def HitTest(*args, **kwargs): - """ - HitTest(Point point) -> (item, where) - - Determine which item (if any) belongs the given point. The - coordinates specified are relative to the client area of tree ctrl - and the where return value is set to a bitmask of wxTREE_HITTEST_xxx - constants. - - """ + """HitTest(Point point) -> (item, where)""" return _controls_.TreeCtrl_HitTest(*args, **kwargs) def GetBoundingRect(*args, **kwargs): @@ -5275,15 +5151,15 @@ class TreeCtrl(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -5306,15 +5182,15 @@ def TreeCtrl_GetClassDefaultAttributes(*args, **kwargs): """ TreeCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -5413,14 +5289,7 @@ class GenericDirCtrl(_core.Control): return _controls_.GenericDirCtrl_GetFilterListCtrl(*args, **kwargs) def FindChild(*args, **kwargs): - """ - FindChild(wxTreeItemId parentId, wxString path) -> (item, done) - - Find the child that matches the first part of 'path'. E.g. if a child path is - "/usr" and 'path' is "/usr/include" then the child for /usr is returned. - If the path string has been used (we're at the leaf), done is set to True - - """ + """FindChild(wxTreeItemId parentId, wxString path) -> (item, done)""" return _controls_.GenericDirCtrl_FindChild(*args, **kwargs) def DoResize(*args, **kwargs): @@ -5613,29 +5482,21 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) class HelpEvent(_core.CommandEvent): """ - A help event is sent when the user has requested - context-sensitive help. This can either be caused by the - application requesting context-sensitive help mode via - wx.ContextHelp, or (on MS Windows) by the system generating a - WM_HELP message when the user pressed F1 or clicked on the query - button in a dialog caption. - - A help event is sent to the window that the user clicked on, and - is propagated up the window hierarchy until the event is - processed or there are no more event handlers. The application - should call event.GetId to check the identity of the clicked-on - window, and then either show some suitable help or call - event.Skip if the identifier is unrecognised. Calling Skip is - important because it allows wxWindows to generate further events - for ancestors of the clicked-on window. Otherwise it would be - impossible to show help for container windows, since processing - would stop after the first window found. - - Events - EVT_HELP Sent when the user has requested context- - sensitive help. - EVT_HELP_RANGE Allows to catch EVT_HELP for a range of IDs - + A help event is sent when the user has requested context-sensitive + help. This can either be caused by the application requesting + context-sensitive help mode via wx.ContextHelp, or (on MS Windows) by + the system generating a WM_HELP message when the user pressed F1 or + clicked on the query button in a dialog caption. + + A help event is sent to the window that the user clicked on, and is + propagated up the window hierarchy until the event is processed or + there are no more event handlers. The application should call + event.GetId to check the identity of the clicked-on window, and then + either show some suitable help or call event.Skip if the identifier is + unrecognised. Calling Skip is important because it allows wxWindows to + generate further events for ancestors of the clicked-on + window. Otherwise it would be impossible to show help for container + windows, since processing would stop after the first window found. """ def __repr__(self): return "<%s.%s; proxy of C++ wxHelpEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -5705,25 +5566,26 @@ _controls_.HelpEvent_swigregister(HelpEventPtr) class ContextHelp(_core.Object): """ - This class changes the cursor to a query and puts the application - into a 'context-sensitive help mode'. When the user left-clicks - on a window within the specified window, a EVT_HELP event is sent - to that control, and the application may respond to it by popping - up some help. + This class changes the cursor to a query and puts the application into + a 'context-sensitive help mode'. When the user left-clicks on a window + within the specified window, a ``EVT_HELP`` event is sent to that + control, and the application may respond to it by popping up some + help. There are a couple of ways to invoke this behaviour implicitly: - * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a - dialog (Windows only). This will put a question mark in the - titlebar, and Windows will put the application into - context-sensitive help mode automatically, with further - programming. + * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a dialog + (Windows only). This will put a question mark in the titlebar, + and Windows will put the application into context-sensitive help + mode automatically, with further programming. + + * Create a `wx.ContextHelpButton`, whose predefined behaviour is + to create a context help object. Normally you will write your + application so that this button is only added to a dialog for + non-Windows platforms (use ``wx.DIALOG_EX_CONTEXTHELP`` on + Windows). - * Create a wx.ContextHelpButton, whose predefined behaviour - is to create a context help object. Normally you will write - your application so that this button is only added to a - dialog for non-Windows platforms (use - wx.DIALOG_EX_CONTEXTHELP on Windows). + :see: `wx.ContextHelpButton` """ def __repr__(self): @@ -5732,8 +5594,8 @@ class ContextHelp(_core.Object): """ __init__(self, Window window=None, bool doNow=True) -> ContextHelp - Constructs a context help object, calling BeginContextHelp if - doNow is true (the default). + Constructs a context help object, calling BeginContextHelp if doNow is + true (the default). If window is None, the top window is used. """ @@ -5751,13 +5613,13 @@ class ContextHelp(_core.Object): """ BeginContextHelp(self, Window window=None) -> bool - Puts the application into context-sensitive help mode. window is - the window which will be used to catch events; if NULL, the top - window will be used. + Puts the application into context-sensitive help mode. window is the + window which will be used to catch events; if NULL, the top window + will be used. Returns true if the application was successfully put into - context-sensitive help mode. This function only returns when the - event loop has finished. + context-sensitive help mode. This function only returns when the event + loop has finished. """ return _controls_.ContextHelp_BeginContextHelp(*args, **kwargs) @@ -5780,16 +5642,17 @@ _controls_.ContextHelp_swigregister(ContextHelpPtr) class ContextHelpButton(BitmapButton): """ - Instances of this class may be used to add a question mark button - that when pressed, puts the application into context-help - mode. It does this by creating a wx.ContextHelp object which - itself generates a EVT_HELP event when the user clicks on a - window. + Instances of this class may be used to add a question mark button that + when pressed, puts the application into context-help mode. It does + this by creating a wx.ContextHelp object which itself generates a + ``EVT_HELP`` event when the user clicks on a window. + + On Windows, you may add a question-mark icon to a dialog by use of the + ``wx.DIALOG_EX_CONTEXTHELP`` extra style, but on other platforms you + will have to add a button explicitly, usually next to OK, Cancel or + similar buttons. - On Windows, you may add a question-mark icon to a dialog by use - of the wx.DIALOG_EX_CONTEXTHELP extra style, but on other - platforms you will have to add a button explicitly, usually next - to OK, Cancel or similar buttons. + :see: `wx.ContextHelp`, `wx.ContextHelpButton` """ def __repr__(self): @@ -5831,10 +5694,9 @@ class HelpProvider(object): """ Set(HelpProvider helpProvider) -> HelpProvider - Sset the current, application-wide help provider. Returns the - previous one. Unlike some other classes, the help provider is - not created on demand. This must be explicitly done by the - application. + Sset the current, application-wide help provider. Returns the previous + one. Unlike some other classes, the help provider is not created on + demand. This must be explicitly done by the application. """ return _controls_.HelpProvider_Set(*args, **kwargs) @@ -5852,9 +5714,9 @@ class HelpProvider(object): """ GetHelp(self, Window window) -> String - Gets the help string for this window. Its interpretation is - dependent on the help provider except that empty string always - means that no help is associated with the window. + Gets the help string for this window. Its interpretation is dependent + on the help provider except that empty string always means that no + help is associated with the window. """ return _controls_.HelpProvider_GetHelp(*args, **kwargs) @@ -5863,10 +5725,8 @@ class HelpProvider(object): ShowHelp(self, Window window) -> bool Shows help for the given window. Uses GetHelp internally if - applicable. - - Returns true if it was done, or false if no help was available - for this window. + applicable. Returns True if it was done, or False if no help was + available for this window. """ return _controls_.HelpProvider_ShowHelp(*args, **kwargs) @@ -5883,8 +5743,8 @@ class HelpProvider(object): AddHelpById(self, int id, String text) This version associates the given text with all windows with this - id. May be used to set the same help string for all Cancel - buttons in the application, for example. + id. May be used to set the same help string for all Cancel buttons in + the application, for example. """ return _controls_.HelpProvider_AddHelpById(*args, **kwargs) @@ -5893,9 +5753,9 @@ class HelpProvider(object): RemoveHelp(self, Window window) Removes the association between the window pointer and the help - text. This is called by the wx.Window destructor. Without this, - the table of help strings will fill up and when window pointers - are reused, the wrong help string will be found. + text. This is called by the wx.Window destructor. Without this, the + table of help strings will fill up and when window pointers are + reused, the wrong help string will be found. """ return _controls_.HelpProvider_RemoveHelp(*args, **kwargs) @@ -5915,10 +5775,9 @@ def HelpProvider_Set(*args, **kwargs): """ HelpProvider_Set(HelpProvider helpProvider) -> HelpProvider - Sset the current, application-wide help provider. Returns the - previous one. Unlike some other classes, the help provider is - not created on demand. This must be explicitly done by the - application. + Sset the current, application-wide help provider. Returns the previous + one. Unlike some other classes, the help provider is not created on + demand. This must be explicitly done by the application. """ return _controls_.HelpProvider_Set(*args, **kwargs) @@ -5932,9 +5791,9 @@ def HelpProvider_Get(*args, **kwargs): class SimpleHelpProvider(HelpProvider): """ - wx.SimpleHelpProvider is an implementation of wx.HelpProvider - which supports only plain text help strings, and shows the string - associated with the control (if any) in a tooltip. + wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which + supports only plain text help strings, and shows the string associated + with the control (if any) in a tooltip. """ def __repr__(self): return "<%s.%s; proxy of C++ wxSimpleHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -5942,9 +5801,9 @@ class SimpleHelpProvider(HelpProvider): """ __init__(self) -> SimpleHelpProvider - wx.SimpleHelpProvider is an implementation of wx.HelpProvider - which supports only plain text help strings, and shows the string - associated with the control (if any) in a tooltip. + wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which + supports only plain text help strings, and shows the string associated + with the control (if any) in a tooltip. """ newobj = _controls_.new_SimpleHelpProvider(*args, **kwargs) self.this = newobj.this diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index fabc89d43b..3f3be5105d 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -644,10 +644,10 @@ CURSOR_MAX = _core_.CURSOR_MAX class Size(object): """ - wx.Size is a useful data structure used to represent the size of something. - It simply contians integer width and height proprtites. In most places in - wxPython where a wx.Size is expected a (width,height) tuple can be used - instead. + wx.Size is a useful data structure used to represent the size of + something. It simply contians integer width and height proprtites. + In most places in wxPython where a wx.Size is expected a + (width,height) tuple can be used instead. """ def __repr__(self): return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -756,9 +756,8 @@ class Size(object): """ SetDefaults(self, Size size) - Combine this size with the other one replacing the default - components of this object (i.e. equal to -1) with those of the - other. + Combine this size with the other one replacing the default components + of this object (i.e. equal to -1) with those of the other. """ return _core_.Size_SetDefaults(*args, **kwargs) @@ -770,7 +769,7 @@ class Size(object): """ return _core_.Size_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Size'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -795,9 +794,9 @@ _core_.Size_swigregister(SizePtr) class RealPoint(object): """ - A data structure for representing a point or position with floating point x - and y properties. In wxPython most places that expect a wx.RealPoint can also - accept a (x,y) tuple. + A data structure for representing a point or position with floating + point x and y properties. In wxPython most places that expect a + wx.RealPoint can also accept a (x,y) tuple. """ def __repr__(self): return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -867,7 +866,7 @@ class RealPoint(object): """ return _core_.RealPoint_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.RealPoint'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -892,9 +891,9 @@ _core_.RealPoint_swigregister(RealPointPtr) class Point(object): """ - A data structure for representing a point or position with integer x and y - properties. Most places in wxPython that expect a wx.Point can also accept a - (x,y) tuple. + A data structure for representing a point or position with integer x + and y properties. Most places in wxPython that expect a wx.Point can + also accept a (x,y) tuple. """ def __repr__(self): return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -980,7 +979,7 @@ class Point(object): """ return _core_.Point_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Point'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -1005,9 +1004,9 @@ _core_.Point_swigregister(PointPtr) class Rect(object): """ - A class for representing and manipulating rectangles. It has x, y, width and - height properties. In wxPython most palces that expect a wx.Rect can also - accept a (x,y,width,height) tuple. + A class for representing and manipulating rectangles. It has x, y, + width and height properties. In wxPython most palces that expect a + wx.Rect can also accept a (x,y,width,height) tuple. """ def __repr__(self): return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -1134,8 +1133,9 @@ class Rect(object): """ Inflate(self, int dx, int dy) -> Rect - Increase the rectangle size by dx in x direction and dy in y direction. Both - (or one of) parameters may be negative to decrease the rectangle size. + Increase the rectangle size by dx in x direction and dy in y + direction. Both or one of) parameters may be negative to decrease the + rectangle size. """ return _core_.Rect_Inflate(*args, **kwargs) @@ -1143,9 +1143,9 @@ class Rect(object): """ Deflate(self, int dx, int dy) -> Rect - Decrease the rectangle size by dx in x direction and dy in y direction. Both - (or one of) parameters may be negative to increase the rectngle size. This - method is the opposite of Inflate. + Decrease the rectangle size by dx in x direction and dy in y + direction. Both or one of) parameters may be negative to increase the + rectngle size. This method is the opposite of Inflate. """ return _core_.Rect_Deflate(*args, **kwargs) @@ -1153,9 +1153,9 @@ class Rect(object): """ OffsetXY(self, int dx, int dy) - Moves the rectangle by the specified offset. If dx is positive, the rectangle - is moved to the right, if dy is positive, it is moved to the bottom, otherwise - it is moved to the left or top respectively. + Moves the rectangle by the specified offset. If dx is positive, the + rectangle is moved to the right, if dy is positive, it is moved to the + bottom, otherwise it is moved to the left or top respectively. """ return _core_.Rect_OffsetXY(*args, **kwargs) @@ -1251,7 +1251,7 @@ class Rect(object): """ return _core_.Rect_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Rect'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -1305,7 +1305,10 @@ def IntersectRect(*args, **kwargs): #--------------------------------------------------------------------------- class Point2D(object): - """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values.""" + """ + wx.Point2Ds represent a point or a vector in a 2d coordinate system + with floating point values. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1319,19 +1322,11 @@ class Point2D(object): self.thisown = 1 del newobj.thisown def GetFloor(*args, **kwargs): - """ - GetFloor() -> (x,y) - - Convert to integer - """ + """GetFloor() -> (x,y)""" return _core_.Point2D_GetFloor(*args, **kwargs) def GetRounded(*args, **kwargs): - """ - GetRounded() -> (x,y) - - Convert to integer - """ + """GetRounded() -> (x,y)""" return _core_.Point2D_GetRounded(*args, **kwargs) def GetVectorLength(*args, **kwargs): @@ -1426,7 +1421,7 @@ class Point2D(object): """ return _core_.Point2D_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.Point2D'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -1955,13 +1950,7 @@ class ImageHistogram(object): MakeKey = staticmethod(MakeKey) def FindFirstUnusedColour(*args, **kwargs): - """ - FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) - - Find first colour that is not used in the image and has higher RGB values than - startR, startG, startB. Returns a tuple consisting of a success flag and rgb - values. - """ + """FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)""" return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) @@ -2048,13 +2037,7 @@ class Image(Object): return _core_.Image_HasAlpha(*args, **kwargs) def FindFirstUnusedColour(*args, **kwargs): - """ - FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) - - Find first colour that is not used in the image and has higher RGB values than - startR, startG, startB. Returns a tuple consisting of a success flag and rgb - values. - """ + """FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)""" return _core_.Image_FindFirstUnusedColour(*args, **kwargs) def SetMaskFromImage(*args, **kwargs): @@ -3433,7 +3416,8 @@ class MouseEvent(Event): """ GetPosition(self) -> Point - Returns the position of the mouse in window coordinates when the event happened. + Returns the position of the mouse in window coordinates when the event + happened. """ return _core_.MouseEvent_GetPosition(*args, **kwargs) @@ -3441,7 +3425,8 @@ class MouseEvent(Event): """ GetPositionTuple() -> (x,y) - Returns the position of the mouse in window coordinates when the event happened. + Returns the position of the mouse in window coordinates when the event + happened. """ return _core_.MouseEvent_GetPositionTuple(*args, **kwargs) @@ -4603,11 +4588,12 @@ class PyApp(EvtHandler): recursively unless the value of ``onlyIfNeeded`` is True. :warning: This function is dangerous as it can lead to unexpected - reentrancies (i.e. when called from an event handler it may - result in calling the same event handler again), use with - _extreme_ care or, better, don't use at all! + reentrancies (i.e. when called from an event handler it may + result in calling the same event handler again), use with + extreme care or, better, don't use at all! :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` + """ return _core_.PyApp_Yield(*args, **kwargs) @@ -4758,18 +4744,7 @@ class PyApp(EvtHandler): """ SetAssertMode(self, int mode) - Set the OnAssert behaviour for debug and hybrid builds. The following - flags may be or'd together: - - ========================= ======================================= - wx.PYAPP_ASSERT_SUPPRESS Don't do anything - wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible - (default) - wx.PYAPP_ASSERT_DIALOG Display a message dialog - wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log - ========================= ======================================= - - + Set the OnAssert behaviour for debug and hybrid builds. """ return _core_.PyApp_SetAssertMode(*args, **kwargs) @@ -4969,7 +4944,7 @@ def App_CleanUp(*args, **kwargs): """ App_CleanUp() - For internal use only, it is used to cleanup after wxWindows when + For internal use only, it is used to cleanup after wxWidgets when Python shuts down. """ return _core_.App_CleanUp(*args, **kwargs) @@ -5266,7 +5241,7 @@ class AcceleratorEntry(object): A class used to define items in an `wx.AcceleratorTable`. wxPython programs can choose to use wx.AcceleratorEntry objects, but using a list of 3-tuple of integers (flags, keyCode, cmdID) usually works just - as well. See `__init__` for details of the tuple values. + as well. See `__init__` for of the tuple values. :see: `wx.AcceleratorTable` """ @@ -5277,14 +5252,6 @@ class AcceleratorEntry(object): __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry Construct a wx.AcceleratorEntry. - - :param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT, - wx.ACCEL_CTRL or wx.ACCEL_NORMAL used to specify - which modifier keys are held down. - :param keyCode: The keycode to be detected - :param cmdID: The menu or control command ID to use for the - accellerator event. - """ newobj = _core_.new_AcceleratorEntry(*args, **kwargs) self.this = newobj.this @@ -5343,27 +5310,6 @@ class AcceleratorTable(Object): keyboard shortcuts for menus or other commands. On Windows, menu or button commands are supported; on GTK, only menu commands are supported. - - The object ``wx.NullAcceleratorTable`` is defined to be a table with - no data, and is the initial accelerator table for a window. - - An accelerator takes precedence over normal processing and can be a - convenient way to program some event handling. For example, you can - use an accelerator table to make a hotkey generate an event no matter - which window within a frame has the focus. - - Foe example:: - - aTable = wx.AcceleratorTable([(wx.ACCEL_ALT, ord('X'), exitID), - (wx.ACCEL_CTRL, ord('H'), helpID), - (wx.ACCEL_CTRL, ord('F'), findID), - (wx.ACCEL_NORMAL, wx.WXK_F3, findnextID) - ]) - self.SetAcceleratorTable(aTable) - - - :see: `wx.AcceleratorEntry`, `wx.Window.SetAcceleratorTable` - """ def __repr__(self): return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -5482,25 +5428,6 @@ class Window(EvtHandler): tries to close the window. It doesn't close the window itself, however. If force is False (the default) then the window's close handler will be allowed to veto the destruction of the window. - - Usually Close is only used with the top level windows (wx.Frame and - wx.Dialog classes) as the others are not supposed to have any special - EVT_CLOSE logic. - - The close handler should check whether the window is being deleted - forcibly, using wx.CloseEvent.GetForce, in which case it should - destroy the window using wx.Window.Destroy. - - Note that calling Close does not guarantee that the window will be - destroyed; but it provides a way to simulate a manual close of a - window, which may or may not be implemented by destroying the - window. The default EVT_CLOSE handler for wx.Dialog does not - necessarily delete the dialog, since it will simply simulate an - wxID_CANCEL event which is handled by the appropriate button event - handler and may do anything at all. - - To guarantee that the window will be destroyed, call wx.Window.Destroy - instead. """ return _core_.Window_Close(*args, **kwargs) @@ -5523,7 +5450,8 @@ class Window(EvtHandler): """ DestroyChildren(self) -> bool - Destroys all children of a window. Called automatically by the destructor. + Destroys all children of a window. Called automatically by the + destructor. """ return _core_.Window_DestroyChildren(*args, **kwargs) @@ -5563,13 +5491,12 @@ class Window(EvtHandler): """ GetLabel(self) -> String - Generic way of getting a label from any window, for - identification purposes. The interpretation of this function - differs from class to class. For frames and dialogs, the value - returned is the title. For buttons or static text controls, it is - the button text. This function can be useful for meta-programs - such as testing tools or special-needs access programs)which - need to identify windows by name. + Generic way of getting a label from any window, for identification + purposes. The interpretation of this function differs from class to + class. For frames and dialogs, the value returned is the title. For + buttons or static text controls, it is the button text. This function + can be useful for meta-programs such as testing tools or special-needs + access programs)which need to identify windows by name. """ return _core_.Window_GetLabel(*args, **kwargs) @@ -5577,8 +5504,8 @@ class Window(EvtHandler): """ SetName(self, String name) - Sets the window's name. The window name is used for ressource - setting in X, it is not the same as the window title/label + Sets the window's name. The window name is used for ressource setting + in X, it is not the same as the window title/label """ return _core_.Window_SetName(*args, **kwargs) @@ -5586,9 +5513,9 @@ class Window(EvtHandler): """ GetName(self) -> String - Returns the windows name. This name is not guaranteed to be - unique; it is up to the programmer to supply an appropriate name - in the window constructor or via wx.Window.SetName. + Returns the windows name. This name is not guaranteed to be unique; + it is up to the programmer to supply an appropriate name in the window + constructor or via wx.Window.SetName. """ return _core_.Window_GetName(*args, **kwargs) @@ -5596,14 +5523,8 @@ class Window(EvtHandler): """ SetWindowVariant(self, int variant) - Sets the variant of the window/font size to use for this window, - if the platform supports variants, for example, wxMac. Variant values are: - - wx.WINDOW_VARIANT_NORMAL Normal size - wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal) - wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal) - wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal) - + Sets the variant of the window/font size to use for this window, if + the platform supports variants, for example, wxMac. """ return _core_.Window_SetWindowVariant(*args, **kwargs) @@ -5647,7 +5568,7 @@ class Window(EvtHandler): NextControlId(int winid) -> int Get the id of the control following the one with the given - (autogenerated) id + autogenerated) id """ return _core_.Window_NextControlId(*args, **kwargs) @@ -5657,7 +5578,7 @@ class Window(EvtHandler): PrevControlId(int winid) -> int Get the id of the control preceding the one with the given - (autogenerated) id + autogenerated) id """ return _core_.Window_PrevControlId(*args, **kwargs) @@ -5854,11 +5775,11 @@ class Window(EvtHandler): GetBestSize(self) -> Size This functions returns the best acceptable minimal size for the - window, if applicable. For example, for a static text control, it will be - the minimal size such that the control label is not truncated. For - windows containing subwindows (suzh aswx.Panel), the size returned - by this function will be the same as the size the window would have - had after calling Fit. + window, if applicable. For example, for a static text control, it will + be the minimal size such that the control label is not truncated. For + windows containing subwindows (suzh aswx.Panel), the size returned by + this function will be the same as the size the window would have had + after calling Fit. """ return _core_.Window_GetBestSize(*args, **kwargs) @@ -5867,11 +5788,11 @@ class Window(EvtHandler): GetBestSizeTuple() -> (width, height) This functions returns the best acceptable minimal size for the - window, if applicable. For example, for a static text control, it will be - the minimal size such that the control label is not truncated. For - windows containing subwindows (suzh aswx.Panel), the size returned - by this function will be the same as the size the window would have - had after calling Fit. + window, if applicable. For example, for a static text control, it will + be the minimal size such that the control label is not truncated. For + windows containing subwindows (suzh aswx.Panel), the size returned by + this function will be the same as the size the window would have had + after calling Fit. """ return _core_.Window_GetBestSizeTuple(*args, **kwargs) @@ -6105,10 +6026,10 @@ class Window(EvtHandler): """ SetWindowStyleFlag(self, long style) - Sets the style of the window. Please note that some styles cannot - be changed after the window creation and that Refresh() might - need to be called after changing the others for the change to - take place immediately. + Sets the style of the window. Please note that some styles cannot be + changed after the window creation and that Refresh() might need to be + called after changing the others for the change to take place + immediately. """ return _core_.Window_SetWindowStyleFlag(*args, **kwargs) @@ -6284,7 +6205,8 @@ class Window(EvtHandler): """ GetGrandParent(self) -> Window - Returns the parent of the parent of this window, or None if there isn't one. + Returns the parent of the parent of this window, or None if there + isn't one. """ return _core_.Window_GetGrandParent(*args, **kwargs) @@ -6364,7 +6286,7 @@ class Window(EvtHandler): substitute another, for example to allow central implementation of event-handling for a variety of different window classes. - It is usually better to use wx.Window.PushEventHandler since this sets + It is usually better to use `wx.Window.PushEventHandler` since this sets up a chain of event handlers, where an event not handled by one event handler is handed to the next one in the chain. """ @@ -6383,7 +6305,7 @@ class Window(EvtHandler): wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is - handed to the next one in the chain. Use wx.Window.PopEventHandler to + handed to the next one in the chain. Use `wx.Window.PopEventHandler` to remove the event handler. """ return _core_.Window_PushEventHandler(*args, **kwargs) @@ -6402,11 +6324,11 @@ class Window(EvtHandler): """ RemoveEventHandler(self, EvtHandler handler) -> bool - Find the given handler in the event handler chain and remove (but - not delete) it from the event handler chain, return True if it was - found and False otherwise (this also results in an assert failure so - this function should only be called when the handler is supposed to - be there.) + Find the given handler in the event handler chain and remove (but not + delete) it from the event handler chain, return True if it was found + and False otherwise (this also results in an assert failure so this + function should only be called when the handler is supposed to be + there.) """ return _core_.Window_RemoveEventHandler(*args, **kwargs) @@ -6434,9 +6356,9 @@ class Window(EvtHandler): Validate(self) -> bool Validates the current values of the child controls using their - validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY - extra style flag set, the method will also call Validate() of all - child windows. Returns false if any of the validations failed. + validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra + style flag set, the method will also call Validate() of all child + windows. Returns false if any of the validations failed. """ return _core_.Window_Validate(*args, **kwargs) @@ -6444,10 +6366,10 @@ class Window(EvtHandler): """ TransferDataToWindow(self) -> bool - Transfers values to child controls from data areas specified by - their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY - extra style flag set, the method will also call - TransferDataToWindow() of all child windows. + Transfers values to child controls from data areas specified by their + validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra + style flag set, the method will also call TransferDataToWindow() of + all child windows. """ return _core_.Window_TransferDataToWindow(*args, **kwargs) @@ -6455,11 +6377,10 @@ class Window(EvtHandler): """ TransferDataFromWindow(self) -> bool - Transfers values from child controls to data areas specified by - their validators. Returns false if a transfer failed. If the - window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the - method will also call TransferDataFromWindow() of all child - windows. + Transfers values from child controls to data areas specified by their + validators. Returns false if a transfer failed. If the window has + wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will + also call TransferDataFromWindow() of all child windows. """ return _core_.Window_TransferDataFromWindow(*args, **kwargs) @@ -6467,8 +6388,8 @@ class Window(EvtHandler): """ InitDialog(self) - Sends an EVT_INIT_DIALOG event, whose handler usually transfers - data to the dialog via validators. + Sends an EVT_INIT_DIALOG event, whose handler usually transfers data + to the dialog via validators. """ return _core_.Window_InitDialog(*args, **kwargs) @@ -6667,10 +6588,11 @@ class Window(EvtHandler): """ Freeze(self) - Freezes the window or, in other words, prevents any updates from taking place - on screen, the window is not redrawn at all. Thaw must be called to reenable - window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw - being delayed until all the nesting has been undone. + Freezes the window or, in other words, prevents any updates from + taking place on screen, the window is not redrawn at all. Thaw must be + called to reenable window redrawing. Calls to Freeze/Thaw may be + nested, with the actual Thaw being delayed until all the nesting has + been undone. This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into @@ -6685,8 +6607,8 @@ class Window(EvtHandler): Thaw(self) Reenables window updating after a previous call to Freeze. Calls to - Freeze/Thaw may be nested, so Thaw must be called the same number of times - that Freeze was before the window will be updated. + Freeze/Thaw may be nested, so Thaw must be called the same number of + times that Freeze was before the window will be updated. """ return _core_.Window_Thaw(*args, **kwargs) @@ -6754,12 +6676,11 @@ class Window(EvtHandler): """ GetDefaultAttributes(self) -> VisualAttributes - Get the default attributes for an instance of this class. This - is useful if you want to use the same font or colour in your own - control as in a standard control -- which is a much better idea - than hard coding specific colours or fonts which might look - completely out of place on the users system, especially if it - uses themes. + Get the default attributes for an instance of this class. This is + useful if you want to use the same font or colour in your own control + as in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out of + place on the users system, especially if it uses themes. """ return _core_.Window_GetDefaultAttributes(*args, **kwargs) @@ -6767,15 +6688,15 @@ class Window(EvtHandler): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) @@ -6910,11 +6831,7 @@ class Window(EvtHandler): return _core_.Window_GetCharWidth(*args, **kwargs) def GetTextExtent(*args, **kwargs): - """ - GetTextExtent(String string) -> (width, height) - - Get the width and height of the text using the current font. - """ + """GetTextExtent(String string) -> (width, height)""" return _core_.Window_GetTextExtent(*args, **kwargs) def GetFullTextExtent(*args, **kwargs): @@ -6998,24 +6915,6 @@ class Window(EvtHandler): wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to limit the overhead that wxWindows incurs by sending update UI events in idle time. - - The flags should be a bitlist of one or more of the following values: - - wx.UPDATE_UI_NONE No particular value - wx.UPDATE_UI_RECURSE Call the function for descendants - wx.UPDATE_UI_FROMIDLE Invoked from OnIdle - - If you are calling this function from an OnIdle function, make sure - you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to - only update the UI elements that need to be updated in idle time. Some - windows update their elements only when necessary, for example when a - menu is about to be shown. The following is an example of how to call - UpdateWindowUI from an idle function. - - def OnIdle(self, evt): - if wx.UpdateUIEvent.CanUpdate(self): - self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE); - """ return _core_.Window_UpdateWindowUI(*args, **kwargs) @@ -7061,22 +6960,10 @@ class Window(EvtHandler): def SetScrollbar(*args, **kwargs): """ - SetScrollbar(self, int orientation, int pos, int thumbvisible, int range, + SetScrollbar(self, int orientation, int position, int thumbSize, int range, bool refresh=True) Sets the scrollbar properties of a built-in scrollbar. - - orientation: Determines the scrollbar whose page size is to be - set. May be wx.HORIZONTAL or wx.VERTICAL. - - position: The position of the scrollbar in scroll units. - - thumbSize: The size of the thumb, or visible portion of the - scrollbar, in scroll units. - - range: The maximum position of the scrollbar. - - refresh: True to redraw the scrollbar, false otherwise. """ return _core_.Window_SetScrollbar(*args, **kwargs) @@ -7120,16 +7007,6 @@ class Window(EvtHandler): accordingly. Use this function to optimise your scrolling implementations, to minimise the area that must be redrawn. Note that it is rarely required to call this function from a user program. - - dx: Amount to scroll horizontally. - - dy: Amount to scroll vertically. - - rect: Rectangle to invalidate. If this is None, the whole window - is invalidated. If you pass a rectangle corresponding to the - area of the window exposed by the scroll, your painting - handler can optimize painting by checking for the - invalidated region. """ return _core_.Window_ScrollWindow(*args, **kwargs) @@ -7148,7 +7025,7 @@ class Window(EvtHandler): """ ScrollPages(self, int pages) -> bool - If the platform and window class supports it, scrolls the window by + If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done. @@ -7366,30 +7243,30 @@ class Window(EvtHandler): """ InheritAttributes(self) - This function is (or should be, in case of custom controls) - called during window creation to intelligently set up the window - visual attributes, that is the font and the foreground and - background colours. - - By 'intelligently' the following is meant: by default, all - windows use their own default attributes. However if some of the - parent's attributes are explicitly changed (that is, using - SetFont and not SetDefaultFont) and if the corresponding - attribute hadn't been explicitly set for this window itself, then - this window takes the same value as used by the parent. In - addition, if the window overrides ShouldInheritColours to return - false, the colours will not be changed no matter what and only - the font might. - - This rather complicated logic is necessary in order to accomodate - the different usage scenarius. The most common one is when all - default attributes are used and in this case, nothing should be - inherited as in modern GUIs different controls use different - fonts (and colours) than their siblings so they can't inherit the - same value from the parent. However it was also deemed desirable - to allow to simply change the attributes of all children at once - by just changing the font or colour of their common parent, hence - in this case we do inherit the parents attributes. + This function is (or should be, in case of custom controls) called + during window creation to intelligently set up the window visual + attributes, that is the font and the foreground and background + colours. + + By 'intelligently' the following is meant: by default, all windows use + their own default attributes. However if some of the parent's + attributes are explicitly changed (that is, using SetFont and not + SetDefaultFont) and if the corresponding attribute hadn't been + explicitly set for this window itself, then this window takes the same + value as used by the parent. In addition, if the window overrides + ShouldInheritColours to return false, the colours will not be changed + no matter what and only the font might. + + This rather complicated logic is necessary in order to accomodate the + different usage scenarius. The most common one is when all default + attributes are used and in this case, nothing should be inherited as + in modern GUIs different controls use different fonts (and colours) + than their siblings so they can't inherit the same value from the + parent. However it was also deemed desirable to allow to simply change + the attributes of all children at once by just changing the font or + colour of their common parent, hence in this case we do inherit the + parents attributes. + """ return _core_.Window_InheritAttributes(*args, **kwargs) @@ -7398,11 +7275,11 @@ class Window(EvtHandler): ShouldInheritColours(self) -> bool Return true from here to allow the colours of this window to be - changed by InheritAttributes, returning false forbids inheriting - them from the parent window. + changed by InheritAttributes, returning false forbids inheriting them + from the parent window. - The base class version returns false, but this method is - overridden in wxControl where it returns true. + The base class version returns false, but this method is overridden in + wxControl where it returns true. """ return _core_.Window_ShouldInheritColours(*args, **kwargs) @@ -7450,7 +7327,7 @@ def Window_NextControlId(*args, **kwargs): Window_NextControlId(int winid) -> int Get the id of the control following the one with the given - (autogenerated) id + autogenerated) id """ return _core_.Window_NextControlId(*args, **kwargs) @@ -7459,7 +7336,7 @@ def Window_PrevControlId(*args, **kwargs): Window_PrevControlId(int winid) -> int Get the id of the control preceding the one with the given - (autogenerated) id + autogenerated) id """ return _core_.Window_PrevControlId(*args, **kwargs) @@ -7484,15 +7361,15 @@ def Window_GetClassDefaultAttributes(*args, **kwargs): """ Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) @@ -8166,8 +8043,8 @@ class Control(Window): """ This is the base class for a control or 'widget'. - A control is generally a small window which processes user input and/or - displays one or more item of data. + A control is generally a small window which processes user input + and/or displays one or more item of data. """ def __repr__(self): return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -8177,8 +8054,8 @@ class Control(Window): long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> Control - Create a Control. Normally you should only call this from a - subclass' __init__ as a plain old wx.Control is not very useful. + Create a Control. Normally you should only call this from a subclass' + __init__ as a plain old wx.Control is not very useful. """ newobj = _core_.new_Control(*args, **kwargs) self.this = newobj.this @@ -8200,8 +8077,10 @@ class Control(Window): """ Command(self, CommandEvent event) - Simulates the effect of the user issuing a command to the - item. See wx.CommandEvent. + Simulates the effect of the user issuing a command to the item. + + :see: `wx.CommandEvent` + """ return _core_.Control_Command(*args, **kwargs) @@ -8225,15 +8104,15 @@ class Control(Window): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) @@ -8261,15 +8140,15 @@ def Control_GetClassDefaultAttributes(*args, **kwargs): """ Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) @@ -8278,17 +8157,17 @@ def Control_GetClassDefaultAttributes(*args, **kwargs): class ItemContainer(object): """ wx.ItemContainer defines an interface which is implemented by all - controls which have string subitems, each of which may be - selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and - wx.ComboBox (which implements an extended interface deriving from - this one) + controls which have string subitems, each of which may be selected, + such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as + `wx.ComboBox` which implements an extended interface deriving from + this one. - It defines the methods for accessing the control's items and - although each of the derived classes implements them differently, - they still all conform to the same interface. + It defines the methods for accessing the control's items and although + each of the derived classes implements them differently, they still + all conform to the same interface. - The items in a wx.ItemContainer have (non empty) string labels - and, optionally, client data associated with them. + The items in a wx.ItemContainer have (non empty) string labels and, + optionally, client data associated with them. """ def __init__(self): raise RuntimeError, "No constructor defined" @@ -8298,10 +8177,10 @@ class ItemContainer(object): """ Append(self, String item, PyObject clientData=None) -> int - Adds the item to the control, associating the given data with the - item if not None. The return value is the index of the newly - added item which may be different from the last one if the - control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style). + Adds the item to the control, associating the given data with the item + if not None. The return value is the index of the newly added item + which may be different from the last one if the control is sorted (e.g. + has wx.LB_SORT or wx.CB_SORT style). """ return _core_.ItemContainer_Append(*args, **kwargs) @@ -8309,9 +8188,9 @@ class ItemContainer(object): """ AppendItems(self, wxArrayString strings) - Apend several items at once to the control. Notice that calling - this method may be much faster than appending the items one by - one if you need to add a lot of items. + Apend several items at once to the control. Notice that calling this + method may be much faster than appending the items one by one if you + need to add a lot of items. """ return _core_.ItemContainer_AppendItems(*args, **kwargs) @@ -8319,7 +8198,7 @@ class ItemContainer(object): """ Insert(self, String item, int pos, PyObject clientData=None) -> int - Insert an item into the control before the item at the pos index, + Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. """ return _core_.ItemContainer_Insert(*args, **kwargs) @@ -8336,10 +8215,10 @@ class ItemContainer(object): """ Delete(self, int n) - Deletes the item at the zero-based index 'n' from the control. - Note that it is an error (signalled by a PyAssertionError - exception if enabled) to remove an item with the index negative - or greater or equal than the number of items in the control. + Deletes the item at the zero-based index 'n' from the control. Note + that it is an error (signalled by a `wx.PyAssertionError` exception if + enabled) to remove an item with the index negative or greater or equal + than the number of items in the control. """ return _core_.ItemContainer_Delete(*args, **kwargs) @@ -8384,8 +8263,8 @@ class ItemContainer(object): FindString(self, String s) -> int Finds an item whose label matches the given string. Returns the - zero-based position of the item, or wx.NOT_FOUND if the string - was not found. + zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not + found. """ return _core_.ItemContainer_FindString(*args, **kwargs) @@ -8402,7 +8281,8 @@ class ItemContainer(object): """ GetSelection(self) -> int - Returns the index of the selected item or wx.NOT_FOUND if no item is selected. + Returns the index of the selected item or ``wx.NOT_FOUND`` if no item + is selected. """ return _core_.ItemContainer_GetSelection(*args, **kwargs) @@ -8410,7 +8290,8 @@ class ItemContainer(object): """ GetStringSelection(self) -> String - Returns the label of the selected item or an empty string if no item is selected. + Returns the label of the selected item or an empty string if no item + is selected. """ return _core_.ItemContainer_GetStringSelection(*args, **kwargs) @@ -8442,9 +8323,9 @@ _core_.ItemContainer_swigregister(ItemContainerPtr) class ControlWithItems(Control,ItemContainer): """ - wx.ControlWithItems combines the wx.ItemContainer class with the - wx.Control class, and is used for the base class of various - controls that have items. + wx.ControlWithItems combines the ``wx.ItemContainer`` class with the + wx.Control class, and is used for the base class of various controls + that have items. """ def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): @@ -9071,7 +8952,7 @@ class GBPosition(object): """Get(self) -> PyObject""" return _core_.GBPosition_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.GBPosition'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -9136,7 +9017,7 @@ class GBSpan(object): """Get(self) -> PyObject""" return _core_.GBSpan_Get(*args, **kwargs) - asTuple = Get + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) def __repr__(self): return 'wx.GBSpan'+str(self.Get()) def __len__(self): return len(self.Get()) @@ -9367,62 +9248,32 @@ SameAs = _core_.SameAs Absolute = _core_.Absolute class IndividualLayoutConstraint(Object): """ - Objects of this class are stored in the wx.LayoutConstraint class as one of - eight possible constraints that a window can be involved in. You will never - need to create an instance of wx.IndividualLayoutConstraint, rather you should - use create a wx.LayoutContstraints instance and use the individual contstraints + Objects of this class are stored in the `wx.LayoutConstraints` class as + one of eight possible constraints that a window can be involved in. + You will never need to create an instance of + wx.IndividualLayoutConstraint, rather you should create a + `wx.LayoutConstraints` instance and use the individual contstraints that it contains. - - Constraints are initially set to have the relationship wx.Unconstrained, which - means that their values should be calculated by looking at known constraints. - - The Edge specifies the type of edge or dimension of a window. - - Edges - - wx.Left The left edge. - wx.Top The top edge. - wx.Right The right edge. - wx.Bottom The bottom edge. - wx.CentreX The x-coordinate of the centre of the window. - wx.CentreY The y-coordinate of the centre of the window. - - - The Relationship specifies the relationship that this edge or dimension has - with another specified edge or dimension. Normally, the user doesn't use these - directly because functions such as Below and RightOf are a convenience for - using the more general Set function. - - Relationships - - wx.Unconstrained The edge or dimension is unconstrained - (the default for edges.) - wx.AsIs The edge or dimension is to be taken from the current - window position or size (the default for dimensions.) - wx.Above The edge should be above another edge. - wx.Below The edge should be below another edge. - wx.LeftOf The edge should be to the left of another edge. - wx.RightOf The edge should be to the right of another edge. - wx.SameAs The edge or dimension should be the same as another edge - or dimension. - wx.PercentOf The edge or dimension should be a percentage of another - edge or dimension. - wx.Absolute The edge or dimension should be a given absolute value. - - """ def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Set(*args, **kwargs): - """Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)""" + """ + Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) + + Sets the properties of the constraint. Normally called by one of the + convenience functions such as Above, RightOf, SameAs. + """ return _core_.IndividualLayoutConstraint_Set(*args, **kwargs) def LeftOf(*args, **kwargs): """ LeftOf(self, Window sibling, int marg=0) - Sibling relationship + Constrains this edge to be to the left of the given window, with an + optional margin. Implicitly, this is relative to the left edge of the + other window. """ return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs) @@ -9430,7 +9281,9 @@ class IndividualLayoutConstraint(Object): """ RightOf(self, Window sibling, int marg=0) - Sibling relationship + Constrains this edge to be to the right of the given window, with an + optional margin. Implicitly, this is relative to the right edge of the + other window. """ return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs) @@ -9438,7 +9291,9 @@ class IndividualLayoutConstraint(Object): """ Above(self, Window sibling, int marg=0) - Sibling relationship + Constrains this edge to be above the given window, with an optional + margin. Implicitly, this is relative to the top edge of the other + window. """ return _core_.IndividualLayoutConstraint_Above(*args, **kwargs) @@ -9446,7 +9301,9 @@ class IndividualLayoutConstraint(Object): """ Below(self, Window sibling, int marg=0) - Sibling relationship + Constrains this edge to be below the given window, with an optional + margin. Implicitly, this is relative to the bottom edge of the other + window. """ return _core_.IndividualLayoutConstraint_Below(*args, **kwargs) @@ -9454,7 +9311,8 @@ class IndividualLayoutConstraint(Object): """ SameAs(self, Window otherW, int edge, int marg=0) - 'Same edge' alignment + Constrains this edge or dimension to be to the same as the edge of the + given window, with an optional margin. """ return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs) @@ -9462,7 +9320,8 @@ class IndividualLayoutConstraint(Object): """ PercentOf(self, Window otherW, int wh, int per) - The edge is a percentage of the other window's edge + Constrains this edge or dimension to be to a percentage of the given + window, with an optional margin. """ return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs) @@ -9470,7 +9329,7 @@ class IndividualLayoutConstraint(Object): """ Absolute(self, int val) - Edge has absolute value + Constrains this edge or dimension to be the given absolute value. """ return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs) @@ -9478,7 +9337,8 @@ class IndividualLayoutConstraint(Object): """ Unconstrained(self) - Dimension is unconstrained + Sets this edge or dimension to be unconstrained, that is, dependent on + other edges and dimensions from which this value can be deduced. """ return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) @@ -9486,7 +9346,12 @@ class IndividualLayoutConstraint(Object): """ AsIs(self) - Dimension is 'as is' (use current size settings) + Sets this edge or constraint to be whatever the window's value is at + the moment. If either of the width and height constraints are *as is*, + the window will not be resized, but moved instead. This is important + when considering panel items which are intended to have a default + size, such as a button, which may take its size from the size of the + button label. """ return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs) @@ -9577,10 +9442,11 @@ _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) class LayoutConstraints(Object): """ - Note: constraints are now deprecated and you should use sizers instead. + **Note:** constraints are now deprecated and you should use sizers + instead. - Objects of this class can be associated with a window to define its layout - constraints, with respect to siblings or its parent. + Objects of this class can be associated with a window to define its + layout constraints, with respect to siblings or its parent. The class consists of the following eight constraints of class wx.IndividualLayoutConstraint, some or all of which should be accessed @@ -9595,12 +9461,15 @@ class LayoutConstraints(Object): * centreX: represents the horizontal centre point of the window * centreY: represents the vertical centre point of the window - Most constraints are initially set to have the relationship wxUnconstrained, - which means that their values should be calculated by looking at known - constraints. The exceptions are width and height, which are set to wxAsIs to - ensure that if the user does not specify a constraint, the existing width and - height will be used, to be compatible with panel items which often have take a - default size. If the constraint is wxAsIs, the dimension will not be changed. + Most constraints are initially set to have the relationship + wxUnconstrained, which means that their values should be calculated by + looking at known constraints. The exceptions are width and height, + which are set to wxAsIs to ensure that if the user does not specify a + constraint, the existing width and height will be used, to be + compatible with panel items which often have take a default size. If + the constraint is ``wx.AsIs``, the dimension will not be changed. + + :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` """ def __repr__(self): diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 289eea2a77..ccaa3627c2 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -26949,7 +26949,7 @@ static PyObject *_wrap_Window_SetScrollbar(PyObject *self, PyObject *args, PyObj PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "orientation",(char *) "pos",(char *) "thumbvisible",(char *) "range",(char *) "refresh", NULL + (char *) "self",(char *) "orientation",(char *) "position",(char *) "thumbSize",(char *) "range",(char *) "refresh", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:Window_SetScrollbar",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index f7d15b0106..299ff3c343 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -46,29 +46,35 @@ _gdi_.GDIObject_swigregister(GDIObjectPtr) class Colour(_core.Object): """ - A colour is an object representing a combination of Red, Green, and Blue (RGB) - intensity values, and is used to determine drawing colours, window colours, - etc. Valid RGB values are in the range 0 to 255. + A colour is an object representing a combination of Red, Green, and + Blue (RGB) intensity values, and is used to determine drawing colours, + window colours, etc. Valid RGB values are in the range 0 to 255. - In wxPython there are typemaps that will automatically convert from a colour - name, or from a '#RRGGBB' colour hex value string to a wx.Colour object when - calling C++ methods that expect a wxColour. This means that the following are - all equivallent: + In wxPython there are typemaps that will automatically convert from a + colour name, or from a '#RRGGBB' colour hex value string to a + wx.Colour object when calling C++ methods that expect a wxColour. + This means that the following are all equivallent:: win.SetBackgroundColour(wxColour(0,0,255)) win.SetBackgroundColour('BLUE') win.SetBackgroundColour('#0000FF') - You can retrieve the various current system colour settings with - wx.SystemSettings.GetColour. + Additional colour names and their coresponding values can be added + using `wx.ColourDatabase`. Various system colours (as set in the + user's system preferences) can be retrieved with + `wx.SystemSettings.GetColour`. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, unsigned char red=0, unsigned char green=0, unsigned char blue=0) -> Colour + __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour Constructs a colour from red, green and blue values. + + :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`. + """ newobj = _gdi_.new_Colour(*args, **kwargs) self.this = newobj.this @@ -82,7 +88,7 @@ class Colour(_core.Object): def Red(*args, **kwargs): """ - Red(self) -> unsigned char + Red(self) -> byte Returns the red intensity. """ @@ -90,7 +96,7 @@ class Colour(_core.Object): def Green(*args, **kwargs): """ - Green(self) -> unsigned char + Green(self) -> byte Returns the green intensity. """ @@ -98,7 +104,7 @@ class Colour(_core.Object): def Blue(*args, **kwargs): """ - Blue(self) -> unsigned char + Blue(self) -> byte Returns the blue intensity. """ @@ -115,7 +121,7 @@ class Colour(_core.Object): def Set(*args, **kwargs): """ - Set(self, unsigned char red, unsigned char green, unsigned char blue) + Set(self, byte red, byte green, byte blue) Sets the RGB intensity values. """ @@ -133,7 +139,8 @@ class Colour(_core.Object): """ SetFromName(self, String colourName) - Sets the RGB intensity values using a colour name listed in wx.TheColourDatabase. + Sets the RGB intensity values using a colour name listed in + ``wx.TheColourDatabase``. """ return _gdi_.Colour_SetFromName(*args, **kwargs) @@ -142,8 +149,8 @@ class Colour(_core.Object): GetPixel(self) -> long Returns a pixel value which is platform-dependent. On Windows, a - COLORREF is returned. On X, an allocated pixel value is returned. - -1 is returned if the pixel is invalid (on X, unallocated). + COLORREF is returned. On X, an allocated pixel value is returned. -1 + is returned if the pixel is invalid (on X, unallocated). """ return _gdi_.Colour_GetPixel(*args, **kwargs) @@ -179,9 +186,9 @@ class Colour(_core.Object): """ return _gdi_.Colour_GetRGB(*args, **kwargs) - asTuple = Get - def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wx.Colour' + str(self.asTuple()) + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") + def __str__(self): return str(self.Get()) + def __repr__(self): return 'wx.Colour' + str(self.Get()) def __nonzero__(self): return self.Ok() __safe_for_unpickling__ = True def __reduce__(self): return (Colour, self.Get()) @@ -198,7 +205,8 @@ def NamedColour(*args, **kwargs): """ NamedColour(String colorName) -> Colour - Constructs a colour object using a colour name listed in wx.TheColourDatabase. + Constructs a colour object using a colour name listed in + ``wx.TheColourDatabase``. """ val = _gdi_.new_NamedColour(*args, **kwargs) val.thisown = 1 @@ -361,18 +369,6 @@ class Brush(GDIObject): A brush is a drawing tool for filling in areas. It is used for painting the background of rectangles, ellipses, etc. when drawing on a `wx.DC`. It has a colour and a style. - - :warning: Do not create instances of wx.Brush before the `wx.App` - object has been created because, depending on the platform, - required internal data structures may not have been initialized - yet. Instead create your brushes in the app's OnInit or as they - are needed for drawing. - - :note: On monochrome displays all brushes are white, unless the colour - really is black. - - :see: `wx.BrushList`, `wx.DC`, `wx.DC.SetBrush` - """ def __repr__(self): return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -380,24 +376,7 @@ class Brush(GDIObject): """ __init__(self, Colour colour, int style=SOLID) -> Brush - Constructs a brush from a `wx.Colour` object and a style. The style - parameter may be one of the following: - - =================== ============================= - Style Meaning - =================== ============================= - wx.TRANSPARENT Transparent (no fill). - wx.SOLID Solid. - wx.STIPPLE Uses a bitmap as a stipple. - wx.BDIAGONAL_HATCH Backward diagonal hatch. - wx.CROSSDIAG_HATCH Cross-diagonal hatch. - wx.FDIAGONAL_HATCH Forward diagonal hatch. - wx.CROSS_HATCH Cross hatch. - wx.HORIZONTAL_HATCH Horizontal hatch. - wx.VERTICAL_HATCH Vertical hatch. - =================== ============================= - - + Constructs a brush from a `wx.Colour` object and a style. """ newobj = _gdi_.new_Brush(*args, **kwargs) self.this = newobj.this @@ -485,19 +464,6 @@ class Bitmap(GDIObject): device context (instance of `wx.MemoryDC`). This enables the bitmap to be copied to a window or memory device context using `wx.DC.Blit`, or to be used as a drawing surface. - - The BMP and XMP image file formats are supported on all platforms by - wx.Bitmap. Other formats are automatically loaded by `wx.Image` and - converted to a wx.Bitmap, so any image file format supported by - `wx.Image` can be used. - - :todo: Add wrappers and support for raw bitmap data access. Can this - be be put into Python without losing the speed benefits of the - teplates and iterators in rawbmp.h? - - :todo: Find a way to do very efficient PIL Image <--> wx.Bitmap - converstions. - """ def __repr__(self): return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -506,33 +472,6 @@ class Bitmap(GDIObject): __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap Loads a bitmap from a file. - - :param name: Name of the file to load the bitmap from. - :param type: The type of image to expect. Can be one of the following - constants (assuming that the neccessary `wx.Image` handlers are - loaded): - - * wx.BITMAP_TYPE_ANY - * wx.BITMAP_TYPE_BMP - * wx.BITMAP_TYPE_ICO - * wx.BITMAP_TYPE_CUR - * wx.BITMAP_TYPE_XBM - * wx.BITMAP_TYPE_XPM - * wx.BITMAP_TYPE_TIF - * wx.BITMAP_TYPE_GIF - * wx.BITMAP_TYPE_PNG - * wx.BITMAP_TYPE_JPEG - * wx.BITMAP_TYPE_PNM - * wx.BITMAP_TYPE_PCX - * wx.BITMAP_TYPE_PICT - * wx.BITMAP_TYPE_ICON - * wx.BITMAP_TYPE_ANI - * wx.BITMAP_TYPE_IFF - - :see: Alternate constructors `wx.EmptyBitmap`, `wx.BitmapFromIcon`, - `wx.BitmapFromImage`, `wx.BitmapFromXPMData`, - `wx.BitmapFromBits` - """ newobj = _gdi_.new_Bitmap(*args, **kwargs) self.this = newobj.this @@ -773,7 +712,6 @@ class Mask(_core.Object): `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a mask. - """ def __repr__(self): return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -979,15 +917,15 @@ def IconBundleFromIcon(*args, **kwargs): class Cursor(GDIObject): """ - A cursor is a small bitmap usually used for denoting where the - mouse pointer is, with a picture that might indicate the - interpretation of a mouse click. + A cursor is a small bitmap usually used for denoting where the mouse + pointer is, with a picture that might indicate the interpretation of a + mouse click. A single cursor object may be used in many windows (any subwindow - type). The wxWindows convention is to set the cursor for a - window, as in X, rather than to set it globally as in MS Windows, - although a global wx.SetCursor function is also available for use - on MS Windows. + type). The wxWindows convention is to set the cursor for a window, as + in X, rather than to set it globally as in MS Windows, although a + global `wx.SetCursor` function is also available for use on MS Windows. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxCursor instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -996,11 +934,11 @@ class Cursor(GDIObject): __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor Construct a Cursor from a file. Specify the type of file using - wx.BITAMP_TYPE* constants, and specify the hotspot if not using a - .cur file. + wx.BITAMP_TYPE* constants, and specify the hotspot if not using a cur + file. - This cursor is not available on wxGTK, use wx.StockCursor, - wx.CursorFromImage, or wx.CursorFromBits instead. + This constructor is not available on wxGTK, use ``wx.StockCursor``, + ``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead. """ newobj = _gdi_.new_Cursor(*args, **kwargs) self.this = newobj.this @@ -1029,8 +967,8 @@ def StockCursor(*args, **kwargs): """ StockCursor(int id) -> Cursor - Create a cursor using one of the stock cursors. Note that not - all cursors are available on all platforms. + Create a cursor using one of the stock cursors. Note that not all + cursors are available on all platforms. """ val = _gdi_.new_StockCursor(*args, **kwargs) val.thisown = 1 @@ -1040,17 +978,10 @@ def CursorFromImage(*args, **kwargs): """ CursorFromImage(Image image) -> Cursor - Constructs a cursor from a wxImage. The cursor is monochrome, - colors with the RGB elements all greater than 127 will be - foreground, colors less than this background. The mask (if any) - will be used as transparent. - - In MSW the foreground will be white and the background black. The - cursor is resized to 32x32 In GTK, the two most frequent colors - will be used for foreground and background. The cursor will be - displayed at the size of the image. On MacOS the cursor is - resized to 16x16 and currently only shown as black/white (mask - respected). + Constructs a cursor from a wxImage. The cursor is monochrome, colors + with the RGB elements all greater than 127 will be foreground, colors + less than this background. The mask (if any) will be used as + transparent. """ val = _gdi_.new_CursorFromImage(*args, **kwargs) val.thisown = 1 @@ -2144,7 +2075,7 @@ class Locale(object): def __repr__(self): return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale""" + """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale""" newobj = _gdi_.new_Locale(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -2675,12 +2606,7 @@ class DC(_core.Object): return _gdi_.DC_GetCharWidth(*args, **kwargs) def GetTextExtent(*args, **kwargs): - """ - GetTextExtent(wxString string) -> (width, height) - - Get the width and height of the text using the current font. - Only works for single line strings. - """ + """GetTextExtent(wxString string) -> (width, height)""" return _gdi_.DC_GetTextExtent(*args, **kwargs) def GetFullTextExtent(*args, **kwargs): @@ -2688,8 +2614,8 @@ class DC(_core.Object): GetFullTextExtent(wxString string, Font font=None) -> (width, height, descent, externalLeading) - Get the width, height, decent and leading of the text using the current or specified font. - Only works for single line strings. + Get the width, height, decent and leading of the text using the + current or specified font. Only works for single line strings. """ return _gdi_.DC_GetFullTextExtent(*args, **kwargs) @@ -2697,9 +2623,6 @@ class DC(_core.Object): """ GetMultiLineTextExtent(wxString string, Font font=None) -> (width, height, descent, externalLeading) - - Get the width, height, decent and leading of the text using the current or specified font. - Works for single as well as multi-line strings. """ return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs) diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index daf3025a59..ff5c70b929 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -751,6 +751,12 @@ PyObject *wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self){ } +wxLocale *new_wxLocale(int language,int flags){ + if (language == -1) + return new wxLocale(); + else + return new wxLocale(language, flags); + } #include "wx/wxPython/pydrawxxx.h" @@ -1024,9 +1030,9 @@ static PyObject * GDIObject_swigregister(PyObject *self, PyObject *args) { } static PyObject *_wrap_new_Colour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; - unsigned char arg1 = (unsigned char) 0 ; - unsigned char arg2 = (unsigned char) 0 ; - unsigned char arg3 = (unsigned char) 0 ; + byte arg1 = (byte) 0 ; + byte arg2 = (byte) 0 ; + byte arg3 = (byte) 0 ; wxColour *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -1037,15 +1043,15 @@ static PyObject *_wrap_new_Colour(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:new_Colour",kwnames,&obj0,&obj1,&obj2)) goto fail; if (obj0) { - arg1 = (unsigned char) SWIG_AsUnsignedChar(obj0); + arg1 = (byte) SWIG_AsUnsignedChar(obj0); if (PyErr_Occurred()) SWIG_fail; } if (obj1) { - arg2 = (unsigned char) SWIG_AsUnsignedChar(obj1); + arg2 = (byte) SWIG_AsUnsignedChar(obj1); if (PyErr_Occurred()) SWIG_fail; } if (obj2) { - arg3 = (unsigned char) SWIG_AsUnsignedChar(obj2); + arg3 = (byte) SWIG_AsUnsignedChar(obj2); if (PyErr_Occurred()) SWIG_fail; } { @@ -1154,7 +1160,7 @@ static PyObject *_wrap_delete_Colour(PyObject *self, PyObject *args, PyObject *k static PyObject *_wrap_Colour_Red(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour *arg1 = (wxColour *) 0 ; - unsigned char result; + byte result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -1165,7 +1171,7 @@ static PyObject *_wrap_Colour_Red(PyObject *self, PyObject *args, PyObject *kwar SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned char)(arg1)->Red(); + result = (byte)(arg1)->Red(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -1180,7 +1186,7 @@ static PyObject *_wrap_Colour_Red(PyObject *self, PyObject *args, PyObject *kwar static PyObject *_wrap_Colour_Green(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour *arg1 = (wxColour *) 0 ; - unsigned char result; + byte result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -1191,7 +1197,7 @@ static PyObject *_wrap_Colour_Green(PyObject *self, PyObject *args, PyObject *kw SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned char)(arg1)->Green(); + result = (byte)(arg1)->Green(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -1206,7 +1212,7 @@ static PyObject *_wrap_Colour_Green(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_Colour_Blue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour *arg1 = (wxColour *) 0 ; - unsigned char result; + byte result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -1217,7 +1223,7 @@ static PyObject *_wrap_Colour_Blue(PyObject *self, PyObject *args, PyObject *kwa SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned char)(arg1)->Blue(); + result = (byte)(arg1)->Blue(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -1260,9 +1266,9 @@ static PyObject *_wrap_Colour_Ok(PyObject *self, PyObject *args, PyObject *kwarg static PyObject *_wrap_Colour_Set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour *arg1 = (wxColour *) 0 ; - unsigned char arg2 ; - unsigned char arg3 ; - unsigned char arg4 ; + byte arg2 ; + byte arg3 ; + byte arg4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -1274,11 +1280,11 @@ static PyObject *_wrap_Colour_Set(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Colour_Set",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxColour, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (unsigned char) SWIG_AsUnsignedChar(obj1); + arg2 = (byte) SWIG_AsUnsignedChar(obj1); if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) SWIG_AsUnsignedChar(obj2); + arg3 = (byte) SWIG_AsUnsignedChar(obj2); if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) SWIG_AsUnsignedChar(obj3); + arg4 = (byte) SWIG_AsUnsignedChar(obj3); if (PyErr_Occurred()) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9042,7 +9048,7 @@ static PyObject * LanguageInfo_swigregister(PyObject *self, PyObject *args) { } static PyObject *_wrap_new_Locale(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; - int arg1 = (int) wxLANGUAGE_DEFAULT ; + int arg1 = (int) -1 ; int arg2 = (int) wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING ; wxLocale *result; PyObject * obj0 = 0 ; @@ -9062,7 +9068,7 @@ static PyObject *_wrap_new_Locale(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxLocale *)new wxLocale(arg1,arg2); + result = (wxLocale *)new_wxLocale(arg1,arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index e020898a52..2506f88544 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -2343,68 +2343,6 @@ class ArtProvider(object): ... return bmp - - Identifying art resources - ------------------------- - - Every bitmap is known to wx.ArtProvider under an unique ID that is - used when requesting a resource from it. The IDs can have one of these - predefined values: - - * wx.ART_ADD_BOOKMARK - * wx.ART_DEL_BOOKMARK - * wx.ART_HELP_SIDE_PANEL - * wx.ART_HELP_SETTINGS - * wx.ART_HELP_BOOK - * wx.ART_HELP_FOLDER - * wx.ART_HELP_PAGE - * wx.ART_GO_BACK - * wx.ART_GO_FORWARD - * wx.ART_GO_UP - * wx.ART_GO_DOWN - * wx.ART_GO_TO_PARENT - * wx.ART_GO_HOME - * wx.ART_FILE_OPEN - * wx.ART_PRINT - * wx.ART_HELP - * wx.ART_TIP - * wx.ART_REPORT_VIEW - * wx.ART_LIST_VIEW - * wx.ART_NEW_DIR - * wx.ART_FOLDER - * wx.ART_GO_DIR_UP - * wx.ART_EXECUTABLE_FILE - * wx.ART_NORMAL_FILE - * wx.ART_TICK_MARK - * wx.ART_CROSS_MARK - * wx.ART_ERROR - * wx.ART_QUESTION - * wx.ART_WARNING - * wx.ART_INFORMATION - * wx.ART_MISSING_IMAGE - - - Clients - ------- - - The Client is the entity that calls wx.ArtProvider's `GetBitmap` or - `GetIcon` function. Client IDs server as a hint to wx.ArtProvider - that is supposed to help it to choose the best looking bitmap. For - example it is often desirable to use slightly different icons in menus - and toolbars even though they represent the same action (e.g. - wx.ART_FILE_OPEN). Remember that this is really only a hint for - wx.ArtProvider -- it is common that `wx.ArtProvider.GetBitmap` returns - identical bitmap for different client values! - - * wx.ART_TOOLBAR - * wx.ART_MENU - * wx.ART_FRAME_ICON - * wx.ART_CMN_DIALOG - * wx.ART_HELP_BROWSER - * wx.ART_MESSAGE_BOX - * wx.ART_OTHER (used for all requests that don't fit into any - of the categories above) - """ def __repr__(self): return "<%s.%s; proxy of C++ wxPyArtProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -2429,68 +2367,6 @@ class ArtProvider(object): ... return bmp - - Identifying art resources - ------------------------- - - Every bitmap is known to wx.ArtProvider under an unique ID that is - used when requesting a resource from it. The IDs can have one of these - predefined values: - - * wx.ART_ADD_BOOKMARK - * wx.ART_DEL_BOOKMARK - * wx.ART_HELP_SIDE_PANEL - * wx.ART_HELP_SETTINGS - * wx.ART_HELP_BOOK - * wx.ART_HELP_FOLDER - * wx.ART_HELP_PAGE - * wx.ART_GO_BACK - * wx.ART_GO_FORWARD - * wx.ART_GO_UP - * wx.ART_GO_DOWN - * wx.ART_GO_TO_PARENT - * wx.ART_GO_HOME - * wx.ART_FILE_OPEN - * wx.ART_PRINT - * wx.ART_HELP - * wx.ART_TIP - * wx.ART_REPORT_VIEW - * wx.ART_LIST_VIEW - * wx.ART_NEW_DIR - * wx.ART_FOLDER - * wx.ART_GO_DIR_UP - * wx.ART_EXECUTABLE_FILE - * wx.ART_NORMAL_FILE - * wx.ART_TICK_MARK - * wx.ART_CROSS_MARK - * wx.ART_ERROR - * wx.ART_QUESTION - * wx.ART_WARNING - * wx.ART_INFORMATION - * wx.ART_MISSING_IMAGE - - - Clients - ------- - - The Client is the entity that calls wx.ArtProvider's `GetBitmap` or - `GetIcon` function. Client IDs server as a hint to wx.ArtProvider - that is supposed to help it to choose the best looking bitmap. For - example it is often desirable to use slightly different icons in menus - and toolbars even though they represent the same action (e.g. - wx.ART_FILE_OPEN). Remember that this is really only a hint for - wx.ArtProvider -- it is common that `wx.ArtProvider.GetBitmap` returns - identical bitmap for different client values! - - * wx.ART_TOOLBAR - * wx.ART_MENU - * wx.ART_FRAME_ICON - * wx.ART_CMN_DIALOG - * wx.ART_HELP_BROWSER - * wx.ART_MESSAGE_BOX - * wx.ART_OTHER (used for all requests that don't fit into any - of the categories above) - """ newobj = _misc_.new_ArtProvider(*args, **kwargs) self.this = newobj.this @@ -2652,23 +2528,22 @@ CONFIG_USE_NO_ESCAPE_CHARACTERS = _misc_.CONFIG_USE_NO_ESCAPE_CHARACTERS class ConfigBase(object): """ wx.ConfigBase class defines the basic interface of all config - classes. It can not be used by itself (it is an abstract base - class) and you will always use one of its derivations: wx.Config - or wx.FileConfig. - - wx.ConfigBase organizes the items in a tree-like structure, - modeled after the Unix/Dos filesystem. There are groups that act - like directories and entries, key/value pairs that act like - files. There is always one current group given by the current - path. As in the file system case, to specify a key in the config - class you must use a path to it. Config classes also support the - notion of the current group, which makes it possible to use - relative paths. + classes. It can not be used by itself (it is an abstract base class) + and you will always use one of its derivations: wx.Config or + wx.FileConfig. + + wx.ConfigBase organizes the items in a tree-like structure, modeled + after the Unix/Dos filesystem. There are groups that act like + directories and entries, key/value pairs that act like files. There + is always one current group given by the current path. As in the file + system case, to specify a key in the config class you must use a path + to it. Config classes also support the notion of the current group, + which makes it possible to use relative paths. Keys are pairs "key_name = value" where value may be of string, integer floating point or boolean, you can not store binary data - without first encoding it as a string. For performance reasons - items should be kept small, no more than a couple kilobytes. + without first encoding it as a string. For performance reasons items + should be kept small, no more than a couple kilobytes. """ def __init__(self): raise RuntimeError, "No constructor defined" @@ -2689,8 +2564,8 @@ class ConfigBase(object): """ Set(ConfigBase config) -> ConfigBase - Sets the global config object (the one returned by Get) and - returns a reference to the previous global config object. + Sets the global config object (the one returned by Get) and returns a + reference to the previous global config object. """ return _misc_.ConfigBase_Set(*args, **kwargs) @@ -2719,7 +2594,8 @@ class ConfigBase(object): """ DontCreateOnDemand() - Should Get() try to create a new log object if there isn't a current one? + Should Get() try to create a new log object if there isn't a current + one? """ return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs) @@ -2728,9 +2604,9 @@ class ConfigBase(object): """ SetPath(self, String path) - Set current path: if the first character is '/', it's the absolute path, - otherwise it's a relative path. '..' is supported. If the strPath - doesn't exist it is created. + Set current path: if the first character is '/', it's the absolute + path, otherwise it's a relative path. '..' is supported. If the + strPath doesn't exist it is created. """ return _misc_.ConfigBase_SetPath(*args, **kwargs) @@ -2746,10 +2622,10 @@ class ConfigBase(object): """ GetFirstGroup() -> (more, value, index) - Allows enumerating the subgroups in a config object. Returns - a tuple containing a flag indicating there are more items, the - name of the current item, and an index to pass to GetNextGroup to - fetch the next item. + Allows enumerating the subgroups in a config object. Returns a tuple + containing a flag indicating there are more items, the name of the + current item, and an index to pass to GetNextGroup to fetch the next + item. """ return _misc_.ConfigBase_GetFirstGroup(*args, **kwargs) @@ -2757,10 +2633,10 @@ class ConfigBase(object): """ GetNextGroup(long index) -> (more, value, index) - Allows enumerating the subgroups in a config object. Returns - a tuple containing a flag indicating there are more items, the - name of the current item, and an index to pass to GetNextGroup to - fetch the next item. + Allows enumerating the subgroups in a config object. Returns a tuple + containing a flag indicating there are more items, the name of the + current item, and an index to pass to GetNextGroup to fetch the next + item. """ return _misc_.ConfigBase_GetNextGroup(*args, **kwargs) @@ -2769,8 +2645,8 @@ class ConfigBase(object): GetFirstEntry() -> (more, value, index) Allows enumerating the entries in the current group in a config - object. Returns a tuple containing a flag indicating there are - more items, the name of the current item, and an index to pass to + object. Returns a tuple containing a flag indicating there are more + items, the name of the current item, and an index to pass to GetNextGroup to fetch the next item. """ return _misc_.ConfigBase_GetFirstEntry(*args, **kwargs) @@ -2780,8 +2656,8 @@ class ConfigBase(object): GetNextEntry(long index) -> (more, value, index) Allows enumerating the entries in the current group in a config - object. Returns a tuple containing a flag indicating there are - more items, the name of the current item, and an index to pass to + object. Returns a tuple containing a flag indicating there are more + items, the name of the current item, and an index to pass to GetNextGroup to fetch the next item. """ return _misc_.ConfigBase_GetNextEntry(*args, **kwargs) @@ -2790,8 +2666,8 @@ class ConfigBase(object): """ GetNumberOfEntries(self, bool recursive=False) -> size_t - Get the number of entries in the current group, with or - without its subgroups. + Get the number of entries in the current group, with or without its + subgroups. """ return _misc_.ConfigBase_GetNumberOfEntries(*args, **kwargs) @@ -2799,8 +2675,8 @@ class ConfigBase(object): """ GetNumberOfGroups(self, bool recursive=False) -> size_t - Get the number of subgroups in the current group, with or - without its subgroups. + Get the number of subgroups in the current group, with or without its + subgroups. """ return _misc_.ConfigBase_GetNumberOfGroups(*args, **kwargs) @@ -2921,7 +2797,7 @@ class ConfigBase(object): """ RenameGroup(self, String oldName, String newName) -> bool - Rename aa group. Returns False on failure (probably because the new + Rename a group. Returns False on failure (probably because the new name is already taken by an existing entry) """ return _misc_.ConfigBase_RenameGroup(*args, **kwargs) @@ -2930,8 +2806,8 @@ class ConfigBase(object): """ DeleteEntry(self, String key, bool deleteGroupIfEmpty=True) -> bool - Deletes the specified entry and the group it belongs to if - it was the last key in it and the second parameter is True + Deletes the specified entry and the group it belongs to if it was the + last key in it and the second parameter is True """ return _misc_.ConfigBase_DeleteEntry(*args, **kwargs) @@ -2956,8 +2832,9 @@ class ConfigBase(object): """ SetExpandEnvVars(self, bool doIt=True) - We can automatically expand environment variables in the config entries - (this option is on by default, you can turn it on/off at any time) + We can automatically expand environment variables in the config + entries this option is on by default, you can turn it on/off at any + time) """ return _misc_.ConfigBase_SetExpandEnvVars(*args, **kwargs) @@ -3029,8 +2906,8 @@ def ConfigBase_Set(*args, **kwargs): """ ConfigBase_Set(ConfigBase config) -> ConfigBase - Sets the global config object (the one returned by Get) and - returns a reference to the previous global config object. + Sets the global config object (the one returned by Get) and returns a + reference to the previous global config object. """ return _misc_.ConfigBase_Set(*args, **kwargs) @@ -3056,7 +2933,8 @@ def ConfigBase_DontCreateOnDemand(*args, **kwargs): """ ConfigBase_DontCreateOnDemand() - Should Get() try to create a new log object if there isn't a current one? + Should Get() try to create a new log object if there isn't a current + one? """ return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs) @@ -3121,10 +2999,10 @@ _misc_.FileConfig_swigregister(FileConfigPtr) class ConfigPathChanger(object): """ - A handy little class which changes current path to the path of - given entry and restores it in the destructoir: so if you declare - a local variable of this type, you work in the entry directory - and the path is automatically restored when the function returns. + A handy little class which changes current path to the path of given + entry and restores it in the destructoir: so if you declare a local + variable of this type, you work in the entry directory and the path is + automatically restored when the function returns. """ def __repr__(self): return "<%s.%s; proxy of C++ wxConfigPathChanger instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -3162,9 +3040,9 @@ def ExpandEnvVars(*args, **kwargs): ExpandEnvVars(String sz) -> String Replace environment variables ($SOMETHING) with their values. The - format is $VARNAME or ${VARNAME} where VARNAME contains - alphanumeric characters and '_' only. '$' must be escaped ('\$') - in order to be taken literally. + format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric + characters and '_' only. '$' must be escaped ('\$') in order to be + taken literally. """ return _misc_.ExpandEnvVars(*args, **kwargs) #--------------------------------------------------------------------------- @@ -3388,11 +3266,7 @@ class DateTime(object): GetWeekDayName = staticmethod(GetWeekDayName) def GetAmPmStrings(*args, **kwargs): - """ - GetAmPmStrings() -> (am, pm) - - Get the AM and PM strings in the current locale (may be empty) - """ + """GetAmPmStrings() -> (am, pm)""" return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) GetAmPmStrings = staticmethod(GetAmPmStrings) @@ -3866,11 +3740,7 @@ def DateTime_GetWeekDayName(*args, **kwargs): return _misc_.DateTime_GetWeekDayName(*args, **kwargs) def DateTime_GetAmPmStrings(*args, **kwargs): - """ - GetAmPmStrings() -> (am, pm) - - Get the AM and PM strings in the current locale (may be empty) - """ + """GetAmPmStrings() -> (am, pm)""" return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) def DateTime_IsDSTApplicable(*args, **kwargs): @@ -4398,14 +4268,11 @@ DF_MAX = _misc_.DF_MAX class DataFormat(object): """ A wx.DataFormat is an encapsulation of a platform-specific format - handle which is used by the system for the clipboard and drag and - drop operations. The applications are usually only interested in, - for example, pasting data from the clipboard only if the data is - in a format the program understands. A data format is is used to - uniquely identify this format. - - On the system level, a data format is usually just a number - (CLIPFORMAT under Windows or Atom under X11, for example). + handle which is used by the system for the clipboard and drag and drop + operations. The applications are usually only interested in, for + example, pasting data from the clipboard only if the data is in a + format the program understands. A data format is is used to uniquely + identify this format. """ def __repr__(self): return "<%s.%s; proxy of C++ wxDataFormat instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -4413,9 +4280,8 @@ class DataFormat(object): """ __init__(self, int type) -> DataFormat - Constructs a data format object for one of the standard data - formats or an empty data object (use SetType or SetId later in - this case) + Constructs a data format object for one of the standard data formats + or an empty data object (use SetType or SetId later in this case) """ newobj = _misc_.new_DataFormat(*args, **kwargs) self.this = newobj.this @@ -4445,7 +4311,8 @@ class DataFormat(object): """ SetType(self, int format) - Sets the format to the given value, which should be one of wx.DF_XXX constants. + Sets the format to the given value, which should be one of wx.DF_XXX + constants. """ return _misc_.DataFormat_SetType(*args, **kwargs) @@ -4461,7 +4328,8 @@ class DataFormat(object): """ GetId(self) -> String - Returns the name of a custom format (this function will fail for a standard format). + Returns the name of a custom format (this function will fail for a + standard format). """ return _misc_.DataFormat_GetId(*args, **kwargs) @@ -4486,7 +4354,8 @@ def CustomDataFormat(*args, **kwargs): """ CustomDataFormat(String format) -> DataFormat - Constructs a data format object for a custom format identified by its name. + Constructs a data format object for a custom format identified by its + name. """ val = _misc_.new_CustomDataFormat(*args, **kwargs) val.thisown = 1 @@ -5230,8 +5099,8 @@ class VideoMode(object): """ Matches(self, VideoMode other) -> bool - Returns true if this mode matches the other one in the sense that - all non zero fields of the other mode have the same value in this + Returns true if this mode matches the other one in the sense that all + non zero fields of the other mode have the same value in this one (except for refresh which is allowed to have a greater value) """ return _misc_.VideoMode_Matches(*args, **kwargs) @@ -5240,8 +5109,7 @@ class VideoMode(object): """ GetWidth(self) -> int - Returns the screen width in pixels (e.g. 640*480), 0 means - unspecified + Returns the screen width in pixels (e.g. 640*480), 0 means unspecified """ return _misc_.VideoMode_GetWidth(*args, **kwargs) @@ -5258,8 +5126,8 @@ class VideoMode(object): """ GetDepth(self) -> int - Returns the screen's bits per pixel (e.g. 32), 1 is monochrome - and 0 means unspecified/known + Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0 + means unspecified/known """ return _misc_.VideoMode_GetDepth(*args, **kwargs) @@ -5300,9 +5168,9 @@ class Display(object): """ __init__(self, size_t index=0) -> Display - Set up a Display instance with the specified display. The - displays are numbered from 0 to GetCount() - 1, 0 is always the - primary display and the only one which is always supported + Set up a Display instance with the specified display. The displays + are numbered from 0 to GetCount() - 1, 0 is always the primary display + and the only one which is always supported """ newobj = _misc_.new_Display(*args, **kwargs) self.this = newobj.this @@ -5327,8 +5195,8 @@ class Display(object): """ GetFromPoint(Point pt) -> int - Find the display where the given point lies, return wx.NOT_FOUND - if it doesn't belong to any display + Find the display where the given point lies, return wx.NOT_FOUND if it + doesn't belong to any display """ return _misc_.Display_GetFromPoint(*args, **kwargs) @@ -5337,8 +5205,8 @@ class Display(object): """ GetFromWindow(Window window) -> int - Find the display where the given window lies, return wx.NOT_FOUND - if it is not shown at all. + Find the display where the given window lies, return wx.NOT_FOUND if + it is not shown at all. """ return _misc_.Display_GetFromWindow(*args, **kwargs) @@ -5356,8 +5224,8 @@ class Display(object): """ GetGeometry(self) -> Rect - Returns the bounding rectangle of the display whose index was - passed to the constructor. + Returns the bounding rectangle of the display whose index was passed + to the constructor. """ return _misc_.Display_GetGeometry(*args, **kwargs) @@ -5382,14 +5250,13 @@ class Display(object): """ GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...] - Enumerate all video modes supported by this display matching the - given one (in the sense of VideoMode.Match()). + Enumerate all video modes supported by this display matching the given + one (in the sense of VideoMode.Match()). - As any mode matches the default value of the argument and there - is always at least one video mode supported by display, the - returned array is only empty for the default value of the - argument if this function is not supported at all on this - platform. + As any mode matches the default value of the argument and there is + always at least one video mode supported by display, the returned + array is only empty for the default value of the argument if this + function is not supported at all on this platform. """ return _misc_.Display_GetModes(*args, **kwargs) @@ -5438,8 +5305,8 @@ def Display_GetFromPoint(*args, **kwargs): """ Display_GetFromPoint(Point pt) -> int - Find the display where the given point lies, return wx.NOT_FOUND - if it doesn't belong to any display + Find the display where the given point lies, return wx.NOT_FOUND if it + doesn't belong to any display """ return _misc_.Display_GetFromPoint(*args, **kwargs) @@ -5447,8 +5314,8 @@ def Display_GetFromWindow(*args, **kwargs): """ Display_GetFromWindow(Window window) -> int - Find the display where the given window lies, return wx.NOT_FOUND - if it is not shown at all. + Find the display where the given window lies, return wx.NOT_FOUND if + it is not shown at all. """ return _misc_.Display_GetFromWindow(*args, **kwargs) diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index 82b7e11b65..29ec1693e5 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -808,7 +808,7 @@ public: int GetNumberJoysticks() { return -1; } int GetManufacturerId() { return -1; } int GetProductId() { return -1; } - wxString GetProductName() { return ""; } + wxString GetProductName() { return wxEmptyString; } int GetXMin() { return -1; } int GetYMin() { return -1; } int GetZMin() { return -1; } diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index e074eb0d5f..3257723ad2 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -36,8 +36,8 @@ class Panel(_core.Window): """ InitDialog(self) - Sends an EVT_INIT_DIALOG event, whose handler usually transfers - data to the dialog via validators. + Sends an EVT_INIT_DIALOG event, whose handler usually transfers data + to the dialog via validators. """ return _windows_.Panel_InitDialog(*args, **kwargs) @@ -45,15 +45,15 @@ class Panel(_core.Window): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.Panel_GetClassDefaultAttributes(*args, **kwargs) @@ -76,15 +76,15 @@ def Panel_GetClassDefaultAttributes(*args, **kwargs): """ Panel_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.Panel_GetClassDefaultAttributes(*args, **kwargs) @@ -139,11 +139,7 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_SetScrollRate(*args, **kwargs) def GetScrollPixelsPerUnit(*args, **kwargs): - """ - GetScrollPixelsPerUnit() -> (xUnit, yUnit) - - Get the size of one logical unit in physical units. - """ + """GetScrollPixelsPerUnit() -> (xUnit, yUnit)""" return _windows_.ScrolledWindow_GetScrollPixelsPerUnit(*args, **kwargs) def EnableScrolling(*args, **kwargs): @@ -151,11 +147,7 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_EnableScrolling(*args, **kwargs) def GetViewStart(*args, **kwargs): - """ - GetViewStart() -> (x,y) - - Get the view start - """ + """GetViewStart() -> (x,y)""" return _windows_.ScrolledWindow_GetViewStart(*args, **kwargs) def SetScale(*args, **kwargs): @@ -208,15 +200,15 @@ class ScrolledWindow(Panel): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.ScrolledWindow_GetClassDefaultAttributes(*args, **kwargs) @@ -239,15 +231,15 @@ def ScrolledWindow_GetClassDefaultAttributes(*args, **kwargs): """ ScrolledWindow_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.ScrolledWindow_GetClassDefaultAttributes(*args, **kwargs) @@ -477,15 +469,15 @@ class Frame(TopLevelWindow): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.Frame_GetClassDefaultAttributes(*args, **kwargs) @@ -508,15 +500,15 @@ def Frame_GetClassDefaultAttributes(*args, **kwargs): """ Frame_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.Frame_GetClassDefaultAttributes(*args, **kwargs) @@ -577,15 +569,15 @@ class Dialog(TopLevelWindow): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.Dialog_GetClassDefaultAttributes(*args, **kwargs) @@ -608,15 +600,15 @@ def Dialog_GetClassDefaultAttributes(*args, **kwargs): """ Dialog_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.Dialog_GetClassDefaultAttributes(*args, **kwargs) @@ -799,15 +791,15 @@ class StatusBar(_core.Window): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.StatusBar_GetClassDefaultAttributes(*args, **kwargs) @@ -830,15 +822,15 @@ def StatusBar_GetClassDefaultAttributes(*args, **kwargs): """ StatusBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.StatusBar_GetClassDefaultAttributes(*args, **kwargs) @@ -860,10 +852,9 @@ SPLIT_DRAG_DRAGGING = _windows_.SPLIT_DRAG_DRAGGING SPLIT_DRAG_LEFT_DOWN = _windows_.SPLIT_DRAG_LEFT_DOWN class SplitterWindow(_core.Window): """ - wx.SplitterWindow manages up to two subwindows or panes, - with an optional vertical or horizontal split which can be - used with the mouse or programmatically. - + wx.SplitterWindow manages up to two subwindows or panes, with an + optional vertical or horizontal split which can be used with the mouse + or programmatically. """ def __repr__(self): return "<%s.%s; proxy of C++ wxSplitterWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -911,8 +902,8 @@ class SplitterWindow(_core.Window): SetSplitMode(self, int mode) Sets the split mode. The mode can be wx.SPLIT_VERTICAL or - wx.SPLIT_HORIZONTAL. This only sets the internal variable; - does not update the display. + wx.SPLIT_HORIZONTAL. This only sets the internal variable; does not + update the display. """ return _windows_.SplitterWindow_SetSplitMode(*args, **kwargs) @@ -928,9 +919,9 @@ class SplitterWindow(_core.Window): """ Initialize(self, Window window) - Initializes the splitter window to have one pane. This - should be called if you wish to initially view only a single - pane in the splitter window. + Initializes the splitter window to have one pane. This should be + called if you wish to initially view only a single pane in the + splitter window. """ return _windows_.SplitterWindow_Initialize(*args, **kwargs) @@ -939,24 +930,6 @@ class SplitterWindow(_core.Window): SplitVertically(self, Window window1, Window window2, int sashPosition=0) -> bool Initializes the left and right panes of the splitter window. - - window1 The left pane. - window2 The right pane. - sashPosition The initial position of the sash. If this - value is positive, it specifies the size - of the left pane. If it is negative, it is - absolute value gives the size of the right - pane. Finally, specify 0 (default) to - choose the default position (half of the - total window width). - - Returns True if successful, False otherwise (the window was - already split). - - SplitVertically should be called if you wish to initially - view two panes. It can also be called at any subsequent - time, but the application should check that the window is - not currently split using IsSplit. """ return _windows_.SplitterWindow_SplitVertically(*args, **kwargs) @@ -965,24 +938,6 @@ class SplitterWindow(_core.Window): SplitHorizontally(self, Window window1, Window window2, int sashPosition=0) -> bool Initializes the top and bottom panes of the splitter window. - - window1 The top pane. - window2 The bottom pane. - sashPosition The initial position of the sash. If this - value is positive, it specifies the size - of the upper pane. If it is negative, it - is absolute value gives the size of the - lower pane. Finally, specify 0 (default) - to choose the default position (half of - the total window height). - - Returns True if successful, False otherwise (the window was - already split). - - SplitHorizontally should be called if you wish to initially - view two panes. It can also be called at any subsequent - time, but the application should check that the window is - not currently split using IsSplit. """ return _windows_.SplitterWindow_SplitHorizontally(*args, **kwargs) @@ -990,9 +945,9 @@ class SplitterWindow(_core.Window): """ Unsplit(self, Window toRemove=None) -> bool - Unsplits the window. Pass the pane to remove, or None to - remove the right or bottom pane. Returns True if - successful, False otherwise (the window was not split). + Unsplits the window. Pass the pane to remove, or None to remove the + right or bottom pane. Returns True if successful, False otherwise (the + window was not split). This function will not actually delete the pane being removed; it sends EVT_SPLITTER_UNSPLIT which can be handled @@ -1006,18 +961,16 @@ class SplitterWindow(_core.Window): ReplaceWindow(self, Window winOld, Window winNew) -> bool This function replaces one of the windows managed by the - SplitterWindow with another one. It is in general better to - use it instead of calling Unsplit() and then resplitting the - window back because it will provoke much less flicker. It is - valid to call this function whether the splitter has two - windows or only one. - - Both parameters should be non-None and winOld must specify - one of the windows managed by the splitter. If the - parameters are incorrect or the window couldn't be replaced, - False is returned. Otherwise the function will return True, - but please notice that it will not Destroy the replaced - window and you may wish to do it yourself. + SplitterWindow with another one. It is in general better to use it + instead of calling Unsplit() and then resplitting the window back + because it will provoke much less flicker. It is valid to call this + function whether the splitter has two windows or only one. + + Both parameters should be non-None and winOld must specify one of the + windows managed by the splitter. If the parameters are incorrect or + the window couldn't be replaced, False is returned. Otherwise the + function will return True, but please notice that it will not Destroy + the replaced window and you may wish to do it yourself. """ return _windows_.SplitterWindow_ReplaceWindow(*args, **kwargs) @@ -1025,16 +978,15 @@ class SplitterWindow(_core.Window): """ UpdateSize(self) - Causes any pending sizing of the sash and child panes to - take place immediately. + Causes any pending sizing of the sash and child panes to take place + immediately. - Such resizing normally takes place in idle time, in order to - wait for layout to be completed. However, this can cause - unacceptable flicker as the panes are resized after the - window has been shown. To work around this, you can perform - window layout (for example by sending a size event to the - parent window), and then call this function, before showing - the top-level window. + Such resizing normally takes place in idle time, in order to wait for + layout to be completed. However, this can cause unacceptable flicker + as the panes are resized after the window has been shown. To work + around this, you can perform window layout (for example by sending a + size event to the parent window), and then call this function, before + showing the top-level window. """ return _windows_.SplitterWindow_UpdateSize(*args, **kwargs) @@ -1082,8 +1034,8 @@ class SplitterWindow(_core.Window): """ SetSashPosition(self, int position, bool redraw=True) - Sets the sash position, in pixels. If redraw is Ttrue then - the panes are resized and the sash and border are redrawn. + Sets the sash position, in pixels. If redraw is Ttrue then the panes + are resized and the sash and border are redrawn. """ return _windows_.SplitterWindow_SetSashPosition(*args, **kwargs) @@ -1101,13 +1053,12 @@ class SplitterWindow(_core.Window): Sets the minimum pane size in pixels. - The default minimum pane size is zero, which means that - either pane can be reduced to zero by dragging the sash, - thus removing one of the panes. To prevent this behaviour (and - veto out-of-range sash dragging), set a minimum size, - for example 20 pixels. If the wx.SP_PERMIT_UNSPLIT style is - used when a splitter window is created, the window may be - unsplit even if minimum size is non-zero. + The default minimum pane size is zero, which means that either pane + can be reduced to zero by dragging the sash, thus removing one of the + panes. To prevent this behaviour (and veto out-of-range sash + dragging), set a minimum size, for example 20 pixels. If the + wx.SP_PERMIT_UNSPLIT style is used when a splitter window is created, + the window may be unsplit even if minimum size is non-zero. """ return _windows_.SplitterWindow_SetMinimumPaneSize(*args, **kwargs) @@ -1147,15 +1098,15 @@ class SplitterWindow(_core.Window): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.SplitterWindow_GetClassDefaultAttributes(*args, **kwargs) @@ -1183,15 +1134,15 @@ def SplitterWindow_GetClassDefaultAttributes(*args, **kwargs): """ SplitterWindow_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _windows_.SplitterWindow_GetClassDefaultAttributes(*args, **kwargs) @@ -1213,14 +1164,12 @@ class SplitterEvent(_core.NotifyEvent): """ SetSashPosition(self, int pos) - This funciton is only meaningful during - EVT_SPLITTER_SASH_POS_CHANGING and - EVT_SPLITTER_SASH_POS_CHANGED events. In the case of - _CHANGED events, sets the the new sash position. In the case - of _CHANGING events, sets the new tracking bar position so - visual feedback during dragging will represent that change - that will actually take place. Set to -1 from the event - handler code to prevent repositioning. + This funciton is only meaningful during EVT_SPLITTER_SASH_POS_CHANGING + and EVT_SPLITTER_SASH_POS_CHANGED events. In the case of _CHANGED + events, sets the the new sash position. In the case of _CHANGING + events, sets the new tracking bar position so visual feedback during + dragging will represent that change that will actually take place. Set + to -1 from the event handler code to prevent repositioning. """ return _windows_.SplitterEvent_SetSashPosition(*args, **kwargs) @@ -1228,9 +1177,8 @@ class SplitterEvent(_core.NotifyEvent): """ GetSashPosition(self) -> int - Returns the new sash position while in - EVT_SPLITTER_SASH_POS_CHANGING and - EVT_SPLITTER_SASH_POS_CHANGED events. + Returns the new sash position while in EVT_SPLITTER_SASH_POS_CHANGING + and EVT_SPLITTER_SASH_POS_CHANGED events. """ return _windows_.SplitterEvent_GetSashPosition(*args, **kwargs) @@ -1238,8 +1186,8 @@ class SplitterEvent(_core.NotifyEvent): """ GetWindowBeingRemoved(self) -> Window - Returns a pointer to the window being removed when a - splitter window is unsplit. + Returns a pointer to the window being removed when a splitter window + is unsplit. """ return _windows_.SplitterEvent_GetWindowBeingRemoved(*args, **kwargs) @@ -1809,7 +1757,7 @@ class VScrolledWindow(Panel): """ ScrollPages(self, int pages) -> bool - If the platform and window class supports it, scrolls the window by + If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done. @@ -2269,17 +2217,6 @@ class DirDialog(Dialog): """ wx.DirDialog allows the user to select a directory by browising the file system. - - - Window Styles - -------------- - ==================== ========================================== - wx.DD_NEW_DIR_BUTTON Add 'Create new directory' button and allow - directory names to be editable. On Windows - the new directory button is only available - with recent versions of the common dialogs. - ==================== ========================================== - """ def __repr__(self): return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -2350,45 +2287,6 @@ class FileDialog(Dialog): """ wx.FileDialog allows the user to select one or more files from the filesystem. - - In Windows, this is the common file selector dialog. On X based - platforms a generic alternative is used. The path and filename are - distinct elements of a full file pathname. If path is "", the - current directory will be used. If filename is "", no default - filename will be supplied. The wildcard determines what files are - displayed in the file selector, and file extension supplies a type - extension for the required filename. - - Both the X and Windows versions implement a wildcard filter. Typing a - filename containing wildcards (*, ?) in the filename text item, and - clicking on Ok, will result in only those files matching the pattern - being displayed. The wildcard may be a specification for multiple - types of file with a description for each, such as:: - - "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" - - - Window Styles - -------------- - ================== ========================================== - wx.OPEN This is an open dialog. - - wx.SAVE This is a save dialog. - - wx.HIDE_READONLY For open dialog only: hide the checkbox - allowing to open the file in read-only mode. - - wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation - if a file will be overwritten. - - wx.MULTIPLE For open dialog only: allows selecting multiple - files. - - wx.CHANGE_DIR Change the current working directory to the - directory where the file(s) chosen by the user - are. - ================== ========================================== - """ def __repr__(self): return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -2575,12 +2473,7 @@ class MultiChoiceDialog(Dialog): self._setOORInfo(self) def SetSelections(*args, **kwargs): - """ - SetSelections(List selections) - - Specify the items in the list that should be selected, using a list of - integers. - """ + """SetSelections(List selections)""" return _windows_.MultiChoiceDialog_SetSelections(*args, **kwargs) def GetSelections(*args, **kwargs): @@ -2885,27 +2778,6 @@ class MessageDialog(Dialog): """ This class provides a simple dialog that shows a single or multi-line message, with a choice of OK, Yes, No and/or Cancel buttons. - - - Window Styles - -------------- - ================= ============================================= - wx.OK Show an OK button. - wx.CANCEL Show a Cancel button. - wx.YES_NO Show Yes and No buttons. - wx.YES_DEFAULT Used with wxYES_NO, makes Yes button the - default - which is the default behaviour. - wx.NO_DEFAULT Used with wxYES_NO, makes No button the default. - wx.ICON_EXCLAMATION Shows an exclamation mark icon. - wx.ICON_HAND Shows an error icon. - wx.ICON_ERROR Shows an error icon - the same as wxICON_HAND. - wx.ICON_QUESTION Shows a question mark icon. - wx.ICON_INFORMATION Shows an information (i) icon. - wx.STAY_ON_TOP The message box stays on top of all other - window, even those of the other applications - (Windows only). - ================= ============================================= - """ def __repr__(self): return "<%s.%s; proxy of C++ wxMessageDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -2935,34 +2807,6 @@ class ProgressDialog(Frame): """ A dialog that shows a short message and a progress bar. Optionally, it can display an ABORT button. - - Window Styles - -------------- - ================= ============================================= - wx.PD_APP_MODAL Make the progress dialog modal. If this flag is - not given, it is only "locally" modal - - that is the input to the parent window is - disabled, but not to the other ones. - - wx.PD_AUTO_HIDE Causes the progress dialog to disappear from - screen as soon as the maximum value of the - progress meter has been reached. - - wx.PD_CAN_ABORT This flag tells the dialog that it should have - a "Cancel" button which the user may press. If - this happens, the next call to Update() will - return false. - - wx.PD_ELAPSED_TIME This flag tells the dialog that it should show - elapsed time (since creating the dialog). - - wx.PD_ESTIMATED_TIME This flag tells the dialog that it should show - estimated time. - - wx.PD_REMAINING_TIME This flag tells the dialog that it should show - remaining time. - ================= ============================================= - """ def __repr__(self): return "<%s.%s; proxy of C++ wxProgressDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -3115,19 +2959,6 @@ class FindReplaceData(_core.Object): Note that all SetXXX() methods may only be called before showing the dialog and calling them has no effect later. - - Flags - ----- - ================ =============================================== - wx.FR_DOWN Downward search/replace selected (otherwise, - upwards) - - wx.FR_WHOLEWORD Whole word search/replace selected - - wx.FR_MATCHCASE Case sensitive search/replace selected - (otherwise, case insensitive) - ================ =============================================== - """ def __repr__(self): return "<%s.%s; proxy of C++ wxFindReplaceData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -3212,21 +3043,6 @@ class FindReplaceDialog(Dialog): that unlike for the other standard dialogs this one must have a parent window. Also note that there is no way to use this dialog in a modal way; it is always, by design and implementation, modeless. - - - Window Styles - ------------- - - ===================== ========================================= - wx.FR_REPLACEDIALOG replace dialog (otherwise find dialog) - - wx.FR_NOUPDOWN don't allow changing the search direction - - wx.FR_NOMATCHCASE don't allow case sensitive searching - - wx.FR_NOWHOLEWORD don't allow whole word searching - ===================== ========================================= - """ def __repr__(self): return "<%s.%s; proxy of C++ wxFindReplaceDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py index dd91a875cd..041c2a46c3 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/calendar.py @@ -190,44 +190,6 @@ class CalendarCtrl(_core.Control): As the attributes are specified for each day, they may change when the month is changed, so you will often want to update them in an EVT_CALENDAR_MONTH event handler. - - Window Styles - ------------- - ============================== ============================ - CAL_SUNDAY_FIRST Show Sunday as the first day - in the week - CAL_MONDAY_FIRST Show Monday as the first day - in the week - CAL_SHOW_HOLIDAYS Highlight holidays in the - calendar - CAL_NO_YEAR_CHANGE Disable the year changing - CAL_NO_MONTH_CHANGE Disable the month (and, - implicitly, the year) changing - CAL_SHOW_SURROUNDING_WEEKS Show the neighbouring weeks in - the previous and next months - CAL_SEQUENTIAL_MONTH_SELECTION Use alternative, more compact, - style for the month and year - selection controls. - - The default calendar style is CAL_SHOW_HOLIDAYS. - - Events - ------- - =========================== ============================== - EVT_CALENDAR A day was double clicked in the - calendar. - EVT_CALENDAR_SEL_CHANGED The selected date changed. - EVT_CALENDAR_DAY The selected day changed. - EVT_CALENDAR_MONTH The selected month changed. - EVT_CALENDAR_YEAR The selected year changed. - EVT_CALENDAR_WEEKDAY_CLICKED User clicked on the week day - header - - Note that changing the selected date will result in one of - EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED - event. - - """ def __repr__(self): return "<%s.%s; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -462,15 +424,7 @@ class CalendarCtrl(_core.Control): Returns 3-tuple with information about the given position on the calendar control. The first value of the tuple is a result code and - determines the validity of the remaining two values. The result codes - are: - - =================== ============================================ - CAL_HITTEST_NOWHERE hit outside of anything - CAL_HITTEST_HEADER hit on the header, weekday is valid - CAL_HITTEST_DAY hit on a day in the calendar, date is set. - =================== ============================================ - + determines the validity of the remaining two values. """ return _calendar.CalendarCtrl_HitTest(*args, **kwargs) @@ -494,15 +448,15 @@ class CalendarCtrl(_core.Control): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs) @@ -531,15 +485,15 @@ def CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs): """ CalendarCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs) diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index 8b7e59af67..d25347e163 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -1186,13 +1186,14 @@ class GridCellCoords(object): """__ne__(self, GridCellCoords other) -> bool""" return _grid.GridCellCoords___ne__(*args, **kwargs) - def asTuple(*args, **kwargs): - """asTuple(self) -> PyObject""" - return _grid.GridCellCoords_asTuple(*args, **kwargs) - - def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple()) - def __len__(self): return len(self.asTuple()) + def Get(*args, **kwargs): + """Get(self) -> PyObject""" + return _grid.GridCellCoords_Get(*args, **kwargs) + + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") + def __str__(self): return str(self.Get()) + def __repr__(self): return 'wxGridCellCoords'+str(self.Get()) + def __len__(self): return len(self.Get()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): if index == 0: self.SetRow(val) @@ -1987,15 +1988,15 @@ class Grid(_windows.ScrolledWindow): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs) @@ -2012,15 +2013,15 @@ def Grid_GetClassDefaultAttributes(*args, **kwargs): """ Grid_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs) diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index ba75795c67..91bec8fbcc 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -1409,7 +1409,7 @@ PyObject* wxGridCellCoordsArray_helper(const wxGridCellCoordsArray& source) return list; } -PyObject *wxGridCellCoords_asTuple(wxGridCellCoords *self){ +PyObject *wxGridCellCoords_Get(wxGridCellCoords *self){ PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); @@ -7981,7 +7981,7 @@ static PyObject *_wrap_GridCellCoords___ne__(PyObject *self, PyObject *args, PyO } -static PyObject *_wrap_GridCellCoords_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_GridCellCoords_Get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridCellCoords *arg1 = (wxGridCellCoords *) 0 ; PyObject *result; @@ -7990,12 +7990,12 @@ static PyObject *_wrap_GridCellCoords_asTuple(PyObject *self, PyObject *args, Py (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridCellCoords_asTuple",kwnames,&obj0)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridCellCoords_Get",kwnames,&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridCellCoords, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (PyObject *)wxGridCellCoords_asTuple(arg1); + result = (PyObject *)wxGridCellCoords_Get(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -15697,7 +15697,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"GridCellCoords_Set", (PyCFunction) _wrap_GridCellCoords_Set, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridCellCoords___eq__", (PyCFunction) _wrap_GridCellCoords___eq__, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridCellCoords___ne__", (PyCFunction) _wrap_GridCellCoords___ne__, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridCellCoords_asTuple", (PyCFunction) _wrap_GridCellCoords_asTuple, METH_VARARGS | METH_KEYWORDS }, + { (char *)"GridCellCoords_Get", (PyCFunction) _wrap_GridCellCoords_Get, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridCellCoords_swigregister", GridCellCoords_swigregister, METH_VARARGS }, { (char *)"new_Grid", (PyCFunction) _wrap_new_Grid, METH_VARARGS | METH_KEYWORDS }, { (char *)"Grid_CreateGrid", (PyCFunction) _wrap_Grid_CreateGrid, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index d663dea0f7..3e5505565e 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -1093,15 +1093,15 @@ class HtmlWindow(_windows.ScrolledWindow): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _html.HtmlWindow_GetClassDefaultAttributes(*args, **kwargs) @@ -1128,15 +1128,15 @@ def HtmlWindow_GetClassDefaultAttributes(*args, **kwargs): """ HtmlWindow_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - Get the default attributes for this class. This is useful if - you want to use the same font or colour in your own control as - in a standard control -- which is a much better idea than hard - coding specific colours or fonts which might look completely out - of place on the users system, especially if it uses themes. + Get the default attributes for this class. This is useful if you want + to use the same font or colour in your own control as in a standard + control -- which is a much better idea than hard coding specific + colours or fonts which might look completely out of place on the users + system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is - ignore under other platforms. Under Mac, it will change the size of the - returned font. See SetWindowVariant for more about this. + ignore under other platforms. Under Mac, it will change the size of + the returned font. See SetWindowVariant for more about this. """ return _html.HtmlWindow_GetClassDefaultAttributes(*args, **kwargs) -- 2.45.2