package bogue
Build not checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=dd71cf658cc3591236352a366eb306ed
sha512=86504940b381bce091880ab8caa5cc9875aebf702613f7a3b4d2f419d7ce97b98a80b2572b14ae2bcafcb6ed7ec113ebae2c5dc96f11a59f591e78b1c61d03b9
Description
bogue is a GUI library for ocaml, with animations, based on SDL2.
This library can be used for games or for adding GUI elements to any ocaml program.
It uses the SDL2 renderer library, which makes it quite fast.
It is themable, and does not try to look like your desktop. Instead, it will look the same on every platform.
Graphics output is scalable, and hence easily adapts to Hi-DPI displays.
Programming with bogue is easy if you're used to GUIs with widgets, layouts, callbacks, and of course it has a functional flavor. It uses Threads when non-blocking reactions are needed.
README
Bogue 
bogue is a GUI library for ocaml, with animations, based on SDL2.
This library can be used for games or for adding GUI elements to any ocaml program.
It uses the SDL2 renderer library, which makes it quite fast.
It is themable, and does not try to look like your desktop. Instead, it will look the same on every platform.
Graphics output is scalable, and hence easily adapts to Hi-DPI displays.
Programming with bogue is easy if you're used to GUIs with widgets, layouts, callbacks, and of course it has a functional flavor. It uses Threads when non-blocking reactions are needed.
Features
Widgets
Widgets are the building bricks, responsible for graphic elements that respond to events (mouse, touchscreen, keyboard, etc.).
For a more functional use, they can be "connected" (by pairs at this moment) instead of reacting with callbacks (see examples).
- check box
- push button (with labels or images)
- rich text display
- image (all usual formats)
- slider (horizontal, vertical, or circular)
- text input
Layouts
widgets can be combined in various ways into layouts. For instance, a check box followed by a text label is a common layout.
Several predefined layouts are available:
- scrollable list (that can easily handle a large number of elements)
- multi-column table
- tabs
- popup
- various menus (menu bar, drop down menus with submenus)
- select list
- radio list
Layouts can be animated (slide-in, transparency, rotation)
Screenshots

Videos
Installation
Using the opam package
This is the easiest way unless you want to try out the development version.
opam install bogueThat's it.
Building from sources
Prerequisites
You need a working ocaml installation with opam, see the ocaml doc. Then, make sure you have dune, tsdl, tsdl-image and tsdl-ttf:
opam install dune tsdl tsdl-image tsdl-ttfGet the latest source
Download the git archive, unzip it, cd into the bogue-master dir, and then:
dune build
opam install .Documentation
It's good to first have a look at Bogue's general principles.
A much more complete doc can be found here. It does not cover all available features (yet), but it's already a good start.
Examples
You should first try a minimal example.
The examples directory contains more sophisticated examples. If you installed the bogue package with opam (as described above), these examples are available via the boguex program. For instance, run examples 34 and 41 by:
boguex 34 41Type boguex -h to have the list of all examples.
A minimal app using Bogue
See here.
Dependencies (5)
-
tsdl
>= "0.9.7" & < "0.9.9" -
ocaml
>= "4.08.0" & < "5.4.0" -
tsdl-ttf
>= "0.3" -
tsdl-image
>= "0.3.0" -
dune
>= "2.7"
Dev Dependencies (1)
-
odoc
with-doc
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building bogue with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
This version is not in the latest run; the versions below are.
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure