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
9 * \author Jean-Marc Lasgouttes
10 * \author Angus Leeming
11 * \author Abdelrazak Younes
13 * Full author contact details are available in file CREDITS.
19 #include "GuiCommandBuffer.h"
38 class GuiLayoutBox : public QComboBox
42 GuiLayoutBox(GuiViewBase &);
44 /// select the right layout in the combobox.
45 void set(docstring const & layout);
46 /// Populate the layout combox.
47 void updateContents();
50 void selected(const QString & str);
57 class GuiToolbar : public QToolBar
61 GuiToolbar(ToolbarInfo const &, GuiViewBase &);
63 /// Add a button to the bar.
64 void add(ToolbarItem const & item);
65 /** update toolbar information
66 * ToolbarInfo will then be saved by session
68 void saveInfo(ToolbarSection::ToolbarInfo & info);
69 /// Refresh the contents of the bar.
70 void updateContents();
71 GuiLayoutBox * layout() const { return layout_; }
73 GuiCommandBuffer * commandBuffer() { return command_buffer_; }
79 Action * addItem(ToolbarItem const & item);
81 QList<Action *> actions_;
84 GuiLayoutBox * layout_;
85 GuiCommandBuffer * command_buffer_;
88 /// return a full path of an .png for the given action
89 std::string const getIcon(FuncRequest const & f, bool unknown = true);
91 } // namespace frontend
94 #endif // GUITOOLBAR_H