File: i_perspective_item.py

package info (click to toggle)
python-pyface 6.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,756 kB
  • sloc: python: 39,728; makefile: 79
file content (52 lines) | stat: -rw-r--r-- 1,904 bytes parent folder | download | duplicates (4)
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
""" The interface for perspective items. """


# Enthought library imports.
from traits.api import Enum, Float, Interface, Str


class IPerspectiveItem(Interface):
    """ The interface for perspective items. """

    # The Id of the view to display in the perspective.
    id = Str

    # The position of the view relative to the item specified in the
    # 'relative_to' trait.
    #
    # 'top'    puts the view above the 'relative_to' item.
    # 'bottom' puts the view below the 'relative_to' item.
    # 'left'   puts the view to the left of  the 'relative_to' item.
    # 'right'  puts the view to the right of the 'relative_to' item.
    # 'with'   puts the view in the same region as the 'relative_to' item.
    #
    # If the position is specified as 'with' you must specify a 'relative_to'
    # item other than the editor area (i.e., you cannot position a view 'with'
    # the editor area).
    position = Enum('left', 'top', 'bottom', 'right', 'with')

    # The Id of the view to position relative to. If this is not specified
    # (or if no view exists with this Id) then the view will be placed relative
    # to the editor area.
    relative_to = Str

    # The width of the item (as a fraction of the window width).
    #
    # e.g. 0.5 == half the window width.
    #
    # Note that this is treated as a suggestion, and it may not be possible
    # for the workbench to allocate the space requested.
    width = Float(-1)

    # The height of the item (as a fraction of the window height).
    #
    # e.g. 0.5 == half the window height.
    #
    # Note that this is treated as a suggestion, and it may not be possible
    # for the workbench to allocate the space requested.
    height = Float(-1)

    # The style of the dock window.
    style_hint = Enum('tab', 'horizontal', 'vertical', 'fixed')

#### EOF ######################################################################