28 |
# Flags that can be passed to Gzz.py |
# Flags that can be passed to Gzz.py |
29 |
# (prefix with '--' on the command line) |
# (prefix with '--' on the command line) |
30 |
flagset = ['multiline', 'double-size', 'triple-size', 'lollipop', |
flagset = ['multiline', 'double-size', 'triple-size', 'lollipop', |
31 |
'python-bindings', 'potion-bindings'] |
'python-bindings', 'potion-bindings', 'four-lines', |
32 |
|
'bounded-vanishing-scale'] |
33 |
|
|
34 |
|
|
35 |
def call(list, type=gzz.potion.CommandCall): |
def call(list, type=gzz.potion.CommandCall): |
51 |
|
|
52 |
def run(self): |
def run(self): |
53 |
self.style = self.graphicsAPI.getTextStyle("SansSerif", java.awt.Font.PLAIN, 13); |
self.style = self.graphicsAPI.getTextStyle("SansSerif", java.awt.Font.PLAIN, 13); |
54 |
self.views = [gzz.view.VobVanishingClient(), |
self.views = [gzz.view.VobVanishingClient('bounded-vanishing-scale' not in self.flags), |
55 |
gzz.view.RowColView(0), gzz.view.RowColView(1), |
gzz.view.RowColView(0), gzz.view.RowColView(1), |
56 |
] |
] |
57 |
self.viewSpecificBinders = java.util.HashMap() |
self.viewSpecificBinders = java.util.HashMap() |
61 |
self.cellContentView = \ |
self.cellContentView = \ |
62 |
gzz.view.LinebrokenCellContentView(self.style) |
gzz.view.LinebrokenCellContentView(self.style) |
63 |
|
|
64 |
if 'triple-size' in self.flags: |
if 'four-lines' in self.flags: |
65 |
|
self.cellContentView = \ |
66 |
|
gzz.view.CellMagnifier(self.cellContentView, 3, 5) |
67 |
|
elif 'triple-size' in self.flags: |
68 |
self.cellContentView = \ |
self.cellContentView = \ |
69 |
gzz.view.CellMagnifier(self.cellContentView, 3) |
gzz.view.CellMagnifier(self.cellContentView, 3) |
70 |
elif 'double-size' in self.flags: |
elif 'double-size' in self.flags: |
135 |
TextCursorRight, SwitchToTextMode, \ |
TextCursorRight, SwitchToTextMode, \ |
136 |
SwitchToNormalMode, MarkHalfRank, \ |
SwitchToNormalMode, MarkHalfRank, \ |
137 |
ExtEdit, ViewContainedText, AndFilterFn, \ |
ExtEdit, ViewContainedText, AndFilterFn, \ |
138 |
OrFilterFn |
OrFilterFn, RootClone, Step |
139 |
|
|
140 |
from gzz.modules.email import AllEmailsThat, SubjectFilterFn, FromFilterFn, \ |
from gzz.modules.email import AllEmailsThat, SubjectFilterFn, FromFilterFn, \ |
141 |
ToFilterFn, OlderFilterFn, NewerFilterFn |
ToFilterFn, OlderFilterFn, NewerFilterFn |
157 |
'n': action([NewCell, None]), |
'n': action([NewCell, None]), |
158 |
'-': action([Connect, [PrefixOrOther], None]), |
'-': action([Connect, [PrefixOrOther], None]), |
159 |
'h': action([Hop2, None]), |
'h': action([Hop2, None]), |
160 |
'p': action([Put,[ThisWindow], [PrefixOrOther]], 1), |
'p': action([Put,[ThisWindow], [PrefixOrOther]], 1), |
161 |
'P': action([Put,[ThisWindow], [PrefixOrOther]], 0), |
'P': action([Put,[ThisWindow], [PrefixOrOther]], 0), |
162 |
'g': action([Go, [PrefixOrOther]], 1), |
'g': action([Go, [PrefixOrOther]], 1), |
163 |
'G': action([Go, [PrefixOrOther]], 0), |
'G': action([Go, [PrefixOrOther]], 0), |
187 |
'Delete': action(call([Delete, [PrefixOrThis]])), |
'Delete': action(call([Delete, [PrefixOrThis]])), |
188 |
'Alt-Backspace': action(call([Delete, [PrefixOrThis]])), |
'Alt-Backspace': action(call([Delete, [PrefixOrThis]])), |
189 |
'Shift-Delete': action(call([Delete, [PrefixOrThis]])), |
'Shift-Delete': action(call([Delete, [PrefixOrThis]])), |
190 |
'Alt-Shift-Delete': action(call([Delete, [PrefixOrThis]])), |
'Alt-Shift-Backspace': action(call([Delete, [PrefixOrThis]])), |
191 |
'o': action(call([GoToOriginal, [ThisWindow]]), 1), |
'o': action(call([Go, [RootClone, [ThisWindow]]]), 1), |
192 |
'O': action(call([GoToOriginal, [ThisWindow]]), 0), |
'O': action(call([Go, [RootClone, [ThisWindow]]]), 0), |
193 |
'Tab': action(call([SwitchToTextMode])), |
'Tab': action(call([SwitchToTextMode])), |
194 |
'Tabulator': action(call([SwitchToTextMode])), |
'Tabulator': action(call([SwitchToTextMode])), |
195 |
'Ctrl-E': action(call([ExtEdit, [PrefixOrThis]]), 1), |
'Ctrl-E': action(call([ExtEdit, [PrefixOrThis]]), 1), |