]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormTabularCreate.C
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormTabularCreate.C
index e7a297e7cdb005ece8cd73c67396bc685173756d..384aefd1f61d63f41b297c37bf97b61d32b0fcb3 100644 (file)
@@ -1,54 +1,50 @@
-/* This file is part of
- * ====================================================== 
- *
- *           LyX, The Document Processor
- *
- *           Copyright 2000-2001 The LyX Team.
+/**
+ * \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
  *
- * \file FormTabularCreate.C
+ * 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 "form_tabular_create.h"
+#include "forms/form_tabular_create.h"
+#include "Tooltips.h"
 #include "support/lstrings.h"
+#include FORMS_H_LOCATION
 
 
 using std::make_pair;
 
 
-typedef FormCB<ControlTabularCreate, FormDB<FD_form_tabular_create> > base_class;
+typedef FormController<ControlTabularCreate, FormView<FD_tabular_create> > base_class;
 
-FormTabularCreate::FormTabularCreate(ControlTabularCreate & c)
-       : base_class(c, _("Insert Tabular"))
+FormTabularCreate::FormTabularCreate(Dialog & parent)
+       : base_class(parent, _("Insert Tabular"))
 {}
 
 
 void FormTabularCreate::build()
 {
-       dialog_.reset(build_tabular_create());
-
-       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_cancel);
+       dialog_.reset(build_tabular_create(this));
+
+       // Manage the ok, apply and cancel/close buttons
+       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);
 }