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
- Integer
hoMain - Integer
hoParent - Boolean
bIsMdi
- Boolean
IsMDIMenu()
- Boolean
bMDI
- Handle
ClientAreaObject()
returns the ClientArea DF object if this is an MDI style system.
- Boolean
bMDI - Integer
hoClientArea
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
- Integer
hoOptions
- Integer
GetComOptionsProperty(Handle hmPrivateProperty Handle hmCOMProperty)
- Integer
hoOptions - Integer
iValue
Set(Integer eValue)
these are set in the cCJCommandBars object
- Integer
peVisualTheme()
- Integer
eValue
Set(Boolean bValue)
- Boolean
pbEnableCustomization()
- Boolean
bValue
Set(Integer eValue)
these are set in the cCJCommandBars's Option object
- Integer
peAnimation()
- Integer
eValue
Set(Boolean bValue)
- Boolean
pbAlwaysShowFullMenus()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbShowFullAfterDelay()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbAutoHideUnusedPopups()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbToolBarScreenTips()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbShowPopupBarToolTips()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbToolBarAccelTips()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbShowExpandButtonAlways()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbLargeIcons()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbSyncFloatingToolbars()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbFloatToolbarsByDoubleClick()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbShowTextBelowIcons()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbAltDragCustomization()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbOfficeStyleDisabledIcons()
- Boolean
bValue
Set(Boolean bValue)
- Boolean
pbIconsWithShadow()
- Boolean
bValue
Set(Boolean bValue)
- Integer
hoTimer
- Boolean
pbTimerUpdate()
- Boolean
bValue
- 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.
- 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.
- Integer
hoPrivate - Variant
vCom
- Handle
DesignerControlsCollection()
- Integer
hoPrivate - Variant
vCom
- Handle
KeyBindingsCollection()
- Integer
hoPrivate - Variant
vCom
- Handle
OptionsObject()
- Integer
hoPrivate - Variant
vCom
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 - Integer
hoTimer - Integer
hoObj - Integer
i - Integer
iCount - Variant
vTab
CreateCommandBars()
This sets all of the commandbars properties and the options properties
- Integer
hWND - Integer
hoClient - Integer
hoMain - Integer
hoOptions - Integer
hoImageManager - Integer
hoCommandBar - Integer
hoTimer - Variant
vToolbarObject - Variant
vImageManager - Integer
eVisualTheme - Integer
eAnimation - Integer
iLast - Boolean
bMDIMEnu - Boolean
bEnableCustomization - Boolean
bAltDragCustomization - Boolean
bLargeIcons - Boolean
bShowTextBelowIcons - Boolean
bAlwaysShowFullMenus - Boolean
bShowFullAfterDelay - Boolean
bToolBarScreenTips - Boolean
bToolBarAccelTips - Boolean
bShowPopupBarToolTips - Boolean
bAutoHideUnusedPopups - Boolean
bOfficeStyleDisabledIcons - Boolean
bFloatToolbarsByDoubleClick - Boolean
bSyncFloatingToolbars - Boolean
bShowExpandButtonAlways - Boolean
bIconsWithShadow - Boolean
bTimer
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 - Integer
hoStatusBar - Integer
i - Integer
iActions - Variant
vAction
UpdateAllActions()
- Integer[]
hoActions - Integer
i - Integer
iActions - Variant
vAction
- Integer
LastAssignedId()
- Integer[]
iActionIdPool - Integer
iId - Integer
iCount
- Integer
AssignID()
auto assign an Id. Callend in end_construct_object if needed
- Integer[]
iActionIdPool - Integer
iId - Integer
iCount
ReleaseID(Integer iId)
might be needed to maintain a pool of actions
- Integer[]
iActionIdPool - Integer
iCount - Integer
iIndex
- Integer
AssignBarId()
- Integer
iId
AddActiveAction(Handle hoAction)
- Integer[]
hoActiveActions
RegisterAction(Handle hoAction)
- Boolean
bActive - Integer[]
hoActions
RemoveActiveAction(Handle hoAction)
remove action from list of active actions.
- Integer[]
hoActiveActions - Integer
iIndex - Integer
i - Integer
iCount
RemoveRegisteredAction(Handle hoAction)
remove action from list of registered actions.
- Integer[]
hoActiveActions - Boolean
bActive - Integer
iIndex - Integer
i - Integer
iCount
- 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
hBitmap - Variant
vImageManager - Integer
hoImageIcons - Integer
iVoid - Boolean
bOk - String
sFileImage
- 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
- Boolean
bIsIcon
- 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.
- Integer
hoStateOptions - Variant
vStateOptions
- Handle
CreatePropExchangeObject()
- Integer
hoPropExchange - Integer
hoGlobal - Variant
vPropExchange - Variant
vGlobal
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
vSection - Variant
vOptions - Integer
hoExchangePref - Integer
hoStatusBar - Integer
hoStateOptions - Integer
iLast - Integer
iLastBar - Integer
iStatusBarVisible - Integer
iBuild - Integer
iIDBuild - Integer
iIDCount - Integer
iIDBarCount - Boolean
bLoad - Boolean
bSerializeControls
- 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.
- Integer
hoExchange - Boolean
bOk - String
sSection - String
sFullKey
SaveLayoutToRegistry(Integer eLayout String sKey)
- Integer
hoExchange - Integer
hoRegistry - Boolean
bOk - Boolean
bExists - Boolean
bVoid - String
sSection - String
sFullKey - String
sShortKey
- Boolean
LoadLayoutFromXML(Integer eLayout String sFileName)
- Integer
hoExchange - String
sSection - Boolean
bOk
SaveLayoutToXML(Integer eLayout String sFileName)
- Integer
hoExchange - String
sSection - Boolean
bOk
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
- Integer
eLayout - String
sKey - Boolean
bPreserveEnvironment
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.
- Integer
eLayout - String
sKey - Boolean
bOk - Boolean
bPreserveEnvironment
RestoreLayout()
- Variant
vToolBarObject
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
- Integer
iLeft - Integer
iTop - Integer
iRight - Integer
iBottom - Integer
iPosition - Integer
hoBarOnLeft
- 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
bOk - Integer
hoMain
- 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.
- Integer
hoFocus - Boolean
bISDeo - Boolean
bIsControl - Integer
iFile - Integer
iField
ControlsInControl(Integer iId Handle hoControl Variant[] ByRef ArrayOfvControls)
Find all controls within this control with the passed Id.
- Variant
vCommandBar - Integer
hoCommandBar - Integer
eType
ControlsInCommandBar(Integer iId Handle hoCommandBar Variant[] ByRef ArrayOfvControls)
Find all controls within this commandbar with the passed Id.
- Variant
vNewControl - Variant
vNewControls - Integer
hoNewControl - Integer
hoNewControls - Integer
iControls - Integer
i - Integer
iNewId
- 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 - Variant
vCommandBar - Integer
iCommandBars - Integer
i - Integer
hoCommandBar
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.
- Integer
hoControl - Integer
hoAction - Integer
hoItem - Variant
vAction - Variant
vControl - Integer
i - Integer
iCount
OnCreate()
make this private. Use OnCreateCommandBars for custom event
OnCreateCommandBars()
OnRelease()
OnUpdate()
OnComExecute(Variant llControl)
- Integer
hoControl - Integer
hoAction - Integer
hoActionPointer - Variant
vAction
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)
- Integer
hoControl - Integer
hoAction - Integer
hoActionPointer - Variant
vAction
OnUnhandledControlSelected(Variant llControl)
OnComInitCommandsPopup(Variant llCommandBar)
- Integer
hoCommandBar - Integer
hoAction - Integer
hoActionPointer - Integer
hoCommandBarControl - Integer
hoCommandBarControls - Variant
vAction - Variant
vCommandBarControl - Variant
vCommandBarControls - Integer
eType
OnUnhandledInitCommandsPopup(Variant llCommandBar)
OnComCustomization(Variant vCustomizeOptions)
- Integer
hoCustomize - Boolean
bShowKeyboardPage - Boolean
bShowOptionsPage