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(LFUN_INSET_APPLY, 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);
62 gui_names.push_back(_("No frame drawn"));
63 gui_names.push_back(_("Rectangular box"));
64 gui_names.push_back(_("Oval box, thin"));
65 gui_names.push_back(_("Oval box, thick"));
66 gui_names.push_back(_("Shadow box"));
67 gui_names.push_back(_("Double box"));
70 void box_gui_tokens_special_length(vector<string> & ids,
71 vector<string> & gui_names)
73 char const * const ids_[] = {
74 "none", "height", "depth",
75 "totalheight", "width"};
76 size_t const ids_size = sizeof(ids_) / sizeof(char *);
77 ids = vector<string>(ids_, ids_ + ids_size);
79 gui_names.push_back(_("None"));
80 gui_names.push_back(_("Height"));
81 gui_names.push_back(_("Depth"));
82 gui_names.push_back(_("Total Height"));
83 gui_names.push_back(_("Width"));
86 } // namespace frontend