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 "TextClassPtr.h"
19 #include "support/docstring.h"
36 GuiToolbars(GuiView & owner);
38 /// Initialize the toolbars using the backend database.
41 /// Show/hide the named toolbar.
42 void display(std::string const & name, bool show);
45 ToolbarInfo * getToolbarInfo(std::string const & name);
47 /** toggle the state of toolbars (on/off/auto). Skip "auto"
48 * when allowauto is false.
50 void toggleToolbarState(std::string const & name, bool allowauto);
52 /// Update the state of the toolbars.
53 void update(bool in_math, bool in_table, bool review,
54 bool in_mathmacrotemplate);
56 /// Is the Toolbar currently visible?
57 bool visible(std::string const & name) const;
59 /// save toolbar information
60 void saveToolbarInfo();
62 /// Show or hide the command buffer.
63 void showCommandBuffer(bool show_it);
65 /// toggle visibility of toolbars and save its flags for return
66 void toggleFullScreen(bool start_full_screen);
69 /// Add a new toolbar. if newline==true, start from a new line
70 void add(ToolbarInfo const & tbinfo, bool newline);
72 /// Show or hide a toolbar.
73 void displayToolbar(ToolbarInfo const & tbinfo, bool show);
75 /// Update the state of the icons
78 // load flags with saved values
79 void initFlags(ToolbarInfo & tbinfo);
81 /// The parent window.
84 /// Toolbar store providing access to individual toolbars by name.
85 typedef std::map<std::string, GuiToolbar *> ToolbarsMap;
86 ToolbarsMap toolbars_;
88 /// The last textclass layout list in the layout choice selector
89 TextClassPtr last_textclass_;
93 } // namespace frontend
96 #endif // NOT GUI_TOOLBARS_H