home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / PowerPlant / AGA Classes 1.2 / Text / LAGATextEdit.h < prev   
Encoding:
Text File  |  1996-06-30  |  3.2 KB  |  80 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    LAGATextEdit.h
  3. // ===========================================================================
  4. //    “Apple Grayscale Appearance” compliant Text Edit Field
  5. //    Copyright © 1996 Chrisoft (Christophe ANDRES)  All rights reserved.
  6. //
  7. //    You may use this source code in any application (commercial, shareware, freeware,
  8. //    postcardware, etc), but not remove this notice (no need to acknowledge the use of
  9. //    this class in the about box)
  10. //    You may not sell this source code in any form. This source code may be placed on 
  11. //    publicly accessable archive sites and source code disks. It may not be placed on 
  12. //    profit archive sites and source code disks without the permission of the author, 
  13. //    Christophe ANDRES.
  14. //    
  15. //        This source code is distributed in the hope that it will be useful,
  16. //        but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. //        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18. //
  19. //    If you make any change or improvement on this class, please send the improved/changed
  20. //    version to : chrisoft@calva.net or Christophe ANDRES
  21. //                                     20, rue Prosper Mérimée
  22. //                                     67100 STRASBOURG
  23. //                                     FRANCE
  24. //
  25. // ===========================================================================
  26. //    LAGATextEdit.cp            <- double-click + Command-D to see class implementation
  27. //
  28. //    LAGATextEdit is my implementation of the “Apple Grayscale Appearance for System 7.5”
  29. //        Text Edit field. It is designed to work effectively with a class like LAGAIndexTab.
  30. //        In an index tab, a Text Edit Field can be present but in another Index Tab, and should
  31. //        therefore not be selected when the user presses the “Tab” key. Also if the Index Tab is
  32. //        changed and a Text Entry Field is revealed it should be selected. LAGATextEdit handles
  33. //        all these cases.
  34. //        LAGATextEdit keeps its own background in white, whatever the window background may be.
  35. //
  36. //        Version : 1.2
  37. //
  38. //        Change History (most recent first, date in US form : mm/dd/yy):
  39. //
  40. //                        06/30/96    ca        Public release of version 1.2
  41. //                        06/04/96    ca        Added RegisterClass method to ease registry
  42. //                                                        Added guard macros in header files
  43. //                                                        Increased version to 1.2
  44. //                        05/20/96    ca        Increased version to 1.1
  45. //                                                        Added "on the fly" constructor
  46. //                                                        Added change history
  47. //                        04/22/96    ca        class made available by Christophe ANDRES <chrisoft@calva.net>
  48. //                                                        (version 1.0)
  49. //
  50. //        To Do:
  51. //
  52.  
  53. #ifndef _H_LAGATextEdit
  54. #define _H_LAGATextEdit
  55. #pragma once
  56.  
  57. #include    <LTextEdit.h>
  58.  
  59. class LAGATextEdit : public LTextEdit
  60. {
  61.     public        :
  62.         enum { class_ID = 'AGAt' };
  63.         static void RegisterClass ();                                                                                                                                                            //    <06/04/96    ca>
  64.         static LAGATextEdit* CreateAGATextEditStream (LStream *inStream);
  65.     
  66.         LAGATextEdit (LStream *inStream);
  67.         
  68.         LAGATextEdit (const SPaneInfo &inPaneInfo, const SViewInfo &inViewInfo,
  69.                                     Uint16 inTextAttributes, ResIDT inTextTraitsID);
  70.         
  71.         virtual Boolean ObeyCommand (CommandT inCommand, void* ioParam);
  72.         
  73.         virtual void SpendTime (const EventRecord    &inMacEvent);
  74.     
  75.     protected:
  76.         virtual void DrawSelf ();
  77. };
  78.  
  79. #endif
  80.