lyx_mirror/src/insets/insetcommandparams.h
Angus Leeming 5e802bab4d Change the LyX file format, adding a "preview" flag to Include insets.
Document this change in a new file FORMAT.
Enable the user to toggle preview status by modifying the Include dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4849 a592a061-630c-0410-9148-cb99ea01b6c8
2002-08-02 18:25:25 +00:00

85 lines
1.6 KiB
C++

// -*- C++ -*-
/* This file is part of*
* ======================================================
*
* LyX, The Document Processor
*
* Copyright 2002-2001 The LyX Team.
*
* ====================================================== */
#ifndef INSETCOMMANDPARAMS_H
#define INSETCOMMANDPARAMS_H
#ifdef __GNUG__
#pragma interface
#endif
#include <config.h>
#include "LString.h"
#include <iosfwd>
class LyXLex;
class InsetCommandParams {
public:
///
InsetCommandParams();
///
explicit
InsetCommandParams(string const & n,
string const & c = string(),
string const & o = string());
///
void read(LyXLex &);
/// Parse the command
void scanCommand(string const &);
///
void write(std::ostream &) const;
/// Build the complete LaTeX command
string const getCommand() const;
///
string const & getCmdName() const { return cmdname; }
///
string const & getOptions() const { return options; }
///
string const & getContents() const { return contents; }
///
void setCmdName(string const & n) { cmdname = n; }
///
void setOptions(string const & o) { options = o; }
///
void setContents(string const & c) { contents = c; }
///
string const getAsString() const;
///
void setFromString(string const &);
///
bool preview() const { return preview_; }
///
void preview(bool p) { preview_ = p; }
private:
///
string cmdname;
///
string contents;
///
string options;
///
bool preview_;
};
///
bool operator==(InsetCommandParams const &,
InsetCommandParams const &);
///
bool operator!=(InsetCommandParams const &,
InsetCommandParams const &);
#endif