home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 November / VPR9711A.ISO / VPR_DATA / Special / Tmedt180 / tmedt180.exe / TM_HM.CWS < prev    next >
Text File  |  1997-08-25  |  21KB  |  612 lines

  1. @echo off
  2.  
  3. #----------------------------------#
  4. # メインウィンンドのハンドルを取得 #
  5. #----------------------------------#
  6.  
  7. window get main -&eax
  8. let hwndMain=%eax%
  9.  
  10. #----------------------#
  11. # 以前のリソースを削除 #
  12. #----------------------#
  13.  
  14. menubar get %hwndMain% -&eax
  15. let hMenu=%eax%
  16.  
  17. menubar set %hwndMain% 0
  18. menubar destory %hMenu%
  19. menubar draw %hwndMain%
  20.  
  21. menubar getpopup %hwndMain% -&eax
  22. let hPopMenu=%eax%
  23. menubar destory %hPopMenu%
  24.  
  25. toolbar get %hwndMain% -&eax
  26. let hTBar=%eax%
  27. toolbar destory %hTBar%
  28.  
  29. functionkey get %hwndMain% -&eax
  30. let hFKey=%eax%
  31. functionkey destroy %hFKey%
  32.  
  33. accelkey get %hwndMain% -&eax
  34. let hAccel=%eax%
  35. accelkey destroy %hAccel%
  36.  
  37. strokekey get %hwndMain% -&eax
  38. let hStroke=%eax%
  39. strokekey destroy %hStroke%
  40.  
  41. #------------------#
  42. # 表示属性を決める #
  43. #------------------#
  44. let @ Hex = %hwndMain% ^| 0
  45. #setwindowpos %Hex% 0 0 0 640 480 0006
  46. console size 0
  47. window sdi
  48. set tm.win.tbar=1 ;  toolbar     show
  49. set tm.win.fkey=1 ;  functionkey show
  50. set tm.con.hsb=0 ;   console scrollbar horz hide
  51. set tm.con.vsb=1 ;   console scrollbar vert show
  52. set tm.edt.hsb=0 ;   edit    scrollbar horz hide
  53. set tm.edt.vsb=1 ;   edit    scrollbar vert show
  54. set tm.edt.line=0 ;  edit mode noline
  55. set tm.edt.ruler=1 ; edit mode ruler
  56. window get edit -&eax
  57. window set focus %eax%
  58. #mode edit font "-f:FixedSys"
  59. #mode edit color -fg:0x000000 -bg:0xFFFFFF -ctl:0x808000
  60.  
  61. #--------------------#
  62. # メニューバーの登録 #
  63. #--------------------#
  64.  
  65. menubar create -&eax
  66. let hMenu=%eax%
  67.  
  68. menubar createpopup -&eax
  69. let hPopMenu=%eax%
  70.  
  71.  menubar append %hMenu%    0x0010 %hPopMenu% "ファイル(&F)"
  72.  menubar append %hPopMenu% 0x0000 "tmNew"    "新規作成(&N)"
  73.  menubar append %hPopMenu% 0x0000 "tmOpen"   "開く(&O)..."
  74.  menubar append %hPopMenu% 0x0000 "tmLoad"   "閉じて開く(&L)..."
  75.  menubar append %hPopMenu% 0x0000 "tmSave"   "上書き保存(&S)"
  76.  menubar append %hPopMenu% 0x0000 "tmSaveAs" "名前を付けて保存(&A)..."
  77.  menubar append %hPopMenu% 0x0001 "tmDummy"  "カーソル位置への読み込み(&I)..."
  78.  menubar append %hPopMenu% 0x0000 "tmPrint"  "印刷(&P)..."
  79.  menubar append %hPopMenu% 0x0800 -1           0
  80.  menubar append %hPopMenu% 0x0000 "tmQuit"   "保存して終了(&E)"
  81.  menubar append %hPopMenu% 0x0000 "tmQuit"   "終了(&X)"
  82.  menubar append %hPopMenu% 0x0001 "tmDummy"  "全保存終了(&T)"
  83.  menubar append %hPopMenu% 0x0001 "tmDummy"  "全終了(&Q)"
  84.  
  85.  menubar append %hPopMenu% 0x0800 -1         0
  86.  for (i = 1; $i <= 5; i++)
  87.    edit logfile get %i% -&tm.logfile
  88.    menubar append %hPopMenu%      0 "tmLogFile %i%"   "%tm.logfile%"
  89.    set @ tm.logfile[%i%] = $tm.logfile
  90.  end
  91.  set tm.logfile=
  92.  
  93. menubar createpopup -&eax
  94. let hPopMenu=%eax%
  95.  
  96.  menubar append %hMenu%    0x0010 %hPopMenu% "編集(&E)"
  97.  menubar append %hPopMenu% 0x0000 "tmUndo"   "やり直し(&U)    Alt+Bksp"
  98.  menubar append %hPopMenu% 0x0001 "tmDummy"  "やり直しのやり直し(&R)    Shift+Alt+Bksp"
  99.  menubar append %hPopMenu% 0x0800 -1         0
  100.  menubar append %hPopMenu% 0x0000 "tmCut"    "切り抜き(&T)    F7"
  101.  menubar append %hPopMenu% 0x0000 "tmCopy"   "コピー(&C)    F8"
  102.  menubar append %hPopMenu% 0x0001 "tmDummy"  "追加切り抜き(&W)    Shift+F7"
  103.  menubar append %hPopMenu% 0x0001 "tmDummy"  "追加コピー(&A)    Shift+F8"
  104.  menubar append %hPopMenu% 0x0000 "tmPaste"   "貼り付け(&P)    F9"
  105.  menubar append %hPopMenu% 0x0000 "tmDel"    "削除(&L)    Del"
  106.  menubar append %hPopMenu% 0x0001 "tmDummy"  "変換(&V)"
  107.  menubar append %hPopMenu% 0x0800 -1         0
  108.  menubar append %hPopMenu% 0x0000 "tmSelect" "すべてを選択(&S)"
  109.  menubar append %hPopMenu% 0x0001 "tmDummy"  "クリップボード履歴(&H)"
  110.  menubar append %hPopMenu% 0x0800 -1         0
  111.  menubar append %hPopMenu% 0x0001 "tmDummy"  "最初からやり直し(&O)"
  112.  
  113. menubar createpopup -&eax
  114. let hPopMenu=%eax%
  115.  
  116.  menubar append %hMenu%    0x0010 %hPopMenu%    "検索(&S)"
  117.  menubar append %hPopMenu% 0x0000 "tmFind"      "検索(&F)...    Ctrl+F"
  118.  menubar append %hPopMenu% 0x0000 "tmFindLeft"  "上候補(&P)    Ctrl+P"
  119.  menubar append %hPopMenu% 0x0000 "tmFindRight" "下候補(&N)    Ctrl+N"
  120.  menubar append %hPopMenu% 0x0000 "tmReplace"   "置換(&R)...    Ctrl+R"
  121.  menubar append %hPopMenu% 0x0001 "tmDummy"     "検索開始位置へ戻る(&S)"
  122.  menubar append %hPopMenu% 0x0800 -1            0
  123.  menubar append %hPopMenu% 0x0000 "tmJump"      "指定行(&J)...    Ctrl+J"
  124.  menubar append %hPopMenu% 0x0001 "tmDummy"     "最後に編集した所(&L)    Ctrl+L"
  125.  menubar append %hPopMenu% 0x0000 "tmTop"       "ファイルの先頭(&T)    Ctrl+Home"
  126.  menubar append %hPopMenu% 0x0000 "tmBottom"    "ファイルの最後(&B)    Ctrl+End"
  127.  menubar append %hPopMenu% 0x0001 "tmDummy"     "編集マークの上検索(&U)"
  128.  menubar append %hPopMenu% 0x0001 "tmDummy"     "編集マークの下検索(&D)"
  129.  menubar append %hPopMenu% 0x0001 "tmDummy"     "前のカーソル位置(&V)"
  130.  menubar append %hPopMenu% 0x0800 -1            0
  131.  menubar append %hPopMenu% 0x0001 "tmDummy"     "マーク一覧(&M)    Ctrl+M"
  132.  menubar append %hPopMenu% 0x0800 -1            0
  133.  menubar append %hPopMenu% 0x0000 "tmGrep"      "grepの実行(&G)..."
  134.  
  135. menubar createpopup -&eax
  136. let hPopMenu=%eax%
  137.  
  138.  menubar append %hMenu%    0x0010 %hPopMenu%   "ウィンドウ(&W)"
  139.  menubar append %hPopMenu% 0x0000 "tmExec"     "縦に並べる(&V)"
  140.  menubar append %hPopMenu% 0x0001 "tmDummy"    "横に並べる(&H)"
  141.  menubar append %hPopMenu% 0x0001 "tmDummy"    "重ねて表示(&C)"
  142.  menubar append %hPopMenu% 0x0001 "tmDummy"    "並べて表示(&T)"
  143.  menubar append %hPopMenu% 0x0001 "tmDummy"    "全部アイコン化(&N)"
  144.  menubar append %hPopMenu% 0x0800 -1           0
  145.  menubar append %hPopMenu% 0x0000 "tmExec"     "2つに分割(&D)"
  146.  menubar append %hPopMenu% 0x0001 "tmDummy"    "同時スクロール(&L)"
  147.  menubar append %hPopMenu% 0x0001 "tmDummy"    "内容比較(&F)"
  148.  menubar append %hPopMenu% 0x0800 -1           0
  149.  menubar append %hPopMenu% 0x0001 "tmDummy"    "デスクトップ保存(&S)"
  150.  menubar append %hPopMenu% 0x0001 "tmDummy"    "デスクトップ復元(&R)"
  151.  
  152. menubar createpopup -&eax
  153. let hPopMenu=%eax%
  154.  
  155.  menubar append %hMenu%    0x0010 %hPopMenu%  "マクロ(&M)"
  156.  menubar append %hPopMenu% 0x0000 "tmKeyMacR" "キー操作の記録開始/終了(&R)    Shift+F1"
  157.  menubar append %hPopMenu% 0x0000 "tmKeyMacP" "キー操作の再生(&P)    Shift+F2"
  158.  menubar append %hPopMenu% 0x0000 "tmDummy"   "キー操作の保存(&S)..."
  159.  menubar append %hPopMenu% 0x0000 "tmDummy"   "キー操作の読込み(&L)..."
  160.  menubar append %hPopMenu% 0x0001 "tmDummy"   "マクロ実行(&X)..."
  161.  menubar append %hPopMenu% 0x0800 -1           0
  162.  menubar append %hPopMenu% 0x0001 "tmDummy"   "マクロ登録(&E)..."
  163.  menubar append %hPopMenu% 0x0001 "tmDummy"   "マクロヘルプ(&H)..."
  164.  
  165. menubar createpopup -&eax
  166. let hPopMenu=%eax%
  167.  
  168.  menubar append %hMenu%    0x0010 %hPopMenu%   "その他(&O)"
  169.  
  170. menubar createpopup -&eax
  171. let hPop2Menu=%eax%
  172.  
  173.  menubar append %hPopMenu%  0x0010 %hPop2Menu%  "設定(&C)"
  174.  menubar append %hPop2Menu% 0x0000 "tmDisp"     "画面の設定(&D)..."
  175.  menubar append %hPop2Menu% 0x0000 "tmIndent"   "インデント追加/なし(&I)"
  176.  menubar append %hPop2Menu% 0x0000 "tmFont"     "フォント(&F)..."
  177.  menubar append %hPop2Menu% 0x0000 "tmBgColor"  "背景色(&B)..."
  178.  menubar append %hPop2Menu% 0x0000 "tmCtlColor" "制御文字色(&C)..."
  179.  menubar append %hPop2Menu% 0x0000 "tmLnColor"  "行番号(&L)..."
  180.  
  181. menubar createpopup -&eax
  182. let hPop2Menu=%eax%
  183.  
  184.  menubar append %hPopMenu%  0x0010 %hPop2Menu%  "動作環境(&F)"
  185.  menubar append %hPop2Menu% 0x0000 "tmTBar"     "ツールバー標示/非表示"
  186.  menubar append %hPop2Menu% 0x0000 "tmFKey"     "ファンクションキー標示/非表示"
  187.  menubar append %hPop2Menu% 0x0000 "tmEdtHS"    "エディットスクロールバー水平表示/非表示"
  188.  menubar append %hPop2Menu% 0x0000 "tmEdtVS"    "エディットスクロールバー垂直表示/非表示"
  189.  menubar append %hPop2Menu% 0x0000 "tmConHS"    "コンソールスクロールバー水平表示/非表示"
  190.  menubar append %hPop2Menu% 0x0000 "tmConVS"    "コンソールスクロールバー垂直表示/非表示"
  191.  
  192.  menubar append %hPopMenu% 0x0001 "tmDummy"    "キー割り当て(&K)..."
  193.  menubar append %hPopMenu% 0x0001 "tmDummy"    "ユーザーメニュー編集(&M)..."
  194.  menubar append %hPopMenu% 0x0001 "tmDummy"    "外部ヘルプ(&H)    Ctrl+F1"
  195.  menubar append %hPopMenu% 0x0001 "tmDummy"    "タグジャンプ(&T)    F10"
  196.  menubar append %hPopMenu% 0x0001 "tmDummy"    "ダイレクトダグジャンプ(&D)    Ctrl+F10"
  197.  menubar append %hPopMenu% 0x0001 "tmDummy"    "バッグタグジャンプ(&B)    Shift+F10"
  198.  menubar append %hPopMenu% 0x0000 "tmExec"     "制御コード入力(&I)"
  199.  menubar append %hPopMenu% 0x0000 "tmHelpCmd"  "関数一覧(&L)...    F11"
  200.  menubar append %hPopMenu% 0x0001 "tmDummy"    "tagsファイルの作成(&G)..."
  201.  menubar append %hPopMenu% 0x0000 "tmExec"     "コマンド実行(&X)..."
  202.  menubar append %hPopMenu% 0x0000 "tmView"  "閲覧モード(&R)"
  203.  menubar append %hPopMenu% 0x0800 -1           0
  204.  menubar append %hPopMenu%      0 "tmContent" "目次(&C)"
  205.  menubar append %hPopMenu% 0x0800 -1           0
  206.  menubar append %hPopMenu%      0 "tmAbout"   "バージョン情報(&A)..."
  207.  menubar append %hPopMenu%      0 "tmRegist"  "ユーザー登録(&R)..."
  208.  
  209. menubar set %hwndMain% %hMenu%
  210. menubar draw %hwndMain%
  211.  
  212. #--------------------------#
  213. # ファンクションキーの登録 #
  214. #--------------------------#
  215.  
  216. functionkey create -&eax
  217. let hFKey=%eax%
  218.  
  219.  functionkey append %hFKey% 0x00 0x70 "tmContent"  "ヘルプ"
  220.  functionkey append %hFKey% 0x00 0x74 "tmCopy"     "単語をコピー"
  221.  functionkey append %hFKey% 0x00 0x75 "tmBlock"    "選択開始"
  222.  functionkey append %hFKey% 0x00 0x76 "tmCut"      "切り抜き"
  223.  functionkey append %hFKey% 0x00 0x77 "tmCopy"     "コピー"
  224.  functionkey append %hFKey% 0x00 0x78 "tmPaste"    "貼り付け"
  225. #functionkey append %hFKey% 0x00 0x79 "tmDummy"    "タグジャンプ"
  226.  functionkey append %hFKey% 0x00 0x7A "tmHelpCmd"  "関数一覧..."
  227.  functionkey append %hFKey% 0x00 0x7B "tmLine"     "行番号表示/非表示"
  228.  
  229.  functionkey append %hFKey% 0x04 0x70 "tmKeyMacR"  "記録開始/記録終了"
  230.  functionkey append %hFKey% 0x04 0x71 "tmKeyMacP"  "再生"
  231.  functionkey append %hFKey% 0x04 0x74 "tmCopy"     "行をコピー"
  232. #functionkey append %hFKey% 0x04 0x75 "tmDummy"    "BOX選択開始"
  233. #functionkey append %hFKey% 0x04 0x76 "tmDummy"    "追加切り抜き"
  234. #functionkey append %hFKey% 0x04 0x77 "tmDummy"    "追加コピー"
  235. #functionkey append %hFKey% 0x04 0x78 "tmDummy"    "BOX貼り付け"
  236. #functionkey append %hFKey% 0x04 0x79 "tmDummy"    "バックタグジャンプ"
  237.  
  238. #functionkey append %hFKey% 0x08 0x70 "tmDummy" "外部ヘルプ"
  239. #functionkey append %hFKey% 0x08 0x73 "tmDummy" "ファイルを閉じる"
  240. #functionkey append %hFKey% 0x08 0x79 "tmDummy" "ダイレクトタグジャンプ"
  241.  
  242. #functionkey append %hFKey% 0x0C 0x70 "tmDummy" "外部ヘルプ2"
  243.  
  244. #------------------#
  245. # ツールバーの登録 #
  246. #------------------#
  247.  
  248. toolbar create -&eax
  249. let hTBar=%eax%
  250.  
  251. toolbar append %hTBar%      0 "tmNew"       "新規作成"        0
  252. toolbar append %hTBar%      0 "tmOpen"      "開く..."         1
  253. toolbar append %hTBar%      0 "tmSave"      "上書き保存"      2
  254. toolbar append %hTbar% 0x0800 0             0     -1
  255. toolbar append %hTBar%      0 "tmUndo"      "やり直し"        0
  256. toolbar append %hTBar%      0 "tmCopy"      "コピー"          4
  257. toolbar append %hTBar%      0 "tmCut"       "切り抜き"        3
  258. toolbar append %hTBar%      0 "tmPaste"     "貼り付け"        5
  259. toolbar append %hTbar% 0x0800 0             0     -1
  260. toolbar append %hTBar%      0 "tmFind"      "検索..."         0
  261. toolbar append %hTBar%      0 "tmFindRight" "下候補"          0
  262. toolbar append %hTBar%      0 "tmFindLeft"  "上候補"          0
  263. toolbar append %hTbar% 0x0800 0         0     -1
  264. toolbar append %hTBar%      0 "tmDummy"     "現在行のマーク"  0
  265. toolbar append %hTBar%      0 "tmExec"      "ウィンドウ分割"  0
  266. toolbar append %hTBar%      0 "tmAbout"     "バージョン情報"  7
  267.  
  268. #----------------------------#
  269. # ポップアップメニューの登録 #
  270. #----------------------------#
  271.  
  272. menubar createpopup -&eax
  273. let hPopMenu=%eax%
  274.  
  275. menubar append %hPopMenu%      0 "tmNew"      "新規作成"
  276. menubar append %hPopMenu%      0 "tmOpen"     "開く..."
  277. menubar append %hPopMenu%      0 "tmSave"     "上書き保存"
  278. menubar append %hPopMenu%      0 "tmSaveAs"   "名前をつけて保存..."
  279. menubar append %hPopMenu%      1 "tmDummy"    "ファイルを閉じる"
  280. menubar append %hPopMenu%      1 "tmDummy"    "別ファイルへの追加保存"
  281. menubar append %hPopMenu%      0 "tmLoad"     "閉じて開く..."
  282. menubar append %hPopMenu%      1 "tmDummy"    "最初からやり直し..."
  283. menubar append %hPopMenu%      0 "tmView"     "上書き禁止切り替え"
  284.  
  285. menubar setpopup %hwndMain% %hPopMenu%
  286.  
  287. #----------------------------#
  288. # アクセラレーターキーの登録 #
  289. #----------------------------#
  290. accelkey create -&eax
  291. let hAccel=%eax%
  292.  
  293. let @ flags = 0x09 ; let @ key = 0x27 # VK_RIGHT
  294. accelkey append %hAccel% %flags% "tmWordRight" %key%
  295.  
  296. let @ flags = 0x09 ; let @ key = 0x25 # VK_LEFT
  297. accelkey append %hAccel% %flags% "tmWordLeft" %key%
  298.  
  299. let @ flags = 0x09 ; let @ key = C:0
  300. accelkey append %hAccel% %flags% "tmExec" %key%
  301.  
  302. let @ flags = 0x09 ; let @ key = F:0
  303. accelkey append %hAccel% %flags% "tmFind" %key%
  304.  
  305. let @ flags = 0x09 ; let @ key = J:0
  306. accelkey append %hAccel% %flags% "tmJump" %key%
  307.  
  308. let @ flags = 0x09 ; let @ key = N:0
  309. accelkey append %hAccel% %flags% "tmFindRight" %key%
  310.  
  311. let @ flags = 0x09 ; let @ key = P:0
  312. accelkey append %hAccel% %flags% "tmFindLeft" %key%
  313.  
  314. let @ flags = 0x09 ; let @ key = R:0
  315. accelkey append %hAccel% %flags% "tmReplace" %key%
  316.  
  317. accelkey set %hwndMain% %hAccel%
  318.  
  319. #------------#
  320. # メッセージ #
  321. #------------#
  322. echo ^#**************************************************************^#
  323. echo ^# ToolMan Editor Ver 1.80 Copyright (c) 1995-97 M.Maedera(JPN) ^#
  324. echo ^# (Hidemaru like Script)                                       ^#
  325. echo ^# If you have any question, please input "help[enter]."        ^#
  326. echo ^#**************************************************************^#
  327. return
  328. #======================================================================
  329. #--------------#
  330. # プロシジャー #
  331. #--------------#
  332. #----------------------------------------------------------------------
  333. proc tmDummy
  334. echo not implement
  335. return
  336. #----------------------------------------------------------------------
  337. proc tmNew
  338. edit new
  339. return
  340. #----------------------------------------------------------------------
  341. proc tmOpen
  342. edit open
  343. return
  344. #----------------------------------------------------------------------
  345. proc tmLoad
  346. edit close ;edit open
  347. return
  348. #----------------------------------------------------------------------
  349. proc tmSave
  350. edit save
  351. return
  352. #----------------------------------------------------------------------
  353. proc tmSaveAs
  354. edit saveas
  355. return
  356. #----------------------------------------------------------------------
  357. proc tmQuit
  358. exit
  359. return
  360. #----------------------------------------------------------------------
  361. proc tmUndo
  362. edit -f undo
  363. return
  364. #----------------------------------------------------------------------
  365. proc tmCut
  366. edit -f select cut
  367. return
  368. #----------------------------------------------------------------------
  369. proc tmCopy
  370. edit -f select copy
  371. return
  372. #----------------------------------------------------------------------
  373. proc tmPaste
  374. edit -f select paste
  375. return
  376. #----------------------------------------------------------------------
  377. proc tmDel
  378. edit -f select delete
  379. return
  380. #----------------------------------------------------------------------
  381. proc tmSelect
  382. edit -f cursor get max -&eax -&ebx
  383. edit -f cursor set eax ebx
  384. edit -f select start
  385. edit -f cursor set 1 1
  386. edit -f select end
  387. return
  388. #----------------------------------------------------------------------
  389. proc tmFind
  390. edit -f find
  391. return
  392. #----------------------------------------------------------------------
  393. proc tmFindRight
  394. edit -f find right
  395. return
  396. #----------------------------------------------------------------------
  397. proc tmFindLeft
  398. edit -f find left
  399. return
  400. #----------------------------------------------------------------------
  401. proc tmReplace
  402. edit -f replace
  403. return
  404. #----------------------------------------------------------------------
  405. proc tmJump
  406. edit -f jump
  407. return
  408. #----------------------------------------------------------------------
  409. proc tmTop
  410. edit -f cursor set 1 1
  411. return
  412. #----------------------------------------------------------------------
  413. proc tmBottom
  414. edit -f cursor set 1 0
  415. return
  416. #----------------------------------------------------------------------
  417. proc tmExec
  418. console size 128
  419. window get console -&eax
  420. window set focus %eax%
  421. return
  422. #----------------------------------------------------------------------
  423. proc tmKeyMacR
  424. if "%tm.edt.rec%" == "1" then
  425.   set tm.edt.rec=0
  426.   edit record end
  427. else
  428.   set tm.edt.rec=1
  429.   edit record start
  430. endif
  431. return
  432. #----------------------------------------------------------------------
  433. proc tmKeyMacP
  434. edit record play
  435. return
  436. #----------------------------------------------------------------------
  437. proc tmDisp
  438. mode edit disp
  439. return
  440. #----------------------------------------------------------------------
  441. proc tmIndent
  442. if "%tm.edt.indent%" == "1" then
  443.   set tm.edt.indent=0
  444.   edit mode noindent
  445. else
  446.   set tm.edt.indent=1
  447.   edit mode indent
  448. endif
  449. return
  450. #----------------------------------------------------------------------
  451. proc tmFont
  452. mode edit font
  453. return
  454. #----------------------------------------------------------------------
  455. proc tmBgColor
  456. mode edit color -bg
  457. return
  458. #----------------------------------------------------------------------
  459. proc tmCtlColor
  460. mode edit color -ctl
  461. return
  462. #----------------------------------------------------------------------
  463. proc tmLnColor
  464. mode edit color -ln
  465. return
  466. #----------------------------------------------------------------------
  467. proc tmTBar
  468. if "%tm.win.tbar%" == "1" then
  469.   set tm.win.tbar=0
  470.   toolbar hide
  471. else
  472.   set tm.win.tbar=1
  473.   toolbar show
  474. endif
  475. return
  476. #----------------------------------------------------------------------
  477. proc tmFKey
  478. if "%tm.win.fkey%" == "1" then
  479.   set tm.win.fkey=0
  480.   functionkey hide
  481. else
  482.   set tm.win.fkey=1
  483.   functionkey show
  484. endif
  485. return
  486. #----------------------------------------------------------------------
  487. proc tmEdtHS
  488. if "%tm.edt.hsb%" == "0" then
  489.   set tm.edt.hsb=1
  490.   edit scrollbar horz show
  491. else
  492.   set tm.edt.hsb=0
  493.   edit scrollbar horz hide
  494. endif
  495. return
  496. #----------------------------------------------------------------------
  497. proc tmEdtVS
  498. if "%tm.edt.vsb%" == "0" then
  499.   set tm.edt.vsb=1
  500.   edit scrollbar vert show
  501. else
  502.   set tm.edt.vsb=0
  503.   edit scrollbar vert hide
  504. endif
  505. return
  506. #----------------------------------------------------------------------
  507. proc tmConHS
  508. if "%tm.con.hsb%" == "0" then
  509.   set tm.con.hsb=1
  510.   console scrollbar horz show
  511. else
  512.   set tm.con.hsb=0
  513.   console scrollbar horz hide
  514. endif
  515. return
  516. #----------------------------------------------------------------------
  517. proc tmConVS
  518. if "%tm.con.vsb%" == "0" then
  519.   set tm.con.vsb=1
  520.   console scrollbar vert show
  521. else
  522.   set tm.con.vsb=0
  523.   console scrollbar vert hide
  524. endif
  525. return
  526. #----------------------------------------------------------------------
  527. proc tmHelpCmd
  528. console size 128
  529. window get console -&eax
  530. window set focus %eax%
  531. help
  532. return
  533. #----------------------------------------------------------------------
  534. proc tmView
  535. if "%tm.edt.view%" == "1" then
  536.   set tm.edt.view=0
  537.   edit mode edit
  538. else
  539.   set tm.edt.view=1
  540.   edit mode view
  541. endif
  542. return
  543. #----------------------------------------------------------------------
  544. proc tmContent
  545. window help
  546. return
  547. #----------------------------------------------------------------------
  548. proc tmAbout
  549. window about
  550. return
  551. #----------------------------------------------------------------------
  552. proc tmRegist
  553. window regist
  554. return
  555. #----------------------------------------------------------------------
  556. proc tmBlock
  557. window get edit  -&eax
  558. window get focus -&ebx
  559.  
  560. if (%eax% == %ebx%) then
  561.   if "%tm.edt.sel%" == "1" then
  562.     set tm.edt.sel=0
  563.     edit select end
  564.   else
  565.     set tm.edt.sel=1
  566.     edit select start
  567.   endif
  568. else
  569.   if "%tm.con.sel%" == "1" then
  570.     set tm.con.sel=0
  571.     console select end
  572.   else
  573.     set tm.con.sel=1
  574.     console select start
  575.   endif
  576. endif
  577. return
  578. #----------------------------------------------------------------------
  579. proc tmLine
  580. if "%tm.edt.line%" == "1" then
  581.   set tm.edt.line=0
  582.   edit mode noline
  583. else
  584.   set tm.edt.line=1
  585.   edit mode line
  586. endif
  587. return
  588. #----------------------------------------------------------------------
  589. proc tmWordLeft
  590. edit -f cursor left word
  591. return
  592. #----------------------------------------------------------------------
  593. proc tmWordRight
  594. edit -f cursor right word
  595. return
  596. #----------------------------------------------------------------------
  597. proc tmPrint
  598. edit print
  599. return
  600. #----------------------------------------------------------------------
  601. proc tmLogFile
  602. set @ tm.logfile = $tm.logfile[%1]
  603. edit open "%tm.logfile%"
  604. set tm.logfile=
  605. return
  606. #----------------------------------------------------------------------
  607. proc tmGrep
  608. window get main -&eax ;console size 320
  609. comwin dll cwgrep grep -gj%eax%
  610. return
  611. #----------------------------------------------------------------------
  612.