Package wx :: Package lib :: Module flatnotebook

[frames | no frames]

## Module wx.lib.flatnotebook

The FlatNotebook is a full implementation of the wx.Notebook, and designed to be a drop-in replacement for wx.Notebook. The API functions are similar so one can expect the function to behave in the same way.

Some features:

- The buttons are highlighted a la Firefox style
- The scrolling is done for bulks of tabs (so, the scrolling is faster and better)
- The buttons area is never overdrawn by tabs (unlike many other implementations I saw)
- It is a generic control
- Currently there are 5 differnt styles - VC8, VC 71, Standard, Fancy and Firefox 2;
- Mouse middle click can be used to close tabs
- A function to add right click menu for tabs (simple as SetRightClickMenu)
- All styles has bottom style as well (they can be drawn in the bottom of screen)
- An option to hide 'X' button or navigation buttons (separately)
- Gradient coloring of the selected tabs and border
- Support for drag 'n' drop of tabs, both in the same notebook or to another notebook
- Possibility to have closing button on the active tab directly
- Support for disabled tabs
- Colours for active/inactive tabs, and captions
- Background of tab area can be painted in gradient (VC8 style only)
- Colourful tabs - a random gentle colour is generated for each new tab (very cool, VC8 style only)

And much more.

License And Version:

FlatNotebook Is Freeware And Distributed Under The wxPython License.

Latest Revision: Andrea Gavana @ 20 Aug 2007, 21.00 GMT

Version 2.3.

Classes
`FlatNotebook` | Display one or more windows in a notebook.
`FlatNotebookEvent` | This events will be sent when a EVT_FLATNOTEBOOK_PAGE_CHANGED, EVT_FLATNOTEBOOK_PAGE_CHANGING, EVT_FLATNOTEBOOK_PAGE_CLOSING, EVT_FLATNOTEBOOK_PAGE_CLOSED and EVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU is mapped in the parent.
`FNBDropSource` | Give some custom UI feedback during the drag and drop operation in this function.
`FNBRenderer` | Parent class for the 4 renderers defined: Standard, VC71, Fancy and VC8.
`FNBRendererDefault` | This class handles the drawing of tabs using the Standard renderer.
`FNBRendererFancy` | This class handles the drawing of tabs using the Fancy renderer.
`FNBRendererFirefox2` | This class handles the drawing of tabs using the Firefox 2 renderer.
`FNBRendererMgr` | This class represents a manager that handles all the 4 renderers defined and calls the appropriate one when drawing is needed.
`FNBRendererVC71` | This class handles the drawing of tabs using the VC71 renderer.
`FNBRendererVC8` | This class handles the drawing of tabs using the VC8 renderer.
`PageContainer` | This class acts as a container for the pages you add to `FlatNotebook`.
`PageInfo` | This class holds all the information (caption, image, etc...) belonging to a single tab in `FlatNotebook`.
`TabNavigatorWindow` | This class is used to create a modal dialog that enables "Smart Tabbing", similar to what you would get by hitting Alt+Tab on Windows.

Function Summary
| `DrawButton(dc, rect, focus, upperTabs)`
| ``LightColour`(color, percent)` Brighten input colour by percent.
| ``PaintStraightGradientBox`(dc, rect, startColor, endColor, vertical)` Draws a gradient colored box from startColor to endColor.
| ``RandomColour`()` Creates a random colour.

Function Details

### LightColour(color, percent)

Brighten input colour by percent.

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

Draws a gradient colored box from startColor to endColor.

### RandomColour()

Creates a random colour.

Generated by Epydoc 2.1.20050511.rpd on Wed Sep 26 13:46:44 2007 | http://epydoc.sf.net