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 QObject
43 GuiLayoutBox(QToolBar *, GuiViewBase &);
45 /// select the right layout in the combobox.
46 void set(docstring const & layout);
47 /// Populate the layout combox.
48 void updateContents();
49 /// Erase the layout list.
51 /// Display the layout list.
53 /// Set the activation status of the combox.
54 void setEnabled(bool);
57 void selected(const QString & str);
65 class GuiToolbar : public QToolBar
69 GuiToolbar(ToolbarInfo const &, GuiViewBase &);
71 /// Add a button to the bar.
72 void add(ToolbarItem const & item);
73 /** update toolbar information
74 * ToolbarInfo will then be saved by session
76 void saveInfo(ToolbarSection::ToolbarInfo & info);
77 /// Refresh the contents of the bar.
78 void updateContents();
79 GuiLayoutBox * layout() const { return layout_; }
80 /// Set the focus on the command buffer, if any.
81 void focusCommandBuffer();
87 Action * addItem(ToolbarItem const & item);
89 QList<Action *> actions_;
92 GuiLayoutBox * layout_;
93 GuiCommandBuffer * command_buffer_;
96 /// return a full path of an XPM for the given action
97 std::string const getIcon(FuncRequest const & f, bool unknown = true);
99 } // namespace frontend
102 #endif // GUITOOLBAR_H