entrez_record_table.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: entrez_record_table.hpp,v $
- * PRODUCTION Revision 1000.0 2004/06/01 21:26:45 gouriano
- * PRODUCTION PRODUCTION: IMPORTED [GCC34_MSVC7] Dev-tree R1.1
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_PLUGINS_DOC_BASIC___ENTREZ_RECORD_TABLE__HPP
- #define GUI_PLUGINS_DOC_BASIC___ENTREZ_RECORD_TABLE__HPP
- /* $Id: entrez_record_table.hpp,v 1000.0 2004/06/01 21:26:45 gouriano Exp $
- * ===========================================================================
- *
- * 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: Mike DiCuccio
- *
- * File Description:
- * CGBSearchPlugin - load sequence information form Genbank.
- */
- #include <corelib/ncbistd.hpp>
- #include <gui/widgets/fl/table_panel.hpp>
- #include <gui/utils/gui_event.hpp>
- #include <gui/utils/command.hpp>
- #include <gui/utils/reporter.hpp>
- #include <objects/entrez2/Entrez2_docsum.hpp>
- #include "entrez_db.hpp"
- BEGIN_NCBI_SCOPE
- USING_SCOPE(objects);
- class CEntrezRecordTable
- : public CTablePanel< CRef<CEntrez2_docsum> >,
- public CCommandTarget
- {
- public:
- typedef CTablePanel< CRef<CEntrez2_docsum> > TParent;
- // default (FLTK) ctor
- CEntrezRecordTable(int x, int y, int w, int h, const char* label = NULL);
- // FLTK: handle events. This is used to trap the menu popup commands
- int handle(int event);
- // set our reporter
- void SetReporter(IReporter* reporter);
- // run an Entrez query against the current database
- void Query(const string& terms, size_t& total_count,
- size_t start = 0, size_t visible = 0);
- // set the current database. This will return false if the database
- // doesn't exist.
- bool SetDatabase(const string& db);
- // retrieve a list of the databases we can search
- void GetDatabases(list<string>& db);
- // command handlers
- void OnNewDocument();
- void OnNewBulkDocument();
- void OnLoadNuclNeighbors();
- void OnLoadProtNeighbors();
- // command map
- DECLARE_CMD_MAP();
- private:
- CGUIEvent m_Handler;
- IReporter* m_Reporter;
- // current database
- string m_DbName;
- // most recent query string
- string m_Query;
- // manager of all of our databases
- CEntrezDBManager m_DbManager;
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * ===========================================================================
- */
- #endif // GUI_PLUGINS_DOC_BASIC___ENTREZ_RECORD_TABLE__HPP