mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
0705dae8a3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7703 a592a061-630c-0410-9148-cb99ea01b6c8
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GUI.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Angus Leeming
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef GUI_H
|
|
#define GUI_H
|
|
|
|
#include <boost/utility.hpp>
|
|
|
|
class LyXView;
|
|
class Dialogs;
|
|
|
|
/** This class makes a whole out of the disparate parts of a dialog.
|
|
*/
|
|
template <typename Controller, typename GUIview,
|
|
typename Policy, typename GUIbc>
|
|
class GUI : boost::noncopyable {
|
|
public:
|
|
///
|
|
GUI(LyXView & lv, Dialogs & d);
|
|
///
|
|
Controller & controller() { return controller_; }
|
|
///
|
|
Controller const & controller() const { return controller_; }
|
|
private:
|
|
///
|
|
Controller controller_;
|
|
///
|
|
GUIview view_;
|
|
};
|
|
|
|
|
|
template <typename Controller, typename GUIview,
|
|
typename Policy, typename GUIbc>
|
|
GUI<Controller, GUIview, Policy, GUIbc>::GUI(LyXView & lv, Dialogs & d)
|
|
: controller_(lv, d),
|
|
view_()
|
|
{
|
|
controller_.setView(view_);
|
|
view_.setController(controller_);
|
|
controller_.bc().view(new GUIbc(controller_.bc()));
|
|
controller_.bc().bp(new Policy);
|
|
}
|
|
|
|
#endif // GUI_H
|