Module LabelBook :: Class LabelContainer
[hide private]
[frames] | no frames]

Class LabelContainer

source code

     object --+                    
              |                    
wx._core.Object --+                
                  |                
wx._core.EvtHandler --+            
                      |            
        wx._core.Window --+        
                          |        
          wx._windows.Panel --+    
                              |    
             ImageContainerBase --+
                                  |
                                 LabelContainer

Base class for LabelBook.

Instance Methods [hide private]
  __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="LabelContainer")
Default class constructor.
  OnSize(self, event)
Handles the wx.EVT_SIZE event for LabelContainer.
  OnEraseBackground(self, event)
Handles the wx.EVT_ERASE_BACKGROUND event for LabelContainer.
  GetTabAreaWidth(self)
Returns the width of the tab area.
  SetTabAreaWidth(self, width)
Sets the width of the tab area.
  CanDoBottomStyle(self)
Allows the parent to examine the children type.
  SetBackgroundBitmap(self, bmp)
Sets the background bitmap for the control
  OnPaint(self, event)
Handles the wx.EVT_PAINT event for LabelContainer.
  DrawBackgroundBitmap(self, dc)
Draws a bitmap as the background of the control.
  OnMouseLeftUp(self, event)
Handles the wx.EVT_LEFT_UP event for LabelContainer.
  Resize(self, event)
Actually resizes the tab area.
  OnMouseMove(self, event)
Handles the wx.EVT_MOTION event for LabelContainer.
  OnMouseLeftDown(self, event)
Handles the wx.EVT_LEFT_DOWN event for LabelContainer.
  OnMouseLeaveWindow(self, event)
Handles the wx.EVT_LEAVE_WINDOW event for LabelContainer.
  DrawRegularHover(self, dc, rect)
Draws a rounded rectangle around the current tab.
  DrawWebHover(self, dc, caption, xCoord, yCoord)
Draws a web style hover effect (cursor set to hand & text is underlined).
  SetColour(self, which, color)
Sets a colour for a parameter.
  GetColour(self, which)
Returns a colour for a parameter.
  InitializeColors(self)
Initializes the colors map to be used for this control.
  DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selected, hover)
Draws label using the specified dc.

Inherited from wx._windows.Panel: Create, SetFocusIgnoringChildren, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer

Inherited from wx._core.EvtHandler: AddPendingEvent, AllowReentrance, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, IsEventHandlingInProgress, IsReentranceAllowed, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

    Inherited from ImageContainerBase
  AddPage(self, caption, selected=True, imgIdx=-1)
Adds a page to the container.
  AssignImageList(self, imglist)
Assigns an image list to the ImageContainerBase.
  ClearAll(self)
Deletes all the pages in the container.
  ClearFlag(self, flag)
Removes flag from the style.
  DoDeletePage(self, page)
Does the actual page deletion.
  DrawPin(self, dc, rect, downPin)
Draw a pin button, that allows collapsing of the image panel.
  FixTextSize(self, dc, text, maxWidth)
Fixes the text, to fit maxWidth value.
  GetImageList(self)
Return the image list for ImageContainerBase.
  GetImageSize(self)
Returns the image size inside the ImageContainerBase image list.
  HasFlag(self, flag)
Tests for existance of flag in the style.
  HitTest(self, pt)
Returns the index of the tab at the specified position or wx.NOT_FOUND if None, plus the flag style of HitTest.
  PointOnSash(self, pt)
Tests whether pt is located on the sash.

Static Methods [hide private]

Inherited from wx._windows.Panel: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId


Properties [hide private]

Inherited from wx._windows.Panel: thisown

Inherited from wx._core.Window: AcceleratorTable, AdjustedBestSize, AutoLayout, BackgroundColour, BackgroundStyle, BestFittingSize, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__


Method Details [hide private]

__init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="LabelContainer")
(Constructor)

source code 

Default class constructor.

Parameters: @param parent - parent window @param id - Window id @param pos - Window position @param size - Window size @param style - possible style INB_XXX
Overrides: ImageContainerBase.__init__

OnSize(self, event)

source code 
Handles the wx.EVT_SIZE event for LabelContainer.
Overrides: ImageContainerBase.OnSize

OnEraseBackground(self, event)

source code 
Handles the wx.EVT_ERASE_BACKGROUND event for LabelContainer.
Overrides: ImageContainerBase.OnEraseBackground

GetTabAreaWidth(self)

source code 
Returns the width of the tab area.

SetTabAreaWidth(self, width)

source code 
Sets the width of the tab area.

CanDoBottomStyle(self)

source code 
Allows the parent to examine the children type. Some implementation (such as LabelBook), does not support top/bottom images, only left/right.
Overrides: ImageContainerBase.CanDoBottomStyle

SetBackgroundBitmap(self, bmp)

source code 
Sets the background bitmap for the control

OnPaint(self, event)

source code 
Handles the wx.EVT_PAINT event for LabelContainer.
Overrides: wx._core.Window.OnPaint

DrawBackgroundBitmap(self, dc)

source code 
Draws a bitmap as the background of the control.

OnMouseLeftUp(self, event)

source code 
Handles the wx.EVT_LEFT_UP event for LabelContainer.
Overrides: ImageContainerBase.OnMouseLeftUp

Resize(self, event)

source code 
Actually resizes the tab area.

OnMouseMove(self, event)

source code 
Handles the wx.EVT_MOTION event for LabelContainer.
Overrides: ImageContainerBase.OnMouseMove

OnMouseLeftDown(self, event)

source code 
Handles the wx.EVT_LEFT_DOWN event for LabelContainer.
Overrides: ImageContainerBase.OnMouseLeftDown

OnMouseLeaveWindow(self, event)

source code 
Handles the wx.EVT_LEAVE_WINDOW event for LabelContainer.
Overrides: ImageContainerBase.OnMouseLeaveWindow

DrawRegularHover(self, dc, rect)

source code 
Draws a rounded rectangle around the current tab.

DrawWebHover(self, dc, caption, xCoord, yCoord)

source code 
Draws a web style hover effect (cursor set to hand & text is underlined).

SetColour(self, which, color)

source code 
Sets a colour for a parameter.

GetColour(self, which)

source code 
Returns a colour for a parameter.

InitializeColors(self)

source code 
Initializes the colors map to be used for this control.

DrawLabel(self, dc, rect, text, bmp, imgInfo, orientationLeft, imgIdx, selected, hover)

source code 
Draws label using the specified dc.