Make C++ applications with a simple modern GUI with the least amount of code.
Made with just this amount of code:
#include "Jaraan/Jaraan.h"
void select(int n , Label lb) {
switch (n) {
case 1: lb.setText("¡Hola amigo!"); break;
case 2: lb.setText("Hello friend!"); break;
case 3: lb.setText("Hallo freund!"); break;
case 4: lb.setText("Salve amici!"); break;
}
}
int main()
{
Window window(800, 600, "Jaraan");
Label label(10, 2, "Select a language", 24);
Button btn1(1, 1, "Spanish", 12, [label]() {select(1 , label); });
Button btn2(1, 2, "English", 12, [label]() {select(2, label); });
Button btn3(1, 3, "Deutsch", 12, [label]() {select(3 , label); });
Button btn4(1, 4, "Latin", 12, [label]() {select(4 , label); });
window.Update();
return 0;
}
If using git, clone the repo with
git clone https://github.com/Kuvrot/Jaraan.git
-
Configure and build your project. Most popular IDEs support CMake projects with very little effort on your part.
- Visual Studio (recommended)
- VS Code via the CMake extension
- CLion
- Qt Creator
Using CMake from the command line is straightforward as well.
For a single-configuration generator (typically the case on Linux and macOS):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build
For a multi-configuration generator (typically the case on Windows):
cmake -S . -B build cmake --build build --config Release
If using Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:
sudo apt update
sudo apt install \
libxrandr-dev \
libxcursor-dev \
libudev-dev \
libfreetype-dev \
libopenal-dev \
libflac-dev \
libvorbis-dev \
libgl1-mesa-dev \
libegl1-mesa-dev
- Download a font
- Download the Arial font
- After the cmake build is done, go to your Jaraan repo and then go to
out > build > x64_Debug > bin
and put the arial.ttf file inside the bin folder.
- Widgets
- labels
- buttons
- text field
- text area
- dropdown
- check box
- slider
- add icons to buttons
- Enhancement
- Good layout system
- Multimedia
- interactions with audio
- video and images support