diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-02-28 15:10:24 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-05-20 11:50:21 +0200 |
commit | c2ead5a142be19cb74127294641ec35da9e0f5c5 (patch) | |
tree | 4ad647ec79099d409a29e28085b576c8179eb6dc /vcl/inc | |
parent | c8406011eef27571529b2f497fdca449b9ab37bf (diff) |
jsdialog: react on button state change
Change-Id: I19b8b4f123373da1acc7e2815086a67bcdb43e76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94148
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94556
Tested-by: Jenkins
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/jsdialog/jsdialogbuilder.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 98126bfcc12f..24b1ef7808c1 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -8,6 +8,7 @@ #include <vcl/builder.hxx> #include <salvtables.hxx> #include <vcl/combobox.hxx> +#include <vcl/button.hxx> class JSDialogSender { @@ -30,6 +31,8 @@ public: bool bTakeOwnership = true) override; virtual std::unique_ptr<weld::Label> weld_label(const OString& id, bool bTakeOwnership = false) override; + virtual std::unique_ptr<weld::Button> weld_button(const OString& id, + bool bTakeOwnership = false) override; virtual std::unique_ptr<weld::Entry> weld_entry(const OString& id, bool bTakeOwnership = false) override; virtual std::unique_ptr<weld::ComboBox> weld_combo_box(const OString& id, @@ -58,6 +61,12 @@ public: BaseInstanceClass::hide(); notifyDialogState(); } + + virtual void set_sensitive(bool sensitive) override + { + BaseInstanceClass::set_sensitive(sensitive); + notifyDialogState(); + } }; class VCL_DLLPUBLIC JSLabel : public JSWidget<SalInstanceLabel, FixedText> @@ -68,6 +77,13 @@ public: virtual void set_label(const OUString& rText) override; }; +class VCL_DLLPUBLIC JSButton : public JSWidget<SalInstanceButton, ::Button> +{ +public: + JSButton(VclPtr<vcl::Window> aOwnedToplevel, ::Button* pButton, SalInstanceBuilder* pBuilder, + bool bTakeOwnership); +}; + class VCL_DLLPUBLIC JSEntry : public JSWidget<SalInstanceEntry, ::Edit> { public: |