2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-22 11:24:36 +00:00
|
|
|
/**
|
|
|
|
* \file GUI.h
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
|
|
|
|
2002-01-16 14:47:58 +00:00
|
|
|
#include "ButtonController.h"
|
|
|
|
|
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>
|
|
|
|
class GUI {
|
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_; }
|
2002-06-18 15:44:30 +00:00
|
|
|
|
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
|
|
|
///
|
|
|
|
ButtonController<Policy, GUIbc> bc_;
|
|
|
|
///
|
|
|
|
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_);
|
|
|
|
controller_.setButtonController(bc_);
|
|
|
|
view_.setController(controller_);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-03-22 11:24:36 +00:00
|
|
|
#endif // GUI_H
|