home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odtlktv4.zip
/
ODTLKT
/
TOOLKIT
/
BETA
/
SAMPLES
/
OPENDOC
/
PARTS
/
CNTNRPRT
/
CNTNRPRT.IDL
< prev
next >
Wrap
Text File
|
1995-12-13
|
23KB
|
603 lines
#ifdef __PRIVATE__
//#
//# File: CntnrPrt.idl
//#
//# Contains: IDL description of Container Part
//#
//# Written by: Jason Crawford
//#
//# Copyright: (c) 1994 by IBM Corp., all rights reserved.
//#
//# Change History (most recent first):
//#
//# 146974 12/12/95 ced Changes for Open As Window rework
//# 144532 11/21/95 ced Added _fContentSU, change var BGColor to long
//# 137002 09/15/95 jso Added getbgcolor for notebook to query
//# 128682 09/14/95 faa Implement cut/copy/paste functions
//# 134597 8/27/95 ced Disable multithreaded drawing for now
//# 131406 8/16/95 st separate MRI into own DLL
//# 131094 08/14/95 faa When Container focus is lost, selected items remain selected
//# 127685 08/08/95 map Implement multithreaded drawing
//# 128683 07/25/95 faa Implement select all/deselect all function
//# 127858 07/20/95 aht Add scripting support: change background color via osa event
//# 126859 06/24/95 st more menu code-adjusting popup/selected phase I
//# 124281 06/06/95 BLG Added new routine (DisplayStatusLineText)
//# to put text to status line - Need to have
//# status line focus (new flag) to display text.
//# 124371 06/02/95 ced change HandleMouseXXXX method names to HandleButton#XXXX
//# Add methods & instance vars for scaling & rotating
//# 123945 05/31/95 pfe added fSequence for frame sequence numbers
//# 123149 05/23/95 ced added support for mult selection
//# <4> 04/18/95 pfe added GetDisplayFrames method for PartWindows
//# <3> 11/05/94 ced Changes related to removal of
//# proxy regions (see cntnrprt.cpp)
//# <2> 10/7/94 ced Add methods for tracking mouse
//# <1> 7/6/94 jlc first checked in
//#
//# To Do:
//#
#else
//# Copyright: (c) 1993-1994 by IBM Corp., all rights reserved.
#endif
#ifndef _CNTNRPRT_
#define _CNTNRPRT_
#ifndef _PART_
#include "Part.idl"
#endif
interface ODWindow;
interface ODFocusSet;
//interface ODFrame;
interface ODMenuBar;
interface ODSemanticInterface;
interface ODSettingsExtension;
interface ODSession;
interface ODTransform;
interface M_ContainerPart;
interface ODStatusLineExtension;
interface ODPopup;
interface ODViewExtension;
//#ifdef __PRIVATE__
//=====================================================================================
// Implementation Types
//=====================================================================================
interface ODxOrderedCollection;
typedef somToken Proxy;
typedef somToken FacetClip;
#ifdef _PLATFORM_OS2_
typedef long PRNINFO;
typedef long HDC;
typedef unsigned long HMODULE;
typedef long HRGN;
typedef void* PPOLYGON;
typedef long TID; // [127685]
typedef void* SemHandle; // [127685]
#else
typedef somToken TPrPort;
typedef somToken THPrint;
#endif
#pragma somemittypes on
enum TrackingMode {
kRubberBandSelection,
kBotLeftResize,
kTopLeftResize,
kTopRightResize,
kBotRightResize,
kRotateSelection,
kScaleSelection,
kSelectScaleOrigin,
kSelectRotateOrigin
};
enum MouseMode {
kNormal,
kTracking,
kRotateSelectCenter,
kScaleSelectRefPoint
};
enum TrackingUpdateMode {
kUpdateModeStart,
kUpdateModeContinue,
kUpdateModeEnd
};
#pragma somemittypes off
interface ContainerPart : ODPart
{
ODSemanticInterface GetSemanticInterface();
#ifdef _PLATFORM_MAC_
void SetNewBounds( in ODFrame frame, in Rect r ) ;
#endif
Proxy* ProxyForFrame(in ODFrame frame);
ODFrame FrameFromProxyForContainingFrame(in Proxy* p, in ODFrame containingFrame);
void RemoveProxyObject(in Proxy* p);
void InvalidateProxy(in Proxy* proxy);
Proxy* CreateProxyObject(in ODShape frameShape, in ODTransform externalTransform,
in ODPart embedPart, in ODBoolean isOverLaid);
FacetClip* FindFacetClip(in ODFacet facet);
void CreateProxySelectionBorder();
ODBoolean NormalizeProxyGeometry(in Proxy* p);
void SetProxyFrameShapes(in Proxy* p);
void SetFrameSelected(in ODFrame frame, in ODBoolean isSelected);
void InvalidateSelection(in ODFrame frame);
void Invalidate();
void ClipEmbeddedFrames(in ODFrame frame);
void ClipSelectionFromEmbeddedFrames(in ODFrame frame);
void ClipSelectionFromEmbeddedFacets(in ODFacet Facet);
void UnClipSelectionFromEmbeddedFrames(in ODFrame frame);
void UnClipSelectionFromEmbeddedFacets(in ODFacet Facet);
// void CommonInitContainerPart(in ODPartWrapper partWrapper);
void CommonInitContainerPart();
#ifdef _PLATFORM_MAC_
void LoadIcons();
#endif
ODxOrderedCollection GetEmbeddedFrames();
ODxOrderedCollection GetDisplayFrames();
Proxy* ProxyForFrameID(in ODID frameID);
#ifdef _PLATFORM_MAC_
void HighlightSelection();
void HighlightProxyBorder(in Proxy* p);
void HighlightContentObject(in Proxy* p);
void ClipEmbeddedFacets(in ODFacet facet);
#else
void HighlightSelection( in ODFacet facet);
void HighlightProxyBorder( in Proxy *p, in ODFacet facet);
void HighlightContentObject( in Proxy *p, in ODFacet facet);
void ClipEmbeddedFacets( in ODFacet facet);
#endif
void AdjustPopupMenu( in ODFrame frame );
void AdjustSelectedMenu(in ODFrame frame);
void ClearPopupMenu(in ODFrame frame);
void ClearSelectedMenu(in ODFrame frame);
void EmptySelection();
void ShowSelection(in ODFrame frame, in ODBoolean show);
ODBoolean HandleButton1Down( in ODFacet facet,
in ODPoint where,
in ODEventData event);
ODBoolean HandleButton1Click( in ODFacet facet,
in ODPoint where,
in ODEventData event);
ODBoolean HandleButton1MotionStart( in ODFacet facet,
in ODPoint where,
in ODEventData event);
ODBoolean HandleMouseDrag(in ODFacet container, in ODFacet facet, in ODPoint* mouse, in ODEventData event);
ODBoolean HandleButton1ClickInEmbeddedFrame( in ODFacet container,
in ODFacet facet,
in ODPoint where,
in ODEventData event);
ODBoolean HandleButton1ClickInBorder( in ODFacet container,
in ODFacet facet,
in ODPoint where,
in ODEventData event);
ODBoolean HandleKeyDown(in ODFrame focusFrame, in ODEventData event);
ODBoolean HandleMenuEvent(in ODFrame focusFrame, in ODEventData event);
#ifdef _PLATFORM_OS2_
ODBoolean HandleMouseMove( in ODFacet facet,
in ODFrame frame,
in ODPoint where,
in ODEventData event);
ODBoolean HandleButton1MotionEnd(in ODFacet facet,
in ODFrame frame,
in ODPoint where,
in ODEventData event);
ODBoolean HandleButton1Up(in ODFacet facet,
in ODFrame frame,
in ODPoint where,
in ODEventData event);
void ResetMouseMode();
void UpdateTrackRect(in ODPoint* ptMouse,
in ODFacet facet,
in TrackingUpdateMode updateMode);
void DrawPolygons(in HPS hps);
void MouseFocusLost(in ODFrame ownerFrame);
ODBoolean BeginTrackingMouse(in ODFacet facet);
#else
ODBoolean HandlePageSetup(in ODFrame focusFrame);
#endif
ODBoolean HandlePrinting(in ODFrame frame, in char *QueueName);
#ifdef _PLATFORM_MAC_
void CreateDefPrintRec();
ODFacet BeginPrinting(in ODFrame rootFrame, in TPrPort* thePrPort);
void PrintPage(in ODFacet prFacet, in ODUShort page);
void PrintDocument(in ODFrame frame);
#else
ODFacet BeginPrinting(in ODFrame rootFrame, in PRNINFO *pPI );
void PrintPage(in ODFacet prFacet, in ODUShort pagenum, in PRNINFO *pPI);
long PrintPages( in ODFrame frame , in PRNINFO *pPI ) ;
#endif
void EndPrinting(in ODFacet prFacet);
ODBoolean DoCut(in ODFrame frame);
ODBoolean DoCopy(in ODFrame frame);
ODBoolean DoPaste(in ODFrame frame);
ODBoolean DoPasteLink(in ODFrame frame);
ODBoolean DoClear(in ODFrame frame);
ODBoolean DoSelectAll(in ODFrame frame);
ODBoolean DoDeSelectAll(in ODFrame frame);
ODBoolean AllowPaste(in ODFrame frame);
ODBoolean CloneSelectionToClipboard(in ODFrame ownerFrame, in ODCloneKind cloneKind);
void PasteFrameFromClipboard(in ODFacet facet, in ODPoint where);
ODBoolean ActivateFrame(in ODFrame frame);
void PartActivated(in ODFrame frame);
void ActivatingWindow(in ODFrame frame);
void DeActivatingWindow(in ODFrame frame);
void InstallMenus();
void RemoveMenus(in ODFrame aFrame);
void UserSetBGColor(in ODFrame frame, in long whichColor);
void SetBGColor1(in ODFrame aFrame, in long whichColor); //@127858
void SetBGColor2(in ODFrame aFrame, in long whichColor);
void Embed(in short item, in ODFrame frame, out ODPart newPart);
long GetBGColor();
ODFrame MakeEmbeddedFrame(in ODFrame containingFrame,
in Proxy* p,
in ODBoolean isOverlaid);
void CloseEmbeddedFrame(in ODFrame frame);
ODWindow CreateWindow(in ODFrame sourceFrame);
#ifdef _PLATFORM_OS2_
ODBoolean MoveToFront(in ODFrame frame);
ODBoolean MoveToBack(in ODFrame frame);
ODBoolean MoveForward(in ODFrame frame);
ODBoolean MoveBackward(in ODFrame frame);
// -utilities-
void ClearAccelTable( in ODFrame oldOwner );
void SetAccelTable( in ODFrame newOwner );
// -demo-
long GetDemoState();
ODBoolean DisplayStatusLineText(in string str,in ODFrame curFrame );// 124281
#endif
void FreezeEmbeddedFrames(in ODBoolean freeze);
void CreateTrackingPolygons(in ODBoolean transformPoints);
void HandleColorMenu(in ODFrame frame, in ODCommandID command); //@127858
#ifdef __SOMIDL__
implementation
{
functionprefix = ContainerPart;
metaclass = M_ContainerPart;
majorversion = 1;
minorversion = 0;
releaseorder:
GetSemanticInterface,
ProxyForFrame,
CreateProxySelectionBorder,
InvalidateSelection,
ClipEmbeddedFrames,
CommonInitContainerPart,
GetEmbeddedFrames,
ProxyForFrameID,
HighlightSelection,
HighlightProxyBorder,
HighlightContentObject,
ClipEmbeddedFacets,
EmptySelection,
ShowSelection,
HandleButton1Click,
reserved01,
HandleMouseDownDrag,
reserved3,
reserved4,
HandleButton1ClickInEmbeddedFrame,
HandleKeyDown,
HandleMenuEvent,
HandlePageSetup,
HandlePrinting,
#ifdef _PLATFORM_OS2_ // CED
HandleMouseMove,
HandleButton1MotionEnd,
UpdateTrackRect,
MouseFocusLost,
#endif // _PLATFORM_OS2_
GetDemoState,
DisplayStatusLineText,
CreateDefPrintRec,
BeginPrinting,
PrintPage,
EndPrinting,
PrintDocument,
DoCut,
DoCopy,
DoPaste,
DoPasteLink,
DoClear,
DoSelectAll,
AllowPaste,
PasteFrameFromClipboard,
DoDeSelectAll,
ActivateFrame,
ActivatingWindow,
DeActivatingWindow,
InstallMenus,
RemoveMenus,
SetBGColor1,
UserSetBGColor,
SetBGColor2,
Embed,
reserved02,
GetBGColor,
MakeEmbeddedFrame,
CreateWindow,
MoveToFront,
MoveToBack,
MoveForward,
MoveBackward,
ClearAccelTable,
SetAccelTable,
AdjustPopupMenu,
AdjustSelectedMenu,
ClearSelectedMenu,
ClearPopupMenu,
PrintPages,
GetDisplayFrames,
SetFrameSelected,
HandleButton1ClickInBorder,
reserved5,
HandleMouseDrag,
ClipSelectionFromEmbeddedFrames,
FindFacetClip,
DrawPolygons,
BeginTrackingMouse,
HandleButton1Down,
HandleButton1MotionStart,
FreezeEmbeddedFrames,
HandleButton1Up,
ResetMouseMode,
CreateTrackingPolygons,
ClipSelectionFromEmbeddedFacets,
HandleColorMenu,
CloneSelectionToClipboard,
PartActivated,
UnClipSelectionFromEmbeddedFrames,
UnClipSelectionFromEmbeddedFacets,
FrameFromProxyForContainingFrame,
RemoveProxyObject,
CreateProxyObject,
CloseEmbeddedFrame,
InvalidateProxy,
Invalidate,
NormalizeProxyGeometry,
SetProxyFrameShapes
;
override:
somInit,
somUninit,
FulfillPromise,
DropCompleted,
DragEnter,
DragWithin,
DragLeave,
Drop,
AcquireExtension,
ReleaseExtension,
HasExtension,
ContainingPartPropertiesUpdated,
AcquireContainingPartProperties,
CreateRootMenuBar,
RevealFrame,
EmbeddedFrameSpec,
CreateEmbeddedFramesIterator,
DisplayFrameAdded,
AttachSourceFrame,
DisplayFrameRemoved,
DisplayFrameConnected,
DisplayFrameClosed,
FrameShapeChanged,
ViewTypeChanged,
PresentationChanged,
SequenceChanged,
WritePartInfo,
ReadPartInfo,
ClonePartInfo,
Open,
RequestEmbeddedFrame,
RemoveEmbeddedFrame,
RequestFrameShape,
UsedShapeChanged,
AdjustBorderShape,
FacetAdded,
FacetRemoved,
CanvasChanged,
GeometryChanged,
Draw,
CanvasUpdated,
HighlightChanged,
GetPrintResolution,
CreateLink,
LinkUpdated,
RevealLink,
BreakLink,
BreakLinkSource,
LinkBroken,
UpdateFromLinkSource,
ShowLink,
EmbeddedFrameUpdated,
LinkStatusChanged,
BeginRelinquishFocus,
CommitRelinquishFocus,
AbortRelinquishFocus,
FocusAcquired,
FocusLost,
CloneInto,
ExternalizeKinds,
Externalize,
ChangeKind,
HandleEvent,
#ifdef B1C7
HandleEventInEmbedded,
MouseEnter,
MouseWithin,
MouseLeave,
#endif
AdjustMenus,
UndoAction,
RedoAction,
DisposeActionState,
WriteActionState,
ReadActionState,
InitPart,
InitPartFromStorage,
ReleaseAll,
Release;
#if 1 //def __PRIVATE__
passthru C_xh = ""
"class ODFrame ;"
"class ODTransform ;"
#ifdef _PLATFORM_MAC_
"struct Proxy {"
"ODRgnHandle region;"
"ODFrame* frame;"
"ODTransform* transform;"
"Proxy(ODRgnHandle r, ODFrame* f, ODTransform* t) {region = r; frame = f; transform = t; }"
"};"
"#include <Printing.h>"
"#include <Quickdraw.h>";
#else
"struct Proxy;"
"struct FacetClip;"
"struct PRNINFO;";
#endif
passthru C_xih = " "
#ifdef _PLATFORM_MAC_
"typedef Handle ODIcon;"
#endif
;
#endif
#ifdef __PRIVATE__
// instance variables
ODxOrderedCollection fDisplayFrames;
ODxOrderedCollection fEmbeddedFrames;
ODID fWindowID; // ID of View As Window window
ODULong fFrameGroupIDCounter; // B1C7
ODULong fSequence; //[pfe] 123945
POINTL fDragStart;
long fBGColor; // background color of display frames
ODxOrderedCollection fContents;
ODxOrderedCollection fSelection;
ODStorageUnit fContainerSU;
ODShape fSelectShape;
ODRect fSelectRect;
//ODIcon fLargeIcons;
//ODIcon fSmallIcons;
ODFocusSet fFocusSet;
ODTypeToken fSelectionFocus;
ODTypeToken fMenuFocus;
ODTypeToken fKeyFocus;
ODTypeToken fMouseFocus;
ODTypeToken fClipboardFocus;
ODSemanticInterface fSemtIntf;
ODSession fSession;
ODStorageUnit fTestDrawSU;
ODBoolean fNeedToExternalize;
ODBoolean fPasteOn;
ODBoolean fPasteESC;
ODSettingsExtension fNotebook;
ODPart fPartWrapper;
#ifdef _PLATFORM_MAC_
ODMenuBar fMenuBar;
MenuHandle fEmbedMenu;
MenuHandle fColorMenu;
MenuHandle fFrameMenu;
THPrint fPrintRecord;
#else
HPS hpsMem;
HDC hdcMem;
HMODULE hmod;
ODPopup fPopup;
ODMenuBar fMenuBar;
ODPoint mouseStart;
ODFacet fTrackingFacet; // facet tracking the mouse
TrackingMode fTrackingMode;
ODPoint ptOrigin; // origin of tracking rect
ODPoint ptEnd; // end of tracking rect
ODPoint ptMouseOffset;
ODPoint ptRef;
PPOLYGON fPolygons;
ODULong fNumPolygons;
// just for the sake of debugging, we'll have a menu item
// for toggling the check and enable state of another
// menu item. It will toggle between four states.
long DemoState;
long DemoOpenCount;
ODMenuBar fSPEMenuOfSelection;
ODMenuBar fRemappedSPEMenuOfSelection;
ODTypeToken fStatusFocus;
ODStatusLineExtension fStatusLn;
ODFrame fSelectionFrame;
ODFrame fPasteFrame;
ODViewExtension fViewExtension;
MouseMode fMouseMode;
ODBoolean fIgnoreContextMenu;
ODxOrderedCollection fSavedFacetClipShapes;
ODBoolean fDropAccepted; // [140007]
#endif
#endif
};
#endif
};
interface M_ContainerPart : M_ODPart
{
#ifdef __SOMIDL__
implementation
{
functionprefix = M_ContainerPart;
override:
clsGetODPartHandlerName,
clsGetODPartHandlerDisplayName,
clsGetODPartKinds,
clsGetOLE2ClassId,
clsGetWindowsIconFileName;
};
#endif
};
#endif // _CNTNRPRT_