Class Hierarchy:
DFCOMACTIVEXCONTROL

cComActiveXControl


cCJCommandBars



cCJCommandBarSystemClass Definition
Properties
Boolean
pbCustomizeShowKeyboardPage
 Boolean
pbCustomizeShowOptionsPage
 Boolean
pbMDIMenu
if true this expects client area and a panel. Auto assigned
 Boolean
pbPrivateAltDragCustomization
 Boolean
pbPrivateAlwaysShowFullMenus
 Boolean
pbPrivateAutoHideUnusedPopups
 Boolean
pbPrivateEnableCustomization
 Boolean
pbPrivateFloatToolbarsByDoubleClick
 Boolean
pbPrivateIconsWithShadow
 Boolean
pbPrivateLargeIcons
 Boolean
pbPrivateOfficeStyleDisabledIcons
 Boolean
pbPrivateShowExpandButtonAlways
 Boolean
pbPrivateShowFullAfterDelay
 Boolean
pbPrivateShowPopupBarToolTips
 Boolean
pbPrivateShowTextBelowIcons
 Boolean
pbPrivateSyncFloatingToolbars
 Boolean
pbPrivateTimerUpdate
 Boolean
pbPrivateToolBarAccelTips
 Boolean
pbPrivateToolBarScreenTips
 Integer
pePrivateAnimation
 Integer
pePrivateVisualTheme
 Integer
peRestoreLayout
do we save/restore command bars and if so how
 Handle[]
phoActiveUpdates
array of actions that should actively updated via timer refresh
 Handle
phoPrivateActions
these will not be exposed.
Property Boolean pbShowIconsShadow // ????
Property Boolean pbGenerateDisabledcIcons  // ????
Property Boolean pbUseFadedIcons
Property Integer piExpandDelay
Property Integer piExplandHoverDelay
Property Integer peShowKbdCues
Property Integer peUseKbdCues
Property Integer piMaxPopupWidth
Property Integer piIconsSize // folded??
Property Integer piLargeIconSize
Property Integer piPopupIconSize
 Handle
phoPrivateDesignerControls
 Handle
phoPrivateKeyBindings
 Handle
phoPrivateOptions
 Handle[]
phoRegisteredActions
array of all registered actions (i.e., actions that have a DF object and are COM instanciated)
 Handle
phoStatusBar
assigned automatically
 Handle
phoTimer
 Integer[]
piActionIdPool
array of action IDs that can be reused. We do this because we cannot destroy actions
 Integer
piLastAssignedDesignTimeBarID
 Integer
piLastAssignedDesignTimeID
used to determine of Load should occur. When the count changes in the
the action IDs or barIds it is not safe to reload things.
 Integer
piLastBarId
last auto assigned BarId
 Integer
piLastImageId
last auto assigned image ID
 Integer
piLayoutBuild
This allows developers to control when a load layout should not be used
because it is out of date. Just keep incrementing this value when you change
something that is not compatible
 String
psLayoutSection
Name used to save a store commandbars. Can be changed to create
custom setups.
 Functions and Procedures
Handle
ActionsCollection()
			
these are here to make life easier. These return a df-object attached to
the following collecions and child objects. These are used enough that
an easy access to them was provided.
 
AddActiveAction(Handle hoAction)
			
Integer
AddImage(String sImage Integer iId Integer eImageType)
			
Adds an image to imagelist.
We assume that this is an icon unless the .bmp extension is passed.
return True if success
 Integer
AddImageType(Boolean bIsIcon String sImage Integer iId Integer eImageType)
			
Adds an image to imagelist. Pass if bmp or icon, the image name and the Id and image type (normal, disabled, etc.)
With Bitmaps this will first look for the resource then search for the file in the file path.
With Icons it checks for the file first (explained below)
return Image Id if success
 Integer
AssignBarId()
			
 Integer
AssignID()
			
auto assign an Id. Callend in end_construct_object if needed
 
AssignMDIMenu()
			
this will figure out if this is an MDI menu and assign the ghoCommandBars
global variable if needed.
We assume it is MDI if the main_panel_id is commandbars parent and it is MDI style
Handle
ClientAreaObject()
			
returns the ClientArea DF object if this is an MDI style system.
 Handle
CommandBarSystemObject()
			
returns the CommandBars object handle, which is this object. All menu objects
within a command bar will get this via delegation. The exception is context menus (and
children of context menus) which uses the global commandbars variable instead.
 
Construct_Object()
			

ControlsInCommandBar(Integer iId Handle hoCommandBar Variant[] ByRef ArrayOfvControls)
			
Find all controls within this commandbar with the passed Id.

ControlsInControl(Integer iId Handle hoControl Variant[] ByRef ArrayOfvControls)
			
Find all controls within this control with the passed Id.

CreateCommandBars()
			
This sets all of the commandbars properties and the options properties
Handle
CreatePropExchangeObject()
			
 Handle
CreateStateOptions(Integer eLayout)
			
Create a StateOptions object and set it as needed. This is used to save and
load settings. You could augment this to customize as needed.
 Boolean
DEOInformation(Handle ByRef hoServer Boolean ByRef bHasRecord Boolean ByRef bChanged Boolean ByRef bHasIndex)
			
returns information about the Focus object. If it returns True its a DEO. If a DEO the
server, hasRecord, changed and hasindex info will all be returned by ref.
If false, these are all unchanged.
 Handle
DesignerControlsCollection()
			
 
DockNextTo(Variant vBarToDock Variant vBarOnLeft)
			
