2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2001 The LyX Team.
9 * This file is Copyright 1996-2001
12 * ====================================================== */
14 #ifndef TOOLBAR_PIMPL_H
15 #define TOOLBAR_PIMPL_H
18 #include FORMS_H_LOCATION
20 #include "frontends/Toolbar.h"
22 #include "commandtags.h"
24 #include "ToolbarDefaults.h"
32 /** The LyX xforms toolbar class
34 struct Toolbar::Pimpl {
36 /// called when user selects a layout from combox
37 static void layoutSelectedCB(int, void *, Combox *);
39 Pimpl(LyXView * o, int x, int y);
48 int get_toolbar_func(string const & func);
51 /// (re)sets the toolbar
52 void set(bool doingmain = false);
54 /** this is to be the entry point to the toolbar
55 frame, where you can change the toolbar realtime.
58 /// add a new button to the toolbar.
59 void add(int, bool doclean = true);
60 /// invokes the n'th icon in the toolbar
62 /// activates the toolbar
64 /// deactivates the toolbar
66 /// update the state of the icons
70 /// select the right layout in the combox
71 void setLayout(int layout);
72 /// Populate the layout combox; re-do everything if force is true.
73 void updateLayoutList(bool force);
74 /// Drop down the layout list
75 void openLayoutList();
76 /// Erase the layout list
77 void clearLayoutList();
78 /// and the non-static version
79 void layoutSelected(int);
95 toolbarItem & operator=(toolbarItem const & ti);
98 /// typedef to simplify things
99 typedef std::vector<toolbarItem> ToolbarList;
100 /// The list containing all the buttons
101 ToolbarList toollist;
106 FL_OBJECT * bubble_timer;
110 /// Starting position
121 /// removes all toolbar buttons from the toolbar.