Package wx :: Package lib :: Package agw :: Module artmanager :: Class ArtManager
[frames | no frames]

Type ArtManager

object --+        
         |        
    Object --+    
             |    
    EvtHandler --+
                 |
                ArtManager


This class provides various art utilities, such as creating shadow, providing lighter / darker colors for a given color, etc...


Method Summary
  __init__(self)
Default class constructor.
  AddMenuTheme(self, render)
Adds a new theme to the stock.
  BackgroundColor(self)
Returns the background color of a control when not in focus.
  CalcButtonBestSize(self, label, bmp)
Returns the best fit size for the supplied label & bitmap.
  CanMakeWindowsTransparent(self)
Used internally.
  ConvertToBitmap(self, xpm, alpha)
Convert the given image to a bitmap.
  CreateGreyBitmap(self, bmp)
Creates a grey bitmap image from bmp.
  DarkColour(self, color, percent)
Like the LightColour() function, but create the color darker by percent.
  DrawBitmapShadow(self, dc, rect, where)
Draws a shadow using background bitmap.
  DrawButton(self, dc, rect, theme, state, input)
Color rectangle according to the theme.
  DrawButtonColour(self, dc, rect, theme, state, color)
Color rectangle according to the theme.
  DrawButtonTheme(self, dc, rect, theme, state, useLightColours)
Color rectangle according to the theme.
  DrawDragSash(self, rect)
Draws resize sash.
  DrawMenuBarBg(self, dc, rect)
Draws the menu bar background according to the active theme.
  DrawMenuBarBorder(self, border)
Enables menu border drawing (XP style only).
  DrawTextAndBitmap(self, dc, rect, text, enable, font, fontColor, bitmap, grayBitmap, style)
Draws the text & bitmap on the input dc.
  DrawToolBarBg(self, dc, rect)
Draws the toolbar background according to the active theme.
  DropShadow(self, wnd, drop)
Adds a shadow under the window (Windows Only).
  FillStockBitmaps(self)
  FrameColour(self)
Return the surrounding color for a control.
  Free(self)
(Class method)
  Get(self)
(Class method)
  GetAccelIndex(self, label)
Returns the menomonic index of the label.
  GetAlignBuffer(self)
Return the padding buffer for a text or bitmap.
  GetBitmapStartLocation(self, dc, rect, bitmap, text, style)
Returns the top left x & y cordinates of the bitmap drawing.
  GetColourSchemes(self)
Returns the available colour schemes.
  GetFont(self)
Returns the font used by this theme.
  GetMBVerticalGradient(self)
Returns True if the meun bar should be painted with vertical gradient.
  GetMenuBarBorder(self)
Returns menu bar morder drawing flag.
  GetMenuBarColourScheme(self)
Returns the current colour scheme.
  GetMenuBarFaceColour(self)
Returns the menu bar face colour.
  GetMenuBarSelectionColour(self)
Returns the menu bar selection color.
  GetMenuBgFactor(self)
Gets the visibility depth of the menu in Metallic style.
  GetMenuFaceColour(self)
Returns the colour used for menu face.
  GetMenuTheme(self)
Returns the menu theme.
  GetMS2007ButtonSunken(self)
Returns the sunken flag for MS 2007 buttons.
  GetRaiseToolbar(self)
Do Drop shadow under toolbar?.
  GetStockBitmap(self, name)
Gets a bitmap from a stock.
  GetTextColourDisable(self)
Returns the colour used for disabled menu items.
  GetTextColourEnable(self)
Returns the colour used for enabled menu items.
  GetTextStartLocation(self, dc, rect, bitmap, text, style)
Returns the top left x & y cordinates of the text drawing.
  GetThemeBaseColour(self, useLightColours)
Returns the theme (Blue, Silver, Green etc.) base color, if no theme is active it return the active caption colour, lighter in 30%.
  GetTransparency(self)
  HighlightBackgroundColor(self)
Returns the background color of a control when it is in focus.
  InitColours(self)
Initialise the colour map.
  Initialize(self)
