Merge branch 'add-ribbonBar-coord-functions' of https://github.com/STgithub64/wxWidgets

Add wxRibbonToolBar GetToolByPos() and GetToolRect().

See https://github.com/wxWidgets/wxWidgets/pull/2152
This commit is contained in:
Vadim Zeitlin
2020-12-29 17:01:28 +01:00
3 changed files with 68 additions and 0 deletions

View File

@@ -307,6 +307,16 @@ public:
*/
wxRibbonToolBarToolBase* GetToolByPos(size_t pos)const;
/**
Return the opaque pointer for the tool at the given coordinates.
@return an opaque pointer, NULL if is not found.
@since 3.1.5
*/
virtual wxRibbonToolBarToolBase* GetToolByPos(wxCoord x, wxCoord y)const;
/**
Returns the number of tools in the toolbar.
@@ -380,6 +390,18 @@ public:
*/
virtual int GetToolPos(int tool_id)const;
/**
Returns the rect in the toolbar, or a default-constructed rect if the tool
is not found.
@param tool_id
ID of the tool in question, as passed to AddTool().
@since 3.1.5
*/
virtual wxRect GetToolRect(int tool_id)const;
/**
Gets the on/off state of a toggle tool.