TSdlTrayMenu
A menu/submenu on a system tray object.
Definition
Unit: Neslib.Sdl3.Additional
Properties
Name | Description |
---|---|
Entries | A list of entries in the menu, in order. |
Parent | The tray for which this menu is the first-level menu, if the current menu isn't a submenu. |
ParentEntry | The entry for which this menu is a submenu, if the current menu is a submenu. |
Operators
Name | Description |
---|---|
Equal(TSdlTrayMenu, TSdlTrayMenu) | Used to compare against another TSdlTrayMenu. |
Equal(TSdlTrayMenu, Pointer) | Used to compare against nil . |
Implicit | Used to set the value to nil . |
NotEqual(TSdlTrayMenu, TSdlTrayMenu) | Used to compare against another TSdlTrayMenu. |
NotEqual(TSdlTrayMenu, Pointer) | Used to compare against nil . |
Methods
Name | Description |
---|---|
Insert | Insert a tray entry at a given position. |
Property Descriptions
Entries
A list of entries in the menu, in order.
property Entries: TArray<TSdlTrayEntry> read GetEntries
Type: TArray<TSdlTrayEntry>
See Also
Remarks
This property should be used on the thread that created the tray.
Parent
The tray for which this menu is the first-level menu, if the current menu isn't a submenu.
Either this property or ParentEntry will return non-nil for any given menu.
property Parent: TSdlTray read GetParent
Type: TSdlTray
See Also
Remarks
This property should be used on the thread that created the tray.
ParentEntry
The entry for which this menu is a submenu, if the current menu is a submenu.
Either this property or Parent will return non-nil for any given menu.
property ParentEntry: TSdlTrayEntry read GetParentEntry
Type: TSdlTrayEntry
See Also
Remarks
This property should be used on the thread that created the tray.
Operator Descriptions
Equal(TSdlTrayMenu, TSdlTrayMenu)
Used to compare against another TSdlTrayMenu.
class operator Equal(const ALeft, ARight: TSdlTrayMenu): Boolean; inline; static
Parameters
ALeft
: TSdlTrayMenu
ARight
: TSdlTrayMenu
Returns
Boolean
Equal(TSdlTrayMenu, Pointer)
Used to compare against nil
.
class operator Equal(const ALeft: TSdlTrayMenu; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlTrayMenu
ARight
: Pointer
Returns
Boolean
Implicit(Pointer)
Used to set the value to nil
.
class operator Implicit(const AValue: Pointer): TSdlTrayMenu; inline; static
Parameters
AValue
: Pointer
Returns
NotEqual(TSdlTrayMenu, TSdlTrayMenu)
Used to compare against another TSdlTrayMenu.
class operator NotEqual(const ALeft, ARight: TSdlTrayMenu): Boolean; inline; static
Parameters
ALeft
: TSdlTrayMenu
ARight
: TSdlTrayMenu
Returns
Boolean
NotEqual(TSdlTrayMenu, Pointer)
Used to compare against nil
.
class operator NotEqual(const ALeft: TSdlTrayMenu; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlTrayMenu
ARight
: Pointer
Returns
Boolean
Method Descriptions
Insert(Integer, String, TSdlTrayEntryFlags)
Insert a tray entry at a given position.
If ACaption is empty, the entry will be a separator. Many functions won't work for an entry that is a separator.
An entry does not need to be destroyed; it will be destroyed with the tray.
function Insert(const APos: Integer; const ACaption: String; const AFlags: TSdlTrayEntryFlags): TSdlTrayEntry; inline
Exceptions
ESdlError
: Raised on failure (e.g. when APos is out of bounds).
Parameters
APos
: Integer
: The desired position for the new entry. Entries at or following this place will be moved. If APos is -1, the entry is appended.
ACaption
: String
: The text to be displayed on the entry, or empty for a separator.
AFlags
: TSdlTrayEntryFlags
: A combination of flags, some of which are mandatory.
Returns
TSdlTrayEntry
: The newly created entry.
See Also
Remarks
This method should be called on the thread that created the tray.