home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / dataflex / textedit.pkg < prev    next >
Encoding:
Text File  |  1993-08-10  |  5.4 KB  |  214 lines

  1. //************************************************************************
  2. //
  3. // Copyright 1987-1992 Data Access Corporation, Miami FL, USA
  4. // All Rights reserved
  5. // DataFlex is a registered trademark of Data Access Corporation.
  6. //
  7. //
  8. //     $Source: /u3/source.30/product/pkg/RCS/textedit.pkg,v $
  9. //     $Revision: 1.1 $
  10. //     $State: Exp $
  11. //     $Author: james $
  12. //     $Date: 1992/09/08 14:43:09 $
  13. //     $Locker:  $
  14. //
  15. //     $Log: textedit.pkg,v $
  16. //Revision 1.1  1992/09/08  14:43:09  james
  17. //Initial revision
  18. //
  19. //Revision 1.3  92/05/14  17:14:02  SWM
  20. //Updated Copyright slug.
  21. //
  22. //Revision 1.2  92/03/09  19:05:11  james
  23. //Added #CHKSUB directive to insure source
  24. //only compiled with correct revision of 
  25. //compiler.
  26. //
  27. //Revision 1.1  91/10/23  10:22:57  elsa
  28. //Initial revision
  29. //
  30. //************************************************************************/
  31.  
  32. //************************************************************************
  33. //     File Name: TextEdit.Pkg
  34. // Creation Date: January 1, 1991
  35. // Modified Date: May 23, 1991
  36. //     Author(s): Steven A. Lowe
  37. //
  38. // This module contains the TextEditor class definition.
  39. //
  40. // This package implements an editing object for variable-length text fields
  41. // or sequential files suitable for use with a Text_Action_Bar instance.
  42. //************************************************************************/
  43.  
  44. #CHKSUB 1 1 // Verify the UI subsystem.
  45.  
  46. Use Text_Win
  47. Use TrnsClnt  //translation pop-up object
  48. Use ReSzClnt  //window re-sizing pop-up object
  49. Use ChMrClnt  //margin changing pop-up object
  50. Use FTxtClnt  //find-text pop-up object
  51. Use GoLnClnt  //goto-line pop-up object
  52.  
  53.  
  54. //
  55. //Class: Text_Editor
  56. //
  57. //SuperClass: Text_Window
  58. //
  59. //Description: This class implements a text-editing object suitable for
  60. //  use with Entry_Form and Table objects, which may be bound to a
  61. //  sequential ASCII file or a database memo-field
  62. //
  63. //Usage: set FILE_NAME property to sequential file name or memo-field id
  64. //
  65. Class Text_Editor is a Text_Window
  66.   //
  67.   //Operation: CONSTRUCT_OBJECT
  68.   //
  69.   //Assumption(s): none
  70.   //
  71.   //Goal(s): define an instance with appropriate keys and properties
  72.   //
  73.   //Algorithm: Augmented to define keys, and properties for action-bar
  74.   //           Activated_Action_Bar_State, and Component_State.
  75.   //
  76.   //Usage: used internally
  77.   //
  78.   procedure construct_object
  79.     forward send construct_object
  80.     set location to 1 0 relative
  81.   end_procedure
  82.   //
  83.   //Operation: STATUS_LINE_ON
  84.   //
  85.   //Assumption(s): none
  86.   //
  87.   //Goal(s): turn on status line display
  88.   //
  89.   //Algorithm: sets STATUS_LINE_STATE to True
  90.   //
  91.   //Usage: 
  92.   //
  93.   procedure Status_Line_On
  94.     set STATUS_LINE_STATE to true
  95.   end_procedure
  96.   //
  97.   //Operation: STATUS_LINE_OFF
  98.   //
  99.   //Assumption(s): none
  100.   //
  101.   //Goal(s): turn off status line display
  102.   //
  103.   //Algorithm: sets STATUS_LINE_STATE to False and sends REFRESH_SCREEN
  104.   //
  105.   //Usage: 
  106.   //
  107.   procedure Status_Line_Off
  108.     set STATUS_LINE_STATE to false
  109.     send refresh_screen to desktop  //make status line go away
  110.   end_procedure
  111.   //
  112.   //Operation: RESIZE
  113.   //
  114.   //Assumption(s): none
  115.   //
  116.   //Goal(s): get size as default values for ReSize_Area's items, and activate
  117.   //  ReSize_Area pop-up form
  118.   //
  119.   //Algorithm: gets SIZE, splits into height and width,
  120.   //           and sets values into ReSize_Area's items, then ACTIVATEs
  121.   //           ReSize_Area
  122.   //
  123.   //Usage: invoked externally
  124.   //
  125.   procedure ReSize
  126.     local integer hght
  127.     local integer wdth
  128.     get size to hght
  129.     move (low(hght)) to wdth
  130.     move (hi(hght)) to hght
  131.     set Height of ReSize_Area to hght
  132.     set Width of ReSize_Area  to wdth
  133.     send activate to ReSize_Area 
  134.   end_procedure
  135.   //
  136.   //Operation: REQUEST_RESIZE
  137.   //
  138.   //Assumption(s): hght, wdth valid size parameters
  139.   //
  140.   //Goal(s): set size to specified height and width
  141.   //
  142.   //Algorithm: sets VISIBLE_STATE to False
  143.   //           sets SIZE to specified height and width
  144.   //           sets VISIBLE_STATE to True
  145.   //
  146.   //Usage: invoked externally
  147.   //
  148.   procedure Request_ReSize integer hght integer wdth
  149.     set visible_state to false 
  150.     set size to hght wdth
  151.     set visible_state to true
  152.   end_procedure
  153.   //
  154.   //Operation: CHANGE_MARGIN
  155.   //
  156.   //Assumption(s): none
  157.   //
  158.   //Goal(s): activate Change_Margin_Form pop-up form
  159.   //
  160.   //Algorithm: sends ACTIVATE to Change_Margin_Form
  161.   //
  162.   //Usage: invoked externally
  163.   //
  164.   procedure Change_Margin
  165.     send activate to Change_Margin_Form
  166.   end_procedure
  167.   //
  168.   //Operation: TO_LINE_NUM
  169.   //
  170.   //Assumption(s): none
  171.   //
  172.   //Goal(s): activate Goto_Line_Area form
  173.   //
  174.   //Algorithm: sends ACTIVATE to Goto_Line_Area
  175.   //
  176.   //Usage: invoked externally
  177.   //
  178.   procedure to_line_num
  179.     send activate to Goto_Line_Area
  180.   end_procedure
  181.  
  182.   //
  183.   //Operation: SEARCH
  184.   //
  185.   //Assumption(s): none
  186.   //
  187.   //Goal(s): activate Find_Text_Area form
  188.   //
  189.   //Algorithm: sends ACTIVATE to Find_Text_Area
  190.   //
  191.   //Usage: invoked externally
  192.   //
  193.   procedure search
  194.     send activate to Find_Text_Area
  195.   end_procedure
  196.  
  197.   //
  198.   //Operation: TRANSLATE
  199.   //
  200.   //Assumption(s): none
  201.   //
  202.   //Goal(s): activate Translate_Area
  203.   //
  204.   //Algorithm: sends ACTIVATE to Translate_Area
  205.   //
  206.   //Usage: invoked externally
  207.   //
  208.   procedure Translate
  209.     send activate to Translate_Area
  210.   end_procedure
  211.  
  212. end_class
  213.  
  214.