]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GuiImplementation.C
disable concept checks
[lyx.git] / src / frontends / gtk / GuiImplementation.C
1 // -*- C++ -*-
2 /**
3  * \file gtk/GuiImplementation.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 // Too hard to make concept checks work with this file
15 #ifdef _GLIBCXX_CONCEPT_CHECKS
16 #undef _GLIBCXX_CONCEPT_CHECKS
17 #endif
18 #ifdef _GLIBCPP_CONCEPT_CHECKS
19 #undef _GLIBCPP_CONCEPT_CHECKS
20 #endif
21
22 #include "GuiImplementation.h"
23
24 #include "GView.h"
25 #include "BufferView.h"
26
27 namespace lyx {
28 namespace frontend {
29
30 int GuiImplementation::newView(unsigned int /*w*/, unsigned int /*h*/)
31 {
32         view_.reset(new GView(*this));
33         return 0;
34 }
35
36
37 int GuiImplementation::newWorkArea(unsigned int w, unsigned int h, int /*view_id*/)
38 {
39         old_work_area_.reset(new GWorkArea(*view_.get(), w, h));
40         old_screen_.reset(new GScreen(*old_work_area_.get()));
41         work_area_.reset(new GuiWorkArea(old_screen_.get(), old_work_area_.get()));
42         clipboard_.reset(new GuiClipboard(old_work_area_.get()));
43
44         // FIXME BufferView creation should be independant of WorkArea creation
45         buffer_views_[0].reset(new BufferView(view_.get()));
46         work_area_->setBufferView(buffer_views_[0].get());
47         view_->setWorkArea(work_area_.get());
48         return 0;
49 }
50
51
52 void GuiImplementation::destroyWorkArea(int /*id*/)
53 {
54         clipboard_.reset();
55         work_area_.reset();
56         old_work_area_.reset();
57         old_screen_.reset();
58 }
59
60 } // namespace frontend
61 } // namespace lyx