X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormMathsPanel.h;h=48427cff873588a3ea6258205d798921edbd202b;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=891b73ea38339d236da94d068f09820faa775e50;hpb=4b31235b77a9af87087e181122ad666a7a57bf67;p=lyx.git diff --git a/src/frontends/xforms/FormMathsPanel.h b/src/frontends/xforms/FormMathsPanel.h index 891b73ea38..48427cff87 100644 --- a/src/frontends/xforms/FormMathsPanel.h +++ b/src/frontends/xforms/FormMathsPanel.h @@ -1,138 +1,49 @@ // -*- C++ -*- -/** +/** * \file FormMathsPanel.h - * Copyright 2001 The LyX Team. - * See the file COPYING. - * - * \author Alejandro Aguilar Sierra - * \author John Levon, moz@compsoc.man.ac.uk - * \author Angus Leeming, a.leeming@ic.ac.uk + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Alejandro Aguilar Sierra + * \author John Levon + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS. */ #ifndef FORM_MATHSPANEL_H #define FORM_MATHSPANEL_H -#include +#include "FormDialogView.h" -#ifdef __GNUG_ -#pragma interface -#endif +namespace lyx { +namespace frontend { -#include "FormBaseDeprecated.h" +class ControlMath; +struct FD_maths_panel; -class FormMathsBitmap; -class FormMathsDeco; -class FormMathsDelim; -class FormMathsMatrix; -class FormMathsSpace; -class FormMathsSub; -struct FD_form_maths_panel; - -/// values used by the xforms callbacks -enum MathsCallbackValues { - MM_GREEK, - MM_ARROW, - MM_BOP, - MM_BRELATS, - MM_VARSIZE, - MM_MISC, - MM_FRAC, - MM_SQRT, - MM_DELIM, - MM_MATRIX, - MM_EQU, - MM_DECO, - MM_SPACE, - MM_DOTS, - MM_FUNC -}; - -/** +/** * This class provides an XForms implementation of the maths panel. */ -class FormMathsPanel : public FormBaseBD { +class FormMathsPanel + : public FormController > { public: /// - FormMathsPanel(LyXView *, Dialogs *); - /// - void setActive(FormMathsSub *) const; - /// dispatch a symbol insert - void insertSymbol(string const & sym) const; + FormMathsPanel(Dialog &); private: - /// Pointer to the actual instantiation of the ButtonController. - virtual xformsBC & bc(); - - /// Build the dialog - virtual void build(); - /// input handler - virtual bool input(FL_OBJECT *, long); - - /// Pointer to the actual instantiation of the xforms form - virtual FL_FORM * form() const; - - // build the panels - FD_form_maths_panel * build_maths_panel(); - - /// send LFUN_MATH_DISPLAY - void mathDisplay() const; - - // Real GUI implementation - boost::scoped_ptr dialog_; - - /// Subdialogs - boost::scoped_ptr deco_; - boost::scoped_ptr delim_; - boost::scoped_ptr matrix_; - boost::scoped_ptr space_; - boost::scoped_ptr arrow_; - boost::scoped_ptr boperator_; - boost::scoped_ptr brelats_; - boost::scoped_ptr greek_; - boost::scoped_ptr misc_; - boost::scoped_ptr dots_; - boost::scoped_ptr varsize_; - - /// A pointer to the currently active subdialog - mutable FormMathsSub * active_; - - /// The ButtonController - ButtonController bc_; -}; - - -class FormMathsSub : public FormBaseBD { - friend class FormMathsPanel; // has subdialogs to manipulate - -public: + /// Not needed. + virtual void apply() {} /// - FormMathsSub(LyXView *, Dialogs *, FormMathsPanel const &, - string const &); + virtual void update() {} -protected: - /// Pointer to the actual instantiation of the ButtonController. - virtual xformsBC & bc(); - /// The parent Maths Panel - FormMathsPanel const & parent_; -private: /// - virtual void connect(); + virtual void build(); /// - virtual void disconnect(); - /// The ButtonController - ButtonController bc_; + virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); }; +} // namespace frontend +} // namespace lyx -inline -xformsBC & FormMathsSub::bc() -{ - return bc_; -} - -inline -xformsBC & FormMathsPanel::bc() -{ - return bc_; -} #endif // FORM_MATHSPANEL_H