UpdateResource
Begin
    Kind                        Menu
    Name                        TextEditMenu
    Action                      Add
    ReferencePosition           Before
    ReferenceItem              '窗口[&W]' *
    Description
    Begin
         Popup '模拟[&S]'
         Begin
             MenuItem '运行[&R]'        'Sim:RunSimulator'
             MenuItem '设置[&S]...'     'SIM:RunDialog_AnalysesSetup'
         End
    End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Delete
     ReferencePosition   Before
     ReferenceItem       '打印[&P]'  *
     Description
     Begin
          MenuItem '设置打印机[&R]...'  TextEdit:SetupPrinter
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Add
     ReferencePosition   Before
     ReferenceItem       '打印[&P]'  *
     Description
     Begin
          MenuItem '打开光标下的文档[&U]'        TextEdit:OpenDocumentUnderCursor
          MenuItem '用文件重载[&R]'              TextEdit:ReloadTextFile
          MenuItem MarkedSeparator Print
          MenuItem '设置打印机[&E]...'           TextEdit:SetupPrinter
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Delete
     ReferencePosition   After
     ReferenceItem       '粘贴[&P]\tShift+Ins'  *
     Description
     Begin
          MenuItem '清除[&L]\tCtrl+Del'          TextEdit:Clear
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Add
     ReferencePosition   After
     ReferenceItem       '粘贴[&P]\tShift+Ins'  *
     Description
     Begin
          MenuItem '清除[&L]\tDel'               TextEdit:Clear
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Delete
     ReferencePosition   After
     ReferenceItem       '查找&F]...\tCtrl+F'  *
     Description
     Begin
          MenuItem '替换[&A]...\tCtrl+G'         TextEdit:FindAndReplace
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Add
     ReferencePosition   After
     ReferenceItem       '查找&F]...\tCtrl+F'  *
     Description
     Begin
          MenuItem '替换[&A]...\tCtrl+R'         TextEdit:FindAndReplace
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Delete
     ReferencePosition   After
     ReferenceItem       '改变语言[&L]...' *
     Description
     Begin
          Popup '宏指令窗口[&M]'
          Begin
               MenuItem '查看断点窗口\tF12'                            'Macro:ViewWindow(WindowToView=Breakpoint)'
               MenuItem '查看监视窗口\tShift+F12'                      'Macro:ViewWindow(WindowToView=Watch)'
               MenuItem '运行 ClientBasic 对话编辑器[&D]\tShift+F12'   Macro:RunDialogEditor
               MenuItem MarkedSeparator Macro1
               MenuItem '重设[&R]\tF11'                      Macro:Reset
               MenuItem '开始[&G]\tF9'                       Macro:Go
               MenuItem '暂停[&P]\tF10'                      Macro:Pause
               MenuItem '单步进入[&I]\tF8'                   Macro:StepInto
               MenuItem '跳过[&O]\tF7'                       Macro:StepOver
               MenuItem MarkedSeparator Macro2
               MenuItem '添加监视点[&W]\tShift+F5'          Macro:AddWatch
               MenuItem '移除监视点[&A]\tShift+F6'          Macro:RemoveWatch
               MenuItem '移除所有监视点[&T]\tShift+F7'      Macro:RemoveAllWatches
               MenuItem MarkedSeparator Macro3
               MenuItem '添加断点[&B]\tF5'              'TextEdit:ExecuteSystemCommand(Command=BreakPoint | Action=Add)'
               MenuItem '移除断点[&R]\tF6'              'TextEdit:ExecuteSystemCommand(Command=BreakPoint | Action=Remove)'
               MenuItem '移除所有断点[&E]\tCtrl+F7'     'TextEdit:ExecuteSystemCommand(Command=BreakPoint | Action=RemoveAll)'
               MenuItem MarkedSeparator Macro4
               MenuItem '切换动画模式[&A]\tCtrl+F12'    Macro:Animate
          End
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Add
     ReferencePosition   After
     ReferenceItem       '改变语言[&L]...'  *
     Description
     Begin
          MenuItem '编辑语法[&E]...'           TextEdit:EditSyntax
          MenuItem '显示代码模板[&T]'               TextEdit:ShowCodeTemplates
          MenuItem MarkedSeparator TextEdit1
          MenuItem '引用[&Q]'                             TextEdit:QuoteSelected
          MenuItem '重复的[&D]'                         TextEdit:DuplicateSelected
          MenuItem '缩排[&I]\tCtrl+I'                    TextEdit:IndentTextBlock
          MenuItem '取消缩排[&U]\tCtrl+U'                  TextEdit:UnindentTextBlock
          MenuItem '插入行[&S]\tCtrl+N'               TextEdit:InsertLine
          Popup '改变大小写[&C]'
          Begin
              MenuItem '选择到大写[&U]'        TextEdit:SetSelectedToUpperCase
              MenuItem '选择到小写[&L]'        TextEdit:SetSelectedToLowerCase
              MenuItem '单词大写[&P]'             TextEdit:SetWordToUpperCase
              MenuItem '单词小写[&W]'             TextEdit:SetWordToLowerCase
          End
          MenuItem MarkedSeparator TextEdit2
          Popup '自动换行[&W]'
          Begin
              MenuItem '无[&N]'                         'TextEdit:WordWrap(Limit=None)'
              MenuItem '在边缘[&M]'                    'TextEdit:WordWrap(Limit=Margin)'
              MenuItem '在窗口[&W]'                    'TextEdit:WordWrap(Limit=Window)'
          End
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Add
     ReferencePosition   Before
     ReferenceItem       '窗口[&W]' *
     Description
     Begin
          Popup '宏[&M]'
          Begin
               MenuItem '查看断点窗口\tF12'      'Macro:ViewWindow(WindowToView=Breakpoint)'
               MenuItem '查看监视窗口\tShift+F12'     'Macro:ViewWindow(WindowToView=Watch)'
               MenuItem '运行 ClientBasic 对话编辑器[&D]\tShift+F12'    Macro:RunDialogEditor
               MenuItem MarkedSeparator Macro1
               MenuItem '重设[&R]\tF11'                      Macro:Reset
               MenuItem '开始[&G]\tF9'                          Macro:Go
               MenuItem '暂停[&P]\tF10'                      Macro:Pause
               MenuItem '单步进入[&I]\tF8'                   Macro:StepInto
               MenuItem '跳过[&O]\tF7'                   Macro:StepOver
               MenuItem MarkedSeparator Macro2
               MenuItem '添加监视点[&W]\tShift+F5'             Macro:AddWatch
               MenuItem '移除监视点[&A]\tShift+F6'          Macro:RemoveWatch
               MenuItem '移除所有监视点[&T]\tShift+F7'      Macro:RemoveAllWatches
               MenuItem MarkedSeparator Macro3
               MenuItem '添加断点[&B]\tF5'              'TextEdit:ExecuteSystemCommand(Command=BreakPoint | Action=Add)'
               MenuItem '移除断点[&R]\tF6'           'TextEdit:ExecuteSystemCommand(Command=BreakPoint | Action=Remove)'
               MenuItem '移除所有断点[&E]\tCtrl+F7'  'TextEdit:ExecuteSystemCommand(Command=BreakPoint | Action=RemoveAll)'
               MenuItem MarkedSeparator Macro4
               MenuItem '切换动画模式[&A]\tCtrl+F12'   Macro:Animate
          End
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Delete
     ReferencePosition   Before
     ReferenceItem       '帮助在[&O]'  *
     Description
     Begin
          MenuItem '内容[&C]'                   'Client:RunHelpTopic(FileName=\Help\Protel.hlp|Topic=contents)'
     End
