]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormTabularCreate.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormTabularCreate.C
index 0e2ace9b49e0bc21d344814f319000dc6a40f159..4e8f33c87e172a72243627c64754cc02cf537ba5 100644 (file)
@@ -1,34 +1,32 @@
 /**
- * \file xforms/FormTabularCreate.C
- * See the file COPYING.
+ * \file FormTabularCreate.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author Jürgen Vigna
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
-#include <utility>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "xformsBC.h"
-#include "ControlTabularCreate.h"
 #include "FormTabularCreate.h"
+#include "ControlTabularCreate.h"
 #include "forms/form_tabular_create.h"
-#include "support/lstrings.h"
-#include FORMS_H_LOCATION
 
+#include "Tooltips.h"
+#include "xformsBC.h"
+
+#include "lyx_forms.h"
 
 using std::make_pair;
+using std::string;
 
 
-typedef FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > base_class;
+typedef FormController<ControlTabularCreate, FormView<FD_tabular_create> > base_class;
 
-FormTabularCreate::FormTabularCreate()
-       : base_class(_("Insert Tabular"))
+FormTabularCreate::FormTabularCreate(Dialog & parent)
+       : base_class(parent, _("Insert Table"))
 {}
 
 
@@ -36,17 +34,16 @@ void FormTabularCreate::build()
 {
        dialog_.reset(build_tabular_create(this));
 
-       fl_set_slider_bounds(dialog_->slider_rows, 1, 50);
-       fl_set_slider_bounds(dialog_->slider_columns, 1, 50);
-       fl_set_slider_value(dialog_->slider_rows, 5);
-       fl_set_slider_value(dialog_->slider_columns, 5);
-       fl_set_slider_precision(dialog_->slider_rows, 0);
-       fl_set_slider_precision(dialog_->slider_columns, 0);
-
        // Manage the ok, apply and cancel/close buttons
-       bc().setOK(dialog_->button_ok);
-       bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_close);
+       bcview().setOK(dialog_->button_ok);
+       bcview().setApply(dialog_->button_apply);
+       bcview().setCancel(dialog_->button_close);
+
+       // set up the tooltips
+       string str = _("Number of columns in the tabular.");
+       tooltips().init(dialog_->slider_columns, str);
+       str = _("Number of rows in the tabular.");
+       tooltips().init(dialog_->slider_rows, str);
 }