+ ///
+ void setParams(InsetCommandParams const &);
+ /// This should provide the text for the button
+ virtual docstring const getScreenLabel(Buffer const &) const = 0;
+
+private:
+ ///
+ InsetCommandParams p_;
+ std::string mailer_name_;
+ /// changes color when mouse enters/leaves this inset
+ bool mouse_hover_;
+ mutable bool updateButtonLabel_;
+ mutable RenderButton button_;
+};
+
+
+class InsetCommandMailer : public MailInset {
+public:
+ ///
+ InsetCommandMailer(std::string const & name, InsetCommand & inset);
+ ///
+ virtual InsetBase & inset() const { return inset_; }
+ ///
+ virtual std::string const & name() const { return name_; }
+ ///
+ virtual std::string const inset2string(Buffer const &) const;
+ ///
+ static void string2params(std::string const &, std::string const & name,
+ InsetCommandParams &);
+ ///
+ static std::string const params2string(std::string const & name,
+ InsetCommandParams const &);
+private:
+ ///
+ std::string const name_;
+ ///
+ InsetCommand & inset_;