#ifdef __PRIVATE__
//#
//#	File:		Button.idl
//#
//#	Contains:	IDL for the Button editor SOM class
//#
//#	Written by:	Jeff Hanson
//#
//#	Copyright:	c 1995 by Novell, all rights reserved.
//#
//#
#else
//#	Copyright:	c 1995 by Novell, Inc., all rights reserved.
#endif


#ifndef _BUTTON_
#define _BUTTON_

#ifndef _PART_
#include "Part.idl"
#endif

//=====================================================================================
// interfaces defined by this file
//=====================================================================================

interface Button;

//=====================================================================================
// interfaces used by this file
//=====================================================================================

interface ODFrame;
interface ODSession;
interface ODFocusSet;
interface ODMenuBar;
interface ODPart;
interface ODWindow;

//=====================================================================================
// Implementation Types
//=====================================================================================

typedef somToken OrderedCollection;

#ifdef __PRIVATE__
typedef somToken FacetList;
typedef somToken Str255;
#endif

//=====================================================================================
// Button
//=====================================================================================

module Novell
{

interface Button : ODPart
{
#ifdef __PRIVATE__
	void MyCommonInitPart();
	ODBoolean MyHandleMenuEvent(in ODFrame frame, in ODEventData event, in ODFacet facet);
	ODBoolean MyHandleMouseDown(in ODEventData event, in ODFrame frame, in ODFacet facet);
	ODBoolean MyUsedShapeHandleMouseDown(in ODEventData event, in ODFrame frame, in ODFacet facet);
	ODShape MyGetFrameShape(in ODFrame frame);
	ODShape MyGetUsedShape(in ODFrame frame);
	void MyAdjustFacets(in ODFrame frame);
	ODBoolean MyWantResizable();
	ODWindow MyMakeWindow(in ODFrame sourceFrame);
	void MyCreateShadowWindow (in ODFacet facet);
	void MySizeShadowWindow ( in ODFacet facet);
	void MyDeleteShadowWindow (in ODFacet facet);
	OrderedCollection* GetDisplayFrames();
	void ActivateFrame(in ODFrame frame);


#endif

#ifdef __SOMIDL__
	implementation
	{
		majorversion = 1;
		minorversion = 0;
		
	releaseorder:
	#ifdef __PRIVATE__
		MyCommonInitPart,
		MyHandleMenuEvent,
		MyHandleMouseDown,
		MyUsedShapeHandleMouseDown,
		MyGetFrameShape,
		MyGetUsedShape,
		MyAdjustFacets,
		MyWantResizable,
		MyMakeWindow,
		MyCreateShadowWindow,
		MySizeShadowWindow,
		MyDeleteShadowWindow,
		GetDisplayFrames,
		ActivateFrame;
	#else
		reserved1,
		reserved2,
		reserved3,
		reserved4,
		reserved5,
		reserved6,
		reserved7,
		reserved8,
		reserved9,
		reserved10,
		reserved11,
		reserved12,
		reserved13,
		reserved14;
	#endif

	override:
  //#-------------------------------------------------------------------------
  //# From somObject
  //#-------------------------------------------------------------------------

		somInit,
		somUninit,

  //#-------------------------------------------------------------------------
  //# From ODObject
  //#-------------------------------------------------------------------------
  
  		HasExtension,
		GetExtension,
		ReleaseExtension,
		Purge,

  //#-------------------------------------------------------------------------
  //# From ODRefCountObject
  //#-------------------------------------------------------------------------

		IncrementRefCount,
		Release,

  //#-------------------------------------------------------------------------
  //# From ODPersistentObject
  //#-------------------------------------------------------------------------

		ReleaseAll,
        Externalize,
        CloneInto,

  //#-------------------------------------------------------------------------
  //# From Initialization protocol
  //#-------------------------------------------------------------------------

        InitPart,
        InitPartFromStorage,

  //#-------------------------------------------------------------------------
  //# From DragAndDrop protocol
  //#-------------------------------------------------------------------------

        FulfillPromise,
        DropCompleted,
        DragEnter,
        DragWithin,
        DragLeave,
        Drop,

  //#-------------------------------------------------------------------------
  //# From Embedding protocol
  //#-------------------------------------------------------------------------

        ContainingPartPropertiesChanged,

	  //#---------------------------------
	  //# for containing parts
	 
        GetContainingPartProperties,
        RevealFrame,
        EmbeddedFrameSpec,
        CreateEmbeddedFramesIterator,

  //#-------------------------------------------------------------------------
  //# From Layout protocol
  //#-------------------------------------------------------------------------

        DisplayFrameAdded,
        DisplayFrameRemoved,
        DisplayFrameConnected,
        DisplayFrameClosed,
        AttachSourceFrame,
        FrameShapeChanged,
        ViewTypeChanged,
        PresentationChanged,
		SequenceChanged,
        WritePartInfo,
        ReadPartInfo,
        Open,

	  //#---------------------------------
	  //# for containing parts

        RequestEmbeddedFrame,
        RemoveEmbeddedFrame,
        RequestFrameShape,
        UsedShapeChanged,
        AdjustBorderShape,
        FacetAdded,
        FacetRemoved,
        CanvasChanged,
        GeometryChanged,

  //#-------------------------------------------------------------------------
  //# From Imaging protocol
  //#-------------------------------------------------------------------------

        Draw,
        CanvasUpdated,
        HighlightChanged,
        GetPrintResolution,

  //#-------------------------------------------------------------------------
  //# From Linking protocol
  //#-------------------------------------------------------------------------

        CreateLink,
        LinkUpdated,
        RevealLink,
        EmbeddedFrameChanged,
        LinkStatusChanged,

  //#-------------------------------------------------------------------------
  //# From Arbitration protocol
  //#-------------------------------------------------------------------------

        BeginRelinquishFocus,
        CommitRelinquishFocus,
        AbortRelinquishFocus,
        FocusAcquired,
        FocusLost,

  //#-------------------------------------------------------------------------
  //# From Binding protocol
  //#-------------------------------------------------------------------------

        ExternalizeKinds,
        ChangeKind,

  //#-------------------------------------------------------------------------
  //# From UI Events protocol
  //#-------------------------------------------------------------------------

        HandleEvent,
        HandleEventInEmbedded,
        MouseEnter,
        MouseWithin,
        MouseLeave,
        AdjustMenus,

  //#-------------------------------------------------------------------------
  //# From Undo protocol
  //#-------------------------------------------------------------------------

        UndoAction,
        RedoAction,
        DisposeActionState,
        WriteActionState,
        ReadActionState;

	// instance variables
    #ifdef __PRIVATE__
		ODBoolean			fDirty;
		ODID				fWindowID;

		ODSession			fSession;

		ODID				fPartsBinWin;
		ODBoolean			fPartsBinOpen;

		ODFocusSet 			fFocusSet;
		ODTypeToken			fSelectionFocus;
		ODTypeToken			fMenuFocus;
		ODTypeToken			fKeyFocus;
		ODTypeToken			fModalFocus;
	
		ODMenuBar 			fMenuBar;

		Str255				fTextData;	

		ODPart				fPartWrapper;		// Passed into InitPart and InitPartFromStorage.
		FacetList*			fFacets;			// List of all my visible facets
		ODPlatformMenu		fMenu;				// Handle to my one (so far) menu
		ODBoolean			fHasFocus;
		OrderedCollection*	fDisplayFrames;

    #endif

	};
#endif
};

};  //# Module Novell

#endif