Initializes the bitmaps and colours.
  IsDark(self, color)
Returns whether a color is dark or light.
  LightColour(self, color, percent)
Return light contrast of color.
  MakeWindowTransparent(self, wnd, amount)
Used internally.
  MixColors(self, firstColor, secondColor, percent)
Return mix of input colors.
  OnSysColourChange(self, event)
Handles the wx.EVT_SYS_COLOUR_CHANGED event for ArtManager.
  PaintCrescentGradientBox(self, dc, rect, startColor, endColor, concave)
Paint a region with gradient coloring.
  PaintDiagonalGradientBox(self, dc, rect, startColor, endColor, startAtUpperLeft, trimToSquare)
Paint rectagnle with gradient coloring; the gradient lines are diagonal and may start from the upper left corner or from the upper right corner.
  PaintGradientRegion(self, dc, region, startColor, endColor, vertical)
Paint a region with gradient coloring.
  PaintStraightGradientBox(self, dc, rect, startColor, endColor, vertical)
Paint the rectangle with gradient coloring; the gradient lines are either horizontal or vertical.
  RandomColour()
Creates a random colour.
  SetMBVerticalGradient(self, v)
Sets the menu bar gradient style.
  SetMenuBarColour(self, scheme)
Sets the menu bar color scheme to use.
  SetMenuTheme(self, theme)
Set the menu theme, possible values (Style2007, StyleXP).
  SetMS2007ButtonSunken(self, sunken)
Sets MS 2007 button style sunken.
  SetRaiseToolbar(self, rais)
Enables/Disables toobar shadow drop.
  SetTransparency(self, amount)
  TakeScreenShot(self, rect, bmp)
Takes a screenshot of the screen at give pos & size (rect).
  TruncateText(self, dc, text, maxWidth)
Truncates a given string to fit given width size.

Property Summary

Instance Method Details

__init__(self)
(Constructor)

Default class constructor.

Overrides:
wx.EvtHandler.__init__

AddMenuTheme(self, render)

Adds a new theme to the stock.

BackgroundColor(self)

Returns the background color of a control when not in focus.

CalcButtonBestSize(self, label, bmp)

Returns the best fit size for the supplied label & bitmap.

CanMakeWindowsTransparent(self)

Used internally.

ConvertToBitmap(self, xpm, alpha=None)

Convert the given image to a bitmap.

CreateGreyBitmap(self, bmp)

Creates a grey bitmap image from bmp.

DarkColour(self, color, percent)

Like the LightColour() function, but create the color darker by percent.

DrawBitmapShadow(self, dc, rect, where=3)

Draws a shadow using background bitmap.

DrawButton(self, dc, rect, theme, state, input=None)

Color rectangle according to the theme.

DrawButtonColour(self, dc, rect, theme, state, color)

Color rectangle according to the theme.

DrawButtonTheme(self, dc, rect, theme, state, useLightColours=True)

Color rectangle according to the theme.

DrawDragSash(self, rect)

Draws resize sash.

DrawMenuBarBg(self, dc, rect)

Draws the menu bar background according to the active theme.

DrawMenuBarBorder(self, border)

Enables menu border drawing (XP style only).

DrawTextAndBitmap(self, dc, rect, text, enable=True, font=<wx._gdi.Font; proxy of <Swig Object of type 'wxFont *' a..., fontColor=wx.Colour(), bitmap=<wx._gdi.Bitmap; proxy of <Swig Object of type 'wxBitmap ..., grayBitmap=<wx._gdi.Bitmap; proxy of <Swig Object of type 'wxBitmap ..., style=0)

Draws the text & bitmap on the input dc.

DrawToolBarBg(self, dc, rect)

Draws the toolbar background according to the active theme.

DropShadow(self, wnd, drop=True)

Adds a shadow under the window (Windows Only).

FrameColour(self)

Return the surrounding color for a control.

GetAccelIndex(self, label)

Returns the menomonic index of the label. (e.g. 'lab&el' --> will result in 3 and labelOnly = label)

