self.thisown = 1
del newobj.thisown
def GetFloor(*args, **kwargs):
- """GetFloor() -> (x,y)"""
+ """
+ GetFloor() -> (x,y)
+
+ Convert to integer
+ """
return _core_.Point2D_GetFloor(*args, **kwargs)
def GetRounded(*args, **kwargs):
- """GetRounded() -> (x,y)"""
+ """
+ GetRounded() -> (x,y)
+
+ Convert to integer
+ """
return _core_.Point2D_GetRounded(*args, **kwargs)
def GetVectorLength(*args, **kwargs):
MakeKey = staticmethod(MakeKey)
def FindFirstUnusedColour(*args, **kwargs):
- """FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)"""
+ """
+ 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.
+ """
return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
return _core_.Image_HasAlpha(*args, **kwargs)
def FindFirstUnusedColour(*args, **kwargs):
- """FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)"""
+ """
+ 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.
+ """
return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
def SetMaskFromImage(*args, **kwargs):
return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
def SetDirection(*args, **kwargs):
- """SetDirection(self, bool bForward)"""
+ """SetDirection(self, bool forward)"""
return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
def IsWindowChange(*args, **kwargs):
return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
def SetWindowChange(*args, **kwargs):
- """SetWindowChange(self, bool bIs)"""
+ """SetWindowChange(self, bool ischange)"""
return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
+ def SetFlags(*args, **kwargs):
+ """SetFlags(self, long flags)"""
+ return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
+
def GetCurrentFocus(*args, **kwargs):
"""GetCurrentFocus(self) -> Window"""
return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
"""SetCurrentFocus(self, Window win)"""
return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
+ IsForward = _core_.NavigationKeyEvent_IsForward
+ WinChange = _core_.NavigationKeyEvent_WinChange
class NavigationKeyEventPtr(NavigationKeyEvent):
def __init__(self, this):
"""
return _core_.Window_MoveXY(*args, **kwargs)
+ def SetBestFittingSize(*args, **kwargs):
+ """
+ SetBestFittingSize(self, Size size=DefaultSize)
+
+ A 'Smart' SetSize that will fill in default size components with the
+ window's *best size* values. Also set's the minsize for use with sizers.
+ """
+ return _core_.Window_SetBestFittingSize(*args, **kwargs)
+
def Raise(*args, **kwargs):
"""
Raise(self)
def SetSizeHints(*args):
"""
+ SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
- SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
Allows specification of minimum and maximum window sizes, and window
size increments. If a pair of values is not set (or set to -1), the
default values will be used. If this function is called, the user
- will not be able to size the window outside the given bounds. The
- resizing increments are only significant under Motif or Xt.
+ will not be able to size the window outside the given bounds (if it is
+ a top-level window.) Sizers will also inspect the minimum window size
+ and will use that value if set when calculating layout.
+
+ The resizing increments are only significant under Motif or Xt.
"""
return _core_.Window_SetSizeHints(*args)
def SetVirtualSizeHints(*args):
"""
- SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
SetVirtualSizeHints(self, Size minSize, Size maxSize=DefaultSize)
+ SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
Allows specification of minimum and maximum virtual window sizes. If a
pair of values is not set (or set to -1), the default values will be
"""
return _core_.Window_SetVirtualSizeHints(*args)
+ def GetMaxSize(*args, **kwargs):
+ """GetMaxSize(self) -> Size"""
+ return _core_.Window_GetMaxSize(*args, **kwargs)
+
+ def GetMinSize(*args, **kwargs):
+ """GetMinSize(self) -> Size"""
+ return _core_.Window_GetMinSize(*args, **kwargs)
+
+ def SetMinSize(*args, **kwargs):
+ """
+ SetMinSize(self, Size minSize)
+
+ A more convenient method than `SetSizeHints` for setting just the
+ min size.
+ """
+ return _core_.Window_SetMinSize(*args, **kwargs)
+
+ def SetMaxSize(*args, **kwargs):
+ """
+ SetMaxSize(self, Size maxSize)
+
+ A more convenient method than `SetSizeHints` for setting just the
+ max size.
+ """
+ return _core_.Window_SetMaxSize(*args, **kwargs)
+
def GetMinWidth(*args, **kwargs):
"""GetMinWidth(self) -> int"""
return _core_.Window_GetMinWidth(*args, **kwargs)
"""GetMaxHeight(self) -> int"""
return _core_.Window_GetMaxHeight(*args, **kwargs)
- def GetMaxSize(*args, **kwargs):
- """GetMaxSize(self) -> Size"""
- return _core_.Window_GetMaxSize(*args, **kwargs)
-
- def GetMinSize(*args, **kwargs):
- """GetMinSize(self) -> Size"""
- return _core_.Window_GetMinSize(*args, **kwargs)
-
def SetVirtualSize(*args, **kwargs):
"""
SetVirtualSize(self, Size size)
"""
return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
+ def Navigate(*args, **kwargs):
+ """
+ Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
+
+ Does keyboard navigation from this window to another, by sending a
+ `wx.NavigationKeyEvent`.
+ """
+ return _core_.Window_Navigate(*args, **kwargs)
+
def GetChildren(*args, **kwargs):
"""
GetChildren(self) -> PyObject
Sets the background colour of the window. Returns True if the colour
was changed. The background colour is usually painted by the default
EVT_ERASE_BACKGROUND event handler function under Windows and
- automatically under GTK.
+ automatically under GTK. Using `wx.NullColour` will reset the window
+ to the default background colour.
Note that setting the background colour may not cause an immediate
- refresh, so you may wish to call ClearBackground or Refresh after
+ refresh, so you may wish to call `ClearBackground` or `Refresh` after
calling this function.
- Use this function with care under GTK+ as the new appearance of the
- window might not look equally well when used with themes, i.e GTK+'s
- ability to change its look as the user wishes with run-time loadable
- modules.
+ Using this function will disable attempts to use themes for this
+ window, if the system supports them. Use with care since usually the
+ themes represent the appearance chosen by the user to be used for all
+ applications on the system.
"""
return _core_.Window_SetBackgroundColour(*args, **kwargs)
return _core_.Window_GetCharWidth(*args, **kwargs)
def GetTextExtent(*args, **kwargs):
- """GetTextExtent(String string) -> (width, height)"""
+ """
+ GetTextExtent(String string) -> (width, height)
+
+ Get the width and height of the text using the current font.
+ """
return _core_.Window_GetTextExtent(*args, **kwargs)
def GetFullTextExtent(*args, **kwargs):
def PopupMenuXY(*args, **kwargs):
"""
- PopupMenuXY(self, Menu menu, int x, int y) -> bool
+ PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
- Pops up the given menu at the specified coordinates, relative to this
- window, and returns control when the user has dismissed the menu. If a
- menu item is selected, the corresponding menu event is generated and
- will be processed as usual.
+ Pops up the given menu at the specified coordinates, relative to this window,
+ and returns control when the user has dismissed the menu. If a menu item is
+ selected, the corresponding menu event is generated and will be processed as
+ usual. If the default position is given then the current position of the
+ mouse cursor will be used.
"""
return _core_.Window_PopupMenuXY(*args, **kwargs)
def PopupMenu(*args, **kwargs):
"""
- PopupMenu(self, Menu menu, Point pos) -> bool
+ PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
- Pops up the given menu at the specified coordinates, relative to this
- window, and returns control when the user has dismissed the menu. If a
- menu item is selected, the corresponding menu event is generated and
- will be processed as usual.
+ Pops up the given menu at the specified coordinates, relative to this window,
+ and returns control when the user has dismissed the menu. If a menu item is
+ selected, the corresponding menu event is generated and will be processed as
+ usual. If the default position is given then the current position of the
+ mouse cursor will be used.
"""
return _core_.Window_PopupMenu(*args, **kwargs)
"""
return _core_.Control_SetLabel(*args, **kwargs)
- def GetClassDefaultAttributes(*args, **kwargs):
+ def GetAdjustMinSizeFlag(*args, **kwargs):
"""
- GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+ GetAdjustMinSizeFlag(self) -> bool
- 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
- user's system, especially if it uses themes.
+ Returns whether the minsize should be adjusted for this control when
+ `SetLabel` or `SetFont` are called.
+ """
+ return _core_.Control_GetAdjustMinSizeFlag(*args, **kwargs)
- 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 `wx.Window.SetWindowVariant` for more about
- this.
+ def SetAdjustMinSizeFlag(*args, **kwargs):
+ """
+ SetAdjustMinSizeFlag(self, bool adjust)
+
+ By default controls will readjust their size and minsize when
+ `SetLabel` or `SetFont` are called. This flag will allow you to
+ control this behavior.
"""
+ return _core_.Control_SetAdjustMinSizeFlag(*args, **kwargs)
+
+ def GetClassDefaultAttributes(*args, **kwargs):
+ """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes"""
return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
return val
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
- user's 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 `wx.Window.SetWindowVariant` for more about
- this.
- """
+ """Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes"""
return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
#---------------------------------------------------------------------------
return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
def GetRowHeights(*args, **kwargs):
- """GetRowHeights(self) -> list"""
+ """
+ GetRowHeights(self) -> list
+
+ Returns a list of integers representing the heights of each of the
+ rows in the sizer.
+ """
return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
def GetColWidths(*args, **kwargs):
- """GetColWidths(self) -> list"""
+ """
+ GetColWidths(self) -> list
+
+ Returns a list of integers representing the widths of each of the
+ columns in the sizer.
+ """
return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)