X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fcontrollers%2FGUI.h;h=ab4cfcd60c8ba4bc247139fa31b42ff819ac421d;hb=0705dae8a3a2bcdd6be55eb468547c1389e84d2c;hp=cfa4bc5c874ed4224ccc4d64bce5f3902ec51057;hpb=9705be9f1b8441175048b4e2065795051adafdc6;p=lyx.git diff --git a/src/frontends/controllers/GUI.h b/src/frontends/controllers/GUI.h index cfa4bc5c87..ab4cfcd60c 100644 --- a/src/frontends/controllers/GUI.h +++ b/src/frontends/controllers/GUI.h @@ -1,167 +1,52 @@ +// -*- C++ -*- /** * \file GUI.h - * Copyright 2001 The LyX Team. - * See the file COPYING. + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author Angus Leeming + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS. */ #ifndef GUI_H #define GUI_H -/** This class instantiates and makes available the GUI-specific - ButtonController and View. +#include + +class LyXView; +class Dialogs; + +/** This class makes a whole out of the disparate parts of a dialog. */ -template -class GUI : public Controller { +template +class GUI : boost::noncopyable { public: /// - GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {} + GUI(LyXView & lv, Dialogs & d); /// - virtual ButtonControllerBase & bc() { return bc_; } + Controller & controller() { return controller_; } /// - virtual ViewBase & view() { return view_; } - + Controller const & controller() const { return controller_; } private: /// - ButtonController bc_; + Controller controller_; /// GUIview view_; }; -/// Forward declaration of ButtonPolicies -class OkCancelPolicy; -class OkCancelReadOnlyPolicy; -class NoRepeatedApplyReadOnlyPolicy; - - -/** Specialization for Bibitem dialog - */ -class ControlBibitem; - -template -class GUIBibitem : - public GUI { -public: - /// - GUIBibitem(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for Bibtex dialog - */ -class ControlBibtex; - -template -class GUIBibtex : - public GUI { -public: - /// - GUIBibtex(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - -/** Specialization for Character dialog - */ -class ControlCharacter; - -template -class GUICharacter : public GUI +template +GUI::GUI(LyXView & lv, Dialogs & d) + : controller_(lv, d), + view_() { -public: - /// - GUICharacter(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for Citation dialog - */ -class ControlCitation; - -template -class GUICitation : public GUI -{ -public: - /// - GUICitation(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for Credits dialog - */ -class ControlCredits; - -template -class GUICredits : - public GUI { -public: - /// - GUICredits(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for Error dialog - */ -class ControlError; - -template -class GUIError : - public GUI { -public: - /// - GUIError(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for Include dialog - */ -class ControlInclude; - -template -class GUIInclude : - public GUI { -public: - /// - GUIInclude(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for Log dialog - */ -class ControlLog; - -template -class GUILog : - public GUI { -public: - /// - GUILog(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; - - -/** Specialization for VCLog dialog - */ -class ControlVCLog; - -template -class GUIVCLog : - public GUI { -public: - /// - GUIVCLog(LyXView & lv, Dialogs & d) - : GUI(lv, d) {} -}; + controller_.setView(view_); + view_.setController(controller_); + controller_.bc().view(new GUIbc(controller_.bc())); + controller_.bc().bp(new Policy); +} #endif // GUI_H