STATIC_BORDER = _core.STATIC_BORDER
TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW
NO_BORDER = _core.NO_BORDER
-USER_COLOURS = _core.USER_COLOURS
-NO_3D = _core.NO_3D
TAB_TRAVERSAL = _core.TAB_TRAVERSAL
WANTS_CHARS = _core.WANTS_CHARS
POPUP_WINDOW = _core.POPUP_WINDOW
CENTER_FRAME = _core.CENTER_FRAME
CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN
CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN
-STAY_ON_TOP = _core.STAY_ON_TOP
-ICONIZE = _core.ICONIZE
-MINIMIZE = _core.MINIMIZE
-MAXIMIZE = _core.MAXIMIZE
-CLOSE_BOX = _core.CLOSE_BOX
-THICK_FRAME = _core.THICK_FRAME
-SYSTEM_MENU = _core.SYSTEM_MENU
-MINIMIZE_BOX = _core.MINIMIZE_BOX
-MAXIMIZE_BOX = _core.MAXIMIZE_BOX
-TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ
-TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT
-RESIZE_BOX = _core.RESIZE_BOX
-RESIZE_BORDER = _core.RESIZE_BORDER
-DIALOG_MODAL = _core.DIALOG_MODAL
-DIALOG_MODELESS = _core.DIALOG_MODELESS
-DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT
-DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE
-DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE
-FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW
-FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT
-FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU
-FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR
-FRAME_SHAPED = _core.FRAME_SHAPED
ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN
ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM
ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT
GROW = _core.GROW
EXPAND = _core.EXPAND
SHAPED = _core.SHAPED
-ADJUST_MINSIZE = _core.ADJUST_MINSIZE
+FIXED_MINSIZE = _core.FIXED_MINSIZE
TILE = _core.TILE
+ADJUST_MINSIZE = _core.ADJUST_MINSIZE
BORDER_DEFAULT = _core.BORDER_DEFAULT
BORDER_NONE = _core.BORDER_NONE
BORDER_STATIC = _core.BORDER_STATIC
"""GetHeight() -> int"""
return _core.Size_GetHeight(*args, **kwargs)
+ def IsFullySpecified(*args, **kwargs):
+ """
+ IsFullySpecified() -> bool
+
+ Returns True if both components of the size are non-default values.
+ """
+ return _core.Size_IsFullySpecified(*args, **kwargs)
+
+ def SetDefaults(*args, **kwargs):
+ """
+ SetDefaults(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.
+ """
+ return _core.Size_SetDefaults(*args, **kwargs)
+
def Get(*args, **kwargs):
"""
Get() -> (width,height)
"""GetHeight() -> int"""
return _core.Image_GetHeight(*args, **kwargs)
+ def GetSize(*args, **kwargs):
+ """GetSize() -> Size"""
+ return _core.Image_GetSize(*args, **kwargs)
+
def GetSubImage(*args, **kwargs):
"""GetSubImage(Rect rect) -> Image"""
return _core.Image_GetSubImage(*args, **kwargs)
val.thisown = 1
return val
-def EmptyImage(*args, **kwargs):
- """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
- val = _core.new_EmptyImage(*args, **kwargs)
+def EmptyImage(*args):
+ """
+ EmptyImage(int width=0, int height=0, bool clear=True) -> Image
+ EmptyImage(Size size, bool clear=True) -> Image
+ """
+ val = _core.new_EmptyImage(*args)
val.thisown = 1
return val
"""
GetComCtl32Version() -> int
- Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it
- wasn't found at all. Raises an exception on non-Windows platforms.
+ Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
+ 0 if it wasn't found at all. Raises an exception on non-Windows
+ platforms.
"""
return _core.PyApp_GetComCtl32Version(*args, **kwargs)
"""
PyApp_GetComCtl32Version() -> int
- Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it
- wasn't found at all. Raises an exception on non-Windows platforms.
+ Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
+ 0 if it wasn't found at all. Raises an exception on non-Windows
+ platforms.
"""
return _core.PyApp_GetComCtl32Version(*args, **kwargs)
return _core.GetAccelFromString(*args, **kwargs)
#---------------------------------------------------------------------------
-WINDOW_VARIANT_DEFAULT = _core.WINDOW_VARIANT_DEFAULT
+class VisualAttributes(object):
+ """struct containing all the visual attributes of a control"""
+ def __repr__(self):
+ return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+ def __init__(self, *args, **kwargs):
+ """
+ __init__() -> VisualAttributes
+
+ struct containing all the visual attributes of a control
+ """
+ newobj = _core.new_VisualAttributes(*args, **kwargs)
+ self.this = newobj.this
+ self.thisown = 1
+ del newobj.thisown
+ def __del__(self, destroy=_core.delete_VisualAttributes):
+ """__del__()"""
+ try:
+ if self.thisown: destroy(self)
+ except: pass
+
+ font = property(_core.VisualAttributes_font_get, _core.VisualAttributes_font_set)
+ colFg = property(_core.VisualAttributes_colFg_get, _core.VisualAttributes_colFg_set)
+ colBg = property(_core.VisualAttributes_colBg_get, _core.VisualAttributes_colBg_set)
+
+class VisualAttributesPtr(VisualAttributes):
+ def __init__(self, this):
+ self.this = this
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = VisualAttributes
+_core.VisualAttributes_swigregister(VisualAttributesPtr)
+NullAcceleratorTable = cvar.NullAcceleratorTable
+PanelNameStr = cvar.PanelNameStr
+
WINDOW_VARIANT_NORMAL = _core.WINDOW_VARIANT_NORMAL
WINDOW_VARIANT_SMALL = _core.WINDOW_VARIANT_SMALL
WINDOW_VARIANT_MINI = _core.WINDOW_VARIANT_MINI
WINDOW_VARIANT_LARGE = _core.WINDOW_VARIANT_LARGE
+WINDOW_VARIANT_MAX = _core.WINDOW_VARIANT_MAX
class Window(EvtHandler):
"""
wx.Window is the base class for all windows and represents any visible
return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
- __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- long style=0, String name=PanelNameStr) -> Window
+ __init__(Window parent, int id=-1, Point pos=DefaultPosition,
+ Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
Construct and show a generic Window.
"""
def Create(*args, **kwargs):
"""
- Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- long style=0, String name=PanelNameStr) -> bool
+ Create(Window parent, int id=-1, Point pos=DefaultPosition,
+ Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
Create the GUI part of the Window for 2-phase creation mode.
"""
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
+ such as testing tools or special-needs access programs)which
need to identify windows by name.
"""
return _core.Window_GetLabel(*args, **kwargs)
"""
GetName() -> String
- Returns the window's name. This name is not guaranteed to be
+ 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.
"""
SetWindowVariant(int variant)
Sets the variant of the window/font size to use for this window,
- if the platform supports variants, (for example, wxMac.)
+ 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)
+
"""
return _core.Window_SetWindowVariant(*args, **kwargs)
"""
return _core.Window_FitInside(*args, **kwargs)
- def SetSizeHints(*args, **kwargs):
+ def SetSizeHints(*args):
"""
SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
+ SetSizeHints(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
will not be able to size the window outside the given bounds. The
resizing increments are only significant under Motif or Xt.
"""
- return _core.Window_SetSizeHints(*args, **kwargs)
+ return _core.Window_SetSizeHints(*args)
- def SetVirtualSizeHints(*args, **kwargs):
+ def SetVirtualSizeHints(*args):
"""
SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)
+ SetVirtualSizeHints(Size minSize, Size maxSize=DefaultSize)
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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
"""
- return _core.Window_SetVirtualSizeHints(*args, **kwargs)
+ return _core.Window_SetVirtualSizeHints(*args)
def GetMinWidth(*args, **kwargs):
"""GetMinWidth() -> int"""
"""GetMaxSize() -> Size"""
return _core.Window_GetMaxSize(*args, **kwargs)
+ def GetMinSize(*args, **kwargs):
+ """GetMinSize() -> Size"""
+ return _core.Window_GetMinSize(*args, **kwargs)
+
def SetVirtualSize(*args, **kwargs):
"""
SetVirtualSize(Size size)
"""
return _core.Window_GetValidator(*args, **kwargs)
+ def Validate(*args, **kwargs):
+ """
+ Validate() -> 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.
+ """
+ return _core.Window_Validate(*args, **kwargs)
+
+ def TransferDataToWindow(*args, **kwargs):
+ """
+ TransferDataToWindow() -> 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.
+ """
+ return _core.Window_TransferDataToWindow(*args, **kwargs)
+
+ def TransferDataFromWindow(*args, **kwargs):
+ """
+ TransferDataFromWindow() -> 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.
+ """
+ return _core.Window_TransferDataFromWindow(*args, **kwargs)
+
+ def InitDialog(*args, **kwargs):
+ """
+ InitDialog()
+
+ Sends an EVT_INIT_DIALOG event, whose handler usually transfers
+ data to the dialog via validators.
+ """
+ return _core.Window_InitDialog(*args, **kwargs)
+
def SetAcceleratorTable(*args, **kwargs):
"""
SetAcceleratorTable(AcceleratorTable accel)
"""
return _core.Window_IsExposedRect(*args, **kwargs)
+ def GetDefaultAttributes(*args, **kwargs):
+ """
+ GetDefaultAttributes() -> 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.
+ """
+ return _core.Window_GetDefaultAttributes(*args, **kwargs)
+
+ def GetClassDefaultAttributes(*args, **kwargs):
+ """
+ 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.
+
+ 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.
+ """
+ return _core.Window_GetClassDefaultAttributes(*args, **kwargs)
+
+ GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
def SetBackgroundColour(*args, **kwargs):
"""
SetBackgroundColour(Colour colour) -> bool
"""
return _core.Window_SetBackgroundColour(*args, **kwargs)
+ def SetDefaultBackgroundColour(*args, **kwargs):
+ """SetDefaultBackgroundColour(Colour colour)"""
+ return _core.Window_SetDefaultBackgroundColour(*args, **kwargs)
+
def SetForegroundColour(*args, **kwargs):
"""
SetForegroundColour(Colour colour) -> bool
"""
return _core.Window_SetForegroundColour(*args, **kwargs)
+ def SetDefaultForegroundColour(*args, **kwargs):
+ """SetDefaultForegroundColour(Colour colour)"""
+ return _core.Window_SetDefaultForegroundColour(*args, **kwargs)
+
def GetBackgroundColour(*args, **kwargs):
"""
GetBackgroundColour() -> Colour
"""
return _core.Window_SetFont(*args, **kwargs)
+ def SetDefaultFont(*args, **kwargs):
+ """SetDefaultFont(Font font)"""
+ return _core.Window_SetDefaultFont(*args, **kwargs)
+
def GetFont(*args, **kwargs):
"""
GetFont() -> Font
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = Window
_core.Window_swigregister(WindowPtr)
-NullAcceleratorTable = cvar.NullAcceleratorTable
-PanelNameStr = cvar.PanelNameStr
def PreWindow(*args, **kwargs):
"""
"""
return _core.Window_GetCapture(*args, **kwargs)
+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.
+
+ 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.
+ """
+ return _core.Window_GetClassDefaultAttributes(*args, **kwargs)
+
def DLG_PNT(win, point_or_x, y=None):
"""
Convenience function for converting a Point or (x,y) in
Command(CommandEvent event)
Simulates the effect of the user issuing a command to the
- item. See wxCommandEvent.
+ item. See wx.CommandEvent.
"""
return _core.Control_Command(*args, **kwargs)
"""
return _core.Control_SetLabel(*args, **kwargs)
+ def GetClassDefaultAttributes(*args, **kwargs):
+ """
+ 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.
+
+ 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.
+ """
+ return _core.Control_GetClassDefaultAttributes(*args, **kwargs)
+
+ GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
class ControlPtr(Control):
def __init__(self, this):
val.thisown = 1
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 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.
+ """
+ return _core.Control_GetClassDefaultAttributes(*args, **kwargs)
+
#---------------------------------------------------------------------------
class ItemContainer(object):