I have programed the GUI in C++.
#include <gtk/gtk.h>
#include <unistd.h>
#include <cstddef>
#include <iostream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
int main(){
    GtkWidget *_LinuxWindow, *_Box, *_Button;
    int argC = 0;
    char** argV;
    // Setup the window and fixed grid
    gtk_init(&argC,&argV);
    _LinuxWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    _Box = gtk_fixed_new();
    // Set the title
    gtk_window_set_title(GTK_WINDOW(_LinuxWindow),"Title");
    // Finish up
    gtk_widget_show(_LinuxWindow);
    g_signal_connect(G_OBJECT(_LinuxWindow),"destroy",G_CALLBACK(gtk_main_quit), NULL);
    // Add controls
    _Button = gtk_button_new_with_label("Click Me!");
    gtk_fixed_put(GTK_FIXED(_Box),_Button,20,20);
    gtk_fixed_move(GTK_FIXED(_Box),_Button,20,20);
    gtk_widget_show(_Box);
    gtk_widget_set_size_request(_Button,30,100);
    // Create a dialog
    GtkWidget *dialog;
    dialog =  gtk_message_dialog_new(GTK_WINDOW(_LinuxWindow), GTK_DIALOG_DESTROY_WITH_PARENT,GTK_MESSAGE_INFO,GTK_BUTTONS_OK_CANCEL,"OK or Cancel?",NULL,g_strerror(errno));
    gint ret = gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(GTK_WIDGET(dialog));
    printf("%i", ret);
    // Add the fixed grid and go the to the main window loop
    gtk_container_add(GTK_CONTAINER(_LinuxWindow),_Box);
    gtk_widget_show(_Box);
    gtk_widget_show_all(_LinuxWindow);
    gtk_main();
    return 0;
}
When I run it using
g++ -o out-withoutCross without-cross.cpp -lX11 `pkg-config --cflags gtk+-3.0`pkg-config --libs gtk+-3.0`
A message box and a window appears. The problem is the controls in the window do not appear while the message box is open. I think this may be because the message box is being ran on the same thread that the main window is. Is there any way to add multi-threading to GTK?
Also the return value of the message box printed to console is running after the main window is exited.
