home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / TextEditorView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.4 KB  |  80 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.    TextEditorView.h - anything that has a plain text editable area in it. 
  20.    Created: Dora Hsu <dora@netscape.com>, Sept-30-96.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_texteditorview_h
  26. #define _xfe_texteditorview_h
  27.  
  28. #include "MNView.h"
  29. #include "Editable.h"
  30. #include "PopupMenu.h"
  31. extern "C" {
  32. #include "msgcom.h"
  33. }
  34.  
  35. class XFE_TextEditorView: public XFE_MNView, public XFE_Editable
  36. {
  37. public:
  38.   XFE_TextEditorView(XFE_Component *toplevel_component, 
  39.             XFE_View *parent_view, MSG_Pane *pane,
  40.              MWContext *context);
  41.  
  42.   virtual Boolean isCommandEnabled(CommandType command, void *calldata = NULL,
  43.                                    XFE_CommandInfo* i = NULL);
  44.   virtual Boolean handlesCommand(CommandType command, void *calldata = NULL,
  45.                                    XFE_CommandInfo* i = NULL);
  46.   virtual void doCommand(CommandType command, void *calldata = NULL,
  47.                                    XFE_CommandInfo* i = NULL);
  48.   virtual void     createWidgets(Widget parent, XP_Bool wrap_p);
  49.  
  50.   // virtual methods on Editable....
  51.   virtual char *getPlainText();
  52.   virtual void insertMessageCompositionText(
  53.                 const char* text, XP_Bool leaveCursorBeginning, 
  54.                 XP_Bool isHTML = False );
  55.  
  56.   virtual void getMessageBody(
  57.         char **pBody, uint32 *body_size, 
  58.         MSG_FontCode **font_changes);
  59.  
  60.   virtual void doneWithMessageBody(char* pBody);
  61.  
  62.   virtual Boolean isModified();
  63.  
  64.   void setComposeWrapState(XP_Bool wrap_p);
  65.   void setFont(XmFontList fontList);
  66.  
  67.   void textFocus();
  68.  
  69.   static const char *textFocusIn;
  70.  
  71. protected:
  72. private:
  73.   static MenuSpec popupmenu_spec[];
  74.   XFE_PopupMenu *m_popup;
  75.  
  76.   static void textFocusCallback(Widget, XtPointer clientData, XtPointer);
  77. };
  78.  
  79. #endif //_xfe_texteditorview_h
  80.