#include </home/zeitlin/src/wx/github/interface/wx/ribbon/panel.h>
Serves as a container for a group of (ribbon) controls.
A wxRibbonPage will typically have panels for children, with the controls for that page placed on the panels.
A panel adds a border and label to a group of controls, and can be minimised (either automatically to conserve space, or manually by the user).
Non ribbon controls can be placed on a panel using wxSizers to manage layout. Panel size is governed by the sizer's minimum calculated size and the parent wxRibbonPage's dimensions. For functional and aesthetic reasons it is recommended that ribbon and non ribbon controls are not mixed in one panel.
This class supports the following styles:
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
Event macros for events emitted by this class:
Public Member Functions | |
wxRibbonPanel () | |
Default constructor. | |
wxRibbonPanel (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &label=wxEmptyString, const wxBitmap &minimised_icon=wxNullBitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxRIBBON_PANEL_DEFAULT_STYLE) | |
Constructs a ribbon panel. | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &label=wxEmptyString, const wxBitmap &icon=wxNullBitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxRIBBON_PANEL_DEFAULT_STYLE) |
Create a ribbon panel in two-step ribbon panel construction. | |
virtual | ~wxRibbonPanel () |
Destructor. | |
wxBitmap & | GetMinimisedIcon () |
Get the bitmap to be used in place of the panel children when it is minimised. | |
const wxBitmap & | GetMinimisedIcon () const |
virtual bool | HasExtButton () const |
Test if the panel has an extension button. | |
bool | IsMinimised () const |
Query if the panel is currently minimised. | |
bool | IsMinimised (wxSize at_size) const |
Query if the panel would be minimised at a given size. | |
bool | IsHovered () const |
Query is the mouse is currently hovered over the panel. | |
bool | IsExtButtonHovered () const |
Query if the mouse is currently hovered over the extension button. | |
bool | CanAutoMinimise () const |
Query if the panel can automatically minimise itself at small sizes. | |
bool | ShowExpanded () |
Show the panel externally expanded. | |
bool | HideExpanded () |
Hide the panel's external expansion. | |
void | SetArtProvider (wxRibbonArtProvider *art) |
Set the art provider to be used. | |
bool | Realize () |
Realize all children of the panel. | |
wxRibbonPanel * | GetExpandedDummy () |
Get the dummy panel of an expanded panel. | |
wxRibbonPanel * | GetExpandedPanel () |
Get the expanded panel of a dummy panel. |
wxRibbonPanel::wxRibbonPanel | ( | ) |
Default constructor.
With this constructor, Create() should be called in order to create the ribbon panel.
wxRibbonPanel::wxRibbonPanel | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxString & | label = wxEmptyString , |
||
const wxBitmap & | minimised_icon = wxNullBitmap , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxRIBBON_PANEL_DEFAULT_STYLE |
||
) |
Constructs a ribbon panel.
parent | Pointer to a parent window, which is typically a wxRibbonPage, though it can be any window. |
id | Window identifier. |
label | Label to be used in the wxRibbonPanel's chrome. |
minimised_icon | Icon to be used in place of the panel's children when the panel is minimised. |
pos | The initial position of the panel. Not relevant when the parent is a ribbon page, as the position and size of the panel will be dictated by the page. |
size | The initial size of the panel. Not relevant when the parent is a ribbon page, as the position and size of the panel will be dictated by the page. |
style | Style flags for the panel. |
virtual wxRibbonPanel::~wxRibbonPanel | ( | ) | [virtual] |
Destructor.
bool wxRibbonPanel::CanAutoMinimise | ( | ) | const |
Query if the panel can automatically minimise itself at small sizes.
bool wxRibbonPanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxString & | label = wxEmptyString , |
||
const wxBitmap & | icon = wxNullBitmap , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxRIBBON_PANEL_DEFAULT_STYLE |
||
) |
Create a ribbon panel in two-step ribbon panel construction.
Should only be called when the default constructor is used, and arguments have the same meaning as in the full constructor.
wxRibbonPanel* wxRibbonPanel::GetExpandedDummy | ( | ) |
Get the dummy panel of an expanded panel.
Note that this should be called on an expanded panel to get the dummy associated with it - it will return NULL when called on the dummy itself.
wxRibbonPanel* wxRibbonPanel::GetExpandedPanel | ( | ) |
Get the expanded panel of a dummy panel.
Note that this should be called on a dummy panel to get the expanded panel associated with it - it will return NULL when called on the expanded panel itself.
const wxBitmap& wxRibbonPanel::GetMinimisedIcon | ( | ) | const |
wxBitmap& wxRibbonPanel::GetMinimisedIcon | ( | ) |
Get the bitmap to be used in place of the panel children when it is minimised.
virtual bool wxRibbonPanel::HasExtButton | ( | ) | const [virtual] |
Test if the panel has an extension button.
Such button is shown in the top right corner of the panel if wxRIBBON_PANEL_EXT_BUTTON
style is used for it.
bool wxRibbonPanel::HideExpanded | ( | ) |
Hide the panel's external expansion.
bool wxRibbonPanel::IsExtButtonHovered | ( | ) | const |
Query if the mouse is currently hovered over the extension button.
Extension button is only shown for panels with wxRIBBON_PANEL_EXT_BUTTON
style.
bool wxRibbonPanel::IsHovered | ( | ) | const |
Query is the mouse is currently hovered over the panel.
bool wxRibbonPanel::IsMinimised | ( | ) | const |
Query if the panel is currently minimised.
bool wxRibbonPanel::IsMinimised | ( | wxSize | at_size | ) | const |
Query if the panel would be minimised at a given size.
bool wxRibbonPanel::Realize | ( | ) | [virtual] |
Realize all children of the panel.
Reimplemented from wxRibbonControl.
void wxRibbonPanel::SetArtProvider | ( | wxRibbonArtProvider * | art | ) | [virtual] |
Set the art provider to be used.
Normally called automatically by wxRibbonPage 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 wxRibbonControl.
bool wxRibbonPanel::ShowExpanded | ( | ) |
Show the panel externally expanded.
When a panel is minimised, it can be shown full-size in a pop-out window, which is referred to as being (externally) expanded. Note that when a panel is expanded, there exist two panels - the original panel (which is referred 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.