Document wxAuiToolBar::DeleteTool() and DeleteByIndex()
The behaviour of these functions for the tools containing controls is counter-intuitive but changing it now would silently break existing code working around the current semantics, so just document it instead. See #16552.
This commit is contained in:
parent
931f4b8d20
commit
95b1f7b7ea
@ -722,8 +722,32 @@ public:
|
||||
|
||||
void ClearTools();
|
||||
void Clear();
|
||||
|
||||
/**
|
||||
Removes the tool with the given ID from the tool bar.
|
||||
|
||||
Note that if this tool was added by AddControl(), the associated
|
||||
control is @e not deleted and must either be reused (e.g. by
|
||||
reparenting it under a different window) or destroyed by caller.
|
||||
|
||||
@param tool_id ID of a previously added tool.
|
||||
@return @true if the tool was removed or @false otherwise, e.g. if the
|
||||
tool with the given ID was not found.
|
||||
*/
|
||||
bool DeleteTool(int tool_id);
|
||||
bool DeleteByIndex(int tool_id);
|
||||
|
||||
/**
|
||||
Removes the tool at the given position from the tool bar.
|
||||
|
||||
Note that if this tool was added by AddControl(), the associated
|
||||
control is @e not deleted and must either be reused (e.g. by
|
||||
reparenting it under a different window) or destroyed by caller.
|
||||
|
||||
@param idx The index, or position, of a previously added tool.
|
||||
@return @true if the tool was removed or @false otherwise, e.g. if the
|
||||
provided index is out of range.
|
||||
*/
|
||||
bool DeleteByIndex(int idx);
|
||||
|
||||
size_t GetToolCount() const;
|
||||
int GetToolPos(int tool_id) const;
|
||||
|
Loading…
Reference in New Issue
Block a user