File: i_selection.py

package info (click to toggle)
python-apptools 4.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,652 kB
  • sloc: python: 16,657; makefile: 77
file content (21 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from traits.api import Interface, List, Str


class ISelection(Interface):
    """ Collection of selected items. """

    #: ID of the selection provider that created this selection object.
    provider_id = Str

    def is_empty(self):
        """ Is the selection empty? """


class IListSelection(ISelection):
    """ Selection for ordered sequences of items. """

    #: Selected objects.
    items = List

    #: Indices of the selected objects in the selection provider.
    indices = List