Module: OLE-Server Synopsis: Methods for class Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND // Called when the doc window (in an MDI App) is (de)activated. define method IOleInPlaceActiveObject/OnDocWindowActivate (this :: , activate? :: ) => status :: ; // Note: This would only be used by an MDI container. // It has not yet been tested. -- DNG 9/5/96 Output-Debug-String("IOleInPlaceActiveObject/OnDocWindowActivate"); Output-Debug-Boolean(activate?); let obj = this.get-obj; // Activating? if ( activate? ) do-in-place-activate(obj, $OLEIVERB-UIACTIVATE); $S-OK else IOleInPlaceObject/UIDeactivate(obj.server-IOleInPlaceObject) end if end method IOleInPlaceActiveObject/OnDocWindowActivate; define method Output-Debug-Boolean(flag :: ) => (); Output-Debug-String(if (flag) " #t\r\n" else " #f\r\n" end if); end method; // Called when the Frame window is (de)activating define method IOleInPlaceActiveObject/OnFrameWindowActivate (this :: , activate? :: ) => status :: ; Output-Debug-String("IOleInPlaceActiveObject/OnFrameWindowActivate"); Output-Debug-Boolean(activate?); $S-OK end method IOleInPlaceActiveObject/OnFrameWindowActivate; // Gets the objects Window Handle. define method IOleWindow/GetWindow(this :: ) => ( status :: , window-handle :: ); Output-Debug-String("IOleWindow/GetWindow\r\n"); values( $S-OK, OLE-part-doc-window(this.get-obj) ) end method IOleWindow/GetWindow; // Used to implement Context Sensitive help define method IOleWindow/ContextSensitiveHelp (this :: , enter? :: ) => status :: ; Output-Debug-String("IOleWindow/ContextSensitiveHelp"); Output-Debug-Boolean(enter?); $E-NOTIMPL // not implemented yet end method IOleWindow/ContextSensitiveHelp; // Used for translating accelerators in .DLL objects. define method IOleInPlaceActiveObject/TranslateAccelerator (this :: , msg :: ) => status :: ; // Output-Debug-String("IOleInPlaceActiveObject/TranslateAccelerator\r\n"); let accelerators = OLE-part-accelerators(this.get-obj); if ( null?(accelerators) | zero?(TranslateAccelerator(msg.hwnd-value, accelerators, msg)) ) $S-FALSE // message not translated else $S-OK // message was translated end if end method IOleInPlaceActiveObject/TranslateAccelerator; define open generic OLE-part-accelerators ( obj ) => table :: false-or(); // default method: define method OLE-part-accelerators ( obj :: ) => table :: false-or(); #f end; // Called when the border changes size. define method IOleInPlaceActiveObject/ResizeBorder ( this :: , // don't bother specializing unused arguments. new-border /* :: */, in-place-UI-window :: , is-frame-window? /* :: */ ) => status :: ; Output-Debug-String("IOleInPlaceActiveObject/ResizeBorder\r\n"); let obj = this.get-obj; if ( in-place-UI-window = obj.container-IOleInPlaceFrame ) // may need to adjust the tool bar set-border-space(obj); else IOleInPlaceUIWindow/SetBorderSpace(in-place-UI-window, $NULL-RECT); end if; $S-OK end method IOleInPlaceActiveObject/ResizeBorder; // Called to enable/disable modeless dialogs. // Comments: // Called by the container when a modal dialog box is added/removed // from the screen. The appropriate action for a server application // is to disable/enable any modeless dialogs currently being displayed. define method IOleInPlaceActiveObject/EnableModeless ( this :: , enable? :: ) => status :: ; Output-Debug-String("IOleInPlaceActiveObject/EnableModeless"); Output-Debug-Boolean(enable?); OLE-part-enable-dialog(this.get-obj, enable?); $S-OK // no error codes are specified for this operation end method IOleInPlaceActiveObject/EnableModeless; // Default method does nothing define method OLE-part-enable-dialog(obj :: , enable? :: ) => (); values() end method;