wx.lib.agw.aui.aui_utilities¶This module contains some common functions used by lib.agw.aui to
manipulate colours, bitmaps, text, gradient shadings and custom dragging images
for AuiNotebook tabs.
Functions Summary¶BitmapFromBits |
A utility function that creates a masked bitmap from raw bits (XBM format). |
BlendColour |
Blends the two colour component fg and bg into one colour component, adding |
ChopText |
Chops the input text if its size does not fit in max_size, by cutting the |
Clip |
Clips the value in a based on the extremes b and c. |
CopyAttributes |
Copies pens, brushes, colours and fonts from the old tab art to the new one. |
DarkenBitmap |
Darkens the input bitmap on wxMAC using the input colour. |
DrawGradientRectangle |
Draws a gradient-shaded rectangle. |
DrawMACCloseButton |
Draws the wxMAC tab close button using GraphicsContext. |
FindFocusDescendant |
Find a window with the focus, that is also a descendant of the given window. |
GetBaseColour |
Returns the face shading colour on push buttons/backgrounds, |
GetDockingImage |
Returns the correct name of the docking bitmap depending on the input parameters. |
GetLabelSize |
Returns the AuiToolBar item label size. |
GetSlidingPoints |
Returns the point at which the sliding in and out of a minimized pane begins. |
IndentPressedBitmap |
Indents the input rectangle rect based on the value of button_state. |
LightColour |
Brighten input colour by percent. |
LightContrastColour |
Creates a new, lighter colour based on the input colour c. |
MakeDisabledBitmap |
Convert the given image (in place) to a grayed-out version, appropriate for a ‘disabled’ appearance. |
PaneCreateStippleBitmap |
Creates a stipple bitmap to be used in a wx.Brush. |
RescaleScreenShot |
Rescales a bitmap to be thumbnail_size pixels wide (or tall) at maximum. |
StepColour |
Darken/lighten the input colour c. |
TakeScreenShot |
Takes a screenshot of the screen at given position and size (rect). |
Classes Summary¶TabDragImage |
This class handles the creation of a custom image in case of drag and drop of a notebook tab. |
BitmapFromBits(bits, w, h, colour)¶A utility function that creates a masked bitmap from raw bits (XBM format).
| Parameters: |
|
|---|
BlendColour(fg, bg, alpha)¶Blends the two colour component fg and bg into one colour component, adding an optional alpha channel.
| Parameters: |
|---|
ChopText(dc, text, max_size)¶Chops the input text if its size does not fit in max_size, by cutting the text and adding ellipsis at the end.
| Parameters: |
|
|---|
Clip(a, b, c)¶Clips the value in a based on the extremes b and c.
| Parameters: |
|
|---|
CopyAttributes(newArt, oldArt)¶Copies pens, brushes, colours and fonts from the old tab art to the new one.
| Parameters: |
|
|---|
DarkenBitmap(bmp, caption_colour, new_colour)¶Darkens the input bitmap on wxMAC using the input colour.
| Parameters: |
|---|
DrawGradientRectangle(dc, rect, start_colour, end_colour, direction, offset=0, length=0)¶Draws a gradient-shaded rectangle.
| Parameters: |
|---|
DrawMACCloseButton(colour, backColour=None)¶Draws the wxMAC tab close button using GraphicsContext.
| Parameters: |
|---|
FindFocusDescendant(ancestor)¶Find a window with the focus, that is also a descendant of the given window. This is used to determine the window to initially send commands to.
| Parameters: | ancestor (wx.Window) – the window to check for ancestry. |
|---|
GetBaseColour()¶Returns the face shading colour on push buttons/backgrounds, mimicking as closely as possible the platform UI colours.
GetDockingImage(direction, useAero, center)¶Returns the correct name of the docking bitmap depending on the input parameters.
| Parameters: |
|
|---|
GetLabelSize(dc, label, vertical)¶Returns the AuiToolBar item label size.
| Parameters: |
|
|---|
GetSlidingPoints(rect, size, direction)¶Returns the point at which the sliding in and out of a minimized pane begins.
| Parameters: |
|
|---|
IndentPressedBitmap(rect, button_state)¶Indents the input rectangle rect based on the value of button_state.
| Parameters: |
|
|---|
LightColour(colour, percent)¶Brighten input colour by percent.
| Parameters: |
|
|---|
LightContrastColour(c)¶Creates a new, lighter colour based on the input colour c.
| Parameters: | c (wx.Colour) – the input colour to analyze. |
|---|
MakeDisabledBitmap(bitmap)¶Convert the given image (in place) to a grayed-out version, appropriate for a ‘disabled’ appearance.
| Parameters: | bitmap (wx.Bitmap) – the bitmap to gray-out. |
|---|
PaneCreateStippleBitmap()¶Creates a stipple bitmap to be used in a wx.Brush.
This is used to draw sash resize hints.
RescaleScreenShot(bmp, thumbnail_size=200)¶Rescales a bitmap to be thumbnail_size pixels wide (or tall) at maximum.
| Parameters: |
|
|---|
StepColour(c, ialpha)¶Darken/lighten the input colour c.
| Parameters: |
|
|---|