AGW Logo

agw_title RibbonPanel

This is the main implementation of RibbonPanel.

hierarchy Inheritance Diagram

Inheritance diagram for: RibbonPanel

Inheritance diagram of RibbonPanel


supclasses Known Superclasses


appearance Control Appearance


RibbonPanel

RibbonPanel


method_summary Methods Summary

__init__Default class constructor.
AddChild
CanAutoMinimiseQuery if the panel can automatically minimise itself at small sizes.
CommonInit
DoGetBestSize
DoGetNextLargerSize
DoGetNextSmallerSize
DoSetSize
GetDefaultBorder
GetExpandedDummyGet the dummy panel of an expanded panel.
GetExpandedPanelGet the expanded panel of a dummy panel.
GetExpandedPosition
GetMinNotMinimisedSize
GetMinSize
GetMinimisedIconGet the bitmap to be used in place of the panel children when it is minimised.
GetPanelSizerBestSize
GetPanelSizerMinSize
HideExpandedHide the panel’s external expansion.
IsHoveredQuery is the mouse is currently hovered over the panel.
IsMinimisedQuery if the panel would be minimised at a given size.
IsMinimised1Query if the panel is currently minimised.
IsMinimised2Query if the panel would be minimised at a given size.
IsSizingContinuous
Layout
OnChildKillFocus
OnEraseBackground
OnKillFocus
OnMouseClick
OnMouseEnter
OnMouseEnterChild
OnMouseLeave
OnMouseLeaveChild
OnPaint
OnSize
RealizeRealize all children of the panel.
RemoveChild
SetArtProviderSet the art provider to be used.
ShouldSendEventToDummy
ShowExpandedShow the panel externally expanded.
TestPositionForHover
TryAfter
__del__

API Class API

class RibbonPanel(RibbonControl)[source]

This is the main implementation of RibbonPanel.



__init__(parent, id=wx.ID_ANY, label="", minimised_icon=wx.NullBitmap, pos=wx.DefaultPosition, size=wx.DefaultSize, agwStyle=RIBBON_PANEL_DEFAULT_STYLE, name="RibbonPanel")[source]

Default class constructor.

Parameters:
  • parent – Pointer to a parent window;
  • id – Window identifier. If wx.ID_ANY, will automatically create an identifier;
  • label – Label of the new button;
  • minimised_icon – the bitmap to be used in place of the panel children when it is minimised;
  • pos – Window position. wx.DefaultPosition indicates that wxPython should generate a default position for the window;
  • size – Window size. wx.DefaultSize indicates that wxPython should generate a default size for the window. If no suitable size can be found, the window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized;
  • agwStyle – the AGW-specific window style. This can be one of the following bits:


    Window Styles Hex Value Description
    RIBBON_PANEL_DEFAULT_STYLE 0x0 Defined as no other flags set.
    RIBBON_PANEL_NO_AUTO_MINIMISE 0x1 Prevents the panel from automatically minimising to conserve screen space.
    RIBBON_PANEL_EXT_BUTTON 0x8 Causes an extension button to be shown in the panel’s chrome (if the bar in which it is contained has RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS set). The behaviour of this button is application controlled, but typically will show an extended drop-down menu relating to the panel.
    RIBBON_PANEL_MINIMISE_BUTTON 0x10 Causes a (de)minimise button to be shown in the panel’s chrome (if the bar in which it is contained has the RIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS style set). This flag is typically combined with RIBBON_PANEL_NO_AUTO_MINIMISE to make a panel which the user always has manual control over when it minimises.
  • name – the window name.


AddChild(child)[source]


CanAutoMinimise()[source]

Query if the panel can automatically minimise itself at small sizes.



CommonInit(label, icon, agwStyle)[source]


DoGetBestSize()[source]


DoGetNextLargerSize(direction, relative_to)[source]


DoGetNextSmallerSize(direction, relative_to)[source]


DoSetSize(x, y, width, height, sizeFlags=wx.SIZE_AUTO)[source]


GetDefaultBorder()[source]


GetExpandedDummy()[source]

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.



GetExpandedPanel()[source]

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.



GetExpandedPosition(panel, expanded_size, direction)[source]


GetMinNotMinimisedSize()[source]


GetMinSize()[source]


GetMinimisedIcon()[source]

Get the bitmap to be used in place of the panel children when it is minimised.



GetPanelSizerBestSize()[source]


GetPanelSizerMinSize()[source]


HideExpanded()[source]

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).


IsHovered()[source]

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(at_size=None)[source]

Query if the panel would be minimised at a given size.

Parameters:at_size – MISSING DESCRIPTION.


IsMinimised1()[source]

Query if the panel is currently minimised.



IsMinimised2(at_size)[source]

Query if the panel would be minimised at a given size.

Parameters:at_size – MISSING DESCRIPTION.


IsSizingContinuous()[source]


Layout()[source]


OnChildKillFocus(event)[source]


OnEraseBackground(event)[source]


OnKillFocus(event)[source]


OnMouseClick(event)[source]


OnMouseEnter(event)[source]


OnMouseEnterChild(event)[source]


OnMouseLeave(event)[source]


OnMouseLeaveChild(event)[source]


OnPaint(event)[source]


OnSize(event)[source]


Realize()[source]

Realize all children of the panel.

Reimplemented from RibbonControl.



RemoveChild(child)[source]


SetArtProvider(art)[source]

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 – MISSING DESCRIPTION.


ShouldSendEventToDummy(event)[source]


ShowExpanded()[source]

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.



TestPositionForHover(pos)[source]


TryAfter(event)[source]
Tree

Table Of Contents

Previous topic

ribbon.panel

Next topic

ribbon.panel functions