]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Toolbar_pimpl.h
show some more info on execvp error
[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         /// create an empty toolbar
36         Pimpl(LyXView * o, Dialogs &, int x, int y);
37
38         ~Pimpl();
39
40         /// add a new button to the toolbar.
41         void add(int action);
42
43         /// update the state of the icons
44         void update();
45
46         /// select the right layout in the combox
47         void setLayout(string const & layout);
48         /// Populate the layout combox; re-do everything if force is true.
49         void updateLayoutList(bool force);
50         /// Drop down the layout list
51         void openLayoutList();
52         /// Erase the layout list
53         void clearLayoutList();
54         /// the non-static version of layoutSelectedCB
55         void layoutSelected();
56
57         /// an item on the toolbar
58         struct toolbarItem
59         {
60                 toolbarItem();
61
62                 ~toolbarItem();
63  
64                 toolbarItem & operator=(toolbarItem const & ti);
65  
66                 /// deallocate icon
67                 void kill_icon();
68  
69                 /// lyx action number
70                 int action;
71                 /// icon for this item
72                 FL_OBJECT * icon;
73         };
74
75         typedef std::vector<toolbarItem> ToolbarList;
76  
77         /// The list containing all the buttons
78         ToolbarList toollist_;
79         /// owning view
80         XFormsView * owner_;
81         /// tooltips manager
82         Tooltips * tooltip_;
83         /// layout combo
84         Combox * combox_;
85         /// x position of end of toolbar
86         int xpos;
87         /// y position of end of toolbar
88         int ypos;
89 };
90  
91 #endif // TOOLBAR_PIMPL_H