]> git.lyx.org Git - lyx.git/blob - src/frontends/Toolbar.h
Minipage is no more (long live the box inset)
[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         /// update the layout combox
39         virtual void setLayout(std::string const & layout) = 0;
40         /**
41          * Populate the layout combox - returns whether we did a full
42          * update or not
43          */
44         bool updateLayoutList(int textclass);
45         /// Drop down the layout list
46         virtual void openLayoutList() = 0;
47         /// Erase the layout list
48         virtual void clearLayoutList();
49
50 private:
51
52         virtual void add(ToolbarBackend::Toolbar const & tb) = 0;
53
54         /// update the state of the icons
55         virtual void update() = 0;
56
57         /// show or hide a toolbar
58         virtual void displayToolbar(ToolbarBackend::Toolbar const & tb,
59                                     bool show) = 0;
60
61         /// Populate the layout combox.
62         virtual void updateLayoutList() = 0;
63
64
65         /**
66          * The last textclass layout list in the layout choice selector
67          */
68         int last_textclass_;
69 };
70 #endif