#ifndef INSET_INFO_H
#define INSET_INFO_H
-#include "InsetCollapsable.h"
+#include "InsetCollapsible.h"
namespace lyx {
This inset has two arguments: the type and argument of the information. The
screen and latex output is the content of the information. An InsetInfo can
have type "shortcuts", "shortcut", "lyxrc", "package", "textclass", "menu",
-or "buffer". Arguments and outputs vary by type.
+"buffer" or "vcs". Arguments and outputs vary by type.
shortcuts: argument of this type of InsetInfo is the name of the LFUN such as
"math-insert \alpha". The syntax is the same as what is used in the bind
filename, path, and textclass of this buffer.
lyxinfo: argument must (presently) be "version". This inset outputs information
- about the version of LyX currently in use.
+ about the version of LyX currently in use.
+
+vcs: argument can be one of "revision", "tree-revision", "author", "time", "date".
+ This insets outputs revision control information, if available.
There is currently no GUI, no menu entry for this inset. A user can define a
shortcut for "info-insert" (e.g. C-S-I), and
*/
-class InsetInfo : public InsetCollapsable {
+class InsetInfo : public InsetCollapsible {
public:
enum info_type {
UNKNOWN_INFO, // Invalid type
MENU_INFO, // Which menu item is used for certain function
ICON_INFO, // which toolbar icon is used for certain function
BUFFER_INFO, // Buffer related information
- LYX_INFO // LyX version information
+ LYX_INFO, // LyX version information
+ VCS_INFO, // Version control information
};
///
///
bool validateModifyArgument(docstring const & argument) const;
///
+ std::vector<std::pair<std::string,docstring>> getArguments(std::string const &) const;
+ ///
bool showInsetDialog(BufferView * bv) const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
+ /// Force inset into LTR environment if surroundings are RTL
+ bool forceLTR() const;
///
void setInfo(std::string const & info);
///
///
virtual Inset * clone() const { return new InsetInfo(*this); }
///
- void error(std::string const & err);
+ void error(docstring const & err, Language const *);
///
- void setText(docstring const & str);
+ void info(docstring const & err, Language const *);
+ ///
+ void setText(docstring const & str, Language const *);
// make sure that the other version of setText is still available.
- using InsetCollapsable::setText;
+ using InsetCollapsible::setText;
///
bool initialized_;
///
info_type type_;
///
std::string name_;
+ ///
+ bool force_ltr_;
};