Coverage Report - orca.presentation_manager

ModuleCoverage %
orca.presentation_manager
86%
1
# Orca
2
#
3
# Copyright 2005-2006 Sun Microsystems Inc.
4
#
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Library General Public
7
# License as published by the Free Software Foundation; either
8
# version 2 of the License, or (at your option) any later version.
9
#
10
# This library is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
# Library General Public License for more details.
14
#
15
# You should have received a copy of the GNU Library General Public
16
# License along with this library; if not, write to the
17
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
# Boston, MA 02111-1307, USA.
19
20 1
"""Provides the PresentationManager class for Orca."""
21
22 1
__id__        = "$Id: presentation_manager.py 1533 2006-10-06 07:59:04Z richb $"
23 1
__version__   = "$Revision: 1533 $"
24 1
__date__      = "$Date: 2006-10-06 00:59:04 -0700 (Fri, 06 Oct 2006) $"
25 1
__copyright__ = "Copyright (c) 2005-2006 Sun Microsystems Inc."
26 1
__license__   = "LGPL"
27
28 2
class PresentationManager:
29
    """High level manager for reacting to user input events and
30
    presenting information to the user."""
31
32 1
    def processKeyboardEvent(self, keyboardEvent):
33
        """Called when a key is pressed on the keyboard.
34
35
        Arguments:
36
        - keyboardEvent: an instance of input_event.KeyboardEvent
37
38
        Returns True if the event should be consumed.
39
        """
40 0
        return False
41
42 1
    def processBrailleEvent(self, brailleEvent):
43
        """Called when keys or buttons are pressed on the Braille display.
44
45
        Arguments:
46
        - brailleEvent: an instance of input_event.BrailleEvent
47
48
        Returns True if the command was consumed; otherwise False
49
        """
50 0
        return False
51
52 1
    def locusOfFocusChanged(self, event, oldLocusOfFocus, newLocusOfFocus):
53
        """Called when the visual object with focus changes.
54
55
        Arguments:
56
        - event: if not None, the Event that caused the change
57
        - oldLocusOfFocus: Accessible that is the old locus of focus
58
        - newLocusOfFocus: Accessible that is the new locus of focus
59
        """
60
        pass
61
62 1
    def visualAppearanceChanged(self, event, obj):
63
        """Called when the visual appearance of an object changes.
64
        This method should not be called for objects whose visual
65
        appearance changes solely because of focus -- locusOfFocusChanged
66
        is used for that.  Instead, it is intended mostly for objects
67
        whose notional 'value' has changed, such as a checkbox changing
68
        state, a progress bar advancing, a slider moving, text inserted,
69
        caret moved, etc.
70
71
        Arguments:
72
        - event: if not None, the Event that caused this to happen
73
        - obj: the Accessible whose visual appearance changed.
74
        """
75
        pass
76
77 1
    def activate(self):
78
        """Called when this presentation manager is activated."""
79
        pass
80
81 1
    def deactivate(self):
82
        """Called when this presentation manager is deactivated."""
83
        pass