1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file. 4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "ui/accessibility/ax_node_data.h" 6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include <set> 8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/strings/string_number_conversions.h" 10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/strings/string_util.h" 11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/strings/utf_string_conversions.h" 12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)using base::DoubleToString; 14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)using base::IntToString; 15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace ui { 17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace { 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)std::string IntVectorToString(const std::vector<int>& items) { 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) std::string str; 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) for (size_t i = 0; i < items.size(); ++i) { 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (i > 0) 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) str += ","; 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) str += IntToString(items[i]); 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return str; 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // Anonymous namespace 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)AXNodeData::AXNodeData() 33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) : id(-1), 34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) role(AX_ROLE_UNKNOWN), 35116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch state(0xFFFFFFFF) { 36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)AXNodeData::~AXNodeData() { 39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::AddStringAttribute( 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) AXStringAttribute attribute, const std::string& value) { 43f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) string_attributes.push_back(std::make_pair(attribute, value)); 44f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 45f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 46f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::AddIntAttribute( 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) AXIntAttribute attribute, int value) { 48f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) int_attributes.push_back(std::make_pair(attribute, value)); 49f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 50f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 51f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::AddFloatAttribute( 525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) AXFloatAttribute attribute, float value) { 53f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) float_attributes.push_back(std::make_pair(attribute, value)); 54f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 55f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 56f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::AddBoolAttribute( 575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) AXBoolAttribute attribute, bool value) { 58f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) bool_attributes.push_back(std::make_pair(attribute, value)); 59f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 60f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 61f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::AddIntListAttribute( 625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) AXIntListAttribute attribute, const std::vector<int32>& value) { 63f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) intlist_attributes.push_back(std::make_pair(attribute, value)); 64f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 65f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 66f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::SetName(std::string name) { 675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) string_attributes.push_back(std::make_pair(AX_ATTR_NAME, name)); 68f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 69f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 70f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void AXNodeData::SetValue(std::string value) { 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) string_attributes.push_back(std::make_pair(AX_ATTR_VALUE, value)); 725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)std::string AXNodeData::ToString() const { 755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) std::string result; 765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += "id=" + IntToString(id); 785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " " + ui::ToString(role); 795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_BUSY)) 815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " BUSY"; 825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_CHECKED)) 835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " CHECKED"; 845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_COLLAPSED)) 855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " COLLAPSED"; 865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_EXPANDED)) 875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " EXPANDED"; 885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_FOCUSABLE)) 895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " FOCUSABLE"; 905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_FOCUSED)) 915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " FOCUSED"; 925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_HASPOPUP)) 935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " HASPOPUP"; 945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_HOVERED)) 955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " HOVERED"; 965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_INDETERMINATE)) 975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " INDETERMINATE"; 985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_INVISIBLE)) 995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " INVISIBLE"; 1005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_LINKED)) 1015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " LINKED"; 1025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_MULTISELECTABLE)) 1035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " MULTISELECTABLE"; 1045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_OFFSCREEN)) 1055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " OFFSCREEN"; 1065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_PRESSED)) 1075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " PRESSED"; 1085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_PROTECTED)) 1095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " PROTECTED"; 1105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_READ_ONLY)) 1115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " READONLY"; 1125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_REQUIRED)) 1135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " REQUIRED"; 1145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_SELECTABLE)) 1155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " SELECTABLE"; 1165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_SELECTED)) 1175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " SELECTED"; 1185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_VERTICAL)) 1195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " VERTICAL"; 1205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (state & (1 << ui::AX_STATE_VISITED)) 1215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " VISITED"; 1225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " (" + IntToString(location.x()) + ", " + 1245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) IntToString(location.y()) + ")-(" + 1255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) IntToString(location.width()) + ", " + 1265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) IntToString(location.height()) + ")"; 1275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) for (size_t i = 0; i < int_attributes.size(); ++i) { 1295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) std::string value = IntToString(int_attributes[i].second); 1305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) switch (int_attributes[i].first) { 1315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SCROLL_X: 1325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " scroll_x=" + value; 1335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SCROLL_X_MIN: 1355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " scroll_x_min=" + value; 1365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SCROLL_X_MAX: 1385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " scroll_x_max=" + value; 1395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SCROLL_Y: 1415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " scroll_y=" + value; 1425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SCROLL_Y_MIN: 1445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " scroll_y_min=" + value; 1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SCROLL_Y_MAX: 1475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " scroll_y_max=" + value; 1485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_HIERARCHICAL_LEVEL: 1505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " level=" + value; 1515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TEXT_SEL_START: 1535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " sel_start=" + value; 1545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TEXT_SEL_END: 1565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " sel_end=" + value; 1575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_ROW_COUNT: 1595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " rows=" + value; 1605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_COLUMN_COUNT: 1625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " cols=" + value; 1635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_CELL_COLUMN_INDEX: 1655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " col=" + value; 1665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_CELL_ROW_INDEX: 1685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " row=" + value; 1695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_CELL_COLUMN_SPAN: 1715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " colspan=" + value; 1725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_CELL_ROW_SPAN: 1745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " rowspan=" + value; 1755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_COLUMN_HEADER_ID: 1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " column_header_id=" + value; 1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_COLUMN_INDEX: 1805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " column_index=" + value; 1815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_HEADER_ID: 1835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " header_id=" + value; 1845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_ROW_HEADER_ID: 1865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " row_header_id=" + value; 1875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TABLE_ROW_INDEX: 1895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " row_index=" + value; 1905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 1915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TITLE_UI_ELEMENT: 1925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " title_elem=" + value; 1935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 194effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch case AX_ATTR_ACTIVEDESCENDANT_ID: 195effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch result += " activedescendant=" + value; 196effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch break; 1975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_COLOR_VALUE_RED: 1985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " color_value_red=" + value; 1995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_COLOR_VALUE_GREEN: 2015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " color_value_green=" + value; 2025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_COLOR_VALUE_BLUE: 2045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " color_value_blue=" + value; 2055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_TEXT_DIRECTION: 2075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) switch (int_attributes[i].second) { 2085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_TEXT_DIRECTION_LR: 2095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) default: 2105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " text_direction=lr"; 2115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_TEXT_DIRECTION_RL: 2135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " text_direction=rl"; 2145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_TEXT_DIRECTION_TB: 2165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " text_direction=tb"; 2175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_TEXT_DIRECTION_BT: 2195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " text_direction=bt"; 2205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_INT_ATTRIBUTE_NONE: 2245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) for (size_t i = 0; i < string_attributes.size(); ++i) { 2295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) std::string value = string_attributes[i].second; 2305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) switch (string_attributes[i].first) { 2315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DOC_URL: 2325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " doc_url=" + value; 2335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DOC_TITLE: 2355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " doc_title=" + value; 2365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DOC_MIMETYPE: 2385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " doc_mimetype=" + value; 2395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DOC_DOCTYPE: 2415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " doc_doctype=" + value; 2425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_ACCESS_KEY: 2445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " access_key=" + value; 2455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_ACTION: 2475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " action=" + value; 2485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DESCRIPTION: 2505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " description=" + value; 2515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DISPLAY: 2535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " display=" + value; 2545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_HELP: 2565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " help=" + value; 2575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_HTML_TAG: 2595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " html_tag=" + value; 2605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_LIVE_RELEVANT: 2625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " relevant=" + value; 2635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_LIVE_STATUS: 2655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " live=" + value; 2665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CONTAINER_LIVE_RELEVANT: 2685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " container_relevant=" + value; 2695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CONTAINER_LIVE_STATUS: 2715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " container_live=" + value; 2725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_ROLE: 2745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " role=" + value; 2755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_SHORTCUT: 2775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " shortcut=" + value; 2785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_URL: 2805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " url=" + value; 2815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_NAME: 2835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " name=" + value; 2845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_VALUE: 2865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " value=" + value; 2875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_STRING_ATTRIBUTE_NONE: 2895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) for (size_t i = 0; i < float_attributes.size(); ++i) { 2945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) std::string value = DoubleToString(float_attributes[i].second); 2955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) switch (float_attributes[i].first) { 2965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DOC_LOADING_PROGRESS: 2975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " doc_progress=" + value; 2985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 2995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_VALUE_FOR_RANGE: 3005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " value_for_range=" + value; 3015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_MAX_VALUE_FOR_RANGE: 3035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " max_value=" + value; 3045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_MIN_VALUE_FOR_RANGE: 3065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " min_value=" + value; 3075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_FLOAT_ATTRIBUTE_NONE: 3095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 3115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 3125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) for (size_t i = 0; i < bool_attributes.size(); ++i) { 3145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) std::string value = bool_attributes[i].second ? "true" : "false"; 3155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) switch (bool_attributes[i].first) { 3165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_DOC_LOADED: 3175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " doc_loaded=" + value; 3185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_BUTTON_MIXED: 3205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " mixed=" + value; 3215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_LIVE_ATOMIC: 3235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " atomic=" + value; 3245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_LIVE_BUSY: 3265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " busy=" + value; 3275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CONTAINER_LIVE_ATOMIC: 3295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " container_atomic=" + value; 3305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CONTAINER_LIVE_BUSY: 3325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " container_busy=" + value; 3335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_ARIA_READONLY: 3355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " aria_readonly=" + value; 3365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CAN_SET_VALUE: 3385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " can_set_value=" + value; 3395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_UPDATE_LOCATION_ONLY: 3415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " update_location_only=" + value; 3425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CANVAS_HAS_FALLBACK: 3445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " has_fallback=" + value; 3455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3461320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci case AX_ATTR_IS_AX_TREE_HOST: 3471320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci result += " is_ax_tree_host=" + value; 3481320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci break; 3495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_BOOL_ATTRIBUTE_NONE: 3505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 3525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 3535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) for (size_t i = 0; i < intlist_attributes.size(); ++i) { 3555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::vector<int32>& values = intlist_attributes[i].second; 3565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) switch (intlist_attributes[i].first) { 3575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_INDIRECT_CHILD_IDS: 3585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " indirect_child_ids=" + IntVectorToString(values); 3595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 360effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch case AX_ATTR_CONTROLS_IDS: 361effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch result += " controls_ids=" + IntVectorToString(values); 362effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch break; 363effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch case AX_ATTR_DESCRIBEDBY_IDS: 364effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch result += " describedby_ids=" + IntVectorToString(values); 365effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch break; 366effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch case AX_ATTR_FLOWTO_IDS: 367effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch result += " flowto_ids=" + IntVectorToString(values); 368effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch break; 369effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch case AX_ATTR_LABELLEDBY_IDS: 370effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch result += " labelledby_ids=" + IntVectorToString(values); 371effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch break; 372effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch case AX_ATTR_OWNS_IDS: 373effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch result += " owns_ids=" + IntVectorToString(values); 374effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch break; 3755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_LINE_BREAKS: 3765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " line_breaks=" + IntVectorToString(values); 3775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CELL_IDS: 3795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " cell_ids=" + IntVectorToString(values); 3805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_UNIQUE_CELL_IDS: 3825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " unique_cell_ids=" + IntVectorToString(values); 3835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_CHARACTER_OFFSETS: 3855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " character_offsets=" + IntVectorToString(values); 3865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_WORD_STARTS: 3885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " word_starts=" + IntVectorToString(values); 3895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_ATTR_WORD_ENDS: 3915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " word_ends=" + IntVectorToString(values); 3925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) case AX_INT_LIST_ATTRIBUTE_NONE: 3945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) break; 3955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 3965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 3975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!child_ids.empty()) 3995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) result += " child_ids=" + IntVectorToString(child_ids); 4005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 4015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return result; 402f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 403f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 404f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} // namespace ui 405