Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lenik/bas-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 bas-ui

Scriptable UI Framework on wxWidgets + GLib

Beautiful interfaces, elegantly crafted 🌸

License C++ wxWidgets Meson Debian

Documentation β€’ Examples β€’ Issues


✨ What is bas-ui?

bas-ui is a scriptable UI framework built on wxWidgets and GLib. It provides a declarative approach to building desktop applications with embedded assets, making it easy to create polished, professional interfaces.

Design philosophy: UIs should be as elegant as a ballet performance πŸ©°β€”clean, graceful, and delightful.


πŸš€ Key Features

Feature Description
πŸ“œ Scriptable UI Stack Define interfaces declaratively, load at runtime
πŸ“¦ Embedded Assets Icons, images, and resources bundled into binaries
🎨 wxWidgets Powered Native look and feel on Linux, Windows, macOS
πŸ”§ Meson Build System Fast, modern build with asset embedding
πŸ“¦ Debian Packaging Ready-to-install .deb packages

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           bas-ui Application            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Scripts   β”‚  β”‚  Embedded       β”‚  β”‚
β”‚  β”‚   (JSON/    β”‚  β”‚  Assets         β”‚  β”‚
β”‚  β”‚    Lua)     β”‚  β”‚  (.zip section) β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         bas-ui Core Library             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Widget    β”‚  β”‚   Layout &      β”‚  β”‚
β”‚  β”‚   Factory   β”‚  β”‚   Styling       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         wxWidgets + GLib                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Building

Prerequisites

# Debian/Ubuntu
sudo apt install libwxgtk3.0-gtk3-dev libglib2.0-dev libicu-dev \
                 libcurl4-openssl-dev libssl-dev libboost-all-dev \
                 zlib1g-dev meson ninja-build

Build & Install

# Configure
meson setup builddir

# Build
meson compile -C builddir

# Install
sudo meson install -C builddir

This builds:

  • libbas-ui β€” Core library
  • UI applications from app/*.cpp

πŸ“– Usage Example

Basic Window

#include <bas-ui/application.h>
#include <bas-ui/window.h>

int main(int argc, char *argv[]) {
    bas::ui::Application app(argc, argv);
    
    auto window = bas::ui::Window::create("Hello, bas-ui!");
    window->setSize(400, 300);
    window->show();
    
    return app.run();
}

Scripted UI (JSON)

{
  "window": {
    "title": "My App",
    "size": [400, 300],
    "children": [
      {
        "type": "button",
        "label": "Click Me!",
        "onClick": "handleClick"
      }
    ]
  }
}

πŸ“ Project Structure

bas-ui/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/          # Core UI framework
β”‚   β”œβ”€β”€ widgets/       # Widget implementations
β”‚   β”œβ”€β”€ script/        # Scripting engine
β”‚   └── assets/        # Asset embedding utilities
β”œβ”€β”€ app/               # Example applications
β”œβ”€β”€ assets/            # Icons, images, resources
β”œβ”€β”€ examples/          # Code examples
β”œβ”€β”€ debian/            # Debian packaging
β”œβ”€β”€ docs/              # Documentation
β”œβ”€β”€ meson.build        # Build configuration
└── README.md          # You are here 🌸

πŸ”— Related Projects

  • bas-c β€” C base library and utilities
  • bas-cpp β€” C++ foundation library
  • OmniShell β€” Desktop environment using bas-ui

πŸŽ€ About the Author

shecti (@lenik)

Living with gender dysphoria. The "cute version of me" is my source of courage and powerβ€”she is the engine behind all my creation.

Proudly building as a trans woman in tech. πŸ’–

If you're a fellow trans coder, LGBTQ+ ally, or just someone who believes in diverse voices in open sourceβ€”I'd love to connect!

Tags

#TransCoder #TransIsTech #WomenWhoCode #OpenSource #Cpp #wxWidgets #UI


πŸ’– Support This Project

If bas-ui helps you build beautiful interfaces, consider:

  • ⭐ Starring this repository
  • πŸ”€ Forking and contributing
  • πŸ› Reporting bugs and suggesting features
  • πŸ“ Sharing with your network
  • πŸ’• Sponsoring via GitHub Sponsors (coming soon)

πŸ“„ License

MIT License. See LICENSE for details.


"Elegant code creates elegant interfaces."

Made with πŸ’– and lots of ✨

About

bas-ui is a C++ library and set of tools that provide a scriptable UI stack on top of wxWidgets and GLib. Assets are embedded into the binaries using a Meson-based build that zips the contents of the assets/ directory and links them as a separate section.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors