libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GtkCRNMain.h
Go to the documentation of this file.
1 /* Copyright 2010-2016 CoReNum, INSA-Lyon, ENS-Lyon
2  *
3  * This file is part of libgtkcrnmm.
4  *
5  * libgtkcrnmm is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libgtkcrnmm is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libgtkcrnmm. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: GtkCRNMain.h
19  * \author Yann LEYDIER
20  */
21 
22 #ifndef GtkCRNMain_HEADER
23 #define GtkCRNMain_HEADER
24 
25 #include <libgtkcrnmm_config.h>
26 #include <gtkmm.h>
28 
30 namespace GtkCRN
31 {
35 #ifdef CRN_USING_GTKMM3
36  class Main : public Gtk::Application
37 #else
38  class Main: public Gtk::Main
39 #endif
40  {
41 
42  public:
44  Main(int &argc, char **&argv);
45  //virtual ~Main() override {}
47  void run_thread_safe();
48 
50  static void SetDefaultExceptionHandler();
51 
52  private:
53  static bool init_done;
54 #ifdef CRN_USING_GTKMM3
55 #else /* CRN_USING_GTKMM3 */
56  Glib::RefPtr<Gtk::IconFactory> iconfac;
57  std::vector<Gtk::IconSet> icons;
58 #endif /* CRN_USING_GTKMM3 */
59  };
60 }
61 
62 #endif
63 
64 
static void SetDefaultExceptionHandler()
Sets the default exception handler to print message and context to the standard error.
Definition: GtkCRNMain.cpp:293
Main(int &argc, char **&argv)
You have to create a Main object in the main function.
Definition: GtkCRNMain.cpp:50
void run_thread_safe()
Launches the application.
Definition: GtkCRNMain.cpp:198
Main loop and context.
Definition: GtkCRNMain.h:38