#include <dirent.h>#include <gtk/gtk.h>#include <glib.h>#include <unistd.h>#include <errno.h>#include <cstdio>#include <sys/socket.h>#include <sys/un.h>#include <fcntl.h>#include <cstdarg>#include "shapelst.h"#include "shapevga.h"#include "Flex.h"#include "studio.h"#include "utils.h"#include "u7drag.h"#include "shapegroup.h"#include "shapefile.h"#include "locator.h"#include "combo.h"#include "Configuration.h"#include "objserial.h"#include "exceptions.h"#include "logo.xpm"#include "fnames.h"#include "execbox.h"Include dependency graph for studio.cc:

Go to the source code of this file.
Namespaces | |
| namespace | EStudio |
Classes | |
| struct | _FileTreeItem |
Typedefs | |
| typedef _FileTreeItem | FileTreeItem |
Enumerations | |
| enum | ExultFileTypes { ShapeArchive = 1, ChunkArchive, PaletteFile, FlexArchive, ComboArchive } |
| enum | { FOLDER_COLUMN = 0, FILE_COLUMN, DATA_COLUMN, NUM_COLUMNS } |
Functions | |
| static void | Filelist_selection (GtkTreeView *treeview, GtkTreePath *path) |
| void | on_filelist_tree_cursor_changed (GtkTreeView *treeview) |
| void | on_open_game_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_new_game_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_connect_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_save_all1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_new_shapes_file_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_new_shape_file_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_save_map_menu_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_read_map_menu_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_save_shape_info1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_reload_usecode_menu_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_compile_usecode_menu_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_save_groups1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_save_combos1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_preferences_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_cut1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_copy1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_paste1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_properties1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_basic_properties1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_move1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_paint1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_paint_with_chunks1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_pick_for_combo1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_unused_shapes1_activate (GtkMenuItem *menuitem, gpointer user_data) |
| void | on_play_button_clicked (GtkToggleButton *button, gpointer user_data) |
| void | on_tile_grid_button_toggled (GtkToggleButton *button, gpointer user_data) |
| void | on_edit_lift_spin_changed (GtkSpinButton *button, gpointer user_data) |
| void | on_hide_lift_spin_changed (GtkSpinButton *button, gpointer user_data) |
| void | on_edit_terrain_button_toggled (GtkToggleButton *button, gpointer user_data) |
| void | on_choose_directory (gchar *dir, gpointer user_data) |
| gint | on_main_window_configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer data) |
| gboolean | on_main_window_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
| void | on_main_window_destroy_event (GtkWidget *widget, gpointer data) |
| void | on_main_window_quit (GtkMenuItem *menuitem, gpointer user_data) |
| gboolean | on_main_window_focus_in_event (GtkWidget *widget, GdkEventFocus *event, gpointer user_data) |
| bool | Window_has_focus (GtkWindow *win) |
| bool | Is_dir_marker (char c) |
| void | on_choose_new_game_dir (const char *dir, gpointer udata) |
| void | add_to_tree (GtkTreeStore *model, const char *folderName, const char *files, ExultFileTypes file_type) |
| static void | Insert_text (GtkEditable *ed, const char *text, int &pos) |
| void | on_prompt3_yes_clicked (GtkToggleButton *button, gpointer user_data) |
| void | on_prompt3_no_clicked (GtkToggleButton *button, gpointer user_data) |
| void | on_prompt3_cancel_clicked (GtkToggleButton *button, gpointer user_data) |
| int | EStudio::Prompt (const char *msg, const char *choice0, const char *choice1, const char *choice2) |
| void | EStudio::Alert (const char *msg,...) |
| GtkWidget * | EStudio::Add_menu_item (GtkWidget *menu, const char *label, GtkSignalFunc func, gpointer func_data) |
| GtkWidget * | EStudio::Create_arrow_button (GtkArrowType dir, GtkSignalFunc clicked, gpointer func_data) |
| void | on_prefs_cancel_clicked (GtkButton *button, gpointer user_data) |
| void | on_prefs_apply_clicked (GtkButton *button, gpointer user_data) |
| void | on_prefs_okay_clicked (GtkButton *button, gpointer user_data) |
| void | on_prefs_background_choose_clicked (GtkButton *button, gpointer user_data) |
| gboolean | on_prefs_background_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data) |
| gboolean | on_prefs_window_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
| static gint | Reconnect (gpointer data) |
| static void | Read_from_server (gpointer data, gint socket, GdkInputCondition condition) |
| gint | Do_Drop_Callback (gpointer data) |
Variables | |
| Configuration * | config = 0 |
| const std::string | c_empty_string |
| static char * | mode_names [4] |
| static int | prompt_choice = 0 |
| typedef struct _FileTreeItem FileTreeItem |
| anonymous enum |
| enum ExultFileTypes |
| void add_to_tree | ( | GtkTreeStore * | model, | |
| const char * | folderName, | |||
| const char * | files, | |||
| ExultFileTypes | file_type | |||
| ) |
Definition at line 949 of file studio.cc.
References DATA_COLUMN, FILE_COLUMN, FOLDER_COLUMN, get_system_path(), and U7exists().
Referenced by ExultStudio::setup_file_list().
Here is the call graph for this function:

