User Tools

Site Tools


Sidebar

Introduction

* Home

Documentation & help

LibreCAD Community

Help on DokuWiki

Temporary shorcuts

dev:v3:gui_api:toolbar:toolbartab

Toolbar Tab GUI Class

Github Link

 namespace lc::ui::api 

Toolbar Tab Constructor


Description

Constructs a toolbar tab gui object. Tab after being constructed needs to be added to the toolbar for it to be visible in the application.

  • Toolbar Tab Name - string

Examples

  •  local tab1 = gui.ToolbarTab("Tab1")

Add Group


Description

Add Toolbar Group to the tab of the given name and width or by pointer to existing toolbar group. Width is optional and is by default 3 cols long.

  • Toolbar Group Label - string , Width - int (Number of Columns)
    • returns ToolbarGroup
  • Pointer to Toolbar Group - ToolbarGroup

Examples

  •  local group1 = tab1:addGroup("Group1") 
  •  local group2 = tab1:addGroup("Group2", 4) 
  •  local group1 = gui.ToolbarGroup("Group3")
     tab1:addGroup(group1) 

Find Group


Description

Find toolbar group in tab by group label.

  • Toolbar Group Label - string
    • returns ToolbarGroup

Examples

  •  local group1 = tab1:groupByName("Group1") 

Label


Description

Get and set label for the toolbar tab.

Examples

  •  message(tab1:label()) 
  •  tab1:setLabel("New Tab")

Enable and Disable


Description

Enable or disable the toolbar tab.

Examples

  •  tab1:enable() 
  •  tab1:disable() 

Remove


Description

Remove the current toolbat tab from the toolbar.

Examples

  •  tab1:remove() 

Add Button


Description

Add Toolbar Button to the tab by passing in Toolbar Button object and name of group to add button to.

  • Pointer to Toolbar Button - ToolbarButton , Toolbar Group Name - string

Examples

  •  tab1:addButton(button1, "Modify") 

Get Group


Description

Get Toolbar Group by name from the tab.

  • Toolbar Group Label - string
    • returns ToolbarGroup

Examples

  •  local group1 = tab1:groupByName("Group1") 

List of all groups


Description

Return list containing all groups in the tab.

Examples

  •  local groupsList = tab1:groups() 

Find Button


Description

Find toolbar button in the group of the given name in the tab.

  • Toolbar Group object - ToolbarGroup , Toolbar Button Label - string
    • returns ToolbarButton

Examples

  •  local button1 = tab1:buttonByName("Button1", group1) 

Remove Group


Description

Remove group of the given name or by passing in a toolbar group object.

  • Toolbar Group object - ToolbarGroup
  • Label of Toolbar Group - string

Examples

  •  tab1:removeGroup("Group1") 
  •  tab1:removeGroup(group1) 

dev/v3/gui_api/toolbar/toolbartab.txt · Last modified: 2020/07/07 08:29 by jedi18