2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-22 11:24:36 +00:00
|
|
|
/**
|
|
|
|
* \file GUI.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-22 11:24:36 +00:00
|
|
|
*
|
2002-10-21 17:38:09 +00:00
|
|
|
* \author Angus Leeming
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-03-22 11:24:36 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
|
|
|
|
2003-03-10 03:13:28 +00:00
|
|
|
#include "BCView.h"
|
2002-01-16 14:47:58 +00:00
|
|
|
|
2002-08-14 19:19:47 +00:00
|
|
|
#include <boost/utility.hpp>
|
2002-08-12 14:28:43 +00:00
|
|
|
|
|
|
|
/** This class makes a whole out of the disparate parts of a dialog.
|
2001-03-22 11:24:36 +00:00
|
|
|
*/
|
2002-08-12 14:28:43 +00:00
|
|
|
template <typename Controller, typename GUIview,
|
|
|
|
typename Policy, typename GUIbc>
|
2002-08-15 16:34:48 +00:00
|
|
|
class GUI : boost::noncopyable {
|
2001-03-22 11:24:36 +00:00
|
|
|
public:
|
|
|
|
///
|
2002-08-12 14:28:43 +00:00
|
|
|
GUI(LyXView & lv, Dialogs & d);
|
2001-03-22 11:24:36 +00:00
|
|
|
///
|
2002-08-12 14:28:43 +00:00
|
|
|
Controller & controller() { return controller_; }
|
2001-03-22 11:24:36 +00:00
|
|
|
///
|
2002-08-12 14:28:43 +00:00
|
|
|
Controller const & controller() const { return controller_; }
|
2001-03-22 11:24:36 +00:00
|
|
|
private:
|
2002-08-12 14:28:43 +00:00
|
|
|
///
|
|
|
|
Controller controller_;
|
2001-03-22 11:24:36 +00:00
|
|
|
///
|
|
|
|
GUIview view_;
|
|
|
|
};
|
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
|
|
|
|
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_);
|
2003-03-10 03:13:28 +00:00
|
|
|
controller_.bc().view(new GUIbc(controller_.bc()));
|
|
|
|
controller_.bc().bp(new Policy);
|
2002-08-12 14:28:43 +00:00
|
|
|
}
|
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
#endif // GUI_H
|