End

UpdateResource
Begin
     Kind                Menu
     Name                TextEditMenu
     Action              Add
     ReferencePosition   Before
     ReferenceItem       '帮助在[&O]'  *
     Description
     Begin
          MenuItem '内容[&C]\tF1'                     'Client:RunHelpTopic(FileName=\Help\Protel.hlp|Topic=contents)'
     End
End

UpdateResource
Begin
     Kind                HotKeyTable
     Name                Default
     Action              Delete
     Description
     Begin
     Key TextEdit:Redo                                 Backspace           Ctrl                EndKey
     Key TextEdit:InsertLine                           Return                                  EndKey
     Key TextEdit:WriteTextBlockToFile                 K           Ctrl    W                   EndKey
     Key TextEdit:ReadTextBlockFromFile                K           Ctrl    R                   EndKey
     Key TextEdit:Clear                                Delete      Ctrl                        EndKey
     End
End

UpdateResource
Begin
     Kind                HotKeyTable
     Name                Default
     Action              Add
     Description
     Begin
     Key TextEdit:InsertReturn                                              Return                                  EndKey
     Key TextEdit:ExtendSelectionOneColumnDown                              Down      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionOneColumnUp                                Up        Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionOneColumnLeft                              Left      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionOneColumnRight                             Right     Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnOnePageDown                          PgDn      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnOnePageUp                            PgUp      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnOneWordLeft                          Left      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnOneWordRight                         Right     Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToLineBegin                          Home      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnToLineEnd                            End       Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnToFileBegin                          Home      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToFileEnd                            End       Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToBottomOfWindow                     PgDn      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToTopOfWindow                        PgUp      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionToBottomOfWindow                           PgDn      Ctrl      Shift               EndKey
     Key TextEdit:ExtendSelectionToTopOfWindow                              PgUp      Ctrl      Shift               EndKey
     Key TextEdit:InsertShiftTab                                            TAB       Shift                         EndKey
     Key TextEdit:DeleteToBeginningOfWord                                   Backspace Ctrl                          EndKey
     Key TextEdit:DeleteToEndOfWord                                         Delete    Ctrl                          EndKey
     End
