User Tools

Site Tools


Sidebar

Introduction

* Home

Documentation & help

LibreCAD Community

Help on DokuWiki

Temporary shorcuts

dev:v3:gui_api:toolbar:toolbartab

This is an old revision of the document!


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 Toolbar 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) 

Remove Callback


Description

Remove lua function called associated with the given name. Only named callbacks can be removed.

  • Callback name - string

Examples

  •  item1:removeCallback("message_callback") 

Label


Description

Get and set label for the menu item.

Examples

  •  message(item1:label()) 
  •  item1:setLabel("New Label")

Hide and Show


Description

Hide or show the menu item.

Examples

  •  item1:hide() 
  •  item1:show() 

Position


Description

Get the current menu item position or set the menu item position. Other items are rearranged accordingly.

  • New Position - int

Examples

  •  local pos = item1:position() 
  •  item1:setPosition(2) 

Remove


Description

Remove the current menu item from the parent menu.

Examples

  •  item1:remove() 

dev/v3/gui_api/toolbar/toolbartab.1594097954.txt.gz · Last modified: 2020/07/07 04:59 by jedi18