home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / advframe / drawextn / myframe.hpp < prev   
Encoding:
C/C++ Source or Header  |  1996-10-29  |  1.4 KB  |  75 lines

  1. #ifndef _MYFRAME_
  2. #define _MYFRAME_
  3. //************************************************************
  4. // Advanced Frame - Frame Extension Drawing Example
  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 <icmdhdr.hpp>
  11. #include <icolor.hpp>
  12. #include <ientryfd.hpp>
  13. #include <iframe.hpp>
  14. #include <iframext.hpp>
  15. #include <ilistbox.hpp>
  16. #include <ipushbut.hpp>
  17. #include <istattxt.hpp>
  18.  
  19. class MyFrame;
  20. class MyExtension;
  21.  
  22. class ColorList : public IListBox {
  23. public:
  24.   ColorList ( IWindow *owner );
  25. IColor
  26.   selectedColor ( ) const;
  27. private:
  28. ColorList (const ColorList&);
  29. ColorList& operator= (const ColorList&);
  30. };
  31.  
  32.  
  33. class MyHandler : public ICommandHandler {
  34. public:
  35.   MyHandler ( MyFrame &frame );
  36. protected:
  37. virtual Boolean
  38.   command ( ICommandEvent &event );
  39. private:
  40. MyFrame
  41.  &frame;
  42. MyHandler(const MyHandler&);
  43. MyHandler& operator=(const MyHandler&);
  44. };
  45.  
  46. class MyFrame : public IFrameWindow {
  47. public:
  48.   MyFrame ( );
  49.  
  50. virtual IFrameWindow
  51.  &update ( );
  52.  
  53. virtual MyFrame
  54.  &forceUpdate ( );
  55.  
  56. private:
  57. MyFrame
  58.  &addMyExtension( MyExtension *pExt );
  59.  
  60. ColorList
  61.   colorList;
  62. IEntryField
  63.   extSize;
  64. IStaticText
  65.   instructions;
  66. IPushButton
  67.   drawButton;
  68. MyHandler
  69.   handler;
  70. MyFrame ( const MyFrame& );
  71. MyFrame& operator= ( const MyFrame& );
  72. };
  73.  
  74. #endif // _MYFRAME_
  75.