Add a GtkListBoxRow accessible

This lets us do two things:
1. Set the list-item role
2. Set selectable and selected states as appropriate

https://bugzilla.gnome.org/show_bug.cgi?id=692258
This commit is contained in:
Matthias Clasen
2013-09-21 20:49:18 -04:00
parent bdd4d65e85
commit c22e27f986
7 changed files with 299 additions and 85 deletions

View File

@ -7,109 +7,175 @@ window1
layer: window
alpha: 1
box1
"list box"
"filler"
parent: window1
index: 0
state: enabled sensitive showing visible manages-descendants
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkSelection>
selected children: unnamed-GtkContainerAccessible-0
unnamed-GtkContainerAccessible-0
"list item"
listbox1
"list box"
parent: box1
index: 0
state: enabled focusable sensitive showing visible
state: enabled sensitive showing visible manages-descendants
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
row1
"label"
parent: unnamed-GtkContainerAccessible-0
<AtkSelection>
unnamed-GtkListBoxRowAccessible-0
"list item"
parent: listbox1
index: 0
name: Row One
state: enabled multi-line sensitive showing visible
state: enabled focusable sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text: Row One
character count: 7
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 0
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkContainerAccessible-1
"list item"
row1
"label"
parent: unnamed-GtkListBoxRowAccessible-0
index: 0
name: Row One
state: enabled multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text: Row One
character count: 7
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 0
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkListBoxRowAccessible-1
"list item"
parent: listbox1
index: 1
state: enabled focusable sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
row2
"label"
parent: unnamed-GtkListBoxRowAccessible-1
index: 0
name: Row Two
state: enabled multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text: Row Two
character count: 7
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 0
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: word
listbox2
"list box"
parent: box1
index: 1
state: enabled focusable sensitive showing visible
state: enabled sensitive showing visible manages-descendants
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
row2
"label"
parent: unnamed-GtkContainerAccessible-1
<AtkSelection>
unnamed-GtkListBoxRowAccessible-2
"list item"
parent: listbox2
index: 0
name: Row Two
state: enabled multi-line sensitive showing visible
state: enabled focusable selectable sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text: Row Two
character count: 7
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 0
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: word
row3
"label"
parent: unnamed-GtkListBoxRowAccessible-2
index: 0
name: Row Tree
state: enabled multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text: Row Tree
character count: 8
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 0
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: word

View File

@ -5,18 +5,35 @@
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkListBox" id="box1">
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="row1">
<object class="GtkListBox" id="listbox1">
<property name="visible">True</property>
<property name="label">Row One</property>
<property name="selection-mode">none</property>
<child>
<object class="GtkLabel" id="row1">
<property name="visible">True</property>
<property name="label">Row One</property>
</object>
</child>
<child>
<object class="GtkLabel" id="row2">
<property name="visible">True</property>
<property name="label">Row Two</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="row2">
<object class="GtkListBox" id="listbox2">
<property name="visible">True</property>
<property name="label">Row Two</property>
<child>
<object class="GtkLabel" id="row3">
<property name="visible">True</property>
<property name="label">Row Tree</property>
</object>
</child>
</object>
</child>
</object>