1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
{ module sun
{ module star
{ module drawing
{
22 /** The AccessibleShape service is implemented by UNO shapes to
23 provide accessibility information that describe the shape's features.
24 A UNO shape is any object that implements the
25 ::com::sun::star::drawing::XShape interface.
27 <p>The content of a draw page is modelled as tree of accessible shapes
28 and accessible text paragraphs. The root of this (sub-)tree is the
29 accessible draw document view. An accessible shape implements either
30 this service or one of the "derived" services
31 AccessibleGraphicShape or AccessibleOLEShape.
32 See the section Children in the description of the
33 ::com::sun::star::accessibility::XAccessibleContext
34 interface support for more details.</p>
36 <p>There are two services that extend this one: the
37 AccessibleGraphicShape and the
38 AccessibleOLEShape services provide additional interfaces.
39 See there for details.</p>
41 <p>A shape object is either fully or partially visible on the screen or
42 has set the ::com::sun::star::accessibility::AccessibleStateType::DEFUNC
43 state to indicate that it is no longer
44 actively supported by its parent.</p>
46 <p>Each shape object that has not set the DEFUNC state has a valid
47 parent. That is either the containing draw page or a group shape or a
52 service AccessibleShape
54 /** Base interface for being accessible. It gives access to the
55 ::com::sun::star::accessibility::XAccessibleContext
58 interface ::com
::sun
::star
::accessibility
::XAccessible
;
60 /** Give access to the structural information of a shape.
62 <p>You can access the following information for the shape being made
65 <li>Role: The role of all shapes is
66 com::sun::star::accessibility::AccessibleRole::SHAPE.</li>
67 <li>Name: The name of a shape is its localized type name.</li>
68 <li>Description: Descriptions are localized and start with the
69 shape's type and style. After that follow some properties that
70 differ from the defaults with respect to the style.
71 <li>Children: The children of a shape are either other accessible
72 shapes or accessible text paragraphs. Only group shapes, 3D scene
73 shapes, and OLE shapes may contain other shapes as children.
74 Some of the shapes may have text paragraphs as (additional)
75 children. See ::com::sun::star::text::AccessibleParagraphView for
76 details of how this text is represented.</li>
77 <li>Parent: The parent is either the document view as represented by
78 AccessibleDrawDocumentView or a group shape, 3D
79 scene shape, or OLE shape.</li>
80 <li>Relations: Are set and maintained from the outside. See the
81 service description of the object that has accessible shapes as
82 children for details.</li>
83 <li>States: The states supported by this service are:
85 <li><p>com::sun::star::accessibility::AccessibleStateType::DEFUNC
86 is set if an accessible
87 shape is not visible but still existent for some reason.
88 This should not really happen and is a sign that someone,
89 e.g. an AT-Tool holds references to such a shape. The
90 reason for this is that either the owner of the accessible
91 shape did not remove it from its list of children or that
92 the AT-Tool does not care for the events indicating
94 <p>Usually an object that has the
95 com::sun::star::accessibility::AccessibleStateType::DEFUNC
97 been disposed and subsequent calls to this object result in
98 ::com::sun::star::lang::DisposedException
100 <p>If this state is set then no other of the states below is
101 set. This is also true for the states that are otherwise
102 always set (which makes "always" more of a sort of
103 "normally").</p></li>
104 <li>com::sun::star::accessibility::AccessibleStateType::EDITABLE
106 This state is interpreted to mean that not only text but
107 also other, graphical, properties of a shape can be modified.
109 <li>com::sun::star::accessibility::AccessibleStateType::ENABLED
111 <li>com::sun::star::accessibility::AccessibleStateType::FOCUSABLE
113 <li>com::sun::star::accessibility::AccessibleStateType::FOCUSED
115 whether the shape currently has the focus.</li>
116 <li>com::sun::star::accessibility::AccessibleStateType::MULTI_LINE
117 is set if a shape supports the
118 ::com::sun::star::accessibility::XAccessibleText interface.</li>
119 <li>com::sun::star::accessibility::AccessibleStateType::OPAQUE
120 is set for certain shapes
121 with certain attributes like for a filled rectangle.</li>
122 <li>com::sun::star::accessibility::AccessibleStateType::RESIZABLE
124 <li>com::sun::star::accessibility::AccessibleStateType::SELECTABLE
126 <li>com::sun::star::accessibility::AccessibleStateType::SELECTED
128 whether the shape is currently selected.</li>
129 <li>com::sun::star::accessibility::AccessibleStateType::SHOWING
131 <li>com::sun::star::accessibility::AccessibleStateType::VISIBLE
134 <li>Locale: The shape returns the locale of its parent.</li>
135 <li>Property change listeners: Property change listeners that are
136 registered with a shape are informed of the usual events.</li>
139 interface ::com
::sun
::star
::accessibility
::XAccessibleContext
;
141 /** Give access to the graphical representation of a shape.
143 <p>The bounding box returned by the
144 ::com::sun::star::accessibility::XAccessibleComponent::getBounds()
146 shape's bounding box clipped at its parent's bounding box</p>
148 <p>An accessible shape tries as best as it can to return proper
149 values for calls to the
150 ::com::sun::star::accessibility::XAccessibleExtendedComponent::getForeground()
152 ::com::sun::star::accessibility::XAccessibleExtendedComponent::getBackground()
154 If the shape is painted with a uniform and non-transparent color
155 then the returned colors may differ from the ones visible on the
158 <p>Key bindings are not supported at the moment</p>
160 interface ::com
::sun
::star
::accessibility
::XAccessibleComponent
;
162 /** Give extended access to the graphical representation of a shape.
165 ::com::sun::star::accessibility::XAccessibleExtendedComponent::getFont(),
166 ::com::sun::star::accessibility::XAccessibleExtendedComponent::getTitledBorderText(), and
167 ::com::sun::star::accessibility::XAccessibleExtendedComponent::getToolTipText()
168 are not supported and return empty references respectively empty
171 <p>The support of this interface is optional to reduce overhead in
172 case that no text is displayed and color information can not be
173 determined with an acceptable cost.</p>
175 [optional] interface ::com
::sun
::star
::accessibility
::XAccessibleExtendedComponent
;
180 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */