]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbar.C
Joao latest bits
[lyx.git] / src / frontends / Toolbar.C
index b243030f9049d20f085391061a4af0e1a3be14df..d83e149af13fbee401f9b90bcfdd485c05906196 100644 (file)
@@ -5,43 +5,43 @@
  *
  * \author Lars Gullik Bjønnes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "Toolbar.h"
-#include "ToolbarBackend.h"
-#include "Toolbar_pimpl.h"
+
 #include "debug.h"
 #include "LyXAction.h"
+#include "ToolbarBackend.h"
 
-using std::endl;
 
-Toolbar::Toolbar(LyXView * o, int x, int y)
+Toolbar::Toolbar()
        : last_textclass_(-1)
 {
-       pimpl_ = new Pimpl(o, x, y);
+}
 
-       // extracts the toolbars from the backend
-       ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
-       ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
 
-       for (; cit != end; ++cit)
-               pimpl_->add(*cit);
+Toolbar::~Toolbar()
+{
 }
 
 
-Toolbar::~Toolbar()
+void Toolbar::init()
 {
-       delete pimpl_;
+       // extracts the toolbars from the backend
+       ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
+       ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
+
+       for (; cit != end; ++cit)
+               add(*cit);
 }
 
 
 void Toolbar::update(bool in_math, bool in_table)
 {
-       pimpl_->update();
+       update();
 
        // extracts the toolbars from the backend
        ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
@@ -49,17 +49,16 @@ void Toolbar::update(bool in_math, bool in_table)
 
        for (; cit != end; ++cit) {
                if (cit->flags & ToolbarBackend::MATH)
-                       pimpl_->displayToolbar(*cit, in_math);
+                       displayToolbar(*cit, in_math);
                else if (cit->flags & ToolbarBackend::TABLE)
-                       pimpl_->displayToolbar(*cit, in_table);
+                       displayToolbar(*cit, in_table);
        }
 }
 
 
-
-void Toolbar::setLayout(string const & layout)
+void Toolbar::clearLayoutList()
 {
-       pimpl_->setLayout(layout);
+       last_textclass_ = -1;
 }
 
 
@@ -67,23 +66,9 @@ bool Toolbar::updateLayoutList(int textclass)
 {
        // update the layout display
        if (last_textclass_ != textclass) {
-               pimpl_->updateLayoutList(true);
+               updateLayoutList();
                last_textclass_ = textclass;
                return true;
-       } else {
-               pimpl_->updateLayoutList(false);
+       } else
                return false;
-       }
-}
-
-
-void Toolbar::openLayoutList()
-{
-       pimpl_->openLayoutList();
-}
-
-
-void Toolbar::clearLayoutList()
-{
-       pimpl_->clearLayoutList();
 }