Lide Framework
latest

Getting started

  • Welcome
  • Framework Documentation
  • Installation
  • How to use it

Lua Language

  • Types

Lua Object Oriented

  • Objects and Classes on Lua
  • Encapsulation and access modifiers

API Reference

  • lide.class
  • lide.platform
  • lide.error
  • lide.widgets
    • Timer
    • Font
    • Item
    • Store
    • Object
    • Event
    • Menu
      • Constructor
        • Arguments
      • Events
      • Inherited Methods
      • Class Methods
        • Menu:getText
        • Menu:addSeparator
        • Menu:addItem
        • Menu:setEnabled
    • Widget
    • Window
    • Form
    • Dialog
    • Panel
    • Toolbar
    • Control
    • Button
    • Label
    • Image
    • Listbox
    • Calendar
    • Textbox
    • Combobox
    • Progress
    • Grid
    • Tree
    • Checkbox
  • lide.file
  • lide.folder

LIDE LIBRARIES

  • lide.http
  • lide.sql
Lide Framework
  • Docs »
  • lide.widgets »
  • Menu
  • Edit on GitHub

Menu¶

Note

Menu is derived from Object class.

A menu is a popup (or pull down) list of items, one of which may be selected before the menu goes away (clicking elsewhere dismisses the menu).

Menus may be used to construct either menu bars or popup menus.


Constructor¶

Menu class has a single constructor:

object Menu:new {
    number ID, string Name,

    number Style, number Text,
}

Arguments¶

These arguments are received by class constructor.

Argument Description
Name The Menu name
Text The Menu text
Style Menu Style
ID Menu’s identificator

Events¶

The following events are emitted by this class:

Event name Description
Menu.onEnter_ When the mouse moves onto this Menu.
Menu.onLeave_ When the mouse moves out to this Menu.

Inherited Methods¶

These methods are inherited from its super classes:

Class Method Description
Object:getID Returns Menu’s identifier.
Object:setID Sets the Menu identifier.
Object:getName Returns Menu’s name.
Object:setName Sets the Menu name.

Class Methods¶

These methods are defined by this class.


Menu:getText¶

Returns the menu text.
object_ Menu:getText()

Menu:addSeparator¶

Adds a separator to the end of the menu.
number Menu:addSeparator()

Menu:addItem¶

Adds a menu item.
bool Menu:addItem( string sText, number nID, string sHelpStr, string sShortcut)

Menu:setEnabled¶

Enables or disables (greys out) a menu item.
number Menu:setEnabled( number nID, bool bEnable )

Next Previous

© Copyright 2018, Dario Cano Revision b479090e.

Built with Sphinx using a theme provided by Read the Docs.