home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odtlktv4.zip
/
ODTLKT
/
TOOLKIT
/
IDL
/
PART.IDL
< prev
next >
Wrap
Text File
|
1995-12-13
|
13KB
|
415 lines
/********************************************************************/
/* Licensed Materials - Property of IBM */
/* */
/* */
/* Copyright (C) International Business Machines Corp., 1994. */
/* Copyright (C) Apple Computer, Inc., 1994 */
/* */
/* US Government Users Restricted Rights - */
/* Use, duplication, or disclosure restricted */
/* by GSA ADP Schedule Contract with IBM Corp. */
/* */
/* */
/********************************************************************/
#ifndef _PART_
#define _PART_
#ifndef _PSTOBJ_
#include "PstObj.idl"
#endif
//==============================================================================
// Classes defined in this interface
//==============================================================================
interface ODPart;
//==============================================================================
// Classes used by this interface
//==============================================================================
interface ODCanvas;
interface ODDragItemIterator;
interface ODEmbeddedFramesIterator;
interface ODFacet;
interface ODFrame;
interface ODLink;
interface ODLinkSource;
#ifdef _PLATFORM_OS2_
interface ODMenuBar;
#endif
interface ODObjectSpec;
interface ODShape;
interface ODStorageUnit;
interface ODStorageUnitView;
interface ODTypeList;
//==============================================================================
// ODPart
//==============================================================================
interface ODPart : ODPersistentObject
{
//==========================================================================
// Required Protocols
//==========================================================================
//--------------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------------
void InitPart(in ODStorageUnit storageUnit,
in ODPart partWrapper);
void InitPartFromStorage(in ODStorageUnit storageUnit,
in ODPart partWrapper);
//--------------------------------------------------------------------------
// From Layout protocol
//--------------------------------------------------------------------------
void DisplayFrameAdded(in ODFrame frame);
void DisplayFrameRemoved(in ODFrame frame);
void DisplayFrameConnected(in ODFrame frame);
void DisplayFrameClosed(in ODFrame frame);
void AttachSourceFrame(in ODFrame frame,
in ODFrame sourceFrame);
void FrameShapeChanged(in ODFrame frame);
void ViewTypeChanged(in ODFrame frame);
void PresentationChanged(in ODFrame frame);
void SequenceChanged(in ODFrame frame);
void LinkStatusChanged(in ODFrame frame);
void ContainingPartPropertiesUpdated(in ODFrame frame,
in ODStorageUnit propertyUnit);
ODInfoType ReadPartInfo(in ODFrame frame,
in ODStorageUnitView storageUnitView);
void WritePartInfo(in ODInfoType partInfo,
in ODStorageUnitView storageUnitView);
void ClonePartInfo(in ODDraftKey key,
in ODInfoType partInfo,
in ODStorageUnitView storageUnitView,
in ODFrame scope);
ODID Open(in ODFrame frame);
//--------------------------------------------------------------------------
// From Imaging protocol
//--------------------------------------------------------------------------
void Draw(in ODFacet facet,
in ODShape invalidShape);
void FacetAdded(in ODFacet facet);
void FacetRemoved(in ODFacet facet);
void GeometryChanged(in ODFacet facet,
in ODBoolean clipShapeChanged,
in ODBoolean externalTransformChanged);
void HighlightChanged(in ODFacet facet);
void CanvasChanged(in ODFacet facet);
void CanvasUpdated(in ODCanvas canvas);
ODULong GetPrintResolution(in ODFrame frame);
//--------------------------------------------------------------------------
// From Part Activation protocol
//--------------------------------------------------------------------------
ODBoolean BeginRelinquishFocus(in ODTypeToken focus,
in ODFrame ownerFrame,
in ODFrame proposedFrame);
void CommitRelinquishFocus(in ODTypeToken focus,
in ODFrame ownerFrame,
in ODFrame proposedFrame);
void AbortRelinquishFocus(in ODTypeToken focus,
in ODFrame ownerFrame,
in ODFrame proposedFrame);
void FocusAcquired(in ODTypeToken focus,
in ODFrame ownerFrame);
void FocusLost(in ODTypeToken focus,
in ODFrame ownerFrame);
//--------------------------------------------------------------------------
// From Part Persistance protocol
//--------------------------------------------------------------------------
void ExternalizeKinds(in ODTypeList kindset);
void ChangeKind(in ODType kind);
//--------------------------------------------------------------------------
// From UI Events protocol
//--------------------------------------------------------------------------
ODBoolean HandleEvent(inout ODEventData event,
in ODFrame frame,
in ODFacet facet,
inout ODEventInfo eventInfo);
void AdjustMenus(in ODFrame frame);
#ifdef _PLATFORM_OS2_
ODMenuBar CreateRootMenuBar( in ODFrame frame );
#endif
//==========================================================================
// Optional Protocols
//==========================================================================
//--------------------------------------------------------------------------
// From Undo protocol
//--------------------------------------------------------------------------
void UndoAction(in ODActionData actionState);
void RedoAction(in ODActionData actionState);
void DisposeActionState(in ODActionData actionState,
in ODDoneState doneState);
void WriteActionState(in ODActionData actionState,
in ODStorageUnitView storageUnitView);
ODActionData ReadActionState(in ODStorageUnitView storageUnitView);
//--------------------------------------------------------------------------
// From DragAndDrop protocol
//--------------------------------------------------------------------------
void FulfillPromise(in ODStorageUnitView promiseSUView);
void DropCompleted(in ODPart destPart,
in ODDropResult dropResult);
ODDragResult DragEnter(in ODDragItemIterator dragInfo,
in ODFacet facet,
in ODPoint where);
ODDragResult DragWithin(in ODDragItemIterator dragInfo,
in ODFacet facet,
in ODPoint where);
void DragLeave(in ODFacet facet,
in ODPoint where);
ODDropResult Drop(in ODDragItemIterator dropInfo,
in ODFacet facet,
in ODPoint where);
//--------------------------------------------------------------------------
// From Linking protocol
//--------------------------------------------------------------------------
ODLinkSource CreateLink(in ODByteArray data);
void RevealLink(in ODLinkSource linkSource);
void LinkUpdated(in ODLink updatedLink,
in ODUpdateID change);
#ifdef _PLATFORM_OS2_
void BreakLink(in ODLink link);
void BreakLinkSource(in ODLinkSource linkSource);
void LinkBroken(in ODLink link);
void UpdateFromLinkSource(in ODLinkSource linkSource);
void ShowLink(in ODLink link);
#endif
// --- for containing parts ---
void EmbeddedFrameUpdated(in ODFrame frame,
in ODUpdateID change);
ODBoolean EditInLinkAttempted(in ODFrame frame);
//--------------------------------------------------------------------------
// From Embedding protocol
//--------------------------------------------------------------------------
ODFrame RequestEmbeddedFrame(in ODFrame containingFrame,
in ODFrame baseFrame,
in ODShape frameShape,
in ODPart embedPart,
in ODTypeToken viewType,
in ODTypeToken presentation,
in ODBoolean isOverlaid);
void RemoveEmbeddedFrame(in ODFrame embeddedFrame);
ODShape RequestFrameShape(in ODFrame embeddedFrame,
in ODShape frameShape);
void UsedShapeChanged(in ODFrame embeddedFrame);
ODShape AdjustBorderShape(in ODFacet embeddedFacet,
in ODShape shape);
ODStorageUnit AcquireContainingPartProperties(in ODFrame frame);
ODBoolean RevealFrame(in ODFrame embeddedFrame,
in ODShape revealShape);
void EmbeddedFrameSpec(in ODFrame embeddedFrame,
in ODObjectSpec spec);
ODEmbeddedFramesIterator CreateEmbeddedFramesIterator(in ODFrame frame);
//==========================================================================
// DO NOT OVERRIDE
//==========================================================================
//--------------------------------------------------------------------------
// From Part Wrapping protocol
//--------------------------------------------------------------------------
ODBoolean IsRealPart();
ODPart GetRealPart();
void ReleaseRealPart();
//==========================================================================
#ifdef __SOMIDL__
implementation
{
functionprefix = ODPart;
override:
somInit,
somUninit,
CloneInto;
releaseorder:
InitPart,
InitPartFromStorage,
DisplayFrameAdded,
DisplayFrameRemoved,
DisplayFrameConnected,
DisplayFrameClosed,
AttachSourceFrame,
FrameShapeChanged,
ViewTypeChanged,
PresentationChanged,
SequenceChanged,
LinkStatusChanged,
ContainingPartPropertiesUpdated,
ReadPartInfo,
WritePartInfo,
ClonePartInfo,
Open,
Draw,
FacetAdded,
FacetRemoved,
GeometryChanged,
HighlightChanged,
CanvasChanged,
CanvasUpdated,
GetPrintResolution,
BeginRelinquishFocus,
CommitRelinquishFocus,
AbortRelinquishFocus,
FocusAcquired,
FocusLost,
ExternalizeKinds,
ChangeKind,
HandleEvent,
AdjustMenus,
#ifdef _PLATFORM_OS2_
CreateRootMenuBar,
#endif
UndoAction,
RedoAction,
DisposeActionState,
WriteActionState,
ReadActionState,
FulfillPromise,
DropCompleted,
DragEnter,
DragWithin,
DragLeave,
Drop,
CreateLink,
RevealLink,
LinkUpdated,
#ifdef _PLATFORM_OS2_
BreakLink,
BreakLinkSource,
LinkBroken,
UpdateFromLinkSource,
ShowLink,
#endif
EmbeddedFrameUpdated,
EditInLinkAttempted,
RequestEmbeddedFrame,
RemoveEmbeddedFrame,
RequestFrameShape,
UsedShapeChanged,
AdjustBorderShape,
AcquireContainingPartProperties,
RevealFrame,
EmbeddedFrameSpec,
CreateEmbeddedFramesIterator,
IsRealPart,
GetRealPart,
ReleaseRealPart;
};
#endif
};
#ifdef _PLATFORM_OS2_
interface M_ODPart : SOMClass
{
ISOString clsGetODPartHandlerName();
string clsGetODPartHandlerDisplayName();
sequence<PartKindInfo> clsGetODPartKinds();
string clsGetOLE2ClassId();
string clsGetWindowsIconFileName();
#ifdef __SOMIDL__
implementation
{
functionprefix = M_ODPart;
override:
somInitClass,
somNew;
releaseorder:
clsGetODPartHandlerName,
clsGetODPartHandlerDisplayName,
clsGetODPartKinds,
clsGetOLE2ClassId,
clsGetWindowsIconFileName,
reservered1,
reservered2,
reservered3,
reservered4;
};
#endif
};
#endif
#endif // _PART_