home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / CLIPPER / NFTROFF / 9.TR < prev    next >
Text File  |  1993-12-01  |  33KB  |  2,256 lines

  1. .de }n
  2. .bp
  3. .sp .5i
  4. ..
  5. .wh -.8i }n
  6. .sp .5i
  7. .po -.4i
  8. .ll 7.5i
  9. .ps 9
  10. .vs 9
  11. .in 0i
  12. .ta 1.63265i
  13. .sp 2
  14. .ne 20
  15. .ps +3
  16. .vs +3
  17. FT_ALT()    Determine status of the Alt key
  18. .br
  19. .ta
  20. .in 0.08i
  21. .ps -3
  22. .vs -3
  23. .sp 2
  24. \fBFT_ALT()
  25. Determine status of the Alt key
  26. .in 0i
  27. .br
  28. \l'6.24i'
  29. .br
  30. .sp
  31. .in 0.08i
  32. \fBSyntax
  33. .sp
  34. .in 0.4i
  35. \fBFT_ALT() -> lValue
  36. .sp
  37. .in 0.08i
  38. \fBArguments
  39. .sp
  40. .in 0.4i
  41. None
  42. .sp
  43. .in 0.08i
  44. \fBReturns
  45. .sp
  46. .in 0.4i
  47. \.T\. if Alt key is pressed, \.F\. if otherwise\.
  48. .sp
  49. .in 0.08i
  50. \fBDescription
  51. .sp
  52. .in 0.4i
  53. This function is useful for times you need to know whether or not the
  54. Alt key is pressed, such as during a MemoEdit()\.
  55. .sp
  56. .in 0.08i
  57. \fBExamples
  58. .sp
  59. .in 0.4i
  60. IF FT_ALT()
  61. .in 0.64i
  62. @24, 0 say "Alt"
  63. .in 0.4i
  64. ELSE
  65. .in 0.64i
  66. .ta 1.2i
  67. @24, 0 say "    "
  68. .br
  69. .ta
  70. .in 0.4i
  71. ENDIF
  72. .sp
  73. .in 0.08i
  74. \fBSource:\fR ALT\.C
  75. .sp
  76. \fBAuthor:\fR Ted Means
  77. .in 0i
  78. .sp
  79. .in 1.5i
  80. .ti -1.5i
  81. .ta 1.5i
  82. .ft B
  83. See Also:    
  84. .ft R
  85. FT_CAPLOCK()
  86. , FT_CTRL()
  87. , FT_NUMLOCK()
  88. , FT_PRTSCR()
  89. , FT_SHIFT()
  90. .ta 1.63265i
  91. .in 0i
  92. .sp 2
  93. .ne 20
  94. .ps +3
  95. .vs +3
  96. FT_CAPLOCK()    Determine and optionally change the status of CapLock key
  97. .br
  98. .ta
  99. .in 0.08i
  100. .ps -3
  101. .vs -3
  102. .sp 2
  103. \fBFT_CAPLOCK()
  104. Determine and optionally change the status of CapLock key
  105. .in 0i
  106. .br
  107. \l'6.24i'
  108. .br
  109. .sp
  110. .in 0.08i
  111. \fBSyntax
  112. .sp
  113. .in 0.4i
  114. \fBFT_CAPLOCK([ <lNewSetting> ]) -> lCurrentSetting
  115. .sp
  116. .in 0.08i
  117. \fBArguments
  118. .sp
  119. .in 0.4i
  120. \fB<lNewSetting>\fR is optional and if supplied is the new setting
  121. for the CapLock key\.  Specify \.T\. to turn CapLock on, or \.F\. to
  122. turn it off\.
  123. .sp
  124. .in 0.08i
  125. \fBReturns
  126. .sp
  127. .in 0.4i
  128. \.T\. if CapLock is set, \.F\. if it isn\'t set\.  The value returned
  129. .in 0.48i
  130. represents the setting in effect prior to any changes that might
  131. by made by <lNewSetting>\.
  132. .sp
  133. .in 0.08i
  134. \fBDescription
  135. .sp
  136. .in 0.4i
  137. This function is useful if you need to know or set the status of the
  138. CapLock key for some reason\.
  139. .sp
  140. .in 0.08i
  141. \fBExamples
  142. .sp
  143. .in 0.4i
  144. IF FT_CAPLOCK()
  145. .in 0.64i
  146. Qout( "CapLock is active" )
  147. .in 0.4i
  148. ENDIF
  149. .sp
  150. .in 0.08i
  151. \fBSource:\fR CAPLOCK\.C
  152. .sp
  153. \fBAuthor:\fR Ted Means
  154. .in 0i
  155. .sp
  156. .in 1.5i
  157. .ti -1.5i
  158. .ta 1.5i
  159. .ft B
  160. See Also:    
  161. .ft R
  162. FT_ALT()
  163. , FT_CTRL()
  164. , FT_NUMLOCK()
  165. , FT_PRTSCR()
  166. , FT_SHIFT()
  167. .ta 1.63265i
  168. .in 0i
  169. .sp 2
  170. .ne 20
  171. .ps +3
  172. .vs +3
  173. FT_CTRL()    Determine status of the Ctrl key
  174. .br
  175. .ta
  176. .in 0.08i
  177. .ps -3
  178. .vs -3
  179. .sp 2
  180. \fBFT_CTRL()
  181. Determine status of the Ctrl key
  182. .in 0i
  183. .br
  184. \l'6.24i'
  185. .br
  186. .sp
  187. .in 0.08i
  188. \fBSyntax
  189. .sp
  190. .in 0.4i
  191. \fBFT_CTRL() -> lValue
  192. .sp
  193. .in 0.08i
  194. \fBArguments
  195. .sp
  196. .in 0.4i
  197. None
  198. .sp
  199. .in 0.08i
  200. \fBReturns
  201. .sp
  202. .in 0.4i
  203. \.T\. if Ctrl key is pressed, \.F\. if otherwise\.
  204. .sp
  205. .in 0.08i
  206. \fBDescription
  207. .sp
  208. .in 0.4i
  209. This function is useful for times you need to know whether or not
  210. the Ctrl key is pressed, such as during a MemoEdit()\.
  211. .sp
  212. .in 0.08i
  213. \fBExamples
  214. .sp
  215. .in 0.4i
  216. IF FT_CTRL()
  217. .in 0.64i
  218. @24, 0 say "Ctrl"
  219. .in 0.4i
  220. ELSE
  221. .in 0.64i
  222. .ta 1.28i
  223. @24, 0 say "    "
  224. .br
  225. .ta
  226. .in 0.4i
  227. ENDIF
  228. .sp
  229. .in 0.08i
  230. \fBSource:\fR CTRL\.C
  231. .sp
  232. \fBAuthor:\fR Ted Means
  233. .in 0i
  234. .sp
  235. .in 1.5i
  236. .ti -1.5i
  237. .ta 1.5i
  238. .ft B
  239. See Also:    
  240. .ft R
  241. FT_CAPLOCK()
  242. , FT_NUMLOCK()
  243. , FT_PRTSCR()
  244. , FT_SHIFT()
  245. , FT_ALT()
  246. .ta 1.63265i
  247. .in 0i
  248. .sp 2
  249. .ne 20
  250. .ps +3
  251. .vs +3
  252. FT_MBUTPRS()    Retrieve button press status
  253. .br
  254. .ta
  255. .in 0.08i
  256. .ps -3
  257. .vs -3
  258. .sp 2
  259. \fBFT_MBUTPRS()
  260. Retrieve button press status
  261. .in 0i
  262. .br
  263. \l'6.24i'
  264. .br
  265. .sp
  266. .in 0.08i
  267. \fBSyntax
  268. .sp
  269. .in 0.32i
  270. \fBFT_MRESET( <nButton> [, @nButPrs [, @nX [, @nY] ] ] ) -> nButStatus
  271. .sp
  272. .in 0.08i
  273. \fBArguments
  274. .sp
  275. .in 0.32i
  276. \fB<nButton>\fR is the mouse button number:
  277. .sp
  278. .in 1.2i
  279. .ta 0.88i
  280. .br
  281. 0 - Left    Button
  282. .br
  283. .ta
  284. .ta 0.88i
  285. .br
  286. 1 - Right    Button
  287. .br
  288. .ta
  289. .br
  290. 2 - Middle Button [if applicable]
  291. .sp
  292. .in 0.32i
  293. \fB<nButPrs>\fR is the number of times the specified button was pressed
  294. .in 1.12i
  295. since the last call to this routine\. PASSED BY REFERENCE\.
  296. .in 0.32i
  297. \fB<nX>\fR is the X position of the cursor when the last press occurred\. PASSED
  298. .in 1.12i
  299. BY REFERENCE\.
  300. .in 0.32i
  301. \fB<nY>\fR is the Y position of the cursor when the last press occurred\. PASSED
  302. .in 1.12i
  303. BY REFERENCE\.
  304. .sp
  305. .sp
  306. .in 0.08i
  307. \fBReturns
  308. .sp
  309. .in 0.32i
  310. An integer representing the button status:
  311. .sp
  312. .in 1.2i
  313. .br
  314. 0 - no buttons pressed
  315. .br
  316. 1 - left button pressed
  317. .br
  318. 2 - right button pressed
  319. .br
  320. 3 - left and right pressed
  321. .br
  322. 4 - middle pressed
  323. .br
  324. 5 - left and middle pressed
  325. .br
  326. 6 - middle and right buttons pressed
  327. .br
  328. 7 - all 3 buttons pressed
  329. .sp
  330. .in 0.08i
  331. \fBDescription
  332. .sp
  333. .in 0.32i
  334. Retrieves the mouse button status\.
  335. .sp
  336. .in 0.08i
  337. \fBExamples
  338. .sp
  339. .in 0.32i
  340. IF Empty( FT_MBUTPRS(1) )
  341. .in 0.56i
  342. ? "No Item selected"
  343. .in 0.32i
  344. ENDIF
  345. .sp
  346. .in 0.08i
  347. \fBSource:\fR MOUSE1\.PRG
  348. .sp
  349. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  350. .in 0i
  351. .sp
  352. .in 1.5i
  353. .ti -1.5i
  354. .ta 1.5i
  355. .ft B
  356. See Also:    
  357. .ft R
  358. FT_MBUTREL()
  359. , FT_MDBLCLK()
  360. .ta 1.63265i
  361. .in 0i
  362. .sp 2
  363. .ne 20
  364. .ps +3
  365. .vs +3
  366. FT_MBUTREL()    Get mouse button release information
  367. .br
  368. .ta
  369. .in 0.08i
  370. .ps -3
  371. .vs -3
  372. .sp 2
  373. \fBFT_MBUTREL()
  374. Get mouse button release information
  375. .in 0i
  376. .br
  377. \l'6.24i'
  378. .br
  379. .sp
  380. .in 0.08i
  381. \fBSyntax
  382. .sp
  383. .in 0.4i
  384. \fBFT_MBUTREL( nButton [, @nButRel [, @nX [, @nY] ] ]) -> nBStat
  385. .sp
  386. .in 0.08i
  387. \fBArguments
  388. .sp
  389. .in 0.4i
  390. \fB<nButton>\fR is the mouse button number
  391. .in 1.2i
  392. .ta 0.88i
  393. .br
  394. 0 - Left    Button
  395. .br
  396. .ta
  397. .ta 0.88i
  398. .br
  399. 1 - Right    Button
  400. .br
  401. .ta
  402. .br
  403. 2 - Middle Button [if applicable]
  404. .sp
  405. .in 0.32i
  406. \fB<nButRel>\fR is the number of times the specified button was released
  407. .in 1.12i
  408. since the last call to this routine\. PASSED BY REFERENCE\.
  409. .sp
  410. .in 0.32i
  411. \fB<nX>\fR is the X position of the cursor when the last release occurred\.
  412. .in 1.12i
  413. PASSED BY REFERENCE\.
  414. .sp
  415. .in 0.32i
  416. \fB<nY>\fR is the Y position of the cursor when the last release occurred\.
  417. .in 1.12i
  418. PASSED BY REFERENCE\.
  419. .sp
  420. .in 0.08i
  421. \fBReturns
  422. .sp
  423. .in 0.4i
  424. .ta 0.8i
  425. <nBStat>    - an integer representing button release status
  426. .br
  427. .ta
  428. .in 1.36i
  429. .br
  430. 0 - None
  431. .br
  432. 1 - Left
  433. .br
  434. 2 - Right
  435. .br
  436. 3 - Middle
  437. .sp
  438. .in 0.08i
  439. \fBDescription
  440. .sp
  441. .in 0.4i
  442. This function returns the release status of the mouse buttons\.
  443. .sp
  444. .in 0.08i
  445. \fBExamples
  446. .sp
  447. .in 0.4i
  448. IF( FT_MBUTREL( 0 ) == 1 )
  449. .in 0.64i
  450. ? "Left button released"
  451. .in 0.4i
  452. ENDIF
  453. .sp
  454. .in 0.08i
  455. \fBSource:\fR MOUSE1\.PRG
  456. .sp
  457. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  458. .in 0i
  459. .sp
  460. .in 1.5i
  461. .ti -1.5i
  462. .ta 1.5i
  463. .ft B
  464. See Also:    
  465. .ft R
  466. FT_MBUTPRS()
  467. , FT_MDBLCLK()
  468. .ta 1.63265i
  469. .in 0i
  470. .sp 2
  471. .ne 20
  472. .ps +3
  473. .vs +3
  474. FT_MCURSOR()    Set the mouse cursor
  475. .br
  476. .ta
  477. .in 0.08i
  478. .ps -3
  479. .vs -3
  480. .sp 2
  481. \fBFT_MCURSOR()
  482. Set the mouse cursor
  483. .in 0i
  484. .br
  485. \l'6.24i'
  486. .br
  487. .sp
  488. .in 0.08i
  489. \fBSyntax
  490. .sp
  491. .in 0.32i
  492. \fBFT_MCURSOR( [ <lState> ] ) -> lCursorState
  493. .sp
  494. .in 0.08i
  495. \fBArguments
  496. .sp
  497. .in 0.32i
  498. \fB<lState>\fR is a logical indicating whether to set the mouse cursor on\.
  499. .in 1.04i
  500. .br
  501. \.T\. - set mouse cursor on
  502. .br
  503. \.F\. - set mouse cursor off
  504. .br
  505. If omitted, no change is made to cursor state
  506. .sp
  507. .in 0.08i
  508. \fBReturns
  509. .sp
  510. .in 0.32i
  511. A logical indicating the previous mouse cursor state\.
  512. .sp
  513. .in 0.08i
  514. \fBDescription
  515. .sp
  516. .in 0.32i
  517. This function works like most Clipper state functions\.  If no value
  518. is sent to FT_MCURSOR() it will return the state of the mouse cursor\.
  519. .sp
  520. .in 0.08i
  521. \fBExamples
  522. .sp
  523. .in 0.32i
  524. IF !( FT_MCURSOR() )
  525. .in 0.56i
  526. FT_MCURSOR( \.T\. )
  527. .in 0.32i
  528. ENDIF
  529. .sp
  530. .in 0.08i
  531. \fBSource:\fR MOUSE1\.PRG
  532. .sp
  533. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  534. .in 0i
  535. .ta 1.63265i
  536. .sp 2
  537. .ne 20
  538. .ps +3
  539. .vs +3
  540. FT_MDBLCLK()    Return true if a double click was detected
  541. .br
  542. .ta
  543. .in 0.08i
  544. .ps -3
  545. .vs -3
  546. .sp 2
  547. \fBFT_MDBLCLK()
  548. Return true if a double click was detected
  549. .in 0i
  550. .br
  551. \l'6.24i'
  552. .br
  553. .sp
  554. .in 0.08i
  555. \fBSyntax
  556. .sp
  557. .in 0.32i
  558. \fBFT_MDBFCLK( [ <nClick> [, <nButton> [, <nInterval> [, <nRow> [, <nCol>;
  559. .in 1.28i
  560. \fB[, <nTime> ] ] ] ] ] ] ) -> lIsDoubleClk
  561. .sp
  562. .in 0.08i
  563. \fBArguments
  564. .sp
  565. .in 0.32i
  566. \fB<nClick>\fR is a numeric value\.  If it is zero FT_MDBLCLK() will not
  567. .in 1.04i
  568. check for the first press but rather will simply wait the
  569. specified period for a single press\. This is useful if this
  570. routine is called from one which in turn responded to a button
  571. press\. If it is not present or not equal to 0, then FT_MDBLCLK()
  572. will wait for two presses of the specified button\.
  573. .sp
  574. .in 0.32i
  575. \fB<nButton>\fR is the mouse button number
  576. .in 1.2i
  577. .ta 0.88i
  578. .br
  579. 0 - Left    Button
  580. .br
  581. .ta
  582. .ta 0.88i
  583. .br
  584. 1 - Right    Button
  585. .br
  586. .ta
  587. .br
  588. 2 - Middle Button [if applicable]
  589. .sp
  590. .in 0.32i
  591. \fB<nInterval>\fR is the interval to wait for the first click if requested
  592. .in 0.88i
  593. and the time to wait for the second\. If not present then defaults
  594. to 0\.5 second\.
  595. .sp
  596. .in 0.32i
  597. \fB<nRow>\fR is the row number for the mouse cursor location for a double click
  598. .in 0.88i
  599. to be valid\. If not present then the current position is taken as
  600. the valid location\.
  601. .sp
  602. .in 0.32i
  603. \fB<nCol>\fR is the column number for the mouse cursor location for a double
  604. .in 0.88i
  605. click to be valid\. If not present, then the current position is
  606. taken as the valid location\.
  607. .sp
  608. .in 0.32i
  609. \fB<nTime>\fR is an optional start time for the waiting period for the first
  610. .in 0.88i
  611. click (of either one or two requested)\. If not given then the
  612. time is set at entry into this routine\. This is useful when this
  613. routine is called from another routine which was called in
  614. response to a mouse click but needs to know if a double click
  615. has occurred
  616. .sp
  617. .in 0.08i
  618. \fBReturns
  619. .sp
  620. .in 0.32i
  621. \.T\. if a double click was detected\.
  622. .sp
  623. .in 0.08i
  624. \fBDescription
  625. .sp
  626. .in 0.32i
  627. This is a mouse meta function that checks for the presence
  628. of a double click\.
  629. .sp
  630. .in 0.08i
  631. \fBExamples
  632. .sp
  633. .in 0.24i
  634. .br
  635. IF FT_MISREGION( 10, 10, 11, 20 ) \.AND\.;
  636. .in 0.48i
  637. .ta 3.2i
  638. .br
  639. FT_MDBLCLK(0,1,,FT_MGETX(),FT_MGETY())    && double click, right button
  640. .br
  641. .ta
  642. .in 3.68i
  643. .br
  644. && at current location with
  645. .br
  646. && default interval
  647. .sp
  648. .in 0.72i
  649. .br
  650. MnuItem1()
  651. .in 0.24i
  652. .br
  653. ENDIF
  654. .sp
  655. .in 0.08i
  656. \fBSource:\fR MOUSE1\.PRG
  657. .sp
  658. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  659. .in 0i
  660. .sp
  661. .in 1.5i
  662. .ti -1.5i
  663. .ta 1.5i
  664. .ft B
  665. See Also:    
  666. .ft R
  667. FT_MBUTPRS()
  668. , FT_MBUTREL()
  669. .ta 1.63265i
  670. .in 0i
  671. .sp 2
  672. .ne 20
  673. .ps +3
  674. .vs +3
  675. FT_MDEFCRS()    Define the mouse cursor
  676. .br
  677. .ta
  678. .in 0.08i
  679. .ps -3
  680. .vs -3
  681. .sp 2
  682. \fBFT_MDEFCRS()
  683. Define the mouse cursor
  684. .in 0i
  685. .br
  686. \l'6.24i'
  687. .br
  688. .sp
  689. .in 0.08i
  690. \fBSyntax
  691. .sp
  692. .in 0.32i
  693. \fBFT_MDEFCRS( <nCrsType>, <nScrMask>, <nCrsMask> ) -> NIL
  694. .sp
  695. .in 0.08i
  696. \fBArguments
  697. .sp
  698. .in 0.32i
  699. \fB<nCrsType>\fR is the cursor type\.
  700. .sp
  701. \fB<nScrMask>\fR is the screen mask\.
  702. .sp
  703. \fB<nCrsMask>\fR is the cursor mask\.
  704. .sp
  705. .in 0.08i
  706. \fBReturns
  707. .sp
  708. .in 0.32i
  709. NIL
  710. .sp
  711. .in 0.08i
  712. \fBDescription
  713. .sp
  714. .in 0.32i
  715. Defines the cursor type
  716. .sp
  717. .in 0.08i
  718. \fBExamples
  719. .sp
  720. .sp
  721. \fBSource:\fR MOUSE1\.PRG
  722. .sp
  723. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  724. .in 0i
  725. .ta 1.63265i
  726. .sp 2
  727. .ne 20
  728. .ps +3
  729. .vs +3
  730. FT_MGETPOS()    Get mouse cursor position and button status
  731. .br
  732. .ta
  733. .in 0.08i
  734. .ps -3
  735. .vs -3
  736. .sp 2
  737. \fBFT_MGETPOS()
  738. Get mouse cursor position and button status
  739. .in 0i
  740. .br
  741. \l'6.24i'
  742. .br
  743. .sp
  744. .in 0.08i
  745. \fBSyntax
  746. .sp
  747. .in 0.32i
  748. \fBFT_MGETPOS( @<nX>, @<nY> ) -> nButtonStatus
  749. .sp
  750. .in 0.08i
  751. \fBArguments
  752. .sp
  753. .in 0.32i
  754. \fB<nX>\fR is a variable that will receive the mouse X position\.  It must
  755. be passed by reference\.
  756. .sp
  757. \fB<nY>\fR is a variable that will receive the mouse Y position\.  It must
  758. be passed by reference\.
  759. .sp
  760. .in 0.08i
  761. \fBReturns
  762. .sp
  763. .in 0.32i
  764. an integer representing button status
  765. .sp
  766. .in 0.8i
  767. .br
  768. - 0 for no button pressed
  769. .br
  770. - 1 for left pressed
  771. .br
  772. - 2 for right pressed
  773. .br
  774. - 3 for left and right pressed
  775. .br
  776. - 4 for middle pressed
  777. .br
  778. - 5 for left and middle pressed
  779. .br
  780. - 6 for right and middle pressed
  781. .br
  782. - 0 for all three buttons pressed
  783. .sp
  784. .in 0.08i
  785. \fBDescription
  786. .sp
  787. .in 0.32i
  788. Loads cursor position into x and y coordinates passed by reference and
  789. returns the button status\.
  790. .sp
  791. .in 0.08i
  792. \fBExamples
  793. .sp
  794. .in 0.32i
  795. .br
  796. LOCAL nX, nY
  797. .br
  798. LOCAL nButton := FT_MGETPOS( @nX, @nY )
  799. .ta 1.28i
  800. .br
  801. ? "Mouse Row    :", nX
  802. .br
  803. .ta
  804. .br
  805. ? "Mouse Column :", nY
  806. .br
  807. ? "Button Status:", nButton
  808. .sp
  809. .in 0.08i
  810. \fBSource:\fR MOUSE1\.PRG
  811. .sp
  812. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  813. .in 0i
  814. .sp
  815. .in 1.5i
  816. .ti -1.5i
  817. .ta 1.5i
  818. .ft B
  819. See Also:    
  820. .ft R
  821. FT_MSETPOS()
  822. , FT_MDEFCRS()
  823. , FT_MGETX()
  824. , FT_MGETY()
  825. .ta 1.63265i
  826. .in 0i
  827. .sp 2
  828. .ne 20
  829. .ps +3
  830. .vs +3
  831. FT_MGETX()    Get mouse cursor row position
  832. .br
  833. .ta
  834. .in 0.08i
  835. .ps -3
  836. .vs -3
  837. .sp 2
  838. \fBFT_MGETX()
  839. Get mouse cursor row position
  840. .in 0i
  841. .br
  842. \l'6.24i'
  843. .br
  844. .sp
  845. .in 0.08i
  846. \fBSyntax
  847. .sp
  848. .in 0.32i
  849. \fBFT_MGETX() -> nRowPos
  850. .sp
  851. .in 0.08i
  852. \fBArguments
  853. .sp
  854. .in 0.32i
  855. NONE
  856. .sp
  857. .in 0.08i
  858. \fBReturns
  859. .sp
  860. .in 0.32i
  861. Row position of mouse
  862. .sp
  863. .in 0.08i
  864. \fBDescription
  865. .sp
  866. .in 0.32i
  867. Retrieves mouse\'s row position
  868. .sp
  869. .in 0.08i
  870. \fBExamples
  871. .sp
  872. .in 0.32i
  873. ? FT_MGETX()
  874. .sp
  875. .in 0.08i
  876. \fBSource:\fR MOUSE1\.PRG
  877. .sp
  878. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  879. .in 0i
  880. .sp
  881. .in 1.5i
  882. .ti -1.5i
  883. .ta 1.5i
  884. .ft B
  885. See Also:    
  886. .ft R
  887. FT_MDEFCRS()
  888. , FT_MGETPOS()
  889. , FT_MGETY()
  890. .ta 1.63265i
  891. .in 0i
  892. .sp 2
  893. .ne 20
  894. .ps +3
  895. .vs +3
  896. FT_MGETY()    Get mouse cursor column position
  897. .br
  898. .ta
  899. .in 0.08i
  900. .ps -3
  901. .vs -3
  902. .sp 2
  903. \fBFT_MGETY()
  904. Get mouse cursor column position
  905. .in 0i
  906. .br
  907. \l'6.24i'
  908. .br
  909. .sp
  910. .in 0.08i
  911. \fBSyntax
  912. .sp
  913. .in 0.32i
  914. \fBFT_MGETY() -> nColPos
  915. .sp
  916. .in 0.08i
  917. \fBArguments
  918. .sp
  919. .in 0.32i
  920. NONE
  921. .sp
  922. .in 0.08i
  923. \fBReturns
  924. .sp
  925. .in 0.32i
  926. Column position of mouse\.
  927. .sp
  928. .in 0.08i
  929. \fBDescription
  930. .sp
  931. .in 0.32i
  932. Retrieves mouse\'s column position\.
  933. .sp
  934. .in 0.08i
  935. \fBExamples
  936. .sp
  937. .in 0.32i
  938. ? FT_MGETY()
  939. .sp
  940. .in 0.08i
  941. \fBSource:\fR MOUSE1\.PRG
  942. .sp
  943. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  944. .in 0i
  945. .sp
  946. .in 1.5i
  947. .ti -1.5i
  948. .ta 1.5i
  949. .ft B
  950. See Also:    
  951. .ft R
  952. FT_MDEFCRS()
  953. , FT_MGETPOS()
  954. , FT_MGETX()
  955. .ta 1.63265i
  956. .in 0i
  957. .sp 2
  958. .ne 20
  959. .ps +3
  960. .vs +3
  961. FT_MHIDECRS()    Decrement internal mouse cursor flag and hide mouse cursor
  962. .br
  963. .ta
  964. .in 0.08i
  965. .ps -3
  966. .vs -3
  967. .sp 2
  968. \fBFT_MHIDECRS()
  969. Decrement internal mouse cursor flag and hide mouse cursor
  970. .in 0i
  971. .br
  972. \l'6.24i'
  973. .br
  974. .sp
  975. .in 0.08i
  976. \fBSyntax
  977. .sp
  978. .in 0.32i
  979. \fBFT_MHIDECRS() -> NIL
  980. .sp
  981. .in 0.08i
  982. \fBArguments
  983. .sp
  984. .in 0.32i
  985. NONE
  986. .sp
  987. .in 0.08i
  988. \fBReturns
  989. .sp
  990. .in 0.32i
  991. NIL
  992. .sp
  993. .in 0.08i
  994. \fBDescription
  995. .sp
  996. .in 0.32i
  997. Hides the mouse cursor\. Make sure to turn the mouse cursor off when
  998. redrawing screens\.  The mouse cursor dutifully saves the screen
  999. under it, so if you draw over the mouse cursor it will create a
  1000. "hole" in your screen when you move the mouse cursor\.
  1001. .sp
  1002. .in 0.08i
  1003. \fBExamples
  1004. .sp
  1005. .in 0.32i
  1006. .br
  1007. FT_MHIDECRS()
  1008. .br
  1009. @ 10, 10 to 20, 20
  1010. .br
  1011. FT_MSHOWCRS()
  1012. .sp
  1013. .in 0.08i
  1014. \fBSource:\fR MOUSE1\.PRG
  1015. .sp
  1016. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1017. .in 0i
  1018. .sp
  1019. .in 1.5i
  1020. .ti -1.5i
  1021. .ta 1.5i
  1022. .ft B
  1023. See Also:    
  1024. .ft R
  1025. FT_MSHOWCRS()
  1026. .ta 1.63265i
  1027. .in 0i
  1028. .sp 2
  1029. .ne 20
  1030. .ps +3
  1031. .vs +3
  1032. FT_MINREGION()    Test if the mouse cursor is in the passed region
  1033. .br
  1034. .ta
  1035. .in 0.08i
  1036. .ps -3
  1037. .vs -3
  1038. .sp 2
  1039. \fBFT_MINREGION()
  1040. Test if the mouse cursor is in the passed region
  1041. .in 0i
  1042. .br
  1043. \l'6.24i'
  1044. .br
  1045. .sp
  1046. .in 0.08i
  1047. \fBSyntax
  1048. .sp
  1049. .in 0.32i
  1050. \fBFT_MINREGION( <nT>, <nL>, <nB>, <nR> ) -> lInRegion
  1051. .sp
  1052. .in 0.08i
  1053. \fBArguments
  1054. .sp
  1055. .in 0.32i
  1056. \fB<nT>\fR, \fB<nL>\fR \fB<nB>\fR \fB<nR>\fR are the four corners of the screen region\.
  1057. .sp
  1058. .in 0.08i
  1059. \fBReturns
  1060. .sp
  1061. .in 0.32i
  1062. \.T\. if mouse is in specified region\.
  1063. .sp
  1064. .in 0.08i
  1065. \fBDescription
  1066. .sp
  1067. .in 0.32i
  1068. This function will check to see if the mouse cursor is
  1069. within the confines of the specified region\.
  1070. .sp
  1071. .in 0.08i
  1072. \fBExamples
  1073. .sp
  1074. .in 0.32i
  1075. .br
  1076. IF FT_MINREGION( 10, 10, 11, 20 )
  1077. .in 0.48i
  1078. .br
  1079. nChoice := 1
  1080. .in 0.32i
  1081. .br
  1082. ENDIF
  1083. .sp
  1084. .in 0.08i
  1085. \fBSource:\fR MOUSE1\.PRG
  1086. .sp
  1087. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1088. .in 0i
  1089. .sp
  1090. .in 1.5i
  1091. .ti -1.5i
  1092. .ta 1.5i
  1093. .ft B
  1094. See Also:    
  1095. .ft R
  1096. FT_MXLIMIT()
  1097. , FT_MYLIMIT()
  1098. , FT_MINREGION()
  1099. .ta 1.63265i
  1100. .in 0i
  1101. .sp 2
  1102. .ne 20
  1103. .ps +3
  1104. .vs +3
  1105. FT_MMICKEYS()    Get mickeys
  1106. .br
  1107. .ta
  1108. .in 0.08i
  1109. .ps -3
  1110. .vs -3
  1111. .sp 2
  1112. \fBFT_MMICKEYS()
  1113. Get mickeys
  1114. .in 0i
  1115. .br
  1116. \l'6.24i'
  1117. .br
  1118. .sp
  1119. .in 0.08i
  1120. \fBSyntax
  1121. .sp
  1122. .in 0.32i
  1123. \fBFT_MMICKEYS( @<nX>, @<nY> ) -> NIL
  1124. .sp
  1125. .in 0.08i
  1126. \fBArguments
  1127. .sp
  1128. .in 0.32i
  1129. \fB<nX>\fR is a variable that will receive the vertical mickey count\.
  1130. .sp
  1131. \fB<nY>\fR is a variable that will receive the horizontal mickey count\.
  1132. .sp
  1133. .in 0.08i
  1134. \fBReturns
  1135. .sp
  1136. .in 0.32i
  1137. NIL
  1138. .sp
  1139. .in 0.08i
  1140. \fBDescription
  1141. .sp
  1142. .in 0.32i
  1143. <nX> and <nY> must be passed by reference to receive
  1144. the mouse position in Mickeys\.
  1145. .sp
  1146. .in 0.08i
  1147. \fBExamples
  1148. .sp
  1149. .in 0.32i
  1150. .br
  1151. FT_MMICKEYS( @nX, @nY )
  1152. .br
  1153. ? nX
  1154. .br
  1155. ? nY
  1156. .sp
  1157. .in 0.08i
  1158. \fBSource:\fR MOUSE1\.PRG
  1159. .sp
  1160. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1161. .in 0i
  1162. .ta 1.63265i
  1163. .sp 2
  1164. .ne 20
  1165. .ps +3
  1166. .vs +3
  1167. FT_MRESET()    Reset mouse driver and return status of mouse
  1168. .br
  1169. .ta
  1170. .in 0.08i
  1171. .ps -3
  1172. .vs -3
  1173. .sp 2
  1174. \fBFT_MRESET()
  1175. Reset mouse driver and return status of mouse
  1176. .in 0i
  1177. .br
  1178. \l'6.24i'
  1179. .br
  1180. .sp
  1181. .in 0.08i
  1182. \fBSyntax
  1183. .sp
  1184. .in 0.32i
  1185. \fBFT_MRESET() -> nMouseStatus
  1186. .sp
  1187. .in 0.08i
  1188. \fBArguments
  1189. .sp
  1190. .in 0.32i
  1191. NONE
  1192. .sp
  1193. .in 0.08i
  1194. \fBReturns
  1195. .sp
  1196. .in 0.32i
  1197. An integer representing the mouse status (0 == mouse not installed)
  1198. .sp
  1199. .in 0.08i
  1200. \fBDescription
  1201. .sp
  1202. .in 0.32i
  1203. Resets the mouse driver and returns mouse status\. Use FT_MSHOWCRS()
  1204. to display the mouse cursor\.
  1205. .sp
  1206. .in 0.08i
  1207. \fBExamples
  1208. .sp
  1209. .in 0.32i
  1210. IF Empty( FT_MRESET() )
  1211. .in 0.56i
  1212. ? "No mouse driver is installed"
  1213. .in 0.32i
  1214. ENDIF
  1215. .sp
  1216. .in 0.08i
  1217. \fBSource:\fR MOUSE1\.PRG
  1218. .sp
  1219. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1220. .in 0i
  1221. .sp
  1222. .in 1.5i
  1223. .ti -1.5i
  1224. .ta 1.5i
  1225. .ft B
  1226. See Also:    
  1227. .ft R
  1228. FT_MSHOWCRS()
  1229. .ta 1.63265i
  1230. .in 0i
  1231. .sp 2
  1232. .ne 20
  1233. .ps +3
  1234. .vs +3
  1235. FT_MSETPOS()    Position the mouse cursor
  1236. .br
  1237. .ta
  1238. .in 0.08i
  1239. .ps -3
  1240. .vs -3
  1241. .sp 2
  1242. \fBFT_MSETPOS()
  1243. Position the mouse cursor
  1244. .in 0i
  1245. .br
  1246. \l'6.24i'
  1247. .br
  1248. .sp
  1249. .in 0.08i
  1250. \fBSyntax
  1251. .sp
  1252. .in 0.32i
  1253. \fBFT_MSETPOS( <nX>, <nY> ) -> NIL
  1254. .sp
  1255. .in 0.08i
  1256. \fBArguments
  1257. .sp
  1258. .in 0.32i
  1259. \fB<nX>\fR is the desired mouse row\.
  1260. .sp
  1261. \fB<nY>\fR is the desired mouse column\.
  1262. .sp
  1263. .in 0.08i
  1264. \fBReturns
  1265. .sp
  1266. .in 0.32i
  1267. NIL
  1268. .sp
  1269. .in 0.08i
  1270. \fBDescription
  1271. .sp
  1272. .in 0.32i
  1273. Positions mouse cursor on screen\.
  1274. .sp
  1275. .in 0.08i
  1276. \fBExamples
  1277. .sp
  1278. .in 0.32i
  1279. .ta 2i
  1280. FT_MSETPOS( 10, 20 )    // position mouse cursor at row 10, col 20
  1281. .br
  1282. .ta
  1283. .sp
  1284. .in 0.08i
  1285. \fBSource:\fR MOUSE1\.PRG
  1286. .sp
  1287. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1288. .in 0i
  1289. .sp
  1290. .in 1.5i
  1291. .ti -1.5i
  1292. .ta 1.5i
  1293. .ft B
  1294. See Also:    
  1295. .ft R
  1296. FT_MGETPOS()
  1297. , FT_MDEFCRS()
  1298. , FT_MGETX()
  1299. , FT_MGETY()
  1300. .ta 1.63265i
  1301. .in 0i
  1302. .sp 2
  1303. .ne 20
  1304. .ps +3
  1305. .vs +3
  1306. FT_MSHOWCRS()    Increment internal cursor flag and display mouse cursor
  1307. .br
  1308. .ta
  1309. .in 0.08i
  1310. .ps -3
  1311. .vs -3
  1312. .sp 2
  1313. \fBFT_MSHOWCRS()
  1314. Increment internal cursor flag and display mouse cursor
  1315. .in 0i
  1316. .br
  1317. \l'6.24i'
  1318. .br
  1319. .sp
  1320. .in 0.08i
  1321. \fBSyntax
  1322. .sp
  1323. .in 0.32i
  1324. \fBFT_MSHOWCRS() -> NIL
  1325. .sp
  1326. .in 0.08i
  1327. \fBArguments
  1328. .sp
  1329. .in 0.32i
  1330. NONE
  1331. .sp
  1332. .in 0.08i
  1333. \fBReturns
  1334. .sp
  1335. .in 0.32i
  1336. NIL
  1337. .sp
  1338. .in 0.08i
  1339. \fBDescription
  1340. .sp
  1341. .in 0.32i
  1342. Displays the mouse cursor\. Make sure to turn the mouse cursor off
  1343. when redrawing screens\.  The mouse cursor dutifully saves the screen
  1344. under it, so if you draw over the mouse cursor it will create a "hole"
  1345. in your screen when you move the mouse cursor\.
  1346. .sp
  1347. .in 0.08i
  1348. \fBExamples
  1349. .sp
  1350. .in 0.32i
  1351. .br
  1352. IF Empty( FT_MRESET() )
  1353. .in 0.56i
  1354. .br
  1355. FT_MSHOWCRS()
  1356. .in 0.32i
  1357. .br
  1358. ENDIF
  1359. .sp
  1360. .in 0.08i
  1361. \fBSource:\fR MOUSE1\.PRG
  1362. .sp
  1363. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1364. .in 0i
  1365. .sp
  1366. .in 1.5i
  1367. .ti -1.5i
  1368. .ta 1.5i
  1369. .ft B
  1370. See Also:    
  1371. .ft R
  1372. FT_MHIDECRS()
  1373. .ta 1.63265i
  1374. .in 0i
  1375. .sp 2
  1376. .ne 20
  1377. .ps +3
  1378. .vs +3
  1379. FT_MXLIMIT()    Set vertical bounds of mouse travel
  1380. .br
  1381. .ta
  1382. .in 0.08i
  1383. .ps -3
  1384. .vs -3
  1385. .sp 2
  1386. \fBFT_MXLIMIT()
  1387. Set vertical bounds of mouse travel
  1388. .in 0i
  1389. .br
  1390. \l'6.24i'
  1391. .br
  1392. .sp
  1393. .in 0.08i
  1394. \fBSyntax
  1395. .sp
  1396. .in 0.32i
  1397. \fBFT_MXLIMIT( <nX1>, <nX2> ) -> NIL
  1398. .sp
  1399. .in 0.08i
  1400. \fBArguments
  1401. .sp
  1402. .in 0.32i
  1403. \fB<nX1>\fR is the top row limit\.
  1404. .sp
  1405. \fB<nX2>\fR is the bottom row limit\.
  1406. .sp
  1407. .in 0.08i
  1408. \fBReturns
  1409. .sp
  1410. .in 0.32i
  1411. NIL
  1412. .sp
  1413. .in 0.08i
  1414. \fBDescription
  1415. .sp
  1416. .in 0.32i
  1417. Set maximum vertical bounds of mouse\.
  1418. .sp
  1419. .in 0.08i
  1420. \fBExamples
  1421. .sp
  1422. .in 0.32i
  1423. FT_MXLIMIT( 10, 20 )
  1424. .sp
  1425. .in 0.08i
  1426. \fBSource:\fR MOUSE1\.PRG
  1427. .sp
  1428. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1429. .in 0i
  1430. .sp
  1431. .in 1.5i
  1432. .ti -1.5i
  1433. .ta 1.5i
  1434. .ft B
  1435. See Also:    
  1436. .ft R
  1437. FT_MYLIMIT()
  1438. , FT_MINREGION()
  1439. .ta 1.63265i
  1440. .in 0i
  1441. .sp 2
  1442. .ne 20
  1443. .ps +3
  1444. .vs +3
  1445. FT_MYLIMIT()    Set horizontal bounds of mouse travel
  1446. .br
  1447. .ta
  1448. .in 0.08i
  1449. .ps -3
  1450. .vs -3
  1451. .sp 2
  1452. \fBFT_MYLIMIT()
  1453. Set horizontal bounds of mouse travel
  1454. .in 0i
  1455. .br
  1456. \l'6.24i'
  1457. .br
  1458. .sp
  1459. .in 0.08i
  1460. \fBSyntax
  1461. .sp
  1462. .in 0.32i
  1463. \fBFT_MYLIMIT( <nY1>, <nY2> ) -> NIL
  1464. .sp
  1465. .in 0.08i
  1466. \fBArguments
  1467. .sp
  1468. .in 0.32i
  1469. \fB<nY1>\fR is the left column limit\.
  1470. .sp
  1471. \fB<nY2>\fR is the right column limit\.
  1472. .sp
  1473. .in 0.08i
  1474. \fBReturns
  1475. .sp
  1476. .in 0.32i
  1477. NIL
  1478. .sp
  1479. .in 0.08i
  1480. \fBDescription
  1481. .sp
  1482. .in 0.32i
  1483. Set maximum horizontal bounds of mouse\.
  1484. .sp
  1485. .in 0.08i
  1486. \fBExamples
  1487. .sp
  1488. .in 0.32i
  1489. FT_MYLIMIT( 10, 20 )
  1490. .sp
  1491. .in 0.08i
  1492. \fBSource:\fR MOUSE1\.PRG
  1493. .sp
  1494. \fBAuthor:\fR Robert DiFalco and Leo Letendre
  1495. .in 0i
  1496. .sp
  1497. .in 1.5i
  1498. .ti -1.5i
  1499. .ta 1.5i
  1500. .ft B
  1501. See Also:    
  1502. .ft R
  1503. FT_MXLIMIT()
  1504. , FT_MINREGION()
  1505. .ta 1.63265i
  1506. .in 0i
  1507. .sp 2
  1508. .ne 20
  1509. .ps +3
  1510. .vs +3
  1511. FT_NUMLOCK()    Return status of NumLock key
  1512. .br
  1513. .ta
  1514. .in 0.08i
  1515. .ps -3
  1516. .vs -3
  1517. .sp 2
  1518. \fBFT_NUMLOCK()
  1519. Return status of NumLock key
  1520. .in 0i
  1521. .br
  1522. \l'6.24i'
  1523. .br
  1524. .sp
  1525. .in 0.08i
  1526. \fBSyntax
  1527. .sp
  1528. .in 0.4i
  1529. \fBFT_NUMLOCK( [ <lNewSetting> ] ) -> lCurrentSetting
  1530. .sp
  1531. .in 0.08i
  1532. \fBArguments
  1533. .sp
  1534. .in 0.4i
  1535. \fB<lNewSetting>\fR is optional and if supplied is the new setting
  1536. for the CapLock key\.  Specify \.T\. to turn CapLock on, or \.F\. to
  1537. turn it off\.
  1538. .sp
  1539. .in 0.08i
  1540. \fBReturns
  1541. .sp
  1542. .in 0.4i
  1543. lValue is \.T\. if NumLock is set, \.F\. if it isn\'t set\.  The value
  1544. returned represents the setting in effect prior to any changes that
  1545. might by made by <lNewSetting>\.
  1546. .sp
  1547. .in 0.08i
  1548. \fBDescription
  1549. .sp
  1550. .in 0.4i
  1551. This function is useful if you need to know or set the status of the
  1552. NumLock key for some reason\.
  1553. .sp
  1554. .in 0.08i
  1555. \fBExamples
  1556. .sp
  1557. .in 0.4i
  1558. IF FT_NUMLOCK()
  1559. .in 0.64i
  1560. Qout( "NumLock is active" )
  1561. .in 0.4i
  1562. ENDIF
  1563. .sp
  1564. .in 0.24i
  1565. Another one, slightly strange, courtesy of Glenn Scott:
  1566. .sp
  1567. .sp
  1568. .in 0.56i
  1569. function numBlink()
  1570. .in 0.8i
  1571. local lOldNum := ft_numlock()
  1572. .sp
  1573. while inkey( \.5 ) != 27
  1574. .in 1.04i
  1575. ft_numlock( !ft_numlock() )
  1576. .in 0.8i
  1577. end
  1578. .sp
  1579. return ft_numlock( lOldNum )
  1580. .sp
  1581. .in 0.08i
  1582. \fBSource:\fR NUMLOCK\.C
  1583. .sp
  1584. \fBAuthor:\fR Ted Means
  1585. .in 0i
  1586. .sp
  1587. .in 1.5i
  1588. .ti -1.5i
  1589. .ta 1.5i
  1590. .ft B
  1591. See Also:    
  1592. .ft R
  1593. FT_CAPLOCK()
  1594. , FT_CTRL()
  1595. , FT_PRTSCR()
  1596. , FT_SHIFT()
  1597. , FT_ALT()
  1598. .ta 1.63265i
  1599. .in 0i
  1600. .sp 2
  1601. .ne 20
  1602. .ps +3
  1603. .vs +3
  1604. FT_PRTSCR()    Enable or disable the Print Screen key
  1605. .br
  1606. .ta
  1607. .in 0.08i
  1608. .ps -3
  1609. .vs -3
  1610. .sp 2
  1611. \fBFT_PRTSCR()
  1612. Enable or disable the Print Screen key
  1613. .in 0i
  1614. .br
  1615. \l'6.24i'
  1616. .br
  1617. .sp
  1618. .in 0.08i
  1619. \fBSyntax
  1620. .sp
  1621. .in 0.4i
  1622. \fBFT_PRTSCR( [ <lSetStat> ] ) -> lCurStat
  1623. .sp
  1624. .in 0.08i
  1625. \fBArguments
  1626. .sp
  1627. .in 0.4i
  1628. \fB<lSetStat>\fR set to \.T\. will enable the Print Screen key,
  1629. \.F\. will disable it\.  If omitted, leaves status as is\.
  1630. .sp
  1631. .in 0.08i
  1632. \fBReturns
  1633. .sp
  1634. .in 0.4i
  1635. The current state: \.T\. if enabled, \.F\. if disabled\.
  1636. .sp
  1637. .in 0.08i
  1638. \fBDescription
  1639. .sp
  1640. .in 0.4i
  1641. This function is valuable if you have a need to disable the
  1642. printscreen key\.  It works by fooling the BIOS into thinking that
  1643. a printscreen is already in progress\.  The BIOS will then refuse
  1644. to invoke the printscreen handler\.
  1645. .sp
  1646. .in 0.08i
  1647. \fBExamples
  1648. .sp
  1649. .in 0.4i
  1650. .ta 1.84i
  1651. FT_PRTSCR( \.F\. )    && Disable the printscreen key
  1652. .br
  1653. .ta
  1654. .ta 1.84i
  1655. FT_PRTSCR( \.T\. )    && Enable the printscreen key
  1656. .br
  1657. .ta
  1658. .ta 1.84i
  1659. MemVar := FT_PRTSCR()    && Get the current status
  1660. .br
  1661. .ta
  1662. .sp
  1663. .in 0.08i
  1664. \fBSource:\fR PRTSCR\.C
  1665. .sp
  1666. \fBAuthor:\fR Ted Means
  1667. .in 0i
  1668. .sp
  1669. .in 1.5i
  1670. .ti -1.5i
  1671. .ta 1.5i
  1672. .ft B
  1673. See Also:    
  1674. .ft R
  1675. FT_CAPLOCK()
  1676. , FT_CTRL()
  1677. , FT_NUMLOCK()
  1678. , FT_SHIFT()
  1679. , FT_ALT()
  1680. .ta 1.63265i
  1681. .in 0i
  1682. .sp 2
  1683. .ne 20
  1684. .ps +3
  1685. .vs +3
  1686. FT_PUTKEY()    Stuff a keystroke into the keyboard buffer
  1687. .br
  1688. .ta
  1689. .in 0.08i
  1690. .ps -3
  1691. .vs -3
  1692. .sp 2
  1693. \fBFT_PUTKEY()
  1694. Stuff a keystroke into the keyboard buffer
  1695. .in 0i
  1696. .br
  1697. \l'6.24i'
  1698. .br
  1699. .sp
  1700. .in 0.08i
  1701. \fBSyntax
  1702. .sp
  1703. .in 0.4i
  1704. \fBFT_PUTKEY( <nKeyValue> ) -> lResult
  1705. .sp
  1706. .in 0.08i
  1707. \fBArguments
  1708. .sp
  1709. .in 0.4i
  1710. \fB<nKeyValue>\fR is the INKEY() value of the keystroke to be stuffed\.
  1711. .sp
  1712. .in 0.08i
  1713. \fBReturns
  1714. .sp
  1715. .in 0.32i
  1716. .br
  1717. \.T\. if the keystroke was put into the keyboard buffer\.
  1718. .br
  1719. \.F\. if nKeyValue was invalid or the buffer was full\.
  1720. .sp
  1721. .in 0.08i
  1722. \fBDescription
  1723. .sp
  1724. .in 0.32i
  1725. This function is similar to the KEYBOARD command, with a few
  1726. exceptions\. First, this function does not clear the keyboard buffer
  1727. before inserting the keystroke\.  In addition, since it uses the
  1728. Inkey() value, you can stuff any key, including function keys, into
  1729. the keyboard buffer\. However, this also means that unlike the KEYBOARD
  1730. command, you can only stuff one keystroke at a time\.
  1731. .sp
  1732. You can easily create a User-Defined Command that makes this function
  1733. even more like the KEYBOARD command\.  For example,
  1734. .sp
  1735. .in 0.64i
  1736. #command KEYSTROKE <key> => FT_PUTKEY( <key> )
  1737. .sp
  1738. .in 0.32i
  1739. will create a command called KEYSTROKE that could be used as a
  1740. companion command to KEYBOARD\.  The only difference is that it would
  1741. insert a single keystroke instead of a string\.
  1742. .sp
  1743. Be aware that early releases of Clipper 5\.0 have a bug in their
  1744. keyboard handling\.  Among other things, Set Typeahead does not work
  1745. correctly, so this function may at times return \.T\. even though the
  1746. keyboard buffer is full\.  The best solution is not to attempt stuffing
  1747. more than 15 keys at a time into the keyboard buffer\.
  1748. .sp
  1749. This function is written to adhere to Turbo Assembler\'s IDEAL mode\.
  1750. To use another assembler, rearrange the SEGMENT and PROC directives
  1751. and make any other necessary changes to the source code\.
  1752. .sp
  1753. .in 0.08i
  1754. \fBExamples
  1755. .sp
  1756. .in 0.48i
  1757. .ta 1.44i 1.76i
  1758. FT_PUTKEY( -9 )    //    Stuff the F10 key
  1759. .br
  1760. .ta
  1761. .ta 1.44i 1.76i
  1762. FT_PUTKEY( 276 )    //    Stuff the Alt T key
  1763. .br
  1764. .ta
  1765. .ta 1.44i 1.76i
  1766. KEYSTROKE 28    //    Stuff the F1 key using a User-Defined Command
  1767. .br
  1768. .ta
  1769. .sp
  1770. .in 0.08i
  1771. \fBSource:\fR PUTKEY\.ASM
  1772. .sp
  1773. \fBAuthor:\fR Ted Means
  1774. .in 0i
  1775. .ta 1.63265i
  1776. .sp 2
  1777. .ne 20
  1778. .ps +3
  1779. .vs +3
  1780. FT_SCANCODE()    Wait for keypress and return keyboard scan code
  1781. .br
  1782. .ta
  1783. .in 0.08i
  1784. .ps -3
  1785. .vs -3
  1786. .sp 2
  1787. \fBFT_SCANCODE()
  1788. Wait for keypress and return keyboard scan code
  1789. .in 0i
  1790. .br
  1791. \l'6.24i'
  1792. .br
  1793. .sp
  1794. .in 0.08i
  1795. \fBSyntax
  1796. .sp
  1797. .in 0.4i
  1798. \fBFT_SCANCODE() -> cCode
  1799. .sp
  1800. .in 0.08i
  1801. \fBArguments
  1802. .sp
  1803. .in 0.4i
  1804. None
  1805. .sp
  1806. .in 0.08i
  1807. \fBReturns
  1808. .sp
  1809. .in 0.4i
  1810. A two-character string, corresponding to the keyboard scan code\.
  1811. .sp
  1812. .in 0.08i
  1813. \fBDescription
  1814. .sp
  1815. .in 0.4i
  1816. FT_SCANCODE() enables you to distinguish the different scancodes
  1817. of similar keys (such as Grey minus versus regular minus), thus
  1818. increasing the number of keys your input routine can recognize\.
  1819. .sp
  1820. It works like INKEY(), in that it waits for a key to be pressed\.
  1821. The scan code consists of two bytes, which are returned as a
  1822. two-character string\.
  1823. .sp
  1824. For example, calling FT_SCANCODE() and pressing the Grey-minus
  1825. key will return a two character string:
  1826. .sp
  1827. .in 0.96i
  1828. CHR(45) + CHR(74)
  1829. .sp
  1830. .in 0.4i
  1831. LASTKEY() is not updated by FT_SCANCODE(), so don\'t try to
  1832. test LASTKEY() to see what was pressed during an FT_SCANCODE()
  1833. call\.  Simply assign the return value to a variable and test
  1834. that (see the test driver below)\.
  1835. .sp
  1836. .ta 0.24i
  1837. *    This was adapted from a short C routine posted by John Kaster on
  1838. .br
  1839. .ta
  1840. .in 0.64i
  1841. NANFORUM\.  It was written in Clipper to help demonstrate the
  1842. FT_INT86 function of the Nanforum Toolkit\.
  1843. .sp
  1844. .in 0.4i
  1845. This program requires FT_INT86()\.
  1846. .sp
  1847. .in 0.08i
  1848. \fBExamples
  1849. .sp
  1850. .in 0.64i
  1851. cKey := FT_SCANCODE()
  1852. .sp
  1853. .in 0.48i
  1854. [grey-] returns:  CHR(45) + CHR(74)
  1855. .ta 0.64i
  1856. [-]    returns:  CHR(45) + CHR(12)
  1857. .br
  1858. .ta
  1859. [grey+] returns:  CHR(43) + CHR(78)
  1860. .ta 0.64i
  1861. [+]    returns:  CHR(43) + CHR(13)
  1862. .br
  1863. .ta
  1864. .sp
  1865. .in 0.08i
  1866. \fBSource:\fR SCANCODE\.PRG
  1867. .sp
  1868. \fBAuthor:\fR Glenn Scott (from John Kaster)
  1869. .in 0i
  1870. .ta 1.63265i
  1871. .sp 2
  1872. .ne 20
  1873. .ps +3
  1874. .vs +3
  1875. FT_SETRATE()    Set the keyboard delay and repeat rate on PC/AT & PS/2
  1876. .br
  1877. .ta
  1878. .in 0.08i
  1879. .ps -3
  1880. .vs -3
  1881. .sp 2
  1882. \fBFT_SETRATE()
  1883. Set the keyboard delay and repeat rate on PC/AT & PS/2
  1884. .in 0i
  1885. .br
  1886. \l'6.24i'
  1887. .br
  1888. .sp
  1889. .in 0.08i
  1890. \fBSyntax
  1891. .sp
  1892. .in 0.4i
  1893. \fBFT_SETRATE( [ <nDelayTime> ] [, <nRepeatRate> ] ) -> NIL
  1894. .sp
  1895. .in 0.08i
  1896. \fBArguments
  1897. .sp
  1898. .in 0.4i
  1899. \fB<nDelayTime>\fR is the keyboard delay time\.
  1900. .sp
  1901. \fB<nRepeatRate>\fR is the keyboard repeat rate\.
  1902. .sp
  1903. .in 0.8i
  1904. .ta 2.16i
  1905. \(sq
  1906. .br
  1907. \l'1.84i'
  1908. .br
  1909. \(sq    \(sq
  1910. .br
  1911. \l'1.92i'
  1912. .br
  1913. \(sq
  1914. .br
  1915. .ta
  1916. .ta 0i 1.44i 1.92i 2.16i 3.6i 4.16i
  1917.     \(br nDelayTime    DELAY     \(br    \(br RepeatRate    SPEED    \(br
  1918. .br
  1919. .ta
  1920. .ta 0i 2.16i
  1921.     \(br
  1922. .br
  1923. \l'1.84i'
  1924. .br
  1925. \(sq    \(br
  1926. .br
  1927. \l'1.92i'
  1928. .br
  1929. \(sq
  1930. .br
  1931. .ta
  1932. .ta 0i 0.48i 1.44i 1.92i 2.16i 2.56i 3.52i 4.16i
  1933.     \(br    0    250ms     \(br    \(br    0    30\.0cps     \(br
  1934. .br
  1935. .ta
  1936. .ta 0i 0.48i 1.92i 2.16i 2.56i 3.52i 4.16i
  1937.     \(br    1 (default) 500ms     \(br    \(br    1    26\.7cps     \(br
  1938. .br
  1939. .ta
  1940. .ta 0i 0.48i 1.44i 1.92i 2.16i 2.56i 3.52i 4.16i
  1941.     \(br    2    750ms     \(br    \(br    2    24\.0cps     \(br
  1942. .br
  1943. .ta
  1944. .ta 0i 0.48i 1.36i 1.92i 2.16i 2.56i 3.52i 4.16i
  1945.     \(br    3    1000ms     \(br    \(br    3    21\.8cps     \(br
  1946. .br
  1947. .ta
  1948. .ta 2.16i 2.56i 3.52i 4.16i
  1949. \(sq
  1950. .br
  1951. \l'1.84i'
  1952. .br
  1953. \(sq    \(br    4    20\.0cps     \(br
  1954. .br
  1955. .ta
  1956. .in 2.96i
  1957. .ta 0i 0.4i 1.36i 2i
  1958.     \(br    5    18\.5cps     \(br
  1959. .br
  1960. .ta
  1961. .ta 0i 0.4i 1.36i 2i
  1962.     \(br    6    17\.1cps     \(br
  1963. .br
  1964. .ta
  1965. .ta 0i 0.4i 1.36i 2i
  1966.     \(br    7    16\.0cps     \(br
  1967. .br
  1968. .ta
  1969. .ta 0i 0.4i 1.36i 2i
  1970.     \(br    8    15\.0cps     \(br
  1971. .br
  1972. .ta
  1973. .ta 0i 0.4i 1.36i 2i
  1974.     \(br    9    13\.3cps     \(br
  1975. .br
  1976. .ta
  1977. .ta 0i 0.32i 1.36i 2i
  1978.     \(br    10    12\.0cps     \(br
  1979. .br
  1980. .ta
  1981. .ta 0i 0.32i 1.36i 2i
  1982.     \(br    11    10\.9cps     \(br
  1983. .br
  1984. .ta
  1985. .ta 0i 0.32i 2i
  1986.     \(br    12 (default) 10\.0cps     \(br
  1987. .br
  1988. .ta
  1989. .ta 0i 0.32i 1.44i 2i
  1990.     \(br    13    9\.2cps     \(br
  1991. .br
  1992. .ta
  1993. .ta 0i 0.32i 1.44i 2i
  1994.     \(br    14    8\.6cps     \(br
  1995. .br
  1996. .ta
  1997. .ta 0i 0.32i 1.44i 2i
  1998.     \(br    15    8\.0cps     \(br
  1999. .br
  2000. .ta
  2001. .ta 0i 0.32i 1.44i 2i
  2002.     \(br    16    7\.5cps     \(br
  2003. .br
  2004. .ta
  2005. .ta 0i 0.32i 1.44i 2i
  2006.     \(br    17    6\.7cps     \(br
  2007. .br
  2008. .ta
  2009. .ta 0i 0.32i 1.44i 2i
  2010.     \(br    18    6\.0cps     \(br
  2011. .br
  2012. .ta
  2013. .ta 0i 0.32i 1.44i 2i
  2014.     \(br    19    5\.5cps     \(br
  2015. .br
  2016. .ta
  2017. .ta 0i 0.32i 1.44i 2i
  2018.     \(br    20    5\.0cps     \(br
  2019. .br
  2020. .ta
  2021. .ta 0i 0.32i 1.44i 2i
  2022.     \(br    21    4\.6cps     \(br
  2023. .br
  2024. .ta
  2025. .ta 0i 0.32i 1.44i 2i
  2026.     \(br    22    4\.3cps     \(br
  2027. .br
  2028. .ta
  2029. .ta 0i 0.32i 1.44i 2i
  2030.     \(br    23    4\.0cps     \(br
  2031. .br
  2032. .ta
  2033. .ta 0i 0.32i 1.44i 2i
  2034.     \(br    24    3\.7cps     \(br
  2035. .br
  2036. .ta
  2037. .ta 0i 0.32i 1.44i 2i
  2038.     \(br    25    3\.3cps     \(br
  2039. .br
  2040. .ta
  2041. .ta 0i 0.32i 1.44i 2i
  2042.     \(br    26    3\.0cps     \(br
  2043. .br
  2044. .ta
  2045. .ta 0i 0.32i 1.44i 2i
  2046.     \(br    27    2\.7cps     \(br
  2047. .br
  2048. .ta
  2049. .ta 0i 0.32i 1.44i 2i
  2050.     \(br    28    2\.5cps     \(br
  2051. .br
  2052. .ta
  2053. .ta 0i 0.32i 1.44i 2i
  2054.     \(br    29    2\.3cps     \(br
  2055. .br
  2056. .ta
  2057. .ta 0i 0.32i 1.44i 2i
  2058.     \(br    30    2\.1cps     \(br
  2059. .br
  2060. .ta
  2061. .ta 0i 0.32i 1.44i 2i
  2062.     \(br    31    2\.0cps     \(br
  2063. .br
  2064. .ta
  2065. \(sq
  2066. .br
  2067. \l'1.92i'
  2068. .br
  2069. \(sq
  2070. .sp
  2071. .in 0.08i
  2072. \fBReturns
  2073. .sp
  2074. .in 0.32i
  2075. NIL
  2076. .sp
  2077. .in 0.08i
  2078. \fBDescription
  2079. .sp
  2080. .in 0.32i
  2081. This routine is used to adjust the IBM PC/AT and PS/2 "typematic"
  2082. repeat and delay feature\.  This is used to allow the users of your
  2083. application to adjust these speeds to the most comfortable level\.
  2084. .sp
  2085. This source code is written for Microsoft Assembler v5\.1\.
  2086. .sp
  2087. .in 0.08i
  2088. \fBExamples
  2089. .sp
  2090. .in 0.32i
  2091. .ta 1.52i
  2092. FT_SETRATE(0,0)    // Set keyboard to fastest possible settings
  2093. .br
  2094. .ta
  2095. .ta 1.52i
  2096. FT_SETRATE()    // Set keyboard to AT defaults (10\.9cps,500ms delay)
  2097. .br
  2098. .ta
  2099. .ta 1.52i
  2100. FT_SETRATE(11,1)    // Set keyboard to PS/2 defaults (10cps,500ms delay)
  2101. .br
  2102. .ta
  2103. .sp
  2104. .in 0.08i
  2105. \fBSource:\fR KSPEED\.ASM
  2106. .sp
  2107. \fBAuthor:\fR James R\. Zack
  2108. .in 0i
  2109. .ta 1.63265i
  2110. .sp 2
  2111. .ne 20
  2112. .ps +3
  2113. .vs +3
  2114. FT_SHIFT()    Determine status of shift key
  2115. .br
  2116. .ta
  2117. .in 0.08i
  2118. .ps -3
  2119. .vs -3
  2120. .sp 2
  2121. \fBFT_SHIFT()
  2122. Determine status of shift key
  2123. .in 0i
  2124. .br
  2125. \l'6.24i'
  2126. .br
  2127. .sp
  2128. .in 0.08i
  2129. \fBSyntax
  2130. .sp
  2131. .in 0.4i
  2132. \fBFT_SHIFT() -> lValue
  2133. .sp
  2134. .in 0.08i
  2135. \fBArguments
  2136. .sp
  2137. .in 0.4i
  2138. None
  2139. .sp
  2140. .in 0.08i
  2141. \fBReturns
  2142. .sp
  2143. .in 0.4i
  2144. \.T\. if a shift key is pressed, \.F\. if otherwise\.
  2145. .sp
  2146. .in 0.08i
  2147. \fBDescription
  2148. .sp
  2149. .in 0.4i
  2150. This function is useful for times you need to know whether or not the
  2151. shift key is pressed, such as during a MemoEdit()\.
  2152. .sp
  2153. .in 0.08i
  2154. \fBExamples
  2155. .sp
  2156. .in 0.4i
  2157. IF FT_SHIFT()
  2158. .in 0.64i
  2159. @24, 0 say "Shift"
  2160. .in 0.4i
  2161. ELSE
  2162. .in 0.64i
  2163. .ta 1.36i
  2164. @24, 0 say "    "
  2165. .br
  2166. .ta
  2167. .in 0.4i
  2168. ENDIF
  2169. .sp
  2170. .in 0.08i
  2171. \fBSource:\fR SHIFT\.C
  2172. .sp
  2173. \fBAuthor:\fR Ted Means
  2174. .in 0i
  2175. .sp
  2176. .in 1.5i
  2177. .ti -1.5i
  2178. .ta 1.5i
  2179. .ft B
  2180. See Also:    
  2181. .ft R
  2182. FT_CAPLOCK()
  2183. , FT_CTRL()
  2184. , FT_NUMLOCK()
  2185. , FT_PRTSCR()
  2186. , FT_ALT()
  2187. .ta 1.63265i
  2188. .in 0i
  2189. .sp 2
  2190. .ne 20
  2191. .ps +3
  2192. .vs +3
  2193. FT_SINKEY()    Replacement for INKEY() that tests for SET KEY procedures
  2194. .br
  2195. .ta
  2196. .in 0.08i
  2197. .ps -3
  2198. .vs -3
  2199. .sp 2
  2200. \fBFT_SINKEY()
  2201. Replacement for INKEY() that tests for SET KEY procedures
  2202. .in 0i
  2203. .br
  2204. \l'6.24i'
  2205. .br
  2206. .sp
  2207. .in 0.08i
  2208. \fBSyntax
  2209. .sp
  2210. .in 0.4i
  2211. \fBFT_SINKEY( [ <nWaitTime> ] ) -> nKey
  2212. .sp
  2213. .in 0.08i
  2214. \fBArguments
  2215. .sp
  2216. .in 0.4i
  2217. \fB<nWaitTime>\fR is the number of seconds to wait\.  If zero,
  2218. FT_SINKEY() will wait indefinitely for a keypress\.  If not
  2219. passed, FT_SINKEY() does not wait for a keypress\.  If NIL,
  2220. it is treated the same as 0\.
  2221. .sp
  2222. .in 0.08i
  2223. \fBReturns
  2224. .sp
  2225. .in 0.4i
  2226. The INKEY() value of the key pressed\.
  2227. .sp
  2228. .in 0.08i
  2229. \fBDescription
  2230. .sp
  2231. .in 0.4i
  2232. FT_SINKEY() is similar to the function provided by Nantucket in
  2233. KEYBOARD\.PRG, with one significant difference: you can pass NIL
  2234. to INKEY(), which will be treated as a zero (i\.e\., wait indefinitely
  2235. for keypress)\.  Therefore, it is necessary to differentiate between
  2236. an explicit NIL and one that is a result of a formal parameter NOT
  2237. being received\.
  2238. .sp
  2239. FT_SINKEY() differs from the standard INKEY() in that it will
  2240. respond to any keys set with SET KEY TO or SetKey()\.
  2241. .sp
  2242. .in 0.08i
  2243. \fBExamples
  2244. .sp
  2245. .in 0.4i
  2246. SetKey( K_F1, {|n,l,r| Help(n,l,r) } )
  2247. .ta 2.16i
  2248. nKey := FT_SINKEY(0)    // Help() will be called if F1 pressed
  2249. .br
  2250. .ta
  2251. .sp
  2252. .in 0.08i
  2253. \fBSource:\fR SINKEY\.PRG
  2254. .sp
  2255. \fBAuthor:\fR Greg Lief
  2256.