gui.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include "stage_internal.h"
#include "gui.h"
Defines | |
#define | DEBUG 1 |
#define | STG_DEFAULT_WINDOW_HEIGHT 740 |
#define | STG_DEFAULT_WINDOW_WIDTH 700 |
#define | STG_POLY_THRESHOLD 10 |
Functions | |
void | find_close_func (gpointer key, gpointer value, gpointer user_data) |
gboolean | gc_on_motion (GtkWidget *widget, GdkEventButton *event, stg_model_t *model) |
void | gui_load (gui_window_t *win, int section) |
void | gui_model_create (stg_model_t *mod) |
const char * | gui_model_describe (stg_model_t *mod) |
void | gui_model_destroy (stg_model_t *mod) |
void | gui_model_display_pose (stg_model_t *mod, char *verb) |
int | gui_model_grid (stg_model_t *mod, void *userp) |
int | gui_model_lines (stg_model_t *mod, void *userp) |
int | gui_model_mask (stg_model_t *mod, void *userp) |
void | gui_model_mouse (stg_rtk_fig_t *fig, int event, int mode) |
int | gui_model_move (stg_model_t *mod, void *userp) |
int | gui_model_polygons (stg_model_t *mod, void *userp) |
void | gui_model_render_geom (stg_model_t *mod) |
void | gui_model_render_geom_cb (gpointer key, gpointer value, gpointer user) |
void | gui_model_render_geom_global (stg_model_t *mod, stg_rtk_fig_t *fig) |
void | gui_model_trail (stg_model_t *mod) |
void | gui_model_trail_cb (gpointer key, gpointer value, gpointer user) |
void | gui_poll (void) |
void | gui_pose (stg_rtk_fig_t *fig, stg_model_t *mod) |
void | gui_pose_cb (gpointer key, gpointer value, gpointer user) |
void | gui_save (gui_window_t *win) |
void | gui_shutdown (void) |
void | gui_startup (int *argc, char **argv[]) |
gui_window_t * | gui_window_create (stg_world_t *world, int xdim, int ydim) |
void | gui_window_destroy (gui_window_t *win) |
gui_window_t * | gui_world_create (stg_world_t *world) |
void | gui_world_destroy (stg_world_t *world) |
void | gui_world_geom (stg_world_t *world) |
void | gui_world_matrix_table (stg_world_t *world, gui_window_t *win) |
void | gui_world_render_cell (stg_rtk_fig_t *fig, stg_cell_t *cell) |
void | gui_world_render_cell_cb (gpointer cell, gpointer fig) |
void | gui_world_render_cell_occupied (stg_rtk_fig_t *fig, stg_cell_t *cell) |
void | gui_world_trails (stg_world_t *world) |
int | gui_world_update (stg_world_t *world) |
gboolean | quit_dialog (GtkWindow *parent) |
void | render_matrix_object (gpointer key, gpointer value, gpointer user) |
gboolean | signal_delete (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
void | signal_destroy (GtkObject *object, gpointer user_data) |
int | stg_fig_clear_cb (stg_model_t *mod, char *name, void *data, size_t len, void *userp) |
void | stg_model_fig_clear (stg_model_t *mod, const char *figname) |
int | stg_model_fig_clear_cb (stg_model_t *mod, void *data, size_t len, void *userp) |
stg_rtk_fig_t * | stg_model_fig_create (stg_model_t *mod, const char *figname, const char *parentname, int layer) |
stg_rtk_fig_t * | stg_model_fig_get_or_create (stg_model_t *mod, const char *figname, const char *parentname, int layer) |
stg_rtk_fig_t * | stg_model_get_fig (stg_model_t *mod, const char *figname) |
stg_model_t * | stg_world_nearest_model (stg_world_t *world, double wx, double wy) |
Variables | |
int | _render_matrix_deltas = FALSE |
stg_rtk_fig_t * | fig_debug_geom = NULL |
stg_rtk_fig_t * | fig_debug_matrix = NULL |
stg_rtk_fig_t * | fig_debug_rays = NULL |
stg_rtk_fig_t * | fig_trails = NULL |
Define Documentation
#define DEBUG 1 |
#define STG_DEFAULT_WINDOW_HEIGHT 740 |
Referenced by gui_load(), and gui_world_create().
#define STG_DEFAULT_WINDOW_WIDTH 700 |
Referenced by gui_load(), and gui_world_create().
#define STG_POLY_THRESHOLD 10 |
Function Documentation
void find_close_func | ( | gpointer | key, | |
gpointer | value, | |||
gpointer | user_data | |||
) |
Referenced by stg_world_nearest_model().
gboolean gc_on_motion | ( | GtkWidget * | widget, | |
GdkEventButton * | event, | |||
stg_model_t * | model | |||
) |
References TRUE.
const char* gui_model_describe | ( | stg_model_t * | mod | ) |
Referenced by gui_model_display_pose().
void gui_model_render_geom | ( | stg_model_t * | mod | ) |
render a model's geometry if geom viewing is enabled
References gui_model_render_geom_global().
Referenced by gui_model_render_geom_cb().
void gui_model_render_geom_cb | ( | gpointer | key, | |
gpointer | value, | |||
gpointer | user | |||
) |
wrapper for gui_model_render_geom for use in callbacks
References gui_model_render_geom().
Referenced by gui_world_geom().
void gui_model_render_geom_global | ( | stg_model_t * | mod, | |
stg_rtk_fig_t * | fig | |||
) |
render a model's global pose vector
References stg_pose_t::a, stg_geom_t::pose, stg_geom_t::size, stg_model_get_geom(), stg_model_get_global_pose(), stg_model_local_to_global(), stg_rtk_fig_arrow(), stg_rtk_fig_color_rgb32(), stg_rtk_fig_line(), stg_rtk_fig_rectangle(), stg_size_t::x, stg_pose_t::x, stg_size_t::y, and stg_pose_t::y.
Referenced by gui_model_render_geom().
void gui_model_trail | ( | stg_model_t * | mod | ) |
References stg_pose_t::a, STG_LAYER_BODY, stg_model_local_to_global(), stg_rtk_fig_color_rgb32(), stg_rtk_fig_create(), stg_rtk_fig_rectangle(), stg_pose_t::x, and stg_pose_t::y.
Referenced by gui_model_trail_cb().
void gui_model_trail_cb | ( | gpointer | key, | |
gpointer | value, | |||
gpointer | user | |||
) |
void gui_pose | ( | stg_rtk_fig_t * | fig, | |
stg_model_t * | mod | |||
) |
void gui_pose_cb | ( | gpointer | key, | |
gpointer | value, | |||
gpointer | user | |||
) |
References gui_pose().
gui_window_t* gui_window_create | ( | stg_world_t * | world, | |
int | xdim, | |||
int | ydim | |||
) |
References background_event_callback(), gui_window_t::bg, _stg_rtk_canvas_t::canvas, gui_window_t::canvas, gui_window_t::clock_label, FALSE, gui_window_t::fill_polygons, gui_window_t::frame, gui_window_t::frame_format, gui_window_t::frame_interval, gnome_canvas_acetate_get_type(), gui_window_menus_create(), gui_window_t::layout, M_PI, gui_window_t::poses, gui_window_t::show_geom, gui_window_t::show_polygons, signal_delete(), signal_destroy(), gui_window_t::status_bar, STG_GRID_MAJOR_COLOR, stg_lookup_color(), stg_rtk_canvas_bgcolor(), stg_rtk_canvas_create(), stg_rtk_canvas_scale(), stg_rtk_fig_arrow(), stg_rtk_fig_color_rgb32(), stg_rtk_fig_create(), stg_rtk_fig_ellipse(), stg_rtk_fig_rectangle(), STK_IMAGE_FORMAT_PNG, gui_window_t::toggle_list, TRUE, _stg_rtk_canvas_t::userdata, and gui_window_t::world.
Referenced by gui_world_create().
void gui_window_destroy | ( | gui_window_t * | win | ) |
void gui_world_matrix_table | ( | stg_world_t * | world, | |
gui_window_t * | win | |||
) |
References gui_window_t::matrix, and render_matrix_object().
void gui_world_render_cell | ( | stg_rtk_fig_t * | fig, | |
stg_cell_t * | cell | |||
) |
References stg_cell::children, stg_cell::size, stg_rtk_fig_line(), stg_rtk_fig_rectangle(), stg_cell::x, and stg_cell::y.
Referenced by gui_world_render_cell_cb(), and gui_world_update().
void gui_world_render_cell_cb | ( | gpointer | cell, | |
gpointer | fig | |||
) |
References gui_world_render_cell().
void gui_world_render_cell_occupied | ( | stg_rtk_fig_t * | fig, | |
stg_cell_t * | cell | |||
) |
References stg_cell::children, stg_cell::data, stg_cell::size, stg_rtk_fig_rectangle(), stg_cell::x, and stg_cell::y.
Referenced by gui_world_update().
void gui_world_trails | ( | stg_world_t * | world | ) |
gboolean quit_dialog | ( | GtkWindow * | parent | ) |
Referenced by gui_action_exit(), and signal_delete().
void render_matrix_object | ( | gpointer | key, | |
gpointer | value, | |||
gpointer | user | |||
) |
References stg_cell::size, stg_rtk_fig_rectangle(), stg_cell::x, and stg_cell::y.
Referenced by gui_world_matrix_table().
gboolean signal_delete | ( | GtkWidget * | widget, | |
GdkEvent * | event, | |||
gpointer | user_data | |||
) |
References PRINT_MSG, quit_dialog(), stg_quit_request(), and TRUE.
Referenced by gui_window_create().
void signal_destroy | ( | GtkObject * | object, | |
gpointer | user_data | |||
) |
stg_model_t* stg_world_nearest_model | ( | stg_world_t * | world, | |
double | wx, | |||
double | wy | |||
) |
References find_close_func().
Variable Documentation
int _render_matrix_deltas = FALSE |
Referenced by gui_action_matrixdelta(), and stg_matrix_lines().
stg_rtk_fig_t* fig_debug_geom = NULL |
stg_rtk_fig_t * fig_debug_matrix = NULL |
stg_rtk_fig_t* fig_debug_rays = NULL |
stg_rtk_fig_t* fig_trails = NULL |
Generated on Wed Jun 3 23:12:29 2009 for Stage by
