* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
*
* Full author contact details are available in file CREDITS.
*/
{
public:
///
- InsetCommand(InsetCommandParams const &, std::string const & mailer_name);
+ InsetCommand(Buffer *, InsetCommandParams const &,
+ std::string const & mailer_name);
///
~InsetCommand();
docstring const getFirstNonOptParam() const { return p_.getFirstNonOptParam(); }
/// update label and references.
virtual void updateCommand(docstring const &, bool) {}
+ ///
+ virtual InsetCommand * asInsetCommand() { return this; }
+ ///
+ virtual InsetCommand const * asInsetCommand() const { return this; }
+ /// whether to include this inset in the strings generated for the TOC
+ virtual bool isInToc() const { return false; }
protected:
///
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
- docstring const getCommand() const { return p_.getCommand(); }
+ bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+ ///
+ docstring const getCommand(OutputParams & rp) const { return p_.getCommand(rp); }
///
std::string const & getCmdName() const { return p_.getCmdName(); }
///
///
InsetCode lyxCode() const { return NO_CODE; }
///
- void edit(Cursor & cur, bool front,
- EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
- ///
RenderButton & button() const { return button_; }
///
bool setMouseHover(bool mouse_hover);
static bool isCompatibleCommand(std::string const & cmd);
///
docstring contextMenu(BufferView const & bv, int x, int y) const;
- ///
- bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
/// This should provide the text for the button
virtual docstring screenLabel() const = 0;
-
-private:
+ ///
+ bool showInsetDialog(BufferView * bv) const;
///
InsetCommandParams p_;
///
mutable RenderButton button_;
};
+/// Decode InsetCommand considering Inset name and data.
+bool decodeInsetParam(std::string const & name, std::string & data,
+ Buffer const & buffer);
} // namespace lyx