1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
# (C) Copyright 2004-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
""" This module defines interaction objects that can be passed to
``UIWrapper.inspect`` where the actions represent 'queries'.
Implementations for these actions are expected to return value(s), ideally
without incurring side-effects.
"""
class Selected:
""" Represents an interaction to obtain the currently selected object(s).
Implementations should return a list of selected objects, or an empty list
if nothing is selected.
"""
pass
class SelectedIndices:
""" Represents an interaction to obtain the indices of the currently
selected objects.
Implementations should return a list of indicies of the selected
objects or an empty list if nothing is selected.
Note that an index could be an integer (e.g. when selecting from a list or
enumerataion, or selecting entire rows or columns of a table), or it could
be a tuple (e.g. corresponding to a specific cell at some (row, column) in
a table).
"""
pass
class SelectedText:
"""An object representing an interaction to obtain the displayed (echoed)
plain text which is currently selected.
E.g. For a Enum List, with one entry currently selected, the displayed
selected text would be the label of that entry.
Implementations should return a ``str``, or None if nothing is selected.
"""
pass
class DisplayedText:
"""An object representing an interaction to obtain the displayed (echoed)
plain text.
E.g. For a textbox using a password styling, the displayed text should
be a string of platform-dependent password mask characters.
Implementations should return a ``str``.
"""
pass
class IsChecked:
"""An object representing an interaction to obtain whether a checkable
widget (e.g. checkbox) is checked or not.
Implementations should return True if checked and False if not.
"""
pass
class IsEnabled:
"""An object representing an interaction to obtain whether a widget is
enabled or not.
Implementations should return True if enabled and False if not.
"""
pass
class IsVisible:
"""An object representing an interaction to obtain whether a widget is
visible or not.
Implementations should return True if visible and False if not.
"""
pass
|