1999-09-27 18:44:28 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
|
* \file InsetLabel.h
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2002-03-21 17:09:55 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-25 14:26:13 +00:00
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
1999-11-04 01:40:20 +00:00
|
|
|
|
#ifndef INSET_LABEL_H
|
|
|
|
|
#define INSET_LABEL_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
|
#include "InsetCommand.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
1999-11-24 22:14:46 +00:00
|
|
|
|
class InsetLabel : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2003-05-26 09:13:55 +00:00
|
|
|
|
InsetLabel(InsetCommandParams const &);
|
2008-03-02 18:14:12 +00:00
|
|
|
|
|
|
|
|
|
/// verify label and update references.
|
|
|
|
|
/**
|
2008-03-03 17:58:26 +00:00
|
|
|
|
* Overloaded from Inset::initView.
|
2008-03-02 18:14:12 +00:00
|
|
|
|
**/
|
2008-03-03 17:58:26 +00:00
|
|
|
|
void initView();
|
2008-03-02 18:14:12 +00:00
|
|
|
|
|
2003-05-26 09:13:55 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
docstring screenLabel() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
EDITABLE editable() const { return IS_EDITABLE; }
|
2000-05-19 16:46:01 +00:00
|
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
|
InsetCode lyxCode() const { return LABEL_CODE; }
|
2000-08-04 13:12:30 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
int latex(odocstream &, OutputParams const &) const;
|
2000-03-06 02:42:40 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
int plaintext(odocstream &, OutputParams const &) const;
|
2000-04-24 20:58:23 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2007-10-25 04:13:56 +00:00
|
|
|
|
///
|
2008-02-23 22:01:02 +00:00
|
|
|
|
static ParamInfo const & findInfo(std::string const &);
|
2007-10-25 04:13:56 +00:00
|
|
|
|
///
|
|
|
|
|
static std::string defaultCommand() { return "label"; };
|
|
|
|
|
///
|
|
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
|
|
|
|
{ return s == "label"; }
|
2008-02-27 15:23:22 +00:00
|
|
|
|
///
|
2008-03-02 15:27:35 +00:00
|
|
|
|
void updateLabels(ParIterator const & it);
|
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
void addToToc(ParConstIterator const &) const;
|
2008-03-03 09:35:26 +00:00
|
|
|
|
///
|
2008-03-04 06:41:47 +00:00
|
|
|
|
void updateCommand(docstring const & new_label, bool updaterefs = true);
|
2003-10-17 18:01:15 +00:00
|
|
|
|
protected:
|
2008-02-23 22:01:02 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
2004-11-23 23:04:52 +00:00
|
|
|
|
private:
|
2008-02-23 22:01:02 +00:00
|
|
|
|
///
|
2008-02-29 20:03:58 +00:00
|
|
|
|
Inset * clone() const { return new InsetLabel(*this); }
|
2008-03-03 13:31:44 +00:00
|
|
|
|
///
|
|
|
|
|
docstring screen_label_;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
#endif
|