X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetcommand.h;h=449d0f19ed2e01e35decdb75918c5829dbd68df3;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=e335afc64e9c678d963f6551250ff8be85581fba;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=lyx.git diff --git a/src/insets/insetcommand.h b/src/insets/insetcommand.h index e335afc64e..449d0f19ed 100644 --- a/src/insets/insetcommand.h +++ b/src/insets/insetcommand.h @@ -1,16 +1,16 @@ // -*- C++ -*- /* This file is part of* - * ====================================================== + * ====================================================== * * LyX, The Document Processor * - * Copyright (C) 1995 Matthias Ettrich - * Copyright (C) 1996-1998 The LyX Team. + * Copyright 1995 Matthias Ettrich + * Copyright 1995-2000 The LyX Team. * - *======================================================*/ + * ====================================================== */ -#ifndef _INSET_LATEXCOMMAND_H -#define _INSET_LATEXCOMMAND_H +#ifndef INSET_LATEXCOMMAND_H +#define INSET_LATEXCOMMAND_H #ifdef __GNUG__ #pragma interface @@ -30,34 +30,34 @@ public: /// InsetCommand(); /// - InsetCommand(LString const & name, LString const & arg = LString(), - LString const & opt = LString()); + explicit + InsetCommand(string const & name, string const & arg = string(), + string const & opt = string()); /// - ~InsetCommand(); + int ascent(Painter &, LyXFont const &) const; /// - int Ascent(LyXFont const &font) const; + int descent(Painter &, LyXFont const &) const; /// - int Descent(LyXFont const &font) const; + int width(Painter &, LyXFont const &) const; /// - int Width(LyXFont const &font) const; + void draw(Painter &, LyXFont const &, int baseline, float & x) const; /// - void Draw(LyXFont, LyXScreen &scr, int baseline, float &x); - /// - void Write(FILE *file); + void Write(std::ostream &) const; /// Parse the command. - void scanCommand(LString const &cmd); + void scanCommand(string const & cmd); /// Will not be used when lyxf3 - void Read(LyXLex &lex); + void Read(LyXLex & lex); /// - virtual int Latex(FILE *file, signed char fragile); + virtual int Latex(std::ostream &, + bool fragile, bool free_spc) const; /// - virtual int Latex(LString &file, signed char fragile); + int Ascii(std::ostream &) const; /// - virtual int Linuxdoc(LString &file); + virtual int Linuxdoc(std::ostream &) const; /// - virtual int DocBook(LString &file); + virtual int DocBook(std::ostream &) const; /// - Inset* Clone(); + Inset * Clone() const; /// Inset::Code LyxCode() const { @@ -70,44 +70,44 @@ public: confusion with lyxinset::getLabel(int), but I've seen that it wasn't. I hope you never confuse again both methods. (ale) */ - virtual LString getScreenLabel() const + virtual string getScreenLabel() const { return getCommand(); } /// Build the complete LaTeX command - LString getCommand() const; + string getCommand() const; /// - LString const &getCmdName() const { + string const & getCmdName() const { return command; } /// - LString const &getOptions() const { + string const & getOptions() const { return options; } /// - LString const &getContents() const { + string const & getContents() const { return contents; } /// - void setCmdName(LString const & n) { + void setCmdName(string const & n) { command = n; } /// - void setOptions(LString const & o) { + void setOptions(string const & o) { options = o; } /// - virtual void setContents(LString const & c) { + virtual void setContents(string const & c) { contents = c; } protected: /// - LString command; + string command; /// - LString options; + string options; /// - LString contents; + string contents; }; #endif