]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Toolbar_pimpl.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / Toolbar_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file xforms/Toolbar_pimpl.h
4  * Copyright 1996-2001 Lars Gullik Bjønnes
5  * This file is part of LyX, the document processor.
6  * Licence details can be found in the file COPYING.
7  *
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef TOOLBAR_PIMPL_H
14 #define TOOLBAR_PIMPL_H
15
16 #include <vector>
17 #include "forms_fwd.h"
18
19 #include "frontends/Toolbar.h"
20
21
22 class XFormsView;
23 class Tooltips;
24
25 /** The LyX xforms toolbar class
26  */
27 struct Toolbar::Pimpl {
28 public:
29         /// create an empty toolbar
30         Pimpl(LyXView * o, int x, int y);
31
32         ~Pimpl();
33
34         /// add a new button to the toolbar.
35         void add(int action);
36
37         /// update the state of the icons
38         void update();
39
40         /// select the right layout in the combox
41         void setLayout(string const & layout);
42         /// Populate the layout combox; re-do everything if force is true.
43         void updateLayoutList(bool force);
44         /// Drop down the layout list
45         void openLayoutList();
46         /// Erase the layout list
47         void clearLayoutList();
48         ///
49         void layoutSelected();
50
51         /// an item on the toolbar
52         struct toolbarItem
53         {
54                 toolbarItem();
55
56                 ~toolbarItem();
57
58                 toolbarItem & operator=(toolbarItem const & ti);
59
60                 /// deallocate icon
61                 void kill_icon();
62
63                 /// lyx action number
64                 int action;
65                 /// icon for this item
66                 FL_OBJECT * icon;
67         };
68
69         typedef std::vector<toolbarItem> ToolbarList;
70
71         /// The list containing all the buttons
72         ToolbarList toollist_;
73         /// owning view
74         XFormsView * owner_;
75         /// tooltips manager
76         Tooltips * tooltip_;
77         /// layout combo
78         FL_OBJECT * combox_;
79         /// x position of end of toolbar
80         int xpos;
81         /// y position of end of toolbar
82         int ypos;
83 };
84
85 #endif // TOOLBAR_PIMPL_H