Skip to content

Commit f875f86

Browse files
Added toplevel file comments, ready for pr
1 parent f97baa8 commit f875f86

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

vpr/src/draw/ui_setup.cpp

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef NO_GRAPHICS
2-
3-
/*
4-
* This file defines all runtime created spin buttons, combo boxes, and labels. All
5-
* button_for_toggle_X() functions are called in initial_setup_X functions in draw.cpp.
6-
* Each function creates a label and a combo box/spin button and connects the signal to
7-
* the corresponding toggle_X callback functions, which are also defined in draw.cpp.
2+
/**
3+
* @file UI_SETUP.CPP
4+
* @author Sebastian Lievano
5+
* @date July 4th, 2022
6+
* @brief Manages setup for main.ui created buttons
87
*
9-
* Authors: Dingyu (Tina) Yang
10-
* Last updated: Aug 2019
8+
* This file contains the various setup functions for all of the ui functions.
9+
* As of June 2022, gtk ui items are to be created through Glade/main.ui file (see Docs)
10+
* Each function here initializes a different set of ui buttons, connecting their callback functions
1111
*/
1212

1313
# include "draw_global.h"
@@ -139,11 +139,21 @@ void routing_button_setup(ezgl::application* app) {
139139
g_signal_connect(toggle_router_util, "changed", G_CALLBACK(toggle_router_util_cbk), app);
140140
}
141141

142+
/**
143+
* @brief connects critical path button to its cbk fn
144+
*
145+
* @param app ezgl application
146+
*/
142147
void crit_path_button_setup(ezgl::application* app) {
143148
GtkComboBoxText* toggle_crit_path = GTK_COMBO_BOX_TEXT(app->get_object("ToggleCritPath"));
144149
g_signal_connect(toggle_crit_path, "changed", G_CALLBACK(toggle_crit_path_cbk), app);
145150
}
146151

152+
/**
153+
* @brief hides critical path button
154+
*
155+
* @param app ezgl app
156+
*/
147157
void hide_crit_path_button(ezgl::application* app) {
148158
hide_widget("CritPathLabel", app);
149159
hide_widget("ToggleCritPath", app);

vpr/src/draw/ui_setup.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#ifndef UI_H
2-
#define UI_H
1+
#ifndef UISETUP_H
2+
#define UISETUP_H
33

44
#ifndef NO_GRAPHICS
5+
/**
6+
* @file UI_SETUP.H
7+
* @author Sebastian Lievano
8+
* @brief declares ui setup functions
9+
*/
510

611
# include "draw_global.h"
712

@@ -22,4 +27,4 @@ void show_widget(std::string widgetName, ezgl::application* app);
2227

2328
#endif /* NO_GRAPHICS */
2429

25-
#endif /* UI_H */
30+
#endif /* UISETUP_H */

0 commit comments

Comments
 (0)