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"
24 ControlBox::ControlBox(Dialog & parent)
25 : Controller(parent), params_("")
29 bool ControlBox::initialiseParams(string const & data)
31 InsetBoxMailer::string2params(data, params_);
37 void ControlBox::clearParams()
39 params_ = InsetBoxParams("");
43 void ControlBox::dispatchParams()
45 string const lfun = InsetBoxMailer::params2string(params());
46 dispatch(FuncRequest(getLfun(), lfun));
50 void box_gui_tokens(vector<string> & ids, vector<docstring> & gui_names)
52 char const * const ids_[] = {
53 "Frameless", "Boxed", "ovalbox",
54 "Ovalbox", "Shadowbox", "Doublebox"};
55 size_t const ids_size = sizeof(ids_) / sizeof(char *);
56 ids = vector<string>(ids_, ids_ + ids_size);
58 gui_names.push_back(_("No frame drawn"));
59 gui_names.push_back(_("Rectangular box"));
60 gui_names.push_back(_("Oval box, thin"));
61 gui_names.push_back(_("Oval box, thick"));
62 gui_names.push_back(_("Shadow box"));
63 gui_names.push_back(_("Double box"));
66 void box_gui_tokens_special_length(vector<string> & ids,
67 vector<docstring> & gui_names)
69 char const * const ids_[] = {
70 "none", "height", "depth",
71 "totalheight", "width"};
72 size_t const ids_size = sizeof(ids_) / sizeof(char *);
73 ids = vector<string>(ids_, ids_ + ids_size);
75 gui_names.push_back(_("None"));
76 gui_names.push_back(_("Height"));
77 gui_names.push_back(_("Depth"));
78 gui_names.push_back(_("Total Height"));
79 gui_names.push_back(_("Width"));
82 } // namespace frontend