mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-16 16:18:22 +00:00
d5a5fbb8ee
* New TOC "math-macro". This means that math macros can now be accessed in the
outline pane in their order of appearance or in alphabetical order, and can be
searched using the filter.
* Lists of floats now show subfloats deeper in the navigation menu
* The arbitrary 30 element cut-off after which nothing is shown except "Open
Navigator..." is removed. Menus now have no limit in size, so Qt may display
them scrollable. In exchange, we always show "Open outliner..." at the
beginning. I tested for performance issues with a rather complex document and
it is fine; but this does not exclude corner cases with lots of TOC entries of
a certain kind. If necessary, populating the navigation sub-menu should be
delayed like the main menu.
* Elements that do not contribute to the output (e.g. in a note, a disabled
branch) are now preceded with a symbol indicating this status. (The machinery
was already there; I wonder why it was not implemented already.) I have chosen
U+274E NEGATIVE SQUARED CROSS MARK.
* Fix the contextual menus in the outliner (bug introduced at 94e992c5
).
* Toc item now move to the caption when present, but first center on the float,
to prevent the situation where the caption is at the top of the screen and the
contents of the float is off-screen above the caption.
(Internally, the action of the toc items can now be customised)
* Fix the LyXHTML output. Disabled captions no longer appear in the list of
figures.
149 lines
3.3 KiB
C++
149 lines
3.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file InsetIndex.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Lars Gullik Bjønnes
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef INSET_INDEX_H
|
|
#define INSET_INDEX_H
|
|
|
|
|
|
#include "InsetCollapsable.h"
|
|
#include "InsetCommand.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
class InsetIndexParams {
|
|
public:
|
|
///
|
|
explicit InsetIndexParams(docstring const & b = docstring())
|
|
: index(b) {}
|
|
///
|
|
void write(std::ostream & os) const;
|
|
///
|
|
void read(Lexer & lex);
|
|
///
|
|
docstring index;
|
|
};
|
|
|
|
|
|
/** Used to insert index labels
|
|
*/
|
|
class InsetIndex : public InsetCollapsable {
|
|
public:
|
|
///
|
|
InsetIndex(Buffer *, InsetIndexParams const &);
|
|
///
|
|
static std::string params2string(InsetIndexParams const &);
|
|
///
|
|
static void string2params(std::string const &, InsetIndexParams &);
|
|
private:
|
|
///
|
|
bool hasSettings() const;
|
|
///
|
|
InsetCode lyxCode() const { return INDEX_CODE; }
|
|
///
|
|
docstring layoutName() const { return from_ascii("Index"); }
|
|
///
|
|
ColorCode labelColor() const;
|
|
///
|
|
void write(std::ostream & os) const;
|
|
///
|
|
void read(Lexer & lex);
|
|
///
|
|
int docbook(odocstream &, OutputParams const &) const;
|
|
///
|
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
|
///
|
|
void latex(otexstream &, OutputParams const &) const;
|
|
///
|
|
bool showInsetDialog(BufferView *) const;
|
|
///
|
|
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
|
|
///
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
|
/// should paragraph indendation be omitted in any case?
|
|
bool neverIndent() const { return true; }
|
|
///
|
|
void addToToc(DocIterator const & di, bool output_active,
|
|
UpdateType utype) const;
|
|
///
|
|
docstring toolTip(BufferView const & bv, int x, int y) const;
|
|
///
|
|
docstring const buttonLabel(BufferView const & bv) const;
|
|
/// Updates needed features for this inset.
|
|
void validate(LaTeXFeatures & features) const;
|
|
///
|
|
std::string contextMenuName() const;
|
|
///
|
|
Inset * clone() const { return new InsetIndex(*this); }
|
|
|
|
///
|
|
friend class InsetIndexParams;
|
|
///
|
|
InsetIndexParams params_;
|
|
};
|
|
|
|
|
|
class InsetPrintIndex : public InsetCommand {
|
|
public:
|
|
///
|
|
InsetPrintIndex(Buffer * buf, InsetCommandParams const &);
|
|
|
|
/// \name Public functions inherited from Inset class
|
|
//@{
|
|
///
|
|
InsetCode lyxCode() const { return INDEX_PRINT_CODE; }
|
|
///
|
|
void latex(otexstream &, OutputParams const &) const;
|
|
///
|
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
|
///
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
|
///
|
|
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
|
|
///
|
|
std::string contextMenuName() const;
|
|
/// Updates needed features for this inset.
|
|
void validate(LaTeXFeatures & features) const;
|
|
///
|
|
bool hasSettings() const;
|
|
///
|
|
DisplayType display() const { return AlignCenter; }
|
|
//@}
|
|
|
|
/// \name Static public methods obligated for InsetCommand derived classes
|
|
//@{
|
|
///
|
|
static ParamInfo const & findInfo(std::string const &);
|
|
///
|
|
static std::string defaultCommand() { return "printindex"; }
|
|
///
|
|
static bool isCompatibleCommand(std::string const & s);
|
|
//@}
|
|
|
|
private:
|
|
/// \name Private functions inherited from Inset class
|
|
//@{
|
|
///
|
|
Inset * clone() const { return new InsetPrintIndex(*this); }
|
|
//@}
|
|
|
|
/// \name Private functions inherited from InsetCommand class
|
|
//@{
|
|
///
|
|
docstring screenLabel() const;
|
|
//@}
|
|
};
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
#endif
|