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;
49 typedef std::vector<Toolbar> Toolbars;
51 typedef Items::const_iterator item_iterator;
55 /// iterator for all toolbars
56 Toolbars::const_iterator begin() const {
57 return toolbars.begin();
60 Toolbars::const_iterator end() const {
61 return toolbars.end();
64 /// read a toolbar from the file
67 /// return a full path of an XPM for the given action
68 static string const getIcon(int action);
71 /// add the given lfun with tooltip if relevant
72 void add(Toolbar & tb, int, string const & tooltip = string());
74 /// add the given lfun with tooltip if relevant
75 void add(Toolbar & tb, string const &, string const & tooltip);
81 /// The global instance
82 extern ToolbarBackend toolbarbackend;
85 #endif // TOOLBAR_BACKEND_H