Action
Overview
The Action class is used to store action item inside Hydra plugins.
Use Case
Hydra allows plugins to define a list of actions in the plugins action lists (ActionList) and then host application can access these actions and control their execution.
var act = new Action("actSave", "Save File", 0);
act.Execute += (s, e) => MyDocument.Save();
this.Actions.Add(act);
Location
- Reference: RemObjects.Hydra.dll
- Namespace: RemObjects.Hydra.Actions
- Ancestry: Component | Action
constructor
Creates a new instance of the class.
constructor
Action()
init()
Sub New()
constructor (String, String, Int32)
constructor(aName: String; aCaption: String; aImageIndex: Int32)
Action(String aName, String aCaption, Int32 aImageIndex)
init(_ aName: String, _ aCaption: String, _ aImageIndex: Int32)
Sub New(aName As String, aCaption As String, aImageIndex As Int32)
Parameters:
- aName:
- aCaption:
- aImageIndex:
constructor (String, String, Int32, EventHandler)
constructor(aName: String; aCaption: String; aImageIndex: Int32; aCallback: EventHandler)
Action(String aName, String aCaption, Int32 aImageIndex, EventHandler aCallback)
init(_ aName: String, _ aCaption: String, _ aImageIndex: Int32, _ aCallback: EventHandler)
Sub New(aName As String, aCaption As String, aImageIndex As Int32, aCallback As EventHandler)
Parameters:
- aName:
- aCaption:
- aImageIndex:
- aCallback:
Assign
method Assign(source: Object)
void Assign(Object source)
func Assign(_ source: Object)
Sub Assign(source As Object)
Parameters:
- source:
Caption
Gets or sets the text of the caption that is associated with this action.
property Caption: String read write;
String Caption { get; set; }
var Caption: String { get{} set{} }
Property Caption() As String
Checked
Gets or sets value that indicates whether action is displayed with check mark.
[DefaultValue(false)]
property Checked: Boolean read write;
[DefaultValue(false)]
Boolean Checked { get; set; }
@DefaultValue(false)
var Checked: Boolean { get{} set{} }
<DefaultValue(false)>
Property Checked() As Boolean
Enabled
Gets or sets value that indicates whether action is enabled.
[DefaultValue(true)]
property Enabled: Boolean read write;
[DefaultValue(true)]
Boolean Enabled { get; set; }
@DefaultValue(true)
var Enabled: Boolean { get{} set{} }
<DefaultValue(true)>
Property Enabled() As Boolean
Execute
Fired when host executes the action.
event Execute: EventHandler
delegate EventHandler Execute()
__event EventHandler: Execute!
Event Execute As EventHandler
Hint
Gets or sets hint value.
property Hint: String read write;
[DefaultValue(\"\")]
String Hint { get; set; }
@DefaultValue(\"\")
var Hint: String { get{} set{} }
<DefaultValue(\"\")>
Property Hint() As String
ImageIndex
Gets or sets the index of the image that is associated with this action.
[DefaultValue(-1)]
property ImageIndex: Int32 read write;
[DefaultValue(-1)]
Int32 ImageIndex { get; set; }
@DefaultValue(-1)
var ImageIndex: Int32 { get{} set{} }
<DefaultValue(-1)>
Property ImageIndex() As Int32
Name
Gets or sets the name of the action.
property Name: String read write;
String Name { get; set; }
var Name: String { get{} set{} }
Property Name() As String
PerformAction
Executes associated event handler.
method PerformAction
void PerformAction()
func PerformAction()
Sub PerformAction()
RequiredPrivilege
User defined string that holds privilages that is required to use this action.
property RequiredPrivilege: String read write;
[DefaultValue(\"\")]
String RequiredPrivilege { get; set; }
@DefaultValue(\"\")
var RequiredPrivilege: String { get{} set{} }
<DefaultValue(\"\")>
Property RequiredPrivilege() As String
ToString
Returns the caption of the action.
method ToString: String
String ToString()
func ToString() -> String
Function ToString() As String
Update
Fired when host updates the action.
event Update: EventHandler
delegate EventHandler Update()
__event EventHandler: Update!
Event Update As EventHandler
UserData
User defined data.
property UserData: String read write;
[DefaultValue(\"\")]
String UserData { get; set; }
@DefaultValue(\"\")
var UserData: String { get{} set{} }
<DefaultValue(\"\")>
Property UserData() As String
Visible
Gets or sets value that indicates whether action is visible.
[DefaultValue(true)]
property Visible: Boolean read write;
[DefaultValue(true)]
Boolean Visible { get; set; }
@DefaultValue(true)
var Visible: Boolean { get{} set{} }
<DefaultValue(true)>
Property Visible() As Boolean
Caption
Gets or sets the text of the caption that is associated with this action.
property Caption: String read write;
String Caption { get; set; }
var Caption: String { get{} set{} }
Property Caption() As String
Checked
Gets or sets value that indicates whether action is displayed with check mark.
[DefaultValue(false)]
property Checked: Boolean read write;
[DefaultValue(false)]
Boolean Checked { get; set; }
@DefaultValue(false)
var Checked: Boolean { get{} set{} }
<DefaultValue(false)>
Property Checked() As Boolean
Enabled
Gets or sets value that indicates whether action is enabled.
[DefaultValue(true)]
property Enabled: Boolean read write;
[DefaultValue(true)]
Boolean Enabled { get; set; }
@DefaultValue(true)
var Enabled: Boolean { get{} set{} }
<DefaultValue(true)>
Property Enabled() As Boolean
Hint
Gets or sets hint value.
property Hint: String read write;
[DefaultValue(\"\")]
String Hint { get; set; }
@DefaultValue(\"\")
var Hint: String { get{} set{} }
<DefaultValue(\"\")>
Property Hint() As String
ImageIndex
Gets or sets the index of the image that is associated with this action.
[DefaultValue(-1)]
property ImageIndex: Int32 read write;
[DefaultValue(-1)]
Int32 ImageIndex { get; set; }
@DefaultValue(-1)
var ImageIndex: Int32 { get{} set{} }
<DefaultValue(-1)>
Property ImageIndex() As Int32
Name
Gets or sets the name of the action.
property Name: String read write;
String Name { get; set; }
var Name: String { get{} set{} }
Property Name() As String
RequiredPrivilege
User defined string that holds privilages that is required to use this action.
property RequiredPrivilege: String read write;
[DefaultValue(\"\")]
String RequiredPrivilege { get; set; }
@DefaultValue(\"\")
var RequiredPrivilege: String { get{} set{} }
<DefaultValue(\"\")>
Property RequiredPrivilege() As String
UserData
User defined data.
property UserData: String read write;
[DefaultValue(\"\")]
String UserData { get; set; }
@DefaultValue(\"\")
var UserData: String { get{} set{} }
<DefaultValue(\"\")>
Property UserData() As String
Visible
Gets or sets value that indicates whether action is visible.
[DefaultValue(true)]
property Visible: Boolean read write;
[DefaultValue(true)]
Boolean Visible { get; set; }
@DefaultValue(true)
var Visible: Boolean { get{} set{} }
<DefaultValue(true)>
Property Visible() As Boolean
constructor
Creates a new instance of the class.
constructor
Action()
init()
Sub New()
constructor (String, String, Int32)
constructor(aName: String; aCaption: String; aImageIndex: Int32)
Action(String aName, String aCaption, Int32 aImageIndex)
init(_ aName: String, _ aCaption: String, _ aImageIndex: Int32)
Sub New(aName As String, aCaption As String, aImageIndex As Int32)
Parameters:
- aName:
- aCaption:
- aImageIndex:
constructor (String, String, Int32, EventHandler)
constructor(aName: String; aCaption: String; aImageIndex: Int32; aCallback: EventHandler)
Action(String aName, String aCaption, Int32 aImageIndex, EventHandler aCallback)
init(_ aName: String, _ aCaption: String, _ aImageIndex: Int32, _ aCallback: EventHandler)
Sub New(aName As String, aCaption As String, aImageIndex As Int32, aCallback As EventHandler)
Parameters:
- aName:
- aCaption:
- aImageIndex:
- aCallback:
Assign
method Assign(source: Object)
void Assign(Object source)
func Assign(_ source: Object)
Sub Assign(source As Object)
Parameters:
- source:
PerformAction
Executes associated event handler.
method PerformAction
void PerformAction()
func PerformAction()
Sub PerformAction()
ToString
Returns the caption of the action.
method ToString: String
String ToString()
func ToString() -> String
Function ToString() As String
Execute
Fired when host executes the action.
event Execute: EventHandler
delegate EventHandler Execute()
__event EventHandler: Execute!
Event Execute As EventHandler
Update
Fired when host updates the action.
event Update: EventHandler
delegate EventHandler Update()
__event EventHandler: Update!
Event Update As EventHandler