1*3e0f1122SAndre Fischer /**************************************************************
2*3e0f1122SAndre Fischer  *
3*3e0f1122SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
4*3e0f1122SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
5*3e0f1122SAndre Fischer  * distributed with this work for additional information
6*3e0f1122SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
7*3e0f1122SAndre Fischer  * to you under the Apache License, Version 2.0 (the
8*3e0f1122SAndre Fischer  * "License"); you may not use this file except in compliance
9*3e0f1122SAndre Fischer  * with the License.  You may obtain a copy of the License at
10*3e0f1122SAndre Fischer  *
11*3e0f1122SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
12*3e0f1122SAndre Fischer  *
13*3e0f1122SAndre Fischer  * Unless required by applicable law or agreed to in writing,
14*3e0f1122SAndre Fischer  * software distributed under the License is distributed on an
15*3e0f1122SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3e0f1122SAndre Fischer  * KIND, either express or implied.  See the License for the
17*3e0f1122SAndre Fischer  * specific language governing permissions and limitations
18*3e0f1122SAndre Fischer  * under the License.
19*3e0f1122SAndre Fischer  *
20*3e0f1122SAndre Fischer  *************************************************************/
21*3e0f1122SAndre Fischer 
22*3e0f1122SAndre Fischer #include "precompiled_sfx2.hxx"
23*3e0f1122SAndre Fischer 
24*3e0f1122SAndre Fischer #include "AccessibleTitleBar.hxx"
25*3e0f1122SAndre Fischer #include "Accessible.hxx"
26*3e0f1122SAndre Fischer #include "TitleBar.hxx"
27*3e0f1122SAndre Fischer 
28*3e0f1122SAndre Fischer #include <com/sun/star/accessibility/AccessibleStateType.hpp>
29*3e0f1122SAndre Fischer #include <unotools/accessiblestatesethelper.hxx>
30*3e0f1122SAndre Fischer 
31*3e0f1122SAndre Fischer using namespace css;
32*3e0f1122SAndre Fischer using namespace cssu;
33*3e0f1122SAndre Fischer 
34*3e0f1122SAndre Fischer namespace sfx2 { namespace sidebar {
35*3e0f1122SAndre Fischer 
36*3e0f1122SAndre Fischer 
Create(TitleBar & rTitleBar)37*3e0f1122SAndre Fischer Reference<accessibility::XAccessible> AccessibleTitleBar::Create (TitleBar& rTitleBar)
38*3e0f1122SAndre Fischer {
39*3e0f1122SAndre Fischer     rTitleBar.GetComponentInterface(sal_True);
40*3e0f1122SAndre Fischer     VCLXWindow* pWindow = rTitleBar.GetWindowPeer();
41*3e0f1122SAndre Fischer     if (pWindow != NULL)
42*3e0f1122SAndre Fischer         return new Accessible(new AccessibleTitleBar(pWindow));
43*3e0f1122SAndre Fischer     else
44*3e0f1122SAndre Fischer         return NULL;
45*3e0f1122SAndre Fischer }
46*3e0f1122SAndre Fischer 
47*3e0f1122SAndre Fischer 
48*3e0f1122SAndre Fischer 
49*3e0f1122SAndre Fischer 
AccessibleTitleBar(VCLXWindow * pWindow)50*3e0f1122SAndre Fischer AccessibleTitleBar::AccessibleTitleBar (VCLXWindow* pWindow)
51*3e0f1122SAndre Fischer     : VCLXAccessibleComponent(pWindow)
52*3e0f1122SAndre Fischer {
53*3e0f1122SAndre Fischer }
54*3e0f1122SAndre Fischer 
55*3e0f1122SAndre Fischer 
56*3e0f1122SAndre Fischer 
57*3e0f1122SAndre Fischer 
~AccessibleTitleBar(void)58*3e0f1122SAndre Fischer AccessibleTitleBar::~AccessibleTitleBar (void)
59*3e0f1122SAndre Fischer {
60*3e0f1122SAndre Fischer }
61*3e0f1122SAndre Fischer 
62*3e0f1122SAndre Fischer 
63*3e0f1122SAndre Fischer 
64*3e0f1122SAndre Fischer 
FillAccessibleStateSet(utl::AccessibleStateSetHelper & rStateSet)65*3e0f1122SAndre Fischer void AccessibleTitleBar::FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet)
66*3e0f1122SAndre Fischer {
67*3e0f1122SAndre Fischer     VCLXAccessibleComponent::FillAccessibleStateSet(rStateSet);
68*3e0f1122SAndre Fischer     rStateSet.AddState(accessibility::AccessibleStateType::FOCUSABLE);
69*3e0f1122SAndre Fischer }
70*3e0f1122SAndre Fischer 
71*3e0f1122SAndre Fischer 
72*3e0f1122SAndre Fischer } } // end of namespace sfx2::sidebar
73