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

  1. /*------------------------------------------------------------------------
  2.  * $Source: /rcs/vwrcs/components/intel/vwadapt.hh,v $
  3.  * Checked in by $Author: jose $
  4.  * $Date: 1996/07/12 20:43:24 $                   $Revision: 1.15 $
  5.  *------------------------------------------------------------------------
  6.  *      Copyright (c) International Business Machines Inc, 1994
  7.  *             Copyright (c) 1992, Visual Edge Software Ltd.
  8.  *
  9.  * ALL RIGHTS RESERVED.  This notice is  intended  as  a  precaution
  10.  * against  inadvertent publication, and shall not be deemed to con-
  11.  * stitute an acknowledgment that publication has  occurred  nor  to
  12.  * imply  any  waiver  of confidentiality.  The year included in the
  13.  * notice is the year of the creation of the work.
  14.  *------------------------------------------------------------------------
  15.  * DESCRIPTION:
  16.  *      This file contains the declaration of the VwContainerAdapter
  17.  *      and VwFormBaseAdapter class methods. The class implementation
  18.  *      can be found in VwAdapt.cc. An adaptor container is used to
  19.  *      create a real VwContainer from a container widget.  An adaptor
  20.  *      formBase is used to create a real VwFormBase from a shell widget.
  21.  *------------------------------------------------------------------------*/
  22.  
  23. #ifndef VWADAPT_HH
  24. #define VWADAPT_HH
  25.  
  26. #include <vwprim.hh>
  27.  
  28. VCLASS VwpPlaceable;
  29.  
  30. VCLASS VwPrimitiveAdapter : public VwPrimitive {
  31.  
  32. public:
  33.         RTTI_H(VeClass,VwPrimitive);
  34.  
  35.         static VMETHODDECL (VwPrimitiveAdapter *)Create(VwGui_t gui,
  36.                                                  VwContainer *parent = 0);
  37.  
  38.         VOPERDECL VwPrimitiveAdapter(VwContainer *parent);
  39.         VOPERDECL VwPrimitiveAdapter(VwGui_t gui, VwContainer *parent);
  40.  
  41.         VOPERDECL ~VwPrimitiveAdapter();
  42.  
  43.  
  44.         VMETHODDECL(VwInt)              NativeLeft();
  45.         VMETHODDECL(VwInt)              NativeTop();
  46.         VMETHODDECL(VwInt)              NativeWidth();
  47.         VMETHODDECL(VwInt)              NativeHeight();
  48.  
  49.         /*-----------------------------------------------
  50.          * Disable unsupported properties
  51.          *----------------------------------------------*/
  52.  
  53.         VMETHODDECL (VwLong)            BackColor();
  54.         VMETHODDECL (VwStatus)          PutBackColor(VwLong);
  55.  
  56.         VMETHODDECL (VwLong)            ForeColor();
  57.         VMETHODDECL (VwStatus)          PutForeColor(VwLong);
  58.  
  59.         VMETHODDECL (const String)      Caption();
  60.         VMETHODDECL (VwStatus)          PutCaption(String);
  61.  
  62.         VMETHODDECL (VwBorderStyle)     BorderStyle();
  63.         VMETHODDECL (VwStatus)          PutBorderStyle(VwBorderStyle);
  64.  
  65.         VMETHODDECL (VwBool)            FontBold ();
  66.         VMETHODDECL (VwStatus)          PutFontBold ( VwBool );
  67.  
  68.         VMETHODDECL (VwBool)            FontItalic ();
  69.         VMETHODDECL (VwStatus)          PutFontItalic ( VwBool );
  70.  
  71.         VMETHODDECL (const String)      FontFoundry ();
  72.         VMETHODDECL (VwStatus)          PutFontFoundry ( String );
  73.  
  74.         VMETHODDECL (const String)      FontName ();
  75.         VMETHODDECL (VwStatus)          PutFontName ( String );
  76.  
  77.         VMETHODDECL (VwSingle)          FontSize ();
  78.         VMETHODDECL (VwStatus)          PutFontSize ( VwSingle );
  79.  
  80.         VMETHODDECL (VwBool)            FontStrikethru ();
  81.         VMETHODDECL (VwStatus)          PutFontStrikethru ( VwBool );
  82.  
  83.         VMETHODDECL (VwBool)            FontUnderline ();
  84.         VMETHODDECL (VwStatus)          PutFontUnderline ( VwBool );
  85.  
  86.         VMETHODDECL (VwAlign)           Align();
  87.         VMETHODDECL (VwStatus)          PutAlign(VwAlign);
  88.  
  89.         VMETHODDECL (VwpPlaceable*)       DragIcon();
  90.         VMETHODDECL (VwStatus)          PutDragIcon(VwpPlaceable*);
  91.  
  92.         VMETHODDECL (VwDragMode)        DragMode();
  93.         VMETHODDECL (VwStatus)          PutDragMode(VwDragMode);
  94.  
  95.         VMETHODDECL (VwGui_t)           DragGui();
  96.         VMETHODDECL (void)              Drag(VwInt = VwStartDragAction);
  97.  
  98.         /*-----------------------------------------------
  99.          * Disable all events
  100.          *----------------------------------------------*/
  101.         VMETHODDECL (void *) PutDragDropEvent(VwDragDropEventProcedurePtr_t,
  102.                                         void * = 0);
  103.         VMETHODDECL (void *) PutDragOverEvent(VwDragOverEventProcedurePtr_t,
  104.                                         void * = 0);
  105.         VMETHODDECL (void *) PutClickEvent(VwClickEventProcedurePtr_t,
  106.                                         void * = 0);
  107.         VMETHODDECL (void *) PutDblClickEvent(VwDblClickEventProcedurePtr_t,
  108.                                         void * = 0);
  109.         VMETHODDECL (void *) PutChangeEvent(VwChangeEventProcedurePtr_t,
  110.                                         void * = 0);
  111.         VMETHODDECL (void *) PutGotFocusEvent(VwGotFocusEventProcedurePtr_t,
  112.                                         void * = 0);
  113.         VMETHODDECL (void *) PutLostFocusEvent(VwLostFocusEventProcedurePtr_t,
  114.                                         void * = 0);
  115.  
  116.         VMETHODDECL (void *) PutKeyDownEvent(VwKeyDownEventProcedurePtr_t,
  117.                                         void * = 0);
  118.         VMETHODDECL (void *) PutKeyPressEvent(VwKeyPressEventProcedurePtr_t,
  119.                                         void * = 0);
  120.         VMETHODDECL (void *) PutKeyUpEvent(VwKeyUpEventProcedurePtr_t,
  121.                                         void * = 0);
  122.         VMETHODDECL (void *) PutMouseDownEvent(VwMouseDownEventProcedurePtr_t,
  123.                                         void * = 0);
  124.         VMETHODDECL (void *) PutMouseUpEvent(VwMouseUpEventProcedurePtr_t,
  125.                                         void * = 0);
  126.         VMETHODDECL (void *) PutMouseMoveEvent(VwMouseMoveEventProcedurePtr_t,
  127.                                         void * = 0);
  128.  
  129. protected:
  130.     //
  131.     // If the component can be tabbed to, then call this method
  132.     // to intialize object to accept tab behavior. This method
  133.     // just calls PutIsInTabOder(VwTrue), and PutCanHaveFocus(TRUE) 
  134.     // to flag the object as being able to get the focus
  135.     //
  136.         VMETHODDECL (void)      SetupAsTabStop();
  137.  
  138.     //
  139.     // This method should be called when the default window proc
  140.     // behavior is desired.
  141.     //
  142.     VMETHODDECL (VwStatus)    SetupDefaultProc();
  143.  
  144.         VMETHODDECL (void)      Setup(VwGui_t gui);
  145.         VMETHODDECL (void)      Unsetup();
  146. private:
  147.     bool_t            itIsLinked;
  148.     bool_t            itIsInternalGui;
  149.  
  150. };
  151.  
  152. VCLASS VwContainerAdapter : public VwContainer {
  153. public:
  154.         RTTI_H(VeClass,VwContainer);
  155.         static VMETHODDECL(VwContainerAdapter *) Create(VwGui_t gui,
  156.                                         VwContainer *parent = 0);
  157.  
  158.         VOPERDECL                       VwContainerAdapter(VwContainer *parent);
  159.         VOPERDECL                       VwContainerAdapter(VwGui_t gui,
  160.                                         VwContainer *parent);
  161.  
  162.         VOPERDECL             ~VwContainerAdapter();
  163.  
  164.         VMETHODDECL(VwInt)              NativeLeft();
  165.         VMETHODDECL(VwInt)              NativeTop();
  166.         VMETHODDECL(VwInt)              NativeWidth();
  167.         VMETHODDECL(VwInt)              NativeHeight();
  168.  
  169.         /*-----------------------------------------------
  170.          * Disable unsupported properties
  171.          *----------------------------------------------*/
  172.         VMETHODDECL(VwLong)             BackColor();
  173.         VMETHODDECL(VwStatus)           PutBackColor(VwLong);
  174.  
  175.         VMETHODDECL(VwLong)             ForeColor();
  176.         VMETHODDECL(VwStatus)           PutForeColor(VwLong);
  177.  
  178.         VMETHODDECL(const String)       Caption();
  179.         VMETHODDECL(VwStatus)           PutCaption(String);
  180.  
  181.         VMETHODDECL(VwBorderStyle)      BorderStyle();
  182.         VMETHODDECL(VwStatus)           PutBorderStyle(VwBorderStyle);
  183.  
  184.         VMETHODDECL(VwBool)             FontBold ();
  185.         VMETHODDECL(VwStatus)           PutFontBold ( VwBool );
  186.  
  187.         VMETHODDECL(VwBool)             FontItalic ();
  188.         VMETHODDECL(VwStatus)           PutFontItalic ( VwBool );
  189.  
  190.         VMETHODDECL(const String)       FontFoundry ();
  191.         VMETHODDECL(VwStatus)           PutFontFoundry ( String );
  192.  
  193.         VMETHODDECL(const String)       FontName ();
  194.         VMETHODDECL(VwStatus)           PutFontName ( String );
  195.  
  196.         VMETHODDECL(VwSingle)           FontSize ();
  197.         VMETHODDECL(VwStatus)           PutFontSize ( VwSingle );
  198.  
  199.         VMETHODDECL(VwBool)             FontStrikethru ();
  200.         VMETHODDECL(VwStatus)           PutFontStrikethru ( VwBool );
  201.  
  202.         VMETHODDECL(VwBool)             FontUnderline ();
  203.         VMETHODDECL(VwStatus)           PutFontUnderline ( VwBool );
  204.  
  205.         VMETHODDECL(VwAlign)            Align();
  206.         VMETHODDECL(VwStatus)           PutAlign(VwAlign);
  207.  
  208.         VMETHODDECL(VwpPlaceable*)        DragIcon();
  209.         VMETHODDECL(VwStatus)           PutDragIcon(VwpPlaceable*);
  210.  
  211.         VMETHODDECL(VwDragMode)         DragMode();
  212.         VMETHODDECL(VwStatus)           PutDragMode(VwDragMode);
  213.  
  214.         VMETHODDECL(VwGui_t)            DragGui();
  215.         VMETHODDECL(void)               Drag(VwInt = VwStartDragAction);
  216.  
  217.         VMETHODDECL(VwBool)             ClipControls();
  218.         VMETHODDECL(VwStatus)           PutClipControls(VwBool);
  219.  
  220.         /*-----------------------------------------------
  221.          * Disable all events
  222.          *----------------------------------------------*/
  223.         VMETHODDECL(void *) PutDragDropEvent(VwDragDropEventProcedurePtr_t,
  224.                                                                 void * = 0);
  225.         VMETHODDECL(void*) PutDragOverEvent(VwDragOverEventProcedurePtr_t,
  226.                                                                 void * = 0);
  227.         VMETHODDECL(void*) PutClickEvent(VwClickEventProcedurePtr_t,
  228.                                                                 void * = 0);
  229.         VMETHODDECL(void*) PutDblClickEvent(VwDblClickEventProcedurePtr_t,
  230.                                                                 void * = 0);
  231.         VMETHODDECL(void* )PutChangeEvent(VwChangeEventProcedurePtr_t,
  232.                                                                 void * = 0);
  233.         VMETHODDECL(void*) PutGotFocusEvent(VwGotFocusEventProcedurePtr_t,
  234.                                                                 void * = 0);
  235.         VMETHODDECL(void*) PutLostFocusEvent(VwLostFocusEventProcedurePtr_t,
  236.                                                                 void * = 0);
  237.         VMETHODDECL(void*) PutKeyDownEvent(VwKeyDownEventProcedurePtr_t,
  238.                                                                 void * = 0);
  239.         VMETHODDECL(void*) PutKeyPressEvent(VwKeyPressEventProcedurePtr_t,
  240.                                                                 void * = 0);
  241.         VMETHODDECL(void*) PutKeyUpEvent(VwKeyUpEventProcedurePtr_t,
  242.                                                                 void * = 0);
  243.         VMETHODDECL(void*) PutMouseDownEvent(VwMouseDownEventProcedurePtr_t,
  244.                                                                 void * = 0);
  245.         VMETHODDECL(void*) PutMouseUpEvent(VwMouseUpEventProcedurePtr_t,
  246.                                                                 void * = 0);
  247.         VMETHODDECL(void*) PutMouseMoveEvent(VwMouseMoveEventProcedurePtr_t,
  248.                                                                 void * = 0);
  249.  
  250. protected:
  251.  
  252.     //
  253.     // If the component can be tabbed to, then call this method
  254.     // to intialize object to accept tab behavior. This method
  255.     // just calls PutIsInTabOder(VwTrue), and PutCanHaveFocus(TRUE) 
  256.     // to flag the object as being able to get the focus
  257.     //
  258.         VMETHODDECL (void)      SetupAsTabStop();
  259.  
  260.     //
  261.     // This method should be called when the default window proc
  262.     // behavior is desired.
  263.     //
  264.     VMETHODDECL (VwStatus)    SetupDefaultProc();
  265.  
  266.         VMETHODDECL (void) Setup(VwGui_t gui);
  267.         VMETHODDECL (void) Unsetup();
  268. private:
  269.     bool_t            itIsLinked;
  270.     bool_t            itIsInternalGui;
  271.  
  272. };
  273.  
  274. #endif // VWADAPT_HH
  275.