X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fcontrollers%2FControlMinipage.h;h=dd938db0ad165bb6cb9b475206546bd237974231;hb=120c89f24fae05379fbdc8539d3cfae574c2aecd;hp=0d0dc976567544ca9d1abb8a94e451280d6cc6ca;hpb=e952d33e0b702265cdac14de9871ecbfcf34863d;p=lyx.git diff --git a/src/frontends/controllers/ControlMinipage.h b/src/frontends/controllers/ControlMinipage.h index 0d0dc97656..dd938db0ad 100644 --- a/src/frontends/controllers/ControlMinipage.h +++ b/src/frontends/controllers/ControlMinipage.h @@ -1,75 +1,40 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 2001 The LyX Team. +/** + * \file ControlMinipage.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - *====================================================== + * \author Jürgen Vigna + * \author Angus Leeming * - * \file ControlMinipage.h - * \author Juergen Vigna, jug@sad.it - * \author Angus Leeming, a.leeming@ic.ac.uk + * Full author contact details are available in file CREDITS */ #ifndef CONTROLMINIPAGE_H #define CONTROLMINIPAGE_H -#include - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "ControlInset.h" -#include "insets/insetminipage.h" // InsetMinipage::Position +#include "Dialog.h" +#include "insets/insetminipage.h" -/** This should be moved back into insetminipage.h and InsetMinipage should - contain an instance of it. */ - -struct MinipageParams { +class ControlMinipage : public Dialog::Controller { +public: /// - MinipageParams(); + ControlMinipage(Dialog &); /// - MinipageParams(InsetMinipage const &); + virtual void initialiseParams(string const & data); + /// clean-up on hide. + virtual void clearParams(); + /// clean-up on hide. + virtual void dispatchParams(); /// - string width; + virtual bool isBufferDependent() const { return true; } /// - InsetMinipage::Position pos; -}; - - -/// -bool operator==(MinipageParams const &, MinipageParams const &); -/// -//bool operator!=(MinipageParams const &, MinipageParams const &); - - -/** A controller for Minipage dialogs. - */ -class ControlMinipage : public ControlInset { -public: + InsetMinipage::Params & params() { return *params_.get(); } /// - ControlMinipage(LyXView &, Dialogs &); - + InsetMinipage::Params const & params() const { return *params_.get(); } private: - /// Dispatch the changed parameters to the kernel. - virtual void applyParamsToInset(); - /// - virtual void applyParamsNoInset(); - /// get the parameters from the string passed to createInset. - virtual MinipageParams const getParams(string const &) - { return MinipageParams(); } - /// get the parameters from the inset passed to showInset. - virtual MinipageParams const getParams(InsetMinipage const &); + /// + boost::scoped_ptr params_; }; -/// Helper functions -namespace minipage { - - std::vector const getUnits(); - -} // namespace minipage - #endif