@@ -95,4 +95,21 @@ GtkTextBuffer *result_buffer;
9595GtkWidget *diploma_entry;
9696- Similar to `ssc_entry` and `hsc_entry`, this global entry widget is used for inputting diploma results in the diploma interface.
9797
98+ int main(int argc, char **argv)
99+ - This function is the entry point of the GTK application.
100+ - Initializes GTK with `gtk_init`.
101+ - Creates the main window with a title "NUB Admission Costing Calculator" and sets
102+ its properties like border width, default size, position, and resizability.
103+ - Sets up a grid layout as the main container for the window's content.
104+ - Constructs a menu bar with menu items "Undergraduate" and "Undergraduate (for Diploma Holders)"
105+ which are connected to their respective callback functions to display different interfaces.
106+ - Initializes the `content_area` as a vertical box to hold different interfaces and attaches it to the grid.
107+ - Calls `create_undergraduate_interface` to load the undergraduate interface by default.
108+ - Shows all widgets with `gtk_widget_show_all`.
109+ - Connects the window's destroy event to end the GTK main loop, allowing for clean exit of the application.
110+ - Enters GTK main loop with `gtk_main`.
111+
112+ NOTE: The `main` function sets up the initial state of the application, including window properties, menu options,
113+ and default interface. It also handles event connections for user interactions and application lifecycle.
114+
98115----------------------------------------------------------------------------------------------------------------------------------------
0 commit comments