// TH3EditMenu.mn Use cCJCommandBarSystem.pkg Use cCJStandardMenuItemClasses.pkg Object oEditMenu is a cCJMenuItem Set peControlType to xtpControlPopup Set psCaption to "&Edit" Set psDescription to "Edit text options (Cut, Copy, Paste, ... etc.)" Set psCategory to "Edit" Object oUndoItem is a cCJUndoMenuItem Set pbControlBeginGroup to True End_Object Object oRedoItem is a cCJMenuItem Set psCaption to "Redo" Set psToolTip to "Redo" Set psDescription to "Redo last action" Set psImage to "THRedo32.ico" Set pbActiveUpdate to True Set psCategory to C_$CategoryEdit Procedure OnExecute Variant vCommandBarControl Send Redo of (focus(Self)) End_Procedure Function IsEnabled Returns Boolean Boolean bEnabled Get CanRedo of (Focus(Self)) to bEnabled Function_Return bEnabled End_Function End_Object Object oCutItem is a cCJCutMenuItem Set pbControlBeginGroup to True End_Object Object oCopyItem is a cCJCopyMenuItem End_Object Object oPasteItem is a cCJPasteMenuItem End_Object Object oSelectAllItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True Set psCaption to "Select All" Set psToolTip to "Select Code Editor text" Set psDescription to "Select editor text" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CASelectAll of hoClient 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 oSelectLineItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Select Line" Set psToolTip to "Select the current line of the code" Set psDescription to "Select Line" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CASelectLine of hoClient 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 oDeleteLineItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True Set psCaption to "Delete Line" Set psToolTip to "Delete current line in the editor" Set psDescription to "Delete line" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CADeleteLine of hoClient 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 oGoToLineItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True Set psCaption to "&Goto Line..." Set psToolTip to "Go to the particular line" Set psDescription to "Go to line" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAGotoLine of hoClient 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 oFindItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "&Find..." Set psToolTip to "Find text in the current source (including regular expressions)" Set psDescription to "Find text" Set psImage to "Find16.ico" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAFind of hoClient 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 oFindNextItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Find Next" Set psToolTip to "Find next occurance of the text specified" Set psDescription to "Find next" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAFindNext of hoClient 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 oReplaceItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "&Replace..." Set psToolTip to "Replace the specified text with another text" Set psDescription to "Replace text" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAReplace of hoClient 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 oFindInFilesItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Find in Files..." Set psToolTip to "Search the text in multiple files" Set psDescription to "Find in files" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CAPopUpFindInFiles of hoClient End_Procedure End_Object #IFDEF TH_TRANSLATION Procedure Translate Set psCaption of oUndoItem to gILanguage[62] Set psToolTip of oUndoItem to gILanguage[63] Set psDescription of oUndoItem to gILanguage[64] Set psCaption of oRedoItem to gILanguage[65] Set psToolTip of oRedoItem to gILanguage[66] Set psDescription of oRedoItem to gILanguage[67] Set psCaption of oCutItem to gILanguage[68] Set psToolTip of oCutItem to gILanguage[69] Set psDescription of oCutItem to gILanguage[70] Set psCaption of oCopyItem to gILanguage[71] Set psToolTip of oCopyItem to gILanguage[72] Set psDescription of oCopyItem to gILanguage[73] Set psCaption of oPasteItem to gILanguage[74] Set psToolTip of oPasteItem to gILanguage[75] Set psDescription of oPasteItem to gILanguage[76] Set psCaption of oSelectAllItem to gILanguage[77] Set psToolTip of oSelectAllItem to gILanguage[78] Set psDescription of oSelectAllItem to gILanguage[79] Set psCaption of oSelectLineItem to gILanguage[80] Set psToolTip of oSelectLineItem to gILanguage[81] Set psDescription of oSelectLineItem to gILanguage[82] Set psCaption of oDeleteLineItem to gILanguage[83] Set psToolTip of oDeleteLineItem to gILanguage[84] Set psDescription of oDeleteLineItem to gILanguage[85] Set psCaption of oGoToLineItem to gILanguage[86] Set psToolTip of oGoToLineItem to gILanguage[87] Set psDescription of oGoToLineItem to gILanguage[88] Set psCaption of oFindItem to gILanguage[89] Set psToolTip of oFindItem to gILanguage[90] Set psDescription of oFindItem to gILanguage[91] Set psCaption of oFindNextItem to gILanguage[92] Set psToolTip of oFindNextItem to gILanguage[93] Set psDescription of oFindNextItem to gILanguage[94] Set psCaption of oReplaceItem to gILanguage[95] Set psToolTip of oReplaceItem to gILanguage[96] Set psDescription of oReplaceItem to gILanguage[97] Set psCaption of oFindInFilesItem to gILanguage[98] Set psToolTip of oFindInFilesItem to gILanguage[99] Set psDescription of oFindInFilesItem to gILanguage[100] End_Procedure #ENDIF Procedure OnPopupInit Forward Send OnPopupInit Send AddCJKeyStringToMenuItem (oUndoItem (Self)) CMD_Undo Send AddCJKeyStringToMenuItem (oRedoItem (Self)) CMD_Redo Send AddCJKeyStringToMenuItem (oCutItem (Self)) CMD_CUT Send AddCJKeyStringToMenuItem (oCopyItem (Self)) CMD_COPY Send AddCJKeyStringToMenuItem (oPasteItem (Self)) CMD_PASTE Send AddCJKeyStringToMenuItem (oSelectAllItem (Self)) CMD_SELECTALL Send AddCJKeyStringToMenuItem (oSelectLineItem (Self)) CMD_SELECTLINE Send AddCJKeyStringToMenuItem (oDeleteLineItem (Self)) CMD_LINEDELETE Send AddCJKeyStringToMenuItem (oGoToLineItem (Self)) CMD_GOTOLINE Send AddCJKeyStringToMenuItem (oFindItem (Self)) CMD_FIND Send AddCJKeyStringToMenuItem (oFindNextItem (Self)) CMD_FINDNEXT Send AddCJKeyStringToMenuItem (oReplaceItem (Self)) CMD_FINDREPLACE Send AddCJKeyStringToMenuItem (oFindInFilesItem(Self)) CMD_FindInFiles End_Procedure End_Object