home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-13 | 4.1 KB | 137 lines | [TEXT/MPS ] |
- /*
- File: TextEditorSettingsExt.cpp
-
- Contains: Sample Part's SOM based part public interface implementation
-
- Written by: Steve Smith
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- // Notification that this is a SOM source file
- #define TextEditorSettingsExt_Class_Source
-
- // define underscore field names (e.g. _fSelf)
- #define VARIABLE_MACROS
-
- // -- Compiler/Preprocessor Switches --
-
- #ifndef _COMPILERDEFS_
- #include "CompDefs.h"
- #endif
-
- // -- OpenDoc Utilities --
-
- #ifndef _EXCEPT_
- // Exceptions define several important macros (e.g. CHECKENV)
- // which are used in the SOM method dispatch glue. If Except.h
- // is not included early enough, exceptions may not be thrown
- // correctly when returning from a SOM method with "ev" parameter set.
- #include <Except.h>
- #endif
-
- // -- Text Editor Includes --
-
- #ifndef SOM_TextEditorSettingsExt_xih
- #include "TextEditorSettingsExt.xih"
- #endif
-
- #ifndef SOM_SampleCode_TextEditor_xh
- #include "TextEditor.xh"
- #endif
-
- // -- OpenDoc Includes --
-
- #ifndef SOM_ODSettingsExtension_xh
- #include <Settings.xh>
- #endif
-
- #ifndef SOM_ODFacet_xh
- #include <Facet.xh>
- #endif
-
-
-
- #pragma segment TextEditorSettingsExt
-
- //==============================================================================
- // TextEditorSettingsExt
- //==============================================================================
-
- //------------------------------------------------------------------------------
- // Method: somInit
- // Origin: SOMObject
- //
- // Description: This is the SOM equivalent of a C++ class constructor.
- //
- // Warnings: You are not allowed to throw an exception from this method.
- //------------------------------------------------------------------------------
- SOM_Scope void SOMLINK TextEditorSettingsExt__somInit(TextEditorSettingsExt *somSelf)
- {
- TextEditorSettingsExtMethodDebug("TextEditorSettingsExt","somInit");
- }
-
- //------------------------------------------------------------------------------
- // Method: somUninit
- // Origin: SOMObject
- //
- // Description: This is the SOM equivalent of a C++ class constructor.
- //
- // Warnings: You are not allowed to throw an exception from this method.
- //------------------------------------------------------------------------------
- SOM_Scope void SOMLINK TextEditorSettingsExt__somUninit(TextEditorSettingsExt *somSelf)
- {
- TextEditorSettingsExtMethodDebug("TextEditorSettingsExt","somUninit");
- }
-
- //------------------------------------------------------------------------------
- // Method: Release
- // Origin: ODRefCntObj
- //------------------------------------------------------------------------------
- SOM_Scope void SOMLINK TextEditorSettingsExt__Release(TextEditorSettingsExt *somSelf, Environment *ev)
- {
- TextEditorSettingsExtMethodDebug("TextEditorSettingsExt","Release");
-
- TextEditorSettingsExt_parent_ODSettingsExtension_Release(somSelf,ev);
- }
-
- //------------------------------------------------------------------------------
- // Method: InitSettingsExtension
- // Origin: ODSettingsExtension
- //------------------------------------------------------------------------------
- SOM_Scope void SOMLINK TextEditorSettingsExt__InitSettingsExtension(TextEditorSettingsExt *somSelf, Environment *ev,
- ODPart* owner)
- {
- TextEditorSettingsExtData *somThis = TextEditorSettingsExtGetData(somSelf);
- TextEditorSettingsExtMethodDebug("TextEditorSettingsExt","InitSettingsExtension");
-
- TextEditorSettingsExt_parent_ODSettingsExtension_InitSettingsExtension(somSelf,ev,owner);
-
- SOM_TRY
-
- _fOwner = (SampleCode_TextEditor*) owner->GetRealPart(ev);
-
- owner->ReleaseRealPart(ev);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // Method: ShowSettings
- // Origin: ODSettingsExtension
- //------------------------------------------------------------------------------
- SOM_Scope void SOMLINK TextEditorSettingsExt__ShowSettings(TextEditorSettingsExt *somSelf, Environment *ev,
- ODFacet* facet)
- {
- TextEditorSettingsExtData *somThis = TextEditorSettingsExtGetData(somSelf);
- TextEditorSettingsExtMethodDebug("TextEditorSettingsExt","ShowSettings");
-
- SOM_TRY
-
- _fOwner->DoSettings(ev, facet->GetFrame(ev));
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-