3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Martin Vermeer (with useful hints from Angus Leeming)
8 * Full author contact details are available in file CREDITS.
13 #include "ControlBox.h"
14 #include "funcrequest.h"
15 #include "insets/insetbox.h"
23 ControlBox::ControlBox(Dialog & parent)
24 : Dialog::Controller(parent)
28 bool ControlBox::initialiseParams(string const & data)
30 InsetBoxParams params("");
31 InsetBoxMailer::string2params(data, params);
32 params_.reset(new InsetBoxParams(params));
39 void ControlBox::clearParams()
45 void ControlBox::dispatchParams()
47 string const lfun = InsetBoxMailer::params2string(params());
48 kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
52 void box_gui_tokens(vector<string> & ids, vector<string> & gui_names)
54 char const * const ids_[] = {
55 "Frameless", "Boxed", "ovalbox",
56 "Ovalbox", "Shadowbox", "Doublebox"};
57 size_t const ids_size = sizeof(ids_) / sizeof(char *);
58 ids = vector<string>(ids_, ids_ + ids_size);
60 gui_names.push_back(_("No frame drawn"));
61 gui_names.push_back(_("Rectangular box"));
62 gui_names.push_back(_("Oval box, thin"));
63 gui_names.push_back(_("Oval box, thick"));
64 gui_names.push_back(_("Shadow box"));
65 gui_names.push_back(_("Double box"));
68 void box_gui_tokens_special_length(vector<string> & ids,
69 vector<string> & gui_names)
71 char const * const ids_[] = {
72 "none", "height", "depth",
73 "totalheight", "width"};
74 size_t const ids_size = sizeof(ids_) / sizeof(char *);
75 ids = vector<string>(ids_, ids_ + ids_size);
77 gui_names.push_back(_("None"));
78 gui_names.push_back(_("Height"));
79 gui_names.push_back(_("Depth"));
80 gui_names.push_back(_("Total Height"));
81 gui_names.push_back(_("Width"));