]> git.lyx.org Git - lyx.git/blob - src/frontends/Toolbar.h
Make M-x show the minibuffer
[lyx.git] / src / frontends / Toolbar.h
1 // -*- C++ -*-
2 /**
3  * \file Toolbar.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef TOOLBAR_H
13 #define TOOLBAR_H
14
15 #include "ToolbarBackend.h"
16
17 class LyXView;
18
19 /**
20  * The LyX GUI independent toolbar class
21  *
22  * The GUI interface is implemented in the corresponding Toolbar_pimpl class.
23  */
24 class Toolbar {
25 public:
26         ///
27         Toolbar();
28
29         ///
30         virtual ~Toolbar();
31
32         /// Initialize toolbar from backend
33         void init();
34
35         /// update the state of the toolbars
36         void update(bool in_math, bool in_table);
37
38         /// show/hide the named toolbar
39         void display(std::string const & name, bool show);
40
41         /// update the layout combox
42         virtual void setLayout(std::string const & layout) = 0;
43         /**
44          * Populate the layout combox - returns whether we did a full
45          * update or not
46          */
47         bool updateLayoutList(int textclass);
48         /// Drop down the layout list
49         virtual void openLayoutList() = 0;
50         /// Erase the layout list
51         virtual void clearLayoutList();
52
53 private:
54
55         virtual void add(ToolbarBackend::Toolbar const & tb) = 0;
56
57         /// update the state of the icons
58         virtual void update() = 0;
59
60         /// show or hide a toolbar
61         virtual void displayToolbar(ToolbarBackend::Toolbar const & tb,
62                                     bool show) = 0;
63
64         /// Populate the layout combox.
65         virtual void updateLayoutList() = 0;
66
67
68         /**
69          * The last textclass layout list in the layout choice selector
70          */
71         int last_textclass_;
72 };
73 #endif