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"
25 ControlBox::ControlBox(Dialog & parent)
26 : Dialog::Controller(parent)
30 bool ControlBox::initialiseParams(string const & data)
32 InsetBoxParams params("");
33 InsetBoxMailer::string2params(data, params);
34 params_.reset(new InsetBoxParams(params));
41 void ControlBox::clearParams()
47 void ControlBox::dispatchParams()
49 string const lfun = InsetBoxMailer::params2string(params());
50 kernel().dispatch(FuncRequest(getLfun(), lfun));
54 void box_gui_tokens(vector<string> & ids, vector<string> & gui_names)
56 char const * const ids_[] = {
57 "Frameless", "Boxed", "ovalbox",
58 "Ovalbox", "Shadowbox", "Doublebox"};
59 size_t const ids_size = sizeof(ids_) / sizeof(char *);
60 ids = vector<string>(ids_, ids_ + ids_size);
63 gui_names.push_back(lyx::to_utf8(_("No frame drawn")));
64 gui_names.push_back(lyx::to_utf8(_("Rectangular box")));
65 gui_names.push_back(lyx::to_utf8(_("Oval box, thin")));
66 gui_names.push_back(lyx::to_utf8(_("Oval box, thick")));
67 gui_names.push_back(lyx::to_utf8(_("Shadow box")));
68 gui_names.push_back(lyx::to_utf8(_("Double box")));
71 void box_gui_tokens_special_length(vector<string> & ids,
72 vector<string> & gui_names)
74 char const * const ids_[] = {
75 "none", "height", "depth",
76 "totalheight", "width"};
77 size_t const ids_size = sizeof(ids_) / sizeof(char *);
78 ids = vector<string>(ids_, ids_ + ids_size);
81 gui_names.push_back(lyx::to_utf8(_("None")));
82 gui_names.push_back(lyx::to_utf8(_("Height")));
83 gui_names.push_back(lyx::to_utf8(_("Depth")));
84 gui_names.push_back(lyx::to_utf8(_("Total Height")));
85 gui_names.push_back(lyx::to_utf8(_("Width")));
88 } // namespace frontend