Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1:/tmp/cvs-serv581/include

Modified Files:
        MessageView.h MessageViewer.h 
Added Files:
        ClickAtt.h ClickInfo.h ClickURL.h 
Log Message:
1. Removed MessageViewer::InsertSignature(); added EndText()
2. ClickableInfo reorganization:
 a) ClickableInfo is not in a separate header and is now a base class
 b) instead of switch on type of ClickableInfo we now have
    ClickableAttachment and ClickableURL implementations of the base class


***** Error reading new file: [Errno 2] No such file or directory: 'ClickAtt.h'
***** Error reading new file: [Errno 2] No such file or directory: 'ClickInfo.h'
***** Error reading new file: [Errno 2] No such file or directory: 'ClickURL.h'
Index: MessageView.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageView.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -b -u -2 -r1.36 -r1.37
--- MessageView.h       1 Dec 2002 00:27:34 -0000       1.36
+++ MessageView.h       5 Dec 2002 19:47:29 -0000       1.37
@@ -12,6 +12,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifndef MESSAGEVIEW_H
-#define MESSAGEVIEW_H
+#ifndef _M_MESSAGEVIEW_H_
+#define _M_MESSAGEVIEW_H_
 
 #ifdef __GNUG__
@@ -46,22 +46,4 @@
 
 // ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-/// the kind of the URL for PopupURLMenu()
-enum URLKind
-{
-   URL_Mailto,
-   URL_Other
-};
-
-/// options for OpenURL() (these are bit masks)
-enum
-{
-   URLOpen_Default    = 0,
-   URLOpen_New_Window = 1
-};
-
-// ----------------------------------------------------------------------------
 // MessageView: this class does MIME handling and uses ViewFilters (which, in
 //              turn, use MessageViewer) to really show things on the screen
@@ -131,13 +113,4 @@
    void SetLanguage(int cmdLang);
 
-   /// open the URL (in a new browser window if options has NewWindow flag)
-   void OpenURL(const String& url, int options = URLOpen_Default);
-
-   /// open an address, i.e. start writing message to it normally
-   void OpenAddress(const String& address);
-
-   /// add an address to the address book
-   void AddToAddressBook(const String& address);
-
    //@}
 
@@ -230,7 +203,4 @@
    //@}
 
-   /// return a descriptive label for this MIME part
-   static String GetLabelFor(const MimePart *mimepart);
-
    /** @name Accessors
 
@@ -247,4 +217,9 @@
    //@}
 
+   /// launch a process, returns FALSE if it failed
+   bool LaunchProcess(const String& command,    // cmd to execute
+                      const String& errormsg,   // err msg to give on failure
+                      const String& tempfile = ""); // temp file name if any
+
 protected:
    /** @name Initialization
@@ -283,9 +258,4 @@
    //@{
 
-   /// launch a process, returns FALSE if it failed
-   bool LaunchProcess(const String& command,    // cmd to execute
-                      const String& errormsg,   // err msg to give on failure
-                      const String& tempfile = ""); // temp file name if any
-
    /**
        synchronous versions of LaunchProcess(): launch a process and wait for
@@ -311,24 +281,4 @@
    //@}
 
-   /** @name GUI hooks
-
-       MessageView doesn't know anything about GUI so these methods must be
-       implemented in the derived class
-    */
-   //@{
-
-   /// show the URL popup menu
-   virtual void PopupURLMenu(wxWindow *window,
-                             const String& url,
-                             const wxPoint& pt,
-                             URLKind urlkind) = 0;
-
-   /// show the MIME popup menu for this message part
-   virtual void PopupMIMEMenu(wxWindow *window,
-                              const MimePart *part,
-                              const wxPoint& pt) = 0;
-
-   //@}
-
    /** @name Update
 
@@ -525,15 +475,4 @@
       wxColour UrlCol;
 
-      /// URL viewer
-      String browser;
-
-#ifdef OS_UNIX
-      /// Is URL viewer of the netscape variety?
-      bool browserIsNS:1;
-#endif // Unix
-
-      /// open netscape in new window?
-      bool browserInNewWindow:1;
-
       //@}
 
@@ -630,77 +569,4 @@
 
 // ----------------------------------------------------------------------------
-// ClickableInfo: data associated with the clickable objects in MessageView
-// ----------------------------------------------------------------------------
-
-class ClickableInfo
-{
-public:
-   enum Type
-   {
-      CI_ICON,
-      CI_URL
-   };
-
-   /** @name Ctors
-    */
-   //@{
-
-   /// ctor for URL
-   ClickableInfo(const String& url)
-      : m_label(url)
-      {
-         m_type = CI_URL;
-      }
-
-   /// ctor for all the rest
-   ClickableInfo(const MimePart *part, const String& label)
-      : m_label(label)
-      {
-         m_part = part;
-         m_type = CI_ICON;
-      }
-
-   //@}
-
-   /** @name Accessors
-    */
-   //@{
-
-   /// is it an URL or an attachment?
-   Type GetType() const { return m_type; }
-
-   /// get the URL text
-   const String& GetUrl() const
-   {
-      ASSERT_MSG( m_type == CI_URL, _T("no URL for this ClickableInfo!") );
-
-      return m_label;
-   }
-
-   /// get the MIME part (not for URLs)
-   const MimePart *GetPart() const
-   {
-      ASSERT_MSG( m_type != CI_URL, _T("no part number for this ClickableInfo!") );
-
-      return m_part;
-   }
-
-   /// get the label
-   const String& GetLabel() const
-   {
-      ASSERT_MSG( m_type != CI_URL, _T("Use GetUrl() for URLs!") );
-
-      return m_label;
-   }
-
-   //@}
-
-private:
-   Type   m_type;
-   String m_label;
-   const MimePart *m_part;
-};
-
-// ----------------------------------------------------------------------------
 // global functions (implemented in gui/wxMessageView.cpp)
 // ----------------------------------------------------------------------------
@@ -711,3 +577,3 @@
                                          UIdType uid);
 
-#endif // MESSAGEVIEW_H
+#endif // _M_MESSAGEVIEW_H_

Index: MessageViewer.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageViewer.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -b -u -2 -r1.14 -r1.15
--- MessageViewer.h     1 Dec 2002 00:27:34 -0000       1.14
+++ MessageViewer.h     5 Dec 2002 19:47:29 -0000       1.15
@@ -152,6 +152,16 @@
    virtual void InsertURL(const String& text, const String& url) = 0;
 
-   /// insert the signature (may be multiline)
-   virtual void InsertSignature(const String& signature) = 0;
+   /**
+      mark the end of text -- only signature/trailers may follow.
+
+      This is currently not used by any viewer, but will be used by composer
+      later: it will know that it can ignore all the rest.
+
+      Note that EndText() may be not called at all, unlike EndPart() or
+      EndBody() which are always called. Alternatively, it can be also called
+      several times -- then only the first call should matter and all
+      subsequent ones can be safely ignored.
+    */
+   virtual void EndText() = 0;
 
    /// mark the end of the MIME part



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to