Class Action
UI action
For using in menus, toolbars, etc.
Inherits from
-
(base class)Object
Constructors
Name | Description |
---|---|
this
|
deep copy constructor |
this
|
create action with id , labelResourceId , and optional icon and key accelerator.
|
this
|
create action only with ID |
this
|
action with accelerator, w/o label
|
this
|
action with label , icon, and accelerator
|
Fields
Name | Type | Description |
---|---|---|
_accelerators
|
Accelerator[] |
accelerator list |
_iconId
|
string |
icon resource id
|
_id
|
int |
numerical id
|
_label
|
UIString |
label to show in UI
|
_longParam
|
long |
optional long parameter |
_objectParam
|
Object |
optional object parameter |
_stringParam
|
string |
optional string parameter |
Properties
Name | Type | Description |
---|---|---|
accelerators
[get]
|
const(Accelerator)[] |
returs const array of accelerators
|
accelerators
[get]
|
Accelerator[] |
returs array of accelerators
|
acceleratorText
[get]
|
dstring |
returns text description for first accelerator of action; null if no accelerators
|
clone
[get]
|
Action |
deep copy |
iconId
[set]
|
Action |
sets icon resource id
|
iconId
[get]
|
string |
returns icon resource id
|
id
[get]
|
int |
returns action id
|
id
[set]
|
Action |
sets action id
|
isSeparator
[get]
|
bool |
returns true if it's dummy action to specify separator |
label
[set]
|
Action |
sets label string resource id
|
label
[set]
|
Action |
sets label unicode string
|
label
[get]
|
dstring |
returns label unicode string (translates if resource id is set)
|
labelValue
[get]
|
const(UIString) |
access to label UIString
|
longParam
[set]
|
Action |
returns optional long parameter |
longParam
[get]
|
long |
sets optional long parameter |
objectParam
[set]
|
Action |
sets additional custom (Object) parameter |
objectParam
[get]
|
Object |
returns additional custom (Object) parameter |
stringParam
[set]
|
Action |
sets optional string parameter |
stringParam
[get]
|
string |
returns optional string parameter |
Methods
Name | Description |
---|---|
addAccelerator
|
adds one more accelerator |
checkAccelerator
|
returns true if accelerator matches provided key code and flags |
toString
|
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0