InsetCommandParams const & params() const { return p_; }
/// FIXME Remove
docstring const getFirstNonOptParam() const { return p_.getFirstNonOptParam(); }
- /// Whether the button label should be recomputed.
- void refresh() { updateButtonLabel_ = true; }
///
void setParam(std::string const & name, docstring const & value)
{
- updateButtonLabel_ = true;
p_[name] = value;
}
///
/// Whether this is a command this inset can represent.
/// Not implemented here. Must be implemented in derived class.
static bool isCompatibleCommand(std::string const & cmd);
+ /// update label and references.
+ virtual void updateCommand(docstring const &, bool) {};
+ ///
+ virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
protected:
///
///
std::string const & getCmdName() const { return p_.getCmdName(); }
///
- void setCmdName(std::string const & n)
- {
- updateButtonLabel_ = true;
- p_.setCmdName(n);
- }
+ void setCmdName(std::string const & n) { p_.setCmdName(n); }
///
void setParams(InsetCommandParams const &);
/// This should provide the text for the button
/// changes color when mouse enters/leaves this inset
bool mouse_hover_;
///
- mutable bool updateButtonLabel_;
- ///
mutable RenderButton button_;
};