-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31afca7
commit 70056bf
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.