Пример #1
0
    def __init__(self, *args, **kwargs):
        super(TestWindow, self).__init__(*args, **kwargs)

        self.batch = graphics.Batch()
        self.document = text.decode_text(doctext)
        self.margin = 2
        self.layout = layout.IncrementalTextLayout(self.document,
            self.width - self.margin * 2, self.height - self.margin * 2,
            multiline=True,
            batch=self.batch)
        self.caret = caret.Caret(self.layout)
        self.push_handlers(self.caret)

        self.set_mouse_cursor(self.get_system_mouse_cursor('text'))
Пример #2
0
    def __init__(self, *args, **kwargs):
        super(TestWindow, self).__init__(*args, **kwargs)

        self.batch = graphics.Batch()
        self.document = text.decode_text(doctext)
        self.margin = 2
        self.layout = layout.IncrementalTextLayout(self.document,
            self.width - self.margin * 2, self.height - self.margin * 2,
            multiline=True,
            batch=self.batch)
        self.caret = caret.Caret(self.layout)
        self.push_handlers(self.caret)

        self.set_mouse_cursor(self.get_system_mouse_cursor('text'))
Пример #3
0
	def _create(self, x, y):
		self._title = Label(
			"_______________ LOG _______________",
			x=x,
			y=y + self.height + 5,
			height=20,
			batch=self._log
		)
		self._doc = decode_text("\n")
		self._doc.set_style(0, 0, dict(color=(255, 255, 255, 255)))

		self._box = ScrollableTextLayout(
			self._doc, self.width, self.height,
			multiline=True, batch=self._log
		)
		self._box.x = x
		self._box.y = y