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"
30 int GuiImplementation::newView(unsigned int /*w*/, unsigned int /*h*/)
32 view_.reset(new GView(*this));
37 int GuiImplementation::newWorkArea(unsigned int w, unsigned int h, int /*view_id*/)
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 selection_.reset(new GuiSelection(old_work_area_.get()));
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());
52 void GuiImplementation::destroyWorkArea(int /*id*/)
56 old_work_area_.reset();
60 } // namespace frontend