// TH3ToolsMenu.mn Use cCJCommandBarSystem.pkg Use THCustomMenu.pkg Register_Procedure DoInsertWorkspaceHeader Class cCJHeaderMenuItem is a cCJMenuItem Procedure Construct_Object Forward Send Construct_Object Property String psTemplate "" Property Integer piItemMessage 0 End_Procedure Procedure DoInsertWorkspaceHeader String sPath String sTemplate Get psTemplate to sTemplate Get CurrentProgramPath of ghoWorkspaceHandlerEx to sPath Get vFolderFormat sPath to sPath Send InsertHeaderFromFile to (Focus(Desktop)) (sPath+sTemplate) End_Procedure Procedure DoEditWorkspaceHeader String sPath String sTemplate Handle hoClient Get Client_Id to hoClient Get psTemplate to sTemplate Get CurrentProgramPath of ghoWorkspaceHandlerEx to sPath Get vFolderFormat sPath to sPath Send CAOpenFile of hoClient (sPath+sTemplate) End_Procedure Procedure OnExecute Variant vCommandBarControl Integer iMessage Get piItemMessage to iMessage If iMessage ; Send iMessage End_Procedure End_Class Object oToolsMenu is a cCJCustomMenu Set psCaption to "&Tools" Set psDescription to "Tools" Set psCategory to "Tools" Object oHeadersMenuItem is a cCJMenuItem Property Handle phoTemplates 0 Set peControlType to xtpControlPopup Set psCaption to "File Headers" Set psDescription to "Insert header into the current source file" Object oInsertMenuItem is a cCJMenuItem Property Handle[] phInsertHeaderItems Set peControlType to xtpControlPopup Set psCaption to "Insert Header" Object oInsertGlobalItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Global Header" Set psToolTip to "Insert global header" Set psDescription to "Insert global header into the current source" Procedure OnExecute Variant vCommandBarControl Send InsertHeaderGlobal to (Focus(Self)) End_Procedure End_Object Object oInsertCurrentItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Current User" Set psToolTip to "Insert current user header" Set psDescription to "Insert current user header into the current source" Set psImage to "Header16.ico" Procedure OnExecute Variant vCommandBarControl Send InsertHeaderUser to (Focus(Self)) End_Procedure End_Object Procedure OnPopupInit Variant vCommandBarControl Handle hCommandBarControls Forward Send OnPopupInit vCommandBarControl hCommandBarControls Set psCaption of oInsertCurrentItem to (_T("Current User:", 156) * ToOem(gsUserName)) // String sTemplate sDesc Integer iC iCount iWindows iItem Handle hoSet Handle[] hArrayOfWindows Variant vItem // delete all windows actions and menu items. Assume we have an array of DF action objects for the windows // also assume that destroying an action removes all menu instances of that action Get phInsertHeaderItems to hArrayOfWindows Move (SizeOfArray(hArrayOfWindows)) to iWindows For iC from 0 to (iWindows-1) If (hArrayOfWindows[iC]) ; Send Destroy of hArrayOfWindows[iC] // assume this removes all menu items of this action Loop Move (ResizeArray(hArrayOfWindows,0)) to hArrayOfWindows // Send CreateFiletemplateSet // Move 0 to iCount Get phoTemplates to hoSet If (hoSet) Begin Get Item_Count of hoSet to iCount For iItem from 0 to (iCount-1) Get LongFileName of hoSet item iItem to sTemplate Move iItem to iC Get Create U_cCJHeaderMenuItem to hArrayOfWindows[iC] If (iItem=0) Set pbControlBeginGroup of hArrayOfWindows[iC] to True Set psTemplate of hArrayOfWindows[iC] to sTemplate Set psCaption of hArrayOfWindows[iC] to (ToOEM(sTemplate)) #IFDEF TH_TRANSLATION Move (Replace("%1", gILanguage[157], ToOem(sTemplate))) to sDesc Set psDescription of hArrayOfWindows[iC] to sDesc #ELSE Set psDescription of hArrayOfWindows[iC] to ("Insert '" - sTemplate - "' header.") #ENDIF Set piItemMessage of hArrayOfWindows[iC] to Msg_DoInsertWorkspaceHeader Get AddDynamicControl of hArrayOfWindows[iC] hCommandBarControls to vItem Loop End // Set phInsertHeaderItems to hArrayOfWindows // End_Procedure Function IsEnabled Returns Boolean Handle hoCA hoID hoID2 Boolean bEnabled Integer iFlag iDel Get Client_Id to hoCA Move (Focus(Desktop)) to hoID If hoID Begin Move (Parent(hoID)) to hoID Get Delegation_Mode of hoID to iDel Set Delegation_Mode of hoID to no_delegate_or_error Get GetEditViewID of hoID to hoID2 Set Delegation_Mode of hoID to iDel End If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled Else Move 0 to bEnabled Function_Return bEnabled End_Function End_Object // oToolsHeadersInsertMenuItem Object oHeadersEditMenuItem is a cCJMenuItem Property Handle[] phEditHeaderItems Set peControlType to xtpControlPopup Set psCaption to "Edit Header" Object oCreateItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Create Workspace Header" Set psToolTip to "Create Workspace Header" Set psDescription to "Create Workspace Header" Set psImage to "CreateHeader16.ico" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAEditHeaderWorkspace of hoClient End_Procedure End_Object Object oEditGlobalItem is a cCJMenuItem Set pbControlBeginGroup to True Set pbAddToDesignerMenu to True Set psCaption to "Global Header" Set psToolTip to "Edit global header" Set psDescription to "Modify global header" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAEditHeaderGlobal of hoClient End_Procedure End_Object Object oEditCurrentItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Current User" Set psToolTip to "Edit current user header" Set psDescription to "Modify current user header" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAEditHeaderUSer of hoClient End_Procedure End_Object Procedure OnPopupInit Variant vCommandBarControl Handle hCommandBarControls Forward Send OnPopupInit vCommandBarControl hCommandBarControls Set psCaption of oEditCurrentItem to ( _T("Current User:", 169) * ToOem(gsUserName)) // String sTemplate sDesc Integer iC iCount iWindows iItem Handle hoSet Handle[] hArrayOfWindows Variant vItem // delete all windows actions and menu items. Assume we have an array of DF action objects for the windows // also assume that destroying an action removes all menu instances of that action Get phEditHeaderItems to hArrayOfWindows Move (SizeOfArray(hArrayOfWindows)) to iWindows For iC from 0 to (iWindows-1) If (hArrayOfWindows[iC]) ; Send Destroy of hArrayOfWindows[iC] // assume this removes all menu items of this action Loop Move (ResizeArray(hArrayOfWindows,0)) to hArrayOfWindows // Send CreateFiletemplateSet // Move 0 to iCount Get phoTemplates to hoSet If (hoSet) Begin Get Item_Count of hoSet to iCount For iItem from 0 to (iCount-1) Get LongFileName of hoSet item iItem to sTemplate Move iItem to iC Get Create U_cCJHeaderMenuItem to hArrayOfWindows[iC] If (iItem=0) Set pbControlBeginGroup of hArrayOfWindows[iC] to True Set psTemplate of hArrayOfWindows[iC] to sTemplate Set psCaption of hArrayOfWindows[iC] to (ToOEM(sTemplate)) #IFDEF TH_TRANSLATION Move (Replace("%1", gILanguage[170], ToOem(sTemplate))) to sDesc Set psDescription of hArrayOfWindows[iC] to sDesc #ELSE Set psDescription of hArrayOfWindows[iC] to ("Modify '" - sTemplate - "' header.") #ENDIF Set piItemMessage of hArrayOfWindows[iC] to Msg_DoEditWorkspaceHeader Get AddDynamicControl of hArrayOfWindows[iC] hCommandBarControls to vItem Loop End // Set phEditHeaderItems to hArrayOfWindows // End_Procedure End_Object // oToolsHeadersInsertMenuItem Procedure CreateFiletemplateSet Handle hoID Handle hoTemplates String sPath Get phoTemplates to hoTemplates If (hoTemplates<>0) Begin // Destroy existing fileset if exists Get Object_Id of hoTemplates to hoID If (hoID) Begin Send Destroy of hoID End Set phoTemplates to 0 End Get CurrentProgramPath of ghoWorkspaceHandlerEx to sPath Get vFolderFormat sPath to sPath Get Create U_cFolderSet to hoTemplates If (hoTemplates) Begin Send LoadBuffer of hoTemplates (sPath+"*.tpl") Set phoTemplates to hoTemplates End End_Procedure // CreateFiletemplateSet End_Object // oToolsHeadersMenuItem Object oCodeListMenuItem is a cCJMenuItem Set peControlType to xtpControlPopup Set psCaption to "Code Lists" Set psImage to "CodeList16.ico" Object oClassesItem is a cCJMenuItem Set psCaption to "Classes" Set psToolTip to "List Classes" Set psDescription to "Show Classes Code List" Set psShortcut to "" Set psImage to "CLClass16.ico" Procedure OnExecute Variant vCommandBarControl Send ListClasses to (Focus(Self)) End_Procedure End_Object Object oObjectsItem is a cCJMenuItem //Set psImage to "New16.bmp" Set psCaption to "Objects" Set psToolTip to "List Objects" Set psDescription to "Show Objects Code List" Set psShortcut to "" Set psImage to "CLObject16.ico" Procedure OnExecute Variant vCommandBarControl Send ListObjects to (Focus(Self)) End_Procedure End_Object Object oProceduresItem is a cCJMenuItem Set psCaption to "Procedures" Set psToolTip to "List Procedures" Set psDescription to "Show Procedures Code List" Set psImage to "CLProcedure16.ico" Procedure OnExecute Variant vCommandBarControl Send listProcedures to (Focus(Self)) End_Procedure End_Object Object oFunctionsItem is a cCJMenuItem Set psCaption to "Functions" Set psToolTip to "List Functions" Set psDescription to "Show Functions Code List" Set psShortcut to "" Set psImage to "CLFunction16.ico" Procedure OnExecute Variant vCommandBarControl Send listFunctions to (Focus(Self)) End_Procedure End_Object Object oVariablesItem is a cCJMenuItem Set psCaption to "Local Variables" Set psToolTip to "List Local Variables" Set psDescription to "Show Local Variables Code List" Procedure OnExecute Variant vCommandBarControl Send listVars to (Focus(Self)) End_Procedure End_Object Object oStructsItem is a cCJMenuItem Set psCaption to "Structures" Set psToolTip to "List Structures" Set psDescription to "Show Structures Code List" Set psImage to "CLStruct16.ico" Procedure OnExecute Variant vCommandBarControl End_Procedure End_Object Object oKeysItem is a cCJMenuItem //Set psImage to "New16.bmp" Set psCaption to "Keys" Set psToolTip to "List Keys" Set psDescription to "Show Keys Code List" Set psShortcut to "" Set psImage to "ListKey16.ico" Procedure OnExecute Variant vCommandBarControl Send listKeys to (Focus(Self)) End_Procedure End_Object Object oTagsItem is a cCJMenuItem Set psCaption to "Studio/IDE Tags" Set psToolTip to "List Tags" Set psDescription to "Show IDE/Studio Tags Code List" Set psImage to "CLTag16.ico" Procedure OnExecute Variant vCommandBarControl Send listIDETags to (Focus(Self)) End_Procedure End_Object Object oCreateCLItem is a cCJMenuItem Set pbControlBeginGroup to True //Set psImage to "New16.bmp" Set psCaption to "Create Code List..." Set psToolTip to "Create Code List" Set psDescription to "Create Code List" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Send listCreator to (Focus(Self)) End_Procedure End_Object Function IsEnabled Returns Boolean Handle hoCA hoID hoID2 Boolean bEnabled Integer iFlag iDel Get Client_Id to hoCA Move (Focus(Desktop)) to hoID If hoID Begin Move (Parent(hoID)) to hoID Get Delegation_Mode of hoID to iDel Set Delegation_Mode of hoID to no_delegate_or_error Get GetEditViewID of hoID to hoID2 Set Delegation_Mode of hoID to iDel End If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled Else Move 0 to bEnabled Function_Return bEnabled End_Function End_Object // oToolsCodeListMenuItem // Not available with scintilla for the moment, so commented out // Object oMacroMenuItem is a cCJMenuItem // Set peControlType to xtpControlPopup // Set psCaption to "Macros" // Set psToolTip to "Editor Macros Management" // Set psDescription to "Record and execute the code editor macro" // // Object oRecordItem is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Record Macro..." // Set psToolTip to "Record Macro" // Set psDescription to "Record Editor Macro" // Set psImage to "MacroRecord16.ico" // Procedure OnExecute Variant vCommandBarControl // Send FloatRecordMacro to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsRecordingMacro of (Focus(Self)) to bEnabled // Function_Return (not(bEnabled)) // End_Function // End_Object // // Object oPlay1Item is a cCJMenuItem // Set pbControlBeginGroup to True // Set psCaption to "Play Macro 1" // Set psToolTip to "Record Macro 1" // Set psDescription to "Play Editor Macro 1" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro1 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(0,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay2Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 2" // Set psToolTip to "Record Macro 2" // Set psDescription to "Play Editor Macro 2" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro2 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(1,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay3Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 3" // Set psToolTip to "Record Macro 3" // Set psDescription to "Play Editor Macro 3" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro3 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(2,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay4Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 4" // Set psToolTip to "Record Macro 4" // Set psDescription to "Play Editor Macro 4" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro4 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(3,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay5Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 5" // Set psToolTip to "Record Macro 5" // Set psDescription to "Play Editor Macro 5" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro5 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(4,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay6Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 6" // Set psToolTip to "Record Macro 6" // Set psDescription to "Play Editor Macro 6" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro6 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(5,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay7Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 7" // Set psToolTip to "Record Macro 7" // Set psDescription to "Play Editor Macro 7" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro7 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(6,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay8Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 8" // Set psToolTip to "Record Macro 8" // Set psDescription to "Play Editor Macro 8" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro8 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(7,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay9Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 9" // Set psToolTip to "Record Macro 9" // Set psDescription to "Play Editor Macro 9" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro9 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(8,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oPlay10Item is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set psCaption to "Play Macro 10" // Set psToolTip to "Record Macro 10" // Set psDescription to "Play Editor Macro 10" // Procedure OnExecute Variant vCommandBarControl // Send FloatPlayMacro10 to (Focus(Self)) // End_Procedure // Function IsEnabled Returns Boolean // Boolean bEnabled // Get CM_IsPlayingMacro of (Focus(Self)) to bEnabled // Move (not(bEnabled)) to bEnabled // If (CMGetMacro(9,0)=0) Move (False) to bEnabled // Function_Return bEnabled // End_Function // End_Object // // Object oDeleteItem is a cCJMenuItem // Set pbAddToDesignerMenu to True // Set pbControlBeginGroup to True // Set psCaption to "Delete All Macros" // Set psToolTip to "Delete All Macros" // Set psDescription to "Delete All Editor Macros" // Procedure OnExecute Variant vCommandBarControl // Handle hoClient // Get Client_Id to hoClient // Send FloatDeleteAllMacros of hoClient // End_Procedure // End_Object // // Function IsEnabled Returns Boolean // Handle hoCA hoID hoID2 // Boolean bEnabled // Integer iFlag iDel // Get Client_Id to hoCA // Move (Focus(Desktop)) to hoID // If hoID Begin // Move (Parent(hoID)) to hoID // Get Delegation_Mode of hoID to iDel // Set Delegation_Mode of hoID to no_delegate_or_error // Get GetEditViewID of hoID to hoID2 // Set Delegation_Mode of hoID to iDel // End // If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled // Else Move 0 to bEnabled // Function_Return bEnabled // End_Function // // End_Object // oToolsMacroMenuItem Object oInsertRevisionItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True Set psCaption to "Insert Revision Entry" Set psToolTip to "Insert Revision Entry" Set psDescription to "Inserts revision line into the header and source line" Set psImage to "Comment16.ico" Procedure OnExecute Variant vCommandBarControl Send InsertRevision to (Focus(Self)) End_Procedure Function IsEnabled Returns Boolean Handle hoCA hoID hoID2 Boolean bEnabled Integer iFlag iDel Get Client_Id to hoCA Move (Focus(Desktop)) to hoID If hoID Begin Move (Parent(hoID)) to hoID Get Delegation_Mode of hoID to iDel Set Delegation_Mode of hoID to no_delegate_or_error Get GetEditViewID of hoID to hoID2 Set Delegation_Mode of hoID to iDel End If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled Else Move 0 to bEnabled Function_Return bEnabled End_Function End_Object Object oInsertColorMenuItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Insert Color Value" Set psToolTip to "Insert Color Value" Set psDescription to "Inserts RGB color value into the source" Set psImage to "Color16.ico" Procedure OnExecute Variant vCommandBarControl Send FloatInsertColor to (Focus(Self)) End_Procedure Function IsEnabled Returns Boolean Handle hoCA hoID hoID2 Boolean bEnabled Integer iFlag iDel Get Client_Id to hoCA Move (Focus(Desktop)) to hoID If hoID Begin Move (Parent(hoID)) to hoID Get Delegation_Mode of hoID to iDel Set Delegation_Mode of hoID to no_delegate_or_error Get GetEditViewID of hoID to hoID2 Set Delegation_Mode of hoID to iDel End If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled Else Move 0 to bEnabled Function_Return bEnabled End_Function End_Object Object oInsertHexColorMenuItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Insert HEX Color String" Set psToolTip to "Insert HEX Color String" Set psDescription to "Inserts HEX color string (#FFFFFF) into the source" Set psImage to "Color16.ico" Procedure OnExecute Variant vCommandBarControl Send FloatInsertHexColor to (Focus(Self)) End_Procedure Function IsEnabled Returns Boolean Handle hoCA hoID hoID2 Boolean bEnabled Integer iFlag iDel Get Client_Id to hoCA Move (Focus(Desktop)) to hoID If hoID Begin Move (Parent(hoID)) to hoID Get Delegation_Mode of hoID to iDel Set Delegation_Mode of hoID to no_delegate_or_error Get GetEditViewID of hoID to hoID2 Set Delegation_Mode of hoID to iDel End If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled Else Move 0 to bEnabled Function_Return bEnabled End_Function End_Object Object oInsertPictureItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Insert Picture Reference" Set psToolTip to "Insert Picture Reference" Set psDescription to "Inserts picture file name into the source" Set psImage to "Picture16.ico" Procedure OnExecute Variant vCommandBarControl Send FloatInsertBitmap to (Focus(Self)) End_Procedure Function IsEnabled Returns Boolean Handle hoCA hoID hoID2 Boolean bEnabled Integer iFlag iDel Get Client_Id to hoCA Move (Focus(Desktop)) to hoID If hoID Begin Move (Parent(hoID)) to hoID Get Delegation_Mode of hoID to iDel Set Delegation_Mode of hoID to no_delegate_or_error Get GetEditViewID of hoID to hoID2 Set Delegation_Mode of hoID to iDel End If hoID2 Move (isFileViewWindow(hoCA,hoID2)) to bEnabled Else Move 0 to bEnabled Function_Return bEnabled End_Function End_Object #IFDEF TH_TRANSLATION Procedure Translate Set psCaption of oHeadersMenuItem to gILanguage[145] Set psDescription of oHeadersMenuItem to gILanguage[146] Set psCaption of oInsertMenuItem to gILanguage[147] Set psDescription of oInsertMenuItem to gILanguage[148] Set psCaption of oInsertGlobalItem to gILanguage[149] Set psToolTip of oInsertGlobalItem to gILanguage[150] Set psDescription of oInsertGlobalItem to gILanguage[151] Set psCaption of oInsertCurrentItem to gILanguage[153] Set psToolTip of oInsertCurrentItem to gILanguage[154] Set psDescription of oInsertCurrentItem to gILanguage[155] Set psCaption of oHeadersEditMenuItem to gILanguage[158] Set psDescription of oHeadersEditMenuItem to gILanguage[159] Set psCaption of oCreateItem to gILanguage[160] Set psToolTip of oCreateItem to gILanguage[161] Set psDescription of oCreateItem to gILanguage[162] Set psCaption of oEditGlobalItem to gILanguage[163] Set psToolTip of oEditGlobalItem to gILanguage[164] Set psDescription of oEditGlobalItem to gILanguage[165] Set psCaption of oEditCurrentItem to gILanguage[166] Set psToolTip of oEditCurrentItem to gILanguage[167] Set psDescription of oEditCurrentItem to gILanguage[168] Set psCaption of oCodeListMenuItem to gILanguage[171] Set psDescription of oCodeListMenuItem to gILanguage[172] Set psCaption of oClassesItem to gILanguage[173] Set psToolTip of oClassesItem to gILanguage[174] Set psDescription of oClassesItem to gILanguage[175] Set psCaption of oObjectsItem to gILanguage[176] Set psToolTip of oObjectsItem to gILanguage[177] Set psDescription of oObjectsItem to gILanguage[178] Set psCaption of oProceduresItem to gILanguage[179] Set psToolTip of oProceduresItem to gILanguage[180] Set psDescription of oProceduresItem to gILanguage[181] Set psCaption of oFunctionsItem to gILanguage[182] Set psToolTip of oFunctionsItem to gILanguage[183] Set psDescription of oFunctionsItem to gILanguage[184] Set psCaption of oVariablesItem to gILanguage[185] Set psToolTip of oVariablesItem to gILanguage[186] Set psDescription of oVariablesItem to gILanguage[187] Set psCaption of oStructsItem to gILanguage[188] Set psToolTip of oStructsItem to gILanguage[189] Set psDescription of oStructsItem to gILanguage[190] Set psCaption of oKeysItem to gILanguage[191] Set psToolTip of oKeysItem to gILanguage[192] Set psDescription of oKeysItem to gILanguage[193] Set psCaption of oTagsItem to gILanguage[194] Set psToolTip of oTagsItem to gILanguage[195] Set psDescription of oTagsItem to gILanguage[196] Set psCaption of oCreateCLItem to gILanguage[197] Set psToolTip of oCreateCLItem to gILanguage[198] Set psDescription of oCreateCLItem to gILanguage[199] // Set psCaption of oMacroMenuItem to gILanguage[200] // Set psToolTip of oMacroMenuItem to gILanguage[201] // Set psDescription of oMacroMenuItem to gILanguage[202] // // Set psCaption of oRecordItem to gILanguage[203] // Set psToolTip of oRecordItem to gILanguage[204] // Set psDescription of oRecordItem to gILanguage[205] // // Set psCaption of oPlay1Item to gILanguage[206] // Set psToolTip of oPlay1Item to gILanguage[207] // Set psDescription of oPlay1Item to gILanguage[208] // // Set psCaption of oPlay2Item to gILanguage[209] // Set psToolTip of oPlay2Item to gILanguage[210] // Set psDescription of oPlay2Item to gILanguage[211] // // Set psCaption of oPlay3Item to gILanguage[212] // Set psToolTip of oPlay3Item to gILanguage[213] // Set psDescription of oPlay3Item to gILanguage[214] // // Set psCaption of oPlay4Item to gILanguage[215] // Set psToolTip of oPlay4Item to gILanguage[216] // Set psDescription of oPlay4Item to gILanguage[217] // // Set psCaption of oPlay5Item to gILanguage[218] // Set psToolTip of oPlay5Item to gILanguage[219] // Set psDescription of oPlay5Item to gILanguage[220] // // Set psCaption of oPlay6Item to gILanguage[221] // Set psToolTip of oPlay6Item to gILanguage[222] // Set psDescription of oPlay6Item to gILanguage[223] // // Set psCaption of oPlay7Item to gILanguage[224] // Set psToolTip of oPlay7Item to gILanguage[225] // Set psDescription of oPlay7Item to gILanguage[226] // // Set psCaption of oPlay8Item to gILanguage[227] // Set psToolTip of oPlay8Item to gILanguage[228] // Set psDescription of oPlay8Item to gILanguage[229] // // Set psCaption of oPlay9Item to gILanguage[230] // Set psToolTip of oPlay9Item to gILanguage[231] // Set psDescription of oPlay9Item to gILanguage[232] // // Set psCaption of oPlay10Item to gILanguage[233] // Set psToolTip of oPlay10Item to gILanguage[234] // Set psDescription of oPlay10Item to gILanguage[235] // // Set psCaption of oDeleteItem to gILanguage[236] // Set psToolTip of oDeleteItem to gILanguage[237] // Set psDescription of oDeleteItem to gILanguage[238] Set psCaption of oInsertRevisionItem to gILanguage[239] Set psToolTip of oInsertRevisionItem to gILanguage[240] Set psDescription of oInsertRevisionItem to gILanguage[241] Set psCaption of oInsertColorMenuItem to gILanguage[242] Set psToolTip of oInsertColorMenuItem to gILanguage[243] Set psDescription of oInsertColorMenuItem to gILanguage[244] Set psCaption of oInsertHexColorMenuItem to gILanguage[245] Set psToolTip of oInsertHexColorMenuItem to gILanguage[246] Set psDescription of oInsertHexColorMenuItem to gILanguage[247] Set psCaption of oInsertPictureItem to gILanguage[248] Set psToolTip of oInsertPictureItem to gILanguage[249] Set psDescription of oInsertPictureItem to gILanguage[250] End_Procedure #ENDIF Procedure OnPopupInit Variant vCommandBarControl Handle hCommandBarControls Forward Send OnPopupInit vCommandBarControl hCommandBarControls Set psCaption of oInsertCurrentItem to (_T("Current User:", 251) * ToOem(gsUserName)) // Send Create_CustomItems hCommandBarControls "TOOLS" Msg_Activate_oToolsMenuView // Send AddCJKeyStringToMenuItem (oInsertGlobalItem(Self)) CMD_ToolsInsertHeaderGlobal Send AddCJKeyStringToMenuItem (oInsertCurrentItem(Self)) CMD_ToolsInsertHeaderUser // End_Procedure End_Object // oToolsMenu