]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Toolbar_pimpl.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / Toolbar_pimpl.h
index 0ded184531c22d16c683d09f4f1ef7f60ecb3830..26db1ca67157d6f18ce281e97b28c30d55d75ac0 100644 (file)
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+/**
+ * \file xforms/Toolbar_pimpl.h
+ * Copyright 1996-2001 Lars Gullik Bjønnes
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           This file is Copyright 1996-2000
- *           Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS
+ */
 
 #ifndef TOOLBAR_PIMPL_H
 #define TOOLBAR_PIMPL_H
 
 #include <vector>
-#include FORMS_H_LOCATION
+#include "forms_fwd.h"
 
 #include "frontends/Toolbar.h"
 
-#include "commandtags.h"
-#include "combox.h"
-#include "ToolbarDefaults.h"
 
-#ifdef __GNUG__
-#pragma interface
-#endif
+class XFormsView;
+class Tooltips;
 
 /** The LyX xforms toolbar class
 */
+ */
 struct Toolbar::Pimpl {
 public:
-       /// called when user selects a layout from combox
-       static void layoutSelectedCB(int, void *, Combox *);
-       ///
+       /// create an empty toolbar
        Pimpl(LyXView * o, int x, int y);
 
-       ///
-       ~Pimpl() {
-               clean();
-       }
-       
-#if 0
-       ///
-       int get_toolbar_func(string const & func);
-#endif
-       
-       /// (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();
+       ~Pimpl();
+
        /// add a new button to the toolbar.
-       void add(int, bool doclean = true);
-       /// invokes the n'th icon in the toolbar
-       void push(int);
-       /// activates the toolbar
-        void activate();
-       /// deactivates the toolbar
-        void deactivate();
+       void add(int action);
+
        /// update the state of the icons
        void update();
 
        /// select the right layout in the combox
-       void setLayout(int layout);
+       void setLayout(string const & layout);
        /// Populate the layout combox; re-do everything if force is true.
        void updateLayoutList(bool force);
        /// Drop down the layout list
        void openLayoutList();
        /// Erase the layout list
        void clearLayoutList();
-       /// and the non-static version
-       void layoutSelected(int); 
-
        ///
+       void layoutSelected();
+
+       /// an item on the toolbar
        struct toolbarItem
        {
-               ///
-               int action;
-               ///
-               FL_OBJECT * icon;
-               ///
                toolbarItem();
-               ///
-               void clean();
-               ///
+
                ~toolbarItem();
-               ///
+
                toolbarItem & operator=(toolbarItem const & ti);
+
+               /// deallocate icon
+               void kill_icon();
+
+               /// lyx action number
+               int action;
+               /// icon for this item
+               FL_OBJECT * icon;
        };
 
-       /// typedef to simplify things
        typedef std::vector<toolbarItem> ToolbarList;
+
        /// The list containing all the buttons
-       ToolbarList toollist;
-       ///
-       LyXView * owner;
-#if FL_REVISION < 89
-       ///
-       FL_OBJECT * bubble_timer;
-#endif
-       ///
-       Combox * combox;
-       /// Starting position
-       int sxpos;
-       ///
-       int sypos;
-       ///
+       ToolbarList toollist_;
+       /// owning view
+       XFormsView * owner_;
+       /// tooltips manager
+       Tooltips * tooltip_;
+       /// layout combo
+       FL_OBJECT * combox_;
+       /// x position of end of toolbar
        int xpos;
-       ///
+       /// y position of end of toolbar
        int ypos;
-       ///
-       bool cleaned;
-
-       /// removes all toolbar buttons from the toolbar.
-       void clean();
-
-       /// more...
-       void reset();
-
-       /// more...
-       void lightReset();
 };
-#endif
+
+#endif // TOOLBAR_PIMPL_H