GetAlignBuffer(self)

Return the padding buffer for a text or bitmap.

GetBitmapStartLocation(self, dc, rect, bitmap, text='', style=0)

Returns the top left x & y cordinates of the bitmap drawing.

GetColourSchemes(self)

Returns the available colour schemes.

GetFont(self)

Returns the font used by this theme.

GetMBVerticalGradient(self)

Returns True if the meun bar should be painted with vertical gradient.

GetMenuBarBorder(self)

Returns menu bar morder drawing flag.

GetMenuBarColourScheme(self)

Returns the current colour scheme.

GetMenuBarFaceColour(self)

Returns the menu bar face colour.

GetMenuBarSelectionColour(self)

Returns the menu bar selection color.

GetMenuBgFactor(self)

Gets the visibility depth of the menu in Metallic style. The higher the value, the menu bar will look more raised

GetMenuFaceColour(self)

Returns the colour used for menu face.

GetMenuTheme(self)

Returns the menu theme.

GetMS2007ButtonSunken(self)

Returns the sunken flag for MS 2007 buttons.

GetRaiseToolbar(self)

Do Drop shadow under toolbar?.

GetStockBitmap(self, name)

Gets a bitmap from a stock. If bitmap does not exist, return wx.NullBitmap.

GetTextColourDisable(self)

Returns the colour used for disabled menu items.

GetTextColourEnable(self)

Returns the colour used for enabled menu items.

GetTextStartLocation(self, dc, rect, bitmap, text, style=0)

Returns the top left x & y cordinates of the text drawing. In case the text is too long, the text is being fixed (the text is cut and a '...' mark is added in the end).

GetThemeBaseColour(self, useLightColours=True)

Returns the theme (Blue, Silver, Green etc.) base color, if no theme is active it return the active caption colour, lighter in 30%.

HighlightBackgroundColor(self)

Returns the background color of a control when it is in focus.

InitColours(self)

Initialise the colour map.

Initialize(self)

Initializes the bitmaps and colours.

IsDark(self, color)

Returns whether a color is dark or light.

LightColour(self, color, percent)

Return light contrast of color. The color returned is from the scale of color -> white. The percent determines how light the color will be. Percent = 100 return white, percent = 0 returns color.

MakeWindowTransparent(self, wnd, amount)

Used internally.

MixColors(self, firstColor, secondColor, percent)

Return mix of input colors.

OnSysColourChange(self, event)

Handles the wx.EVT_SYS_COLOUR_CHANGED event for ArtManager.

PaintCrescentGradientBox(self, dc, rect, startColor, endColor, concave=True)

Paint a region with gradient coloring. The gradient is in crescent shape which fits the 2007 style.

PaintDiagonalGradientBox(self, dc, rect, startColor, endColor, startAtUpperLeft=True, trimToSquare=True)

Paint rectagnle with gradient coloring; the gradient lines are diagonal and may start from the upper left corner or from the upper right corner.

PaintGradientRegion(self, dc, region, startColor, endColor, vertical=True)

Paint a region with gradient coloring.

PaintStraightGradientBox(self, dc, rect, startColor, endColor, vertical=True)

Paint the rectangle with gradient coloring; the gradient lines are either horizontal or vertical.

RandomColour()

Creates a random colour.

SetMBVerticalGradient(self, v)

Sets the menu bar gradient style.

SetMenuBarColour(self, scheme)

Sets the menu bar color scheme to use.

SetMenuTheme(self, theme)

Set the menu theme, possible values (Style2007, StyleXP).

SetMS2007ButtonSunken(self, sunken)

Sets MS 2007 button style sunken.

SetRaiseToolbar(self, rais)

Enables/Disables toobar shadow drop.

TakeScreenShot(self, rect, bmp)

Takes a screenshot of the screen at give pos & size (rect).

TruncateText(self, dc, text, maxWidth)

Truncates a given string to fit given width size. if the text does not fit into the given width it is truncated to fit. the format of the fixed text is <truncate text ..>.


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:32 2009 http://epydoc.sf.net