2001-07-30 11:56:00 +00:00
|
|
|
/* This file is part of
|
2002-03-21 21:21:28 +00:00
|
|
|
* ======================================================
|
2001-07-30 11:56:00 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
#include "ControlFloat.h"
|
2002-07-24 15:37:17 +00:00
|
|
|
#include "BufferView.h"
|
2001-07-30 11:56:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
|
|
|
|
: ControlInset<InsetFloat, FloatParams>(lv, d)
|
2002-06-18 15:44:30 +00:00
|
|
|
{}
|
2001-07-30 11:56:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
void ControlFloat::applyParamsToInset()
|
|
|
|
{
|
|
|
|
inset()->placement(params().placement);
|
2002-07-24 15:37:17 +00:00
|
|
|
inset()->wide(params().wide);
|
2002-08-12 20:17:41 +00:00
|
|
|
bufferview()->updateInset(inset(), true);
|
2002-07-24 15:37:17 +00:00
|
|
|
|
2001-07-30 11:56:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ControlFloat::applyParamsNoInset()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
FloatParams const ControlFloat::getParams(InsetFloat const & inset)
|
|
|
|
{
|
|
|
|
return FloatParams(inset);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FloatParams::FloatParams()
|
2002-01-03 13:31:12 +00:00
|
|
|
: placement("htbp"),
|
2002-07-24 15:37:17 +00:00
|
|
|
wide(false)
|
2001-07-30 11:56:00 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
FloatParams::FloatParams(InsetFloat const & inset)
|
2002-03-21 21:21:28 +00:00
|
|
|
: placement(inset.placement()),
|
2002-07-24 15:37:17 +00:00
|
|
|
wide(inset.wide())
|
2001-07-30 11:56:00 +00:00
|
|
|
{}
|