3 * \file XFormsToolbar.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
10 * Full author contact details are available in file CREDITS.
13 #ifndef XFORMSTOOLBAR_H
14 #define XFROMSTOOLBAR_H
16 #include "LayoutEngine.h"
17 #include "XFormsView.h"
19 #include "frontends/Toolbars.h"
21 #include <boost/scoped_ptr.hpp>
32 class XLayoutBox: public LayoutBox {
34 XLayoutBox(LyXView & owner, XFormsToolbar & toolbar);
36 /// select the right layout in the combox.
37 void set(std::string const & layout);
38 /// Populate the layout combox.
40 /// Erase the layout list.
42 /// Display the layout list.
45 void setEnabled(bool);
57 /** The LyX xforms toolbar class
59 class XFormsToolbar : public Toolbar {
60 friend class XLayoutBox;
63 XFormsToolbar(ToolbarBackend::Toolbar const & tbb, LyXView & o);
66 void add(FuncRequest const & func, std::string const & tooltip);
70 LayoutBox * layout() const { return layout_.get(); }
72 /// an item on the toolbar
79 toolbarItem & operator=(toolbarItem const & ti);
81 void generateInactivePixmaps();
88 /// icon for this item
93 Pixmap inactive_pixmap;
98 XFormsView::Position position_;
100 boost::shared_ptr<Box> toolbar_;
102 BoxList * toolbar_buttons_;
106 typedef std::vector<FuncRequest> Funcs;
110 typedef std::vector<toolbarItem> ToolbarList;
112 /// The list containing all the buttons
113 ToolbarList toollist_;
117 boost::scoped_ptr<Tooltips> tooltip_;
119 boost::scoped_ptr<XLayoutBox> layout_;
122 } // namespace frontend