| gint Do_Drop_Callback | ( | gpointer | data | ) |
| static void Filelist_selection | ( | GtkTreeView * | treeview, | |
| GtkTreePath * | path | |||
| ) | [static] |
Definition at line 105 of file studio.cc.
References ChunkArchive, ComboArchive, ExultStudio::create_browser(), DATA_COLUMN, FILE_COLUMN, ExultStudio::get_instance(), PaletteFile, ExultStudio::set_browser(), and ShapeArchive.
Referenced by on_filelist_tree_cursor_changed().
Here is the call graph for this function:

| static void Insert_text | ( | GtkEditable * | ed, | |
| const char * | text, | |||
| int & | pos | |||
| ) | [static] |
| bool Is_dir_marker | ( | char | c | ) | [inline] |
| void on_basic_properties1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 283 of file studio.cc.
References Exult_server::edit_selected, ExultStudio::get_instance(), and ExultStudio::send_to_server().
Here is the call graph for this function:

| void on_choose_directory | ( | gchar * | dir, | |
| gpointer | user_data | |||
| ) |
Definition at line 376 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_game_path().
Referenced by ExultStudio::choose_game_path().
Here is the call graph for this function:

| void on_choose_new_game_dir | ( | const char * | dir, | |
| gpointer | udata | |||
| ) |
| void on_compile_usecode_menu_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 221 of file studio.cc.
References ExultStudio::compile(), and ExultStudio::get_instance().
Here is the call graph for this function:

| void on_connect_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 165 of file studio.cc.
References ExultStudio::connect_to_server(), and ExultStudio::get_instance().
Here is the call graph for this function:

| void on_copy1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 258 of file studio.cc.
References Exult_server::cut, ExultStudio::get_instance(), and ExultStudio::send_to_server().
Here is the call graph for this function:

| void on_cut1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 249 of file studio.cc.
References Exult_server::cut, ExultStudio::get_instance(), and ExultStudio::send_to_server().
Here is the call graph for this function:

