home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / lancelot / lbadge.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  5.6 KB  |  159 lines

  1. /******************************************************************************
  2. * .FILE:         lbadge.hpp                                                   *
  3. *                                                                             *
  4. * .DESCRIPTION:  Lancelot Sample Program:              Class Definition       *
  5. *                                                                             *
  6. * .CLASSES:      BadgePage                                                    *
  7. *                BadgeCnrObj                                                  *
  8. *                                                                             *
  9. * .COPYRIGHT:                                                                 *
  10. *    Licensed Material - Program-Property of IBM                              *
  11. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  12. *                                                                             *
  13. * .DISCLAIMER:                                                                *
  14. *   The following [enclosed] code is sample code created by IBM               *
  15. *   Corporation.  This sample code is not part of any standard IBM product    *
  16. *   and is provided to you solely for the purpose of assisting you in the     *
  17. *   development of your applications.  The code is provided 'AS IS',          *
  18. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  19. *   arising out of your use of the sample code, even if they have been        *
  20. *   advised of the possibility of such damages.                               *
  21. *                                                                             *
  22. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  23. *                                                                             *
  24. ******************************************************************************/
  25. #ifndef _LBADGE_
  26. #define _LBADGE_
  27.  
  28. #include <imcelcv.hpp>
  29. #include <ientryfd.hpp>
  30. #include <icmdhdr.hpp>
  31. #include <imsgbox.hpp>
  32. #include <istring.hpp>
  33. #include <inotebk.hpp>
  34. #include <iapp.hpp>
  35.  
  36. #include "ldbase.hpp"
  37. #include "lgeneric.hpp"
  38. #include "lpagectl.hpp"
  39.  
  40.  
  41. //----------------------------------------------------------------------------
  42. // class BadgePage
  43. //----------------------------------------------------------------------------
  44. class BadgePage : public IMultiCellCanvas,
  45.                   public ICommandHandler
  46. {
  47.  
  48. public: // ---------------------- PUBLIC -------------------------------------
  49.  
  50. friend class QueryBadge;
  51.  
  52. //----------------------- Contructor/Destructor ------------------------------
  53. // Class BadgePage :: BadgePage()
  54. //----------------------------------------------------------------------------
  55.   BadgePage(IWindow* pParent,
  56.             const IString& aKey= "") ;
  57.  
  58.   BadgePage(IWindow* pParent, LQueryData& qd);
  59.  
  60.   ~BadgePage();
  61.  
  62. //----------------------------------------------------------------------------
  63. // Class BadgePage :: verifyAndSave()
  64. //----------------------------------------------------------------------------
  65. Boolean
  66.   verifyAndSave( IString& theString,
  67.                  IString& theEntry ,
  68.                  const IString& saveName="");
  69.  
  70. //----------------------------------------------------------------------------
  71. // Class BadgePage :: badgeNumber() - return the badge number
  72. //----------------------------------------------------------------------------
  73. inline IString
  74.   badgeNumber() const { return BadgeNumber.text(); };
  75.  
  76. //----------------------------------------------------------------------------
  77. // Class BadgePage :: badgeNumber() - return the badge number
  78. //----------------------------------------------------------------------------
  79. inline IString
  80.   issueDate()   const { return IssueDate.text(); };
  81.  
  82. //----------------------------------------------------------------------------
  83. // Class BadgePage :: expDate() - return the expiration date
  84. //----------------------------------------------------------------------------
  85. inline IString
  86.   expDate()     const { return ExpDate.text(); };
  87.  
  88. //----------------------------------------------------------------------------
  89. // Class BadgePage :: expDate() - return the expiration date
  90. //----------------------------------------------------------------------------
  91. INotebook::PageSettings
  92.     pageSettings();
  93.  
  94. protected: //----------------------- PROTECTED --------------------------------
  95.  
  96. //----------------------------------------------------------------------------
  97. // Class BadgePage :: command()
  98. //----------------------------------------------------------------------------
  99. Boolean
  100.   command( ICommandEvent& event );
  101.  
  102. BadgePage&
  103.   handleIt();
  104.  
  105. private: //------------- PRIVATE ------------------------------------------
  106.  
  107. //----------------------------------------------------------------------------
  108. // Class BadgePage :: setCells()
  109. //----------------------------------------------------------------------------
  110. BadgePage&
  111.     setCells();       // build multi-cell canvas
  112.  
  113.  
  114. //----------------------------------------------------------------------------
  115. // Class BadgePage :: displayData()
  116. //----------------------------------------------------------------------------
  117. BadgePage&
  118.   displayData();
  119.  
  120. LBadgeData
  121.   badgeData;
  122.  
  123. PageButtons
  124.   pageButtons;
  125.  
  126. QueryRange
  127.  *pIssueRange;
  128.  
  129. QueryRange
  130.  *pExpRange;
  131.  
  132. IStaticText
  133.   badgeNumberText,
  134.   issueDateText,
  135.   expDateText;
  136.  
  137. IEntryField
  138.   BadgeNumber,
  139.   IssueDate,
  140.   ExpDate;
  141.  
  142. IString
  143.   Key;
  144.  
  145. INotebook::PageSettings
  146.   thePageSettings;
  147.  
  148. #ifdef IC_MOTIF
  149. LPictureVerifyHandler
  150.   dateHandler;
  151. #endif
  152.  
  153. Boolean
  154.   isAquery;
  155.  
  156. };
  157.  
  158. #endif
  159.