| |
- matplotlib.backend_bases.FigureCanvasBase
-
- FigureCanvasWx(matplotlib.backend_bases.FigureCanvasBase, wx._windows.Panel)
- matplotlib.backend_bases.FigureManagerBase
-
- FigureManagerWx
- FigureManagerWx
- matplotlib.backend_bases.GraphicsContextBase
-
- GraphicsContextWx(matplotlib.backend_bases.GraphicsContextBase, wx._gdi.MemoryDC)
- matplotlib.backend_bases.NavigationToolbar2
-
- NavigationToolbar2Wx(matplotlib.backend_bases.NavigationToolbar2, wx._controls.ToolBar)
- matplotlib.backend_bases.RendererBase
-
- RendererWx
- fake_stderr
- wx._controls.Button(wx._core.Control)
-
- MenuButtonWx
- wx._controls.ToolBar(wx._controls.ToolBarBase)
-
- NavigationToolbar2Wx(matplotlib.backend_bases.NavigationToolbar2, wx._controls.ToolBar)
- NavigationToolbarWx
- NavigationToolbarWx
- wx._gdi.MemoryDC(wx._gdi.DC)
-
- GraphicsContextWx(matplotlib.backend_bases.GraphicsContextBase, wx._gdi.MemoryDC)
- wx._windows.Frame(wx._windows.TopLevelWindow)
-
- FigureFrameWx
- SubplotToolWX
- wx._windows.Panel(wx._core.Window)
-
- FigureCanvasWx(matplotlib.backend_bases.FigureCanvasBase, wx._windows.Panel)
- wx._windows.Printout(wx._core.Object)
-
- PrintoutWx
- wx._windows.StatusBar(wx._core.Window)
-
- StatusBarWx
class FigureCanvasWx(matplotlib.backend_bases.FigureCanvasBase, wx._windows.Panel) |
|
The FigureCanvas contains the figure and does event handling.
In the wxPython backend, it is derived from wxPanel, and (usually) lives
inside a frame instantiated by a FigureManagerWx. The parent window probably
implements a wx.Sizer to control the displayed control size - but we give a
hint as to our preferred minimum size. |
|
- Method resolution order:
- FigureCanvasWx
- matplotlib.backend_bases.FigureCanvasBase
- wx._windows.Panel
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- Copy_to_Clipboard(self, event=None)
- copy bitmap of canvas to system clipboard
- Destroy(self, *args, **kwargs)
- Printer_Init(self)
- initialize printer settings using wx methods
- Printer_Preview(self, event=None)
- generate Print Preview with wx Print mechanism
- Printer_Print(self, event=None)
- Print figure using wx Print mechanism
- Printer_Setup(self, event=None)
- set up figure for printing. The standard wx Printer
Setup Dialog seems to die easily. Therefore, this setup
simply asks for image width and margin for printing.
- Printer_Setup2(self, event=None)
- set up figure for printing. Using the standard wx Printer
Setup Dialog.
- __init__(self, parent, id, figure)
- Initialise a FigureWx instance.
- Initialise the FigureCanvasBase and wxPanel parents.
- Set event handlers for:
EVT_SIZE (Resize event)
EVT_PAINT (Paint event)
- draw(self, repaint=True)
- Render the figure using RendererWx instance renderer, or using a
previously defined renderer if none is specified.
- gui_repaint(self, drawDC=None)
- Performs update of the displayed image on the GUI canvas, using the
supplied device context. If drawDC is None, a ClientDC will be used to
redraw the image.
- print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w', orientation='portrait', **kwargs)
- Render the figure to hardcopy
- realize(self)
- This method will be called when the system is ready to draw,
eg when a GUI window is realized
Data and other attributes defined here:
- keyvald = {306: 'shift', 307: 'alt', 308: 'control', 316: 'left', 317: 'up', 318: 'right', 319: 'down'}
Methods inherited from matplotlib.backend_bases.FigureCanvasBase:
- blit(self, bbox=None)
- blit the canvas in bbox (default entire canvas)
- button_press_event(self, x, y, button, guiEvent=None)
- Backend derived classes should call this function on any mouse
button press. x,y are the canvas coords: 0,0 is lower, left.
button and key are as defined in MouseEvent
- button_release_event(self, x, y, button, guiEvent=None)
- Backend derived classes should call this function on any mouse
button release. x,y are the canvas coords: 0,0 is lower, left.
button and key are as defined in MouseEvent
- draw_cursor(self, event)
- Draw a cursor in the event.axes if inaxes is not None. Use
native GUI drawing for efficiency if possible
- draw_event(self, renderer)
- draw_idle(self, *args, **kwargs)
- draw only if idle; defaults to draw but backends can overrride
- get_width_height(self)
- return the figure width and height in points or pixels
(depending on the backend), truncated to integers
- key_press_event(self, key, guiEvent=None)
- key_release_event(self, key, guiEvent=None)
- motion_notify_event(self, x, y, guiEvent=None)
- Backend derived classes should call this function on any
motion-notify-event. x,y are the canvas coords: 0,0 is lower, left.
button and key are as defined in MouseEvent
- mpl_connect(self, s, func)
- Connect event with string s to func. The signature of func is
def func(event)
where event is a MplEvent. The following events are recognized
'resize_event'
'draw_event'
'key_press_event'
'key_release_event'
'button_press_event'
'button_release_event'
'motion_notify_event'
For the three events above, if the mouse is over the axes,
the variable event.inaxes will be set to the axes it is over,
and additionally, the variables event.xdata and event.ydata
will be defined. This is the mouse location in data coords.
See backend_bases.MplEvent.
return value is a connection id that can be used with
mpl_disconnect
- mpl_disconnect(self, cid)
- Connect s to func. return an id that can be used with disconnect
Method should return None
- resize(self, w, h)
- set the canvas size in pixels
- resize_event(self)
- switch_backends(self, FigureCanvasClass)
- instantiate an instance of FigureCanvasClass
This is used for backend switching, eg, to instantiate a
FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is
not done, so any changes to one of the instances (eg, setting
figure size or line props), will be reflected in the other
Data and other attributes inherited from matplotlib.backend_bases.FigureCanvasBase:
- events = ('key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'motion_notify_event')
Methods inherited from wx._windows.Panel:
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER,
String name=PanelNameStr) -> bool
Create the GUI part of the Window for 2-phase creation mode.
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- SetFocus(*args, **kwargs)
- SetFocus(self)
Overrides `wx.Window.SetFocus`. This method uses the (undocumented)
mix-in class wxControlContainer which manages the focus and TAB logic
for controls which usually have child controls. In practice, if you
call this method and the panel has at least one child window, then the
focus will be given to the child window.
- SetFocusIgnoringChildren(*args, **kwargs)
- SetFocusIgnoringChildren(self)
In contrast to `SetFocus` (see above) this will set the focus to the
panel even of there are child windows in the panel. This is only
rarely needed.
- __repr__(self)
Static methods inherited from wx._windows.Panel:
- 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
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.
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CenterOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CentreOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
Get the origin of the client area of the window relative to the
window's top left corner (the client area may be shifted because of
the borders, scrollbars, other decorations...)
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetLabel(*args, **kwargs)
- 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.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SendSizeEvent(self)
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Set the text which the window shows in its label if applicable.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class FigureFrameWx(wx._windows.Frame) |
| |
- Method resolution order:
- FigureFrameWx
- wx._windows.Frame
- wx._windows.TopLevelWindow
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- Destroy(self, *args, **kwargs)
- GetToolBar(self)
- Override wxFrame::GetToolBar as we don't have managed toolbar
- __init__(self, num, fig)
- get_canvas(self, fig)
- get_figure_manager(self)
Methods inherited from wx._windows.Frame:
- Command = ProcessCommand(*args, **kwargs)
- ProcessCommand(self, int winid) -> bool
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, String title=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool
- CreateStatusBar(*args, **kwargs)
- CreateStatusBar(self, int number=1, long style=DEFAULT_STATUSBAR_STYLE, int winid=0,
String name=StatusLineNameStr) -> StatusBar
- CreateToolBar(*args, **kwargs)
- CreateToolBar(self, long style=-1, int winid=-1, String name=ToolBarNameStr) -> wxToolBar
- DoGiveHelp(*args, **kwargs)
- DoGiveHelp(self, String text, bool show)
- DoMenuUpdates(*args, **kwargs)
- DoMenuUpdates(self, Menu menu=None)
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
- GetMenuBar(*args, **kwargs)
- GetMenuBar(self) -> MenuBar
- GetStatusBar(*args, **kwargs)
- GetStatusBar(self) -> StatusBar
- GetStatusBarPane(*args, **kwargs)
- GetStatusBarPane(self) -> int
- PopStatusText(*args, **kwargs)
- PopStatusText(self, int number=0)
- ProcessCommand(*args, **kwargs)
- ProcessCommand(self, int winid) -> bool
- PushStatusText(*args, **kwargs)
- PushStatusText(self, String text, int number=0)
- SendSizeEvent(*args, **kwargs)
- SendSizeEvent(self)
- SetMenuBar(*args, **kwargs)
- SetMenuBar(self, MenuBar menubar)
- SetStatusBar(*args, **kwargs)
- SetStatusBar(self, StatusBar statBar)
- SetStatusBarPane(*args, **kwargs)
- SetStatusBarPane(self, int n)
- SetStatusText(*args, **kwargs)
- SetStatusText(self, String text, int number=0)
- SetStatusWidths(*args, **kwargs)
- SetStatusWidths(self, int widths)
- SetToolBar(*args, **kwargs)
- SetToolBar(self, wxToolBar toolbar)
- __repr__(self)
Static methods inherited from wx._windows.Frame:
- 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
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.
Methods inherited from wx._windows.TopLevelWindow:
- CenterOnScreen(*args, **kwargs)
- CenterOnScreen(self, int dir=BOTH)
Center the window on screen
- CentreOnScreen = CenterOnScreen(*args, **kwargs)
- CenterOnScreen(self, int dir=BOTH)
Center the window on screen
- GetIcon(*args, **kwargs)
- GetIcon(self) -> Icon
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- Iconize(*args, **kwargs)
- Iconize(self, bool iconize=True)
- IsActive(*args, **kwargs)
- IsActive(self) -> bool
- IsFullScreen(*args, **kwargs)
- IsFullScreen(self) -> bool
- IsIconized(*args, **kwargs)
- IsIconized(self) -> bool
- IsMaximized(*args, **kwargs)
- IsMaximized(self) -> bool
- MacGetMetalAppearance(*args, **kwargs)
- MacGetMetalAppearance(self) -> bool
- MacSetMetalAppearance(*args, **kwargs)
- MacSetMetalAppearance(self, bool on)
- Maximize(*args, **kwargs)
- Maximize(self, bool maximize=True)
- RequestUserAttention(*args, **kwargs)
- RequestUserAttention(self, int flags=USER_ATTENTION_INFO)
- Restore(*args, **kwargs)
- Restore(self)
- SetIcon(*args, **kwargs)
- SetIcon(self, Icon icon)
- SetIcons(*args, **kwargs)
- SetIcons(self, wxIconBundle icons)
- SetShape(*args, **kwargs)
- SetShape(self, Region region) -> bool
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- ShowFullScreen(*args, **kwargs)
- ShowFullScreen(self, bool show, long style=FULLSCREEN_ALL) -> bool
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetLabel(*args, **kwargs)
- 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.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Set the text which the window shows in its label if applicable.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class GraphicsContextWx(matplotlib.backend_bases.GraphicsContextBase, wx._gdi.MemoryDC) |
|
The graphics context provides the color, line styles, etc...
In wxPython this is done by wrapping a wxDC object and forwarding the
appropriate calls to it. Notice also that colour and line styles are
mapped on the wx.Pen() member of the wxDC. This means that we have some
rudimentary pen management here.
The base GraphicsContext stores colors as a RGB tuple on the unit
interval, eg, (0.5, 0.0, 1.0). wxPython uses an int interval, but
since wxPython colour management is rather simple, I have not chosen
to implement a separate colour manager class. |
|
- Method resolution order:
- GraphicsContextWx
- matplotlib.backend_bases.GraphicsContextBase
- wx._gdi.MemoryDC
- wx._gdi.DC
- wx._core.Object
- __builtin__.object
Methods defined here:
- __init__(self, bitmap, renderer)
- get_wxcolour(self)
- return a wx.Colour from RGB format
- select(self)
- Select the current bitmap into this wxDC instance
- set_capstyle(self, cs)
- Set the capstyle as a string in ('butt', 'round', 'projecting')
- set_clip_rectangle(self, rect)
- Destroys previous clipping region and defines a new one.
- set_foreground(self, fg, isRGB=None)
- Set the foreground color. fg can be a matlab format string, a
html hex color string, an rgb unit tuple, or a float between 0
and 1. In the latter case, grayscale is used.
- set_graylevel(self, frac)
- Set the foreground color. fg can be a matlab format string, a
html hex color string, an rgb unit tuple, or a float between 0
and 1. In the latter case, grayscale is used.
- set_joinstyle(self, js)
- Set the join style to be one of ('miter', 'round', 'bevel')
- set_linestyle(self, ls)
- Set the line style to be one of
- set_linewidth(self, w)
- Set the line width.
- unselect(self)
- Select a Null bitmasp into this wxDC instance
Methods inherited from matplotlib.backend_bases.GraphicsContextBase:
- copy_properties(self, gc)
- Copy properties from gc to self
- get_alpha(self)
- Return the alpha value used for blending - not supported on
all backends
- get_antialiased(self)
- Return true if the object should try to do antialiased rendering
- get_capstyle(self)
- Return the capstyle as a string in ('butt', 'round', 'projecting')
- get_clip_rectangle(self)
- Return the clip rectangle as (left, bottom, width, height)
- get_dashes(self)
- Return the dash information as an offset dashlist tuple The
dash list is a even size list that gives the ink on, ink off
in pixels. See p107 of to postscript BLUEBOOK for more info
Default value is None
- get_hatch(self)
- Gets the current hatch style
- get_joinstyle(self)
- Return the line join style as one of ('miter', 'round', 'bevel')
- get_linestyle(self, style)
- Return the linestyle: one of ('solid', 'dashed', 'dashdot',
'dotted').
- get_linewidth(self)
- Return the line width in points as a scalar
- get_rgb(self)
- returns a tuple of three floats from 0-1. color can be a
matlab format string, a html hex color string, or a rgb tuple
- set_alpha(self, alpha)
- Set the alpha value used for blending - not supported on
all backends
- set_antialiased(self, b)
- True if object should be drawn with antialiased rendering
- set_dashes(self, dash_offset, dash_list)
- Set the dash style for the gc.
dash_offset is the offset (usually 0).
dash_list specifies the on-off sequence as points
(None, None) specifies a solid line
- set_hatch(self, hatch)
- Sets the hatch style for filling
Data and other attributes inherited from matplotlib.backend_bases.GraphicsContextBase:
- dashd = {'dashdot': (0, (3.0, 5.0, 1.0, 5.0)), 'dashed': (0, (6.0, 6.0)), 'dotted': (0, (1.0, 3.0)), 'solid': (None, None)}
Methods inherited from wx._gdi.MemoryDC:
- SelectObject(*args, **kwargs)
- SelectObject(self, Bitmap bitmap)
Selects the bitmap into the device context, to use as the memory
bitmap. Selecting the bitmap into a memory DC allows you to draw into
the DC, and therefore the bitmap, and also to use Blit to copy the
bitmap to a window.
If the argument is wx.NullBitmap (or some other uninitialised
`wx.Bitmap`) the current bitmap is selected out of the device context,
and the original bitmap restored, allowing the current bitmap to be
destroyed safely.
- __repr__(self)
Methods inherited from wx._gdi.DC:
- BeginDrawing(*args, **kwargs)
- BeginDrawing(self)
Allows for optimization of drawing code on platforms that need it. On
other platforms this is just an empty function and is harmless. To
take advantage of this postential optimization simply enclose each
group of calls to the drawing primitives within calls to
`BeginDrawing` and `EndDrawing`.
- Blit(*args, **kwargs)
- Blit(self, int xdest, int ydest, int width, int height, DC source,
int xsrc, int ysrc, int rop=COPY, bool useMask=False,
int xsrcMask=-1, int ysrcMask=-1) -> bool
Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates,
logical function, whether to use a bitmap mask, and mask source
position.
- BlitPointSize(*args, **kwargs)
- BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates,
logical function, whether to use a bitmap mask, and mask source
position.
- CalcBoundingBox(*args, **kwargs)
- CalcBoundingBox(self, int x, int y)
Adds the specified point to the bounding box which can be retrieved
with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
- CalcBoundingBoxPoint(*args, **kwargs)
- CalcBoundingBoxPoint(self, Point point)
Adds the specified point to the bounding box which can be retrieved
with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
- CanDrawBitmap(*args, **kwargs)
- CanDrawBitmap(self) -> bool
- CanGetTextExtent(*args, **kwargs)
- CanGetTextExtent(self) -> bool
- Clear(*args, **kwargs)
- Clear(self)
Clears the device context using the current background brush.
- ComputeScaleAndOrigin(*args, **kwargs)
- ComputeScaleAndOrigin(self)
Performs all necessary computations for given platform and context
type after each change of scale and origin parameters. Usually called
automatically internally after such changes.
- CrossHair(*args, **kwargs)
- CrossHair(self, int x, int y)
Displays a cross hair using the current pen. This is a vertical and
horizontal line the height and width of the window, centred on the
given point.
- CrossHairPoint(*args, **kwargs)
- CrossHairPoint(self, Point pt)
Displays a cross hair using the current pen. This is a vertical and
horizontal line the height and width of the window, centred on the
given point.
- DestroyClippingRegion(*args, **kwargs)
- DestroyClippingRegion(self)
Destroys the current clipping region so that none of the DC is
clipped.
- DeviceToLogicalX(*args, **kwargs)
- DeviceToLogicalX(self, int x) -> int
Convert device X coordinate to logical coordinate, using the current
mapping mode.
- DeviceToLogicalXRel(*args, **kwargs)
- DeviceToLogicalXRel(self, int x) -> int
Convert device X coordinate to relative logical coordinate, using the
current mapping mode but ignoring the x axis orientation. Use this
function for converting a width, for example.
- DeviceToLogicalY(*args, **kwargs)
- DeviceToLogicalY(self, int y) -> int
Converts device Y coordinate to logical coordinate, using the current
mapping mode.
- DeviceToLogicalYRel(*args, **kwargs)
- DeviceToLogicalYRel(self, int y) -> int
Convert device Y coordinate to relative logical coordinate, using the
current mapping mode but ignoring the y axis orientation. Use this
function for converting a height, for example.
- DrawArc(*args, **kwargs)
- DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
Draws an arc of a circle, centred on the *center* point (xc, yc), from
the first point to the second. The current pen is used for the outline
and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to
the end point.
- DrawArcPoint(*args, **kwargs)
- DrawArcPoint(self, Point pt1, Point pt2, Point center)
Draws an arc of a circle, centred on the *center* point (xc, yc), from
the first point to the second. The current pen is used for the outline
and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to
the end point.
- DrawBitmap(*args, **kwargs)
- DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
Draw a bitmap on the device context at the specified point. If
*transparent* is true and the bitmap has a transparency mask, (or
alpha channel on the platforms that support it) then the bitmap will
be drawn transparently.
- DrawBitmapPoint(*args, **kwargs)
- DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
Draw a bitmap on the device context at the specified point. If
*transparent* is true and the bitmap has a transparency mask, (or
alpha channel on the platforms that support it) then the bitmap will
be drawn transparently.
- DrawCheckMark(*args, **kwargs)
- DrawCheckMark(self, int x, int y, int width, int height)
Draws a check mark inside the given rectangle.
- DrawCheckMarkRect(*args, **kwargs)
- DrawCheckMarkRect(self, Rect rect)
Draws a check mark inside the given rectangle.
- DrawCircle(*args, **kwargs)
- DrawCircle(self, int x, int y, int radius)
Draws a circle with the given center point and radius. The current
pen is used for the outline and the current brush for filling the
shape.
- DrawCirclePoint(*args, **kwargs)
- DrawCirclePoint(self, Point pt, int radius)
Draws a circle with the given center point and radius. The current
pen is used for the outline and the current brush for filling the
shape.
- DrawEllipse(*args, **kwargs)
- DrawEllipse(self, int x, int y, int width, int height)
Draws an ellipse contained in the specified rectangle. The current pen
is used for the outline and the current brush for filling the shape.
- DrawEllipseList(self, ellipses, pens=None, brushes=None)
- Draw a list of ellipses as quickly as possible.
:param ellipses: A sequence of 4-element sequences representing
each ellipse to draw, (x,y, w,h).
:param pens: If None, then the current pen is used. If a
single pen then it will be used for all ellipses.
If a list of pens then there should be one for each
ellipse in ellipses.
:param brushes: A brush or brushes to be used to fill the ellipses,
with similar semantics as the pens parameter.
- DrawEllipsePointSize(*args, **kwargs)
- DrawEllipsePointSize(self, Point pt, Size sz)
Draws an ellipse contained in the specified rectangle. The current pen
is used for the outline and the current brush for filling the shape.
- DrawEllipseRect(*args, **kwargs)
- DrawEllipseRect(self, Rect rect)
Draws an ellipse contained in the specified rectangle. The current pen
is used for the outline and the current brush for filling the shape.
- DrawEllipticArc(*args, **kwargs)
- DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
Draws an arc of an ellipse, with the given rectangle defining the
bounds of the ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie.
The *start* and *end* parameters specify the start and end of the arc
relative to the three-o'clock position from the center of the
rectangle. Angles are specified in degrees (360 is a complete
circle). Positive values mean counter-clockwise motion. If start is
equal to end, a complete ellipse will be drawn.
- DrawEllipticArcPointSize(*args, **kwargs)
- DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
Draws an arc of an ellipse, with the given rectangle defining the
bounds of the ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie.
The *start* and *end* parameters specify the start and end of the arc
relative to the three-o'clock position from the center of the
rectangle. Angles are specified in degrees (360 is a complete
circle). Positive values mean counter-clockwise motion. If start is
equal to end, a complete ellipse will be drawn.
- DrawIcon(*args, **kwargs)
- DrawIcon(self, Icon icon, int x, int y)
Draw an icon on the display (does nothing if the device context is
PostScript). This can be the simplest way of drawing bitmaps on a
window.
- DrawIconPoint(*args, **kwargs)
- DrawIconPoint(self, Icon icon, Point pt)
Draw an icon on the display (does nothing if the device context is
PostScript). This can be the simplest way of drawing bitmaps on a
window.
- DrawImageLabel(*args, **kwargs)
- DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
int indexAccel=-1) -> Rect
Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
drawing it) within the specified rectangle, abiding by the alignment
flags. Will additionally emphasize the character at *indexAccel* if
it is not -1. Returns the bounding rectangle.
- DrawLabel(*args, **kwargs)
- DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
int indexAccel=-1)
Draw *text* within the specified rectangle, abiding by the alignment
flags. Will additionally emphasize the character at *indexAccel* if
it is not -1.
- DrawLine(*args, **kwargs)
- DrawLine(self, int x1, int y1, int x2, int y2)
Draws a line from the first point to the second. The current pen is
used for drawing the line. Note that the second point is *not* part of
the line and is not drawn by this function (this is consistent with
the behaviour of many other toolkits).
- DrawLineList(self, lines, pens=None)
- Draw a list of lines as quickly as possible.
:param lines: A sequence of 4-element sequences representing
each line to draw, (x1,y1, x2,y2).
:param pens: If None, then the current pen is used. If a
single pen then it will be used for all lines. If
a list of pens then there should be one for each line
in lines.
- DrawLinePoint(*args, **kwargs)
- DrawLinePoint(self, Point pt1, Point pt2)
Draws a line from the first point to the second. The current pen is
used for drawing the line. Note that the second point is *not* part of
the line and is not drawn by this function (this is consistent with
the behaviour of many other toolkits).
- DrawLines(*args, **kwargs)
- DrawLines(self, List points, int xoffset=0, int yoffset=0)
Draws lines using a sequence of `wx.Point` objects, adding the
optional offset coordinate. The current pen is used for drawing the
lines.
- DrawPoint(*args, **kwargs)
- DrawPoint(self, int x, int y)
Draws a point using the current pen.
- DrawPointList(self, points, pens=None)
- Draw a list of points as quickly as possible.
:param points: A sequence of 2-element sequences representing
each point to draw, (x,y).
:param pens: If None, then the current pen is used. If a
single pen then it will be used for all points. If
a list of pens then there should be one for each point
in points.
- DrawPointPoint(*args, **kwargs)
- DrawPointPoint(self, Point pt)
Draws a point using the current pen.
- DrawPolygon(*args, **kwargs)
- DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
int fillStyle=ODDEVEN_RULE)
Draws a filled polygon using a sequence of `wx.Point` objects, adding
the optional offset coordinate. The last argument specifies the fill
rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
The current pen is used for drawing the outline, and the current brush
for filling the shape. Using a transparent brush suppresses
filling. Note that wxWidgets automatically closes the first and last
points.
- DrawPolygonList(self, polygons, pens=None, brushes=None)
- Draw a list of polygons, each of which is a list of points.
:param polygons: A sequence of sequences of sequences.
[[(x1,y1),(x2,y2),(x3,y3)...],
[(x1,y1),(x2,y2),(x3,y3)...]]
:param pens: If None, then the current pen is used. If a
single pen then it will be used for all polygons.
If a list of pens then there should be one for each
polygon.
:param brushes: A brush or brushes to be used to fill the polygons,
with similar semantics as the pens parameter.
- DrawRectangle(*args, **kwargs)
- DrawRectangle(self, int x, int y, int width, int height)
Draws a rectangle with the given top left corner, and with the given
size. The current pen is used for the outline and the current brush
for filling the shape.
- DrawRectangleList(self, rectangles, pens=None, brushes=None)
- Draw a list of rectangles as quickly as possible.
:param rectangles: A sequence of 4-element sequences representing
each rectangle to draw, (x,y, w,h).
:param pens: If None, then the current pen is used. If a
single pen then it will be used for all rectangles.
If a list of pens then there should be one for each
rectangle in rectangles.
:param brushes: A brush or brushes to be used to fill the rectagles,
with similar semantics as the pens parameter.
- DrawRectanglePointSize(*args, **kwargs)
- DrawRectanglePointSize(self, Point pt, Size sz)
Draws a rectangle with the given top left corner, and with the given
size. The current pen is used for the outline and the current brush
for filling the shape.
- DrawRectangleRect(*args, **kwargs)
- DrawRectangleRect(self, Rect rect)
Draws a rectangle with the given top left corner, and with the given
size. The current pen is used for the outline and the current brush
for filling the shape.
- DrawRotatedText(*args, **kwargs)
- DrawRotatedText(self, String text, int x, int y, double angle)
Draws the text rotated by *angle* degrees, if supported by the platform.
**NOTE**: Under Win9x only TrueType fonts can be drawn by this
function. In particular, a font different from ``wx.NORMAL_FONT``
should be used as the it is not normally a TrueType
font. ``wx.SWISS_FONT`` is an example of a font which is.
- DrawRotatedTextPoint(*args, **kwargs)
- DrawRotatedTextPoint(self, String text, Point pt, double angle)
Draws the text rotated by *angle* degrees, if supported by the platform.
**NOTE**: Under Win9x only TrueType fonts can be drawn by this
function. In particular, a font different from ``wx.NORMAL_FONT``
should be used as the it is not normally a TrueType
font. ``wx.SWISS_FONT`` is an example of a font which is.
- DrawRoundedRectangle(*args, **kwargs)
- DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
Draws a rectangle with the given top left corner, and with the given
size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling
the shape.
If radius is positive, the value is assumed to be the radius of the
rounded corner. If radius is negative, the absolute value is assumed
to be the proportion of the smallest dimension of the rectangle. This
means that the corner can be a sensible size relative to the size of
the rectangle, and also avoids the strange effects X produces when the
corners are too big for the rectangle.
- DrawRoundedRectanglePointSize(*args, **kwargs)
- DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
Draws a rectangle with the given top left corner, and with the given
size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling
the shape.
If radius is positive, the value is assumed to be the radius of the
rounded corner. If radius is negative, the absolute value is assumed
to be the proportion of the smallest dimension of the rectangle. This
means that the corner can be a sensible size relative to the size of
the rectangle, and also avoids the strange effects X produces when the
corners are too big for the rectangle.
- DrawRoundedRectangleRect(*args, **kwargs)
- DrawRoundedRectangleRect(self, Rect r, double radius)
Draws a rectangle with the given top left corner, and with the given
size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling
the shape.
If radius is positive, the value is assumed to be the radius of the
rounded corner. If radius is negative, the absolute value is assumed
to be the proportion of the smallest dimension of the rectangle. This
means that the corner can be a sensible size relative to the size of
the rectangle, and also avoids the strange effects X produces when the
corners are too big for the rectangle.
- DrawSpline(*args, **kwargs)
- DrawSpline(self, List points)
Draws a spline between all given control points, (a list of `wx.Point`
objects) using the current pen. The spline is drawn using a series of
lines, using an algorithm taken from the X drawing program 'XFIG'.
- DrawText(*args, **kwargs)
- DrawText(self, String text, int x, int y)
Draws a text string at the specified point, using the current text
font, and the current text foreground and background colours.
The coordinates refer to the top-left corner of the rectangle bounding
the string. See `GetTextExtent` for how to get the dimensions of a
text string, which can be used to position the text more precisely.
**NOTE**: under wxGTK the current logical function is used by this
function but it is ignored by wxMSW. Thus, you should avoid using
logical functions with this function in portable programs.
- DrawTextList(self, textList, coords, foregrounds=None, backgrounds=None)
- Draw a list of strings using a list of coordinants for positioning each string.
:param textList: A list of strings
:param coords: A list of (x,y) positions
:param foregrounds: A list of `wx.Colour` objects to use for the
foregrounds of the strings.
:param backgrounds: A list of `wx.Colour` objects to use for the
backgrounds of the strings.
NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
If you want backgrounds to do anything.
- DrawTextPoint(*args, **kwargs)
- DrawTextPoint(self, String text, Point pt)
Draws a text string at the specified point, using the current text
font, and the current text foreground and background colours.
The coordinates refer to the top-left corner of the rectangle bounding
the string. See `GetTextExtent` for how to get the dimensions of a
text string, which can be used to position the text more precisely.
**NOTE**: under wxGTK the current logical function is used by this
function but it is ignored by wxMSW. Thus, you should avoid using
logical functions with this function in portable programs.
- EndDoc(*args, **kwargs)
- EndDoc(self)
Ends a document (only relevant when outputting to a printer).
- EndDrawing(*args, **kwargs)
- EndDrawing(self)
Ends the group of drawing primitives started with `BeginDrawing`, and
invokes whatever optimization is available for this DC type on the
current platform.
- EndPage(*args, **kwargs)
- EndPage(self)
Ends a document page (only relevant when outputting to a printer).
- FloodFill(*args, **kwargs)
- FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
Flood fills the device context starting from the given point, using
the current brush colour, and using a style:
- **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
the given colour is encountered.
- **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
colour.
Returns False if the operation failed.
Note: The present implementation for non-Windows platforms may fail to
find colour borders if the pixels do not match the colour
exactly. However the function will still return true.
- FloodFillPoint(*args, **kwargs)
- FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
Flood fills the device context starting from the given point, using
the current brush colour, and using a style:
- **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
the given colour is encountered.
- **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
colour.
Returns False if the operation failed.
Note: The present implementation for non-Windows platforms may fail to
find colour borders if the pixels do not match the colour
exactly. However the function will still return true.
- GetBackground(*args, **kwargs)
- GetBackground(self) -> Brush
Gets the brush used for painting the background.
- GetBackgroundMode(*args, **kwargs)
- GetBackgroundMode(self) -> int
Returns the current background mode, either ``wx.SOLID`` or
``wx.TRANSPARENT``.
- GetBoundingBox(*args, **kwargs)
- GetBoundingBox() -> (x1,y1, x2,y2)
Returns the min and max points used in drawing commands so far.
- GetBrush(*args, **kwargs)
- GetBrush(self) -> Brush
Gets the current brush
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Gets the character height of the currently set font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Gets the average character width of the currently set font.
- GetClippingBox(*args, **kwargs)
- GetClippingBox() -> (x, y, width, height)
Gets the rectangle surrounding the current clipping region.
- GetClippingRect(*args, **kwargs)
- GetClippingRect(self) -> Rect
Gets the rectangle surrounding the current clipping region.
- GetDepth(*args, **kwargs)
- GetDepth(self) -> int
Returns the colour depth of the DC.
- GetDeviceOrigin(*args, **kwargs)
- GetDeviceOrigin(self) -> Point
- GetDeviceOriginTuple(*args, **kwargs)
- GetDeviceOriginTuple() -> (x,y)
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Gets the current font
- GetFullTextExtent(*args, **kwargs)
- 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.
- GetLogicalFunction(*args, **kwargs)
- GetLogicalFunction(self) -> int
Gets the current logical function (set by `SetLogicalFunction`).
- GetLogicalOrigin(*args, **kwargs)
- GetLogicalOrigin(self) -> Point
- GetLogicalOriginTuple(*args, **kwargs)
- GetLogicalOriginTuple() -> (x,y)
- GetLogicalScale(*args, **kwargs)
- GetLogicalScale() -> (xScale, yScale)
- GetMapMode(*args, **kwargs)
- GetMapMode(self) -> int
Gets the current *mapping mode* for the device context
- GetMultiLineTextExtent(*args, **kwargs)
- 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.
- GetOptimization = deprecatedWrapper(*args, **kwargs)
- <function GetOptimization at 0x2b90d8fb6398> is deprecated
- GetPPI(*args, **kwargs)
- GetPPI(self) -> Size
Resolution in Pixels per inch
- GetPartialTextExtents(*args, **kwargs)
- GetPartialTextExtents(self, text) -> [widths]
Returns a list of integers such that each value is the distance in
pixels from the begining of text to the coresponding character of
*text*. The generic version simply builds a running total of the widths
of each character using GetTextExtent, however if the various
platforms have a native API function that is faster or more accurate
than the generic implementation then it will be used instead.
- GetPen(*args, **kwargs)
- GetPen(self) -> Pen
Gets the current pen
- GetPixel(*args, **kwargs)
- GetPixel(self, int x, int y) -> Colour
Gets the colour at the specified location on the DC.
- GetPixelPoint(*args, **kwargs)
- GetPixelPoint(self, Point pt) -> Colour
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
This gets the horizontal and vertical resolution in device units. It
can be used to scale graphics to fit the page. For example, if *maxX*
and *maxY* represent the maximum horizontal and vertical 'pixel' values
used in your application, the following code will scale the graphic to
fit on the printer page::
w, h = dc.GetSize()
scaleX = maxX*1.0 / w
scaleY = maxY*1.0 / h
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
- GetSizeMM(*args, **kwargs)
- GetSizeMM(self) -> Size
Get the DC size in milimeters.
- GetSizeMMTuple(*args, **kwargs)
- GetSizeMMTuple() -> (width, height)
Get the DC size in milimeters.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
This gets the horizontal and vertical resolution in device units. It
can be used to scale graphics to fit the page. For example, if *maxX*
and *maxY* represent the maximum horizontal and vertical 'pixel' values
used in your application, the following code will scale the graphic to
fit on the printer page::
w, h = dc.GetSize()
scaleX = maxX*1.0 / w
scaleY = maxY*1.0 / h
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
- GetTextBackground(*args, **kwargs)
- GetTextBackground(self) -> Colour
Gets the current text background colour
- 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.
- GetTextForeground(*args, **kwargs)
- GetTextForeground(self) -> Colour
Gets the current text foreground colour
- GetUserScale(*args, **kwargs)
- GetUserScale(self) -> (xScale, yScale)
Gets the current user scale factor (set by `SetUserScale`).
- LogicalToDeviceX(*args, **kwargs)
- LogicalToDeviceX(self, int x) -> int
Converts logical X coordinate to device coordinate, using the current
mapping mode.
- LogicalToDeviceXRel(*args, **kwargs)
- LogicalToDeviceXRel(self, int x) -> int
Converts logical X coordinate to relative device coordinate, using the
current mapping mode but ignoring the x axis orientation. Use this for
converting a width, for example.
- LogicalToDeviceY(*args, **kwargs)
- LogicalToDeviceY(self, int y) -> int
Converts logical Y coordinate to device coordinate, using the current
mapping mode.
- LogicalToDeviceYRel(*args, **kwargs)
- LogicalToDeviceYRel(self, int y) -> int
Converts logical Y coordinate to relative device coordinate, using the
current mapping mode but ignoring the y axis orientation. Use this for
converting a height, for example.
- MaxX(*args, **kwargs)
- MaxX(self) -> int
Gets the maximum horizontal extent used in drawing commands so far.
- MaxY(*args, **kwargs)
- MaxY(self) -> int
Gets the maximum vertical extent used in drawing commands so far.
- MinX(*args, **kwargs)
- MinX(self) -> int
Gets the minimum horizontal extent used in drawing commands so far.
- MinY(*args, **kwargs)
- MinY(self) -> int
Gets the minimum vertical extent used in drawing commands so far.
- Ok(*args, **kwargs)
- Ok(self) -> bool
Returns true if the DC is ok to use.
- ResetBoundingBox(*args, **kwargs)
- ResetBoundingBox(self)
Resets the bounding box: after a call to this function, the bounding
box doesn't contain anything.
- SetAxisOrientation(*args, **kwargs)
- SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
Sets the x and y axis orientation (i.e., the direction from lowest to
highest values on the axis). The default orientation is the natural
orientation, e.g. x axis from left to right and y axis from bottom up.
- SetBackground(*args, **kwargs)
- SetBackground(self, Brush brush)
Sets the current background brush for the DC.
- SetBackgroundMode(*args, **kwargs)
- SetBackgroundMode(self, int mode)
*mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
determines whether text will be drawn with a background colour or
not.
- SetBrush(*args, **kwargs)
- SetBrush(self, Brush brush)
Sets the current brush for the DC.
If the argument is ``wx.NullBrush``, the current brush is selected out
of the device context, and the original brush restored, allowing the
current brush to be destroyed safely.
- SetClippingRect(*args, **kwargs)
- SetClippingRect(self, Rect rect)
Sets the clipping region for this device context to the intersection
of the given region described by the parameters of this method and the
previously set clipping region. You should call `DestroyClippingRegion`
if you want to set the clipping region exactly to the region
specified.
The clipping region is an area to which drawing is
restricted. Possible uses for the clipping region are for clipping
text or for speeding up window redraws when only a known area of the
screen is damaged.
- SetClippingRegion(*args, **kwargs)
- SetClippingRegion(self, int x, int y, int width, int height)
Sets the clipping region for this device context to the intersection
of the given region described by the parameters of this method and the
previously set clipping region. You should call `DestroyClippingRegion`
if you want to set the clipping region exactly to the region
specified.
The clipping region is an area to which drawing is
restricted. Possible uses for the clipping region are for clipping
text or for speeding up window redraws when only a known area of the
screen is damaged.
- SetClippingRegionAsRegion(*args, **kwargs)
- SetClippingRegionAsRegion(self, Region region)
Sets the clipping region for this device context to the intersection
of the given region described by the parameters of this method and the
previously set clipping region. You should call `DestroyClippingRegion`
if you want to set the clipping region exactly to the region
specified.
The clipping region is an area to which drawing is
restricted. Possible uses for the clipping region are for clipping
text or for speeding up window redraws when only a known area of the
screen is damaged.
- SetClippingRegionPointSize(*args, **kwargs)
- SetClippingRegionPointSize(self, Point pt, Size sz)
Sets the clipping region for this device context to the intersection
of the given region described by the parameters of this method and the
previously set clipping region. You should call `DestroyClippingRegion`
if you want to set the clipping region exactly to the region
specified.
The clipping region is an area to which drawing is
restricted. Possible uses for the clipping region are for clipping
text or for speeding up window redraws when only a known area of the
screen is damaged.
- SetDeviceOrigin(*args, **kwargs)
- SetDeviceOrigin(self, int x, int y)
- SetDeviceOriginPoint(*args, **kwargs)
- SetDeviceOriginPoint(self, Point point)
- SetFont(*args, **kwargs)
- SetFont(self, Font font)
Sets the current font for the DC. It must be a valid font, in
particular you should not pass ``wx.NullFont`` to this method.
- SetLogicalFunction(*args, **kwargs)
- SetLogicalFunction(self, int function)
Sets the current logical function for the device context. This
determines how a source pixel (from a pen or brush colour, or source
device context if using `Blit`) combines with a destination pixel in
the current device context.
The possible values and their meaning in terms of source and
destination pixel values are as follows:
================ ==========================
wx.AND src AND dst
wx.AND_INVERT (NOT src) AND dst
wx.AND_REVERSE src AND (NOT dst)
wx.CLEAR 0
wx.COPY src
wx.EQUIV (NOT src) XOR dst
wx.INVERT NOT dst
wx.NAND (NOT src) OR (NOT dst)
wx.NOR (NOT src) AND (NOT dst)
wx.NO_OP dst
wx.OR src OR dst
wx.OR_INVERT (NOT src) OR dst
wx.OR_REVERSE src OR (NOT dst)
wx.SET 1
wx.SRC_INVERT NOT src
wx.XOR src XOR dst
================ ==========================
The default is wx.COPY, which simply draws with the current
colour. The others combine the current colour and the background using
a logical operation. wx.INVERT is commonly used for drawing rubber
bands or moving outlines, since drawing twice reverts to the original
colour.
- SetLogicalOrigin(*args, **kwargs)
- SetLogicalOrigin(self, int x, int y)
- SetLogicalOriginPoint(*args, **kwargs)
- SetLogicalOriginPoint(self, Point point)
- SetLogicalScale(*args, **kwargs)
- SetLogicalScale(self, double x, double y)
- SetMapMode(*args, **kwargs)
- SetMapMode(self, int mode)
The *mapping mode* of the device context defines the unit of
measurement used to convert logical units to device units. The
mapping mode can be one of the following:
================ =============================================
wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
of an inch.
wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
wx.MM_METRIC Each logical unit is 1 mm.
wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
wx.MM_TEXT Each logical unit is 1 pixel.
================ =============================================
- SetOptimization = deprecatedWrapper(*args, **kwargs)
- <function SetOptimization at 0x2b90d8fb6320> is deprecated
- SetPalette(*args, **kwargs)
- SetPalette(self, Palette palette)
If this is a window DC or memory DC, assigns the given palette to the
window or bitmap associated with the DC. If the argument is
``wx.NullPalette``, the current palette is selected out of the device
context, and the original palette restored.
- SetPen(*args, **kwargs)
- SetPen(self, Pen pen)
Sets the current pen for the DC.
If the argument is ``wx.NullPen``, the current pen is selected out of the
device context, and the original pen restored.
- SetTextBackground(*args, **kwargs)
- SetTextBackground(self, Colour colour)
Sets the current text background colour for the DC.
- SetTextForeground(*args, **kwargs)
- SetTextForeground(self, Colour colour)
Sets the current text foreground colour for the DC.
- SetUserScale(*args, **kwargs)
- SetUserScale(self, double x, double y)
Sets the user scaling factor, useful for applications which require
'zooming'.
- StartDoc(*args, **kwargs)
- StartDoc(self, String message) -> bool
Starts a document (only relevant when outputting to a
printer). *Message* is a message to show whilst printing.
- StartPage(*args, **kwargs)
- StartPage(self)
Starts a document page (only relevant when outputting to a printer).
- __del__(self, destroy=<built-in function delete_DC>)
- __del__(self)
- __nonzero__(self)
Methods inherited from wx._core.Object:
- Destroy(*args, **kwargs)
- Destroy(self)
Deletes the C++ object this Python object is a proxy for.
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class MenuButtonWx(wx._controls.Button) |
|
wxPython does not permit a menu to be incorporated directly into a toolbar.
This class simulates the effect by associating a pop-up menu with a button
in the toolbar, and managing this as though it were a menu. |
|
- Method resolution order:
- MenuButtonWx
- wx._controls.Button
- wx._core.Control
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- Destroy(self)
- __init__(self, parent)
- getActiveAxes(self)
- Return a list of the selected axes.
- updateAxes(self, maxAxis)
- Ensures that there are entries for max_axis axes in the menu
(selected by default).
- updateButtonText(self, lst)
- Update the list of selected axes in the menu button
Methods inherited from wx._controls.Button:
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, String label=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, Validator validator=DefaultValidator,
String name=ButtonNameStr) -> bool
Acutally create the GUI Button for 2-phase creation.
- SetDefault(*args, **kwargs)
- SetDefault(self)
This sets the button to be the default item for the panel or dialog box.
- __repr__(self)
Static methods inherited from wx._controls.Button:
- 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
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.
- GetDefaultSize(*args, **kwargs)
- GetDefaultSize() -> Size
Returns the default button size for this platform.
Methods inherited from wx._core.Control:
- Command(*args, **kwargs)
- Command(self, CommandEvent event)
Simulates the effect of the user issuing a command to the item.
:see: `wx.CommandEvent`
- GetLabel(*args, **kwargs)
- GetLabel(self) -> String
Return a control's text.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Sets the item's text.
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CenterOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CentreOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
Get the origin of the client area of the window relative to the
window's top left corner (the client area may be shifted because of
the borders, scrollbars, other decorations...)
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SendSizeEvent(self)
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class NavigationToolbar2Wx(matplotlib.backend_bases.NavigationToolbar2, wx._controls.ToolBar) |
| |
- Method resolution order:
- NavigationToolbar2Wx
- matplotlib.backend_bases.NavigationToolbar2
- wx._controls.ToolBar
- wx._controls.ToolBarBase
- wx._core.Control
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- __init__(self, canvas)
- configure_subplot(self, evt)
- draw_rubberband(self, event, x0, y0, x1, y1)
- adapted from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189744
- dynamic_update(self)
- get_canvas(self, frame, fig)
- pan(self, *args)
- release(self, event)
- save(self, evt)
- set_cursor(self, cursor)
- set_history_buttons(self)
- set_message(self, s)
- set_status_bar(self, statbar)
- zoom(self, *args)
Methods inherited from matplotlib.backend_bases.NavigationToolbar2:
- back(self, *args)
- move back up the view lim stack
- drag_pan(self, event)
- the drag callback in pan/zoom mode
- draw(self)
- redraw the canvases, update the locators
- forward(self, *args)
- move forward in the view lim stack
- home(self, *args)
- restore the original view
- mouse_move(self, event)
- press(self, event)
- this will be called whenver a mouse button is pressed
- press_pan(self, event)
- the press mouse button in pan/zoom mode callback
- press_zoom(self, event)
- the press mouse button in zoom to rect mode callback
- push_current(self)
- push the current view limits and position onto the stack
- release_pan(self, event)
- the release mouse button callback in pan/zoom mode
- release_zoom(self, event)
- the release mouse button callback in zoom to rect mode
- save_figure(self, *args)
- save the current figure
- update(self)
- reset the axes stack
Methods inherited from wx._controls.ToolBar:
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL,
String name=wxPyToolBarNameStr) -> bool
- FindToolForPosition(*args, **kwargs)
- FindToolForPosition(self, int x, int y) -> ToolBarToolBase
- __repr__(self)
Static methods inherited from wx._controls.ToolBar:
- 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
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.
Methods inherited from wx._controls.ToolBarBase:
- AddCheckLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a check tool, i.e. a tool which can be toggled
- AddCheckTool(self, id, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a check tool, i.e. a tool which can be toggled
- AddControl(*args, **kwargs)
- AddControl(self, Control control) -> ToolBarToolBase
- AddLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), kind=0, shortHelp='', longHelp='', clientData=None)
- The full AddTool() function.
If bmpDisabled is wx.NullBitmap, a shadowed version of the normal bitmap
is created and used as the disabled image.
- AddRadioLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a radio tool, i.e. a tool which can be toggled and releases any
other toggled radio tools in the same group when it happens
- AddRadioTool(self, id, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a radio tool, i.e. a tool which can be toggled and releases any
other toggled radio tools in the same group when it happens
- AddSeparator(*args, **kwargs)
- AddSeparator(self) -> ToolBarToolBase
- AddSimpleTool(self, id, bitmap, shortHelpString='', longHelpString='', isToggle=0)
- Old style method to add a tool to the toolbar.
- AddTool(self, id, bitmap, pushedBitmap=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), isToggle=0, clientData=None, shortHelpString='', longHelpString='')
- Old style method to add a tool to the toolbar.
- AddToolItem(*args, **kwargs)
- AddToolItem(self, ToolBarToolBase tool) -> ToolBarToolBase
- ClearTools(*args, **kwargs)
- ClearTools(self)
- DeleteTool(*args, **kwargs)
- DeleteTool(self, int id) -> bool
- DeleteToolByPos(*args, **kwargs)
- DeleteToolByPos(self, size_t pos) -> bool
- DoAddTool(*args, **kwargs)
- DoAddTool(self, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
int kind=ITEM_NORMAL, String shortHelp=EmptyString,
String longHelp=EmptyString,
PyObject clientData=None) -> ToolBarToolBase
- DoInsertTool(*args, **kwargs)
- DoInsertTool(self, size_t pos, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
int kind=ITEM_NORMAL,
String shortHelp=EmptyString, String longHelp=EmptyString,
PyObject clientData=None) -> ToolBarToolBase
- EnableTool(*args, **kwargs)
- EnableTool(self, int id, bool enable)
- FindById(*args, **kwargs)
- FindById(self, int toolid) -> ToolBarToolBase
- FindControl(*args, **kwargs)
- FindControl(self, int id) -> Control
- GetMargins(*args, **kwargs)
- GetMargins(self) -> Size
- GetMaxCols(*args, **kwargs)
- GetMaxCols(self) -> int
- GetMaxRows(*args, **kwargs)
- GetMaxRows(self) -> int
- GetToolBitmapSize(*args, **kwargs)
- GetToolBitmapSize(self) -> Size
- GetToolClientData(*args, **kwargs)
- GetToolClientData(self, int id) -> PyObject
- GetToolEnabled(*args, **kwargs)
- GetToolEnabled(self, int id) -> bool
- GetToolLongHelp(*args, **kwargs)
- GetToolLongHelp(self, int id) -> String
- GetToolMargins(*args, **kwargs)
- GetToolMargins(self) -> Size
- GetToolPacking(*args, **kwargs)
- GetToolPacking(self) -> int
- GetToolPos(*args, **kwargs)
- GetToolPos(self, int id) -> int
- GetToolSeparation(*args, **kwargs)
- GetToolSeparation(self) -> int
- GetToolShortHelp(*args, **kwargs)
- GetToolShortHelp(self, int id) -> String
- GetToolSize(*args, **kwargs)
- GetToolSize(self) -> Size
- GetToolState(*args, **kwargs)
- GetToolState(self, int id) -> bool
- GetToolsCount(*args, **kwargs)
- GetToolsCount(self) -> size_t
- InsertControl(*args, **kwargs)
- InsertControl(self, size_t pos, Control control) -> ToolBarToolBase
- InsertLabelTool(self, pos, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), kind=0, shortHelp='', longHelp='', clientData=None)
- Insert the new tool at the given position, if pos == GetToolsCount(), it
is equivalent to AddTool()
- InsertSeparator(*args, **kwargs)
- InsertSeparator(self, size_t pos) -> ToolBarToolBase
- InsertSimpleTool(self, pos, id, bitmap, shortHelpString='', longHelpString='', isToggle=0)
- Old style method to insert a tool in the toolbar.
- InsertTool(self, pos, id, bitmap, pushedBitmap=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), isToggle=0, clientData=None, shortHelpString='', longHelpString='')
- Old style method to insert a tool in the toolbar.
- InsertToolItem(*args, **kwargs)
- InsertToolItem(self, size_t pos, ToolBarToolBase tool) -> ToolBarToolBase
- IsVertical(*args, **kwargs)
- IsVertical(self) -> bool
- Realize(*args, **kwargs)
- Realize(self) -> bool
- RemoveTool(*args, **kwargs)
- RemoveTool(self, int id) -> ToolBarToolBase
- SetMargins(*args, **kwargs)
- SetMargins(self, Size size)
- SetMarginsXY(*args, **kwargs)
- SetMarginsXY(self, int x, int y)
- SetMaxRowsCols(*args, **kwargs)
- SetMaxRowsCols(self, int rows, int cols)
- SetRows(*args, **kwargs)
- SetRows(self, int nRows)
- SetToggle(*args, **kwargs)
- SetToggle(self, int id, bool toggle)
- SetToolBitmapSize(*args, **kwargs)
- SetToolBitmapSize(self, Size size)
- SetToolClientData(*args, **kwargs)
- SetToolClientData(self, int id, PyObject clientData)
- SetToolLongHelp(*args, **kwargs)
- SetToolLongHelp(self, int id, String helpString)
- SetToolPacking(*args, **kwargs)
- SetToolPacking(self, int packing)
- SetToolSeparation(*args, **kwargs)
- SetToolSeparation(self, int separation)
- SetToolShortHelp(*args, **kwargs)
- SetToolShortHelp(self, int id, String helpString)
- ToggleTool(*args, **kwargs)
- ToggleTool(self, int id, bool toggle)
Methods inherited from wx._core.Control:
- Command(*args, **kwargs)
- Command(self, CommandEvent event)
Simulates the effect of the user issuing a command to the item.
:see: `wx.CommandEvent`
- GetLabel(*args, **kwargs)
- GetLabel(self) -> String
Return a control's text.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Sets the item's text.
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CenterOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CentreOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- Destroy(*args, **kwargs)
- Destroy(self) -> bool
Destroys the window safely. Frames and dialogs are not destroyed
immediately when this function is called -- they are added to a list
of windows to be deleted on idle time, when all the window's events
have been processed. This prevents problems with events being sent to
non-existent windows.
Returns True if the window has either been successfully deleted, or it
has been added to the list of windows pending real deletion.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
Get the origin of the client area of the window relative to the
window's top left corner (the client area may be shifted because of
the borders, scrollbars, other decorations...)
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SendSizeEvent(self)
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class NavigationToolbarWx(wx._controls.ToolBar) |
| |
- Method resolution order:
- NavigationToolbarWx
- wx._controls.ToolBar
- wx._controls.ToolBarBase
- wx._core.Control
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- __init__(self, canvas, can_kill=False)
- figure is the Figure instance that the toolboar controls
win, if not None, is the wxWindow the Figure is embedded in
- get_last_control(self)
- Returns the identity of the last toolbar button pressed.
- panx(self, direction)
- pany(self, direction)
- set_active(self, ind)
- ind is a list of index numbers for the axes which are to be made active
- update(self)
- Update the toolbar menu - called when (e.g.) a new subplot or axes are added
- zoomx(self, in_out)
- zoomy(self, in_out)
Methods inherited from wx._controls.ToolBar:
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL,
String name=wxPyToolBarNameStr) -> bool
- FindToolForPosition(*args, **kwargs)
- FindToolForPosition(self, int x, int y) -> ToolBarToolBase
- __repr__(self)
Static methods inherited from wx._controls.ToolBar:
- 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
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.
Methods inherited from wx._controls.ToolBarBase:
- AddCheckLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a check tool, i.e. a tool which can be toggled
- AddCheckTool(self, id, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a check tool, i.e. a tool which can be toggled
- AddControl(*args, **kwargs)
- AddControl(self, Control control) -> ToolBarToolBase
- AddLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), kind=0, shortHelp='', longHelp='', clientData=None)
- The full AddTool() function.
If bmpDisabled is wx.NullBitmap, a shadowed version of the normal bitmap
is created and used as the disabled image.
- AddRadioLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a radio tool, i.e. a tool which can be toggled and releases any
other toggled radio tools in the same group when it happens
- AddRadioTool(self, id, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a radio tool, i.e. a tool which can be toggled and releases any
other toggled radio tools in the same group when it happens
- AddSeparator(*args, **kwargs)
- AddSeparator(self) -> ToolBarToolBase
- AddSimpleTool(self, id, bitmap, shortHelpString='', longHelpString='', isToggle=0)
- Old style method to add a tool to the toolbar.
- AddTool(self, id, bitmap, pushedBitmap=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), isToggle=0, clientData=None, shortHelpString='', longHelpString='')
- Old style method to add a tool to the toolbar.
- AddToolItem(*args, **kwargs)
- AddToolItem(self, ToolBarToolBase tool) -> ToolBarToolBase
- ClearTools(*args, **kwargs)
- ClearTools(self)
- DeleteTool(*args, **kwargs)
- DeleteTool(self, int id) -> bool
- DeleteToolByPos(*args, **kwargs)
- DeleteToolByPos(self, size_t pos) -> bool
- DoAddTool(*args, **kwargs)
- DoAddTool(self, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
int kind=ITEM_NORMAL, String shortHelp=EmptyString,
String longHelp=EmptyString,
PyObject clientData=None) -> ToolBarToolBase
- DoInsertTool(*args, **kwargs)
- DoInsertTool(self, size_t pos, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
int kind=ITEM_NORMAL,
String shortHelp=EmptyString, String longHelp=EmptyString,
PyObject clientData=None) -> ToolBarToolBase
- EnableTool(*args, **kwargs)
- EnableTool(self, int id, bool enable)
- FindById(*args, **kwargs)
- FindById(self, int toolid) -> ToolBarToolBase
- FindControl(*args, **kwargs)
- FindControl(self, int id) -> Control
- GetMargins(*args, **kwargs)
- GetMargins(self) -> Size
- GetMaxCols(*args, **kwargs)
- GetMaxCols(self) -> int
- GetMaxRows(*args, **kwargs)
- GetMaxRows(self) -> int
- GetToolBitmapSize(*args, **kwargs)
- GetToolBitmapSize(self) -> Size
- GetToolClientData(*args, **kwargs)
- GetToolClientData(self, int id) -> PyObject
- GetToolEnabled(*args, **kwargs)
- GetToolEnabled(self, int id) -> bool
- GetToolLongHelp(*args, **kwargs)
- GetToolLongHelp(self, int id) -> String
- GetToolMargins(*args, **kwargs)
- GetToolMargins(self) -> Size
- GetToolPacking(*args, **kwargs)
- GetToolPacking(self) -> int
- GetToolPos(*args, **kwargs)
- GetToolPos(self, int id) -> int
- GetToolSeparation(*args, **kwargs)
- GetToolSeparation(self) -> int
- GetToolShortHelp(*args, **kwargs)
- GetToolShortHelp(self, int id) -> String
- GetToolSize(*args, **kwargs)
- GetToolSize(self) -> Size
- GetToolState(*args, **kwargs)
- GetToolState(self, int id) -> bool
- GetToolsCount(*args, **kwargs)
- GetToolsCount(self) -> size_t
- InsertControl(*args, **kwargs)
- InsertControl(self, size_t pos, Control control) -> ToolBarToolBase
- InsertLabelTool(self, pos, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), kind=0, shortHelp='', longHelp='', clientData=None)
- Insert the new tool at the given position, if pos == GetToolsCount(), it
is equivalent to AddTool()
- InsertSeparator(*args, **kwargs)
- InsertSeparator(self, size_t pos) -> ToolBarToolBase
- InsertSimpleTool(self, pos, id, bitmap, shortHelpString='', longHelpString='', isToggle=0)
- Old style method to insert a tool in the toolbar.
- InsertTool(self, pos, id, bitmap, pushedBitmap=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), isToggle=0, clientData=None, shortHelpString='', longHelpString='')
- Old style method to insert a tool in the toolbar.
- InsertToolItem(*args, **kwargs)
- InsertToolItem(self, size_t pos, ToolBarToolBase tool) -> ToolBarToolBase
- IsVertical(*args, **kwargs)
- IsVertical(self) -> bool
- Realize(*args, **kwargs)
- Realize(self) -> bool
- RemoveTool(*args, **kwargs)
- RemoveTool(self, int id) -> ToolBarToolBase
- SetMargins(*args, **kwargs)
- SetMargins(self, Size size)
- SetMarginsXY(*args, **kwargs)
- SetMarginsXY(self, int x, int y)
- SetMaxRowsCols(*args, **kwargs)
- SetMaxRowsCols(self, int rows, int cols)
- SetRows(*args, **kwargs)
- SetRows(self, int nRows)
- SetToggle(*args, **kwargs)
- SetToggle(self, int id, bool toggle)
- SetToolBitmapSize(*args, **kwargs)
- SetToolBitmapSize(self, Size size)
- SetToolClientData(*args, **kwargs)
- SetToolClientData(self, int id, PyObject clientData)
- SetToolLongHelp(*args, **kwargs)
- SetToolLongHelp(self, int id, String helpString)
- SetToolPacking(*args, **kwargs)
- SetToolPacking(self, int packing)
- SetToolSeparation(*args, **kwargs)
- SetToolSeparation(self, int separation)
- SetToolShortHelp(*args, **kwargs)
- SetToolShortHelp(self, int id, String helpString)
- ToggleTool(*args, **kwargs)
- ToggleTool(self, int id, bool toggle)
Methods inherited from wx._core.Control:
- Command(*args, **kwargs)
- Command(self, CommandEvent event)
Simulates the effect of the user issuing a command to the item.
:see: `wx.CommandEvent`
- GetLabel(*args, **kwargs)
- GetLabel(self) -> String
Return a control's text.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Sets the item's text.
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CenterOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CentreOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- Destroy(*args, **kwargs)
- Destroy(self) -> bool
Destroys the window safely. Frames and dialogs are not destroyed
immediately when this function is called -- they are added to a list
of windows to be deleted on idle time, when all the window's events
have been processed. This prevents problems with events being sent to
non-existent windows.
Returns True if the window has either been successfully deleted, or it
has been added to the list of windows pending real deletion.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
Get the origin of the client area of the window relative to the
window's top left corner (the client area may be shifted because of
the borders, scrollbars, other decorations...)
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SendSizeEvent(self)
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class PrintoutWx(wx._windows.Printout) |
|
Simple wrapper around wx Printout class -- all the real work
here is scaling the matplotlib canvas bitmap to the current
printer's definition. |
|
- Method resolution order:
- PrintoutWx
- wx._windows.Printout
- wx._core.Object
- __builtin__.object
Methods defined here:
- GetPageInfo(self)
- HasPage(self, page)
- OnPrintPage(self, page)
- __init__(self, canvas, width=5.5, margin=0.5, title='matplotlib')
Methods inherited from wx._windows.Printout:
- GetDC(*args, **kwargs)
- GetDC(self) -> DC
- GetPPIPrinter(*args, **kwargs)
- GetPPIPrinter() -> (x,y)
- GetPPIScreen(*args, **kwargs)
- GetPPIScreen() -> (x,y)
- GetPageSizeMM(*args, **kwargs)
- GetPageSizeMM() -> (w, h)
- GetPageSizePixels(*args, **kwargs)
- GetPageSizePixels() -> (w, h)
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
- IsPreview(*args, **kwargs)
- IsPreview(self) -> bool
- SetDC(*args, **kwargs)
- SetDC(self, DC dc)
- SetIsPreview(*args, **kwargs)
- SetIsPreview(self, bool p)
- SetPPIPrinter(*args, **kwargs)
- SetPPIPrinter(self, int x, int y)
- SetPPIScreen(*args, **kwargs)
- SetPPIScreen(self, int x, int y)
- SetPageSizeMM(*args, **kwargs)
- SetPageSizeMM(self, int w, int h)
- SetPageSizePixels(*args, **kwargs)
- SetPageSizePixels(self, int w, int h)
- __repr__(self)
- base_GetPageInfo(*args, **kwargs)
- base_GetPageInfo() -> (minPage, maxPage, pageFrom, pageTo)
- base_HasPage(*args, **kwargs)
- base_HasPage(self, int page) -> bool
- base_OnBeginDocument(*args, **kwargs)
- base_OnBeginDocument(self, int startPage, int endPage) -> bool
- base_OnBeginPrinting(*args, **kwargs)
- base_OnBeginPrinting(self)
- base_OnEndDocument(*args, **kwargs)
- base_OnEndDocument(self)
- base_OnEndPrinting(*args, **kwargs)
- base_OnEndPrinting(self)
- base_OnPreparePrinting(*args, **kwargs)
- base_OnPreparePrinting(self)
Methods inherited from wx._core.Object:
- Destroy(*args, **kwargs)
- Destroy(self)
Deletes the C++ object this Python object is a proxy for.
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class RendererWx(matplotlib.backend_bases.RendererBase) |
|
The renderer handles all the drawing primitives using a graphics
context instance that controls the colors/styles. It acts as the
'renderer' instance used by many classes in the hierarchy. |
|
Methods defined here:
- __init__(self, bitmap, dpi)
- Initialise a wxWindows renderer instance.
- draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2, rotation)
- Draw an arc centered at x,y with width and height and angles
from 0.0 to 360.0.
If rgbFace is present, fill the figure in this colour, otherwise
it is not filled.
- draw_line(self, gc, x1, y1, x2, y2)
- Draw a single line from x1,y1 to x2,y2
- draw_lines(self, gc, x, y)
- x and y are equal length arrays, draw lines connecting each
point in x, y
- draw_point(self, gc, x, y)
- Draw a single point at x,y
- draw_polygon(self, gc, rgbFace, points)
- Draw a polygon. points is a len vertices tuple, each element
giving the x,y coords a vertex
- draw_rectangle(self, gc, rgbFace, x, y, width, height)
- Draw a rectangle at lower left x,y with width and height
If filled=True, fill the rectangle with the gc foreground
gc is a GraphicsContext instance
- draw_text(self, gc, x, y, s, prop, angle, ismath)
- Render the matplotlib.text.Text instance
None)
- flipy(self)
- get_canvas_width_height(self)
- return the canvas width and height in display coords
- get_gc(self)
- Fetch the locally cached gc.
- get_text_width_height(self, s, prop, ismath)
- get the width and height in display coords of the string s
with FontPropertry prop
- get_wx_font(self, s, prop)
- Return a wx font. Cache instances in a font dictionary for
efficiency
- new_gc(self)
- Return an instance of a GraphicsContextWx, and sets the current gc copy
- offset_text_height(self)
- points_to_pixels(self, points)
- convert point measures to pixes using dpi and the pixels per
inch of the display
Data and other attributes defined here:
- fontangles = {'italic': 93, 'normal': 90, 'oblique': 94}
- fontnames = {'Courier': 75, 'Decorative': 71, 'Modern': 75, 'Roman': 72, 'Sans': 74, 'Script': 73, 'courier': 75}
- fontweights = {100: 91, 200: 91, 300: 91, 400: 90, 500: 90, 600: 90, 700: 92, 800: 92, 900: 92, 'black': 92, ...}
Methods inherited from matplotlib.backend_bases.RendererBase:
- close_group(self, s)
- close a grouping element with label s
Is only currently used by backend_svg
- draw_image(self, x, y, im, bbox)
- Draw the Image instance into the current axes; x is the
distance in pixels from the left hand side of the canvas. y is
the distance from the origin. That is, if origin is upper, y
is the distance from top. If origin is lower, y is the
distance from bottom
bbox is a matplotlib.transforms.BBox instance for clipping, or
None
- draw_line_collection(self, segments, transform, clipbox, colors, linewidths, linestyle, antialiaseds, offsets, transOffset)
- This is a function for optimized line drawing. If you need to draw
many line segments with similar properties, it is faster to avoid the
overhead of all the object creation etc. The lack of total
configurability is compensated for with efficiency. Hence we don't use
a GC and many of the line props it supports. See
matplotlib.collections for more details.
segments is a sequence of ( line0, line1, line2), where linen =
is an Mx2 array with columns x, y. Each line can be a
different length
transform is used to Transform the lines
clipbox is a xmin, ymin, width, height clip rect
colors is a tuple of RGBA tuples
linewidths is a tuple of linewidths
*** really should be called 'dashes' not 'linestyle', since
we call gc.set_dashes() not gc.set_linestyle() ***
linestyle is an (offset, onoffseq) tuple or None,None for solid
antialiseds is a tuple of ones or zeros indicating whether the
segment should be aa or not
offsets, if not None, is an Nx2 array of x,y offsets to
translate the lines by after transform is used to transform
the offset coords
This function could be overridden in the backend to possibly implement
faster drawing, but it is already much faster than using draw_lines()
by itself.
- draw_poly_collection(self, verts, transform, clipbox, facecolors, edgecolors, linewidths, antialiaseds, offsets, transOffset)
- Draw a polygon collection
verts are a sequence of polygon vectors, where each polygon
vector is a sequence of x,y tuples of vertices
facecolors and edgecolors are a sequence of RGBA tuples
linewidths are a sequence of linewidths
antialiaseds are a sequence of 0,1 integers whether to use aa
If a linewidth is zero or an edgecolor alpha is zero, the
line will be omitted; similarly, the fill will be omitted
if the facecolor alpha is zero.
- draw_quad_mesh(self, meshWidth, meshHeight, colors, xCoords, yCoords, clipbox, transform, offsets, transOffset, showedges)
- Draw a quadrilateral mesh
See documentation in QuadMesh class in collections.py for details
- draw_regpoly_collection(self, clipbox, offsets, transOffset, verts, sizes, facecolors, edgecolors, linewidths, antialiaseds)
- Draw a regular poly collection
offsets - is a sequence is x,y tuples
transOffset - maps this to display coords
verts - are the vertices of the regular polygon at the origin
sizes are the area of the circle that circumscribes the
polygon in points^2
facecolors and edgecolors are a sequence of RGBA tuples
linewidths are a sequence of linewidths
antialiaseds are a sequence of 0,1 integers whether to use aa
- draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!')
- get_image_magnification(self)
- Get the factor by which to magnify images passed to draw_image.
Allows a backend to have images at a different resolution to other
artists.
- get_texmanager(self)
- get_text_extent(self, text)
- Get the text extent in window coords
- open_group(self, s)
- open a grouping element with label s
Is only currently used by backend_svg
- option_image_nocomposite(self)
- overwrite this method for renderers that do not necessarily
want to rescale and composite raster images. (like SVG)
- strip_math(self, s)
|
class StatusBarWx(wx._windows.StatusBar) |
|
A status bar is added to _FigureFrame to allow measurements and the
previously selected scroll function to be displayed as a user
convenience. |
|
- Method resolution order:
- StatusBarWx
- wx._windows.StatusBar
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- __init__(self, parent)
- set_function(self, string)
Methods inherited from wx._windows.StatusBar:
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool
- GetBorderX(*args, **kwargs)
- GetBorderX(self) -> int
- GetBorderY(*args, **kwargs)
- GetBorderY(self) -> int
- GetFieldRect(*args, **kwargs)
- GetFieldRect(self, int i) -> Rect
- GetFieldsCount(*args, **kwargs)
- GetFieldsCount(self) -> int
- GetStatusText(*args, **kwargs)
- GetStatusText(self, int number=0) -> String
- PopStatusText(*args, **kwargs)
- PopStatusText(self, int number=0)
- PushStatusText(*args, **kwargs)
- PushStatusText(self, String text, int number=0)
- SetFieldsCount(*args, **kwargs)
- SetFieldsCount(self, int number=1)
- SetMinHeight(*args, **kwargs)
- SetMinHeight(self, int height)
- SetStatusStyles(*args, **kwargs)
- SetStatusStyles(self, int styles)
- SetStatusText(*args, **kwargs)
- SetStatusText(self, String text, int number=0)
- SetStatusWidths(*args, **kwargs)
- SetStatusWidths(self, int widths)
- __repr__(self)
Static methods inherited from wx._windows.StatusBar:
- 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
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.
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CenterOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CentreOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- Destroy(*args, **kwargs)
- Destroy(self) -> bool
Destroys the window safely. Frames and dialogs are not destroyed
immediately when this function is called -- they are added to a list
of windows to be deleted on idle time, when all the window's events
have been processed. This prevents problems with events being sent to
non-existent windows.
Returns True if the window has either been successfully deleted, or it
has been added to the list of windows pending real deletion.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
Get the origin of the client area of the window relative to the
window's top left corner (the client area may be shifted because of
the borders, scrollbars, other decorations...)
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetLabel(*args, **kwargs)
- 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.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SendSizeEvent(self)
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Set the text which the window shows in its label if applicable.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class SubplotToolWX(wx._windows.Frame) |
| |
- Method resolution order:
- SubplotToolWX
- wx._windows.Frame
- wx._windows.TopLevelWindow
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- __init__(self, targetfig)
Methods inherited from wx._windows.Frame:
- Command = ProcessCommand(*args, **kwargs)
- ProcessCommand(self, int winid) -> bool
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, String title=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool
- CreateStatusBar(*args, **kwargs)
- CreateStatusBar(self, int number=1, long style=DEFAULT_STATUSBAR_STYLE, int winid=0,
String name=StatusLineNameStr) -> StatusBar
- CreateToolBar(*args, **kwargs)
- CreateToolBar(self, long style=-1, int winid=-1, String name=ToolBarNameStr) -> wxToolBar
- DoGiveHelp(*args, **kwargs)
- DoGiveHelp(self, String text, bool show)
- DoMenuUpdates(*args, **kwargs)
- DoMenuUpdates(self, Menu menu=None)
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
- GetMenuBar(*args, **kwargs)
- GetMenuBar(self) -> MenuBar
- GetStatusBar(*args, **kwargs)
- GetStatusBar(self) -> StatusBar
- GetStatusBarPane(*args, **kwargs)
- GetStatusBarPane(self) -> int
- GetToolBar(*args, **kwargs)
- GetToolBar(self) -> wxToolBar
- PopStatusText(*args, **kwargs)
- PopStatusText(self, int number=0)
- ProcessCommand(*args, **kwargs)
- ProcessCommand(self, int winid) -> bool
- PushStatusText(*args, **kwargs)
- PushStatusText(self, String text, int number=0)
- SendSizeEvent(*args, **kwargs)
- SendSizeEvent(self)
- SetMenuBar(*args, **kwargs)
- SetMenuBar(self, MenuBar menubar)
- SetStatusBar(*args, **kwargs)
- SetStatusBar(self, StatusBar statBar)
- SetStatusBarPane(*args, **kwargs)
- SetStatusBarPane(self, int n)
- SetStatusText(*args, **kwargs)
- SetStatusText(self, String text, int number=0)
- SetStatusWidths(*args, **kwargs)
- SetStatusWidths(self, int widths)
- SetToolBar(*args, **kwargs)
- SetToolBar(self, wxToolBar toolbar)
- __repr__(self)
Static methods inherited from wx._windows.Frame:
- 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
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.
Methods inherited from wx._windows.TopLevelWindow:
- CenterOnScreen(*args, **kwargs)
- CenterOnScreen(self, int dir=BOTH)
Center the window on screen
- CentreOnScreen = CenterOnScreen(*args, **kwargs)
- CenterOnScreen(self, int dir=BOTH)
Center the window on screen
- GetIcon(*args, **kwargs)
- GetIcon(self) -> Icon
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- Iconize(*args, **kwargs)
- Iconize(self, bool iconize=True)
- IsActive(*args, **kwargs)
- IsActive(self) -> bool
- IsFullScreen(*args, **kwargs)
- IsFullScreen(self) -> bool
- IsIconized(*args, **kwargs)
- IsIconized(self) -> bool
- IsMaximized(*args, **kwargs)
- IsMaximized(self) -> bool
- MacGetMetalAppearance(*args, **kwargs)
- MacGetMetalAppearance(self) -> bool
- MacSetMetalAppearance(*args, **kwargs)
- MacSetMetalAppearance(self, bool on)
- Maximize(*args, **kwargs)
- Maximize(self, bool maximize=True)
- RequestUserAttention(*args, **kwargs)
- RequestUserAttention(self, int flags=USER_ATTENTION_INFO)
- Restore(*args, **kwargs)
- Restore(self)
- SetIcon(*args, **kwargs)
- SetIcon(self, Icon icon)
- SetIcons(*args, **kwargs)
- SetIcons(self, wxIconBundle icons)
- SetShape(*args, **kwargs)
- SetShape(self, Region region) -> bool
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- ShowFullScreen(*args, **kwargs)
- ShowFullScreen(self, bool show, long style=FULLSCREEN_ALL) -> bool
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- Destroy(*args, **kwargs)
- Destroy(self) -> bool
Destroys the window safely. Frames and dialogs are not destroyed
immediately when this function is called -- they are added to a list
of windows to be deleted on idle time, when all the window's events
have been processed. This prevents problems with events being sent to
non-existent windows.
Returns True if the window has either been successfully deleted, or it
has been added to the list of windows pending real deletion.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetLabel(*args, **kwargs)
- 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.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Set the text which the window shows in its label if applicable.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
Toolbar = class NavigationToolbarWx(wx._controls.ToolBar) |
| |
- Method resolution order:
- NavigationToolbarWx
- wx._controls.ToolBar
- wx._controls.ToolBarBase
- wx._core.Control
- wx._core.Window
- wx._core.EvtHandler
- wx._core.Object
- __builtin__.object
Methods defined here:
- __init__(self, canvas, can_kill=False)
- figure is the Figure instance that the toolboar controls
win, if not None, is the wxWindow the Figure is embedded in
- get_last_control(self)
- Returns the identity of the last toolbar button pressed.
- panx(self, direction)
- pany(self, direction)
- set_active(self, ind)
- ind is a list of index numbers for the axes which are to be made active
- update(self)
- Update the toolbar menu - called when (e.g.) a new subplot or axes are added
- zoomx(self, in_out)
- zoomy(self, in_out)
Methods inherited from wx._controls.ToolBar:
- Create(*args, **kwargs)
- Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL,
String name=wxPyToolBarNameStr) -> bool
- FindToolForPosition(*args, **kwargs)
- FindToolForPosition(self, int x, int y) -> ToolBarToolBase
- __repr__(self)
Static methods inherited from wx._controls.ToolBar:
- 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
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.
Methods inherited from wx._controls.ToolBarBase:
- AddCheckLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a check tool, i.e. a tool which can be toggled
- AddCheckTool(self, id, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a check tool, i.e. a tool which can be toggled
- AddControl(*args, **kwargs)
- AddControl(self, Control control) -> ToolBarToolBase
- AddLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), kind=0, shortHelp='', longHelp='', clientData=None)
- The full AddTool() function.
If bmpDisabled is wx.NullBitmap, a shadowed version of the normal bitmap
is created and used as the disabled image.
- AddRadioLabelTool(self, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a radio tool, i.e. a tool which can be toggled and releases any
other toggled radio tools in the same group when it happens
- AddRadioTool(self, id, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), shortHelp='', longHelp='', clientData=None)
- Add a radio tool, i.e. a tool which can be toggled and releases any
other toggled radio tools in the same group when it happens
- AddSeparator(*args, **kwargs)
- AddSeparator(self) -> ToolBarToolBase
- AddSimpleTool(self, id, bitmap, shortHelpString='', longHelpString='', isToggle=0)
- Old style method to add a tool to the toolbar.
- AddTool(self, id, bitmap, pushedBitmap=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), isToggle=0, clientData=None, shortHelpString='', longHelpString='')
- Old style method to add a tool to the toolbar.
- AddToolItem(*args, **kwargs)
- AddToolItem(self, ToolBarToolBase tool) -> ToolBarToolBase
- ClearTools(*args, **kwargs)
- ClearTools(self)
- DeleteTool(*args, **kwargs)
- DeleteTool(self, int id) -> bool
- DeleteToolByPos(*args, **kwargs)
- DeleteToolByPos(self, size_t pos) -> bool
- DoAddTool(*args, **kwargs)
- DoAddTool(self, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
int kind=ITEM_NORMAL, String shortHelp=EmptyString,
String longHelp=EmptyString,
PyObject clientData=None) -> ToolBarToolBase
- DoInsertTool(*args, **kwargs)
- DoInsertTool(self, size_t pos, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
int kind=ITEM_NORMAL,
String shortHelp=EmptyString, String longHelp=EmptyString,
PyObject clientData=None) -> ToolBarToolBase
- EnableTool(*args, **kwargs)
- EnableTool(self, int id, bool enable)
- FindById(*args, **kwargs)
- FindById(self, int toolid) -> ToolBarToolBase
- FindControl(*args, **kwargs)
- FindControl(self, int id) -> Control
- GetMargins(*args, **kwargs)
- GetMargins(self) -> Size
- GetMaxCols(*args, **kwargs)
- GetMaxCols(self) -> int
- GetMaxRows(*args, **kwargs)
- GetMaxRows(self) -> int
- GetToolBitmapSize(*args, **kwargs)
- GetToolBitmapSize(self) -> Size
- GetToolClientData(*args, **kwargs)
- GetToolClientData(self, int id) -> PyObject
- GetToolEnabled(*args, **kwargs)
- GetToolEnabled(self, int id) -> bool
- GetToolLongHelp(*args, **kwargs)
- GetToolLongHelp(self, int id) -> String
- GetToolMargins(*args, **kwargs)
- GetToolMargins(self) -> Size
- GetToolPacking(*args, **kwargs)
- GetToolPacking(self) -> int
- GetToolPos(*args, **kwargs)
- GetToolPos(self, int id) -> int
- GetToolSeparation(*args, **kwargs)
- GetToolSeparation(self) -> int
- GetToolShortHelp(*args, **kwargs)
- GetToolShortHelp(self, int id) -> String
- GetToolSize(*args, **kwargs)
- GetToolSize(self) -> Size
- GetToolState(*args, **kwargs)
- GetToolState(self, int id) -> bool
- GetToolsCount(*args, **kwargs)
- GetToolsCount(self) -> size_t
- InsertControl(*args, **kwargs)
- InsertControl(self, size_t pos, Control control) -> ToolBarToolBase
- InsertLabelTool(self, pos, id, label, bitmap, bmpDisabled=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), kind=0, shortHelp='', longHelp='', clientData=None)
- Insert the new tool at the given position, if pos == GetToolsCount(), it
is equivalent to AddTool()
- InsertSeparator(*args, **kwargs)
- InsertSeparator(self, size_t pos) -> ToolBarToolBase
- InsertSimpleTool(self, pos, id, bitmap, shortHelpString='', longHelpString='', isToggle=0)
- Old style method to insert a tool in the toolbar.
- InsertTool(self, pos, id, bitmap, pushedBitmap=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), isToggle=0, clientData=None, shortHelpString='', longHelpString='')
- Old style method to insert a tool in the toolbar.
- InsertToolItem(*args, **kwargs)
- InsertToolItem(self, size_t pos, ToolBarToolBase tool) -> ToolBarToolBase
- IsVertical(*args, **kwargs)
- IsVertical(self) -> bool
- Realize(*args, **kwargs)
- Realize(self) -> bool
- RemoveTool(*args, **kwargs)
- RemoveTool(self, int id) -> ToolBarToolBase
- SetMargins(*args, **kwargs)
- SetMargins(self, Size size)
- SetMarginsXY(*args, **kwargs)
- SetMarginsXY(self, int x, int y)
- SetMaxRowsCols(*args, **kwargs)
- SetMaxRowsCols(self, int rows, int cols)
- SetRows(*args, **kwargs)
- SetRows(self, int nRows)
- SetToggle(*args, **kwargs)
- SetToggle(self, int id, bool toggle)
- SetToolBitmapSize(*args, **kwargs)
- SetToolBitmapSize(self, Size size)
- SetToolClientData(*args, **kwargs)
- SetToolClientData(self, int id, PyObject clientData)
- SetToolLongHelp(*args, **kwargs)
- SetToolLongHelp(self, int id, String helpString)
- SetToolPacking(*args, **kwargs)
- SetToolPacking(self, int packing)
- SetToolSeparation(*args, **kwargs)
- SetToolSeparation(self, int separation)
- SetToolShortHelp(*args, **kwargs)
- SetToolShortHelp(self, int id, String helpString)
- ToggleTool(*args, **kwargs)
- ToggleTool(self, int id, bool toggle)
Methods inherited from wx._core.Control:
- Command(*args, **kwargs)
- Command(self, CommandEvent event)
Simulates the effect of the user issuing a command to the item.
:see: `wx.CommandEvent`
- GetLabel(*args, **kwargs)
- GetLabel(self) -> String
Return a control's text.
- SetLabel(*args, **kwargs)
- SetLabel(self, String label)
Sets the item's text.
Methods inherited from wx._core.Window:
- AcceptsFocus(*args, **kwargs)
- AcceptsFocus(self) -> bool
Can this window have focus?
- AcceptsFocusFromKeyboard(*args, **kwargs)
- AcceptsFocusFromKeyboard(self) -> bool
Can this window be given focus by keyboard navigation? if not, the
only way to give it focus (provided it accepts it at all) is to click
it.
- AddChild(*args, **kwargs)
- AddChild(self, Window child)
Adds a child window. This is called automatically by window creation
functions so should not be required by the application programmer.
- AssociateHandle(*args, **kwargs)
- AssociateHandle(self, long handle)
Associate the window with a new native handle
- CacheBestSize(*args, **kwargs)
- CacheBestSize(self, Size size)
Cache the best size so it doesn't need to be calculated again, (at least until
some properties of the window change.)
- CaptureMouse(*args, **kwargs)
- CaptureMouse(self)
Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
release the capture.
Note that wxWindows maintains the stack of windows having captured the
mouse and when the mouse is released the capture returns to the window
which had had captured it previously and it is only really released if
there were no previous window. In particular, this means that you must
release the mouse as many times as you capture it.
- Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CenterOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- Centre = Center(*args, **kwargs)
- Center(self, int direction=BOTH)
Centers the window. The parameter specifies the direction for
cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
also include wx.CENTER_ON_SCREEN flag if you want to center the window
on the entire screen and not on its parent window. If it is a
top-level window and has no parent then it will always be centered
relative to the screen.
- CentreOnParent = CenterOnParent(*args, **kwargs)
- CenterOnParent(self, int dir=BOTH)
Center with respect to the the parent window
- CentreOnScreen = deprecatedWrapper(*args, **kwargs)
- <function CenterOnScreen at 0x2b90d8dbcf50> is deprecated
- ClearBackground(*args, **kwargs)
- ClearBackground(self)
Clears the window by filling it with the current background
colour. Does not cause an erase background event to be generated.
- ClientToScreen(*args, **kwargs)
- ClientToScreen(self, Point pt) -> Point
Converts to screen coordinates from coordinates relative to this window.
- ClientToScreenXY(*args, **kwargs)
- ClientToScreenXY(int x, int y) -> (x,y)
Converts to screen coordinates from coordinates relative to this window.
- Close(*args, **kwargs)
- Close(self, bool force=False) -> bool
This function simply generates a EVT_CLOSE event whose handler usually
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.
- ConvertDialogPointToPixels(*args, **kwargs)
- ConvertDialogPointToPixels(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertDialogSizeToPixels(*args, **kwargs)
- ConvertDialogSizeToPixels(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- ConvertPixelPointToDialog(*args, **kwargs)
- ConvertPixelPointToDialog(self, Point pt) -> Point
- ConvertPixelSizeToDialog(*args, **kwargs)
- ConvertPixelSizeToDialog(self, Size sz) -> Size
- DLG_PNT(*args, **kwargs)
- DLG_PNT(self, Point pt) -> Point
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- DLG_SZE(*args, **kwargs)
- DLG_SZE(self, Size sz) -> Size
Converts a point or size from dialog units to pixels. Dialog units
are used for maintaining a dialog's proportions even if the font
changes. For the x dimension, the dialog units are multiplied by the
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.
- Destroy(*args, **kwargs)
- Destroy(self) -> bool
Destroys the window safely. Frames and dialogs are not destroyed
immediately when this function is called -- they are added to a list
of windows to be deleted on idle time, when all the window's events
have been processed. This prevents problems with events being sent to
non-existent windows.
Returns True if the window has either been successfully deleted, or it
has been added to the list of windows pending real deletion.
- DestroyChildren(*args, **kwargs)
- DestroyChildren(self) -> bool
Destroys all children of a window. Called automatically by the
destructor.
- Disable(*args, **kwargs)
- Disable(self) -> bool
Disables the window, same as Enable(false).
- DissociateHandle(*args, **kwargs)
- DissociateHandle(self)
Dissociate the current native handle from the window
- DragAcceptFiles(*args, **kwargs)
- DragAcceptFiles(self, bool accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Only functional on Windows.
- Enable(*args, **kwargs)
- Enable(self, bool enable=True) -> bool
Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window
has been enabled or disabled, false if nothing was done, i.e. if the
window had already been in the specified state.
- FindWindowById(*args, **kwargs)
- FindWindowById(self, long winid) -> Window
Find a chld of this window by window ID
- FindWindowByName(*args, **kwargs)
- FindWindowByName(self, String name) -> Window
Find a child of this window by name
- Fit(*args, **kwargs)
- Fit(self)
Sizes the window so that it fits around its subwindows. This function
won't do anything if there are no subwindows and will only really work
correctly if sizers are used for the subwindows layout. Also, if the
window has exactly one subwindow it is better (faster and the result
is more precise as Fit adds some margin to account for fuzziness of
its calculations) to call window.SetClientSize(child.GetSize())
instead of calling Fit.
- FitInside(*args, **kwargs)
- FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a
window. Mainly useful with scrolled windows to reset scrollbars after
sizing changes that do not trigger a size event, and/or scrolled
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.
- Freeze(*args, **kwargs)
- 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.
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
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
for all controls so it is mostly just a hint to wxWindows and not a
mandatory directive.
- GetAcceleratorTable(*args, **kwargs)
- GetAcceleratorTable(self) -> AcceleratorTable
Gets the accelerator table for this window.
- GetAdjustedBestSize(*args, **kwargs)
- GetAdjustedBestSize(self) -> Size
This method is similar to GetBestSize, except in one
thing. GetBestSize should return the minimum untruncated size of the
window, while this method will return the largest of BestSize and any
user specified minimum size. ie. it is the minimum size the window
should currently be drawn at, not the minimal size it can possibly
tolerate.
- GetAutoLayout(*args, **kwargs)
- GetAutoLayout(self) -> bool
Returns the current autoLayout setting
- GetBackgroundColour(*args, **kwargs)
- GetBackgroundColour(self) -> Colour
Returns the background colour of the window.
- GetBackgroundStyle(*args, **kwargs)
- GetBackgroundStyle(self) -> int
Returns the background style of the window.
:see: `SetBackgroundStyle`
- GetBestFittingSize(*args, **kwargs)
- GetBestFittingSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
- GetBestSize(*args, **kwargs)
- GetBestSize(self) -> Size
This function 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.
- GetBestSizeTuple(*args, **kwargs)
- GetBestSizeTuple() -> (width, height)
This function 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.
- GetBestVirtualSize(*args, **kwargs)
- GetBestVirtualSize(self) -> Size
Return the largest of ClientSize and BestSize (as determined by a
sizer, interior children, or other means)
- GetBorder(*args)
- GetBorder(self, long flags) -> int
GetBorder(self) -> int
Get border for the flags of this window
- GetCaret(*args, **kwargs)
- GetCaret(self) -> Caret
Returns the caret associated with the window.
- GetCharHeight(*args, **kwargs)
- GetCharHeight(self) -> int
Get the (average) character size for the current font.
- GetCharWidth(*args, **kwargs)
- GetCharWidth(self) -> int
Get the (average) character size for the current font.
- GetChildren(*args, **kwargs)
- GetChildren(self) -> PyObject
Returns a list of the window's children. NOTE: Currently this is a
copy of the child window list maintained by the window, so the return
value of this function is only valid as long as the window's children
do not change.
- GetClientAreaOrigin(*args, **kwargs)
- GetClientAreaOrigin(self) -> Point
Get the origin of the client area of the window relative to the
window's top left corner (the client area may be shifted because of
the borders, scrollbars, other decorations...)
- GetClientRect(*args, **kwargs)
- GetClientRect(self) -> Rect
Get the client area position and size as a `wx.Rect` object.
- GetClientSize(*args, **kwargs)
- GetClientSize(self) -> Size
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetClientSizeTuple(*args, **kwargs)
- GetClientSizeTuple() -> (width, height)
This gets the size of the window's 'client area' in pixels. The client
area is the area which may be drawn on by the programmer, excluding
title bar, border, scrollbars, etc.
- GetConstraints(*args, **kwargs)
- GetConstraints(self) -> LayoutConstraints
Returns a pointer to the window's layout constraints, or None if there
are none.
- GetContainingSizer(*args, **kwargs)
- GetContainingSizer(self) -> Sizer
Return the sizer that this window is a member of, if any, otherwise None.
- GetCursor(*args, **kwargs)
- GetCursor(self) -> Cursor
Return the cursor associated with this window.
- GetDefaultAttributes(*args, **kwargs)
- 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 user's system, especially if it uses themes.
- GetDefaultItem(*args, **kwargs)
- GetDefaultItem(self) -> Window
Get the default child of this parent, i.e. the one which is activated
by pressing <Enter> such as the OK button on a wx.Dialog.
- GetDropTarget(*args, **kwargs)
- GetDropTarget(self) -> DropTarget
Returns the associated drop target, which may be None.
- GetEventHandler(*args, **kwargs)
- GetEventHandler(self) -> EvtHandler
Returns the event handler for this window. By default, the window is
its own event handler.
- GetExtraStyle(*args, **kwargs)
- GetExtraStyle(self) -> long
Returns the extra style bits for the window.
- GetFont(*args, **kwargs)
- GetFont(self) -> Font
Returns the default font used for this window.
- GetForegroundColour(*args, **kwargs)
- GetForegroundColour(self) -> Colour
Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.
- GetFullTextExtent(*args, **kwargs)
- GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the
current or specified font.
- GetGrandParent(*args, **kwargs)
- GetGrandParent(self) -> Window
Returns the parent of the parent of this window, or None if there
isn't one.
- GetHandle(*args, **kwargs)
- GetHandle(self) -> long
Returns the platform-specific handle (as a long integer) of the
physical window. Currently on wxMac it returns the handle of the
toplevel parent of the window.
- GetHelpText(*args, **kwargs)
- GetHelpText(self) -> String
Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- GetId(*args, **kwargs)
- GetId(self) -> int
Returns the identifier of the window. Each window has an integer
identifier. If the application has not provided one (or the default Id
-1 is used) then an unique identifier with a negative value will be
generated.
- GetMaxHeight(*args, **kwargs)
- GetMaxHeight(self) -> int
- GetMaxSize(*args, **kwargs)
- GetMaxSize(self) -> Size
- GetMaxWidth(*args, **kwargs)
- GetMaxWidth(self) -> int
- GetMinHeight(*args, **kwargs)
- GetMinHeight(self) -> int
- GetMinSize(*args, **kwargs)
- GetMinSize(self) -> Size
- GetMinWidth(*args, **kwargs)
- GetMinWidth(self) -> int
- GetName(*args, **kwargs)
- 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.
- GetParent(*args, **kwargs)
- GetParent(self) -> Window
Returns the parent window of this window, or None if there isn't one.
- GetPosition(*args, **kwargs)
- GetPosition(self) -> Point
Get the window's position.
- GetPositionTuple(*args, **kwargs)
- GetPositionTuple() -> (x,y)
Get the window's position.
- GetRect(*args, **kwargs)
- GetRect(self) -> Rect
Returns the size and position of the window as a wx.Rect object.
- GetScrollPos(*args, **kwargs)
- GetScrollPos(self, int orientation) -> int
Returns the built-in scrollbar position.
- GetScrollRange(*args, **kwargs)
- GetScrollRange(self, int orientation) -> int
Returns the built-in scrollbar range.
- GetScrollThumb(*args, **kwargs)
- GetScrollThumb(self, int orientation) -> int
Returns the built-in scrollbar thumb size.
- GetSize(*args, **kwargs)
- GetSize(self) -> Size
Get the window size.
- GetSizeTuple(*args, **kwargs)
- GetSizeTuple() -> (width, height)
Get the window size.
- GetSizer(*args, **kwargs)
- GetSizer(self) -> Sizer
Return the sizer associated with the window by a previous call to
SetSizer or None if there isn't one.
- GetTextExtent(*args, **kwargs)
- GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
- GetThemeEnabled(*args, **kwargs)
- GetThemeEnabled(self) -> bool
Return the themeEnabled flag.
- GetTitle(*args, **kwargs)
- GetTitle(self) -> String
Gets the window's title. Applicable only to frames and dialogs.
- GetToolTip(*args, **kwargs)
- GetToolTip(self) -> ToolTip
get the associated tooltip or None if none
- GetUpdateClientRect(*args, **kwargs)
- GetUpdateClientRect(self) -> Rect
Get the update rectangle region bounding box in client coords.
- GetUpdateRegion(*args, **kwargs)
- GetUpdateRegion(self) -> Region
Returns the region specifying which parts of the window have been
damaged. Should only be called within an EVT_PAINT handler.
- GetValidator(*args, **kwargs)
- GetValidator(self) -> Validator
Returns a pointer to the current validator for the window, or None if
there is none.
- GetVirtualSize(*args, **kwargs)
- GetVirtualSize(self) -> Size
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetVirtualSizeTuple(*args, **kwargs)
- GetVirtualSizeTuple() -> (width, height)
Get the the virtual size of the window in pixels. For most windows
this is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- GetWindowStyle = GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowStyleFlag(*args, **kwargs)
- GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create
method.
- GetWindowVariant(*args, **kwargs)
- GetWindowVariant(self) -> int
- HasCapture(*args, **kwargs)
- HasCapture(self) -> bool
Returns true if this window has the current mouse capture.
- HasFlag(*args, **kwargs)
- HasFlag(self, int flag) -> bool
Test if the given style is set for this window.
- HasScrollbar(*args, **kwargs)
- HasScrollbar(self, int orient) -> bool
Does the window have the scrollbar for this orientation?
- HasTransparentBackground(*args, **kwargs)
- HasTransparentBackground(self) -> bool
Returns True if this window's background is transparent (as, for
example, for `wx.StaticText`) and should show the parent window's
background.
This method is mostly used internally by the library itself and you
normally shouldn't have to call it. You may, however, have to override
it in your custom control classes to ensure that background is painted
correctly.
- Hide(*args, **kwargs)
- Hide(self) -> bool
Equivalent to calling Show(False).
- HitTest(*args, **kwargs)
- HitTest(self, Point pt) -> int
Test where the given (in client coords) point lies
- HitTestXY(*args, **kwargs)
- HitTestXY(self, int x, int y) -> int
Test where the given (in client coords) point lies
- InheritAttributes(*args, **kwargs)
- 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
SetOwnFont) 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 accommodate the
different usage scenarios. 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.
- InheritsBackgroundColour(*args, **kwargs)
- InheritsBackgroundColour(self) -> bool
- InitDialog(*args, **kwargs)
- InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
to the dialog via validators.
- InvalidateBestSize(*args, **kwargs)
- InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next
time it is needed.
- IsBeingDeleted(*args, **kwargs)
- IsBeingDeleted(self) -> bool
Is the window in the process of being deleted?
- IsEnabled(*args, **kwargs)
- IsEnabled(self) -> bool
Returns true if the window is enabled for input, false otherwise.
- IsExposed(*args, **kwargs)
- IsExposed(self, int x, int y, int w=1, int h=1) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedPoint(*args, **kwargs)
- IsExposedPoint(self, Point pt) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsExposedRect(*args, **kwargs)
- IsExposedRect(self, Rect rect) -> bool
Returns true if the given point or rectangle area has been exposed
since the last repaint. Call this in an paint event handler to
optimize redrawing by only redrawing those areas, which have been
exposed.
- IsRetained(*args, **kwargs)
- IsRetained(self) -> bool
Returns true if the window is retained, false otherwise. Retained
windows are only available on X platforms.
- IsShown(*args, **kwargs)
- IsShown(self) -> bool
Returns true if the window is shown, false if it has been hidden.
- IsTopLevel(*args, **kwargs)
- IsTopLevel(self) -> bool
Returns true if the given window is a top-level one. Currently all
frames and dialogs are always considered to be top-level windows (even
if they have a parent window).
- Layout(*args, **kwargs)
- Layout(self) -> bool
Invokes the constraint-based layout algorithm or the sizer-based
algorithm for this window. See SetAutoLayout: when auto layout is on,
this function gets called automatically by the default EVT_SIZE
handler when the window is resized.
- LineDown(*args, **kwargs)
- LineDown(self) -> bool
This is just a wrapper for ScrollLines(1).
- LineUp(*args, **kwargs)
- LineUp(self) -> bool
This is just a wrapper for ScrollLines(-1).
- Lower(*args, **kwargs)
- Lower(self)
Lowers the window to the bottom of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- MakeModal(*args, **kwargs)
- MakeModal(self, bool modal=True)
Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this
effect.
- Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- MoveAfterInTabOrder(*args, **kwargs)
- MoveAfterInTabOrder(self, Window win)
Moves this window in the tab navigation order after the specified
sibling window. This means that when the user presses the TAB key on
that other window, the focus switches to this window.
The default tab order is the same as creation order. This function
and `MoveBeforeInTabOrder` allow to change it after creating all the
windows.
- MoveBeforeInTabOrder(*args, **kwargs)
- MoveBeforeInTabOrder(self, Window win)
Same as `MoveAfterInTabOrder` except that it inserts this window just
before win instead of putting it right after it.
- MoveXY(*args, **kwargs)
- MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- Navigate(*args, **kwargs)
- Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
- PageDown(*args, **kwargs)
- PageDown(self) -> bool
This is just a wrapper for ScrollPages(1).
- PageUp(*args, **kwargs)
- PageUp(self) -> bool
This is just a wrapper for ScrollPages(-1).
- PopEventHandler(*args, **kwargs)
- PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.
- PopupMenu(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PopupMenuXY(*args, **kwargs)
- 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. If the default position is given then the current position of the
mouse cursor will be used.
- PostCreate(self, pre)
- Phase 3 of the 2-phase create <wink!>
Call this method after precreating the window with the 2-phase create method.
- PrepareDC(*args, **kwargs)
- PrepareDC(self, DC dc)
Call this function to prepare the device context for drawing a
scrolled image. It sets the device origin according to the current
scroll position.
- PushEventHandler(*args, **kwargs)
- PushEventHandler(self, EvtHandler handler)
Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
sent to a window. By default, the window is its own event handler, but
an application may wish to substitute another, for example to allow
central implementation of event-handling for a variety of different
window classes.
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
remove the event handler.
- Raise(*args, **kwargs)
- Raise(self)
Raises the window to the top of the window hierarchy. In current
version of wxWidgets this works both for manage and child windows.
- Refresh(*args, **kwargs)
- Refresh(self, bool eraseBackground=True, Rect rect=None)
Mark the specified rectangle (or the whole window) as "dirty" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent
to the window.
- RefreshRect(*args, **kwargs)
- RefreshRect(self, Rect rect, bool eraseBackground=True)
Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.
- RegisterHotKey(*args, **kwargs)
- RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
Registers a system wide hotkey. Every time the user presses the hotkey
registered here, this window will receive a hotkey event. It will
receive the event even if the application is in the background and
does not have the input focus because the user is working with some
other application. To bind an event handler function to this hotkey
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.
- ReleaseMouse(*args, **kwargs)
- ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
- RemoveChild(*args, **kwargs)
- RemoveChild(self, Window child)
Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.
- RemoveEventHandler(*args, **kwargs)
- 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.)
- Reparent(*args, **kwargs)
- Reparent(self, Window newParent) -> bool
Reparents the window, i.e the window will be removed from its current
parent window (e.g. a non-standard toolbar in a wxFrame) and then
re-inserted into another. Available on Windows and GTK. Returns True
if the parent was changed, False otherwise (error or newParent ==
oldParent)
- ScreenToClient(*args, **kwargs)
- ScreenToClient(self, Point pt) -> Point
Converts from screen to client window coordinates.
- ScreenToClientXY(*args, **kwargs)
- ScreenToClientXY(int x, int y) -> (x,y)
Converts from screen to client window coordinates.
- ScrollLines(*args, **kwargs)
- ScrollLines(self, int lines) -> bool
If the platform and window class supports it, scrolls the window by
the given number of lines down, if lines is positive, or up if lines
is negative. Returns True if the window was scrolled, False if it was
already on top/bottom and nothing was done.
- ScrollPages(*args, **kwargs)
- ScrollPages(self, int pages) -> bool
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.
- ScrollWindow(*args, **kwargs)
- ScrollWindow(self, int dx, int dy, Rect rect=None)
Physically scrolls the pixels in the window and move child windows
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.
- SendSizeEvent(self)
- SetAcceleratorTable(*args, **kwargs)
- SetAcceleratorTable(self, AcceleratorTable accel)
Sets the accelerator table for this window.
- SetAutoLayout(*args, **kwargs)
- SetAutoLayout(self, bool autoLayout)
Determines whether the Layout function will be called automatically
when the window is resized. It is called implicitly by SetSizer but
if you use SetConstraints you should call it manually or otherwise the
window layout won't be correctly updated when its size changes.
- SetBackgroundColour(*args, **kwargs)
- SetBackgroundColour(self, Colour colour) -> bool
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. 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
calling this function.
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.
- SetBackgroundStyle(*args, **kwargs)
- SetBackgroundStyle(self, int style) -> bool
Returns the background style of the window. The background style
indicates how the background of the window is drawn.
====================== ========================================
wx.BG_STYLE_SYSTEM The background colour or pattern should
be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the
application.
====================== ========================================
On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
a custom background, such as a tiled bitmap. Currently the style has
no effect on other platforms.
:see: `GetBackgroundStyle`, `SetBackgroundColour`
- 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.
- SetCaret(*args, **kwargs)
- SetCaret(self, Caret caret)
Sets the caret associated with the window.
- SetClientRect(*args, **kwargs)
- SetClientRect(self, Rect rect)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSize(*args, **kwargs)
- SetClientSize(self, Size size)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetClientSizeWH(*args, **kwargs)
- SetClientSizeWH(self, int width, int height)
This sets the size of the window client area in pixels. Using this
function to size a window tends to be more device-independent than
wx.Window.SetSize, since the application need not worry about what
dimensions the border or title bar have when trying to fit the window
around panel items, for example.
- SetConstraints(*args, **kwargs)
- SetConstraints(self, LayoutConstraints constraints)
Sets the window to have the given layout constraints. If an existing
layout constraints object is already owned by the window, it will be
deleted. Pass None to disassociate and delete the window's current
constraints.
You must call SetAutoLayout to tell a window to use the constraints
automatically in its default EVT_SIZE handler; otherwise, you must
handle EVT_SIZE yourself and call Layout() explicitly. When setting
both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
effect.
- SetContainingSizer(*args, **kwargs)
- SetContainingSizer(self, Sizer sizer)
This normally does not need to be called by application code. It is
called internally when a window is added to a sizer, and is used so
the window can remove itself from the sizer when it is destroyed.
- SetCursor(*args, **kwargs)
- SetCursor(self, Cursor cursor) -> bool
Sets the window's cursor. Notice that the window cursor also sets it
for the children of the window implicitly.
The cursor may be wx.NullCursor in which case the window cursor will
be reset back to default.
- SetDefaultItem(*args, **kwargs)
- SetDefaultItem(self, Window child) -> Window
Set this child as default, return the old default.
- SetDimensions(*args, **kwargs)
- SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
equal to -1.
======================== ======================================
wx.SIZE_AUTO A -1 indicates that a class-specific
default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if
-1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
interpreted as real dimensions, not
default values.
======================== ======================================
- SetDropTarget(*args, **kwargs)
- SetDropTarget(self, DropTarget dropTarget)
Associates a drop target with this window. If the window already has
a drop target, it is deleted.
- SetEventHandler(*args, **kwargs)
- SetEventHandler(self, EvtHandler handler)
Sets the event handler for this window. An event handler is an object
that is capable of processing the events sent to a window. By default,
the window is its own event handler, but an application may wish to
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
up a chain of event handlers, where an event not handled by one event
handler is handed to the next one in the chain.
- SetExtraStyle(*args, **kwargs)
- SetExtraStyle(self, long exStyle)
Sets the extra style bits for the window. Extra styles are the less
often used style bits which can't be set with the constructor or with
SetWindowStyleFlag()
- SetFocus(*args, **kwargs)
- SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
- SetFocusFromKbd(*args, **kwargs)
- SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action. Normally
only called internally.
- SetFont(*args, **kwargs)
- SetFont(self, Font font) -> bool
Sets the font for this window.
- SetForegroundColour(*args, **kwargs)
- SetForegroundColour(self, Colour colour) -> bool
Sets the foreground colour of the window. Returns True is the colour
was changed. The interpretation of foreground colour is dependent on
the window class; it may be the text colour or other colour, or it may
not be used at all.
- SetHelpText(*args, **kwargs)
- SetHelpText(self, String text)
Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
wxHelpProvider implementation, and not in the window object itself.
- SetHelpTextForId(*args, **kwargs)
- SetHelpTextForId(self, String text)
Associate this help text with all windows with the same id as this
one.
- SetId(*args, **kwargs)
- SetId(self, int winid)
Sets the identifier of the window. Each window has an integer
identifier. If the application has not provided one, an identifier
will be generated. Normally, the identifier should be provided on
creation and should not be modified subsequently.
- SetMaxSize(*args, **kwargs)
- SetMaxSize(self, Size maxSize)
A more convenient method than `SetSizeHints` for setting just the
max size.
- SetMinSize(*args, **kwargs)
- SetMinSize(self, Size minSize)
A more convenient method than `SetSizeHints` for setting just the
min size.
- SetName(*args, **kwargs)
- 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
- SetOwnBackgroundColour(*args, **kwargs)
- SetOwnBackgroundColour(self, Colour colour)
- SetOwnFont(*args, **kwargs)
- SetOwnFont(self, Font font)
- SetOwnForegroundColour(*args, **kwargs)
- SetOwnForegroundColour(self, Colour colour)
- SetPosition = Move(*args, **kwargs)
- Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
- SetRect(*args, **kwargs)
- SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
Sets the position and size of the window in pixels using a wx.Rect.
- SetScrollPos(*args, **kwargs)
- SetScrollPos(self, int orientation, int pos, bool refresh=True)
Sets the position of one of the built-in scrollbars.
- SetScrollbar(*args, **kwargs)
- SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)
Sets the scrollbar properties of a built-in scrollbar.
- SetSize(*args, **kwargs)
- SetSize(self, Size size)
Sets the size of the window in pixels.
- SetSizeHints(*args, **kwargs)
- SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
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 (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.
- SetSizeHintsSz(*args, **kwargs)
- SetSizeHintsSz(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 (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.
- SetSizeWH(*args, **kwargs)
- SetSizeWH(self, int width, int height)
Sets the size of the window in pixels.
- SetSizer(*args, **kwargs)
- SetSizer(self, Sizer sizer, bool deleteOld=True)
Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is
non-None, and False otherwise.
- SetSizerAndFit(*args, **kwargs)
- SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.
- SetThemeEnabled(*args, **kwargs)
- SetThemeEnabled(self, bool enableTheme)
This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background
drawing code. This will only have an effect on platforms that support
the notion of themes in user defined windows. One such platform is
GTK+ where windows can have (very colourful) backgrounds defined by a
user's selected theme.
Dialogs, notebook pages and the status bar have this flag set to true
by default so that the default look and feel is simulated best.
- SetTitle(*args, **kwargs)
- SetTitle(self, String title)
Sets the window's title. Applicable only to frames and dialogs.
- SetTmpDefaultItem(*args, **kwargs)
- SetTmpDefaultItem(self, Window win)
Set this child as temporary default
- SetToolTip(*args, **kwargs)
- SetToolTip(self, ToolTip tip)
Attach a tooltip to the window.
- SetToolTipString(*args, **kwargs)
- SetToolTipString(self, String tip)
Attach a tooltip to the window.
- SetValidator(*args, **kwargs)
- SetValidator(self, Validator validator)
Deletes the current validator (if any) and sets the window validator,
having called wx.Validator.Clone to create a new validator of this
type.
- SetVirtualSize(*args, **kwargs)
- SetVirtualSize(self, Size size)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetVirtualSizeHints(*args, **kwargs)
- 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
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
- SetVirtualSizeHintsSz(*args, **kwargs)
- SetVirtualSizeHintsSz(self, 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.
- SetVirtualSizeWH(*args, **kwargs)
- SetVirtualSizeWH(self, int w, int h)
Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.
- SetWindowStyle = SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowStyleFlag(*args, **kwargs)
- 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.
- SetWindowVariant(*args, **kwargs)
- 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.
- ShouldInheritColours(*args, **kwargs)
- 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.
The base class version returns false, but this method is overridden in
wxControl where it returns true.
- Show(*args, **kwargs)
- Show(self, bool show=True) -> bool
Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if
the window has been shown or hidden or False if nothing was done
because it already was in the requested state.
- Thaw(*args, **kwargs)
- 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.
- TransferDataFromWindow(*args, **kwargs)
- 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.
- TransferDataToWindow(*args, **kwargs)
- 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.
- UnregisterHotKey(*args, **kwargs)
- UnregisterHotKey(self, int hotkeyId) -> bool
Unregisters a system wide hotkey.
- Update(*args, **kwargs)
- Update(self)
Calling this method immediately repaints the invalidated area of the
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
does nothing if the window has been already repainted. Use Refresh
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
- UpdateWindowUI(*args, **kwargs)
- UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
This function sends EVT_UPDATE_UI events to the window. The particular
implementation depends on the window; for example a wx.ToolBar will
send an update UI event for each toolbar button, and a wx.Frame will
send an update UI event for each menubar menu item. You can call this
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.
- UseBgCol(*args, **kwargs)
- UseBgCol(self) -> bool
- Validate(*args, **kwargs)
- 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.
- WarpPointer(*args, **kwargs)
- WarpPointer(self, int x, int y)
Moves the pointer to the given position on the window.
NOTE: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
Static methods inherited from wx._core.Window:
- FindFocus(*args, **kwargs)
- FindFocus() -> Window
Returns the window or control that currently has the keyboard focus,
or None.
- GetCapture(*args, **kwargs)
- GetCapture() -> Window
Returns the window which currently captures the mouse or None
- NewControlId(*args, **kwargs)
- NewControlId() -> int
Generate a control id for the controls which were not given one.
- NextControlId(*args, **kwargs)
- NextControlId(int winid) -> int
Get the id of the control following the one with the given
autogenerated) id
- PrevControlId(*args, **kwargs)
- PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given
autogenerated) id
Methods inherited from wx._core.EvtHandler:
- AddPendingEvent(*args, **kwargs)
- AddPendingEvent(self, Event event)
- Bind(self, event, handler, source=None, id=-1, id2=-1)
- Bind an event to an event handler.
:param event: One of the EVT_* objects that specifies the
type of event to bind,
:param handler: A callable object to be invoked when the
event is delivered to self. Pass None to
disconnect an event handler.
:param source: Sometimes the event originates from a
different window than self, but you still
want to catch it in self. (For example, a
button event delivered to a frame.) By
passing the source of the event, the event
handling system is able to differentiate
between the same event type from different
controls.
:param id: Used to spcify the event source by ID instead
of instance.
:param id2: Used when it is desirable to bind a handler
to a range of IDs, such as with EVT_MENU_RANGE.
- Connect(*args, **kwargs)
- Connect(self, int id, int lastId, int eventType, PyObject func)
- Disconnect(*args, **kwargs)
- Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool
- GetEvtHandlerEnabled(*args, **kwargs)
- GetEvtHandlerEnabled(self) -> bool
- GetNextHandler(*args, **kwargs)
- GetNextHandler(self) -> EvtHandler
- GetPreviousHandler(*args, **kwargs)
- GetPreviousHandler(self) -> EvtHandler
- ProcessEvent(*args, **kwargs)
- ProcessEvent(self, Event event) -> bool
- ProcessPendingEvents(*args, **kwargs)
- ProcessPendingEvents(self)
- SetEvtHandlerEnabled(*args, **kwargs)
- SetEvtHandlerEnabled(self, bool enabled)
- SetNextHandler(*args, **kwargs)
- SetNextHandler(self, EvtHandler handler)
- SetPreviousHandler(*args, **kwargs)
- SetPreviousHandler(self, EvtHandler handler)
- Unbind(self, event, source=None, id=-1, id2=-1)
- Disconencts the event handler binding for event from self.
Returns True if successful.
Methods inherited from wx._core.Object:
- GetClassName(*args, **kwargs)
- GetClassName(self) -> String
Returns the class name of the C++ class using wxRTTI.
Data and other attributes inherited from wx._core.Object:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Object' objects>
- list of weak references to the object (if defined)
|
class fake_stderr |
|
Wx does strange things with stderr, as it makes the assumption that there
is probably no console. This redirects stderr to the console, since we know
that there is one! |
|
Methods defined here:
- write(self, msg)
| |