tt_demo.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: tt_demo.cpp,v $
  4.  * PRODUCTION Revision 1000.1  2004/06/01 21:10:16  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. /*  $Id: tt_demo.cpp,v 1000.1 2004/06/01 21:10:16 gouriano Exp $
  10.  * ===========================================================================
  11.  *
  12.  *                            PUBLIC DOMAIN NOTICE
  13.  *               National Center for Biotechnology Information
  14.  *
  15.  *  This software/database is a "United States Government Work" under the
  16.  *  terms of the United States Copyright Act.  It was written as part of
  17.  *  the author's official duties as a United States Government employee and
  18.  *  thus cannot be copyrighted.  This software/database is freely available
  19.  *  to the public for use. The National Library of Medicine and the U.S.
  20.  *  Government have not placed any restriction on its use or reproduction.
  21.  *
  22.  *  Although all reasonable efforts have been taken to ensure the accuracy
  23.  *  and reliability of the software and data, the NLM and the U.S.
  24.  *  Government do not and cannot warrant the performance or results that
  25.  *  may be obtained by using this software or data. The NLM and the U.S.
  26.  *  Government disclaim all warranties, express or implied, including
  27.  *  warranties of performance, merchantability or fitness for any particular
  28.  *  purpose.
  29.  *
  30.  *  Please cite the author in any work or product based on this material.
  31.  *
  32.  * ===========================================================================
  33.  *
  34.  * Authors:  Mike DiCuccio
  35.  *
  36.  * File Description:
  37.  *    Test app - shows ToolTips interface
  38.  */
  39. #include <ncbi_pch.hpp>
  40. #include <corelib/ncbiapp.hpp>
  41. #include <corelib/ncbiargs.hpp>
  42. #include <corelib/ncbienv.hpp>
  43. #include <corelib/ncbireg.hpp>
  44. #include "tt_demo_ui.hpp"
  45. USING_NCBI_SCOPE;
  46. class CToolTipDemoApp : public CNcbiApplication
  47. {
  48. public:
  49.     virtual void Init(void);
  50.     virtual int  Run(void);
  51.     virtual void Exit(void);
  52. };
  53. /////////////////////////////////////////////////////////////////////////////
  54. //  Init test for all different types of arguments
  55. void CToolTipDemoApp::Init(void)
  56. {
  57.     // Create command-line argument descriptions class
  58.     auto_ptr<CArgDescriptions> arg_desc(new CArgDescriptions);
  59.     // Specify USAGE context
  60.     arg_desc->SetUsageContext(GetArguments().GetProgramBasename(),
  61.                               "Plug-in test application");
  62.     // Setup arg.descriptions for this application
  63.     SetupArgDescriptions(arg_desc.release());
  64. }
  65. int CToolTipDemoApp::Run(void)
  66. {
  67.     char *args[] = {
  68.         "demo_app"
  69.     };
  70.     auto_ptr<CToolTipUI> test_ui(new CToolTipUI());
  71.     return test_ui->Show(1, args);
  72. }
  73. /////////////////////////////////////////////////////////////////////////////
  74. //  Cleanup
  75. void CToolTipDemoApp::Exit(void)
  76. {
  77.     SetDiagStream(0);
  78. }
  79. /////////////////////////////////////////////////////////////////////////////
  80. //  MAIN
  81. int main(int argc, const char* argv[])
  82. {
  83.     // Execute main application function
  84.     return CToolTipDemoApp().AppMain(argc, argv, 0, eDS_Default, 0);
  85. }
  86. /*
  87.  * ===========================================================================
  88.  * $Log: tt_demo.cpp,v $
  89.  * Revision 1000.1  2004/06/01 21:10:16  gouriano
  90.  * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2
  91.  *
  92.  * Revision 1.2  2004/05/21 22:27:54  gorelenk
  93.  * Added PCH ncbi_pch.hpp
  94.  *
  95.  * Revision 1.1  2004/01/14 11:55:55  lebedev
  96.  * Moved from gui/opengl/demo
  97.  *
  98.  * Revision 1.1  2003/09/29 17:00:55  dicuccio
  99.  * Initial revision
  100.  *
  101.  * Revision 1.1  2003/06/03 17:41:05  dicuccio
  102.  * Initial revision
  103.  *
  104.  * Revision 1.1  2003/03/27 13:53:14  dicuccio
  105.  * Initial revision
  106.  *
  107.  * ===========================================================================
  108.  */