table.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:3k
- /*
- * ===========================================================================
- * PRODUCTION $Log: table.hpp,v $
- * PRODUCTION Revision 1000.0 2003/10/31 20:25:05 gouriano
- * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.7
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_CORE_VIEW_TEXT___EDITOR_TABLE__HPP
- #define GUI_CORE_VIEW_TEXT___EDITOR_TABLE__HPP
- /*
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Authors: Lou Friedman
- *
- * File Description:
- * Header for an entry form table class that associate fields with some form
- * of editable widget.
- */
- #include <gui/dialogs/entry_form/field_assoc.hpp>
- #include <FL/Fl.H>
- #include <FL/Fl_Pack.H>
- #include <FL/Fl_Box.H>
- #include <FL/Fl_Group.H>
- #include <FL/Fl_Choice.H>
- #include <FL/Fl_Input.H>
- BEGIN_NCBI_SCOPE
- class NCBI_GUIDIALOGS_EXPORT CEntryFormTable : public Fl_Group
- {
- public:
- // default ctor
- CEntryFormTable(int w, int space);
- // one and only dtor
- virtual ~CEntryFormTable();
- // add a title row
- void AddTitleRow(const char* label);
- // add a menu row (= drop-down list)
- Fl_Choice* AddMenuRow(const char* label_value,
- CEntryFormMenu& map_data,
- int current_value, void* user_data = 0);
- // add an input row. This can be one of many types.
- enum EInputType {
- eFile,
- eDouble,
- eInteger,
- eMultiLine,
- eSecret,
- eSingleLine
- };
- Fl_Input* AddInputRow(const char* label_value,
- const char* current_value,
- EInputType type = eMultiLine);
- void End ();
- protected:
- Fl_Pack* m_Pack;
- // internal callback for file open dialogs
- static void cb_FileOpen(Fl_Widget* w, void* data);
- };
- END_NCBI_SCOPE
- #endif // GUI_CORE_VIEW_TEXT___EDITOR_TABLE__HPP