Ejemplo n.º 1
0
 def OnInit(self):
     StrokeDisplayDialog.display(None, fake_config())
     #self.SetTopWindow(dlg)
     import random
     from plover.steno import Stroke
     keys = STENO_KEY_ORDER.keys()
     for i in range(100):
         num = random.randint(1, len(keys))
         StrokeDisplayDialog.stroke_handler(Stroke(random.sample(keys, num)))
     return True
Ejemplo n.º 2
0
# Copyright (c) 2013 Hesky Fisher
# See LICENSE.txt for details.

"""A gui display of recent strokes."""

import wx
from wx.lib.utils import AdjustRectToScreen
from collections import deque
from plover.steno import STENO_KEY_ORDER, STENO_KEY_NUMBERS

TITLE = 'Plover: Stroke Display'
ON_TOP_TEXT = "Always on top"
UI_BORDER = 4
ALL_KEYS = ''.join(x[0].strip('-') for x in 
                   sorted(STENO_KEY_ORDER.items(), key=lambda x: x[1]))
REVERSE_NUMBERS = {v: k for k, v in STENO_KEY_NUMBERS.items()}
STROKE_LINES = 30
STYLE_TEXT = 'Style:'
STYLE_PAPER = 'Paper'
STYLE_RAW = 'Raw'
STYLES = [STYLE_PAPER, STYLE_RAW]

class StrokeDisplayDialog(wx.Dialog):
    
    other_instances = []
    strokes = deque(maxlen=STROKE_LINES)

    def __init__(self, parent, config):
        self.config = config        
        on_top = config.get_stroke_display_on_top()
        style = wx.DEFAULT_DIALOG_STYLE
Ejemplo n.º 3
0
# Copyright (c) 2013 Hesky Fisher
# See LICENSE.txt for details.

"""A gui display of recent strokes."""

import wx
from wx.lib.utils import AdjustRectToScreen
from collections import deque
from plover.steno import STENO_KEY_ORDER, STENO_KEY_NUMBERS

TITLE = "Plover: Stroke Display"
ON_TOP_TEXT = "Always on top"
UI_BORDER = 4
ALL_KEYS = "".join(x[0].strip("-") for x in sorted(STENO_KEY_ORDER.items(), key=lambda x: x[1]))
REVERSE_NUMBERS = {v: k for k, v in STENO_KEY_NUMBERS.items()}
MAX_STROKE_LINES = 38
STYLE_TEXT = "Style:"
STYLE_PAPER = "Paper"
STYLE_RAW = "Raw"
STYLES = [STYLE_PAPER, STYLE_RAW]


class StrokeDisplayDialog(wx.Dialog):

    other_instances = []
    strokes = deque(maxlen=MAX_STROKE_LINES)

    def __init__(self, parent, config):
        self.config = config
        on_top = config.get_stroke_display_on_top()
        style = wx.DEFAULT_DIALOG_STYLE