home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / NewsServerDialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  83 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.    NewsServerDialog.h -- dialog for letting the user add a new news server.
  20.    Created: Chris Toshok <toshok@netscape.com>, 24-Oct-96.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_newsserverdialog_h
  26. #define _xfe_newsserverdialog_h
  27.  
  28. #include "xp_core.h"
  29. #include "Dialog.h"
  30. #include "Frame.h"
  31.  
  32. class XFE_NewsServerDialog: public XFE_Dialog
  33. {
  34. public:
  35.     XFE_NewsServerDialog(Widget parent,
  36.                          char *name,
  37.                          XFE_Frame *frame);
  38.  
  39.     virtual ~XFE_NewsServerDialog();
  40.  
  41.     /* changes the delete response to UNMAP so we can keep the
  42.        dialog around after it's popped down, and returns True
  43.        if Ok was pressed, and False otherwise (either cancel or
  44.        the WM close button was pressed. 
  45.  
  46.        This method calls fe_eventLoop so we can return with the
  47.        user's response from here. 
  48.  
  49.        since we UNMAP instead of DESTROY, you need to delete the
  50.        instance after you're through with it.*/
  51.     XP_Bool post();
  52.  
  53.     const char *getServer();
  54.     int getPort();
  55.     XP_Bool isSecure();
  56.   
  57. private:
  58.     XP_Bool m_retVal;
  59.     XP_Bool m_doneWithLoop;
  60.  
  61.     Widget m_serverText;
  62.     Widget m_portText;
  63.     Widget m_secureToggle;
  64.  
  65.     int m_portTextEdited;
  66.  
  67.     XFE_Frame *m_frame;
  68.  
  69.     void ok();
  70.     void cancel();
  71.     void port_edit();
  72.     void toggle();
  73.  
  74.     XP_Bool verify();
  75.  
  76.     static void ok_cb(Widget, XtPointer, XtPointer);
  77.     static void cancel_cb(Widget, XtPointer, XtPointer);
  78.     static void toggle_cb(Widget, XtPointer, XtPointer);
  79.     static void port_edit_cb(Widget, XtPointer, XtPointer);
  80. };
  81.  
  82. #endif /* _xfe_newsserverdialog_h */
  83.