2001-07-30 11:56:00 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file ControlFloat.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-07-30 11:56:00 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author unknown
|
2001-07-30 11:56:00 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* Full author contact details are available in file CREDITS
|
2001-07-30 11:56:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLFLOAT_H
|
|
|
|
#define CONTROLFLOAT_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "ControlInset.h"
|
|
|
|
|
2002-08-12 20:17:41 +00:00
|
|
|
// needed to instatiate inset->hideDialog in ControlInset
|
|
|
|
#include "insets/insetfloat.h"
|
|
|
|
|
2001-07-30 11:56:00 +00:00
|
|
|
class InsetFloat;
|
|
|
|
|
|
|
|
///
|
|
|
|
struct FloatParams {
|
|
|
|
///
|
|
|
|
FloatParams();
|
|
|
|
///
|
|
|
|
FloatParams(InsetFloat const &);
|
|
|
|
///
|
|
|
|
string placement;
|
2002-01-03 13:31:12 +00:00
|
|
|
///
|
2002-07-24 15:37:17 +00:00
|
|
|
bool wide;
|
2001-07-30 11:56:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
2002-03-21 21:21:28 +00:00
|
|
|
bool operator==(FloatParams const & p1, FloatParams const & p2)
|
2001-07-30 11:56:00 +00:00
|
|
|
{
|
2002-07-24 15:37:17 +00:00
|
|
|
return p1.placement == p2.placement && p1.wide == p2.wide;
|
2001-07-30 11:56:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-30 13:35:08 +00:00
|
|
|
inline
|
2002-03-21 21:21:28 +00:00
|
|
|
bool operator!=(FloatParams const & p1, FloatParams const & p2)
|
2001-07-30 13:35:08 +00:00
|
|
|
{
|
|
|
|
return !(p1 == p2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-30 11:56:00 +00:00
|
|
|
/** A controller for Minipage dialogs.
|
|
|
|
*/
|
|
|
|
class ControlFloat : public ControlInset<InsetFloat, FloatParams> {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
ControlFloat(LyXView &, Dialogs &);
|
|
|
|
private:
|
|
|
|
/// Dispatch the changed parameters to the kernel.
|
|
|
|
virtual void applyParamsToInset();
|
2002-03-21 21:21:28 +00:00
|
|
|
///
|
2001-07-30 11:56:00 +00:00
|
|
|
virtual void applyParamsNoInset();
|
|
|
|
/// get the parameters from the string passed to createInset.
|
|
|
|
virtual FloatParams const getParams(string const &)
|
|
|
|
{ return FloatParams(); }
|
|
|
|
/// get the parameters from the inset passed to showInset.
|
|
|
|
virtual FloatParams const getParams(InsetFloat const &);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|