]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlCharacter.h
* Give Dialog::Controller::initialiseParams a bool return type.
[lyx.git] / src / frontends / controllers / ControlCharacter.h
index 6266b10f38cbc252f38d276d34767263b93cfa04..598d2e1e06e3a6a75f63ea79ede69df67108fc29 100644 (file)
@@ -1,28 +1,34 @@
+// -*- C++ -*-
 /**
  * \file ControlCharacter.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, a.leeming@.ac.uk
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef CONTROLCHARACTER_H
 #define CONTROLCHARACTER_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
-#include "ControlDialogs.h"
+#include "Dialog.h"
 #include "character.h"
 
-/** A controller for Character dialogs.
- */
-class ControlCharacter : public ControlDialog<ControlConnectBD>
-{
+
+class ControlCharacter : public Dialog::Controller {
 public:
        ///
-       ControlCharacter(LyXView &, Dialogs &);
+       ControlCharacter(Dialog &);
+       ///
+       virtual bool initialiseParams(string const & data);
+       ///
+       virtual void clearParams();
+       ///
+       virtual void dispatchParams();
+       ///
+       virtual bool isBufferDependent() const { return true; }
 
        ///
        void setFamily(LyXFont::FONT_FAMILY);
@@ -33,7 +39,7 @@ public:
        ///
        void setSize(LyXFont::FONT_SIZE);
        ///
-       void setBar(character::FONT_STATE);
+       void setBar(frnt::FONT_STATE);
        ///
        void setColor(LColor::color);
        ///
@@ -41,16 +47,25 @@ public:
        ///
        void setToggleAll(bool);
 
+       ///
+       LyXFont::FONT_FAMILY getFamily() const;
+       ///
+       LyXFont::FONT_SERIES getSeries() const;
+       ///
+       LyXFont::FONT_SHAPE getShape() const;
+       ///
+       LyXFont::FONT_SIZE getSize() const;
+       ///
+       frnt::FONT_STATE getBar() const;
+       ///
+       LColor::color getColor() const;
+       ///
+       string getLanguage() const;
+       ///
+       bool getToggleAll() const;
 private:
-       /// Get changed parameters and Dispatch them to the kernel.
-       virtual void apply();
-       /// set the params before show or update.
-       virtual void setParams();
-       /// clean-up on hide.
-       virtual void clearParams();
-
        ///
-       LyXFont * font_;
+       boost::scoped_ptr<LyXFont> font_;
        ///
        bool toggleall_;
 };