Base class for FlatImageBook
image container.
__init__ |
Default class constructor. |
AddPage |
Adds a page to the container. |
AssignImageList |
Assigns an image list to the wx.ImageContainerBase . |
CanDoBottomStyle |
Allows the parent to examine the children type. Some implementation |
ClearAll |
Deletes all the pages in the container. |
ClearFlag |
Removes flag from the style. |
DoDeletePage |
Does the actual page deletion. |
DrawPin |
Draw a pin button, that allows collapsing of the image panel. |
EnableTab |
Enables or disables a tab. |
FixTextSize |
Fixes the text, to fit maxWidth value. If the text length exceeds |
GetEnabled |
Returns whether a tab is enabled or not. |
GetImageList |
Return the image list for wx.ImageContainerBase . |
GetImageSize |
Returns the image size inside the wx.ImageContainerBase image list. |
GetPageImage |
Returns the image index for the given page. |
GetPageText |
Returns the tab caption for the given page. |
HasAGWFlag |
Tests for existence of flag in the style. |
HitTest |
Returns the index of the tab at the specified position or wx.NOT_FOUND |
InsertPage |
Inserts a page into the container at the specified position. |
OnEraseBackground |
Handles the wx.EVT_ERASE_BACKGROUND event for wx.ImageContainerBase . |
OnMouseLeaveWindow |
Handles the wx.EVT_LEAVE_WINDOW event for wx.ImageContainerBase . |
OnMouseLeftDown |
Handles the wx.EVT_LEFT_DOWN event for wx.ImageContainerBase . |
OnMouseLeftUp |
Handles the wx.EVT_LEFT_UP event for wx.ImageContainerBase . |
OnMouseMove |
Handles the wx.EVT_MOTION event for wx.ImageContainerBase . |
OnSize |
Handles the wx.EVT_SIZE event for wx.ImageContainerBase . |
PointOnSash |
Tests whether pt is located on the sash. |
SetPageImage |
Sets the image for the given page. |
SetPageText |
Sets the tab caption for the given page. |
ImageContainerBase
(wx.Panel)¶Base class for FlatImageBook
image container.
__init__
(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=0, name="ImageContainerBase")¶Default class constructor.
Parameters: |
|
---|
AddPage
(self, caption, selected=False, imgIdx=-1)¶Adds a page to the container.
Parameters: |
|
---|
AssignImageList
(self, imglist)¶Assigns an image list to the wx.ImageContainerBase
.
Parameters: | imglist – an instance of wx.ImageList . |
---|
CanDoBottomStyle
(self)¶Allows the parent to examine the children type. Some implementation
(such as LabelBook
), does not support top/bottom images, only left/right.
ClearAll
(self)¶Deletes all the pages in the container.
ClearFlag
(self, flag)¶Removes flag from the style.
Parameters: | flag – a window style flag. |
---|
See also
HasAGWFlag
for a list of possible window style flags.
DoDeletePage
(self, page)¶Does the actual page deletion.
Parameters: | page – the index of the tab. |
---|
DrawPin
(self, dc, rect, downPin)¶Draw a pin button, that allows collapsing of the image panel.
Parameters: |
|
---|
EnableTab
(self, page, enabled=True)¶Enables or disables a tab.
Parameters: |
|
---|
FixTextSize
(self, dc, text, maxWidth)¶Fixes the text, to fit maxWidth value. If the text length exceeds maxWidth value this function truncates it and appends two dots at the end. (“Long Long Long Text” might become “Long Long...”).
Parameters: |
|
---|
GetEnabled
(self, page)¶Returns whether a tab is enabled or not.
Parameters: | page – an integer specifying the page index. |
---|
GetImageList
(self)¶Return the image list for wx.ImageContainerBase
.
GetImageSize
(self)¶Returns the image size inside the wx.ImageContainerBase
image list.
GetPageImage
(self, page)¶Returns the image index for the given page.
Parameters: | page – the index of the tab. |
---|
GetPageText
(self, page)¶Returns the tab caption for the given page.
Parameters: | page – the index of the tab. |
---|
HasAGWFlag
(self, flag)¶Tests for existence of flag in the style.
Parameters: | flag – a window style. This can be a combination of the following bits:
|
---|
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
.
Parameters: | pt – an instance of wx.Point , to test for hits. |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | The index of the tab at the specified position plus the hit test
flag, which can be one of the following bits:
|
InsertPage
(self, page_idx, caption, selected=False, imgIdx=-1)¶Inserts a page into the container at the specified position.
Parameters: |
|
---|
OnEraseBackground
(self, event)¶Handles the wx.EVT_ERASE_BACKGROUND
event for wx.ImageContainerBase
.
Parameters: | event – a EraseEvent event to be processed. |
---|
Note
This method is intentionally empty to reduce flicker.
OnMouseLeaveWindow
(self, event)¶Handles the wx.EVT_LEAVE_WINDOW
event for wx.ImageContainerBase
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseLeftDown
(self, event)¶Handles the wx.EVT_LEFT_DOWN
event for wx.ImageContainerBase
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseLeftUp
(self, event)¶Handles the wx.EVT_LEFT_UP
event for wx.ImageContainerBase
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseMove
(self, event)¶Handles the wx.EVT_MOTION
event for wx.ImageContainerBase
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnSize
(self, event)¶Handles the wx.EVT_SIZE
event for wx.ImageContainerBase
.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
PointOnSash
(self, pt)¶Tests whether pt is located on the sash.
Parameters: | pt – an instance of wx.Point , to test for hits. |
---|
SetPageImage
(self, page, imgIdx)¶Sets the image for the given page.
Parameters: |
|
---|
SetPageText
(self, page, text)¶Sets the tab caption for the given page.
Parameters: |
|
---|