// @(#) 1.2 com/src/samples/scrgraph/iodgpext.idl, odgrafscript, od96nt, odnt9712d 1/22/97 15:30:39 [3/21/97 17:42:56]
//#====START_GENERATED_PROLOG======================================
//#
//#
//#   COMPONENT_NAME: odgrafscript
//#
//#   CLASSES: none
//#
//#   ORIGINS: 82,27
//#
//#
//#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
//#   All Rights Reserved
//#   Licensed Materials - Property of IBM
//#   US Government Users Restricted Rights - Use, duplication or
//#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//#
//#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
//#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
//#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
//#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
//#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
//#   OR PERFORMANCE OF THIS SOFTWARE.
//#
//#====END_GENERATED_PROLOG========================================
//#
#ifdef __PRIVATE__
//#
//#     File:           iodgpext.idl
//#
//#     Contains:       IDL description of Graph Part Script Extension
//#
//#     Written by:     TRM
//#
//#     Copyright:      (c) 1996 by IBM Corp., all rights reserved.
#endif


#ifndef _IODGPEXT_
#define _IODGPEXT_

#include "iodbcext.idl"
#include <oddsconn.idl>


//==============================================================================
// Classes defined in this interface
//==============================================================================

interface   ODS_Graph ;

//==============================================================================
// Classes used by this interface
//==============================================================================

interface ODScriptExtension ;
interface ODShape ;
interface ContentObject ;
interface ODDSEventMgr;

//==============================================================================
// OD Scripting Extension
//==============================================================================

interface ODS_Graph : ODS_BaseContainer
// note we inherit ODDSConnection from ODS_BaseContainer
{


//  New Public Methods - really methods on the Graph part but we will be
//  Using the extension part as both the extension and as a surrogate for
//  the Graph Part.

  long    AddLine             (in long x1, in long y1,
                               in long x2, in long y2, in long RGBValue) ;
  long    AddRectangle        (in long x1, in long y1,
                               in long x2, in long y2, in long RGBValue) ;
  long    AddPoint            (in long x,  in long y , in long RGBValue) ;
  boolean Shift               (in long handle, in long deltaX, in long deltaY) ;
  boolean Adjust              (in long handle, in long x1, in long y1,
                                               in long x2, in long y2) ;
  boolean Remove              (in long handle) ;
  long    CountOver           (in long x, in long y) ;
  long    FirstOver           (in long x, in long y) ;
  boolean IsOver              (in long handle, in long x, in long y) ;
  void    Refresh             (in long handle ) ;
  void    SetColor            (in long handle, in long RGBvalue);
  void    SetupFont           (in long FontHeight,   in long FontAngle,
                               in long FontColorRGB, in long FontFlags,
                               in string FontName) ;
  long    AddText             (in long x1, in long y1,
                               in long x2, in long y2, in string Text) ;
  boolean GetBounds           (in long handle, out long x1, out long y1,
                                               out long x2, out long y2) ;
  void    AccumulateChanges   (in ContentObject theInstance) ;
  long    GetTypeCode         (in long handle) ;
  long    TriggerMouseDown    (in long x, in long y) ;
  boolean GetAllParts         (in sequence<long> theParts) ;
  boolean GetPointList        (in long handle, in sequence<long> thePoints) ;

// local data items
  attribute long   FontHeight ;
  attribute long   FontAngle  ;
  attribute long   FontColor  ;
  attribute string FontName   ;
  attribute long   FontFlags  ;

#ifdef __SOMIDL__
        implementation
        {
            functionprefix = SGPExt_ ;
            majorversion = 1;
            minorversion = 0;
            dllname = "iodscrgp.dll";

#ifdef __PRIVATE__

    // instance data
    ODShape          refreshShape ;             // used to accumulate refresh region
    ODGUID           fODGuidMouseDown ;         // hold GUID used by MouseDown Manager
    ODDSEventMgr     fEventManagerMouseDown;    // hold reference to MouseDown Manager

#endif

            Register                :override ;
            InitScriptExtension     :override ;
            somDestruct             :override ;

        releaseorder:
           AddLine               ,
           AddRectangle          ,
           AddPoint              ,
           Shift                 ,
           Adjust                ,
           Locate                ,
           Refresh               ,
           Remove                ,
           CountOver             ,
           FirstOver             ,
           SetBackground         ,
           SetupFont             ,
           AddText               ,
           GetBounds             ,
           _get_FontHeight       ,
           _get_FontAngle        ,
           _get_FontColor        ,
           _get_FontName         ,
           _set_FontHeight       ,
           _set_FontAngle        ,
           _set_FontColor        ,
           _set_FontName         ,
           AccumulateChanges     ,
           GetAllParts           ,
           SetColor              ,
           GetTypeCode           ,
           GetPointList          ,
           TriggerMouseDown      ,
           IsOver                ,
           _set_FontFlags        ,
           _get_FontFlags         ;


           ODevent="ODS_GraphEvents";        // point to event description

    //  identify scripting interfaces
           AddLine          :  ODid = "";
           AddRectangle     :  ODid = "";
           AddPoint         :  ODid = "";
           Shift            :  ODid = "";
           Adjust           :  ODid = "";
           Locate           :  ODid = "";
           Refresh          :  ODid = "";
           Remove           :  ODid = "";
           CountOver        :  ODid = "";
           FirstOver        :  ODid = "";
           SetBackground    :  ODid = "";
           AddText          :  ODid = "";
           SetupFont        :  ODid = "";
           GetBounds        :  ODid = "";
           FontHeight       :  ODid = "";
           FontAngle        :  ODid = "";
           FontColor        :  ODid = "";
           FontName         :  ODid = "";
           GetAllParts      :  ODid = "";
           SetColor         :  ODid = "";
           GetTypeCode      :  ODid = "";
           GetPointList     :  ODid = "";
           IsOver           :  ODid = "";
           FontFlags        :  ODid = "";

        };
#endif
};

#endif  // _IODGPEXT_
