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
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
12 * The Toolbars class is a container of toolbars.
13 * It provides accessors to each Toolbar and to the LayoutBox.
15 * Each GUI frontend should provide toolbar and layout boxes by derivation
16 * from the LayoutBox and Toolbar pure abstract classes.
18 * The Toolbars class has no knowledge at all of the details of each
19 * frontend's implementation, which requires that each frontend should
20 * provide a 'make_toolbar' function, signature below.
26 #include "TextClass.h"
27 #include "ToolbarBackend.h"
37 virtual ~Toolbars() {}
39 /// Initialize the toolbars using the backend database.
42 /// Show/hide the named toolbar.
43 void display(std::string const & name, bool show);
46 ToolbarInfo * getToolbarInfo(std::string const & name);
48 /** toggle the state of toolbars (on/off/auto). Skip "auto"
49 * when allowauto is false.
51 void toggleToolbarState(std::string const & name, bool allowauto);
53 /// Update the state of the toolbars.
54 void update(bool in_math, bool in_table, bool review);
56 /// Is the Toolbar currently visible?
57 virtual bool visible(std::string const & name) const = 0;
59 /// save toolbar information
60 virtual void saveToolbarInfo() = 0;
62 /// Select the right layout in the combox.
63 virtual void setLayout(docstring const & layout) = 0;
66 /// Add a new toolbar. if newline==true, start from a new line
67 virtual void add(ToolbarInfo const & tbinfo, bool newline) = 0;
68 /// Show or hide a toolbar.
69 virtual void displayToolbar(ToolbarInfo const & tbinfo, bool show) = 0;
70 /// Update the state of the icons
71 virtual void updateIcons() = 0;
73 // load flags with saved values
74 void initFlags(ToolbarInfo & tbinfo);
77 } // namespace frontend
80 #endif // NOT TOOLBARS_H