diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2023-03-03 02:16:08 +0530 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-03-04 19:51:58 +0000 |
commit | 542cef171ceed4577c1c71735726b1e7c7c9c8c9 (patch) | |
tree | 561244e96e5d90b514d328230c9c7c5a301fffac /vcl/source/app | |
parent | e1fb2dd31dd17752c1573f341876bde7c7f12142 (diff) |
JSDialog: implemented jsdialog support for the toggle buttons
Change-Id: I21408f7344f7e100373c368036f81503302b93ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148240
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f8dcfba0a16b..a5ac05271b51 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3154,59 +3154,6 @@ IMPL_LINK_NOARG(SalInstanceRadioButton, ToggleHdl, ::RadioButton&, void) signal_toggled(); } -namespace -{ -class SalInstanceToggleButton : public SalInstanceButton, public virtual weld::ToggleButton -{ -private: - VclPtr<PushButton> m_xToggleButton; - - DECL_LINK(ToggleListener, VclWindowEvent&, void); - -public: - SalInstanceToggleButton(PushButton* pButton, SalInstanceBuilder* pBuilder, bool bTakeOwnership) - : SalInstanceButton(pButton, pBuilder, bTakeOwnership) - , m_xToggleButton(pButton) - { - } - - virtual void connect_toggled(const Link<Toggleable&, void>& rLink) override - { - assert(!m_aToggleHdl.IsSet()); - m_xToggleButton->AddEventListener(LINK(this, SalInstanceToggleButton, ToggleListener)); - weld::ToggleButton::connect_toggled(rLink); - } - - virtual void set_active(bool active) override - { - disable_notify_events(); - m_xToggleButton->Check(active); - enable_notify_events(); - } - - virtual bool get_active() const override { return m_xToggleButton->IsChecked(); } - - virtual void set_inconsistent(bool inconsistent) override - { - disable_notify_events(); - m_xToggleButton->SetState(inconsistent ? TRISTATE_INDET : TRISTATE_FALSE); - enable_notify_events(); - } - - virtual bool get_inconsistent() const override - { - return m_xToggleButton->GetState() == TRISTATE_INDET; - } - - virtual ~SalInstanceToggleButton() override - { - if (m_aToggleHdl.IsSet()) - m_xToggleButton->RemoveEventListener( - LINK(this, SalInstanceToggleButton, ToggleListener)); - } -}; -} - IMPL_LINK(SalInstanceToggleButton, ToggleListener, VclWindowEvent&, rEvent, void) { if (notify_events_disabled()) |