2007-10-13 10:23:16 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
|
|
|
|
* \file InsetCode.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Alejandro Aguilar Sierra
|
|
|
|
|
* \author J<EFBFBD>rgen Vigna
|
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author Matthias Ettrich
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef INSETCODE_H
|
|
|
|
|
#define INSETCODE_H
|
|
|
|
|
|
2007-10-13 12:50:18 +00:00
|
|
|
|
#include <string>
|
|
|
|
|
|
2007-10-13 10:23:16 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
/** This is not quite the correct place for this enum. I think
|
|
|
|
|
the correct would be to let each subclass of Inset declare
|
|
|
|
|
its own enum code. Actually the notion of an InsetCode
|
|
|
|
|
should be avoided, but I am not sure how this could be done
|
|
|
|
|
in a cleaner way. */
|
|
|
|
|
enum InsetCode {
|
|
|
|
|
///
|
|
|
|
|
NO_CODE, // 0
|
|
|
|
|
///
|
|
|
|
|
TOC_CODE, // do these insets really need a code? (ale)
|
|
|
|
|
///
|
|
|
|
|
QUOTE_CODE,
|
|
|
|
|
///
|
|
|
|
|
MARK_CODE,
|
|
|
|
|
///
|
|
|
|
|
REF_CODE,
|
|
|
|
|
///
|
2007-10-13 19:06:09 +00:00
|
|
|
|
HYPERLINK_CODE, // 5
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
SEPARATOR_CODE,
|
|
|
|
|
///
|
|
|
|
|
ENDING_CODE,
|
|
|
|
|
///
|
|
|
|
|
LABEL_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
NOTE_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
ACCENT_CODE, // 10
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
MATH_CODE,
|
|
|
|
|
///
|
|
|
|
|
INDEX_CODE,
|
|
|
|
|
///
|
|
|
|
|
INCLUDE_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
GRAPHICS_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
BIBITEM_CODE, // 15
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
BIBTEX_CODE,
|
|
|
|
|
///
|
|
|
|
|
TEXT_CODE,
|
|
|
|
|
///
|
|
|
|
|
ERT_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
FOOT_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
MARGIN_CODE, // 20
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
FLOAT_CODE,
|
|
|
|
|
///
|
|
|
|
|
WRAP_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
SPACE_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
SPECIALCHAR_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
TABULAR_CODE, // 25
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
EXTERNAL_CODE,
|
|
|
|
|
///
|
|
|
|
|
CAPTION_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
MATHMACRO_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
CITE_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
FLOAT_LIST_CODE, // 30
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
INDEX_PRINT_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
OPTARG_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
ENVIRONMENT_CODE,
|
|
|
|
|
///
|
|
|
|
|
HFILL_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
NEWLINE_CODE, // 35
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
LINE_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
BRANCH_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
BOX_CODE,
|
|
|
|
|
///
|
|
|
|
|
FLEX_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
VSPACE_CODE, // 40
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
MATHMACROARG_CODE,
|
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
NOMENCL_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
NOMENCL_PRINT_CODE,
|
|
|
|
|
///
|
2007-11-23 02:10:00 +00:00
|
|
|
|
NEWPAGE_CODE,
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
LISTINGS_CODE, // 45
|
2007-10-13 10:23:16 +00:00
|
|
|
|
///
|
|
|
|
|
INFO_CODE,
|
2007-10-16 16:48:21 +00:00
|
|
|
|
///
|
2008-02-29 19:32:44 +00:00
|
|
|
|
COLLAPSABLE_CODE,
|
|
|
|
|
#if 0
|
|
|
|
|
///
|
|
|
|
|
THEOREM_CODE,
|
|
|
|
|
#endif
|
2007-10-13 10:23:16 +00:00
|
|
|
|
};
|
|
|
|
|
|
2007-10-13 12:50:18 +00:00
|
|
|
|
/** returns the InsetCode corresponding to the \c name.
|
2007-10-16 16:48:21 +00:00
|
|
|
|
* Eg, insetCode("branch") == BRANCH_CODE
|
|
|
|
|
* Implemented in 'Inset.cpp'.
|
2007-10-13 12:50:18 +00:00
|
|
|
|
*/
|
|
|
|
|
InsetCode insetCode(std::string const & name);
|
2007-10-16 16:48:21 +00:00
|
|
|
|
/// the other way
|
|
|
|
|
std::string insetName(InsetCode);
|
2007-10-13 12:50:18 +00:00
|
|
|
|
|
2007-10-13 10:23:16 +00:00
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
|
|
#endif
|