Add wxRibbonToolBar GetToolPos and GetToolRect coord functions

This commit is contained in:
Gary Allen
2020-12-23 20:08:39 +02:00
parent a5c2276965
commit ae9a62d5a2
3 changed files with 69 additions and 0 deletions

View File

@@ -307,6 +307,16 @@ public:
*/
wxRibbonToolBarToolBase* GetToolByPos(size_t pos)const;
/**
Return the opaque pointer corresponding to the given tool, given specified coordinates.
@return an opaque pointer, NULL if is not found.
@since 2.9.4
*/
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.