End

UpdateResource
Begin
     Kind                HotKeyTable
     Name                Classic
     Action              Delete
     Description
     Begin
     Key TextEdit:InsertLine                           Return                                  EndKey
     Key TextEdit:MoveCursorToTopOfDocument            PgUp           Ctrl                     EndKey
     Key TextEdit:MoveCursorToBottomOfDocument         PgDn           Ctrl                     EndKey
     Key TextEdit:MoveCursorToTopOfWindow              Home           Ctrl                     EndKey
     Key TextEdit:MoveCursorToBottomOfWindow           End           Ctrl                      EndKey
     End
End

UpdateResource
Begin
     Kind                HotKeyTable
     Name                Classic
     Action              Add
     Description
     Begin
     Key TextEdit:InsertReturn                                              Return                                  EndKey
     Key TextEdit:MoveCursorToTopOfDocument                                 Home      Ctrl                          EndKey
     Key TextEdit:MoveCursorToBottomOfDocument                              End       Ctrl                          EndKey
     Key TextEdit:MoveCursorToTopOfWindow                                   PgUp      Ctrl                          EndKey
     Key TextEdit:MoveCursorToBottomOfWindow                                PgDn      Ctrl                          EndKey
     Key TextEdit:ExtendSelectionOneColumnDown                              Down      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionOneColumnUp                                Up        Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionOneColumnLeft                              Left      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionOneColumnRight                             Right     Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnOnePageDown                          PgDn      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnOnePageUp                            PgUp      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnOneWordLeft                          Left      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnOneWordRight                         Right     Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToLineBegin                          Home      Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnToLineEnd                            End       Shift     Alt                 EndKey
     Key TextEdit:ExtendSelectionColumnToFileBegin                          Home      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToFileEnd                            End       Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToBottomOfWindow                     PgDn      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionColumnToTopOfWindow                        PgUp      Ctrl      Shift     Alt       EndKey
     Key TextEdit:ExtendSelectionToBottomOfWindow                           PgDn      Ctrl      Shift               EndKey
     Key TextEdit:ExtendSelectionToTopOfWindow                              PgUp      Ctrl      Shift               EndKey
     Key TextEdit:InsertShiftTab                                            TAB       Shift                         EndKey
     End
End
