GTK interface functions. More...
#include <gtk_interface.h>
Go to the source code of this file.
Functions | |
void * | interface_init (void *dummy) |
Main interface function. Object/Widget building. | |
void | on_about_menu_item_activate (GtkObject *object, gpointer user_data) |
Callback for menu "about" dialog window construction "activate" event. | |
void | on_ajustament_hscale_value_changed_event (GtkAdjustment *adjustment, gpointer user_data) |
Callback for constant servo speed hscale "changed" event. | |
void | on_application_exit (GtkObject *object, gpointer user_data) |
Callback for destroy signal. | |
void | on_back_facing_menu_item_activate (GtkMenuItem *menuitem, gpointer user_data) |
Callback for back facing menu item choice "activate" event. | |
void | on_button_calibration_clicked (GtkWidget *widget, gpointer user_data) |
Callback for calibration button "clicked" event. | |
void | on_button_go_toggled (GtkWidget *widget, gpointer user_data) |
Callback for the set go button "toggled" event. | |
void | on_button_release_all_clicked (GtkWidget *widget, gpointer user_data) |
Callback for the release all servos button "clicked" event. | |
void | on_button_set_pos_all_clicked (GtkWidget *widget, gpointer user_data) |
Callback for the set position to all servomotors "clicked" event. | |
void | on_button_set_robot_home_pos_clicked (GtkWidget *widget, gpointer user_data) |
Callback for robot home position button "clicked" event. | |
void | on_button_setpos_clicked (GtkWidget *widget, gpointer user_data) |
Callback for the set position button "clicked" event. | |
void | on_button_setspeed_clicked (GtkWidget *widget, gpointer user_data) |
Callback for the set speed button "clicked" event. | |
void | on_button_start_loop_clicked (GtkWidget *widget, gpointer user_data) |
Callback for loop start button "clicked" event. | |
void | on_button_stop_toggled (GtkWidget *widget, gpointer user_data) |
Callback for the set stop button "toggled" event. | |
void | on_button_test_invkin_clicked (GtkWidget *widget, gpointer user_data) |
Callback for test arm inverse kinematics button "clicked" event. | |
void | on_button_vbuttonbox_update_robot_data_clicked (GtkWidget *widget, gpointer user_data) |
Callback for update robot data button "clicked" event. | |
void | on_constant_speed_radio_checkbox_toggled (GtkWidget *widget, gpointer other_checkbox) |
Callback for constant speed checkbox "toggled" event. | |
void | on_control_resolution_toggled (GtkWidget *widget, gpointer user_data) |
Callback for control resolution checkboxes "toggled" event. | |
void | on_controled_speed_radio_checkbox_toggled (GtkWidget *widget, gpointer other_checkbox) |
Callback for controled speed checkbox "toggled" event. | |
void | on_demo_checkboxes_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
Callback for demo choice checkboxes "toggled" event. | |
void | on_front_facing_menu_item_activate (GtkMenuItem *menuitem, gpointer user_data) |
Callback for front facing menu item choice "activate" event. | |
void | on_notebook_change_current_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data) |
Callback for notebook page "changed" event. | |
void | on_page1_left_top_frame_combobox_changed_event (GtkWidget *widget, gpointer user_data) |
Callback for control type combo box item "changed" event. | |
void | on_page2_select_id_combobox_for_position_changed_event (GtkWidget *widget, gpointer label_data) |
Callback for the set position id selection combo box "changed" event. | |
void | on_user_path_demo_clear_button_clicked (GtkWidget *widget, gpointer user_data) |
Callback for clear path points button "clicked" event. | |
void | on_user_path_demo_point_store_button_clicked (GtkWidget *widget, gpointer user_data) |
Callback for user path store points button "clicked" event. | |
void | on_user_path_demo_run_button_clicked (GtkWidget *widget, gpointer user_data) |
Callback for user path run points button "clicked" event. | |
void | on_workspace_scaling_toggled (GtkWidget *widget, gpointer user_data) |
Callback for workspace scaling checkboxes "toggled" event. | |
void | select_inv_kin_combobox_changed_event (GtkWidget *widget, gpointer user_data) |
Callback for inverse kinematics combobox "changed" event. | |
gboolean | update_watcher (gpointer data_struct) |
Function launched in timeout for taking care of label updates. | |
void | user_path_demo_run_checkbox_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
Callback for path following run once/loop checkboxes "toggled" event. |
GTK interface functions.
Definition in file gtk_interface.cpp.
void* interface_init | ( | void * | dummy | ) |
Main interface function. Object/Widget building.
This function builds the interface and the widgets. It also connects the signals and events and initializes main GTK loop.
dummy | a dummy void type input (required for threading). |
Definition at line 1141 of file gtk_interface.cpp.
void on_about_menu_item_activate | ( | GtkObject * | object, | |
gpointer | user_data | |||
) |
Callback for menu "about" dialog window construction "activate" event.
This function executes any time the user presses the "About" menu in the menu bar. Contains developer information and contacts.
object | a GtkObject reference. | |
user_data | a gpointer type data. |
Definition at line 362 of file gtk_interface.cpp.
void on_ajustament_hscale_value_changed_event | ( | GtkAdjustment * | adjustment, | |
gpointer | user_data | |||
) |
Callback for constant servo speed hscale "changed" event.
This function executes any time the user changes the hscale value.
adjustment | a GtkAdjustment reference. | |
user_data | a gpointer type data. |
Definition at line 98 of file gtk_interface.cpp.
void on_application_exit | ( | GtkObject * | object, | |
gpointer | user_data | |||
) |
Callback for destroy signal.
This function executes any time a destroy signal is caught by the interface.
object | a GtkObject reference. | |
user_data | a gpointer type data. |
Definition at line 13 of file gtk_interface.cpp.
void on_back_facing_menu_item_activate | ( | GtkMenuItem * | menuitem, | |
gpointer | user_data | |||
) |
Callback for back facing menu item choice "activate" event.
[NOT WORKING]This function updates the control type to back-facing.
menuitem | a GtkMenuItem reference. | |
user_data | a gpointer. |
Definition at line 747 of file gtk_interface.cpp.
void on_button_calibration_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for calibration button "clicked" event.
This function launches a small window wich is used to check the joystick calibration. Instructions are given in the window text.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 707 of file gtk_interface.cpp.
void on_button_go_toggled | ( | GtkWidget * | widget, | |
gpointer | other_toggle_button | |||
) |
Callback for the set go button "toggled" event.
This function executes any time the user toggles the set go button and sends the command accordingly. Toggling this button untoggles the other.
widget | a GtkWidget reference. | |
other_toggle_button | a gpointer to the set stop button. |
Definition at line 336 of file gtk_interface.cpp.
void on_button_release_all_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for the release all servos button "clicked" event.
This function executes any time the user clicks the release all servomotors button and sends the command accordingly.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 328 of file gtk_interface.cpp.
void on_button_set_pos_all_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for the set position to all servomotors "clicked" event.
This function executes any time the user presses the button send a position to all the servos. The functions will atempt to convert the position. If the position is not reachable, the joint holds still.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 376 of file gtk_interface.cpp.
void on_button_set_robot_home_pos_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for robot home position button "clicked" event.
This function executes any time the user presses the robot home position button. It executes necessary commands for setting the robot to its home position.
widget | a GtkWidget reference. | |
user_data | a gpointer type data. |
Definition at line 24 of file gtk_interface.cpp.
void on_button_setpos_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for the set position button "clicked" event.
This function executes any time the user clicks the set position button. It sends a set position command for the joint selected in the combo box with the position converted from the entry box input.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 229 of file gtk_interface.cpp.
void on_button_setspeed_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for the set speed button "clicked" event.
This function executes any time the user presses the button to set speed.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 409 of file gtk_interface.cpp.
void on_button_start_loop_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for loop start button "clicked" event.
This function executes any time the user presses the start/stop loop button. It executes required functions for haptic/control loops.
widget | a GtkWidget reference. | |
user_data | a gpointer type data. |
Definition at line 39 of file gtk_interface.cpp.
void on_button_stop_toggled | ( | GtkWidget * | widget, | |
gpointer | other_toggle_button | |||
) |
Callback for the set stop button "toggled" event.
This function executes any time the user toggles the set stop button and sends the command accordingly. Toggling this button untoggles the other.
widget | a GtkWidget reference. | |
other_toggle_button | a gpointer to the set stop go button. |
Definition at line 349 of file gtk_interface.cpp.
void on_button_test_invkin_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for test arm inverse kinematics button "clicked" event.
This function tries X, Y and Z coordinates thru inverse kinematics defined in entry text boxes.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 652 of file gtk_interface.cpp.
void on_button_vbuttonbox_update_robot_data_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for update robot data button "clicked" event.
This function executes any time the user presses the update robot data button, sending commands to reads joint values and updating limb end coordinates.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 519 of file gtk_interface.cpp.
void on_constant_speed_radio_checkbox_toggled | ( | GtkWidget * | widget, | |
gpointer | other_checkbox | |||
) |
Callback for constant speed checkbox "toggled" event.
This function executes any time the user toggles the checkbox. It hides and shows items on the frame the checkbox is on.
widget | a GtkWidget reference. | |
other_checkbox | a gpointer to the other checkbox widget. |
Definition at line 108 of file gtk_interface.cpp.
void on_control_resolution_toggled | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for control resolution checkboxes "toggled" event.
This function updates the data structure with chosen control resolution.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 530 of file gtk_interface.cpp.
void on_controled_speed_radio_checkbox_toggled | ( | GtkWidget * | widget, | |
gpointer | other_checkbox | |||
) |
Callback for controled speed checkbox "toggled" event.
This function executes any time the user toggles the checkbox. It hides and shows items on the frame the checkbox is on.
widget | a GtkWidget reference. | |
other_checkbox | a gpointer to the other checkbox widget. |
Definition at line 140 of file gtk_interface.cpp.
void on_demo_checkboxes_toggled | ( | GtkToggleButton * | togglebutton, | |
gpointer | user_data | |||
) |
Callback for demo choice checkboxes "toggled" event.
This function is called after the user choses a demo.
togglebutton | a GtkToggleButton reference. | |
user_data | a gpointer. |
Definition at line 765 of file gtk_interface.cpp.
void on_front_facing_menu_item_activate | ( | GtkMenuItem * | menuitem, | |
gpointer | user_data | |||
) |
Callback for front facing menu item choice "activate" event.
[DEFAULT]This function updates the control type to front-facing.
menuitem | a GtkMenuItem reference. | |
user_data | a gpointer. |
Definition at line 756 of file gtk_interface.cpp.
void on_notebook_change_current_page | ( | GtkNotebook * | notebook, | |
GtkNotebookPage * | page, | |||
guint | page_num, | |||
gpointer | user_data | |||
) |
Callback for notebook page "changed" event.
This function is called by the "changed" event from the main page notebook.
notebook | pointer to the notebook GtkWidget. | |
page | pointer to the notebook page. | |
page_num | the page number from the selected page. | |
user_data | a gpointer. |
Definition at line 739 of file gtk_interface.cpp.
void on_page1_left_top_frame_combobox_changed_event | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for control type combo box item "changed" event.
This function executes any time the user changes the control type combo box.
widget | a GtkWidget reference. | |
user_data | a gpointer type data. |
Definition at line 72 of file gtk_interface.cpp.
void on_page2_select_id_combobox_for_position_changed_event | ( | GtkWidget * | widget, | |
gpointer | label_data | |||
) |
Callback for the set position id selection combo box "changed" event.
This function executes any time the user toggles the combo box for id selection to set position of a joint.
widget | a GtkWidget reference. | |
label_data | a gpointer to the angle limitation label widget. |
Definition at line 172 of file gtk_interface.cpp.
void on_user_path_demo_clear_button_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for clear path points button "clicked" event.
This function is called by the clicking of the clear button for path following.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 1022 of file gtk_interface.cpp.
void on_user_path_demo_point_store_button_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for user path store points button "clicked" event.
This function is called by the clicking of the store points button for path following.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 943 of file gtk_interface.cpp.
void on_user_path_demo_run_button_clicked | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for user path run points button "clicked" event.
This function is called by the clicking of the run points button for path following.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 998 of file gtk_interface.cpp.
void on_workspace_scaling_toggled | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for workspace scaling checkboxes "toggled" event.
This function updates the data structure with chosen workspace scale.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 591 of file gtk_interface.cpp.
void select_inv_kin_combobox_changed_event | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Callback for inverse kinematics combobox "changed" event.
This function is called by the inverse kinematics combobox "changed" event signal.
widget | a GtkWidget reference. | |
user_data | a gpointer. |
Definition at line 905 of file gtk_interface.cpp.
gboolean update_watcher | ( | gpointer | data_struct | ) |
Function launched in timeout for taking care of label updates.
This function loops wainting for requests to update the labels.
data_struct | a data structure passed on. |
Definition at line 1046 of file gtk_interface.cpp.
void user_path_demo_run_checkbox_toggled | ( | GtkToggleButton * | togglebutton, | |
gpointer | user_data | |||
) |
Callback for path following run once/loop checkboxes "toggled" event.
This function is called after the user choses to run the path once or in loop.
togglebutton | a GtkToggleButton reference. | |
user_data | a gpointer. |
Definition at line 965 of file gtk_interface.cpp.