| void on_edit_lift_spin_changed | ( | GtkSpinButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 353 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_edit_lift().
Here is the call graph for this function:

| void on_edit_terrain_button_toggled | ( | GtkToggleButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 369 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_edit_terrain().
Here is the call graph for this function:

| void on_filelist_tree_cursor_changed | ( | GtkTreeView * | treeview | ) |
Definition at line 141 of file studio.cc.
References Filelist_selection().
Here is the call graph for this function:

| void on_hide_lift_spin_changed | ( | GtkSpinButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 361 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_hide_lift().
Here is the call graph for this function:

| gint on_main_window_configure_event | ( | GtkWidget * | widget, | |
| GdkEventConfigure * | event, | |||
| gpointer | data | |||
| ) |
Definition at line 386 of file studio.cc.
References ExultStudio::get_instance(), ExultStudio::get_spin(), and ExultStudio::set_spin().
Here is the call graph for this function:

| gboolean on_main_window_delete_event | ( | GtkWidget * | widget, | |
| GdkEvent * | event, | |||
| gpointer | user_data | |||
| ) |
Definition at line 403 of file studio.cc.
References ExultStudio::get_instance().
Here is the call graph for this function:

| void on_main_window_destroy_event | ( | GtkWidget * | widget, | |
| gpointer | data | |||
| ) |
| gboolean on_main_window_focus_in_event | ( | GtkWidget * | widget, | |
| GdkEventFocus * | event, | |||
| gpointer | user_data | |||
| ) |
Definition at line 435 of file studio.cc.
References Shape_chooser::check_editing_files().
Here is the call graph for this function:

| void on_main_window_quit | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 425 of file studio.cc.
References ExultStudio::get_instance().
Here is the call graph for this function:

| void on_move1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 292 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_edit_mode().
Here is the call graph for this function:

| void on_new_game_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 158 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::new_game().
Here is the call graph for this function:

| void on_new_shape_file_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 186 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::new_shape_file().
Here is the call graph for this function:

| void on_new_shapes_file_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 179 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::new_shape_file().
Here is the call graph for this function:

| void on_open_game_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 151 of file studio.cc.
References ExultStudio::choose_game_path(), and ExultStudio::get_instance().
Here is the call graph for this function:

| void on_paint1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 301 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_edit_mode().
Here is the call graph for this function:

| void on_paint_with_chunks1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 309 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_edit_mode().
Here is the call graph for this function:

| void on_paste1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 267 of file studio.cc.
References ExultStudio::get_instance(), Exult_server::paste, and ExultStudio::send_to_server().
Here is the call graph for this function:

| void on_pick_for_combo1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 317 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_edit_mode().
Here is the call graph for this function:

| void on_play_button_clicked | ( | GtkToggleButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 337 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_play().
Here is the call graph for this function:

| void on_preferences_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 242 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::open_preferences().
Here is the call graph for this function:

| void on_prefs_apply_clicked | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 1934 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::save_preferences().
Here is the call graph for this function:

| void on_prefs_background_choose_clicked | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 1978 of file studio.cc.
References ExultStudio::background_color_okay(), ExultStudio::get_background_color(), and ExultStudio::get_instance().
Here is the call graph for this function:

| gboolean on_prefs_background_expose_event | ( | GtkWidget * | widget, | |
| GdkEventExpose * | event, | |||
| gpointer | data | |||
| ) |
| void on_prefs_cancel_clicked | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
| void on_prefs_okay_clicked | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 1940 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::save_preferences().
Here is the call graph for this function:

| gboolean on_prefs_window_delete_event | ( | GtkWidget * | widget, | |
| GdkEvent * | event, | |||
| gpointer | user_data | |||
| ) |
| void on_prompt3_cancel_clicked | ( | GtkToggleButton * | button, | |
| gpointer | user_data | |||
| ) |
| void on_prompt3_no_clicked | ( | GtkToggleButton * | button, | |
| gpointer | user_data | |||
| ) |
| void on_prompt3_yes_clicked | ( | GtkToggleButton * | button, | |
| gpointer | user_data | |||
| ) |
| void on_properties1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 274 of file studio.cc.
References Exult_server::edit_selected, ExultStudio::get_instance(), and ExultStudio::send_to_server().
Here is the call graph for this function:

| void on_read_map_menu_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 200 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::read_map().
Here is the call graph for this function:

| void on_reload_usecode_menu_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 214 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::reload_usecode().
Here is the call graph for this function:

| void on_save_all1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 172 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::save_all().
Here is the call graph for this function:

| void on_save_combos1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 235 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::save_combos().
Here is the call graph for this function:

| void on_save_groups1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 228 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::save_groups().
Here is the call graph for this function:

| void on_save_map_menu_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 193 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::write_map().
Here is the call graph for this function:

| void on_save_shape_info1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 207 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::write_shape_info().
Here is the call graph for this function:

| void on_tile_grid_button_toggled | ( | GtkToggleButton * | button, | |
| gpointer | user_data | |||
| ) |
Definition at line 345 of file studio.cc.
References ExultStudio::get_instance(), and ExultStudio::set_tile_grid().
Here is the call graph for this function:

| void on_unused_shapes1_activate | ( | GtkMenuItem * | menuitem, | |
| gpointer | user_data | |||
| ) |
Definition at line 325 of file studio.cc.
References ExultStudio::get_instance(), EStudio::Prompt(), ExultStudio::send_to_server(), and Exult_server::unused_shapes.
Here is the call graph for this function:

| static void Read_from_server | ( | gpointer | data, | |
| gint | socket, | |||
| GdkInputCondition | condition | |||
| ) | [static] |
Definition at line 2137 of file studio.cc.
References ExultStudio::read_from_server().
Referenced by ExultStudio::connect_to_server().
Here is the call graph for this function:

| static gint Reconnect | ( | gpointer | data | ) | [static] |
Definition at line 2099 of file studio.cc.
References ExultStudio::connect_to_server().
Referenced by ExultStudio::read_from_server().
Here is the call graph for this function:

| bool Window_has_focus | ( | GtkWindow * | win | ) | [inline] |
| const std::string c_empty_string |
| Configuration* config = 0 |
char* mode_names[4] [static] |
Initial value:
{"move1", "paint1", "paint_with_chunks1",
"pick_for_combo1"}
Definition at line 76 of file studio.cc.
Referenced by ExultStudio::ExultStudio(), and ExultStudio::info_received().
int prompt_choice = 0 [static] |
1.5.1