public class GTKWindow

Helper class to open a GTK window and draw to it

Examples

// Code to create the aes here
// ...

// Start gtk window.
const width = 470;
const height = 470;
auto gd = new GTKWindow();
auto tid = new Thread(() { gd.run("plotcli", width, height); }).start();
auto gg = GGPlotD().put( geomHist2D( aes ) );
gd.draw( gg, width, height );
Thread.sleep( dur!("seconds")( 2 ) ); // sleep for 5 seconds

gg = GGPlotD().put( geomPoint( aes ) );
gd.clearWindow();
gd.draw( gg, width, height );

// Wait for gtk thread to finish (Window closed)
tid.join();
public void draw(T)(
    T gg, 
    int width, 
    int height)
public void clearWindow()
public void run(
    string title, 
    int width = 470, 
    int height = 470)

Open the window and run the mainloop. This is blocking, due to the mainloop.

It should be safe to run threaded though

Functions

draw
clearWindow
run

Open the window and run the mainloop. This is blocking, due to the mainloop.