home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / ComposeAddressView.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.5 KB  |  123 lines

  1. /* -*- Mode: C++; tab-width: 8; 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.    ComposeAddressView.cpp -- presents view for addressing and attachment .
  20.    Created: Dora Hsu <dora@netscape.com>, 23-Sept-96.
  21.    */
  22.  
  23.  
  24.  
  25. #include "ComposeAddressView.h"
  26. #include "xfe.h"
  27. #include "msgcom.h"
  28. #include "xp_mem.h"
  29.  
  30. #include <Xm/Frame.h>
  31.  
  32.  
  33. #ifdef DEBUG_dora
  34. #define XDEBUG(x) x
  35. #else
  36. #define XDEBUG(x)
  37. #endif
  38.  
  39. extern "C" 
  40. Widget fe_MailComposeWin_Create(MWContext* context, Widget parent);
  41.  
  42.  
  43. XFE_ComposeAddressView::XFE_ComposeAddressView(XFE_View *parent_view,
  44.             XFE_Component *toplevel_component,
  45.             MSG_Pane *p) : XFE_MNView(toplevel_component, p)
  46. {
  47.  
  48.   Widget w;
  49.   setParent(parent_view);
  50.   /* Create Widgets */
  51.   w= fe_MailComposeWin_Create((MWContext*)(parent_view->getContext()), 
  52.             parent_view->getBaseWidget());
  53.   setBaseWidget(w);
  54. }
  55.  
  56. void
  57. XFE_ComposeAddressView::createWidgets(Widget)
  58. {
  59.   XDEBUG( printf("enter XFE_ComposeAddressView::createWidgets()\n");)
  60.   XDEBUG( printf("leave XFE_ComposeAddressView::createWidgets()\n");)
  61. }
  62.  
  63. Boolean
  64. XFE_ComposeAddressView::isCommandEnabled(CommandType /* command */, void */*calldata*/)
  65. {
  66. XDEBUG(    printf ("in XFE_ComposeAddressView::isCommandEnabled()\n");)
  67.  
  68. XDEBUG(    printf ("leaving XFE_ComposeAddressView::isCommandEnabled()\n");)
  69.   return False;
  70. }
  71.  
  72. Boolean
  73. XFE_ComposeAddressView::handlesCommand(CommandType command, void */*calldata*/)
  74. {
  75. XDEBUG(    printf ("in XFE_ComposeAddressView::handlesCommand(%s)\n", Command::getString(command));)
  76.   if (command == xfeCmdGetNewMessages
  77.       || command == xfeCmdAddNewsgroup
  78.       || command == xfeCmdDelete
  79.       || command == xfeCmdViewSecurity
  80.       || command == xfeCmdStopLoading)
  81.     return True;
  82.  
  83. XDEBUG(    printf ("leaving XFE_ComposeAddressView::handlesCommand(%s), Command::getString(command)\n");)
  84.   return False;
  85. }
  86.  
  87. void
  88. XFE_ComposeAddressView::doCommand(CommandType command, void *,
  89.                                   XFE_CommandInfo*)
  90. {
  91. XDEBUG(    printf ("in XFE_ComposeAddressView::doCommand()\n");)
  92. XDEBUG(    printf ("Do Command: %s \n", Command::getString(command));)
  93.  
  94. #if 0
  95.   if (command == xfeCmdNewMailMessage)
  96.     {
  97.       XDEBUG(    printf ("XFE_ComposeAddressView::newMailMessage()\n");)
  98.     }
  99.   else if (command == xfeCmdOpenDraft)
  100.     {
  101.       XDEBUG(    printf ("MSG_FolderPane::openDraft()\n");)
  102.     }
  103.   else if (command == xfeCmdAddNewsgroup)
  104.     {
  105.       XDEBUG(    printf ("MSG_FolderPane::addNewsgroup()\n");)
  106.     }
  107.   else if (command == xfeCmdDelete)
  108.     {
  109.       XDEBUG(    printf ("MSG_FolderPane::deleteFolder()\n");)
  110.     }
  111.   else if (command == xfeCmdViewSecurity)
  112.     {
  113.       XDEBUG(    printf ("MSG_FolderPane::viewSecurity()\n");)
  114.     }
  115.   else if (command == xfeCmdStopLoading)
  116.     {
  117.       XDEBUG(    printf ("MSG_FolderPane::stopLoading()\n");)
  118.     }
  119. #endif
  120.  
  121. XDEBUG(    printf ("leaving XFE_ComposeAddressView::doCommand()\n");)
  122. }
  123.