]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbar.h
Martin's changes to the Note inset.
[lyx.git] / src / frontends / Toolbar.h
index 66a016935a2cbc914f2078fc8f7b902d49c5ba4d..3d0777c46e2fa09df22bb423ff033af76f1cbb37 100644 (file)
 #ifndef TOOLBAR_H
 #define TOOLBAR_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "LString.h"
+#include "ToolbarBackend.h"
 
 class LyXView;
-class ToolbarDefaults;
-
 
-/** The LyX GUI independent toolbar class
-  The GUI interface is implemented in the corresponding Toolbar_pimpl class.
-  */
+/**
+ * The LyX GUI independent toolbar class
+ *
+ * The GUI interface is implemented in the corresponding Toolbar_pimpl class.
+ */
 class Toolbar {
 public:
        ///
-       Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &);
+       Toolbar();
 
-       ///
-       ~Toolbar();
+       /// 
+       virtual ~Toolbar();
 
-       /// update the state of the icons
-       void update();
+       /// 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(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() = 0;
 
-       /// 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