Class TMenuItemToggleFullScreen
Unit
Declaration
type TMenuItemToggleFullScreen = class(TMenuItemChecked)
Description
Menu item that toggles TCastleWindow.FullScreen.
This already has a nice caption, key shortcut (F11 on most platforms, except macOS where it's Command+F11 (on LCL backend) or Ctrl+F11 (on other backends), since the bare F11 is reserved on macOS). And it has a DoClick implementation that takes care of the actual job.
So you can just add it to your menu, and forget about it.
Source: window/castlewindowmenu.inc (line 472).
Hierarchy
- TObject
- TMenuEntry
- TMenuEntryWithCaption
- TMenuItem
- TMenuItemChecked
- TMenuItemToggleFullScreen
Overview
Methods
| Protected | procedure ClearHandles; virtual; |
| Public | procedure MenuUpdateBegin; |
| Public | procedure MenuUpdateEnd; |
| Public | constructor Create(const ACaption: String); |
| Public | function KeyToString(out S: string): boolean; |
| Public | function KeyMatches(const AKey: TKey; const AKeyString: String; const AModifiers: TModifierKeys): boolean; |
| Public | function CaptionWithKey: string; |
| Public | constructor Create(const ACaption: String; AIntData: Integer); overload; |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AKeyString: String); overload; |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AKey: TKey); overload; |
| Public | destructor Destroy; override; |
| Protected | procedure SetChecked(Value: boolean); virtual; |
| Protected | procedure DoAutoCheckedToggle; virtual; |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AChecked, AAutoCheckedToggle: boolean); overload; |
| Public | constructor Create(const ACaption: String; AIntData: Integer; const AKeyString: String; AChecked, AAutoCheckedToggle: boolean); overload; |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AKey: TKey; AChecked, AAutoCheckedToggle: boolean); overload; |
| Public | constructor Create(const InitialFullScreen: boolean); |
| Public | function DoClick: boolean; override; |
Properties
| Public | property ParentMenu: TMenu read FParentMenu; |
| Public | property ParentMenuPosition: Cardinal read FParentMenuPosition; |
| Public | property Caption: String read FCaption write SetCaption; |
| Public | property Enabled: boolean read FEnabled write SetEnabled
default true; |
| Public | property IntData: Integer read FIntData write FIntData; |
| Public | property SmallId: Integer read FSmallId; |
| Public | property KeyString: String read FKeyString write FKeyString; |
| Public | property Key: TKey read FKey write FKey default keyNone; |
| Public | property CharKey: Char read GetCharKey write SetCharKey; deprecated 'use KeyString'; |
| Public | property Modifiers: TModifierKeys read FModifiers write FModifiers; |
| Public | property Checked: boolean read FChecked write SetChecked; |
| Public | property AutoCheckedToggle: boolean read FAutoCheckedToggle
write FAutoCheckedToggle; |
Description
Methods
| Protected | procedure ClearHandles; virtual; |
|
This item is declared in ancestor TMenuEntry. Recursively clear TMenuEntry.Handle values. | |
| Public | procedure MenuUpdateBegin; |
|
This item is declared in ancestor TMenuEntry.
For optimization purposes, you may surround many menu changes inside | |
| Public | procedure MenuUpdateEnd; |
|
This item is declared in ancestor TMenuEntry. This item has no description. | |
| Public | constructor Create(const ACaption: String); |
|
This item is declared in ancestor TMenuEntryWithCaption. This item has no description. | |
| Public | function KeyToString(out S: string): boolean; |
|
This item is declared in ancestor TMenuItem. Returns as S the string that describes key shortcut (KeyString, Key, Modifiers) and then returns true. If KeyString = '' and Key = keyNone then returns false and S is undefined. | |
| Public | function KeyMatches(const AKey: TKey; const AKeyString: String; const AModifiers: TModifierKeys): boolean; |
|
This item is declared in ancestor TMenuItem. This item has no description. | |
| Public | function CaptionWithKey: string; |
|
This item is declared in ancestor TMenuItem. Caption with optional key description (returned by KeyString) appended. | |
| Public | constructor Create(const ACaption: String; AIntData: Integer); overload; |
|
This item is declared in ancestor TMenuItem. This item has no description. | |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AKeyString: String); overload; |
|
This item is declared in ancestor TMenuItem. This item has no description. | |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AKey: TKey); overload; |
|
This item is declared in ancestor TMenuItem. This item has no description. | |
| Public | destructor Destroy; override; |
|
This item is declared in ancestor TMenuItem. This item has no description. | |
| Protected | procedure SetChecked(Value: boolean); virtual; |
|
This item is declared in ancestor TMenuItemChecked. Called when Checked property is assigned. | |
| Protected | procedure DoAutoCheckedToggle; virtual; |
|
This item is declared in ancestor TMenuItemChecked.
Called from DoClick when AutoCheckedToggle is Note that this is overriden ina a "dirty" way (i.e. not calling "inherited") in TMenuItemRadio descendant. | |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AChecked, AAutoCheckedToggle: boolean); overload; |
|
This item is declared in ancestor TMenuItemChecked. This item has no description. | |
| Public | constructor Create(const ACaption: String; AIntData: Integer; const AKeyString: String; AChecked, AAutoCheckedToggle: boolean); overload; |
|
This item is declared in ancestor TMenuItemChecked. This item has no description. | |
| Public | constructor Create(const ACaption: String; AIntData: Integer; AKey: TKey; AChecked, AAutoCheckedToggle: boolean); overload; |
|
This item is declared in ancestor TMenuItemChecked. This item has no description. | |
| Public | constructor Create(const InitialFullScreen: boolean); |
|
This item has no description. | |
| Public | function DoClick: boolean; override; |
|
This item has no description. Showing description inherited from TMenuItemChecked.DoClick.
Overriden to handle AutoCheckedToggle. In this class, | |
Properties
| Public | property ParentMenu: TMenu read FParentMenu; |
|
This item is declared in ancestor TMenuEntry.
This is the parent TMenu that has this item in it's Entries list. | |
| Public | property ParentMenuPosition: Cardinal read FParentMenuPosition; |
|
This item is declared in ancestor TMenuEntry.
Position on ParentMenu. Indexed from 0, so ParentMenu.Entries[ | |
| Public | property Caption: String read FCaption write SetCaption; |
|
This item is declared in ancestor TMenuEntryWithCaption. Caption of this menu entry. Will be shown to user. To indicate that some letter of a caption is a mnemonic for this menu item put '_' (underscore) char before this letter. Depending on CastleWindow-backend-dependent, mnemonics should allow user to easier activate this menu item with keyboard (e.g. Alt+mnemonic to dropdown item in MainMenu). You can put two consecutive underscore chars in Caption to indicate that here Caption should display literally one underscore character. (Convention to mark mnemonics with '_' is just copied from gtk, from gtk_label_new_with_mnemonic. So no, I didn't invent another new convention here.) It is undefined what will happen if you put underscore chars before *two* or more letters in Caption. I.e. you can't define multiple mnemonics for one menu item. I.e. this will not crash your program, but results may be CastleWindow-backend-dependent. Just like in GTK toolkit gtk_label_new_with_mnemonic and gtk_menu_item_new_with_mnemonic. | |
| Public | property Enabled: boolean read FEnabled write SetEnabled
default true; |
|
This item is declared in ancestor TMenuEntryWithCaption. This item has no description. | |
| Public | property IntData: Integer read FIntData write FIntData; |
|
This item is declared in ancestor TMenuItem. An integer value, for any purpose you want. Useful to identify this item in TCastleWindow.OnMenuClick callback. | |
| Public | property SmallId: Integer read FSmallId; |
|
This item is declared in ancestor TMenuItem. Unique small identifier of this menu item. This is initialized at creation of this object, to be unique among all currently existing (created and not destroyed) TMenuItem instances. The intention is that this See also
| |
| Public | property KeyString: String read FKeyString write FKeyString; |
|
This item is declared in ancestor TMenuItem. Key shortcut for this menu item. When user presses indicated Key (if it's not keyNone) or Handling of menu key shortcuts is completely within the CastleWindow (usually, it's even done by the underlying backend like GTK or WinAPI). You will not get EventPress (OnPress) messages for keypresses that translate to menu clicks. Although TCastleWindow.Pressed.Keys will be still appropriately updated. Note that Caption of this object should not contain description of Key or You should use at most one of these properties, not both. So either use Key or The
The TODO: for now, this must be assigned before adding this menu item to parent (actually, before the parent menu is added to window MainMenu) to work reliably. Don't change this property afterwards. Usually, you will set this property by an argument to the constructor. | |
| Public | property Key: TKey read FKey write FKey default keyNone; |
|
This item is declared in ancestor TMenuItem. This item has no description. | |
| Public | property CharKey: Char read GetCharKey write SetCharKey; deprecated 'use KeyString'; |
|
This item is declared in ancestor TMenuItem. Warning: this symbol is deprecated: use KeyString This item has no description. | |
| Public | property Modifiers: TModifierKeys read FModifiers write FModifiers; |
|
This item is declared in ancestor TMenuItem. Modifiers (shift, ctrl and such) required to activate this menu item. These have to be pressed along with Key or KeyString. Note that KeyString may already indicate some modifiers, if it's one of the CtrlA ... CtrlZ then the Ctrl key is required and if it's an uppercase letter then the Shift key is required. There's no need to include this modifier in this property then. TODO: for now, this must be assigned before adding this menu item to parent (actually, before the parent menu is added to window MainMenu) to work reliably. Don't change this property afterwards. | |
| Public | property Checked: boolean read FChecked write SetChecked; |
|
This item is declared in ancestor TMenuItemChecked. This item has no description. | |
| Public | property AutoCheckedToggle: boolean read FAutoCheckedToggle
write FAutoCheckedToggle; |
|
This item is declared in ancestor TMenuItemChecked.
If | |
Generated by PasDoc 0.17.0.snapshot.