2 * \file qt4/GuiApplication.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
15 // Too hard to make concept checks work with this file
16 #ifdef _GLIBCXX_CONCEPT_CHECKS
17 #undef _GLIBCXX_CONCEPT_CHECKS
19 #ifdef _GLIBCPP_CONCEPT_CHECKS
20 #undef _GLIBCPP_CONCEPT_CHECKS
23 #include "GuiApplication.h"
27 #include "BufferView.h"
29 #include "graphics/LoaderQueue.h"
31 #include "support/lstrings.h"
32 #include "support/os.h"
33 #include "support/package.h"
41 #include "LyXGdkImage.h"
44 using lyx::support::subst;
52 /// estimate DPI from X server
55 //TODO use GDK instead
56 Screen * scr = ScreenOfDisplay(getDisplay(), getScreen());
57 return int(((HeightOfScreen(scr) * 25.4 / HeightMMOfScreen(scr)) +
58 (WidthOfScreen(scr) * 25.4 / WidthMMOfScreen(scr))) / 2);
67 GuiApplication::GuiApplication(int & argc, char ** argv)
68 : Gtk::Main(argc, argv), Application(argc, argv)
70 using namespace lyx::graphics;
71 Image::newImage = boost::bind(&LyXGdkImage::newImage);
72 Image::loadableFormats = boost::bind(&LyXGdkImage::loadableFormats);
74 // needs to be done before reading lyxrc
77 LoaderQueue::setPriority(10,100);
81 Clipboard& GuiApplication::clipboard()
87 Selection& GuiApplication::selection()
93 int const GuiApplication::exec()
100 void GuiApplication::exit(int /*status*/)
102 // FIXME: Don't ignore status
107 string const GuiApplication::romanFontName()
113 string const GuiApplication::sansFontName()
119 string const GuiApplication::typewriterFontName()
125 } // namespace frontend