]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormTabularCreate.C
xforms clean-up, described in detail in my mail of 31 May. See
[lyx.git] / src / frontends / xforms / FormTabularCreate.C
index 6ba1f0ff82511e0357d2f584a7c01e96efab46f3..c977117c3b9d98b83da48dabf960fe42fd8eadba 100644 (file)
@@ -1,14 +1,9 @@
-// -*- C++ -*-
-/* This file is part of
- * ====================================================== 
+/**
+ * \file xforms/FormTabularCreate.C
+ * Copyright 2000-2001 The LyX Team.
+ * See the file COPYING.
  *
- *           LyX, The Document Processor
- *
- *           Copyright 2000-2001 The LyX Team.
- *
- * ======================================================
- *
- * \file FormTabularCreate.C
+ * \author Jürgen Vigna, jug@sad.it
  */
 
 #include <config.h>
 #include "xformsBC.h"
 #include "ControlTabularCreate.h"
 #include "FormTabularCreate.h"
-#include "form_tabular_create.h"
+#include "forms/form_tabular_create.h"
 #include "support/lstrings.h"
+#include FORMS_H_LOCATION
+
+
+using std::make_pair;
+
 
-typedef FormCB<ControlTabularCreate, FormDB<FD_form_tabular_create> > base_class;
+typedef FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > base_class;
 
 FormTabularCreate::FormTabularCreate(ControlTabularCreate & c)
        : base_class(c, _("Insert Tabular"))
@@ -33,7 +33,7 @@ FormTabularCreate::FormTabularCreate(ControlTabularCreate & c)
 
 void FormTabularCreate::build()
 {
-       dialog_.reset(build_tabular_create());
+       dialog_.reset(build_tabular_create(this));
 
        fl_set_slider_bounds(dialog_->slider_rows, 1, 50);
        fl_set_slider_bounds(dialog_->slider_columns, 1, 50);
@@ -42,10 +42,10 @@ void FormTabularCreate::build()
        fl_set_slider_precision(dialog_->slider_rows, 0);
        fl_set_slider_precision(dialog_->slider_columns, 0);
 
-        // Manage the ok, apply and cancel/close buttons
+       // Manage the ok, apply and cancel/close buttons
        bc().setOK(dialog_->button_ok);
        bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_cancel);
+       bc().setCancel(dialog_->button_close);
 }
 
 
@@ -54,5 +54,5 @@ void FormTabularCreate::apply()
        unsigned int ysize = (unsigned int)(fl_get_slider_value(dialog_->slider_columns) + 0.5);
        unsigned int xsize = (unsigned int)(fl_get_slider_value(dialog_->slider_rows) + 0.5);
 
-       controller().params() = std::make_pair(xsize, ysize);
+       controller().params() = make_pair(xsize, ysize);
 }