3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include <libglademm.h>
16 #include "ControlTabularCreate.h"
17 #include "GTableCreate.h"
18 #include "support/filetools.h"
19 #include "support/lstrings.h"
23 GTableCreate::GTableCreate(Dialog & parent)
24 : GViewCB<ControlTabularCreate, GViewGladeB>(parent, _("Insert Table"))
28 void GTableCreate::doBuild()
30 string const gladeName =
31 lyx::support::LibFileSearch("glade", "tableCreate", "glade");
32 xml_ = Gnome::Glade::Xml::create(gladeName);
36 xml_->get_widget("Ok", ok);
37 xml_->get_widget("Apply", apply);
38 xml_->get_widget("Cancel", cancel);
39 xml_->get_widget("Rows", rows_);
40 xml_->get_widget("Columns", columns_);
46 void GTableCreate::apply()
48 int rows = rows_->get_value_as_int();
49 int columns = columns_->get_value_as_int();
50 controller().params() = std::make_pair(columns, rows);