]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Toolbar_pimpl.h
Removed an incorrect assert in GraphicsCache.
[lyx.git] / src / frontends / xforms / Toolbar_pimpl.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *           Copyright 1995 Matthias Ettrich
7  *           Copyright 1995-2000 The LyX Team.
8  *
9  *           This file is Copyright 1996-2000
10  *           Lars Gullik Bjønnes
11  *
12  * ====================================================== */
13
14 #ifndef TOOLBAR_PIMPL_H
15 #define TOOLBAR_PIMPL_H
16
17 #include "frontends/Toolbar.h"
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 #include <vector>
24 #include FORMS_H_LOCATION
25 #include "commandtags.h"
26 #include "combox.h"
27 #include "ToolbarDefaults.h"
28
29 /** The LyX xforms toolbar class
30   */
31 struct Toolbar::Pimpl {
32 public:
33         ///
34         Pimpl(LyXView * o, int x, int y);
35
36         ///
37         ~Pimpl() {
38                 clean();
39         }
40         
41 #if 0
42         ///
43         int get_toolbar_func(string const & func);
44 #endif
45         
46         /// (re)sets the toolbar
47         void set(bool doingmain = false);
48
49         /** this is to be the entry point to the toolbar
50             frame, where you can change the toolbar realtime.
51         */
52         void edit();
53         /// add a new button to the toolbar.
54         void add(int, bool doclean = true);
55         /// invokes the n'th icon in the toolbar
56         void push(int);
57         /// activates the toolbar
58         void activate();
59         /// deactivates the toolbar
60         void deactivate();
61         /// update the state of the icons
62         void update();
63
64         /// select the right layout in the combox
65         void setLayout(int layout);
66         /// Populate the layout combox; re-do everything if force is true.
67         void updateLayoutList(bool force);
68         /// Drop down the layout list
69         void openLayoutList();
70         /// Erase the layout list
71         void clearLayoutList();
72
73         ///
74         struct toolbarItem
75         {
76                 ///
77                 int action;
78                 ///
79                 FL_OBJECT * icon;
80                 ///
81                 toolbarItem();
82                 ///
83                 void clean();
84                 ///
85                 ~toolbarItem();
86                 ///
87                 toolbarItem & operator=(toolbarItem const & ti);
88         };
89
90         /// typedef to simplify things
91         typedef std::vector<toolbarItem> ToolbarList;
92         /// The list containing all the buttons
93         ToolbarList toollist;
94         ///
95         LyXView * owner;
96 #if FL_REVISION < 89
97         ///
98         FL_OBJECT * bubble_timer;
99 #endif
100         ///
101         Combox * combox;
102         /// Starting position
103         int sxpos;
104         ///
105         int sypos;
106         ///
107         int xpos;
108         ///
109         int ypos;
110         ///
111         bool cleaned;
112
113         /// removes all toolbar buttons from the toolbar.
114         void clean();
115
116         /// more...
117         void reset();
118
119         /// more...
120         void lightReset();
121 };
122 #endif