]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Toolbar_pimpl.h
remove LFUN_TOOLBAR_PUSH
[lyx.git] / src / frontends / xforms / Toolbar_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file Toolbar_pimpl.h
4  * Copyright 2002 the LyX Team
5  * Copyright 1996-2001 Lars Gullik Bjønnes
6  * Read the file COPYING
7  *
8  * \author Lars Gullik Bjønnes, larsbj@lyx.org
9  */
10
11 #ifndef TOOLBAR_PIMPL_H
12 #define TOOLBAR_PIMPL_H
13
14 #include <vector>
15 #include "forms_fwd.h"
16
17 #include "frontends/Toolbar.h"
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 class XFormsView;
24 class Tooltips;
25 class Dialogs;
26 class Combox;
27
28 /** The LyX xforms toolbar class
29   */
30 struct Toolbar::Pimpl {
31 public:
32         /// called when user selects a layout from combox
33         static void layoutSelectedCB(int, void *, Combox *);
34         ///
35         Pimpl(LyXView * o, Dialogs &, int x, int y);
36         ///
37         ~Pimpl();
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         */
45         void edit();
46         /// add a new button to the toolbar.
47         void add(int, bool doclean = true);
48         /// update the state of the icons
49         void update();
50
51         /// select the right layout in the combox
52         void setLayout(string const & layout);
53         /// Populate the layout combox; re-do everything if force is true.
54         void updateLayoutList(bool force);
55         /// Drop down the layout list
56         void openLayoutList();
57         /// Erase the layout list
58         void clearLayoutList();
59         /// the non-static version of layoutSelectedCB
60         void layoutSelected();
61
62         ///
63         struct toolbarItem
64         {
65                 ///
66                 int action;
67                 ///
68                 FL_OBJECT * icon;
69                 ///
70                 toolbarItem();
71                 ///
72                 void clean();
73                 ///
74                 ~toolbarItem();
75                 ///
76                 toolbarItem & operator=(toolbarItem const & ti);
77         };
78
79         /// typedef to simplify things
80         typedef std::vector<toolbarItem> ToolbarList;
81         /// The list containing all the buttons
82         ToolbarList toollist;
83         ///
84         XFormsView * owner;
85         ///
86         Tooltips * tooltip_;
87         ///
88         Combox * combox;
89         /// Starting position
90         int sxpos;
91         ///
92         int sypos;
93         ///
94         int xpos;
95         ///
96         int ypos;
97         ///
98         bool cleaned;
99
100         /// removes all toolbar buttons from the toolbar.
101         void clean();
102
103         /// more...
104         void reset();
105
106         /// more...
107         void lightReset();
108 };
109 #endif