Skip to content

Commit

Permalink
adding more files
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumChemist committed Sep 30, 2023
1 parent 31afca7 commit 70056bf
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include <iostream>
#include <gtk/gtk.h>

// let's see what's left of the c++ skills...

// Callback function for the button click event
void on_button_clicked(GtkWidget *widget, gpointer data)
{
g_print("LobsterPyGUI feature coming soon!!!\n");
}

int main(int argc, char *argv[])
{
std::cout << "Hello LobsterPyGUI" << std:: endl;

// Initialize GTK+
gtk_init(&argc, &argv);

// Create the main window
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "LobsterPyGUI Prototype");
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);

// Create a button and connect it to the callback function
GtkWidget *button = gtk_button_new_with_label("Click Me!");
g_signal_connect(button, "clicked", G_CALLBACK(on_button_clicked), NULL);

// Add the button to the window
gtk_container_add(GTK_CONTAINER(window), button);

// Show all elements in the window
gtk_widget_show_all(window);

// Start the GTK+ main loop
gtk_main();

return 0;
}
Binary file added utils/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 70056bf

Please sign in to comment.