====== Toolbar Group GUI Class ======
[[https://github.com/LibreCAD/LibreCAD_3/blob/master/lcUI/widgets/guiAPI/toolbargroup.h|Github Link]]
namespace lc::ui::api
----
===== Toolbar Group Constructor =====
----
==== Description ====
Constructs a toolbar group gui object. Group after being constructed needs to be added to a tab for it to be visible in the application. Width is optional, by default width is 3.
* Toolbar Group Name - //string//
* Toolbar Group Name - //string// , Width - //int//
==== Examples ====
* local group1 = gui.ToolbarGroup("Group1")
* local group1 = gui.ToolbarGroup("Group1", 4)
----
===== Add Button =====
----
==== Description ====
Add Toolbar Button to the group of the given **name** and **icon** or by pointer to existing toolbar group. Toolbar button callback can also be passed in.
* Toolbar Button Label - //string// , Icon path - //string//
* returns //ToolbarButton//
* Toolbar Button Label - //string// , Icon path - //string// , Lua Callback - //kaguya::LuaRef//
* returns //ToolbarButton//
* Pointer to Toolbar Button - //ToolbarButton//
==== Examples ====
* local button1 = group1:addButton("Button1", "path_to_icon")
* local button1 = group1:addButton("Button1", "path_to_icon", function() message("Button clicked") end)
* local button1 = gui.ToolbarButton("Button1", "path_to_icon")
group1:addButton(button1)
----
===== Find Button =====
----
==== Description ====
Find toolbar button in group by button label.
* Toolbar Button Label - //string//
* returns //ToolbarButton//
==== Examples ====
* local button1 = group1:buttonByName("Button1")
----
===== Label =====
----
==== Description ====
Get and set label for the toolbar group.
==== Examples ====
* message(group1:label())
* group1:setLabel("New Group")
----
===== Enable and Disable =====
----
==== Description ====
Enable or disable the toolbar group.
==== Examples ====
* group1:enable()
* group1:disable()
----
===== Hide and Show =====
----
==== Description ====
Hide or show the toolbar group.
==== Examples ====
* group1:hide()
* group1:show()
----
===== Remove =====
----
==== Description ====
Remove the current toolbar group from the tab.
==== Examples ====
* group1:remove()
----
===== List of all buttons =====
----
==== Description ====
Return list containing all buttons in the group.
==== Examples ====
* local buttonList = group1:buttons()
----
===== Remove Button =====
----
==== Description ====
Remove button of the given name or by passing in a toolbar button object.
* Toolbar Button object - //ToolbarButton//
* Label of Toolbar Button - //string//
==== Examples ====
* group1:removeButton("Button1")
* group1:removeButton(button1)
----
===== Width =====
----
==== Description ====
Get and set width of the toolbar group. Buttons are rearranged when width is changed.
==== Examples ====
* local w = group1:width()
* group1:setWidth(2)
----