summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-06 14:41:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-06 21:21:00 +0200
commit229ae93385e28e0dee407d9386809fa0595578bc (patch)
treef5ddacc0bb74eb08ea5c0ba464a0c8a07b651f93 /include
parent7223d7312368bf9c917ef055830a3217eb49f9fd (diff)
Resolves: tdf#132581 allow disabling the auto-group RadioButton feature
the older way of doing things is to dig around contiguous radiobuttons to see what is part of the group, while the contemporary one is to explicitly use group() to set the members. A problem of the legacy way of doing it is that the results during setup and teardown of a collection of radiobuttons can be misleading. Change-Id: I6c590d0fb6fc6db3f5e5ba4397a62930a5c8f3f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93567 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/button.hxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 14c936f0ddee..d9e2106ea6d5 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -283,6 +283,7 @@ private:
bool mbChecked;
bool mbRadioCheck;
bool mbStateChanged;
+ bool mbUsesExplicitGroup;
Link<RadioButton&,void> maToggleHdl;
SAL_DLLPRIVATE void ImplInitRadioButtonData();
SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
@@ -317,7 +318,14 @@ protected:
void ImplAdjustNWFSizes() override;
public:
- explicit RadioButton( vcl::Window* pParent, WinBits nWinStyle = 0 );
+ /*
+ bUsesExplicitGroup of true means that group() is used to set what radiobuttons are part of a group
+ while false means that contiguous radiobuttons are considered part of a group where WB_GROUP designates
+ the start of the group and all contiguous radiobuttons without WB_GROUP set form the rest of the group.
+
+ true is fairly straightforward, false leads to trick situations and is the legacy case
+ */
+ explicit RadioButton(vcl::Window* pParent, bool bUsesExplicitGroup = true, WinBits nWinStyle = 0);
virtual ~RadioButton() override;
virtual void dispose() override;