]> git.lyx.org Git - lyx.git/blob - src/frontends/Toolbar.h
Create a grfx::Loader class and so move large chunks of code out of
[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
26 /** The LyX GUI independent toolbar class
27   The GUI interface is implemented in the corresponding Toolbar_pimpl class.
28   */
29 class Toolbar {
30 public:
31         ///
32         Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &);
33
34         ///
35         ~Toolbar();
36
37         /// (re)sets the toolbar
38         void set(bool doingmain = false);
39
40         /** this is to be the entry point to the toolbar
41           frame, where you can change the toolbar realtime. */
42         void edit();
43         /// add a new button to the toolbar.
44         void add(int , bool doclean = true);
45         /// name of func instead of kb_action
46         void add(string const & , bool doclean = true);
47         /// invokes the n'th icon in the toolbar
48         void push(int);
49         /// activates the toolbar
50         void activate();
51         /// deactivates the toolbar
52         void deactivate();
53         /// update the state of the icons
54         void update();
55
56         /// update the layout combox
57         void setLayout(string const & layout);
58         /** 
59          * Populate the layout combox - returns whether we did a full 
60          * update or not
61          */
62         bool updateLayoutList(int textclass);
63         /// Drop down the layout list
64         void openLayoutList();
65         /// Erase the layout list
66         void clearLayoutList();
67
68         /// Compaq cxx 6.5 requires this to be public
69         struct Pimpl;
70 private:
71         ///
72         friend struct Toolbar::Pimpl;
73         ///
74         Pimpl * pimpl_;
75
76         /**
77          * The last textclass layout list in the layout choice selector
78          */
79         int last_textclass_;
80 };
81 #endif