2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file ControlTabularCreate.C
|
|
|
|
* See the file COPYING.
|
2001-03-26 14:33:58 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author unknown
|
2001-03-26 14:33:58 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* Full author contact details are available in file CREDITS
|
2001-03-26 14:33:58 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
#include "ControlTabularCreate.h"
|
2001-04-26 18:40:38 +00:00
|
|
|
#include "ViewBase.h"
|
|
|
|
#include "ButtonControllerBase.h"
|
2001-03-26 14:33:58 +00:00
|
|
|
#include "lyxfunc.h"
|
2002-08-07 08:11:41 +00:00
|
|
|
#include "funcrequest.h"
|
2002-05-29 16:21:03 +00:00
|
|
|
|
|
|
|
|
2001-04-11 17:59:08 +00:00
|
|
|
#include "support/lstrings.h"
|
2001-03-26 14:33:58 +00:00
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
2001-03-26 14:33:58 +00:00
|
|
|
ControlTabularCreate::ControlTabularCreate(LyXView & lv, Dialogs & d)
|
2002-01-16 14:47:58 +00:00
|
|
|
: ControlDialogBD(lv, d)
|
2002-06-18 15:44:30 +00:00
|
|
|
{}
|
2001-03-26 14:33:58 +00:00
|
|
|
|
|
|
|
|
2001-04-11 17:59:08 +00:00
|
|
|
ControlTabularCreate::rowsCols & ControlTabularCreate::params()
|
2001-03-26 14:33:58 +00:00
|
|
|
{
|
2002-08-07 08:11:41 +00:00
|
|
|
return params_;
|
2001-03-26 14:33:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ControlTabularCreate::setParams()
|
|
|
|
{
|
|
|
|
bc().valid(); // so that the user can press Ok
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ControlTabularCreate::apply()
|
|
|
|
{
|
2002-08-12 20:17:41 +00:00
|
|
|
if (!bufferIsAvailable())
|
2001-03-26 14:33:58 +00:00
|
|
|
return;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-26 14:33:58 +00:00
|
|
|
view().apply();
|
|
|
|
|
2002-08-07 08:11:41 +00:00
|
|
|
string const val = tostr(params().first) + " " + tostr(params().second);
|
2002-08-12 20:17:41 +00:00
|
|
|
lyxfunc().dispatch(FuncRequest(LFUN_TABULAR_INSERT, val));
|
2001-03-26 14:33:58 +00:00
|
|
|
}
|