home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611B.ISO / vabasic / ntclnt.exe / DISK8 / data.8 / datab / INCLUDE / VWCONT.HH < prev    next >
Text File  |  1996-07-29  |  7KB  |  173 lines

  1. /*------------------------------------------------------------------------
  2.  * $Source: /rcs/vwrcs/components/intel/vwcont.hh,v $
  3.  * Checked in by $Author: remi $
  4.  * $Date: 1996/04/30 16:54:43 $                   $Revision: 1.16 $
  5.  *------------------------------------------------------------------------
  6.  *             Copyright (c) 1992, Visual Edge Software Ltd.
  7.  *
  8.  * ALL RIGHTS RESERVED.  This notice is  intended  as  a  precaution
  9.  * against  inadvertent publication, and shall not be deemed to con-
  10.  * stitute an acknowledgment that publication has  occurred  nor  to
  11.  * imply  any  waiver  of confidentiality.  The year included in the
  12.  * notice is the year of the creation of the work.
  13.  *------------------------------------------------------------------------
  14.  * DESCRIPTION:
  15.  *      This file contains the declaration of the VwContainer
  16.  *      class methods. The class implementation can be found in
  17.  *      VwCont.hh. A container is used to hold and manage a group
  18.  *      of children objects.
  19.  *------------------------------------------------------------------------*/
  20.  
  21. #ifndef VWCONT_HH
  22. #define VWCONT_HH
  23.  
  24. #include <vwguicmp.hh>
  25.  
  26. class VwpDC;
  27.  
  28. class VwContainer : public VwGuiComponent {
  29. friend class VwiFrame;
  30. friend class VwiPicture;
  31. friend class VwiWnd;
  32. friend class VwiMDIChild;
  33. friend class VwiMDIFrame;
  34. friend class VwiFrameWnd;
  35. friend class VwiScrolledWindow;
  36. friend class MwVBX;
  37.  
  38. friend class VwGuiComponent;
  39. friend VWindowProc MainWndProc;
  40. friend VWindowProc MwFrameSubProc;
  41. friend VWindowProc ContainerSubProc;
  42.  
  43. public:
  44.         RTTI_H(VeClass,VwGuiComponent);
  45.  
  46.         virtual VOPERDECL ~VwContainer ();
  47.  
  48.         VMETHODDECL(VwGui_t)           GuiParent();
  49.  
  50.         VVIRTUALDECL(VwInt)            NextTabIndex();
  51.         VVIRTUALDECL(VwInt)            DecrementNextTabIndex ();
  52.  
  53.         VVIRTUALDECL(void)             AddChild (VwGuiComponent *);
  54.         VVIRTUALDECL(void)             RemoveChild (VwGuiComponent *);
  55.  
  56.         VMETHODDECL(void)              GetDescendants(VwGuiComponentList &);
  57.  
  58.         VVIRTUALDECL(VwScaleMode)      ScaleMode();
  59.         VVIRTUALDECL(VwSingle)         ScaleHeight();
  60.         VVIRTUALDECL(VwSingle)         ScaleLeft();
  61.         VVIRTUALDECL(VwSingle)         ScaleTop();
  62.         VVIRTUALDECL(VwSingle)         ScaleWidth();
  63.  
  64.         VVIRTUALDECL(VwBool)            HasSetOptionButton();
  65.         VVIRTUALDECL(void)              SetOptionButton(VwGuiComponent *);
  66.  
  67.         VVIRTUALDECL(VwMenu_t)         MenuParent();
  68.         VVIRTUALDECL(VwInt)            NextMenuId(VwGuiComponent*);
  69.         VVIRTUALDECL(void)             AddMenuChild(VwGuiComponent*);
  70.         VVIRTUALDECL(void)             RemoveMenuChild(VwGuiComponent*);
  71.         VMETHODDECL(VwGuiComponentList*)GetMenuChildren();
  72.  
  73.         VVIRTUALDECL(VwStatus)         PutDefaultButton(VwGuiComponent*);
  74.         VVIRTUALDECL(VwStatus)         PutCancelButton(VwGuiComponent*);
  75.         VVIRTUALDECL(VwBool)           InvokeDefault();
  76.         VVIRTUALDECL(VwBool)           InvokeCancel();
  77.  
  78.         VVIRTUALDECL(VwBool)           HasDefaultButton();
  79.         VVIRTUALDECL(VwBool)           HasCancelButton();
  80.  
  81.         VVIRTUALDECL(void)             ShowDefaultButton(VwBool);
  82.  
  83.         VVIRTUALDECL(VwBool)           ClipControls ();
  84.         VVIRTUALDECL(VwStatus)         PutClipControls ( VwBool );
  85.  
  86.         VVIRTUALDECL(VwBool)           MustUseReconfigure();
  87.  
  88.         VVIRTUALDECL(void)             ResizeChildren (VwInt deltaX,
  89.                                                         VwInt deltaY);
  90.         VMETHODDECL(VwStatus)          Reconfigure(VwInt aLeft, VwInt aTop,
  91.                                                 VwInt aWidth, VwInt aHeight);
  92.         VVIRTUALDECL(VwStatus)         PutResizable(VwBool);
  93.         VVIRTUALDECL(VwBool)           Resizable();
  94.  
  95.         VMETHODDECL(void)              HasBecomeVisible();
  96.         VMETHODDECL(void)              PreferredSize(VwInt*, VwInt*);
  97.  
  98.         // Used to inform parent of change in child configuration
  99.         VVIRTUALDECL(void)             ChildReconfigured(VwGuiComponent*, VwBool);
  100.         VMETHODDECL(VwBool)            UpdateDelayed();
  101.  
  102.         // Used to Destroy a VwContainer and all its descendants
  103.         VMETHODDECL(void)              Destroy();
  104.  
  105.         // used to align a child within the container
  106.         VVIRTUALDECL(VwStatus)         AlignChild(VwGuiComponent *aChild, VwAlign);
  107.         VVIRTUALDECL(VwAlign )         MatchAlign(VwAlign);
  108.  
  109.         // Used to update the mouse pointer when changed in VwScreen
  110.         VMETHODDECL(VwBool)            SetMousePointer(POINT*);
  111.  
  112.         VMETHODDECL(VwStatus)          PutVisible(VwBool);
  113.  
  114.     VMETHODDECL(VwStatus)          PutEnabled(VwBool);
  115.  
  116.         VMETHODDECL(int)               NumberOfVisibleChildren();
  117.  
  118.         VVIRTUALDECL(VwSingle)         MillimeterHorizScale();
  119.         VVIRTUALDECL(VwSingle)         MillimeterVertScale();
  120.         VVIRTUALDECL(VwBool)            IsHiddenContainer();
  121. protected:
  122.         VOPERDECL VwContainer();
  123.         VOPERDECL VwContainer(const String, VwContainer *,
  124.                 VwSingle = VW_DEF_X, VwSingle = VW_DEF_Y,
  125.                 VwSingle = VW_DEF_WIDTH, VwSingle = VW_DEF_HEIGHT,
  126.                 VwBool visible = VwTrue);
  127.  
  128.         VMETHODDECL(void)             IgnoreChildUpdates(VwBool);
  129.         VMETHODDECL(void)             MinContainerSize(VwInt*, VwInt*);
  130.  
  131.         VwGuiComponent*        itsSetOptionButton;
  132.         VwSingle                itsScaleHeight;
  133.         VwSingle                itsScaleLeft;
  134.         VwSingle                itsScaleTop;
  135.         VwSingle                itsScaleWidth;
  136.         VwScaleMode             itsScaleMode;
  137.         VwBool                  isResizable;
  138.         VwBool                  isClipControls;
  139.  
  140. private:
  141.         void                    Init();
  142.         void                    SetChildrenVisibility(VwBool);
  143.     void            SetChildrenEnabled(VwBool);
  144.  
  145.         VwGuiComponentList      itsMenuChildren;
  146.         VwBool                  isUpdateDelayed;
  147.  
  148. protected:
  149.         //
  150.         // Windows message handlers common to most containers
  151.         //
  152.         VVIRTUALDECL(void)     WmSetCursor(POINT);
  153.         VVIRTUALDECL(void)     WmButtonUpDown(BOOL, int, UINT, POINT);
  154.         VVIRTUALDECL(void)     WmMouseMove(UINT, POINT);
  155.         VVIRTUALDECL(void)     WmLButtonDblClk(UINT, POINT);
  156.         VVIRTUALDECL(void)     WmPaint(VwpDC*, RECT*);
  157.  
  158.         VVIRTUALDECL(void)     AdjustBeforeRepaint();
  159. };
  160.  
  161. /*
  162.  * Property name constants
  163.  */
  164. #define VwPscaleTop     "ScaleTop"
  165. #define VwPscaleLeft    "ScaleLeft"
  166. #define VwPscaleHeight  "ScaleHeight"
  167. #define VwPscaleWidth   "ScaleWidth"
  168. #define VwPscaleMode    "ScaleMode"
  169. #define VwPclipControls "ClipControls"
  170.  
  171. #endif
  172.  
  173.