info_edit.h

Go to the documentation of this file.
00001 #ifndef INFO_EDIT_CLASS
00002 #define INFO_EDIT_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : info_edit                                                         *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *  Purpose:                                                                   *
00010 *                                                                             *
00011 *    Provides a dialog box with a title and descriptive text.  One edit       *
00012 *  field is supplied for the user to enter one piece of information.          *
00013 *                                                                             *
00014 *******************************************************************************
00015 * Copyright (c) 2006-$now By Author.  This program is free software; you can  *
00016 * redistribute it and/or modify it under the terms of the GNU General Public  *
00017 * License as published by the Free Software Foundation; either version 2 of   *
00018 * the License or (at your option) any later version.  This is online at:      *
00019 *     http://www.fsf.org/copyleft/gpl.html                                    *
00020 * Please send any updates to: fred@gruntose.com                               *
00021 \*****************************************************************************/
00022 
00023 #include "mfc_dll.h"
00024 #include "mfc_extensions.rh"
00025 
00026 #include <basis/portable.h>
00027 
00028 #include <nsviews/NSFlexDialog.h>
00029 
00030 class MFC_EXTENSIONS_CLASS_STYLE info_edit : public CNSFlexDialog
00031 {
00032 public:
00033   info_edit(CWnd *parent = NIL, const char *initial_edit = "",
00034       int max_length = 20, const char *description = "Please enter data",
00035       const char *title = "Information", bool always_on_top = true);
00036 
00037   istring text() const;
00038     // returns the text in the entry field.
00039 
00040 protected:
00041   enum { IDD = IDD_INFO_EDIT_DIALOG };
00042   CString _text_field;
00043   CString _description_field;
00044 
00045   virtual void DoDataExchange(CDataExchange* pDX);
00046   virtual BOOL OnInitDialog();
00047   virtual void OnOK();
00048 
00049   DECLARE_MESSAGE_MAP()
00050 
00051 private:
00052   istring *_title;  // the title for the dialog.
00053   int _max_length;  // the maximum length for the field.
00054   bool _on_top;  // records whether this window should stay on top of others.
00055 };
00056 
00057 #endif
00058 

Generated on Thu Nov 20 04:28:49 2008 for HOOPLE Libraries by  doxygen 1.5.1