]> git.lyx.org Git - lyx.git/blob - src/frontends/Toolbar.h
Martin's changes to the Note 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
16 #include "LString.h"
17 #include "ToolbarBackend.h"
18
19 class LyXView;
20
21 /**
22  * The LyX GUI independent toolbar class
23  *
24  * The GUI interface is implemented in the corresponding Toolbar_pimpl class.
25  */
26 class Toolbar {
27 public:
28         ///
29         Toolbar();
30
31         /// 
32         virtual ~Toolbar();
33
34         /// Initialize toolbar from backend
35         void init();
36
37         /// update the state of the toolbars
38         void update(bool in_math, bool in_table);
39
40         /// update the layout combox
41         virtual void setLayout(string const & layout) = 0;
42         /**
43          * Populate the layout combox - returns whether we did a full
44          * update or not
45          */
46         bool updateLayoutList(int textclass);
47         /// Drop down the layout list
48         virtual void openLayoutList() = 0;
49         /// Erase the layout list
50         virtual void clearLayoutList() = 0;
51
52 private:
53
54         virtual void add(ToolbarBackend::Toolbar const & tb) = 0;
55
56         /// update the state of the icons
57         virtual void update() = 0;
58
59         /// show or hide a toolbar
60         virtual void displayToolbar(ToolbarBackend::Toolbar const & tb, 
61                                     bool show) = 0;
62
63         /// Populate the layout combox.
64         virtual void updateLayoutList() = 0;
65
66
67         /**
68          * The last textclass layout list in the layout choice selector
69          */
70         int last_textclass_;
71 };
72 #endif