- Construct_Object()
- 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
- IntegerhoMain
- IntegerhoParent
- BooleanbIsMdi
- BooleanIsMDIMenu()
- BooleanbMDI
- HandleClientAreaObject()
returns the ClientArea DF object if this is an MDI style system.
- BooleanbMDI
- IntegerhoClientArea
- 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
- IntegerhoOptions
- IntegerGetComOptionsProperty(Handle hmPrivateProperty Handle hmCOMProperty)
- IntegerhoOptions
- IntegeriValue
- Set(Integer eValue)
these are set in the cCJCommandBars object
- IntegerpeVisualTheme()
- IntegereValue
- Set(Boolean bValue)
- BooleanpbEnableCustomization()
- BooleanbValue
- Set(Integer eValue)
these are set in the cCJCommandBars's Option object
- IntegerpeAnimation()
- IntegereValue
- Set(Boolean bValue)
- BooleanpbAlwaysShowFullMenus()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbShowFullAfterDelay()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbAutoHideUnusedPopups()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbToolBarScreenTips()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbShowPopupBarToolTips()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbToolBarAccelTips()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbShowExpandButtonAlways()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbLargeIcons()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbSyncFloatingToolbars()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbFloatToolbarsByDoubleClick()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbShowTextBelowIcons()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbAltDragCustomization()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbOfficeStyleDisabledIcons()
- BooleanbValue
- Set(Boolean bValue)
- BooleanpbIconsWithShadow()
- BooleanbValue
- Set(Boolean bValue)
- IntegerhoTimer
- BooleanpbTimerUpdate()
- BooleanbValue
- 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.
- 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.
- IntegerhoPrivate
- VariantvCom
- HandleDesignerControlsCollection()
- IntegerhoPrivate
- VariantvCom
- HandleKeyBindingsCollection()
- IntegerhoPrivate
- VariantvCom
- HandleOptionsObject()
- IntegerhoPrivate
- VariantvCom
- 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
- Integer[]hoObjects
- Integer[]hoEmpty
- IntegerhoTimer
- IntegerhoObj
- Integeri
- IntegeriCount
- VariantvTab
- CreateCommandBars()
This sets all of the commandbars properties and the options properties
- IntegerhWND
- IntegerhoClient
- IntegerhoMain
- IntegerhoOptions
- IntegerhoImageManager
- IntegerhoCommandBar
- IntegerhoTimer
- VariantvToolbarObject
- VariantvImageManager
- IntegereVisualTheme
- IntegereAnimation
- IntegeriLast
- BooleanbMDIMEnu
- BooleanbEnableCustomization
- BooleanbAltDragCustomization
- BooleanbLargeIcons
- BooleanbShowTextBelowIcons
- BooleanbAlwaysShowFullMenus
- BooleanbShowFullAfterDelay
- BooleanbToolBarScreenTips
- BooleanbToolBarAccelTips
- BooleanbShowPopupBarToolTips
- BooleanbAutoHideUnusedPopups
- BooleanbOfficeStyleDisabledIcons
- BooleanbFloatToolbarsByDoubleClick
- BooleanbSyncFloatingToolbars
- BooleanbShowExpandButtonAlways
- BooleanbIconsWithShadow
- BooleanbTimer
- Update()
Perform an Update. This can be called manually or via the timer
it send update to the Statusbar and to all active actions
- Integer[]hoActions
- IntegerhoStatusBar
- Integeri
- IntegeriActions
- VariantvAction
- UpdateAllActions()
- Integer[]hoActions
- Integeri
- IntegeriActions
- VariantvAction
- IntegerLastAssignedId()
- Integer[]iActionIdPool
- IntegeriId
- IntegeriCount
- IntegerAssignID()
auto assign an Id. Callend in end_construct_object if needed
- Integer[]iActionIdPool
- IntegeriId
- IntegeriCount
- ReleaseID(Integer iId)
might be needed to maintain a pool of actions
- Integer[]iActionIdPool
- IntegeriCount
- IntegeriIndex
- IntegerAssignBarId()
- IntegeriId
- AddActiveAction(Handle hoAction)
- Integer[]hoActiveActions
- RegisterAction(Handle hoAction)
- BooleanbActive
- Integer[]hoActions
- RemoveActiveAction(Handle hoAction)
remove action from list of active actions.
- Integer[]hoActiveActions
- IntegeriIndex
- Integeri
- IntegeriCount
- RemoveRegisteredAction(Handle hoAction)
remove action from list of registered actions.
- Integer[]hoActiveActions
- BooleanbActive
- IntegeriIndex
- Integeri
- IntegeriCount
- 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
- IntegerhBitmap
- VariantvImageManager
- IntegerhoImageIcons
- IntegeriVoid
- BooleanbOk
- StringsFileImage
- 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
- BooleanbIsIcon
- 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.
- IntegerhoStateOptions
- VariantvStateOptions
- HandleCreatePropExchangeObject()
- IntegerhoPropExchange
- IntegerhoGlobal
- VariantvPropExchange
- VariantvGlobal
- 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
- VariantvSection
- VariantvOptions
- IntegerhoExchangePref
- IntegerhoStatusBar
- IntegerhoStateOptions
- IntegeriLast
- IntegeriLastBar
- IntegeriStatusBarVisible
- IntegeriBuild
- IntegeriIDBuild
- IntegeriIDCount
- IntegeriIDBarCount
- BooleanbLoad
- BooleanbSerializeControls
- 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.
- IntegerhoExchange
- BooleanbOk
- StringsSection
- StringsFullKey
- SaveLayoutToRegistry(Integer eLayout String sKey)
- IntegerhoExchange
- IntegerhoRegistry
- BooleanbOk
- BooleanbExists
- BooleanbVoid
- StringsSection
- StringsFullKey
- StringsShortKey
- BooleanLoadLayoutFromXML(Integer eLayout String sFileName)
- IntegerhoExchange
- StringsSection
- BooleanbOk
- SaveLayoutToXML(Integer eLayout String sFileName)
- IntegerhoExchange
- StringsSection
- BooleanbOk
- 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
- IntegereLayout
- StringsKey
- BooleanbPreserveEnvironment
- 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.
- IntegereLayout
- StringsKey
- BooleanbOk
- BooleanbPreserveEnvironment
- RestoreLayout()
- VariantvToolBarObject
- 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
- IntegeriLeft
- IntegeriTop
- IntegeriRight
- IntegeriBottom
- IntegeriPosition
- IntegerhoBarOnLeft
- 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
- BooleanbOk
- IntegerhoMain
- 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.
- IntegerhoFocus
- BooleanbISDeo
- BooleanbIsControl
- IntegeriFile
- IntegeriField
- ControlsInControl(Integer iId Handle hoControl Variant[] ByRef ArrayOfvControls)
Find all controls within this control with the passed Id.
- VariantvCommandBar
- IntegerhoCommandBar
- IntegereType
- ControlsInCommandBar(Integer iId Handle hoCommandBar Variant[] ByRef ArrayOfvControls)
Find all controls within this commandbar with the passed Id.
- VariantvNewControl
- VariantvNewControls
- IntegerhoNewControl
- IntegerhoNewControls
- IntegeriControls
- Integeri
- IntegeriNewId
- 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.
- Variant[]ArrayOfvControls
- VariantvCommandBar
- IntegeriCommandBars
- Integeri
- IntegerhoCommandBar
- 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.
- IntegerhoControl
- IntegerhoAction
- IntegerhoItem
- VariantvAction
- VariantvControl
- Integeri
- IntegeriCount
- OnCreate()
make this private. Use OnCreateCommandBars for custom event
- OnCreateCommandBars()
- OnRelease()
- OnUpdate()
- OnComExecute(Variant llControl)
- IntegerhoControl
- IntegerhoAction
- IntegerhoActionPointer
- VariantvAction
- 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.
- OnComControlSelected(Variant llControl)
- IntegerhoControl
- IntegerhoAction
- IntegerhoActionPointer
- VariantvAction
- OnUnhandledControlSelected(Variant llControl)
- OnComInitCommandsPopup(Variant llCommandBar)
- IntegerhoCommandBar
- IntegerhoAction
- IntegerhoActionPointer
- IntegerhoCommandBarControl
- IntegerhoCommandBarControls
- VariantvAction
- VariantvCommandBarControl
- VariantvCommandBarControls
- IntegereType
- OnUnhandledInitCommandsPopup(Variant llCommandBar)
- OnComCustomization(Variant vCustomizeOptions)
- IntegerhoCustomize
- BooleanbShowKeyboardPage
- BooleanbShowOptionsPage