used to dock a commandbar, on the same row and to the right of another commandbar
used by pbDockNextTo property in toolbars

ExchangeLayout(Handle hoExchange String sSection Integer eLayout)
			
exchange the current commandbar layout with the prop exchange object.
pass the exchange object and the section name to save this under. The exchange
object contains information if this is a save or load (ComLoading).
can be called by any exchange object allowing developers to save a commandbar
structure as part of other information they may be saving and loading
Variant[]
FindControls(Integer iId)
			
Find all controls within the commandbarsystem with the passed Id.
This can be used to search for Ids within a popup menu item. You only need to use
this is there is a chance that there will be more than one control with this id.
 Integer
GetComOptionsProperty(Handle hmPrivateProperty Handle hmCOMProperty)
			
 Boolean
Is_Function(Integer iMsgId Integer hoObjId Boolean bDelegateFg)
			
This only works if this command bar is placed inside of BasicPanel or if the
command bar is in a modal dialog that is placed inside of a Panel
 Boolean
IsMDIMenu()
			
 Handle
KeyBindingsCollection()
			
 Integer
LastAssignedId()
			
 
LoadEnvironment()
			
Standard LoadEnvironment Behavior. This is called when the commandbar system
is created. It will load environment if:
1) application Object exists and pbPreserveEnvironment is true
2) peRestoreLayout is not rlNoSaveRestore
This is good for augmentation if you wish to change the standard load.
Boolean
LoadLayoutFromRegistry(Integer eLayout String sKey)
			
saves and loads commands info to the registry.
While this is private. It provides a good model for how to do this kind of thing.
 Boolean
LoadLayoutFromXML(Integer eLayout String sFileName)
			
 
OnComControlSelected(Variant llControl)
			

OnComCustomization(Variant vCustomizeOptions)
			

OnComExecute(Variant llControl)
			

OnComInitCommandsPopup(Variant llCommandBar)
			

OnCreate()
			
make this private. Use OnCreateCommandBars for custom event

OnCreateCommandBars()
			

OnRelease()
			

OnUnhandledControlSelected(Variant llControl)
			

OnUnhandledExecute(Variant llControl)
			
this happens when the execute control either has no COM action
or it has no DF action object. In such a case, we don't do anything other than
call this method. Note that there may be a valid action but fo rsome reason
the ComAction property did not get properly assigned by CJ. This seems to happen
with the color selector object.

OnUnhandledInitCommandsPopup(Variant llCommandBar)
			

OnUpdate()
			
Handle
OptionsObject()
			
 Boolean
pbAltDragCustomization()
			
 Boolean
pbAlwaysShowFullMenus()
			
 Boolean
pbAutoHideUnusedPopups()
			
 Boolean
pbEnableCustomization()
			
 Boolean
pbFloatToolbarsByDoubleClick()
			
 Boolean
pbIconsWithShadow()
			
 Boolean
pbLargeIcons()
			
 Boolean
pbOfficeStyleDisabledIcons()
			
 Boolean
pbShowExpandButtonAlways()
			
 Boolean
pbShowFullAfterDelay()
			
 Boolean
pbShowPopupBarToolTips()
			
 Boolean
pbShowTextBelowIcons()
			
 Boolean
pbSyncFloatingToolbars()
			
 Boolean
pbTimerUpdate()
			
 Boolean
pbToolBarAccelTips()
			
 Boolean
pbToolBarScreenTips()
			
 Integer
peAnimation()
			
 Integer
peVisualTheme()
			
 
PopupInit(Handle hoCommandBar Handle hoCommandBarControls)
			
this sends update to the action of all of the child menu items. Note these are the children
of visual control, not the children of the action. This is used to enable, disable all
menu items, etc.

RegisterAction(Handle hoAction)
			

ReleaseComObject()
			
when a commandbars is deactivated, this is called.
save layout as needed
release all of the action objects in the various arrays
make sure that all DF objects are released.
One oddity is that at this point the object is deactivated and this causes the
statubar's visibleState to always be false. We correct for this in the statusbar's pbVisible

ReleaseID(Integer iId)
			
might be needed to maintain a pool of actions

RemoveActiveAction(Handle hoAction)
			
remove action from list of active actions.

RemoveRegisteredAction(Handle hoAction)
			
remove action from list of registered actions.

RestoreLayout()
			

SaveEnvironment()
			
Standard SaveEnvironment Behavior. This is called when the commandbar system
is closed. It will save environment if:
1) application Object exists and pbPreserveEnvironment is true
2) peRestoreLayout is not rlNoSaveRestore
This is good for augmentation if you wish to change the standard save

SaveLayoutToRegistry(Integer eLayout String sKey)
			

SaveLayoutToXML(Integer eLayout String sFileName)
			

Set(Integer eValue)
			
these are set in the cCJCommandBars object

Set(Boolean bValue)
			

Set(Integer eValue)
			
these are set in the cCJCommandBars's Option object

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

Set(Boolean bValue)
			

SetComOptionsProperty(Handle hmPrivateProperty Handle hmCOMProperty Integer iValue)
			
Generic Get and Set property that is used to get and set a DF/COM options property.
can be used by any integer or boolean property

Update()
			
Perform an Update. This can be called manually or via the timer
it send update to the Statusbar and to all active actions

UpdateAllActions()
			
References (1):
| Module | Containing Symbol | Line | 
|---|
| Order.src | oCommandBarSystem | 31 |