NCBI C++ ToolKit
app_demo_feat_table.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: app_demo_feat_table.cpp 34628 2016-02-01 20:27:07Z katargir $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Yury Voronov
27  *
28  * File Description: Object List demo application.
29  *
30  */
31 #include <ncbi_pch.hpp>
32 
34 
37 
39 
40 
42 
43 
44 /// ///////////////////////////////////////////////////////////////////////////
45 /// Derive our application class from CwxNCBIApp and use it together with
46 /// standard CNCBIwxApplication.
47 ///
49 {
50 protected:
51  // we are overriding this function to create our main frame window
52  virtual bool x_CreateGUI();
53 
54  virtual void x_InitAppJobDispatcher();
55 
56 };
57 
58 // Declare wxWidgets application class this will allow
59 // CNCBIwxApplication to instantiate our class
60 DECLARE_APP(ncbi::CDemoFeatTableApp)
61 IMPLEMENT_APP_NO_MAIN(ncbi::CDemoFeatTableApp)
62 IMPLEMENT_WX_THEME_SUPPORT
63 
65 {
66  wxFrame* frame = new CwxDemoFeatureTableFrame( NULL );
67  frame->Show( true );
68  return true;
69 }
70 
72 {
74 
76 
78  disp.RegisterEngine( "ObjManagerEngine", *engine );
79 }
80 
82 
83 /// ///////////////////////////////////////////////////////////////////////////
84 /// Main entry point
85 ///
86 int NcbiSys_main(int argc, ncbi::TXChar* argv[])
87 {
88  // create standard NCBI wxWidgets application
89  ncbi::CNCBIwxApplication ncbi_app("Object List demo App");
90 
91  // Execute main application function
92  return ncbi_app.AppMain(argc, argv);
93 }
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
/////////////////////////////////////////////////////////////////////////// Main entry point
CAppJobDispatcher.
/////////////////////////////////////////////////////////////////////////// Derive our application cl...
virtual bool x_CreateGUI()
create main application window and initialize associated objects return true if successful
virtual void x_InitAppJobDispatcher()
override this function to configure / register engines
CwxNCBIApp - this class should be used in NCBI applications instead of wxApp it provides polling supp...
Definition: wx_app.hpp:80
virtual void x_InitAppJobDispatcher()
override this function to configure / register engines
Definition: wx_app.cpp:226
#define NULL
Definition: ncbistd.hpp:225
static CAppJobDispatcher & GetInstance()
bool RegisterEngine(const string &name, IAppJobEngine &engine)
Registers a new Engine, returns true if successful.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
char TXChar
Definition: ncbistr.hpp:172
Modified on Tue May 21 10:53:30 2024 by modify_doxy.py rev. 669887