Class pyglet.text.layout.ScrollableTextLayoutGroup

graphics.Group --+
                 |
                ScrollableTextLayoutGroup

Top-level rendering group for ScrollableTextLayout.

The group maintains internal state for setting the clipping planes and view transform for scrolling. Because the group has internal state specific to the text layout, the group is never shared.

Methods

  set_state(self)
Apply the OpenGL state change.
  unset_state(self)
Repeal the OpenGL state change.
  __eq__(self, other)
  __hash__(self)
  __init__(self, parent=None)
Create a group.
(Inherited from pyglet.graphics.Group)
  set_state_recursive(self)
Set this group and its ancestry.
(Inherited from pyglet.graphics.Group)
  unset_state_recursive(self)
Unset this group and its ancestry.
(Inherited from pyglet.graphics.Group)

Properties

int top
Top edge of the text layout (measured from the bottom of the graphics viewport).
int left
Left edge of the text layout.
int width
Width of the text layout.
int height
Height of the text layout.
int view_x
Horizontal scroll offset.
int view_y
Vertical scroll offset.

Class Variables

  translate_x = 0
  translate_y = 0

Method Details

set_state

set_state(self)

Apply the OpenGL state change.

The default implementation does nothing.

Overrides:
graphics.Group.set_state

unset_state

unset_state(self)

Repeal the OpenGL state change.

The default implementation does nothing.

Overrides:
graphics.Group.unset_state

Property Details

top

Top edge of the text layout (measured from the bottom of the graphics viewport).
Type:
int

left

Left edge of the text layout.
Type:
int

width

Width of the text layout.
Type:
int

height

Height of the text layout.
Type:
int

view_x

Horizontal scroll offset.
Type:
int

view_y

Vertical scroll offset.
Type:
int