Skip to main content

Python binding of HorizonGUI a graphical interface in c++ with OpenGl

Project description

HorizonGUI

Release Language Licence

Introduction

HorizonGUI is a Graphic User Interface library made in C++ with OpenGL. There are also Python bindings available.

Showcase Example

HorizonGUI showcase window

The examples/showcase program demonstrates the main HorizonGUI systems working together in a single window. It creates UI widgets (labels, slider, button, text input), draws on a canvas, shows static and animated sprites, plays a generated tone through the audio stack, and reacts to mouse/keyboard input while renderer effects and delayed tasks are active.

To try the showcase after configuring a build directory, build and run the hgui-showcase target:

cmake -S . -B build
cmake --build build --target hgui-showcase
./build/examples/showcase/bin/hgui-showcase

The executable looks for assets in examples/assets and will generate a temporary tone file on first launch, so make sure those resources stay alongside the repository when you run it.

Installation Instructions

C++ library

You can also simply install a pre-built version here.

Get Source Code

You first need to clone the repository. Make sure to use git and don't forget to include --recurse-submodules when cloning.

git clone https://github.com/Horizon-NTH/HorizonGUI.git --recurse-submodules

You will now able to choose between script or manual installation

Script Installation

Use the install.sh script to compile the library. You can also erase build files by adding -e / --erase.

./install.sh -e

Manual Installation

Create Build Environment

Ensure you have CMake installed. Generate the build environment using CMake:

cd HorizonGUI
mkdir build && cd build
cmake ..
Build
CMake

Build directly using CMake:

cmake --build .

This command will create all the lib files you need in HorizonGUI/lib.

Microsoft Visual Studio

Alternatively, you can use Microsoft Visual Studio to launch the project and build it. Open the horizongui.sln file with Microsoft Visual Studio.

Python binding

To install the Python bindings, you can install it from PyPi using this command: Don't forget to install the scikit-build-core package.

pip install scikit-build-core hgui

Or you can build it from source using those commands:

git clone https://github.com/Horizon-NTH/HorizonGUI.git --recurse-submodules
cd HorizonGUI
pip install ./python

Note: Both methods can take some time due to the compilation of the underlying C++ library.

Once the installation is complete, you can import the module into your Python script using the following statement:

import hgui

Documentation

Please refer to the wiki.

Dependencies

  • OpenGL is used for all graphics in the application.
  • GLFW is used to create windows, contexts, and handle user input.
  • Glad is used to load OpenGL functions.
  • Freetype is used to load fonts and render text.
  • STB is used to load and save images.
  • GLM is used for mathematical operations.
  • OpenAL-Soft is used to play sound.
  • Libsndfile is used to load audio file.
  • Pybind11 is used to create python binding.

License

HorizonGUI is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hgui-4.0.4.tar.gz (25.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hgui-4.0.4-cp313-cp313-macosx_15_0_arm64.whl (5.3 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

File details

Details for the file hgui-4.0.4.tar.gz.

File metadata

  • Download URL: hgui-4.0.4.tar.gz
  • Upload date:
  • Size: 25.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hgui-4.0.4.tar.gz
Algorithm Hash digest
SHA256 f3100b882c2c3e216c3c7d2cea1ed15767754327c47b7388673d2ef9cd8aa609
MD5 9f0c55b73763fa4f2c1ca59a081ec68c
BLAKE2b-256 c151231f7822dac7914689145348609211ad9109fd6af72982c27661e2c0ba26

See more details on using hashes here.

File details

Details for the file hgui-4.0.4-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for hgui-4.0.4-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 88bdc39d51b463971213291965b2d80bfc4d3cd17296d9e70509127738d4f774
MD5 b719d74f3d38fccc63b111fc97c8a369
BLAKE2b-256 a062fb46ea9fc25b38f8448578e68503ea8557e0eac13c78685126a41214eabd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page