def __init__ (self, factory, config, encoding, id): IMEngine.__init__ (self, factory, config, encoding, id) self._config = config self._lookup_table = scim.LookupTable (PinYinEngine._page_size) self._lookup_table.fix_page_size (True) self._py_parser = PYParser.PinYinParser () self._user_input = UserInput (self._py_parser) # 0 = english input mode # 1 = chinese input mode self._mode = 1 self._full_width_letter = [False, False] self._full_width_punct = [False, True] self._full_width_punct[1] = config.read ("/IMEngine/Python/PinYin/FullWidthPunct", True) self._committed_phrases = PhraseList () self._preedit_phrases = PhraseList () self.reset () self._status_property = Property ("status", "") self._letter_property = Property ("full_letter", "") self._punct_property = Property ("full_punct", "") # self._shuangpin_property = Property ("shuangpin", "") # self._gbk_property = Property ("gbk", "") self._setup_property = Property ("setup", "", "/usr/share/scim/icons/setup.png", _("Setup"))
def __init__ (self, factory, config, encoding, id): IMEngine.__init__ (self, factory, config, encoding, id) self._config = config self._preedit_string = u"" self._cursor = 0 self.keys = [] self.keyCount = [] self.oldkey = None
def __init__ (self, factory, config, db, encoding, id): IMEngine.__init__ (self, factory, config, encoding, id) self._config = config self._lookup_table = scim.LookupTable (9) self._preedit_string = u"" self._db = db self._cursor = 0 self._candidates = [] self._always_show_candidates = config.read ("/IMEngine/Python/EnglishWriter/AlwaysShowCandidates", False) self._commit_space = config.read ("/IMEngine/Python/EnglishWriter/CommitSpace", True)