labpyproject.core.pygame.widgets

Jeu de widgets basiques destinés à construire une interface pygame.

Combine les modules core et events pour produire des objets fonctionnels.

  • Root : conteneur racine de l’application

  • Canvas, HBox, VBox : RealContainers (sans layout, avec layout horizontal ou vertical)

  • Stack, HStack, VStack : VirtualContainers (sans layout, avec layout horizontal ou vertical)

  • Image : objet image

  • Background : fond monochrome

  • Text : champ texte multi ligne (utilisant un objet pygame.font.Font ou pygame.freetype.Font)

  • Entry : text entry dérivé de Text

  • TextButton : bouton avec zone de texte et fond monochrome

  • Button : bouton image

Note

Classes

Background(bgcolor, **kwargs)

Sprite image destiné à des fonds monochromes.

Image([surface, file, fixed, fillmode])

Widget image basique.

Text(fontobj[, text, fgcolor, linespacing, …])

Widget texte basique.

Entry(fontobj[, text, fgcolor, bgcolor, …])

Entry text.

TextButton(fontobj, statesdict[, text, …])

Widget button dérivé du widget Text

Button(statesdict[, switch, shortcutkey, …])

Widget bouton image.

Stack(**kwargs)

Widget Canvas virtuel.

HStack(**kwargs)

Box virtuelle à layout horizontal.

VStack(**kwargs)

Box virtuelle à layout vertical.

Canvas(**kwargs)

Widget Canvas réel.

HBox(**kwargs)

Box réelle à layout horizontal.

VBox(**kwargs)

Box réelle à layout vertical.

Root(width, height[, resizable, bgcolor, …])

Conteneur racine de l’application.

Class Inheritance Diagram

Inheritance diagram of labpyproject.core.pygame.widgets.Background, labpyproject.core.pygame.widgets.Image, labpyproject.core.pygame.widgets.Text, labpyproject.core.pygame.widgets.Entry, labpyproject.core.pygame.widgets.TextButton, labpyproject.core.pygame.widgets.Button, labpyproject.core.pygame.widgets.Stack, labpyproject.core.pygame.widgets.HStack, labpyproject.core.pygame.widgets.VStack, labpyproject.core.pygame.widgets.Canvas, labpyproject.core.pygame.widgets.HBox, labpyproject.core.pygame.widgets.VBox, labpyproject.core.pygame.widgets.Root