-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 2001 The LyX Team.
+/**
+ * \file ControlTabularCreate.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * ======================================================
+ * \author unknown
*
- * \file ControlTabularCreate.C
+ * Full author contact details are available in file CREDITS
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include "ControlTabularCreate.h"
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
-#include "lyxfunc.h"
#include "funcrequest.h"
-
-#include "support/lstrings.h"
+#include "support/tostr.h"
-ControlTabularCreate::ControlTabularCreate(LyXView & lv, Dialogs & d)
- : ControlDialogBD(lv, d)
+ControlTabularCreate::ControlTabularCreate(Dialog & parent)
+ : Dialog::Controller(parent)
{}
-ControlTabularCreate::rowsCols & ControlTabularCreate::params()
+bool ControlTabularCreate::initialiseParams(string const &)
{
- return params_;
+ params_.first = 5;
+ params_.second = 5;
+ return true;
}
-void ControlTabularCreate::setParams()
+void ControlTabularCreate::clearParams()
{
- bc().valid(); // so that the user can press Ok
+ params_.first = 0;
+ params_.second = 0;
}
-void ControlTabularCreate::apply()
+void ControlTabularCreate::dispatchParams()
{
- if (!bufferIsAvailable())
- return;
-
- view().apply();
-
- string const val = tostr(params().first) + " " + tostr(params().second);
- lyxfunc().dispatch(FuncRequest(LFUN_TABULAR_INSERT, val));
+ string data = tostr(params().first) + ' ' + tostr(params().second);
+ kernel().dispatch(FuncRequest(LFUN_TABULAR_INSERT, data));
}