1. What is this document?

This document is the index to the djnn libraries recipes. This cookbook is made for programmers who wish to learn from examples. It contains fragments of code that each show how to a achieve a given task: drawing a rectangle, opening multiple windows, connecting components, etc. Most examples are executable as is, some are not. Some address basic needs, while others are more complex recipes.

This cookbook is structured by topics. You can access the examples by following the links. In theory, your browser should think that the examples are pure text and display them. Otherwise, you will need to save them to disk and open them with a text editor.

Some examples are executable. If you want to test them, you will need to save them to disk, compile and execute them, supposing that djnn is properly installed on your computer.

2. Drawing

2.1. Windowing

How to open windows on the screen.

2.2. Graphical objects

How to create shapes, gradients, etc.

2.3. Loading graphics

How to load graphical components from SVG files.

3. Behaviors

4. Creating the component tree

4.1. Building components

  • To be written: creating a simple component

  • A Button component: Creating and using a C++ component class that you can instantiate at will.

5. Input

6. Communication

6.1. Ivy

How to use the Ivy message bus.

7. Modules and plugins

How to dynamically load modules.

8. Adding extensions in C++

How to add external code to your djnn application or create new modules.