]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbar.h
Make M-x show the minibuffer
[lyx.git] / src / frontends / Toolbar.h
index 40985bedafd0d50115dfdf4622780798e4e9494c..8338ee08c0c241a20d08c585119b8608449dcf43 100644 (file)
@@ -1,79 +1,69 @@
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file Toolbar.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
+ * \author Lars Gullik Bjønnes
  *
- *           This file is Copyright 1996-2001
- *           Lars Gullik Bjønnes
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS.
+ */
 
 #ifndef TOOLBAR_H
 #define TOOLBAR_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "LString.h"
+#include "ToolbarBackend.h"
 
 class LyXView;
-class ToolbarDefaults;
-class Dialogs;
 
-/** 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, Dialogs & d,
-               int x, int y, ToolbarDefaults const &);
+       Toolbar();
 
        ///
-       ~Toolbar();
-
-       /// (re)sets the toolbar
-       void set(bool doingmain = false);
-
-       /** this is to be the entry point to the toolbar
-         frame, where you can change the toolbar realtime. */
-       void edit();
-       /// add a new button to the toolbar.
-       void add(int , bool doclean = true);
-       /// name of func instead of kb_action
-       void add(string const & , bool doclean = true);
-       /// invokes the n'th icon in the toolbar
-       void push(int);
-       /// activates the toolbar
-       void activate();
-       /// deactivates the toolbar
-       void deactivate();
-       /// update the state of the icons
-       void update();
+       virtual ~Toolbar();
+
+       /// Initialize toolbar from backend
+       void init();
+
+       /// update the state of the toolbars
+       void update(bool in_math, bool in_table);
+
+       /// show/hide the named toolbar
+       void display(std::string const & name, bool show);
 
        /// 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