]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlTabularCreate.C
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlTabularCreate.C
index 58a7198e8997414137cd4ae6bfdcf57f4f73f244..4b7283dbdaeaa3005de58c35a762da202bb5230c 100644 (file)
@@ -1,57 +1,43 @@
-/* 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 "BufferView.h"
-#include "lyxfunc.h"
 #include "funcrequest.h"
 
-#include "frontends/LyXView.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 (!lv_.view()->available())
-               return;
-
-       view().apply();
-
-       string const val = tostr(params().first) + " " + tostr(params().second);
-       lv_.getLyXFunc()->dispatch(FuncRequest(LFUN_TABULAR_INSERT, val));
+       string data = tostr(params().first) + ' ' + tostr(params().second);
+       kernel().dispatch(FuncRequest(LFUN_TABULAR_INSERT, data));
 }