home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / dataflex / chmrclnt.pkg < prev    next >
Encoding:
Text File  |  1993-08-10  |  3.2 KB  |  131 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/chmrclnt.pkg,v $
  9. //     $Revision: 1.1 $
  10. //     $State: Exp $
  11. //     $Author: james $
  12. //     $Date: 1992/09/08 14:43:02 $
  13. //     $Locker:  $
  14. //
  15. //     $Log: chmrclnt.pkg,v $
  16. //Revision 1.1  1992/09/08  14:43:02  james
  17. //Initial revision
  18. //
  19. //Revision 1.3  92/05/14  16:39:25  SWM
  20. //Updated Copyright slug.
  21. //
  22. //Revision 1.2  92/03/09  19:00:46  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:19:54  elsa
  28. //Initial revision
  29. //
  30. //************************************************************************/
  31.  
  32. //************************************************************************
  33. //     File Name: ChMrClnt.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 Change-Margin pop-up object for the
  39. // Text_Editor class.
  40. //
  41. // This package implements a pop-up object for margin changing within a
  42. // text-editor object
  43. //************************************************************************/
  44.  
  45. #CHKSUB 1 1 // Verify the UI subsystem.
  46.  
  47. Use UI
  48.  
  49.  
  50. /chgmrgnImg
  51. ┌────────────────────────────────────────┐
  52. │                                        │
  53. │  Right Margin... ___   <__>  <______>  │
  54. │                                        │
  55. └────────────────────────────────────────┘
  56. /*
  57. Sub_Page ChgValImg FROM ChgMrgnImg 1
  58. Sub_Page MrgnOKImg FROM ChgMrgnImg 2 3
  59.  
  60.  
  61. //
  62. // Description
  63. //
  64. //   This is a form to enter the new right margin value into.
  65. //
  66. // Assumptions/Preconditions
  67. //
  68. //   The Text_Editor which invoked this object is the prior_level in the
  69. //   focus tree.
  70. //
  71. // Exceptions
  72. //
  73. //   None.
  74. //
  75. // Notes
  76. //
  77. //   None.
  78. //
  79. object Change_Margin_Form is a CLIENT chgMrgnImg
  80.   set location to 1 5 relative
  81.   set DELEGATION_MODE to DELEGATE_PRIOR_LEVEL
  82.   set BLOCK_MOUSE_STATE to true
  83.   set SCOPE_STATE to TRUE
  84.   set exit_msg to cancel_scope
  85.   procedure cancel_scope
  86.     send deactivate 3
  87.   end_procedure
  88.   on_key kCancel        SEND cancel_scope
  89.   on_key kExit_Function SEND cancel_scope
  90.   object Change_Margin_Window is a FORM ChgValImg
  91.     item_list
  92.       on_item "" SEND Change_Margin
  93.     end_item_list
  94.   end_object
  95.   object OK_Button_Area is a BUTTON MrgnOKImg
  96.     item_list
  97.       on_item "OK"     SEND Finis
  98.       on_item "CANCEL" SEND cancel_scope
  99.     end_item_list
  100.   end_object
  101.   procedure Finis
  102.     send Change_Margin
  103.     send cancel_scope
  104.   end_procedure
  105.  
  106.  
  107.   //
  108.   // Description
  109.   //
  110.   //   This procedure resets the right margin of the prior focus object
  111.   //   to the value of this object's item.
  112.   //
  113.   // Assumptions/Preconditions
  114.   //
  115.   //   None.
  116.   //
  117.   // Exceptions
  118.   //
  119.   //   None.
  120.   //
  121.   // Notes
  122.   //
  123.   //   None.
  124.   //
  125.   procedure Change_Margin
  126.     set right_margin of (prior_level(current_object)) ;
  127.         to (value(Change_Margin_Window(current_object),0))
  128.   end_procedure
  129. end_object
  130.  
  131.