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.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
14 // Too hard to make concept checks work with this file
15 #ifdef _GLIBCXX_CONCEPT_CHECKS
16 #undef _GLIBCXX_CONCEPT_CHECKS
18 #ifdef _GLIBCPP_CONCEPT_CHECKS
19 #undef _GLIBCPP_CONCEPT_CHECKS
22 #include "GuiImplementation.h"
25 #include "BufferView.h"
27 // FIXME: defined in X.h, spuriously pulled in by some gui headers
33 int GuiImplementation::newView(unsigned int /*w*/, unsigned int /*h*/)
35 view_.reset(new GView);
40 int GuiImplementation::newWorkArea(unsigned int w, unsigned int h, int /*view_id*/)
42 old_work_area_.reset(new GWorkArea(*view_.get(), w, h));
43 old_screen_.reset(new GScreen(*old_work_area_.get()));
44 work_area_.reset(new GuiWorkArea(old_screen_.get(), old_work_area_.get()));
46 // FIXME BufferView creation should be independant of WorkArea creation
47 buffer_views_[0].reset(new BufferView(view_.get()));
48 work_area_->setBufferView(buffer_views_[0].get());
49 view_->setWorkArea(work_area_.get());
54 void GuiImplementation::destroyWorkArea(int /*id*/)
57 old_work_area_.reset();
61 } // namespace frontend