26#include <com/sun/star/awt/KeyModifier.hpp>
27#include <com/sun/star/accessibility/AccessibleStateType.hpp>
28#include <com/sun/star/accessibility/AccessibleEventId.hpp>
29#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
49 switch ( rVclWindowEvent.
GetId() )
51 case VclEventId::PushbuttonToggle:
58 aNewValue <<= AccessibleStateType::CHECKED;
60 aOldValue <<= AccessibleStateType::CHECKED;
62 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
73 VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
79 rStateSet |= AccessibleStateType::FOCUSABLE;
82 rStateSet |= AccessibleStateType::CHECKED;
84 if ( pButton->IsPressed() )
85 rStateSet |= AccessibleStateType::PRESSED;
88 if( pButton->GetType() == WindowType::MENUBUTTON )
90 rStateSet |= AccessibleStateType::EXPANDABLE;
94 rStateSet |= AccessibleStateType::DEFAULT;
104 return "com.sun.star.comp.toolkit.AccessibleButton";
110 return {
"com.sun.star.awt.AccessibleButton" };
119 OUString
aName( VCLXAccessibleTextComponent::getAccessibleName() );
155 OExternalLockGuard aGuard(
this );
163 OExternalLockGuard aGuard(
this );
166 throw IndexOutOfBoundsException();
178 OExternalLockGuard aGuard(
this );
181 throw IndexOutOfBoundsException();
189 OExternalLockGuard aGuard(
this );
192 throw IndexOutOfBoundsException();
199 KeyEvent aKeyEvent = pWindow->GetActivationKey();
203 awt::KeyStroke aKeyStroke;
204 aKeyStroke.Modifiers = 0;
206 aKeyStroke.Modifiers |= awt::KeyModifier::SHIFT;
208 aKeyStroke.Modifiers |= awt::KeyModifier::MOD1;
210 aKeyStroke.Modifiers |= awt::KeyModifier::MOD2;
212 aKeyStroke.Modifiers |= awt::KeyModifier::MOD3;
215 aKeyStroke.KeyFunc =
static_cast< sal_Int16
>( aKeyCode.
GetFunction() );
216 pKeyBindingHelper->AddKeyBinding( aKeyStroke );
220 return pKeyBindingHelper;
229 OExternalLockGuard aGuard(
this );
235 aValue <<= static_cast<sal_Int32>(pButton->IsPressed());
243 OExternalLockGuard aGuard(
this );
245 bool bReturn =
false;
251 OSL_VERIFY( aNumber >>=
nValue );
258 pButton->SetPressed(
nValue == 1 );
268 OExternalLockGuard aGuard(
this );
271 aValue <<= sal_Int32(1);
279 OExternalLockGuard aGuard(
this );
282 aValue <<= sal_Int32(0);
289 OExternalLockGuard aGuard(
this );
292 aValue <<= sal_Int32(1);
OUString AccResId(TranslateId aId)
sal_Unicode GetCharCode() const
const vcl::KeyCode & GetKeyCode() const
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
sal_uInt16 GetCode() const
KeyFuncType GetFunction() const
constexpr OUStringLiteral RID_STR_ACC_ACTION_CLICK
WinBits const WB_DEFBUTTON