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

Go to the SVN repository for this file.

1 /* $Id: demo_combo_app.cpp 34626 2016-02-01 20:14:36Z 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:
29  * demo_wx_app - combo wxWidgets/C++ Toolkit application
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 #include "hello_combo_dlg.hpp"
36 
38 
39 ///////////////////////////////////////////////////////////////////////////////
40 /// Derive our application class from CwxNCBIApp and use it together with
41 /// standard CNCBIwxApplication.
42 
43 class CDemoApp : public CwxNCBIApp
44 {
45 public:
46  CDemoApp() {}
47  virtual ~CDemoApp() {}
48 
49 protected:
50  // we are overriding this function to create our main frame window
51  virtual bool x_CreateGUI();
52 
53 private:
54  CDemoApp(const CDemoApp&);
56 };
57 
58 
59 // Declare wxWidgets application class
60 // this will allow CNCBIwxApplication to instantiate our class
61 DECLARE_APP(CDemoApp)
62 IMPLEMENT_APP_NO_MAIN(CDemoApp)
63 IMPLEMENT_WX_THEME_SUPPORT
64 
65 
67 {
68  CHelloWorldDlg dlg(NULL);
69  dlg.ShowModal();
70  return false;
71 }
72 
73 
74 /////////////////////////////////////////////////////////////////////////////
75 // main entry point
76 
77 int NcbiSys_main(int argc, ncbi::TXChar* argv[])
78 {
79  // create standard NCBI wxWidgets application
80  ncbi::CNCBIwxApplication ncbi_app("wxWidgets demo App");
81 
82  // Execute main application function
83  return ncbi_app.AppMain(argc, argv);
84 }
Derive our application class from CwxNCBIApp and use it together with standard CNCBIwxApplication.
CDemoApp & operator=(const CDemoApp &)
CDemoApp(const CDemoApp &)
virtual bool x_CreateGUI()
create main application window and initialize associated objects return true if successful
virtual ~CDemoApp()
virtual bool x_CreateGUI()
create main application window and initialize associated objects return true if successful
CwxNCBIApp - this class should be used in NCBI applications instead of wxApp it provides polling supp...
Definition: wx_app.hpp:80
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
USING_SCOPE(ncbi)
#define NULL
Definition: ncbistd.hpp:225
char TXChar
Definition: ncbistr.hpp:172
Magic spell ;-) needed for some weird compilers... very empiric.
Modified on Sun Apr 14 05:28:14 2024 by modify_doxy.py rev. 669887