/* This file is part of * ====================================================== * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich * Copyright 1995-1999 The LyX Team. * * ======================================================*/ #include #ifdef __GNUG__ #pragma implementation #endif #include "insetlabel.h" /* Label. Used to insert a label automatically */ InsetLabel::InsetLabel(string const & cmd) { scanCommand(cmd); } InsetLabel::~InsetLabel() { } Inset* InsetLabel::Clone() { InsetLabel *result = new InsetLabel(getCommand()); return result; } int InsetLabel::GetNumberOfLabels() const { return 1; } string InsetLabel::getLabel(int) const { return contents; } int InsetLabel::Latex(FILE *file, signed char /*fragile*/) { fprintf(file, "%s", escape(getCommand()).c_str()); return 0; } int InsetLabel::Latex(string &file, signed char /*fragile*/) { file += escape(getCommand()); return 0; } int InsetLabel::Linuxdoc(string &file) { file += "