2003-10-27 12:41:26 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
* \file InsetLine.h
|
2003-10-27 12:41:26 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author André Pönitz
|
2010-09-07 00:41:00 +00:00
|
|
|
* \author Uwe Stöhr
|
2003-10-27 12:41:26 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INSET_LINE_H
|
|
|
|
#define INSET_LINE_H
|
|
|
|
|
|
|
|
|
2010-09-07 00:41:00 +00:00
|
|
|
#include "InsetCommand.h"
|
2003-10-27 12:41:26 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2010-09-07 00:41:00 +00:00
|
|
|
class LaTeXFeatures;
|
|
|
|
|
|
|
|
class InsetLine : public InsetCommand {
|
2003-10-27 12:41:26 +00:00
|
|
|
public:
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2010-09-07 00:41:00 +00:00
|
|
|
InsetLine(Buffer * buf, InsetCommandParams const &);
|
|
|
|
///
|
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
|
|
|
/// Does nothing at the moment.
|
|
|
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
InsetCode lyxCode() const { return LINE_CODE; }
|
2010-09-07 00:41:00 +00:00
|
|
|
///
|
|
|
|
bool hasSettings() const { return true; }
|
|
|
|
///
|
|
|
|
docstring screenLabel() const;
|
|
|
|
///
|
|
|
|
static ParamInfo const & findInfo(std::string const &);
|
|
|
|
///
|
|
|
|
static std::string defaultCommand() { return "rule"; };
|
|
|
|
///
|
2010-09-15 12:43:07 +00:00
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
2010-09-07 00:41:00 +00:00
|
|
|
{ return s == "rule"; }
|
2010-09-15 12:43:07 +00:00
|
|
|
///
|
|
|
|
Dimension const dimension(BufferView const &) const;
|
|
|
|
|
2010-09-07 00:41:00 +00:00
|
|
|
private:
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2007-09-21 20:39:47 +00:00
|
|
|
void metrics(MetricsInfo &, Dimension &) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2003-10-27 12:41:26 +00:00
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int latex(odocstream &, OutputParams const &) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int plaintext(odocstream &, OutputParams const &) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2010-09-07 00:41:00 +00:00
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2010-09-07 00:41:00 +00:00
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2008-02-29 20:16:04 +00:00
|
|
|
Inset * clone() const { return new InsetLine(*this); }
|
2010-09-16 07:36:20 +00:00
|
|
|
///
|
|
|
|
mutable int height_;
|
|
|
|
mutable int offset_;
|
2003-10-27 12:41:26 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2003-10-27 12:41:26 +00:00
|
|
|
#endif // INSET_NEWLINE_H
|