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>
30 class XLayoutBox: public LayoutBox {
32 XLayoutBox(LyXView & owner, XFormsToolbar & toolbar);
34 /// select the right layout in the combox.
35 void set(std::string const & layout);
36 /// Populate the layout combox.
38 /// Erase the layout list.
40 /// Display the layout list.
43 void setEnabled(bool);
55 /** The LyX xforms toolbar class
57 class XFormsToolbar : public Toolbar {
58 friend class XLayoutBox;
61 XFormsToolbar(ToolbarBackend::Toolbar const & tbb, LyXView & o);
64 void add(FuncRequest const & func, std::string const & tooltip);
68 LayoutBox * layout() const { return layout_.get(); }
70 /// an item on the toolbar
77 toolbarItem & operator=(toolbarItem const & ti);
79 void generateInactivePixmaps();
86 /// icon for this item
92 Pixmap inactive_pixmap;
97 XFormsView::Position position_;
99 lyx::frontend::Box * toolbar_;
101 lyx::frontend::BoxList * toolbar_buttons_;
103 lyx::frontend::WidgetMap widgets_;
105 typedef std::vector<FuncRequest> Funcs;
109 typedef std::vector<toolbarItem> ToolbarList;
111 /// The list containing all the buttons
112 ToolbarList toollist_;
116 boost::scoped_ptr<Tooltips> tooltip_;
118 boost::scoped_ptr<XLayoutBox> layout_;