~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to wxPython/wx/tools/Editra/templates/autocomp_mod

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###############################################################################
 
2
# Name:                                                                       #
 
3
# Purpose:                                                                    #
 
4
# Author: AUTHOR <email address>                                              #
 
5
# Copyright: (c) 2008 Cody Precord <staff@editra.org>                         #
 
6
# License: wxWindows License                                                  #
 
7
###############################################################################
 
8
 
 
9
"""
 
10
FILE:
 
11
AUTHOR:
 
12
LANGUAGE: Python
 
13
SUMMARY:
 
14
 
 
15
"""
 
16
 
 
17
__author__ = ""
 
18
__svnid__ = "$Id: Exp $"
 
19
__revision__ = "$Revision:  $"
 
20
 
 
21
#--------------------------------------------------------------------------#
 
22
# Dependancies
 
23
import sys
 
24
 
 
25
#--------------------------------------------------------------------------#
 
26
 
 
27
class Completer:
 
28
    """Code completer provider"""
 
29
    def __init__(self):
 
30
        """Initiliazes the completer"""
 
31
        # Key values to activate autocompletion on
 
32
        self._autocomp_keys = []
 
33
        # Character values to stop autocompletion on
 
34
        self._autocomp_stop = u' '
 
35
        # Key values to activate a calltip call on
 
36
        self._calltip_keys = []
 
37
        # List for collecting atoms in
 
38
        self._collector = []
 
39
 
 
40
    def GetAutoCompKeys(self):
 
41
        """Returns the list of key codes for activating the
 
42
        autocompletion.
 
43
 
 
44
        """
 
45
        if hasattr(self, "_autocomp_keys"):
 
46
            return self._autocomp_keys
 
47
        else:
 
48
            return list()
 
49
 
 
50
    def GetAutoCompStops(self):
 
51
        """Returns a string of characters that should cancel
 
52
        the autocompletion lookup.
 
53
 
 
54
        """
 
55
        if hasattr(self, '_autocomp_stop'):
 
56
            return self._autocomp_stop
 
57
        else:
 
58
            return u''
 
59
 
 
60
    def GetCallTipKeys(self):
 
61
        """Returns the list of keys to activate a calltip on"""
 
62
        if hasattr(self, '_calltip_keys'):
 
63
            return self._calltip_keys
 
64
        else:
 
65
            return list()
 
66