Giter Site home page Giter Site logo

bubble's Introduction

bubble

  • Bubble is a simple and lightweight C++11 dialog library.
  • Bubble creates dialogs boxes, progress bars and radio buttons.
  • Bubble replaces MessageBox() and notify dialogs with ease.
  • Bubble provides callbacks to update dialogs.
  • Bubble has an expressive API based on strings.
  • Bubble has no external dependencies. Only native OS calls are used.
  • Bubble is zlib/libpng licensed.

Samples

#include "bubble.hpp"

int main() {
    bubble::show(
        "title.text=About;"
        "body.icon=14;"
        "body.text=Your app name here;"
        "progress=0;"
        "footer.icon=-3;"
        "footer.text=Made with Bubble dialog library (built " __DATE__ ")",
        []( bubble::vars &ui ) {
            ui["progress"] = ui["progress"] + 10;
        } );

    bubble::notify("notify dialog, using icon #19", "hello world", 19);
}

Possible output

image

image

More samples

Check sample.cc for a few examples

image

image

image

Cons

  • Windows only (for now).

API

  • int bubble::show( string options, [callback] )
  • int bubble::show( map<string,string> options, [callback] )

Variables

  • timeout (int ms) in milliseconds; [0] to stay forever
  • progress (int pct) [0..100] range; [-1] creates an infinite marquee
  • title.text (string)
  • head.text (string)
  • body.icon (int) see note below
  • body.text (string)
  • footer.icon (int) see note below
  • footer.text (string)
  • style.minimizable (bool)
  • style.command_links (bool)
  • style.skippable (bool)
  • style.minimized (bool)
  • style.ontop (bool)
  • exit (int) to close dialog and return exit code from callback
  • [number].text (string)
  • [number].icon (int) see note below

Win32 icons

  • valid icons are in range {-1 = information, -2 = warning, -3 = error, -4 = admin/shield }
  • also in range [1..255] which maps to icons in imageres.dll, as follows:

image

Changelog

  • v1.1.0 (2015/09/25)
    • Add notify / taskbar dialogs
  • v1.0.0 (2015/06/12)
    • Diverse enhancements and clean ups
  • v0.0.0 (2014/xx/xx)
    • Initial commit

bubble's People

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.