Class: cCJAction
This creates an action object. It will normally not be directly instanciated but will be used
as the superclass of the cCJMenuItem class.
Class Hierarchy:
DFCOMAUTOMATIONOBJECT

cComAutomationObject


cCJCommandBarAction



cCJActionDirect Known Subclasses:
cCJMenuItem, Class Definition
Properties
Boolean
pbPrivateActiveUpdate
determins if this action should be updated by the timer. You only set this true if
the checked state, enabled state or visible state will be changed by other actions
within the program.
Boolean
pbPrivateChecked
Boolean
pbPrivateEnabled
Boolean
pbPrivateVisible
Integer
piId
normally auto assigned. It can be manually assigned.
Integer
piPrivateIconId
Integer
piPrivateShortCutKey
String
psImage
These are just initial values, if the developer needs to dynamically change
images they should use the ComIconId to select the item they need from the image list
normally only psImage needs to be set
String
psImageChecked
String
psImageDisabled
String
psImageHot
String
psImagePressed
String
psPrivateCaption
String
psPrivateCategory
String
psPrivateDescriptionText
String
psPrivateShortcutText
String
psPrivateTooltipText
Functions and Procedures

BindKey(Integer iExtra Integer iKey)
Integer
ClassForControlType(Integer eType)
Return the class for the passed control type. Good for augmentation

Construct_Object()

CreateComAction()

CreateComInstance()
called during initial activation to set all default actions.
Handle
CreateFirstProxyControl()
use this to find the COM control and return a DF object. You must call this if
you don't already have the control pointer. You should only call this if you know that
there will only be one control attached to the action. Make no assumption about what "First" means. It's
the first one the COM control finds.
Handle
CreateProxyControl(Variant vControl)
Creates a DF object of the proper type and binds it to the COM object.

DeleteAllControlsForAction()
delete all com controls for this action

Destroy()
when a manual destroy is sent we need to do some cleanup.
If an active action, it must be removed from the active action array
All menu controls for this action will be removed, wherever they are within the system
The Action Id will be added back to the pool for reuse. This is needed because the com
action is not destroyed (there is no interface for this).

End_Construct_Object()

Execute(Variant vCommandBarControl)
called when this action is selected. Only send OnExecute if the
action is enabled.
Variant[]
FindAllControls()
find all controls owned by this action anywhere in the commandbar system
returns a variant array. This is only needed if you expect that there will be
multiple hits such as could happen if you allow end user editing.
This was created because there is no COM message to do this. This is pretty low level
(like ComFindControl) and will not be used much.
Variant
FindFirstControl()
find the first control that matches this action's ID. This searches the entire
commandbar system and "first" is just the first one it happens to find.
Boolean
IsChecked()
For augmentation. Return true if the item should be checked
Boolean
IsEnabled()
For augmentation. Return true if the item should be enabled
Boolean
IsVisible()
For augmentation. Return true if the item should be visible

OnCreateAction()
creation of action.

OnExecute(Variant vCommandBarControl)
before this is called IsEnabled is called

OnPopupInit(Variant vCommandBarControl Handle hoCommandBarControls)
before called, self and all items IsEnabled, IsChecked and IsVisible are called

OnSelected(Variant vCommandBarControl)
when hover over

OnUpdate()
Event called to update the action
Integer
pbActiveUpdate()
Boolean
pbChecked()
Boolean
pbEnabled()
Boolean
pbVisible()
Integer
piIconId()
Integer
piShortCutKey()
String
psCaption()
String
psCategory()
String
psDescription()
String
psShortcut()
String
psToolTip()

ReleaseComObject()
if the action is being released we must remove it from the action pool. This is needed for
context menus which whose actions get created and released with each invocation. This will also
happen when an object is destroyed. If the com object is created, destroy will send ReleaseComObject

Set(Boolean bValue)

Set(Boolean bValue)

Set(Boolean bValue)

Set(String sValue)

Set(String sValue)

Set(String sValue)

Set(String sValue)

Set(String sValue)

Set(Integer iExtra Integer iKey)

Set(Boolean bValue)

Set(Integer iValue)
normally this is zero and not changed. When zero the imageId used will be
the statusbarId and this is the ID that is used when the psImage method is used.
Using psImage is preferred as it adds the icon and assigns it to the object.
This can be used to change icons. Note 0=use StatusbarId

Update()
Updates the action. Can be called by timer when active update or
called when a menu pops up
References (1):