Add functions for getting current ribbon tool rectangle
wxRibbonButtonBar::GetItemRect() and wxRibbonToolBar::GetActiveTool() are helpful for positioning other windows (e.g. popup ones) that should be aligned to tools and buttons in the ribbon bar. Closes #22329.
This commit is contained in:
committed by
Vadim Zeitlin
parent
692073ea7d
commit
94f698cc15
@@ -429,6 +429,17 @@ public:
|
||||
*/
|
||||
virtual int GetItemId(wxRibbonButtonBarButtonBase *item) const;
|
||||
|
||||
/**
|
||||
Returns the items's rect with coordinates relative to the button bar's
|
||||
parent, or a default-constructed rect if the tool is not found.
|
||||
|
||||
@param button_id
|
||||
ID of the button in question.
|
||||
|
||||
@since 3.1.7
|
||||
*/
|
||||
virtual wxRect GetItemRect(int button_id) const;
|
||||
|
||||
/**
|
||||
Calculate button layouts and positions.
|
||||
|
||||
|
||||
@@ -334,6 +334,15 @@ public:
|
||||
*/
|
||||
virtual int GetToolId(const wxRibbonToolBarToolBase* tool)const;
|
||||
|
||||
/**
|
||||
Returns the active item of the tool bar or NULL if there is none.
|
||||
|
||||
The active tool is the one being clicked.
|
||||
|
||||
@since 3.1.7
|
||||
*/
|
||||
virtual wxRibbonToolBarToolBase* GetActiveTool() const;
|
||||
|
||||
/**
|
||||
Get any client data associated with the tool.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user