]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbar.h
Joao latest bits
[lyx.git] / src / frontends / Toolbar.h
index c12a21b2f925b34a952c36c9ec8a616ace769661..e6d23cac6ddd849fa36930941fcd259667802aa5 100644 (file)
@@ -6,18 +6,16 @@
  *
  * \author Lars Gullik Bjønnes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef TOOLBAR_H
 #define TOOLBAR_H
 
-
-#include "LString.h"
+#include "ToolbarBackend.h"
 
 class LyXView;
 
-
 /**
  * The LyX GUI independent toolbar class
  *
@@ -26,33 +24,43 @@ class LyXView;
 class Toolbar {
 public:
        ///
-       Toolbar(LyXView * o, int x, int y);
+       Toolbar();
 
        ///
-       ~Toolbar();
+       virtual ~Toolbar();
+
+       /// Initialize toolbar from backend
+       void init();
 
        /// update the state of the toolbars
        void update(bool in_math, bool in_table);
 
        /// update the layout combox
-       void setLayout(string const & layout);
+       virtual void setLayout(std::string const & layout) = 0;
        /**
         * Populate the layout combox - returns whether we did a full
         * update or not
         */
        bool updateLayoutList(int textclass);
        /// Drop down the layout list
-       void openLayoutList();
+       virtual void openLayoutList() = 0;
        /// Erase the layout list
-       void clearLayoutList();
+       virtual void clearLayoutList();
 
-       /// Compaq cxx 6.5 requires this to be public
-       struct Pimpl;
 private:
-       ///
-       friend struct Toolbar::Pimpl;
-       ///
-       Pimpl * pimpl_;
+
+       virtual void add(ToolbarBackend::Toolbar const & tb) = 0;
+
+       /// update the state of the icons
+       virtual void update() = 0;
+
+       /// show or hide a toolbar
+       virtual void displayToolbar(ToolbarBackend::Toolbar const & tb,
+                                   bool show) = 0;
+
+       /// Populate the layout combox.
+       virtual void updateLayoutList() = 0;
+
 
        /**
         * The last textclass layout list in the layout choice selector