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 "frontends/Toolbars.h"
33 class GuiCommandBuffer;
39 class GuiLayoutBox : public QComboBox
43 GuiLayoutBox(GuiViewBase &);
45 /// select the right layout in the combobox.
46 void set(docstring const & layout);
47 /// Populate the layout combox.
48 void updateContents();
51 void selected(const QString & str);
58 class GuiToolbar : public QToolBar
62 GuiToolbar(ToolbarInfo const &, GuiViewBase &);
64 /// Add a button to the bar.
65 void add(ToolbarItem const & item);
66 /** update toolbar information
67 * ToolbarInfo will then be saved by session
69 void saveInfo(ToolbarSection::ToolbarInfo & info);
70 /// Refresh the contents of the bar.
71 void updateContents();
72 GuiLayoutBox * layout() const { return layout_; }
73 /// Set the focus on the command buffer, if any.
74 void focusCommandBuffer();
80 Action * addItem(ToolbarItem const & item);
82 QList<Action *> actions_;
85 GuiLayoutBox * layout_;
86 GuiCommandBuffer * command_buffer_;
89 /// return a full path of an XPM for the given action
90 std::string const getIcon(FuncRequest const & f, bool unknown = true);
92 } // namespace frontend
95 #endif // GUITOOLBAR_H