3 * \file GuiImplementation.C
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
13 #include "GuiImplementation.h"
14 #include "GuiWorkArea.h"
17 using boost::shared_ptr;
22 GuiImplementation::GuiImplementation(GuiView & owner): owner_(owner), max_id_(0)
27 Clipboard& GuiImplementation::clipboard()
33 int GuiImplementation::newWorkArea(int w, int h)
35 size_t const id = max_id_;
37 work_areas_[id].reset(new GuiWorkArea(owner_, w, h));
41 WorkArea& GuiImplementation::workArea(int id)
43 BOOST_ASSERT(work_areas_.find(id) != work_areas_.end());
45 guiCursor().connect(work_areas_[id].get());
47 return *work_areas_[id].get();
51 void GuiImplementation::destroyWorkArea(int id)
53 work_areas_.erase(id);
56 } // namespace frontend