Class: cCJCommandBarSystem

Module location: cCJCommandBarSystem.pkg line 99 (view source)

Class Hierarchy:

DFCOMACTIVEXCONTROLcComActiveXControlcCJCommandBarscCJCommandBarSystem

Direct Known Subclasses:

cSigCJCommandBarSystem,

Class Definition

Properties

BooleanpbCustomizeShowKeyboardPage
BooleanpbCustomizeShowOptionsPage
BooleanpbMDIMenu
if true this expects client area and a panel. Auto assigned
BooleanpbPrivateAltDragCustomization
BooleanpbPrivateAlwaysShowFullMenus
BooleanpbPrivateAutoHideUnusedPopups
BooleanpbPrivateEnableCustomization
BooleanpbPrivateFloatToolbarsByDoubleClick
BooleanpbPrivateIconsWithShadow
BooleanpbPrivateLargeIcons
BooleanpbPrivateOfficeStyleDisabledIcons
BooleanpbPrivateShowExpandButtonAlways
BooleanpbPrivateShowFullAfterDelay
BooleanpbPrivateShowPopupBarToolTips
BooleanpbPrivateShowTextBelowIcons
BooleanpbPrivateSyncFloatingToolbars
BooleanpbPrivateTimerUpdate
BooleanpbPrivateToolBarAccelTips
BooleanpbPrivateToolBarScreenTips
IntegerpePrivateAnimation
IntegerpePrivateVisualTheme
IntegerpeRestoreLayout
do we save/restore command bars and if so how
Handle[]phoActiveUpdates
array of actions that should actively updated via timer refresh
HandlephoPrivateActions
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
HandlephoPrivateDesignerControls
HandlephoPrivateKeyBindings
HandlephoPrivateOptions
Handle[]phoRegisteredActions
array of all registered actions (i.e., actions that have a DF object and are COM instanciated)
HandlephoStatusBar
assigned automatically
HandlephoTimer
Integer[]piActionIdPool
array of action IDs that can be reused. We do this because we cannot destroy actions
IntegerpiLastAssignedDesignTimeBarID
IntegerpiLastAssignedDesignTimeID
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.
IntegerpiLastBarId
last auto assigned BarId
IntegerpiLastImageId
last auto assigned image ID
IntegerpiLayoutBuild
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
StringpsLayoutSection
Name used to save a store commandbars. Can be changed to create custom setups.

Functions and Procedures

HandleActionsCollection()
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)
IntegerAddImage(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
IntegerAddImageType(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
IntegerAssignBarId()
IntegerAssignID()
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
HandleClientAreaObject()
returns the ClientArea DF object if this is an MDI style system.
HandleCommandBarSystemObject()
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()
Inherited from cCJCommandBars
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
HandleCreatePropExchangeObject()
HandleCreateStateOptions(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.
BooleanDEOInformation(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.
HandleDesignerControlsCollection()
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.
IntegerGetComOptionsProperty(Handle hmPrivateProperty Handle hmCOMProperty)
BooleanIs_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
BooleanIsMDIMenu()
HandleKeyBindingsCollection()
IntegerLastAssignedId()
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.
BooleanLoadLayoutFromRegistry(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.
BooleanLoadLayoutFromXML(Integer eLayout String sFileName)
OnComControlSelected(Variant llControl)
Inherited from cCJ_DCommandBarsEvents
OnComCustomization(Variant vCustomizeOptions)
Inherited from cCJ_DCommandBarsEvents
OnComExecute(Variant llControl)
Inherited from cCJ_DCommandBarsEvents
OnComInitCommandsPopup(Variant llCommandBar)
Inherited from cCJ_DCommandBarsEvents
OnCreate()
Inherited from cComActiveXControl
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()
HandleOptionsObject()
BooleanpbAltDragCustomization()
BooleanpbAlwaysShowFullMenus()
BooleanpbAutoHideUnusedPopups()
BooleanpbEnableCustomization()
BooleanpbFloatToolbarsByDoubleClick()
BooleanpbIconsWithShadow()
BooleanpbLargeIcons()
BooleanpbOfficeStyleDisabledIcons()
BooleanpbShowExpandButtonAlways()
BooleanpbShowFullAfterDelay()
BooleanpbShowPopupBarToolTips()
BooleanpbShowTextBelowIcons()
BooleanpbSyncFloatingToolbars()
BooleanpbTimerUpdate()
BooleanpbToolBarAccelTips()
BooleanpbToolBarScreenTips()
IntegerpeAnimation()
IntegerpeVisualTheme()
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)
Inherited from cCJ_DCommandBars
these are set in the cCJCommandBars object
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Integer eValue)
Inherited from cCJ_DCommandBars
these are set in the cCJCommandBars's Option object
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
Set(Boolean bValue)
Inherited from cCJ_DCommandBars
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):

ModuleContaining SymbolLine
cSigCJCommandBarSystem.pkgcSigCJCommandBarSystem41