home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / latour / shopping / puritemv.hpp < prev    next >
Text File  |  1996-10-29  |  2KB  |  105 lines

  1. #ifndef _PURITEMV_
  2. #define _PURITEMV_
  3. /************************************************************
  4. / Tour of the UICL - Shopping List Example Program
  5. /
  6. / Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  7. / Copyright (c) 1997 John Wiley & Sons, Inc. 
  8. / All Rights Reserved.
  9. ************************************************************/
  10. #include <ibmpctl.hpp>
  11. #include <icmdhdr.hpp>
  12. #include <ientryfd.hpp>
  13. #include <iframe.hpp>
  14. #include <imcelcv.hpp>
  15. #include <imle.hpp>
  16. #include <inotebk.hpp>
  17. #include <istattxt.hpp>
  18. #include <istring.hpp>
  19. #include <ipushbut.hpp>
  20. #include "puritem.hpp"
  21. #include "shopping.h"
  22.  
  23. // Align classes on four-byte boundaries.
  24. #pragma pack(4)
  25.  
  26. //==================== PurchaseItemView =======================
  27. // Settings view for a PurchaseItem object.
  28. class PurchaseItemView : public IFrameWindow {
  29. public:
  30.   PurchaseItemView ( PurchaseItem& purchaseItem,
  31.                      unsigned long windowId,
  32.                      IWindow* owner = 0 );
  33.  
  34. Boolean
  35.   validated        ( );
  36.  
  37. PurchaseItemView
  38.  &updateDataObject ( ),
  39.  &updateBitmap     ( const IString& fileName );
  40.  
  41. protected:
  42. PurchaseItemView
  43.  &initializePage1  ( ),
  44.  &initializePage2  ( );
  45.  
  46. private:
  47.   PurchaseItemView ( const PurchaseItemView& );
  48. PurchaseItemView
  49.  &operator=        ( const PurchaseItemView& );
  50.  
  51.   //======================= CmdHandler ======================
  52.   // Process command actions for a PurchaseItem.
  53.   class CmdHandler : public ICommandHandler {
  54.   public:
  55.     CmdHandler    ( PurchaseItemView*  frame,
  56.                     PurchaseItem&      purchaseItem );
  57.   protected:
  58.   virtual Boolean
  59.     command       ( ICommandEvent& event ),
  60.     systemCommand ( ICommandEvent& event );
  61.  
  62.   private:
  63.     CmdHandler   ( const CmdHandler& );
  64.   CmdHandler
  65.    &operator= ( const CmdHandler& );
  66.  
  67.   PurchaseItem
  68.    &fPurchaseItem;
  69.   PurchaseItemView
  70.    *fPurchaseItemView;
  71.   };  // class PurchaseItemView::CmdHandler
  72.  
  73. PurchaseItem
  74.  &fPurchaseItem;
  75. INotebook
  76.   fNotebook;
  77. CmdHandler
  78.   fCmdHandler;
  79. IMultiCellCanvas
  80.   fPage1,
  81.   fPage2;
  82. IStaticText
  83.   fNamePrompt,
  84.   fQuantityPrompt,
  85.   fManufacturerPrompt,
  86.   fPricePrompt,
  87.   fNotesPrompt;
  88. IEntryField
  89.   fName,
  90.   fQuantity,
  91.   fManufacturer,
  92.   fPrice;
  93. IMultiLineEdit
  94.   fNotes;
  95. IPushButton
  96.   fBitmapButton;
  97. IBitmapControl
  98.   fBookBitmap;
  99. };  // class PurchaseItemView
  100.  
  101. // Resume default compiler packing.
  102. #pragma pack()
  103.  
  104. #endif // _PURITEMV_
  105.