lyx_mirror/src/frontends/controllers/ControlFloat.C

57 lines
1006 B
C++
Raw Normal View History

/* This file is part of
* ======================================================
*
* LyX, The Document Processor
*
* Copyright 2001 The LyX Team.
*
* ======================================================
*
*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include "ControlFloat.h"
#include "BufferView.h"
#include "buffer.h"
ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
: ControlInset<InsetFloat, FloatParams>(lv, d)
{}
void ControlFloat::applyParamsToInset()
{
inset()->placement(params().placement);
inset()->wide(params().wide, bufferview()->buffer()->params);
bufferview()->updateInset(inset(), true);
}
void ControlFloat::applyParamsNoInset()
{}
FloatParams const ControlFloat::getParams(InsetFloat const & inset)
{
return FloatParams(inset);
}
FloatParams::FloatParams()
: placement("htbp"),
wide(false)
{}
FloatParams::FloatParams(InsetFloat const & inset)
: placement(inset.placement()),
wide(inset.wide())
{}