Giter Site home page Giter Site logo

daodaoliang / pyimgui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pyimgui/pyimgui

0.0 1.0 0.0 390 KB

Cython-based Python bindings for dear imgui

Home Page: http://pyimgui.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.63% Batchfile 0.35% Python 96.99% Shell 1.15% C++ 0.40% C 0.48%

pyimgui's Introduction

completion Coverage Status

Builds:

  • Build status (Windows)
  • Build Status (OS X & Linux)

pyimgui

pyimgui is a Cython-based binding for impressive dear imgui C++ library - a Bloat-free Immediate Mode Graphical User Interface.

It is still unfinished project but I plan to provide minimal fully-functional binding in incoming few months. Any help would be appreciated.

why?

dear imgui looks very interesting. I wanted to give it a try becasue I was looking for simple GUI solution for my little Python-based game engine (to be opensourced soon!). Offical dear imgui Wiki used to say that there is some other Python binding available (cyimgui) but it quickly turned out that it far from completion and isn't even barely usable.

In fact, my initial experimental work on this project was based on the cyimgui code base. After only three days of developlment my code had almost nothing in common with the cyimgui. This fact and vanity made me start my own project instead of forking the cyimgui.

project status

pyimgui is working! It's not feature complete and only small subset of ImGui API is mapped right now. But you can run examples with ImGui test windows (see: docs/examples/glfw3/) and everything should work wihout any issues.

Example integration with glfw supports all inputs and renders GUI as expected.

Project has working build pipeline on Appveyor and Travis and builds succesfully for all major operating systems with different architectures:

  • Windows (32bit & 64bit)
  • Linux (32bit & 64bit)
  • OS X (universal build)

Right now I am ready to ship working built wheels for all these systems (even for Linux using manylinux1 wheels). Build pipeline also works on different Python versions:

  • py27
  • py33
  • py34
  • py35

Project has has even working Sphinx documentation with custom extension that is able to offscreen render GUI examples from docstring snippets. It is already hosted on ReadTheDocs and images are provided with git-lfs. See for yourself: pyimgui.readthedocs.io.

The only thing that is stopping me from publishing it on PyPI is lack of support for most of the ImGui core widgets. Anyway, the hardest parts are already done (like wiring C assert macros to custom Python exceptions, creating build pipeline for Python wheels, or integrating with GLFW). Adding new functions, widgets or integrations (e.g. Pygame, GLUT) should be simple from now.

Unfortunately this is really toilsome work. A lot of copy-pasting and manual type-casting. It will take me weeks to provide minimal usable feature set if I have to work alone. This is why I encourage anyone (even unexperienced Python/Cython programmers) to contribute. It's not a rocket science and it will help me to release project officially sooner.

In case of any issues with building/testing just ask me for help by creating GitHub issue. I have tried hard to make project building and bootstraping as simple as possible (see development tips) but it still may not be perfect.

development tips

Make sure you have created and activated virtual environment using virtualenv or python -m venv (on newer Python releases). Then you can just run:

make build

Following will bootstrap whole environment (pull git submodules, install dev requirements etc.) and build the project. Make will automatically install pyimgui in "development" mode. Then you can run example in doc/examples to see if it is working.

For testing string documentation you will need some additional requirements from doc/requirements-docs.txt.

pyimgui's People

Contributors

swistakm avatar supudo avatar wiatrogon 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.