3 * \file ToolbarBackend.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
12 #ifndef TOOLBAR_BACKEND_H
13 #define TOOLBAR_BACKEND_H
23 class ToolbarBackend {
25 /// The special toolbar actions
27 /// adds space between buttons in the toolbar
29 /// a special combox insead of a button
31 /// begin a new line of button (not working)
36 typedef std::pair<int, string> Item;
39 typedef std::vector<std::pair<int, string> > Items;
41 /// possibly display types
45 MATH, //< shown when in math
46 TABLE //< shown when in table
56 DisplayType display_type;
59 typedef std::vector<Toolbar> Toolbars;
61 typedef Items::const_iterator item_iterator;
65 /// iterator for all toolbars
66 Toolbars::const_iterator begin() const {
67 return toolbars.begin();
70 Toolbars::const_iterator end() const {
71 return toolbars.end();
74 /// read a toolbar from the file
77 /// return a full path of an XPM for the given action
78 static string const getIcon(int action);
81 /// add the given lfun with tooltip if relevant
82 void add(Toolbar & tb, int, string const & tooltip = string());
84 /// add the given lfun with tooltip if relevant
85 void add(Toolbar & tb, string const &, string const & tooltip);
91 /// The global instance
92 extern ToolbarBackend toolbarbackend;
95 #endif // TOOLBAR_BACKEND_H