home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / Composer / CEditorWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.4 KB  |  68 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #pragma once
  20.  
  21. #include "CBrowserWindow.h"
  22.  
  23.  
  24. struct EditorCreationStruct {
  25.     MWContext    *context;    // may be NULL
  26.     URL_Struct    *existingURLstruct;
  27.     Boolean        isEmptyPage;
  28. };
  29.  
  30.  
  31.  
  32. /******************************************************************************
  33.  * CEditorWindow is really just a CBrowserWindow with some changes for an editor window.
  34.  ******************************************************************************/
  35. class CEditorWindow: public CBrowserWindow
  36. {    
  37. public:
  38.     enum {class_ID = 'edtw', res_ID = 10000};
  39.     
  40.     // ÑÑ Constructors
  41.  
  42.     static void         RegisterViewTypes();    // Registers all its view types
  43.     static CEditorWindow *MakeEditWindow( MWContext* old_context, URL_Struct* url );
  44.     static CEditorWindow *CreateEditorWindowStage2( EditorCreationStruct *edtCreatePtr);
  45.     static void         MakeEditWindowFromBrowser( MWContext* mwcontext );
  46.  
  47.                         CEditorWindow(LStream * inStream);
  48.     virtual void         FinishCreateSelf();
  49.     virtual void        SetWindowContext(CBrowserContext* inContext);
  50.  
  51.     // ÑÑ Command handling
  52.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  53.     virtual    Boolean     ObeyCommand( CommandT inCommand, void *ioParam );
  54.     virtual void          FindCommandStatus( CommandT inCommand,
  55.                             Boolean& outEnabled, Boolean& outUsesMark, 
  56.                             Char16& outMark,Str255 outName );
  57.     virtual void        NoteDocTitleChanged( const char* title );
  58.     virtual Boolean        AttemptQuitSelf( long inSaveOption );
  59.     static CEditorWindow*    FindAndShow(Boolean inMakeNew = false);
  60.     virtual void        SetPluginDoneClosing() { mPluginDoneClosing = true; }
  61.  
  62. protected:
  63.  
  64.     virtual ResIDT        GetStatusResID(void) const { return CEditorWindow::res_ID; }
  65.  
  66.     Boolean              mPluginDoneClosing;
  67. };
  68.