This is the main implementation of RibbonPanel
.
__init__ |
Default class constructor. |
AddChild |
|
CanAutoMinimise |
Query if the panel can automatically minimise itself at small sizes. |
CommonInit |
|
DoGetBestSize |
Gets the size which best suits the window: for a control, it would be the |
DoGetNextLargerSize |
Implementation of RibbonControl.GetNextLargerSize() . |
DoGetNextSmallerSize |
Implementation of RibbonControl.GetNextSmallerSize() . |
DoSetSize |
Sets the size of the window in pixels. |
GetBestSizeForParentSize |
Finds the best width and height given the parent’s width and height. |
GetDefaultBorder |
Returns the default border style for RibbonPanel . |
GetExpandedDummy |
Get the dummy panel of an expanded panel. |
GetExpandedPanel |
Get the expanded panel of a dummy panel. |
GetExpandedPosition |
|
GetFlags |
Returns the AGW-specific window style for RibbonPanel . |
GetMinimisedIcon |
Get the bitmap to be used in place of the panel children when it is minimised. |
GetMinNotMinimisedSize |
|
GetMinSize |
Returns the minimum size of the window, an indication to the sizer layout mechanism |
GetPanelSizerBestSize |
|
GetPanelSizerMinSize |
|
HasExtButton |
|
HideExpanded |
Hide the panel’s external expansion. |
IsExtButtonHovered |
|
IsHovered |
Query is the mouse is currently hovered over the panel. |
IsMinimised |
Query if the panel would be minimised at a given size. |
IsMinimised1 |
Query if the panel is currently minimised. |
IsMinimised2 |
Query if the panel would be minimised at a given size. |
IsSizingContinuous |
Returns True if this window can take any size (greater than its minimum size), |
Layout |
|
OnChildKillFocus |
Handles the wx.EVT_KILL_FOCUS event for children of RibbonPanel . |
OnEraseBackground |
Handles the wx.EVT_ERASE_BACKGROUND event for RibbonPanel . |
OnKillFocus |
Handles the wx.EVT_KILL_FOCUS event for RibbonPanel . |
OnMotion |
Handles the wx.EVT_MOTION event for RibbonPanel . |
OnMouseClick |
Handles the wx.EVT_LEFT_DOWN event for RibbonPanel . |
OnMouseEnter |
Handles the wx.EVT_ENTER_WINDOW event for RibbonPanel . |
OnMouseEnterChild |
Handles the wx.EVT_ENTER_WINDOW event for children of RibbonPanel . |
OnMouseLeave |
Handles the wx.EVT_LEAVE_WINDOW event for RibbonPanel . |
OnMouseLeaveChild |
Handles the wx.EVT_LEAVE_WINDOW event for children of RibbonPanel . |
OnPaint |
Handles the wx.EVT_PAINT event for RibbonPanel . |
OnSize |
Handles the wx.EVT_SIZE event for RibbonPanel . |
Realize |
Realize all children of the panel. |
RemoveChild |
|
SetArtProvider |
Set the art provider to be used. |
ShouldSendEventToDummy |
|
ShowExpanded |
Show the panel externally expanded. |
TestPositionForHover |
|
TryAfter |
RibbonPanel
(RibbonControl)¶This is the main implementation of RibbonPanel
.
__init__
(self, parent, id=wx.ID_ANY, label="", minimised_icon=wx.NullBitmap, pos=wx.DefaultPosition, size=wx.DefaultSize, agwStyle=RIBBON_PANEL_DEFAULT_STYLE, name="RibbonPanel")¶Default class constructor.
Parameters: |
|
---|
AddChild
(self, child)¶CanAutoMinimise
(self)¶Query if the panel can automatically minimise itself at small sizes.
CommonInit
(self, label, icon, agwStyle)¶DoGetBestSize
(self)¶Gets the size which best suits the window: for a control, it would be the minimal size which doesn’t truncate the control, for a panel - the same size as it would have after a call to Fit().
Returns: | An instance of wx.Size . |
---|
Note
Overridden from wx.Control
.
DoGetNextLargerSize
(self, direction, relative_to)¶Implementation of RibbonControl.GetNextLargerSize()
.
Controls which have non-continuous sizing must override this virtual function
rather than RibbonControl.GetNextLargerSize()
.
DoGetNextSmallerSize
(self, direction, relative_to)¶Implementation of RibbonControl.GetNextSmallerSize()
.
Controls which have non-continuous sizing must override this virtual function
rather than RibbonControl.GetNextSmallerSize()
.
DoSetSize
(self, x, y, width, height, sizeFlags=wx.SIZE_AUTO)¶Sets the size of the window in pixels.
Parameters: |
|
---|
GetBestSizeForParentSize
(self, parentSize)¶Finds the best width and height given the parent’s width and height.
GetDefaultBorder
(self)¶Returns the default border style for RibbonPanel
.
GetExpandedDummy
(self)¶Get the dummy panel of an expanded panel.
Note
This should be called on an expanded panel to get the dummy associated
with it - it will return None
when called on the dummy itself.
See also
GetExpandedPanel
(self)¶Get the expanded panel of a dummy panel.
Note
This should be called on a dummy panel to get the expanded panel
associated with it - it will return None
when called on the expanded panel
itself.
See also
GetExpandedPosition
(self, panel, expanded_size, direction)¶GetFlags
(self)¶Returns the AGW-specific window style for RibbonPanel
.
GetMinimisedIcon
(self)¶Get the bitmap to be used in place of the panel children when it is minimised.
GetMinNotMinimisedSize
(self)¶GetMinSize
(self)¶Returns the minimum size of the window, an indication to the sizer layout mechanism that this is the minimum required size.
This method normally just returns the value set by SetMinSize
, but it can be
overridden to do the calculation on demand.
GetPanelSizerBestSize
(self)¶GetPanelSizerMinSize
(self)¶HasExtButton
(self)¶HideExpanded
(self)¶Hide the panel’s external expansion.
Returns: | True if the panel was un-expanded, False if it was not
(normally due to it not being expanded in the first place). |
---|
See also
IsExtButtonHovered
(self)¶IsHovered
(self)¶Query is the mouse is currently hovered over the panel.
Returns: | True if the cursor is within the bounds of the panel (i.e.
hovered over the panel or one of its children), False otherwise. |
---|
IsMinimised
(self, at_size=None)¶Query if the panel would be minimised at a given size.
Parameters: | at_size – an instance of wx.Size , giving the size at which the
panel should be tested for minimisation. |
---|
IsMinimised1
(self)¶Query if the panel is currently minimised.
IsMinimised2
(self, at_size)¶Query if the panel would be minimised at a given size.
Parameters: | at_size – an instance of wx.Size , giving the size at which the
panel should be tested for minimisation. |
---|
IsSizingContinuous
(self)¶Returns True
if this window can take any size (greater than its minimum size),
False
if it can only take certain sizes.
See also
RibbonControl.GetNextSmallerSize()
,
RibbonControl.GetNextLargerSize()
Layout
(self)¶OnChildKillFocus
(self, event)¶Handles the wx.EVT_KILL_FOCUS
event for children of RibbonPanel
.
Parameters: | event – a FocusEvent event to be processed. |
---|
OnEraseBackground
(self, event)¶Handles the wx.EVT_ERASE_BACKGROUND
event for RibbonPanel
.
Parameters: | event – a EraseEvent event to be processed. |
---|
OnKillFocus
(self, event)¶Handles the wx.EVT_KILL_FOCUS
event for RibbonPanel
.
Parameters: | event – a FocusEvent event to be processed. |
---|
OnMotion
(self, event)¶Handles the wx.EVT_MOTION
event for RibbonPanel
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseClick
(self, event)¶Handles the wx.EVT_LEFT_DOWN
event for RibbonPanel
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseEnter
(self, event)¶Handles the wx.EVT_ENTER_WINDOW
event for RibbonPanel
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseEnterChild
(self, event)¶Handles the wx.EVT_ENTER_WINDOW
event for children of RibbonPanel
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseLeave
(self, event)¶Handles the wx.EVT_LEAVE_WINDOW
event for RibbonPanel
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMouseLeaveChild
(self, event)¶Handles the wx.EVT_LEAVE_WINDOW
event for children of RibbonPanel
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnPaint
(self, event)¶Handles the wx.EVT_PAINT
event for RibbonPanel
.
Parameters: | event – a PaintEvent event to be processed. |
---|
OnSize
(self, event)¶Handles the wx.EVT_SIZE
event for RibbonPanel
.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
Realize
(self)¶Realize all children of the panel.
Note
Reimplemented from RibbonControl
.
RemoveChild
(self, child)¶SetArtProvider
(self, art)¶Set the art provider to be used.
Normally called automatically by RibbonPage
when the panel is created, or the
art provider changed on the page. The new art provider will be propagated to the
children of the panel.
Reimplemented from RibbonControl
.
Parameters: | art – an art provider. |
---|
ShouldSendEventToDummy
(self, event)¶ShowExpanded
(self)¶Show the panel externally expanded.
When a panel is minimised, it can be shown full-size in a pop-out window, which is refered to as being (externally) expanded.
Returns: | True if the panel was expanded, False if it was not (possibly
due to it not being minimised, or already being expanded). |
---|
Note
When a panel is expanded, there exist two panels - the original panel (which is refered to as the dummy panel) and the expanded panel. The original is termed a dummy as it sits in the ribbon bar doing nothing, while the expanded panel holds the panel children.
See also
TestPositionForHover
(self, pos)¶TryAfter
(self, event)¶