gbench.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:6k
- /*
- * ===========================================================================
- * PRODUCTION $Log: gbench.hpp,v $
- * PRODUCTION Revision 1000.3 2004/06/01 20:48:11 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.19
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_GBENCH___GBENCH__HPP
- #define GUI_GBENCH___GBENCH__HPP
- /* $Id: gbench.hpp,v 1000.3 2004/06/01 20:48:11 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:
- * CGBenchApp -- main application class for GBENCH
- */
- #include <corelib/ncbiapp.hpp>
- #include <serial/object.hpp>
- #include <gui/plugin/PluginMessage.hpp>
- #include <gui/widgets/fl/resource_manager.hpp>
- BEGIN_NCBI_SCOPE
- USING_SCOPE(objects);
- class CAboutDlg;
- class CMainWindow;
- class CDiagConsole;
- class CDispatcher;
- class CGBenchApp : public CNcbiApplication
- {
- public:
- // default ctor
- CGBenchApp(void);
- // menu commands
- void OnHelpAbout(void);
- void OnHelpIndex(void);
- // process a single message from the message queue
- void ProcessMessage(void);
- // raise the main application window to the foreground
- static void Raise();
- private:
- // our GUI components
- CMainWindow* m_MainWin;
- auto_ptr<CAboutDlg> m_AboutDlg;
- // application-wide resource manager
- CRef<CResourceManager> m_ResourceMgr;
- void Init(void);
- int Run (void);
- void Exit(void);
- // Load our config file.
- // override inherited since we want to look a few different places
- // for the config file and use our own default name.
- virtual bool LoadConfig(CNcbiRegistry& reg, const string* conf);
- // Load plugins in a given path specification.
- // The path specification is a ':' separated list of directories.
- // There are two 'special' directories:
- // <std> - refers to the application installation directory;
- // if not found, use environment variable $NCBI_NGW_HOME.
- // <home> - refers to user's private plugin cache, located in
- // $HOME/.ngw/plugins.
- void x_LoadPlugins(const string& path);
- // access our resource manager
- CResourceManager& x_GetResourceMgr();
- };
- END_NCBI_SCOPE
- #endif // GUI_GBENCH___GBENCH__HPP
- /*
- * ===========================================================================
- * $Log: gbench.hpp,v $
- * Revision 1000.3 2004/06/01 20:48:11 gouriano
- * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.19
- *
- * Revision 1.19 2004/05/17 13:25:32 dicuccio
- * First implementation of new document workspace
- *
- * Revision 1.18 2004/04/12 18:14:09 dicuccio
- * Added Raise() prototype to raise the application to the foreground
- *
- * Revision 1.17 2003/11/04 17:21:17 dicuccio
- * Removed dispatcher - now part of message queue. Tweaked argument processing -
- * call Fl::args early
- *
- * Revision 1.16 2003/10/27 17:40:38 dicuccio
- * Restructured diagnostic handler - use CDiagPanel
- *
- * Revision 1.15 2003/09/29 15:43:01 dicuccio
- * Deprecated gui/scope.hpp. Merged gui/core/types.hpp into gui/types.hpp
- *
- * Revision 1.14 2003/08/06 13:24:31 dicuccio
- * Deprecated old main window; introduced new, compact window for multiple
- * document management
- *
- * Revision 1.13 2003/07/31 16:58:42 dicuccio
- * Message queue / dispatcher clean-ups. Added idle function processing for
- * plugin message queue handling
- *
- * Revision 1.12 2003/07/30 12:20:52 dicuccio
- * Cleaned up CGBenchApp
- *
- * Revision 1.11 2003/07/14 11:21:45 shomrat
- * Plugin messageing system related changes
- *
- * Revision 1.10 2003/06/26 18:53:38 rsmith
- * replace x_LoadConfigFile with overloading LoadConfig
- *
- * Revision 1.9 2003/04/16 11:41:59 dicuccio
- * Changed main windows - store as pointer, CRef<> held in CDocManager
- *
- * Revision 1.8 2003/03/31 13:38:42 dicuccio
- * General clean-up; changed standard start-up messages. Added new main window
- *
- * Revision 1.7 2003/02/26 19:22:36 dicuccio
- * Promoted x_ResolvePath() to a public function (ResolvePath()).
- *
- * Revision 1.6 2003/01/13 13:10:10 dicuccio
- * Namespace clean-up. Retired namespace gui -> converted all to namespace ncbi.
- * Moved all FLUID-generated code into namespace ncbi.
- *
- * Revision 1.5 2002/11/29 16:35:43 dicuccio
- * Reformatted tabs -> spaces. Added standard boilerplate for winmain.cpp
- *
- * Revision 1.4 2002/11/29 16:12:30 dicuccio
- * Wrapped Run() in a try/catch block. Added central path resolution function
- * to hide platform-specifics of resolving 'standar' file locations
- *
- * Revision 1.3 2002/11/29 15:37:27 dicuccio
- * Major interface change. Removed the original three panels in favor of a
- * single, integrated main application window.
- *
- * Revision 1.2 2002/11/25 21:00:08 dicuccio
- * Removed old data loader mechanism in favor of plugins.
- *
- * Revision 1.1 2002/11/06 18:23:47 dicuccio
- * Initial revision
- *
- * ===========================================================================
- */