Skip to content

Commit 5750a32

Browse files
added submit button callback function documentation
1 parent 76d764d commit 5750a32

File tree

1 file changed

+32
-0
lines changed
  • NUB_Admission_Costing_Calculator/docs

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
------------------------------------------------------------main.c------------------------------------------------------------
2+
3+
You should know:
4+
- D_ prefix is used for Diploma Holder functions.
5+
6+
void on_submit_button_clicked(GtkWidget *widget, gpointer data)
7+
- Handles the 'submit' button click event in a GTK application.
8+
- Retrieves text from SSC and HSC entry widgets and the selected department from a combo box.
9+
- Checks if any of the required fields are empty and displays a message if so.
10+
- Converts the retrieved text to float values for SSC and HSC results.
11+
- Initializes an Undergraduate struct with pointers to department-specific functions.
12+
- Calls the appropriate function based on the selected department,
13+
passing SSC and HSC results along with a callback function to display results.
14+
- Frees memory allocated by GTK for the selected department string.
15+
16+
NOTE: This function is crucial for processing user input and ensuring that all required
17+
fields are filled before proceeding with department-specific calculations or actions.
18+
19+
void D_on_submit_button_clicked(GtkWidget *widget, gpointer data)
20+
- Serves as a callback for the 'submit' button in the diploma interface of a GTK application.
21+
- Retrieves text from the diploma entry widget and the selected department from a combo box.
22+
- Checks if any of the required fields are empty and displays a message if so.
23+
- Converts the retrieved text to a float value for the diploma result.
24+
- Initializes an `UndergraduateDiploma` struct with pointers to department-specific functions for diploma holders.
25+
- Calls the appropriate function based on the selected department,
26+
passing the diploma result along with a callback function to display results.
27+
- Frees memory allocated by GTK for the selected department string.
28+
29+
NOTE: This function is essential for processing diploma holder input and ensuring that all required
30+
fields are filled before proceeding with department-specific calculations or actions.
31+
32+
------------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)