Coder Social home page Coder Social logo

pyglet-gui's Introduction

Pyglet-gui is an extension of Pyglet for graphical user interfaces (GUIs). Thanks for checking it out.

This project started as a fork of Kytten, but ended up being a new project by its own right since the API changed dramatically.

Main features

  • Implements a controller-viewer pattern.

    Pyglet-gui uses the concept of "controllers" to handle window events and "viewers" to draw.

    For example, a Button is a subclass of a two-state controller and a viewer.

  • Use of Mixins

    Pyglet-gui uses mixins for extending functionality of viewers and controllers. This increases code reusability and modularity.

    For example, mouse hovering behaviour is added with a HoveringMixin class.

  • Implements an abstraction for graphical appearance

    Pyglet-gui uses "themes" where each (static) resource is defined in a JSON file. This file is loaded, and viewers select specific resources from an unique path.

    For example, the Pyglet-gui standard Button chooses the path

      def get_path(self):
          path = ['button']
          if self.is_pressed():
              path.append('down')
          else:
              path.append('up')
          return path
    
  • Has some standard user interfaces:

    • Button, Slider
    • Option selector, Dropdown
    • Vertical, Horizontal, Grid containers.
    • Scrollable content display

Installation

  1. Get a copy of the source from GitHub.

  2. python setup.py install

Documentation

The documentation can be found in the read the docs.

Running tests

To run Pyglet-gui full test suite, use

python -m tests.runtests

To run a specific module, use

python -m tests.specificModule

Contributors

The contributor of Kytten was Conrad "Lynx" Wong, which this project reuses.

Jorge C. Leitão designed, unit tested and documented the API.

pyglet-gui's People

Contributors

jorgecarleitao avatar jorgehatccrma avatar norberg avatar tredfern avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.