]> git.lyx.org Git - features.git/blob - src/frontends/gtk/GToolbar.h
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / gtk / GToolbar.h
1 // -*- C++ -*-
2 /**
3  * \file GToolbar.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Huang Ying
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef TOOLBAR_PIMPL_H
13 #define TOOLBAR_PIMPL_H
14
15 #include <gtkmm.h>
16 #include "frontends/Toolbar.h"
17 #include "ToolbarBackend.h"
18 #include "support/std_string.h"
19
20 class GToolbar : public Toolbar, public SigC::Object
21 {
22 public:
23         GToolbar(LyXView * o, int x, int y);
24
25         ~GToolbar();
26
27         // add a new toolbar
28         void add(ToolbarBackend::Toolbar const & tb);
29
30         /// add a new button to the toolbar.
31         void add(Gtk::Toolbar * toolbar,
32                  int action,
33                  string const & tooltip);
34
35         /// display toolbar, not implemented
36         void displayToolbar(ToolbarBackend::Toolbar const & tb, bool show);
37
38         /// update the state of the icons
39         void update();
40
41         /// select the right layout in the combox
42         void setLayout(string const & layout);
43
44         /// Populate the layout combox; re-do everything if force is true.
45         void updateLayoutList();
46
47         /// Drop down the layout list
48         void openLayoutList();
49
50         /// Erase the layout list
51         void clearLayoutList();
52 private:
53         void onButtonClicked(int action);
54         void onLayoutSelected();
55         Gtk::VBox vbox_;
56         std::vector<Gtk::Toolbar*> toolbars_;
57         Gtk::Combo combo_;
58         LyXView * view_;
59         bool internal_;
60 };
61
62 #endif