]> git.lyx.org Git - lyx.git/blob - src/frontends/Toolbar.h
ba08defd0ab1cda0e5397f321077fb9d60e47493
[lyx.git] / src / frontends / Toolbar.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *           Copyright 1995 Matthias Ettrich
7  *           Copyright 1995-2001 The LyX Team.
8  *
9  *           This file is Copyright 1996-2001
10  *           Lars Gullik Bjønnes
11  *
12  * ====================================================== */
13
14 #ifndef TOOLBAR_H
15 #define TOOLBAR_H
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "LString.h"
22
23 class LyXView;
24 class ToolbarDefaults;
25 class Dialogs;
26
27 /** The LyX GUI independent toolbar class
28   The GUI interface is implemented in the corresponding Toolbar_pimpl class.
29   */
30 class Toolbar {
31 public:
32         ///
33         Toolbar(LyXView * o, Dialogs & d,
34                 int x, int y, ToolbarDefaults const &);
35
36         ///
37         ~Toolbar();
38
39         /// (re)sets the toolbar
40         void set(bool doingmain = false);
41
42         /** this is to be the entry point to the toolbar
43           frame, where you can change the toolbar realtime. */
44         void edit();
45         /// add a new button to the toolbar.
46         void add(int , bool doclean = true);
47         /// name of func instead of kb_action
48         void add(string const & , bool doclean = true);
49         /// invokes the n'th icon in the toolbar
50         void push(int);
51         /// update the state of the icons
52         void update();
53
54         /// update the layout combox
55         void setLayout(string const & layout);
56         /**
57          * Populate the layout combox - returns whether we did a full
58          * update or not
59          */
60         bool updateLayoutList(int textclass);
61         /// Drop down the layout list
62         void openLayoutList();
63         /// Erase the layout list
64         void clearLayoutList();
65
66         /// Compaq cxx 6.5 requires this to be public
67         struct Pimpl;
68 private:
69         ///
70         friend struct Toolbar::Pimpl;
71         ///
72         Pimpl * pimpl_;
73
74         /**
75          * The last textclass layout list in the layout choice selector
76          */
77         int last_textclass_;
78 };
79 #endif