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
9 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
14 #ifndef GUI_TOOLBARS_H
15 #define GUI_TOOLBARS_H
17 #include "support/docstring.h"
35 GuiToolbars(GuiView & owner);
37 /// Initialize the toolbars using the backend database.
40 /// Show/hide the named toolbar.
41 void display(std::string const & name, bool show);
44 ToolbarInfo * getToolbarInfo(std::string const & name);
46 /** toggle the state of toolbars (on/off/auto). Skip "auto"
47 * when allowauto is false.
49 void toggleToolbarState(std::string const & name, bool allowauto);
51 /// Update the state of the toolbars.
52 void update(bool in_math, bool in_table, bool review,
53 bool in_mathmacrotemplate);
55 /// Is the Toolbar currently visible?
56 bool visible(std::string const & name) const;
58 /// save toolbar information
59 void saveToolbarInfo();
61 /// Show or hide the command buffer.
62 void showCommandBuffer(bool show_it);
64 /// toggle visibility of toolbars and save its flags for return
65 void toggleFullScreen(bool start_full_screen);
68 /// Add a new toolbar. if newline==true, start from a new line
69 void add(ToolbarInfo const & tbinfo, bool newline);
71 /// Show or hide a toolbar.
72 void displayToolbar(ToolbarInfo const & tbinfo, bool show);
74 /// Update the state of the icons
77 // load flags with saved values
78 void initFlags(ToolbarInfo & tbinfo);
80 /// The parent window.
83 /// Toolbar store providing access to individual toolbars by name.
84 typedef std::map<std::string, GuiToolbar *> ToolbarsMap;
85 ToolbarsMap toolbars_;
87 /// The last textclass layout list in the layout choice selector
88 DocumentClass * last_textclass_;
92 } // namespace frontend
95 #endif // GUI_TOOLBARS_H