#plugins.core.menu.manager.section

Controls sections for the CommandPost menu.


#API Overview

Constants - Useful values which cannot be changed

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Constants

Signatureplugins.core.menu.manager.section.DEFAULT_PRIORITY -> number
TypeConstant
DescriptionThe default priority
NotesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 12

Signatureplugins.core.menu.manager.section.SECTION_DISABLED_PREFERENCES_KEY_PREFIX -> string
TypeConstant
DescriptionThe preferences key prefix for a disabled section.
NotesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 17

#Methods

Signatureplugins.core.menu.manager.section:addApplicationHeading(title) -> section
TypeMethod
DescriptionAdds a heading to the top of the section.
Parameters
  • title - The title of the Application Heading.
Returns
  • section - The new section that was created.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 172

Signatureplugins.core.menu.manager.section:addHeading(title) -> section
TypeMethod
DescriptionAdds a heading to the top of a section.
Parameters
  • title - The title of the heading.
Returns
  • section - The new section that was created.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 148

Signatureplugins.core.menu.manager.section:addItem(priority, itemFn) -> section
TypeMethod
DescriptionRegisters a function which will generate a single table item.
Parameters
  • priority - The priority of the item within the section. Lower numbers appear first.
  • itemFn - A function which will return a table representing a single menu item. See hs.menubar for details.
Returns
  • section - The section the item was added to.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 110

Signatureplugins.core.menu.manager.section:addItems(priority, itemsFn) -> section
TypeMethod
DescriptionRegisters a function which will generate multiple table items.
Parameters
  • priority - The priority of the items within the section. Lower numbers appear first.
  • itemsFn - A function which will return a table containing multiple table items. See hs.menubar for details.
Returns
  • section - The section the item was added to.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 129

Signatureplugins.core.menu.manager.section:addMenu(priority, titleFn) -> section
TypeMethod
DescriptionAdds a new sub-menu with the specified priority. The section that will contain the items in the menu is returned.
Parameters
  • priority - The priority of the item within the section. Lower numbers appear first.
  • titleFn - The function which will return the menu title.
Returns
  • section - The new section that was created.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 223

Signatureplugins.core.menu.manager.section:addSection(priority) -> section
TypeMethod
DescriptionAdds a new sub-section with the specified priority. The new sub-section is returned.
Parameters
  • priority - The priority of the item within the section. Lower numbers appear first.
Returns
  • section - The new section that was created.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 244

Signatureplugins.core.menu.manager.section:addSeparator(priority) -> section
TypeMethod
DescriptionAdds a new seperator with specified priority.
Parameters
  • priority - The priority of the items within the section. Lower numbers appear first.
Returns
  • section - The new section that was created.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 208

Signatureplugins.core.menu.manager.section:generateTable() -> table
TypeMethod
DescriptionGenerates a new menu table based on the registered items and sections inside this section.
Parameters
  • None
Returns
  • table - The menu table for this section. See hs.menubar for details on the format.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 263

Signatureplugins.core.menu.manager.section:getDisabledPreferenceKey() -> string
TypeMethod
DescriptionGets the disabled preferences key.
Parameters
  • None
Returns
  • true if the section has a disabled preferences key defined, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 69

Signatureplugins.core.menu.manager.section:isApplicationHeading() -> boolean
TypeMethod
DescriptionDoes this section contain an application heading?
Parameters
  • None
Returns
  • true if it does contain an application heading, otherwise false.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 195

Signatureplugins.core.menu.manager.section:isDisabled() -> boolean
TypeMethod
DescriptionGets the disabled status
Parameters
  • None
Returns
  • true if the section is disabled, otherwise false
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 82

Signatureplugins.core.menu.manager.section:new() -> section
TypeMethod
DescriptionCreates a new menu section, which can have items and sub-menus added to it.
Parameters
  • None
Returns
  • section - The section that was created.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 22

Signatureplugins.core.menu.manager.section:setDisabledFn(disabledFn) -> self
TypeMethod
DescriptionSets the Disabled Function
Parameters
  • disabledFn - The disabled function.
Returns
  • Self
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 55

Signatureplugins.core.menu.manager.section:setDisabledPreferenceKey(key) -> self
TypeMethod
DescriptionSets the Disabled Preferences Key.
Parameters
  • key - A string which contains the unique preferences key.
Returns
  • Self
NotesNone
ExamplesNone
Sourcesrc/plugins/core/menu/manager/section.lua line 41