Use Windows.pkg Use cCJStandardMenuItemClasses.pkg Use cCJDeoMenuItemClasses.pkg Object oFileContextMenu is a cCJContextMenu Property String psCurrentLanguage "" Property Integer piFileTabMenu 0 Property String psFileName "" Object oFileItem is a cCJMenuItem Set psCaption to "Edit File" Set psToolTip to "Open file in Editor" Set psDescription to "Open file in Editor" Set psImage to "ActionOpenInEditor16.ico" Set psCategory to C_$CategoryFile Procedure OnExecute Variant vCommandBarControl Send CAOpenFile of (oClientArea(oMain(Self))) (psFileName(Self)) End_Procedure End_Object Object oFolderItem is a cCJMenuItem Set psCaption to "Open Containing Folder" Set psToolTip to "Open Containing Folder" Set psDescription to "Open Containing Folder" Set psImage to "ActionOpen.ico" Set psCategory to C_$CategoryFile Procedure OnExecute Variant vCommandBarControl // open explorer in default style at correct path, with filename selected. Runprogram background "Explorer" ("/e,/select,"+psFileName(Self)) End_Procedure End_Object Object oCommandItem is a cCJMenuItem Set psCaption to "Open Command Window" Set psToolTip to "Open Command Window" Set psDescription to "Open Command Window" Set psImage to "ActionConsole16.ico" Set psCategory to C_$CategoryFile Procedure OnExecute Variant vCommandBarControl String sFileName String sPath sOldPath Integer iVoid Boolean bExists Get psFileName to sFileName Get ParseFolderName sFileName to sPath If (sPath<>"") Begin Get vFolderExists sPath to bExists If (bExists) Begin Get_Current_Directory to sOldPath Set_Directory sPath Move (WinExec("CMD.EXE",SW_NORMAL)) to iVoid Set_Directory sOldPath End Else Begin Send Stop_Box ("Unable to set path"+sPath+"\nWindows claims it does not exist.") End End End_Procedure End_Object Object oOpenAppItem is a cCJMenuItem Set psCaption to "Open with Default Application" Set psToolTip to "Open with default application" Set psDescription to "Open with default application" Set psCategory to C_$CategoryFile Procedure OnExecute Variant vCommandBarControl Send vShellExecute "OPEN" (psFileName(Self)) "" "" End_Procedure End_Object Object oNewItem is a cCJMenuItem Set pbControlBeginGroup to True Set psCaption to "New File" Set psToolTip to "Create new file in Editor" Set psDescription to "Create new file in Editor" Set psImage to "ActionNew.ico" Set psCategory to C_$CategoryFile Procedure OnExecute Variant vCommandBarControl Send CANewFile of (oClientArea(oMain(Self))) End_Procedure End_Object Object oCloseItem is a cCJMenuItem Set pbControlBeginGroup to True Set psImage to "Close16.ico" Set psCaption to "Close" Set psToolTip to "Close current opened file" Set psDescription to "Close source file" Procedure OnExecute Variant vCommandBarControl Handle hoVw String sFileName Get psFileName to sFileName Get FindViewByFileName of (oClientArea(oMain)) sFileName to hoVw If hoVw Begin Send CACloseFile of hoVw End End_Procedure End_Object Object oCloseAllItem is a cCJMenuItem Set psCaption to "Close All" Set psToolTip to "Close all currently opened files" Set psDescription to "Close All Files" Procedure OnExecute Variant vCommandBarControl Send CACloseAllFiles to (oClientArea(oMain(Self))) End_Procedure End_Object Object oPropertiesItem is a cCJMenuItem Set pbControlBeginGroup to True Set psCaption to "File Properties..." Set psToolTip to "File Properties" Set psDescription to "File Properties" Set psImage to "Properties16.ico" Set psCategory to C_$CategoryFile Procedure OnExecute Variant vCommandBarControl Send SHPropertiesFile (psFileName(Self)) End_Procedure End_Object #IFDEF TH_TRANSLATION Procedure Translate Set psCaption of oFileItem to gILanguage[474] Set psToolTip of oFileItem to gILanguage[475] Set psDescription of oFileItem to gILanguage[476] Set psCaption of oFolderItem to gILanguage[477] Set psToolTip of oFolderItem to gILanguage[478] Set psDescription of oFolderItem to gILanguage[479] Set psCaption of oCommandItem to gILanguage[480] Set psToolTip of oCommandItem to gILanguage[481] Set psDescription of oCommandItem to gILanguage[482] Set psCaption of oOpenAppItem to gILanguage[483] Set psToolTip of oOpenAppItem to gILanguage[484] Set psDescription of oOpenAppItem to gILanguage[485] Set psCaption of oNewItem to gILanguage[486] Set psToolTip of oNewItem to gILanguage[487] Set psDescription of oNewItem to gILanguage[488] Set psCaption of oCloseItem to gILanguage[489] Set psToolTip of oCloseItem to gILanguage[490] Set psDescription of oCloseItem to gILanguage[491] Set psCaption of oCloseAllItem to gILanguage[492] Set psToolTip of oCloseAllItem to gILanguage[493] Set psDescription of oCloseAllItem to gILanguage[494] Set psCaption of oPropertiesItem to gILanguage[495] Set psToolTip of oPropertiesItem to gILanguage[496] Set psDescription of oPropertiesItem to gILanguage[497] End_Procedure #ENDIF Procedure OnPopupInit Variant vCommandBarControl Handle hoCommandBarControls String sFile sLanguage sAction Get psFileName to sFile #IFDEF TH_TRANSLATION Get psCurrentLanguage to sLanguage If (psInterfaceLanguage(ghoEditorProperties)<>sLanguage) Begin Send Translate End Move (Replace("%1", gILanguage[498], sFile)) to sAction Set psCurrentLanguage to sLanguage #ELSE Move ("Close"*'<'+sFile+'>') to sAction #ENDIF If (sFile<>"") ; Set psCaption of oCloseItem to sAction Set ComVisible of oFileItem to (not(piFileTabMenu(Self))) Set ComVisible of oCloseItem to (piFileTabMenu(Self)) Set ComVisible of oCloseAllItem to (piFileTabMenu(Self)) End_Procedure End_Object