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 #include "GuiImplementation.h"
17 #include "BufferView.h"
22 int GuiImplementation::newView(unsigned int /*w*/, unsigned int /*h*/)
24 view_.reset(new GView(*this));
29 int GuiImplementation::newWorkArea(unsigned int w, unsigned int h, int /*view_id*/)
31 old_work_area_.reset(new GWorkArea(*view_.get(), w, h));
32 old_screen_.reset(new GScreen(*old_work_area_.get()));
33 work_area_.reset(new GuiWorkArea(old_screen_.get(), old_work_area_.get()));
34 clipboard_.reset(new GuiClipboard(old_work_area_.get()));
36 // FIXME BufferView creation should be independant of WorkArea creation
37 buffer_views_[0].reset(new BufferView(view_.get()));
38 work_area_->setBufferView(buffer_views_[0].get());
39 view_->setWorkArea(work_area_.get());
44 void GuiImplementation::destroyWorkArea(int /*id*/)
48 old_work_area_.reset();
52 } // namespace frontend