AGW Logo

agw_title RibbonGallery

hierarchy Inheritance Diagram

Inheritance diagram for: RibbonGallery

Inheritance diagram of RibbonGallery


supclasses Known Superclasses


appearance Control Appearance


RibbonGallery

RibbonGallery


method_summary Methods Summary

__init__Default class constructor.
AppendAdd an item to the gallery (with complex client data).
CalculateMinSize
ClearRemove all items from the gallery.
CommonInit
DoGetBestSize
DoGetNextLargerSize
DoGetNextSmallerSize
EnsureVisibleScroll the gallery to ensure that the given item is visible.
GetActiveItemGet the currently active item, or None if there is none.
GetCountGet the number of items in the gallery.
GetDefaultBorder
GetDownButtonStateGet the state of the scroll down button.
GetExtensionButtonStateGet the state of the “extension” button.
GetHoveredItemGet the currently hovered item, or None if there is none.
GetItemGet an item by index.
GetItemClientDataGet the client data associated with a gallery item.
GetSelectionGet the currently selected item, or None if there is none.
GetUpButtonStateGet the state of the scroll up button.
IsEmptyQuery if the gallery has no items in it.
IsHoveredQuery is the mouse is currently hovered over the gallery.
IsSizingContinuous
Layout
OnEraseBackground
OnMouseDClick
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnPaint
OnSize
Realize
ScrollLinesScroll the gallery contents by some amount.
SetItemClientDataSet the client data associated with a gallery item.
SetSelectionSet the selection to the given item, or removes the selection if item == None.
TestButtonHover

API Class API

class RibbonGallery(RibbonControl)[source]


__init__(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, agwStyle=0, name="RibbonGallery")[source]

Default class constructor.

Parameters:
  • parent – Pointer to a parent window;
  • id – Window identifier. If wx.ID_ANY, will automatically create an identifier;
  • 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;
  • name – the window name.


Append(bitmap, id, clientData=None)[source]

Add an item to the gallery (with complex client data).

Parameters:
  • bitmap – The bitmap to display for the item. Note that all items must have equally sized bitmaps;
  • id – ID number to associate with the item. Not currently used for anything important;
  • clientData – An object which contains data to associate with the item. The item takes ownership of this pointer, and will delete it when the item client data is changed to something else, or when the item is destroyed.


CalculateMinSize()[source]


Clear()[source]

Remove all items from the gallery.



CommonInit(agwStyle)[source]


DoGetBestSize()[source]


DoGetNextLargerSize(direction, relative_to)[source]


DoGetNextSmallerSize(direction, relative_to)[source]


EnsureVisible(item)[source]

Scroll the gallery to ensure that the given item is visible.

Parameters:item – MISSING DESCRIPTION.


GetActiveItem()[source]

Get the currently active item, or None if there is none.

The active item is the item being pressed by the user, and will thus become the selected item if the user releases the mouse button.



GetCount()[source]

Get the number of items in the gallery.



GetDefaultBorder()[source]


GetDownButtonState()[source]

Get the state of the scroll down button.



GetExtensionButtonState()[source]

Get the state of the “extension” button.



GetHoveredItem()[source]

Get the currently hovered item, or None if there is none.

The hovered item is the item underneath the mouse cursor.



GetItem(n)[source]

Get an item by index.

Parameters:n – MISSING DESCRIPTION.


GetItemClientData(item)[source]

Get the client data associated with a gallery item.

Parameters:item – MISSING DESCRIPTION.


GetSelection()[source]

Get the currently selected item, or None if there is none.

The selected item is set by SetSelection, or by the user clicking on an item.



GetUpButtonState()[source]

Get the state of the scroll up button.



IsEmpty()[source]

Query if the gallery has no items in it.



IsHovered()[source]

Query is the mouse is currently hovered over the gallery.

Returns:True if the cursor is within the bounds of the gallery (not just hovering over an item), False otherwise.


IsSizingContinuous()[source]


Layout()[source]


OnEraseBackground(event)[source]


OnMouseDClick(event)[source]


OnMouseDown(event)[source]


OnMouseEnter(event)[source]


OnMouseLeave(event)[source]


OnMouseMove(event)[source]


OnMouseUp(event)[source]


OnPaint(event)[source]


OnSize(event)[source]


Realize()[source]


ScrollLines(lines)[source]

Scroll the gallery contents by some amount.

Reimplemented from wx.Window.

Parameters:lines – Positive values scroll toward the end of the gallery, while negative values scroll toward the start.
Returns:True if the gallery scrolled at least one pixel in the given direction, False if it did not scroll.


SetItemClientData(item, data)[source]

Set the client data associated with a gallery item.

Parameters:
  • item – MISSING DESCRIPTION;
  • data – MISSING DESCRIPTION.


SetSelection(item)[source]

Set the selection to the given item, or removes the selection if item == None.

Note that this not cause any events to be emitted.

Parameters:item – MISSING DESCRIPTION.


TestButtonHover(rect, pos, state)[source]
Tree

Table Of Contents

Previous topic

ribbon.gallery

Next topic

RibbonGalleryEvent