22#include <toolkit/awt/vclxwindows.hxx>
27#include <com/sun/star/awt/KeyModifier.hpp>
28#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
29#include <com/sun/star/accessibility/AccessibleStateType.hpp>
30#include <com/sun/star/accessibility/AccessibleEventId.hpp>
31#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
51 switch ( rVclWindowEvent.
GetId() )
53 case VclEventId::RadiobuttonToggle:
59 if ( pVCLXRadioButton && pVCLXRadioButton->
getState() )
60 aNewValue <<= AccessibleStateType::CHECKED;
62 aOldValue <<= AccessibleStateType::CHECKED;
64 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
75 VCLXAccessibleTextComponent::FillAccessibleRelationSet( rRelationSet );
81 std::vector< VclPtr<RadioButton> > aGroup(pRadioButton->GetRadioButtonGroup());
84 std::vector< Reference< XInterface > > aVec;
85 aVec.reserve(aGroup.size());
86 std::transform(aGroup.begin(), aGroup.end(), std::back_inserter(aVec),
88 rRelationSet.
AddRelation( AccessibleRelation( AccessibleRelationType::MEMBER_OF,
96 VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
99 if ( pVCLXRadioButton )
101 rStateSet |= AccessibleStateType::FOCUSABLE;
103 rStateSet |= AccessibleStateType::CHECKED;
113 return "com.sun.star.comp.toolkit.AccessibleRadioButton";
119 return {
"com.sun.star.awt.AccessibleRadioButton" };
128 OExternalLockGuard aGuard(
this );
136 OExternalLockGuard aGuard(
this );
139 throw IndexOutOfBoundsException();
142 if ( pVCLXRadioButton && !pVCLXRadioButton->
getState() )
150 OExternalLockGuard aGuard(
this );
153 throw IndexOutOfBoundsException();
160 OExternalLockGuard aGuard(
this );
163 throw IndexOutOfBoundsException();
170 KeyEvent aKeyEvent = pWindow->GetActivationKey();
174 awt::KeyStroke aKeyStroke;
175 aKeyStroke.Modifiers = 0;
177 aKeyStroke.Modifiers |= awt::KeyModifier::SHIFT;
179 aKeyStroke.Modifiers |= awt::KeyModifier::MOD1;
181 aKeyStroke.Modifiers |= awt::KeyModifier::MOD2;
183 aKeyStroke.Modifiers |= awt::KeyModifier::MOD3;
186 aKeyStroke.KeyFunc =
static_cast< sal_Int16
>( aKeyCode.
GetFunction() );
187 pKeyBindingHelper->AddKeyBinding( aKeyStroke );
191 return pKeyBindingHelper;
200 OExternalLockGuard aGuard(
this );
205 if ( pVCLXRadioButton )
206 aValue <<= static_cast<sal_Int32>(pVCLXRadioButton->
getState());
214 OExternalLockGuard aGuard(
this );
216 bool bReturn =
false;
219 if ( pVCLXRadioButton )
222 OSL_VERIFY( aNumber >>=
nValue );
239 OExternalLockGuard aGuard(
this );
242 aValue <<= sal_Int32(1);
250 OExternalLockGuard aGuard(
this );
253 aValue <<= sal_Int32(0);
260 OExternalLockGuard aGuard(
this );
263 aValue <<= sal_Int32(1);
sal_Unicode GetCharCode() const
const vcl::KeyCode & GetKeyCode() const
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
void AddRelation(const css::accessibility::AccessibleRelation &rRelation)
sal_uInt16 GetCode() const
KeyFuncType GetFunction() const
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
constexpr OUStringLiteral RID_STR_ACC_ACTION_SELECT