Flutter Engine
The Flutter Engine
ax_node_text_styles.h
Go to the documentation of this file.
1// Copyright 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_ACCESSIBILITY_AX_NODE_TEXT_STYLES_H_
6#define UI_ACCESSIBILITY_AX_NODE_TEXT_STYLES_H_
7
8#include <string>
9
10#include "ax_base_export.h"
11
12namespace ui {
13
14// A compact representation of text styles on an AXNode. This data represents
15// a snapshot at a given time and is not intended to be held for periods of
16// time. For this reason, it is a move-only class, to encourage deliberate
17// short-term usage.
20
21 // Move-only class, explicitly delete copy-construction and assignment
22 AXNodeTextStyles(const AXNodeTextStyles& other) = delete;
24
25 // Move constructor and assignment
27 AXNodeTextStyles& operator=(AXNodeTextStyles&& other);
28
29 bool operator==(const AXNodeTextStyles& other) const;
30
31 bool operator!=(const AXNodeTextStyles& other) const;
32
33 bool IsUnset() const;
34
36 int32_t color;
42 int32_t text_style;
44 float font_size;
46 std::string font_family;
47};
48
49} // namespace ui
50
51#endif // UI_ACCESSIBILITY_AX_NODE_TEXT_STYLES_H_
#define AX_BASE_EXPORT
bool operator==(const AXEventIntent &a, const AXEventIntent &b)
bool operator!=(const AXEventIntent &a, const AXEventIntent &b)
AXNodeTextStyles & operator=(const AXNodeTextStyles &)=delete
AXNodeTextStyles(const AXNodeTextStyles &other)=delete