]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBox.h
framed.sty goes InsetBox:
[lyx.git] / src / frontends / qt4 / GuiBox.h
1 // -*- C++ -*-
2 /**
3  * \file GuiBox.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Spitzmüller
8  * \author Martin Vermeer (with useful hints from Angus Leeming)
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUIBOX_H
14 #define GUIBOX_H
15
16 #include "GuiDialog.h"
17 #include "ui_BoxUi.h"
18 #include "insets/InsetBox.h"
19
20 #include <vector>
21
22
23 namespace lyx {
24 namespace frontend {
25
26 class GuiBox : public GuiDialog, public Ui::BoxUi
27 {
28         Q_OBJECT
29
30 public:
31         GuiBox(GuiView & lv);
32
33 private Q_SLOTS:
34         void change_adaptor();
35         void innerBoxChanged(const QString &);
36         void typeChanged(int);
37         void restoreClicked();
38         void pagebreakClicked();
39
40 private:
41         ///
42         void closeEvent(QCloseEvent * e);
43
44         /// add and remove special lengths
45         void setSpecial(bool ibox);
46         /// only show valid inner box items
47         void setInnerType(bool frameless, int i);
48
49         /// Apply changes
50         void applyView();
51         /// update
52         void updateContents();
53
54         ///
55         bool initialiseParams(std::string const & data);
56         ///
57         void clearParams();
58         ///
59         void dispatchParams();
60         ///
61         bool isBufferDependent() const { return true; }
62
63         ///
64         std::vector<std::string> ids_;
65         ///
66         std::vector<docstring> gui_names_;
67         ///
68         std::vector<std::string> ids_spec_;
69         ///
70         std::vector<docstring> gui_names_spec_;
71
72         ///
73         InsetBoxParams params_;
74 };
75
76 } // namespace frontend
77 } // namespace lyx
78
79 #endif // GUIBOX_H