From 3cddb9545a4f634b46565717ef0a59a6f4a166ce Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 23 Jun 2004 10:50:10 +0000 Subject: First, incomplete port to gtk 2.0. Basic functionality in place. --- mixgtk/Makefile.am | 11 +- mixgtk/mixgtk.c | 30 +- mixgtk/mixgtk.glade | 10568 ++++++++++++++++++++------------------- mixgtk/mixgtk_cmd_dispatcher.c | 105 +- mixgtk/mixgtk_device.c | 235 +- mixgtk/mixgtk_fontsel.c | 64 +- mixgtk/mixgtk_gen_handlers.c | 112 +- mixgtk/mixgtk_gen_handlers.h | 12 +- mixgtk/mixgtk_input.c | 178 +- mixgtk/mixgtk_mixal.c | 535 +- mixgtk/mixgtk_mixal.h | 31 +- mixgtk/mixgtk_mixvm.c | 345 +- mixgtk/mixgtk_widgets.c | 2 +- 13 files changed, 6368 insertions(+), 5860 deletions(-) diff --git a/mixgtk/Makefile.am b/mixgtk/Makefile.am index 3e0f46e..7993d3e 100644 --- a/mixgtk/Makefile.am +++ b/mixgtk/Makefile.am @@ -1,16 +1,16 @@ ## Process this file with automake to produce Makefile.in -# Copyright (C) 2001 Free Software Foundation, Inc. -# +# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# # This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without +# unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# +# # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# $Id: Makefile.am,v 1.14 2001/09/29 01:53:51 jao Exp $ +# $Id: Makefile.am,v 1.15 2004/06/23 10:50:10 jao Exp $ XPMS = clear.xpm colors.xpm compile.xpm edit.xpm font.xpm fontl.xpm \ jump.xpm next.xpm onew.xpm open.xpm output.xpm run.xpm splitw.xpm \ @@ -44,7 +44,6 @@ gmixvm_SOURCES = gmixvm.c mixgtk.h mixgtk.c \ mixgtk_mixvm.h mixgtk_mixvm.c \ mixgtk_mixal.h mixgtk_mixal.c \ mixgtk_input.h mixgtk_input.c \ - mixgtk_colorsel.h mixgtk_colorsel.c \ mixgtk_fontsel.h mixgtk_fontsel.c \ mixgtk_wm.h mixgtk_wm.c endif diff --git a/mixgtk/mixgtk.c b/mixgtk/mixgtk.c index 7cad87a..3b926b4 100644 --- a/mixgtk/mixgtk.c +++ b/mixgtk/mixgtk.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk.c : * Main functions of the mix gtk front-end * ------------------------------------------------------------------ - * $Id: mixgtk.c,v 1.15 2002/04/10 23:39:40 jao Exp $ + * $Id: mixgtk.c,v 1.16 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ #include @@ -30,7 +30,6 @@ #include "mixgtk_mixvm.h" #include "mixgtk_mixal.h" #include "mixgtk_input.h" -#include "mixgtk_colorsel.h" #include "mixgtk_fontsel.h" #include "mixgtk_config.h" #include "mixgtk_wm.h" @@ -43,7 +42,7 @@ gboolean mixgtk_restart (void) { mix_vm_t *vm; - + if (!mixgtk_widget_factory_init ()) { g_error (_("Unable to initialise application: missing glade file")); @@ -59,7 +58,7 @@ mixgtk_restart (void) } vm = mixgtk_cmd_dispatcher_get_vm (); - + if (!mixgtk_mixvm_init (vm, MIXGTK_MIXVM_DIALOG)) { g_error (_("Unable to initialise application (mixvm widgets)\n")); @@ -80,7 +79,7 @@ mixgtk_restart (void) g_error (_("Unable to initialise application (devices)\n")); return FALSE; } - + if (!mixgtk_wm_init ()) { g_error (_("Unable to initialise application (visibility)\n")); @@ -88,7 +87,6 @@ mixgtk_restart (void) } mixgtk_input_init (); - mixgtk_colorsel_init (); gtk_widget_show (mixgtk_widget_factory_get_dialog (MIXGTK_MAIN)); mixgtk_mixvm_update_vm_widgets (); @@ -102,15 +100,15 @@ mixgtk_init (int argc, char *argv[]) { gboolean split = FALSE; gint k; - + mix_init_lib (); - + if (!mixgtk_config_load ()) { g_error ("Unable to read configuration\n"); return FALSE; } - + for (k = 0; k < argc; ++k) if (!strcmp (argv[k], SPLIT_ARG_) || !strcmp (argv[k], SPLIT_LONG_ARG_)) { @@ -119,7 +117,7 @@ mixgtk_init (int argc, char *argv[]) } if (!split && mixgtk_config_is_split ()) split = TRUE; mixgtk_config_set_split (split); - + gtk_init (&argc, &argv); return mixgtk_restart (); @@ -134,7 +132,7 @@ mixgtk_main (void) /* clean up */ void -mixgtk_release (void) +mixgtk_release (void) { if (mixgtk_config_is_autosave ()) mixgtk_config_save (); mix_vm_cmd_dispatcher_delete (mixgtk_cmd_dispatcher_get_mix_dispatcher ()); diff --git a/mixgtk/mixgtk.glade b/mixgtk/mixgtk.glade index 8c8d137..b246fff 100644 --- a/mixgtk/mixgtk.glade +++ b/mixgtk/mixgtk.glade @@ -1,5266 +1,5626 @@ - - - - - mixgtk - mixgtk - - src - . - C - False - False - True - False - False - - - - GtkWindow - main_window - False - - destroy - on_main_window_destroy - Tue, 20 Feb 2001 21:58:29 GMT - - gmixvm - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 650 - 550 - False - True - True - - - GtkVBox - main_vbox - 2 - False - 2 - - - GtkMenuBar - mainmenubar - GTK_SHADOW_OUT - - 0 - False - True - - - - GtkMenuItem - file - - False - - - GtkMenu - file_menu - - - GtkMenuItem - file_open - Load a MIX file - - GDK_MOD1_MASK - GDK_F3 - activate - - - activate - on_file_open_activate - Tue, 20 Feb 2001 22:37:58 GMT - - - False - - - - GtkMenuItem - edit - Edit a MIXAL source file - - GDK_MOD1_MASK - GDK_F4 - activate - - - activate - on_file_edit_activate - Fri, 08 Jun 2001 21:11:13 GMT - - - False - - - - GtkMenuItem - compile - Compile a MIXAL source file - - GDK_MOD1_MASK - GDK_F5 - activate - - - activate - on_file_compile_activate - Fri, 08 Jun 2001 21:11:33 GMT - - - False - - - - GtkMenuItem - separator2 - False - - - - GtkMenuItem - file_exit - Exit application - - GDK_MOD1_MASK - GDK_Q - activate - - - activate - on_file_exit_activate - Tue, 20 Feb 2001 22:37:58 GMT - - - False - - - - - - GtkMenuItem - view - - False - - - GtkMenu - view_menu - - - GtkCheckMenuItem - show_toolbars - - GDK_MOD1_MASK - GDK_T - activate - - - toggled - on_show_toolbars_toggled - Thu, 16 Aug 2001 20:14:16 GMT - - - False - True - - - - GtkMenuItem - separator5 - False - - - - GtkMenuItem - split_windows - - activate - on_split_windows_activate - Thu, 16 Aug 2001 21:48:57 GMT - - - False - - - - - - GtkMenuItem - debug - - False - - - GtkMenu - debug_menu - - - GtkMenuItem - debug_run - Run program - - GDK_MOD1_MASK - GDK_R - activate - - - activate - on_debug_run_activate - Sat, 10 Mar 2001 11:35:16 GMT - - - False - - - - GtkMenuItem - debug_next - Execute next instruction - - GDK_MOD1_MASK - GDK_N - activate - - - activate - on_debug_next_activate - Sat, 10 Mar 2001 11:35:16 GMT - - - False - - - - GtkMenuItem - clear_breakpoints - Clear all set breakpoints - - GDK_MOD1_MASK - GDK_C - activate - - - activate - on_clear_breakpoints_activate - Thu, 15 Mar 2001 23:26:49 GMT - - - False - - - - GtkMenuItem - symbols - Show the symbol table - - GDK_MOD1_MASK - GDK_Y - activate - - - activate - on_symbols_activate - Mon, 18 Jun 2001 22:17:06 GMT - - - False - - - - - - GtkMenuItem - settings1 - - False - - - GtkMenu - settings1_menu - - - GtkMenuItem - colors - Change colors of MIXAL - - activate - on_colors_activate - Wed, 11 Apr 2001 23:15:11 GMT - - - False - - - - GtkMenuItem - fonts1 - - False - - - GtkMenu - fonts1_menu - - - GtkMenuItem - mix - - activate - on_mix_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - mixal - - activate - on_mixal_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - command_prompt - - activate - on_prompt_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - command_log - - activate - on_log_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - devices - - activate - on_devices_font_activate - Thu, 10 May 2001 21:38:40 GMT - - - False - - - - - - GtkMenuItem - device_output1 - Change format of binary devices output - - activate - on_devform_activate - Wed, 30 May 2001 20:44:48 GMT - - - False - - - - GtkMenuItem - devices_dir - - activate - on_devdir_activate - Sun, 08 Jul 2001 20:58:13 GMT - - - False - - - - GtkMenuItem - external_programs1 - - activate - on_external_programs_activate - Fri, 01 Jun 2001 23:35:01 GMT - - - False - - - - GtkMenuItem - separator3 - False - - - - GtkMenuItem - save - Save current settings - - activate - on_save_activate - Sat, 28 Apr 2001 22:51:02 GMT - - - False - - - - GtkCheckMenuItem - save_on_exit - Toogle save settings on exit - - toggled - on_save_on_exit_toggle - Sun, 29 Apr 2001 10:26:16 GMT - - - False - True - - - - - - GtkMenuItem - help - - True - - - GtkMenu - help_menu - - - GtkMenuItem - about - - activate - on_about_activate - Tue, 13 Mar 2001 01:37:20 GMT - - - True - - - - + + + + + + + gmixvm + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 650 + 550 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + 2 + True + False + 2 - - GtkToolbar - main_toolbar - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_ICONS - 15 - GTK_TOOLBAR_SPACE_EMPTY - GTK_RELIEF_NORMAL - True - 1 - False - False - - - - GtkButton - Toolbar:button - load_button - Load MIX program - - clicked - on_file_open_activate - Wed, 15 Aug 2001 00:10:04 GMT - - - open.xpm - - - - GtkButton - Toolbar:button - compile_button - Compile MIXAL source - - clicked - on_file_compile_activate - Wed, 15 Aug 2001 00:11:29 GMT - - - compile.xpm - - - - GtkButton - Toolbar:button - edit_button - Edit MIXAL source - - clicked - on_file_edit_activate - Wed, 15 Aug 2001 00:11:03 GMT - - - edit.xpm - - - - GtkVSeparator - vseparator6 - - - - GtkButton - Toolbar:button - run_button - Run - - clicked - on_debug_run_activate - Wed, 15 Aug 2001 00:12:03 GMT - - - run.xpm - - True - - - - - GtkButton - Toolbar:button - step_button - Next - - clicked - on_debug_next_activate - Wed, 15 Aug 2001 00:12:36 GMT - - - next.xpm - - - - GtkButton - Toolbar:button - clear_button - Clear breakpoints - - clicked - on_clear_breakpoints_activate - Thu, 16 Aug 2001 12:58:32 GMT - - - clear.xpm - - - - GtkButton - Toolbar:button - symbols_button - Symbol table - - clicked - on_symbols_activate - Thu, 16 Aug 2001 13:02:32 GMT - - - symbols.xpm - - - - GtkButton - Toolbar:button - button29 - Colors - - clicked - on_colors_activate - Thu, 16 Aug 2001 13:36:24 GMT - - - colors.xpm - - True - - - - - GtkButton - Toolbar:button - button28 - Device directory - - clicked - on_devdir_activate - Thu, 16 Aug 2001 13:14:09 GMT - - - devdir.xpm - - - - GtkButton - Toolbar:button - button30 - Output format - - clicked - on_devform_activate - Thu, 16 Aug 2001 14:46:32 GMT - - - output.xpm - - - - GtkButton - Toolbar:button - button31 - External programs - - clicked - on_external_programs_activate - Thu, 16 Aug 2001 23:56:34 GMT - - - extern.xpm - - - - GtkButton - Toolbar:button - button26 - Split windows - - clicked - on_split_windows_activate - Thu, 16 Aug 2001 22:18:03 GMT - - - splitw.xpm - - True - - - + + True - - GtkVBox - inner_vbox - False - 0 - - 0 - True - True - + + + True + _File + True - - GtkNotebook - main_notebook - True - - switch_page - on_notebook_switch_page - Thu, 21 Jun 2001 20:33:09 GMT - - True - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - False - True - - - - GtkFixed - mixvm_widget - 375 - 287 - - - GtkEntry - rJ_entry - 304 - 88 - 60 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:45:00 GMT - - False - True - 0 - - - - - GtkEntry - rA_entry - 40 - 24 - 120 - 24 - True - - button_press_event - on_register_click - Mon, 12 Mar 2001 23:09:49 GMT - - False - True - 0 - - - - - GtkEntry - rX_entry - 248 - 24 - 120 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:43:29 GMT - - False - True - 0 - - - - - GtkEntry - rI2_entry - 40 - 144 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:45:39 GMT - - False - True - 0 - - - - - GtkEntry - rI1_entry - 40 - 88 - 60 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:43:44 GMT - - False - True - 0 - - - - - GtkEntry - rI3_entry - 40 - 200 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:46:37 GMT - - False - True - 0 - - - - - GtkEntry - rI4_entry - 168 - 88 - 60 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:44:21 GMT - - False - True - 0 - - - - - GtkEntry - rI6_entry - 168 - 200 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:46:58 GMT - - False - True - 0 - - - - - GtkLabel - label159 - 8 - 248 - 64 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label158 - 128 - 248 - 64 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label157 - 256 - 248 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVSeparator - vseparator1 - 376 - 10 - 16 - 263 - - - - GtkEntry - rI5_entry - 168 - 144 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:46:05 GMT - - False - True - 0 - - - - - GtkEntry - loc_entry - 300 - 200 - 40 - 22 - True - False - True - 0 - - - - - GtkLabel - program_label - 184 - 248 - 56 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - elapsed_label - 64 - 248 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - uptime_label - 296 - 248 - 72 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkCheckButton - over_toggle - 288 - 168 - 88 - 16 - True - - toggled - on_overflow_toggled - Tue, 06 Mar 2001 21:32:39 GMT - - - False - True - - - - GtkRadioButton - greater_radio - 336 - 128 - 32 - 24 - Comparison flag: greater - True - - toggled - on_cmp_g_toggled - Tue, 06 Mar 2001 21:21:40 GMT - - - False - True - cmp_group - - - - GtkScrolledWindow - memory_scroll - 398 - 16 - 225 - 248 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - GtkCList - memory_cells - 195 - 248 - Click cell to change value - True - - select_row - on_memory_cells_select_row - True - Tue, 13 Mar 2001 07:38:52 GMT - - - click_column - on_memory_cells_click_column - Wed, 14 Mar 2001 14:18:57 GMT - - 2 - 53,135 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label165 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - label166 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GtkRadioButton - lesser_radio - 264 - 128 - 35 - 24 - Comparison flag: lesser - True - - toggled - on_cmp_l_toggled - Tue, 06 Mar 2001 21:21:51 GMT - - - False - True - cmp_group - - - - GtkRadioButton - equal_radio - 304 - 128 - 31 - 24 - Comparison flag: equal - True - - toggled - on_cmp_e_toggled - Tue, 06 Mar 2001 21:22:04 GMT - - - False - True - cmp_group - - - - GtkButton - loc_arrow - 346 - 200 - 30 - 23 - View loc address - True - - clicked - on_loc_arrow_clicked - Thu, 16 Aug 2001 21:01:57 GMT - - GTK_RELIEF_NORMAL - - - GtkPixmap - pixmap1 - jump.xpm - 0.5 - 0.5 - 0 - 0 - True + + + + + + True + Load a MIX file + _Load... + True + + + + + + True + gtk-open + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Edit a MIXAL source file + _Edit... + True + + + + + + True + gtk-justify-fill + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Compile a MIXAL source file + _Compile... + True + + + + + + True + gtk-execute + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + + + + + + True + Exit application + E_xit + True + + + + + + True + gtk-quit + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + - - - - GtkLabel - label97 - 8 - 27 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label98 - 216 - 27 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label100 - 8 - 91 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label103 - 136 - 91 - 32 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label99 - 272 - 91 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label101 - 8 - 147 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label104 - 136 - 147 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label102 - 8 - 203 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label105 - 136 - 203 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label167 - 256 - 203 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVSeparator - vseparator2 - 0 - 8 - 16 - 263 - - - - GtkVSeparator - vseparator3 - 626 - 8 - 16 - 263 - - - - GtkHSeparator - hseparator1 - 8 - 232 - 376 - 16 - - - - GtkHSeparator - hseparator2 - 6 - 265 - 627 - 16 - - - - GtkHSeparator - hseparator3 - 7 - 1 - 626 - 16 - - + - - GtkLabel - Notebook:tab - label105 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + Vie_w + True - - GtkScrolledWindow - mixal_scrol - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - GtkCList - mixal_clist - Click to toggle breakpoint - True - GDK_POINTER_MOTION_MASK - - select_row - on_mixal_select_row - True - Sun, 11 Mar 2001 01:15:28 GMT - - - motion_notify_event - on_mixal_motion_notify_event - Sun, 17 Jun 2001 19:44:48 GMT - - 2 - 152,80 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label213 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + + + + True + _Toolbar + True + False + + + + + + + + True + + + + + + True + Split _windows + True + + + + + + - - GtkLabel - CList:title - label214 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - + + + True + De_bug + True - - GtkLabel - Notebook:tab - label106 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + + + + True + Run program + _Run + True + + + + + + True + gtk-go-forward + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Execute next instruction + _Next + True + + + + + + True + gtk-goto-last + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Clear all set breakpoints + _Clear breakpoints + True + + + + + + True + gtk-clear + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Show the symbol table + _Symbols... + True + + + + + + True + gtk-index + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + - - GtkNotebook - devices_notebook - 404 - 254 - True - True - True - GTK_POS_RIGHT - True - 2 - 2 - True - - - Placeholder - - - - GtkLabel - Notebook:tab - label156 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - + + + True + S_ettings + True - - GtkLabel - Notebook:tab - devices_label - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - GtkScrolledWindow - scrolledwindow25 - 2 - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkViewport - viewport1 - GTK_SHADOW_IN - - - GtkVBox - prompt_vbox - False - 0 - - - GtkScrolledWindow - mixlog_scrolledwindow - GTK_POLICY_AUTOMATIC - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - 0 - True - True + + + + + True + Change _font + True + + + + True + gtk-select-font + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + + True + _Virtual machine + True + + + + + + + True + _Source + True + + + + + + + True + Command _prompt + True + + + + + + + True + Command l_og + True + + + + + + + True + _Devices + True + + + + + + + + + + + True + Change format of binary devices output + _Device output... + True + + + + + + + True + De_vices dir... + True + + + + + True + gtk-home + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + E_xternal programs... + True + + + + + True + gtk-preferences + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + + + + + + True + Save current settings + _Save + True + + + + + True + gtk-save + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Toogle save settings on exit + Save on _exit + True + False + + + + - - - GtkText - command_log - False - - + + + + + True + _Help + True - - GtkEntry - command_prompt - Enter MIXVM command here - True - True - - key_press_event - on_command_prompt_key_press_event - True - Wed, 06 Jun 2001 06:46:05 GMT - - True - True - 0 - - 0 - False - False + + + + + True + _About... + True + + + + - + - - - - - GtkStatusbar - main_statusbar - - 0 - False - False + + 0 + False + True + - - - - - GtkWindow - split_main_window - False - - destroy - on_main_window_destroy - Tue, 20 Feb 2001 21:58:29 GMT - - gmixvm - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 570 - 235 - True - True - True - - - GtkVBox - main_vbox - 2 - False - 2 - - - GtkMenuBar - mainmenubar - GTK_SHADOW_OUT - 0 - False - True - - - - GtkMenuItem - file - - False - - - GtkMenu - file_menu - - - GtkMenuItem - file_open - Load a MIX file - - GDK_MOD1_MASK - GDK_F3 - activate - - - activate - on_file_open_activate - Tue, 20 Feb 2001 22:37:58 GMT - - - False - - - - GtkMenuItem - edit - Edit a MIXAL source file - - GDK_MOD1_MASK - GDK_F4 - activate - - - activate - on_file_edit_activate - Fri, 08 Jun 2001 21:11:13 GMT - - - False - - - - GtkMenuItem - compile - Compile a MIXAL source file - - GDK_MOD1_MASK - GDK_F5 - activate - - - activate - on_file_compile_activate - Fri, 08 Jun 2001 21:11:33 GMT - - - False - - - - GtkMenuItem - separator2 - False - - - - GtkMenuItem - file_exit - Exit application - - GDK_MOD1_MASK - GDK_Q - activate - - - activate - on_file_exit_activate - Tue, 20 Feb 2001 22:37:58 GMT - - - False - - - - - - GtkMenuItem - view - - False - - - GtkMenu - view_menu - - - GtkCheckMenuItem - mix_view - - toggled - on_view_toggled - Sun, 24 Jun 2001 12:24:52 GMT - - - False - True - - - - GtkCheckMenuItem - mixal_view - - toggled - on_view_toggled - Sun, 24 Jun 2001 12:25:14 GMT - - - False - True - - - - GtkCheckMenuItem - devices_view - - toggled - on_view_toggled - Sun, 24 Jun 2001 12:25:38 GMT - - - False - True - - - - GtkCheckMenuItem - show_toolbars - - toggled - on_show_toolbars_toggled - Thu, 16 Aug 2001 20:29:52 GMT - - - False - True - - - - GtkMenuItem - separator4 - False - - - - GtkMenuItem - one_window - - activate - on_one_window_activate - Thu, 16 Aug 2001 21:43:42 GMT - - - False - - - - - - GtkMenuItem - debug - - False - - - GtkMenu - debug_menu - - - GtkMenuItem - debug_run - Run program - - GDK_MOD1_MASK - GDK_R - activate - - - activate - on_debug_run_activate - Sat, 10 Mar 2001 11:35:16 GMT - - - False - - - - GtkMenuItem - debug_next - Execute next instruction - - GDK_MOD1_MASK - GDK_N - activate - - - activate - on_debug_next_activate - Sat, 10 Mar 2001 11:35:16 GMT - - - False - - - - GtkMenuItem - clear_breakpoints - Clear all set breakpoints - - GDK_MOD1_MASK - GDK_C - activate - - - activate - on_clear_breakpoints_activate - Thu, 15 Mar 2001 23:26:49 GMT - - - False - - - - GtkMenuItem - symbols - Show the symbol table - - GDK_MOD1_MASK - GDK_Y - activate - - - activate - on_symbols_activate - Mon, 18 Jun 2001 22:17:06 GMT - - - False - - - - - - GtkMenuItem - settings1 - - False - - - GtkMenu - settings1_menu - - - GtkMenuItem - colors - Change colors of MIXAL - - activate - on_colors_activate - Wed, 11 Apr 2001 23:15:11 GMT - - - False - - - - GtkMenuItem - fonts1 - - False - - - GtkMenu - fonts1_menu - - - GtkMenuItem - mix - - activate - on_mix_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - mixal - - activate - on_mixal_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - command_prompt - - activate - on_prompt_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - command_log - - activate - on_log_font_activate - Wed, 25 Apr 2001 01:55:53 GMT - - - False - - - - GtkMenuItem - devices - - activate - on_devices_font_activate - Thu, 10 May 2001 21:38:40 GMT - - - False - + + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_ICONS + True + True + + + + True + Load MIX program + gtk-open + True + True + True + - - - - GtkMenuItem - device_output1 - Change format of binary devices output - - activate - on_devform_activate - Wed, 30 May 2001 20:44:48 GMT - - - False - - - - GtkMenuItem - devices_dir - - activate - on_devdir_activate - Sun, 08 Jul 2001 20:58:35 GMT - - - False - - - - GtkMenuItem - external_programs1 - - activate - on_external_programs_activate - Fri, 01 Jun 2001 23:35:01 GMT - - - False - - - - GtkMenuItem - separator1 - False - - - - GtkMenuItem - save - Save current settings - - activate - on_save_activate - Sat, 28 Apr 2001 22:51:02 GMT - - - False - - - - GtkCheckMenuItem - save_on_exit - Toogle save settings on exit - - toggled - on_save_on_exit_toggle - Sun, 29 Apr 2001 10:26:16 GMT - - - True - True - - - - - - GtkMenuItem - help - - True - - - GtkMenu - help_menu - - - GtkMenuItem - about - - activate - on_about_activate - Tue, 13 Mar 2001 01:37:20 GMT - - - True - + + False + True + + + + + + True + Compile MIXAL source + gtk-execute + True + True + True + + + + False + True + + + + + + True + Edit MIXAL source + + True + gtk-justify-fill + True + True + True + + + + False + True + + + + + + True + Run + + True + gtk-go-forward + True + True + True + + + + False + True + + + + + + True + Next + + True + gtk-goto-last + True + True + True + + + + False + True + + + + + + True + Clear breakpoints + + True + gtk-clear + True + True + True + + + + False + True + + + + + + True + Symbol table + + True + gtk-index + True + True + True + + + + False + True + + + + + + True + True + True + True + + + False + False + + + + + + True + Device directory + + True + gtk-home + True + True + False + + + + False + True + + + + + + True + Output format + + True + gtk-find-and-replace + True + True + False + + + + False + True + + + + + + True + External programs + + True + gtk-properties + True + True + False + + + + False + True + + + + + + True + True + True + True + + + False + False + + + + + + True + Split windows + + True + splitw.xpm + True + True + True + + + + False + True + + - - - - - GtkStatusbar - main_statusbar - - 0 - False - False - GTK_PACK_END + + 3 + False + False + - - - GtkToolbar - main_toolbar - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_ICONS - 15 - GTK_TOOLBAR_SPACE_EMPTY - GTK_RELIEF_NORMAL - True - 0 - False - False - + + True + False + 0 + + + + 2 + True + True + True + True + GTK_POS_TOP + False + False + - - GtkButton - Toolbar:button - button4 - Load MIX program - - clicked - on_file_open_activate - Wed, 15 Aug 2001 00:10:04 GMT - - - open.xpm - - - - GtkButton - Toolbar:button - button5 - Compile MIXAL source - - clicked - on_file_compile_activate - Wed, 15 Aug 2001 00:11:29 GMT - - - compile.xpm - - - - GtkButton - Toolbar:button - button6 - Edit MIXAL source - - clicked - on_file_edit_activate - Wed, 15 Aug 2001 00:11:03 GMT - - - edit.xpm - - - - GtkVSeparator - vseparator7 - - - - GtkButton - Toolbar:button - button7 - Run - - clicked - on_debug_run_activate - Wed, 15 Aug 2001 00:12:03 GMT - - - run.xpm - - True - - - - - GtkButton - Toolbar:button - button8 - Next - - clicked - on_debug_next_activate - Wed, 15 Aug 2001 00:12:36 GMT - - - next.xpm - - - - GtkButton - Toolbar:button - button9 - Clear breakpoints - - clicked - on_clear_breakpoints_activate - Thu, 16 Aug 2001 12:58:32 GMT - - - clear.xpm - - - - GtkButton - Toolbar:button - button10 - Symbol table - - clicked - on_symbols_activate - Thu, 16 Aug 2001 13:02:32 GMT - - - symbols.xpm - - - - GtkButton - Toolbar:button - button24 - Command log font - - clicked - on_log_font_activate - Thu, 16 Aug 2001 15:04:53 GMT - - - font.xpm - - True - - - - - GtkButton - Toolbar:button - button25 - Command prompt font - - clicked - on_prompt_font_activate - Thu, 16 Aug 2001 15:05:48 GMT - - - fontl.xpm - - - - GtkButton - Toolbar:button - button32 - External programs - - clicked - on_external_programs_activate - Thu, 16 Aug 2001 23:56:34 GMT - - - extern.xpm - - - - GtkButton - Toolbar:button - button27 - One window - - clicked - on_one_window_activate - Thu, 16 Aug 2001 22:19:55 GMT - - - onew.xpm - - True - - - + + + True + False + 0 + + + + 1 + True + False + 1 + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 8 + True + 3 + 6 + False + 6 + 11 + + + + 0 + 0 + True + A + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + 0 + 0 + True + I1 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + 0 + 0 + True + I2 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + 3 + 1 + 2 + fill + + + + + + + 0 + 0 + True + False + True + 0 + + True + * + False + 19 + + + + 1 + 2 + 0 + 1 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 3 + 4 + 1 + 2 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + 00 00 + True + * + False + 9 + + + + 3 + 4 + 0 + 1 + + + + + + + + 0 + 0 + True + X + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + 16 + 16 + True + I3 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + 3 + 2 + 3 + fill + + + + + + + 0 + 0 + True + I4 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 4 + 5 + 0 + 1 + fill + + + + + + + 16 + 16 + True + I5 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 4 + 5 + 1 + 2 + fill + + + + + + + 16 + 16 + True + I6 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 4 + 5 + 2 + 3 + fill + + + + + + + 0 + 0 + True + J + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + 0 + 0 + True + True + False + True + 0 + + 00 00 00 00 00 + True + * + False + 19 + + + + 1 + 2 + 1 + 2 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 5 + 6 + 0 + 1 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 5 + 6 + 1 + 2 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 5 + 6 + 2 + 3 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 3 + 4 + 2 + 3 + + + + + + + + True + False + 0 + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 0 + False + False + + + + + + + + + 1 + 2 + 2 + 3 + fill + fill + + + + + + + + True + Registers + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 5 + False + True + + + + + + True + False + 0 + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 1 + True + False + 5 + + + + 2 + 0 + 0 + True + Greater + True + G + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + 2 + 0 + 0 + True + Equal + True + E + True + GTK_RELIEF_NORMAL + True + False + False + True + greater_radio + + + + 0 + False + False + + + + + + 2 + 0 + 0 + True + Lesser + True + L + True + GTK_RELIEF_NORMAL + True + False + False + True + greater_radio + + + + 0 + False + False + + + + + + 7 + True + + + 0 + False + False + + + + + + True + True + Overflow + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + + + True + Flags + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 0 + False + False + + + + + + + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 4 + True + False + 1 + + + + 0 + 0 + True + True + False + True + 4 + 0 + True + * + False + 6 + + + 5 + False + False + + + + + + True + View loc address + True + GTK_RELIEF_NORMAL + True + + + + + True + gtk-jump-to + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 1 + False + False + + + + + + + + True + Location + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 0 + False + False + GTK_PACK_END + + + + + 5 + False + True + + + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 5 + True + True + 5 + + + + 0 + 0 + True + Uptime: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + 0 + 0 + True + 00000000 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 5 + 0 + + + 0 + False + False + + + + + + 0 + 0 + True + Elapsed: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 3 + False + False + + + + + + 0 + 0 + True + 000000 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 5 + 0 + + + 0 + False + False + + + + + + 0 + 0 + True + Program: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + False + False + + + + + + 0 + 0 + True + 000000 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 5 + 0 + + + 0 + False + False + + + + + + + + True + Times + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 5 + False + True + + + + + 2 + False + False + + + + + + 7 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 5 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + GDK_BUTTON_PRESS_MASK + True + True + False + True + + + + + + + + True + Memory + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 3 + True + True + GTK_PACK_END + + + + + False + True + + - - GtkVBox - vbox3 - False - 0 - - 0 - True - True - + + + True + _Virtual machine + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + tab + + - - GtkScrolledWindow - mixcmd_scrolledwindow - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkText - command_log - False - - - - - - GtkEntry - command_prompt - Enter MIXVM command here - True - True - - key_press_event - on_command_prompt_key_press_event - True - Wed, 06 Jun 2001 06:46:05 GMT - - True - True - 0 - - - 0 - False - False - - - - - + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + Click to toggle breakpoint + True + GDK_POINTER_MOTION_MASK + True + True + False + True + + + + + False + True + + - - GtkDialog - word_dialog - False - - destroy - gtk_widget_hide - Tue, 13 Mar 2001 00:53:39 GMT - - - destroy_event - gtk_widget_hide - Tue, 13 Mar 2001 00:55:38 GMT - - - delete_event - gtk_widget_hide - Tue, 13 Mar 2001 00:56:33 GMT - - Enter value - GTK_WINDOW_DIALOG - GTK_WIN_POS_MOUSE - True - 250 - False - False - False - - - GtkVBox - Dialog:vbox - dialog-vbox5 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area5 - 10 - 250 - True - 5 - - 0 - False - False - GTK_PACK_END - + + + True + _Source + True + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + tab + + - - GtkHButtonBox - hbuttonbox5 - 250 - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - 85 - 27 - 7 - 0 - - 0 - False - False - - - - GtkButton - word_reset - True - True - - clicked - on_word_reset_clicked - Mon, 12 Mar 2001 22:40:33 GMT - - - GTK_RELIEF_NORMAL - + + + True + True + True + True + GTK_POS_RIGHT + True + False + + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + tab + + + + + False + True + + - - GtkButton - word_ok - True - True - - clicked - on_word_ok_clicked - Mon, 12 Mar 2001 22:40:45 GMT - - - GTK_RELIEF_NORMAL - + + + True + _Devices + True + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + tab + + + + + 2 + False + True + + + + + + 2 + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT - - GtkButton - word_cancel - True - True - - clicked - on_word_cancel_clicked - Mon, 12 Mar 2001 23:18:49 GMT - - - GTK_RELIEF_NORMAL + + + True + GTK_SHADOW_IN + + + + True + False + 0 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + False + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + True + Enter MIXVM command here + True + True + True + True + 0 + + True + * + False + + + + + 0 + False + False + + + + + + + + + 0 + True + True + + - - + + 0 + True + True + + - - GtkFixed - word_layout - 250 - 97 - 0 - False - False + + True + True + + + 0 + False + False + - - - GtkEntry - word_decimal - 88 - 32 - 143 - 22 - True - True - - key_press_event - on_word_dec_key_press - True - Mon, 12 Mar 2001 22:37:13 GMT - - True - True - 11 - 0 - - - - GtkEntry - word_b2 - 136 - 64 - 22 - 22 - True - - key_press_event - on_word_byte_key_press - True - Mon, 12 Mar 2001 22:38:56 GMT - - True - True - 3 - 00 - - - - GtkEntry - word_b3 - 160 - 64 - 22 - 22 - True - - key_press_event - on_word_byte_key_press - True - Mon, 12 Mar 2001 22:39:26 GMT - - True - True - 3 - 00 - - - - GtkEntry - word_b4 - 184 - 64 - 22 - 22 - True - - key_press_event - on_word_byte_key_press - True - Mon, 12 Mar 2001 22:39:50 GMT - - True - True - 3 - 00 - - - - GtkEntry - word_b5 - 208 - 64 - 22 - 22 - True - - key_press_event - on_word_byte_key_press - True - Mon, 12 Mar 2001 22:40:09 GMT - - True - True - 3 - 00 - - - - GtkEntry - word_b1 - 112 - 64 - 22 - 22 - True - True - - key_press_event - on_word_byte_key_press - True - Mon, 12 Mar 2001 22:38:24 GMT - - True - True - 3 - 00 - - - - GtkEntry - word_sign - 88 - 64 - 16 - 24 - True - - key_press_event - on_word_sign_key_press - Tue, 13 Mar 2001 00:15:28 GMT - - True - True - 1 - + - - - - GtkLabel - label61 - 22 - 67 - 41 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - word_label - 16 - 8 - 216 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label60 - 16 - 34 - 67 - 20 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - + - - GtkWindow - about_dialog - 368 - 99 - False - - delete_event - gtk_widget_hide - Tue, 13 Mar 2001 13:13:42 GMT - - - destroy_event - gtk_widget_hide - Tue, 13 Mar 2001 13:14:02 GMT - - - destroy - gtk_widget_hide - Tue, 13 Mar 2001 13:14:25 GMT - - MDK - GTK_WINDOW_DIALOG - GTK_WIN_POS_CENTER - True - False - False - False - - - GtkLayout - layout1 - 375 - 190 - 200 - 120 - 0 - 0 - - - GtkLabel - label222 - 56 - 16 - 247 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + gmixvm + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 570 + 235 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + 2 + True + False + 2 - - GtkLabel - version_label - 152 - 40 - 56 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True - - GtkLabel - label224 - 0 - 64 - 358 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + _File + True - - GtkHSeparator - hseparator4 - 8 - 0 - 356 - 16 - + + + True + + + + True + Load a MIX file + _Load... + True + + + + + + + + True + Edit a MIXAL source file + _Edit... + True + + + + + + + + True + Compile a MIXAL source file + _Compile... + True + + + + + + + + True + + + + + + True + Exit application + E_xit + True + + + + + + + + - - GtkHSeparator - hseparator5 - 8 - 80 - 356 - 16 - + + + True + _View + True - - GtkVSeparator - vseparator4 - 0 - 7 - 16 - 81 - + + + True + + + + True + _MIX + True + False + + + + + + + True + MI_XAL + True + False + + + + + + + True + _Devices + True + False + + + + + + + True + _Toolbars + True + False + + + + + + + True + + + + + + True + One _window + True + + + + + + + - - GtkVSeparator - vseparator5 - 354 - 8 - 16 - 81 - - - + + + True + D_ebug + True - - GtkDialog - goto_dialog - 193 - 120 - False - - destroy_event - gtk_widget_hide - Wed, 14 Mar 2001 14:39:17 GMT - - - delete_event - gtk_widget_hide - Wed, 14 Mar 2001 14:39:41 GMT - - - destroy - gtk_widget_hide - Wed, 14 Mar 2001 14:40:15 GMT - - Go to memory cell - GTK_WINDOW_DIALOG - GTK_WIN_POS_MOUSE - True - False - False - False - - - GtkVBox - Dialog:vbox - dialog-vbox6 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area6 - 10 - 40 - True - 5 - - 0 - False - True - GTK_PACK_END - + + + True + + + + True + Run program + _Run + True + + + + + + + + True + Execute next instruction + _Next + True + + + + + + + + True + Clear all set breakpoints + _Clear breakpoints + True + + + + + + + + True + Show the symbol table + _Symbols... + True + + + + + + + + - - GtkHButtonBox - hbuttonbox6 - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - 85 - 27 - 7 - 0 - - 0 - True - True - - - - GtkButton - goto_cancel - True - True - - clicked - on_goto_cancel_clicked - Wed, 14 Mar 2001 14:24:59 GMT - - - GTK_RELIEF_NORMAL - + + + True + _Settings + True + + + + True + + + + True + Change colors of MIXAL + _Colors... + True + + + + + + + True + Change _font + True + + + + True + + + + True + _MIX + True + + + + + + + True + MI_XAL + True + + + + + + + True + Command _prompt + True + + + + + + + True + Command l_og + True + + + + + + + True + De_vices + True + + + + + + + + + + + True + Change format of binary devices output + _Device output... + True + + + + + + + True + De_vices dir... + True + + + + + + + True + E_xternal programs... + True + + + + + + + True + + + + + + True + Save current settings + _Save + True + + + + + + + True + Toogle save settings on exit + Save on _exit + True + True + + + + + + + + + + + True + _Help + True - - GtkButton - goto_ok - True - True - - clicked - on_goto_ok_clicked - Wed, 14 Mar 2001 14:25:23 GMT - - - GTK_RELIEF_NORMAL + + + True + + + + True + _About... + True + + + + + + + - - + + 0 + False + True + + - - GtkVBox - vbox1 - 12 - 75 - False - 0 - 0 - False - False + + True + True + + + 0 + False + False + GTK_PACK_END + - - GtkLabel - label225 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - True - True - - - - - GtkEntry - goto_entry - 44 - True - True - - activate - on_goto_ok_clicked - Wed, 14 Mar 2001 14:52:26 GMT - - True - True - 4 - - - 10 - False - False - - - - - - - - GtkDialog - color_dialog - 275 - 214 - False - - delete_event - gtk_widget_hide - Thu, 12 Apr 2001 21:05:54 GMT - - - destroy_event - gtk_widget_hide - Thu, 12 Apr 2001 21:06:09 GMT - - - destroy - gtk_widget_hide - Thu, 12 Apr 2001 21:06:23 GMT - - MIXAL colors - GTK_WINDOW_DIALOG - GTK_WIN_POS_NONE - True - False - False - False - - - GtkVBox - Dialog:vbox - dialog-vbox7 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area7 - 10 - True - 5 - 0 - False - True - GTK_PACK_END - + + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_ICONS + True + True + + + + True + Load MIX program + Load + True + gtk-open + True + True + False + + + + False + True + + + + + + True + Compile MIXAL source + Build + True + gtk-execute + True + True + False + + + + False + True + + + + + + True + Edit MIXAL source + Edit + True + gtk-justify-fill + True + True + False + + + + False + True + + + + + + True + True + True + False - - GtkHButtonBox - hbuttonbox7 - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - 85 - 27 - 7 - 0 - - 0 - True - True - - - - GtkButton - colors_ok - True - True - - clicked - on_colors_ok_clicked - Thu, 12 Apr 2001 21:05:07 GMT - - - GTK_RELIEF_NORMAL + + + True + + + + + False + False + + + + + + True + True + True + True + + + False + False + + + + + + True + Run + Run + True + gtk-go-forward + True + True + False + + + + False + True + + + + + + True + Next + Step + True + gtk-goto-last + True + True + False + + + + False + True + + + + + + True + Clear breakpoints + Clear + True + gtk-clear + True + True + False + + + + False + True + + + + + + True + Symbol table + Symbols + True + gtk-index + True + True + False + + + + False + True + + + + + + True + True + True + True + + + False + False + + + + + + True + Command log font + Font + True + gtk-select-color + True + True + False + + + + False + True + + + + + + True + Command prompt font + Font + True + gtk-home + True + True + False + + + + False + True + + + + + + True + External programs + Extern + True + gtk-convert + True + True + False + + + + False + True + + + + + + True + True + True + True + + + False + False + + + + + + True + One window + One window + True + onew.xpm + True + True + False + + + + False + True + + + + 0 + False + False + + - - GtkButton - colors_apply - True - True - - clicked - on_colors_apply_clicked - Thu, 12 Apr 2001 21:04:56 GMT - - - GTK_RELIEF_NORMAL - + + + True + False + 0 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT - - GtkButton - colors_cancel - True - True - - clicked - on_colors_cancel_clicked - Thu, 12 Apr 2001 21:04:45 GMT - - - GTK_RELIEF_NORMAL + + + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + True + Enter MIXVM command here + True + True + True + True + 0 + + True + * + False + + + + 0 + False + False + + - - - - - GtkFixed - fixed1 - - 0 - True - True + + 0 + True + True + - - - GtkLabel - label230 - 184 - 32 - 78 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label226 - 0 - 8 - 143 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label227 - 0 - 56 - 79 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label229 - 88 - 32 - 78 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkDrawingArea - clbg_area - 90 - 56 - 75 - 15 - - - - GtkDrawingArea - clfg_area - 184 - 56 - 75 - 15 - - - - GtkDrawingArea - bpfg_area - 184 - 94 - 75 - 15 - - - - GtkDrawingArea - plbg_area - 90 - 128 - 75 - 15 - - - - GtkLabel - label231 - 1 - 128 - 77 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkDrawingArea - bpbg_area - 90 - 94 - 75 - 15 - - - - GtkDrawingArea - plfg_area - 184 - 128 - 75 - 15 - - - - GtkLabel - label228 - 0 - 94 - 76 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GtkColorSelectionDialog - colorsel_dialog - 10 - False - - delete_event - gtk_widget_hide - Sat, 21 Apr 2001 23:14:28 GMT - - - destroy_event - gtk_widget_hide - Sat, 21 Apr 2001 23:14:54 GMT - - - destroy - gtk_widget_hide - Sat, 21 Apr 2001 23:15:12 GMT - - Select Color - GTK_WINDOW_DIALOG - GTK_WIN_POS_NONE - True - False - False - False - GTK_UPDATE_CONTINUOUS - - - GtkButton - ColorSel:ok_button - ok_colorserdlg - True - True - - clicked - on_ok_colorseldlg_clicked - Sat, 21 Apr 2001 23:17:15 GMT - - - GTK_RELIEF_NORMAL - - - - GtkButton - ColorSel:cancel_button - cancel_colorseldlg - True - True - - clicked - on_cancel_colorseldlg_clicked - Sat, 21 Apr 2001 23:17:37 GMT - - - GTK_RELIEF_NORMAL - - - - GtkButton - ColorSel:help_button - help_button1 - True - True - - GTK_RELIEF_NORMAL - + - - GtkFontSelectionDialog - fontsel_dialog - 4 - False - - delete_event - gtk_widget_hide - Thu, 26 Apr 2001 21:14:34 GMT - - - destroy_event - gtk_widget_hide - Thu, 26 Apr 2001 21:15:02 GMT - - - destroy - gtk_widget_hide - Thu, 26 Apr 2001 21:15:13 GMT - - Select Font - GTK_WINDOW_DIALOG - GTK_WIN_POS_NONE - False - False - True - True - - - GtkButton - FontSel:ok_button - ok_button1 - True - True - - clicked - on_fontsel_ok_clicked - Thu, 26 Apr 2001 21:40:53 GMT - - - GTK_RELIEF_NORMAL - - - - GtkButton - FontSel:apply_button - apply_button1 - True - True - - clicked - on_fontsel_apply_clicked - Thu, 26 Apr 2001 21:41:12 GMT - - - GTK_RELIEF_NORMAL - - - - GtkButton - FontSel:cancel_button - cancel_button1 - True - True - - clicked - on_fontsel_cancel_clicked - Thu, 26 Apr 2001 21:41:33 GMT - - - GTK_RELIEF_NORMAL - - - - - GtkDialog - devform_dialog - 308 - 172 - False - - delete_event - gtk_widget_hide - Wed, 30 May 2001 20:14:53 GMT - - - destroy_event - gtk_widget_hide - Wed, 30 May 2001 20:15:13 GMT - - - destroy - gtk_widget_hide - Wed, 30 May 2001 20:15:29 GMT - - Device output format - GTK_WINDOW_DIALOG - GTK_WIN_POS_NONE - True - False - False - False - - - GtkVBox - Dialog:vbox - dialog-vbox8 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area8 - 10 - True - 5 - - 0 - False - True - GTK_PACK_END - + + Enter value + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 10 - - GtkHButtonBox - hbuttonbox8 - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - 85 - 27 - 7 - 0 - - 0 - True - True - - - - GtkButton - devok_button - True - True - - clicked - on_devok_button_clicked - Wed, 30 May 2001 20:13:56 GMT - - - GTK_RELIEF_NORMAL - + + + True + True + True + gtk-clear + True + GTK_RELIEF_NORMAL + True + + + - - GtkButton - devapp_button - True - True - - clicked - on_devapp_button_clicked - Wed, 30 May 2001 20:14:05 GMT - - - GTK_RELIEF_NORMAL - + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + - - GtkButton - devcancel_button - True - True - - clicked - on_devcancel_button_clicked - Wed, 30 May 2001 20:14:17 GMT - - - GTK_RELIEF_NORMAL + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + - - - - - GtkFixed - fixed2 - - 0 - True - True + + 0 + False + False + GTK_PACK_END + - - GtkButton - devset_button - 208 - 80 - 79 - 24 - Set all devices to current format - True - - clicked - on_devset_button_clicked - Wed, 30 May 2001 20:13:37 GMT - - - GTK_RELIEF_NORMAL - - - - GtkLabel - label232 - 16 - 22 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label233 - 216 - 22 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkCombo - dev_combo - 16 - 48 - 150 - 22 - True - True - False - True - False - - - - GtkEntry - GtkCombo:entry - combo-entry1 - Choose a device - True - - changed - on_deventry_changed - Wed, 30 May 2001 19:50:03 GMT - - True - True - 0 - + + + 5 + True + + + + 0 + 0 + True + True + True + GDK_KEY_PRESS_MASK + True + True + 0 + 0 + True + * + False + 28 + + + + 88 + 64 + + + + + + 0 + 0 + True + True + GDK_KEY_PRESS_MASK + True + True + 2 + 0 + True + * + False + 3 + + + + 144 + 32 + + + + + + 0 + 0 + True + True + GDK_BUTTON_PRESS_MASK + True + True + 2 + 0 + True + * + False + 3 + + + + 176 + 32 + + + + + + 0 + 0 + True + True + GDK_KEY_PRESS_MASK + True + True + 2 + 0 + True + * + False + 3 + + + + 208 + 32 + + + + + + 0 + 0 + True + True + GDK_KEY_PRESS_MASK + True + True + 2 + 0 + True + * + False + 3 + + + + 238 + 32 + + + + + + 0 + 0 + True + True + GDK_KEY_PRESS_MASK + True + True + 2 + 0 + True + * + False + 3 + + + + 112 + 32 + + + + + + 0 + 0 + True + True + GDK_KEY_PRESS_MASK + True + True + 1 + + + True + * + False + 2 + + + + 88 + 32 + + + + + + 0 + 0 + True + Decimal + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 14 + 68 + + + + + + 0 + 0 + True + Bytes + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 15 + 36 + + + + + + 0 + 0 + True + Enter value + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 112 + 8 + + - - - - GtkRadioButton - decradio - 184 - 48 - 48 - 24 - Show output as decimal numbers - True - - toggled - on_decradio_toggled - Wed, 30 May 2001 20:13:03 GMT - - - False - True - format_group - - - - GtkRadioButton - wordradio - 240 - 48 - 56 - 24 - Show output as MIX words - True - - False - True - format_group - + + 0 + True + True + + - + - - GtkDialog - external_dialog - 285 - 210 - False - - delete_event - gtk_widget_hide - Fri, 01 Jun 2001 23:57:57 GMT - - - destroy_event - gtk_widget_hide - Fri, 01 Jun 2001 23:58:51 GMT - - - destroy - gtk_widget_hide - Fri, 01 Jun 2001 23:59:02 GMT - - External programs - GTK_WINDOW_DIALOG - GTK_WIN_POS_NONE - True - False - False - False - - - GtkVBox - Dialog:vbox - dialog-vbox9 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area9 - 3 - False - 5 - - 0 - False - True - GTK_PACK_END - - - - GtkHButtonBox - hbuttonbox9 - GTK_BUTTONBOX_SPREAD - 10 - 85 - 27 - 5 - 0 - - 0 - True - True - - - - GtkButton - extern_cancel_button - True - True - - clicked - on_extern_cancel_button_clicked - Mon, 04 Jun 2001 21:31:50 GMT - - - GTK_RELIEF_NORMAL - - - - GtkButton - extern_ok_button - True - True - - clicked - on_extern_ok_button_clicked - Mon, 04 Jun 2001 21:32:21 GMT - - - GTK_RELIEF_NORMAL - - - + + MDK + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER + True + 250 + 150 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + True + 250 + 150 + 0 0 250 0 209.7 233 + 0 0 150 0 111.6 124 - - GtkVBox - vbox2 - True - 0 - 0 - True - True - - - - GtkFixed - fixed3 - - 0 - True - True - - - - GtkEntry - editor_entry - 48 - 40 - 220 - 24 - True - True - True - 0 - xterm -e vi %s - - - - GtkLabel - label234 - 3 - 16 - 223 - 16 - - GTK_JUSTIFY_LEFT - False - 0.5 - 0.5 - 0 - 0 - - - - - GtkFixed - fixed4 - - 0 - True - True - - - - GtkEntry - mixasm_entry - 48 - 40 - 220 - 22 - True - True - True - 0 - mixasm -g %s + + 0 + 0 + True + GNU MIX Development Kit + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + 56 + 24 + + - - GtkLabel - label235 - 0 - 16 - 278 - 16 - - GTK_JUSTIFY_LEFT - False - 0.5 - 0.5 - 0 - 0 + + + 52 + 16 + True + label223 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 - - - - + + 96 + 48 + + - - GtkDialog - symbols_dialog - False - - delete_event - gtk_widget_hide - Mon, 18 Jun 2001 21:10:39 GMT - - - destroy_event - gtk_widget_hide - Mon, 18 Jun 2001 21:10:53 GMT - - - destroy - gtk_widget_hide - Mon, 18 Jun 2001 21:11:08 GMT - - Symbol table - GTK_WINDOW_DIALOG - GTK_WIN_POS_CENTER - False - 350 - 265 - True - True - False - - - GtkVBox - Dialog:vbox - dialog-vbox10 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area10 - 10 - True - 5 - 0 - False - True - GTK_PACK_END + + 0 + 0 + True + Copyright (C) 2001, 2002, 2003 , 2004 +Free Software Foundation, Inc. + False + False + GTK_JUSTIFY_CENTER + True + False + 0.5 + 0.5 + 0 + 0 + + + 24 + 88 + - - - GtkButton - button1 - 77 - True - - clicked - on_symbol_ok_clicked - Mon, 18 Jun 2001 21:10:02 GMT - - - GTK_RELIEF_NORMAL - - 0 - False - False - - + + - - GtkScrolledWindow - scrolledwindow26 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - + + Go to memory cell + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 30 - - GtkCList - symbols_clist - True - 3 - 80,112,80 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label236 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + - - GtkLabel - CList:title - label237 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + + + 0 + False + True + GTK_PACK_END + + - - GtkLabel - CList:title - label238 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + 12 + True + False + 0 + + + + True + Go to address: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + True + True + True + True + 0 + + True + * + False + + + + 10 + False + False + + - + + 0 + False + False + + - + - - GtkWindow - mixvm_window - False - - delete_event - on_window_hide - Sun, 24 Jun 2001 12:33:45 GMT - - - destroy_event - on_window_hide - Sun, 24 Jun 2001 12:33:54 GMT - - - destroy - on_window_hide - Sun, 24 Jun 2001 12:34:03 GMT - - - show - mixgtk_mixvm_update_vm_widgets - True - Sun, 24 Jun 2001 12:45:56 GMT - - Virtual machine - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 640 - 290 - False - True - False - - - GtkFixed - mixvm_widget - 640 - 287 - - - GtkEntry - rJ_entry - 304 - 88 - 60 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:45:00 GMT - - False - True - 0 - - - - - GtkEntry - rA_entry - 40 - 24 - 120 - 24 - True - - button_press_event - on_register_click - Mon, 12 Mar 2001 23:09:49 GMT - - False - True - 0 - - - - - GtkEntry - rX_entry - 248 - 24 - 120 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:43:29 GMT - - False - True - 0 - - - - - GtkEntry - rI2_entry - 40 - 144 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:45:39 GMT - - False - True - 0 - - - - - GtkEntry - rI1_entry - 40 - 88 - 60 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:43:44 GMT - - False - True - 0 - - - - - GtkEntry - rI3_entry - 40 - 200 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:46:37 GMT - - False - True - 0 - - - - - GtkEntry - rI4_entry - 168 - 88 - 60 - 24 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:44:21 GMT - - False - True - 0 - - - - - GtkEntry - rI6_entry - 168 - 200 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:46:58 GMT - - False - True - 0 - - - - - GtkLabel - label100 - 8 - 91 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label102 - 8 - 200 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - label101 - 8 - 144 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + 4 + Select Font + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + + + + + + + True + True + True + GTK_RELIEF_NORMAL + True + - - - GtkLabel - label103 - 136 - 88 - 32 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + + + True + True + True + GTK_RELIEF_NORMAL + True + - - - GtkLabel - label104 - 136 - 144 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + + + True + True + True + GTK_RELIEF_NORMAL + True + + - - GtkLabel - label105 - 136 - 200 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + 4 + True + abcdefghijk ABCDEFGHIJK + + 0 + True + True + + + - - GtkLabel - label98 - 216 - 24 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + Device output format + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 30 - - GtkLabel - label97 - 8 - 24 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + - - GtkVSeparator - vseparator2 - 0 - 8 - 16 - 263 - + + + True + True + True + gtk-apply + True + GTK_RELIEF_NORMAL + True + + + - - GtkVSeparator - vseparator3 - 626 - 8 - 16 - 267 - + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + + + + 0 + False + True + GTK_PACK_END + + - - GtkLabel - label99 - 272 - 88 - 31 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + + + + 0 + 0 + True + True + True + False + True + False + + + + True + Choose a device + True + True + True + 0 + + True + * + False + + + - - GtkHSeparator - hseparator2 - 6 - 265 - 627 - 16 + + + True + GTK_SELECTION_BROWSE + + + + True + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + + + + + + + 135 + 46 + + + + + + 0 + 0 + True + Show output as MIX words + True + Word + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 104 + 96 + + + + + + 0 + 0 + True + Show output as decimal numbers + True + Dec + True + GTK_RELIEF_NORMAL + True + False + False + True + wordradio + + + + 176 + 96 + + + + + + 0 + 0 + True + Set all devices to current format + True + S_et all + True + GTK_RELIEF_NORMAL + True + + + + 16 + 112 + + + + + + 0 + 0 + True + Format + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 48 + 80 + + + + + + 0 + 0 + True + Device + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 24 + 8 + + + + + 0 + True + True + + + + - - GtkLabel - label159 - 8 - 248 - 64 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + External programs + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + GTK_BUTTONBOX_SPREAD + 10 - - GtkLabel - label158 - 128 - 248 - 64 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + - - GtkLabel - label157 - 256 - 248 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + + + + 0 + False + True + GTK_PACK_END + + - - GtkVSeparator - vseparator1 - 376 - 10 - 16 - 263 - + + + True + True + 0 - - GtkEntry - rI5_entry - 168 - 144 - 60 - 22 - True - - button_press_event - on_register_click - Sun, 11 Mar 2001 11:46:05 GMT - - False - True - 0 - - + + + True - - GtkEntry - loc_entry - 300 - 200 - 40 - 22 - True - False - True - 0 - - + + + 0 + 0 + True + True + True + True + 0 + xterm -e vi %s + True + * + False + + + 256 + 12 + + - - GtkLabel - label167 - 256 - 200 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + 0 + 0 + True + Editor command (e.g xterm -e vi %s) + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 8 + 15 + + + + + 0 + True + True + + - - GtkHSeparator - hseparator1 - 8 - 232 - 377 - 16 - + + + True - - GtkLabel - program_label - 184 - 248 - 56 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - elapsed_label - 64 - 248 - 48 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + + + 0 + 0 + True + True + True + True + 0 + mixasm -g %s + True + * + False + + + 255 + 4 + + - - GtkLabel - uptime_label - 296 - 248 - 72 - 16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + 0 + 0 + True + MIX sssembler command (e.g. mixasm -g %s) + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 8 + 8 + + + + + 0 + True + True + + + + + 0 + True + True + + + + - - GtkRadioButton - greater_radio - 336 - 128 - 32 - 24 - Comparison flag: greater - True - - toggled - on_cmp_g_toggled - Tue, 06 Mar 2001 21:21:40 GMT - - - False - True - cmp_group - + + Symbol table + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 245 + 265 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + GTK_RELIEF_NORMAL + True + 0 + - - GtkScrolledWindow - memory_scroll - 398 - 16 - 225 - 248 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - GtkCList - memory_cells - 195 - 248 - Click cell to change value - True - - select_row - on_memory_cells_select_row - True - Tue, 13 Mar 2001 07:38:52 GMT - - - click_column - on_memory_cells_click_column - Wed, 14 Mar 2001 14:18:57 GMT - - 2 - 53,135 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label165 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-close + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Close + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + + 0 + False + True + GTK_PACK_END + + - - GtkLabel - CList:title - label166 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + True + True + True + + - - - - - GtkRadioButton - lesser_radio - 264 - 128 - 35 - 24 - Comparison flag: lesser - True - - toggled - on_cmp_l_toggled - Tue, 06 Mar 2001 21:21:51 GMT - - - False - True - cmp_group - - - - GtkRadioButton - equal_radio - 304 - 128 - 31 - 24 - Comparison flag: equal - True - - toggled - on_cmp_e_toggled - Tue, 06 Mar 2001 21:22:04 GMT - - - False - True - cmp_group - - - - GtkHSeparator - hseparator3 - 6 - 1 - 627 - 16 - - - - GtkButton - loc_arrow_split - 346 - 200 - 30 - 23 - View loc address - True - - clicked - on_loc_arrow_clicked - Thu, 16 Aug 2001 21:01:57 GMT - - GTK_RELIEF_NORMAL - - - GtkPixmap - pixmap2 - jump.xpm - 0.5 - 0.5 - 0 - 0 - True - - - - - GtkCheckButton - over_toggle - 288 - 168 - 88 - 16 - True - - toggled - on_overflow_toggled - Tue, 06 Mar 2001 21:32:39 GMT - - - False - True + + 0 + True + True + + - + - - GtkWindow - mixal_window - False - - delete_event - on_window_hide - Sun, 24 Jun 2001 12:34:28 GMT - - - destroy_event - on_window_hide - Sun, 24 Jun 2001 12:34:36 GMT - - - destroy - on_window_hide - Sun, 24 Jun 2001 12:34:42 GMT - - - show - mixgtk_mixal_update - True - Sun, 24 Jun 2001 12:43:33 GMT - - MIXAL source - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 570 - 225 - True - True - False - - - GtkVBox - vbox5 - False - 0 - - - GtkToolbar - mixal_toolbar - 2 - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_ICONS - 15 - GTK_TOOLBAR_SPACE_EMPTY - GTK_RELIEF_NORMAL - True - - 0 - False - False - - - - GtkVSeparator - vseparator8 - - - - GtkButton - Toolbar:button - button14 - Run - - clicked - on_debug_run_activate - Wed, 15 Aug 2001 00:12:03 GMT - - - run.xpm - - - - GtkButton - Toolbar:button - button15 - Next - - clicked - on_debug_next_activate - Wed, 15 Aug 2001 00:12:36 GMT - - - next.xpm - - - - GtkButton - Toolbar:button - button16 - Clear breakpoints - - clicked - on_clear_breakpoints_activate - Thu, 16 Aug 2001 12:58:32 GMT - - - clear.xpm - - - - GtkButton - Toolbar:button - button18 - Symbol table - - clicked - on_symbols_activate - Thu, 16 Aug 2001 13:02:32 GMT - - - symbols.xpm - - - - GtkButton - Toolbar:button - button22 - Source code font - - clicked - on_mixal_font_activate - Thu, 16 Aug 2001 13:32:22 GMT - - - font.xpm - - True - - - - - GtkButton - Toolbar:button - button23 - Colors - - clicked - on_colors_activate - Thu, 16 Aug 2001 13:36:24 GMT - - - colors.xpm - - + + MIXAL source + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 570 + 225 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + + True + False + 0 - - GtkScrolledWindow - scrolledwindow27 - GTK_POLICY_ALWAYS - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - 0 - True - True - + + 2 + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_ICONS + True + True + + + + True + True + True + False - - GtkCList - mixal_clist - Click to toggle breakpoint - True - GDK_POINTER_MOTION_MASK - - select_row - on_mixal_select_row - True - Sun, 11 Mar 2001 01:15:28 GMT - - - motion_notify_event - on_mixal_motion_notify_event - Sun, 17 Jun 2001 19:44:48 GMT - - - leave_notify_event - on_mixal_leave_notify_event - Sat, 23 Jun 2001 22:26:17 GMT - - 2 - 152,80 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label213 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + True + + + + + False + False + + + + + + True + Run + Run + True + run.xpm + True + True + False + + + + False + True + + + + + + True + Next + Step + True + next.xpm + True + True + False + + + + False + True + + + + + + True + Clear breakpoints + Clear + True + clear.xpm + True + True + False + + + + False + True + + + + + + True + Symbol table + Symbols + True + symbols.xpm + True + True + False + + + + False + True + + + + + + True + True + True + True + + + False + False + + + + + + True + Source code font + Font + True + font.xpm + True + True + False + + + + False + True + + + + + + True + Colors + Colors + True + colors.xpm + True + True + False + + + + False + True + + + + 0 + False + False + + - - GtkLabel - CList:title - label214 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + + True + GTK_POLICY_ALWAYS + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + Click to toggle breakpoint + True + GDK_POINTER_MOTION_MASK + True + False + False + True + + + + + - - + + 0 + True + True + + - - GtkStatusbar - mixal_statusbar - 0 - False - False + + True + True + + + 0 + False + False + - + - - GtkWindow - devices_window - False - - delete_event - on_window_hide - Sun, 24 Jun 2001 12:34:51 GMT - - - destroy_event - on_window_hide - Sun, 24 Jun 2001 12:34:59 GMT - - - destroy - on_window_hide - Sun, 24 Jun 2001 12:35:09 GMT - - Devices - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 550 - 250 - True - True - False - - - GtkVBox - vbox4 - False - 0 - - - GtkToolbar - devices_toolbar - 2 - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_ICONS - 5 - GTK_TOOLBAR_SPACE_EMPTY - GTK_RELIEF_NORMAL - True + + Devices + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 550 + 250 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + True + False + 0 + - 0 - False - False + + 2 + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_ICONS + True + True + + + + True + Device directory + Device dir + True + devdir.xpm + True + True + False + + + + False + True + + + + + + True + Output format + Output + True + output.xpm + True + True + False + + + + False + True + + + + + + True + Output font + Font + True + font.xpm + True + True + False + + + + False + True + + + + + 0 + False + False + - - GtkButton - Toolbar:button - devdir_button - Device directory - - clicked - on_devdir_activate - Thu, 16 Aug 2001 13:14:09 GMT - - - devdir.xpm - - - - GtkButton - Toolbar:button - output_button - Output format - - clicked - on_devform_activate - Thu, 16 Aug 2001 14:46:32 GMT - - - output.xpm - - - - GtkButton - Toolbar:button - button21 - Output font - - clicked - on_devices_font_activate - Thu, 16 Aug 2001 13:31:44 GMT - - - font.xpm - - - - - GtkNotebook - devices_notebook - True - True - True - GTK_POS_TOP - True - 2 - 2 - False - 0 - True - True + + True + True + True + True + GTK_POS_TOP + True + False + + + + + + + + True + label + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + tab + + + + + 0 + True + True + - - - Placeholder - - - - GtkLabel - Notebook:tab - label - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - + - - GtkDialog - devdir_dialog - False - - delete_event - gtk_widget_hide - Sun, 08 Jul 2001 20:42:29 GMT - - - destroy_event - gtk_widget_hide - Sun, 08 Jul 2001 20:42:41 GMT - - - destroy - gtk_widget_hide - Sun, 08 Jul 2001 20:42:53 GMT - - Devices directory - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - True - - - GtkVBox - Dialog:vbox - dialog-vbox11 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area11 - 1 - False - 0 - - 0 - False - False - GTK_PACK_END - - - - GtkHButtonBox - hbuttonbox10 - GTK_BUTTONBOX_END - 0 - 91 - 25 - 0 - 0 - - 0 - True - True - - - - GtkButton - devdir_cancel - True - True - - clicked - on_devdir_cancel_clicked - Sun, 08 Jul 2001 20:44:06 GMT - - - GTK_RELIEF_NORMAL - - - - GtkButton - devdir_ok - True - True - - clicked - on_devdir_ok_clicked - Sun, 08 Jul 2001 20:44:28 GMT - - - GTK_RELIEF_NORMAL + + Devices directory + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + - - + + 0 + False + False + GTK_PACK_END + + - - GtkHBox - hbox1 - 25 - False - 11 - 0 - False - True + + 25 + True + False + 11 + + + + True + Directory + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + True + False + True + 0 + + True + * + False + + + 0 + True + True + + + + + + True + True + gtk-open + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + 0 + False + True + - - - GtkLabel - label239 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - devdir_entry - True - False - True - 0 - - - 0 - True - True - - - - - GtkButton - devdir_browse - True - - clicked - on_devdir_browse_clicked - Sun, 08 Jul 2001 20:43:50 GMT - - - GTK_RELIEF_NORMAL - - 0 - False - False - - - + - - GtkDialog - input_dialog - False - - destroy - gtk_true - Fri, 11 Jun 2004 20:59:50 GMT - - - delete_event - gtk_true - Fri, 11 Jun 2004 21:00:03 GMT - - - destroy_event - gtk_true - Fri, 11 Jun 2004 21:00:51 GMT - - Terminal input - GTK_WINDOW_POPUP - GTK_WIN_POS_CENTER - True - 510 - False - False - False - - - GtkVBox - Dialog:vbox - dialog-vbox12 - False - 0 - - - GtkHBox - Dialog:action_area - dialog-action_area12 - 1 - True - 5 + + Virtual machine + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 640 + 290 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + + 5 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + - 0 - True - True - GTK_PACK_END - + + True + False + 0 + + + + 1 + True + False + 1 - - GtkHButtonBox - hbuttonbox11 - GTK_BUTTONBOX_END - 0 - 85 - 27 - 7 - 0 - - 0 - True - True - - - - GtkButton - input_ok_button - True - True - - clicked - on_input_ok_clicked - Fri, 11 Jun 2004 21:01:32 GMT - - - GTK_RELIEF_NORMAL - + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 8 + True + 3 + 6 + False + 6 + 11 + + + + 0 + 0 + True + A + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + 0 + 0 + True + I1 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + 3 + 0 + 1 + fill + + + + + + + 0 + 0 + True + I2 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + 3 + 1 + 2 + fill + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 19 + + + + 1 + 2 + 0 + 1 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 3 + 4 + 1 + 2 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + 00 00 + True + * + False + 9 + + + + 3 + 4 + 0 + 1 + + + + + + + + 0 + 0 + True + X + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + 16 + 16 + True + I3 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + 3 + 2 + 3 + fill + + + + + + + 0 + 0 + True + I4 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 4 + 5 + 0 + 1 + fill + + + + + + + 16 + 16 + True + I5 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 4 + 5 + 1 + 2 + fill + + + + + + + 16 + 16 + True + I6 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 4 + 5 + 2 + 3 + fill + + + + + + + 0 + 0 + True + J + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + 0 + 0 + True + True + False + True + 0 + + 00 00 00 00 00 + True + * + False + 19 + + + + 1 + 2 + 1 + 2 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 5 + 6 + 0 + 1 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 5 + 6 + 1 + 2 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 5 + 6 + 2 + 3 + + + + + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 3 + 4 + 2 + 3 + + + + + + + + True + False + 0 + + + + 0 + 0 + True + True + False + True + 0 + + True + * + False + 9 + + + + 0 + False + False + + + + + + + + + 1 + 2 + 2 + 3 + fill + fill + + + + + + + + True + Registers + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 5 + False + True + + - - GtkButton - input_clear_button - True - True - - clicked - on_input_clear_clicked - Fri, 11 Jun 2004 21:01:56 GMT - - - GTK_RELIEF_NORMAL + + + True + False + 0 + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 1 + True + True + 5 + + + + 0 + 0 + True + Greater + True + G + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + 0 + 0 + True + Equal + True + E + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + 0 + 0 + True + Lesser + True + L + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + + + True + Comparison flag + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 0 + False + False + + + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 2 + True + True + 2 + + + + 3 + 0 + 0 + True + Click to toggle + True + Off + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 5 + False + False + + + + + + + + True + Overflow toggle + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 15 + False + False + + + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 4 + True + False + 1 + + + + 0 + 0 + True + True + False + True + 4 + 0 + True + * + False + 6 + + + 5 + False + False + + + + + + True + View loc address + True + GTK_RELIEF_NORMAL + True + + + + + True + gtk-jump-to + 4 + 0.5 + 0.5 + 0 + 0 + + + + + 1 + False + False + + + + + + + + True + Location + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 0 + False + False + GTK_PACK_END + + + + + 5 + False + True + + + + + + 2 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 5 + True + False + 5 + + + + 0 + 0 + True + Up: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + 0 + 0 + True + 00000000 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 5 + 0 + + + 0 + False + False + + + + + + 0 + 0 + True + Lap: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 3 + False + False + + + + + + 0 + 0 + True + 000000 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 5 + 0 + + + 0 + False + False + + + + + + 0 + 0 + True + Program: + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + + + 2 + False + False + + + + + + 0 + 0 + True + 000000 + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 5 + 0 + + + 0 + False + False + + + + + + + + True + Times + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 5 + False + True + + + + + 2 + False + False + + + + + + 7 + True + 0 + 0.5 + GTK_SHADOW_ETCHED_IN + + + + 5 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + 1 + True + Click cell to change value + True + True + True + False + True + + + + + + + + + + True + Memory + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + + + + + 3 + True + True + GTK_PACK_END + + - - + - - GtkVBox - vbox6 - 5 - True - 0 - 5 - True - True + + True + MIX Virtual Machine + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 0 + + + label_item + - - - GtkLabel - label240 - - GTK_JUSTIFY_LEFT - False - 0.5 - 0.5 - 0 - 0 - - 2 - True - True - - - - - GtkEntry - input_entry - True - True - - activate - on_input_entry_activate - Fri, 11 Jun 2004 23:30:53 GMT - - True - True - 70 - - - 4 - True - True - - - + - + diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c index 7ed4a11..f237a1a 100644 --- a/mixgtk/mixgtk_cmd_dispatcher.c +++ b/mixgtk/mixgtk_cmd_dispatcher.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_cmd_dispatcher.c : * Implementation of the functions declared in mixgtk_cmd_dispatcher.h * ------------------------------------------------------------------ - * $Id: mixgtk_cmd_dispatcher.c,v 1.15 2002/04/09 23:28:19 jao Exp $ + * $Id: mixgtk_cmd_dispatcher.c,v 1.16 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ #include @@ -74,9 +74,11 @@ static const gchar *TITLE_FORMAT_ = "gmixvm - %s"; static void log_command_ (mixgtk_dispatch_data_t *dis, const gchar *cmd) { - gtk_text_insert (GTK_TEXT (dis->log), NULL, NULL, NULL,"MIX> ", -1); - gtk_text_insert (GTK_TEXT (dis->log), NULL, NULL, NULL, cmd, -1); - gtk_text_insert (GTK_TEXT (dis->log), NULL, NULL, NULL, "\n", -1); + GtkTextBuffer *buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dis->log)); + + gtk_text_buffer_insert_at_cursor (buf, "MIX> ", -1); + gtk_text_buffer_insert_at_cursor (buf, cmd, -1); + gtk_text_buffer_insert_at_cursor (buf, "\n", -1); #ifdef HAVE_LIBHISTORY add_history ((char *)cmd); @@ -90,16 +92,22 @@ flush_log_ (mixgtk_dispatch_data_t *dis) { enum {BLKSIZE = 100}; static gchar BUFFER[BLKSIZE]; - + + GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dis->log)); + GtkTextMark *mark; ssize_t k; + fflush (dis->out); while ((k = read (dis->fildes[0], BUFFER, BLKSIZE)) != 0) { if (k == -1 && errno != EINTR) break; if (k != -1) - gtk_text_insert (GTK_TEXT (dis->log), NULL, NULL, NULL, - BUFFER, k); + gtk_text_buffer_insert_at_cursor (buffer, BUFFER, k); } + + mark = gtk_text_buffer_get_insert (buffer); + gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (dis->log), mark, 0, + TRUE, 0, 0); } /* hooks */ @@ -116,7 +124,7 @@ load_post_hook_ (mix_vm_cmd_dispatcher_t *dis, const gchar *arg, gpointer data) { static glong id = -1; - + if (mix_vm_cmd_dispatcher_get_last_result (dis)) { GtkWindow *mainw = @@ -129,7 +137,7 @@ load_post_hook_ (mix_vm_cmd_dispatcher_t *dis, const gchar *arg, mixgtk_mixal_load_file (); mixgtk_mixal_update (); mixgtk_mixal_update_bp_all (); - + if (id != -1) gtk_statusbar_remove (GTK_STATUSBAR (dis_data_.status), dis_data_.context, (guint)id); @@ -291,27 +299,28 @@ mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top) dis_data_.prompt = mixgtk_widget_factory_get (top, MIXGTK_WIDGET_PROMPT); g_return_val_if_fail (dis_data_.prompt != NULL, FALSE); - + if (dis_data_.log) text = gtk_editable_get_chars (GTK_EDITABLE (dis_data_.log), 0, -1); - + dis_data_.log = mixgtk_widget_factory_get (top, MIXGTK_WIDGET_LOG); - + g_return_val_if_fail (dis_data_.log != NULL, FALSE); - + if (text) { - gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL, text, -1); + gtk_text_buffer_insert_at_cursor + (gtk_text_view_get_buffer (GTK_TEXT_VIEW (dis_data_.log)), text, -1); g_free (text); } - + if (!dis_data_.dispatcher) { static const gchar *HISTORY_FILE = "gmixvm.history"; static gint HISTORY_SIZE = 100; mix_config_t *config = mixgtk_config_get_mix_config (); - + int r = pipe (dis_data_.fildes); g_return_val_if_fail (r == 0, FALSE); /* connect stdout/stderr to the pipe's write end */ @@ -336,10 +345,10 @@ mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top) dis_data_.out, config); mix_vm_cmd_dispatcher_print_time (dis_data_.dispatcher, FALSE); - + install_hooks_ (); } - + dis_data_.status = mixgtk_widget_factory_get (MIXGTK_MAIN, MIXGTK_WIDGET_STATUSBAR); g_return_val_if_fail (dis_data_.status != NULL, FALSE); @@ -424,38 +433,38 @@ complete_command_ (void) { GtkEntry *entry = GTK_ENTRY (dis_data_.prompt); gchar *prefix = NULL; - gchar *text = gtk_entry_get_text (entry); + const gchar *text = gtk_entry_get_text (entry); const GList *cmds = mix_vm_cmd_dispatcher_complete (dis_data_.dispatcher, text, &prefix); if (prefix != NULL) { + GtkTextBuffer *buf = + gtk_text_view_get_buffer (GTK_TEXT_VIEW (dis_data_.log)); + gtk_entry_set_text (entry, prefix); g_free (prefix); if (g_list_length ((GList *)cmds) > 1) { - static gchar BUFFER[25]; + static gchar BUFFER[25]; gint k = 0; - gtk_text_insert (GTK_TEXT (dis_data_.log), - NULL, NULL, NULL, "Completions:\n", -1); + gtk_text_buffer_insert_at_cursor (buf, "Completions:\n", -1); while (cmds) { g_snprintf (BUFFER, 25, "%-12s", (const char*)cmds->data); ++k; - gtk_text_insert (GTK_TEXT (dis_data_.log), - NULL, NULL, NULL, BUFFER, -1); + gtk_text_buffer_insert_at_cursor (buf, BUFFER, -1); if (k%5 == 0) - gtk_text_insert (GTK_TEXT (dis_data_.log), - NULL, NULL, NULL, "\n", -1); - + gtk_text_buffer_insert_at_cursor (buf, "\n", -1); + cmds = cmds->next; } if (k%5 != 0) - gtk_text_insert (GTK_TEXT (dis_data_.log), - NULL, NULL, NULL, "\n", -1); + gtk_text_buffer_insert_at_cursor (buf, "\n", -1); } else - gtk_entry_append_text (entry, " "); + gtk_text_buffer_insert_at_cursor (buf, " ", -1); + flush_log_ (&dis_data_); } } @@ -488,18 +497,20 @@ on_command_prompt_key_press_event (GtkEntry *w, GdkEventKey *e, gpointer d) return TRUE; } - if (key == GDK_Return) + return FALSE; +} + +void +on_command_prompt_activate (GtkEntry *prompt, gpointer data) +{ + gchar *text = + g_strstrip (gtk_editable_get_chars (GTK_EDITABLE (prompt), 0, -1)); + if (text && *text) { - gchar *text = g_strstrip (gtk_entry_get_text (w)); - if (text && *text) - { - log_command_ (&dis_data_, text); - if (!try_guile_ (text)) - mix_vm_cmd_dispatcher_dispatch_text (dis_data_.dispatcher, text); - gtk_entry_set_text (w, ""); - } - return TRUE; + log_command_ (&dis_data_, text); + if (!try_guile_ (text)) + mix_vm_cmd_dispatcher_dispatch_text (dis_data_.dispatcher, text); + gtk_entry_set_text (prompt, ""); } - - return FALSE; + g_free (text); } diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c index 5ba3f9f..69faa02 100644 --- a/mixgtk/mixgtk_device.c +++ b/mixgtk/mixgtk_device.c @@ -1,7 +1,7 @@ /* -*-c-*- ---------------- mixgtk_device.c : * actual types for mixgtk devices * ------------------------------------------------------------------ - * $Id: mixgtk_device.c,v 1.20 2004/06/11 23:35:59 jao Exp $ + * $Id: mixgtk_device.c,v 1.21 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -56,7 +56,6 @@ static GtkWidget *dtoggle_ = NULL; static GtkWidget *wtoggle_ = NULL; static GtkWidget *combo_ = NULL; -static gint last_pos_ = 0; /* virtual machine */ static mix_vm_t *vm_ = NULL; /* dec settings */ @@ -73,14 +72,14 @@ struct mixgtk_device_t { mix_device_t device; GtkWidget *widget; - gint pos; + GtkWidget *scroll; }; struct mixgtk_bin_device_t { struct mixgtk_device_t gtk_device; guint last_insert; - GtkWidget *scroll; + GtkListStore *store; gboolean dec; }; @@ -102,7 +101,8 @@ write_char_ (struct mixgtk_device_t *dev, const mix_word_t *block) BUFFER[5 * k] = '\n'; BUFFER[5 * k + 1] = '\0'; - gtk_text_insert (GTK_TEXT (dev->widget), NULL, NULL, NULL, BUFFER, -1); + gtk_text_buffer_insert_at_cursor + (gtk_text_view_get_buffer (GTK_TEXT_VIEW (dev->widget)), BUFFER, -1); } @@ -123,64 +123,29 @@ get_word_string_ (mix_word_t w, gboolean dec) static void write_bin_ (struct mixgtk_bin_device_t *dev, const mix_word_t *block) { - static gchar *DEFTEXT[BIN_DEV_COL_] = { "0", "0", "0", "0", "0" }; - - guint k, col, row; + guint k, col; gboolean dec = FALSE; + size_t len; - GtkCList *list = GTK_CLIST (dev->gtk_device.widget); - - dec = IS_DEC(decs_, dev->gtk_device.device.type); - - gtk_clist_freeze (list); + GtkTreeView *view = GTK_TREE_VIEW (dev->gtk_device.widget); + GtkListStore *store = dev->store; + GtkTreeIter iter; - for (k = 0; k < SIZES_[dev->gtk_device.device.type]; k++) - { - row = dev->last_insert / BIN_DEV_COL_; - col = dev->last_insert % BIN_DEV_COL_; - if (col == 0) - { - int j; - mix_word_t *words = g_new (mix_word_t, 5); - gtk_clist_append (list, DEFTEXT); - for (j = 0; j < 5; ++j) words[j] = block[k + j]; - gtk_clist_set_row_data_full (list, row, (gpointer)words, g_free); - } - gtk_clist_set_text (list, row, col, get_word_string_ (block[k], dec)); - dev->last_insert++; - } + g_assert (view); + g_assert (store); - gtk_clist_thaw (list); -} - -static void -redraw_bin_device_ (struct mixgtk_bin_device_t *dev) -{ - gint k, col, row; - gboolean dec = FALSE; - mix_word_t *words = NULL; - GtkCList *list; - - if (!dev) return; - - list = GTK_CLIST (dev->gtk_device.widget); dec = IS_DEC(decs_, dev->gtk_device.device.type); - gtk_clist_freeze (list); - - for (k = 0; k < dev->last_insert; ++k) + for (k = 0, len = SIZES_[dev->gtk_device.device.type]; k < len; k += 5) { - row = k / BIN_DEV_COL_; - col = k % BIN_DEV_COL_; - if (col == 0) - words = gtk_clist_get_row_data (list, row); - gtk_clist_set_text (list, row, col, get_word_string_ (words[col], dec)); + gtk_list_store_append (store, &iter); + for (col = 0; col < 5; ++col) + gtk_list_store_set (store, &iter, + col, get_word_string_ (block[k + col], dec), -1); + dev->last_insert++; } - - gtk_clist_thaw (list); } - static gboolean write_ (mix_device_t *dev, const mix_word_t *block) { @@ -192,7 +157,9 @@ write_ (mix_device_t *dev, const mix_word_t *block) if (MODES_[dev->type] == mix_dev_CHAR) write_char_ (gtkdev, block); else write_bin_ ((struct mixgtk_bin_device_t *)gtkdev, block); - gtk_notebook_set_page (container_, gtkdev->pos); + gtk_notebook_set_current_page (container_, + gtk_notebook_page_num (container_, + gtkdev->scroll)); return TRUE; } @@ -237,8 +204,9 @@ read_ (mix_device_t *dev, mix_word_t *block) if (MODES_[dev->type] == mix_dev_CHAR) write_char_ (gtkdev, block); else write_bin_ ((struct mixgtk_bin_device_t *)gtkdev, block); - gtk_notebook_set_page (container_, gtkdev->pos); - + gtk_notebook_set_current_page (container_, + gtk_notebook_page_num (container_, + gtkdev->scroll)); return TRUE; } @@ -258,12 +226,15 @@ static void destroy_ (mix_device_t *dev) { struct mixgtk_device_t *gtkdev = (struct mixgtk_device_t *)dev; - if (MODES_[dev->type] == mix_dev_BIN) - gtk_widget_destroy (((struct mixgtk_bin_device_t *)dev)->scroll); - gtk_widget_destroy (gtkdev->widget); + if (MODES_[dev->type] == mix_dev_BIN) { + struct mixgtk_bin_device_t * bdev = (struct mixgtk_bin_device_t *)dev; + gtk_list_store_clear (bdev->store); + g_object_unref ((gpointer)bdev->store); + } (DEF_DEV_VTABLE_->destroy) (dev); - gtk_notebook_remove_page (GTK_NOTEBOOK (container_), gtkdev->pos); - --last_pos_; + gtk_notebook_remove_page (container_, + gtk_notebook_page_num (container_, + gtkdev->scroll)); } static mix_device_vtable_t MIXGTK_VTABLE_ = { @@ -278,52 +249,51 @@ mixgtk_device_construct_gui_ (struct mixgtk_device_t *dev) g_assert (label); - dev->pos = last_pos_++; + dev->scroll = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (dev->scroll), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + if (MODES_[dev->device.type] == mix_dev_CHAR) { - GtkWidget *box = gtk_hbox_new (0, 0); - GtkWidget *scroll = NULL; - GtkAdjustment *vadj = NULL; - dev->widget = gtk_text_new (NULL, NULL); - g_assert (box); - g_assert (dev->widget); - gtk_text_set_editable (GTK_TEXT (dev->widget), FALSE); - vadj = GTK_TEXT (dev->widget)->vadj; - scroll = gtk_vscrollbar_new (vadj); - gtk_box_pack_start (GTK_BOX (box), dev->widget, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (box), scroll, FALSE, FALSE, 0); - gtk_notebook_insert_page (container_, box, label, dev->pos); - gtk_widget_show (box); - gtk_widget_show (scroll); + dev->widget = gtk_text_view_new (); + gtk_text_view_set_editable (GTK_TEXT_VIEW (dev->widget), FALSE); } else { gint k; - struct mixgtk_bin_device_t *bindev = - (struct mixgtk_bin_device_t *)dev; - - bindev->scroll = gtk_scrolled_window_new (NULL, NULL); - g_assert (bindev->scroll); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (bindev->scroll), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - dev->widget = gtk_clist_new (BIN_DEV_COL_); - g_assert (dev->widget); - for (k =0; k < BIN_DEV_COL_; ++k) + struct mixgtk_bin_device_t *bindev = (struct mixgtk_bin_device_t *)dev; + + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + + bindev->store = gtk_list_store_new (5, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING); + dev->widget = + gtk_tree_view_new_with_model (GTK_TREE_MODEL (bindev->store)); + + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (dev->widget), FALSE); + + for (k = 0; k < BIN_DEV_COL_; ++k) { - gtk_clist_set_column_width (GTK_CLIST (dev->widget), k, 120); - gtk_clist_set_column_auto_resize (GTK_CLIST (dev->widget), k, TRUE); + gtk_tree_view_append_column + (GTK_TREE_VIEW (dev->widget), + gtk_tree_view_column_new_with_attributes ("", renderer, + "text", k, NULL)); } - gtk_container_add (GTK_CONTAINER (bindev->scroll), dev->widget); - gtk_notebook_insert_page (container_, bindev->scroll, label, dev->pos); - gtk_widget_show (bindev->scroll); } - gtk_widget_show (label); + g_assert (dev->widget); + gtk_container_add (GTK_CONTAINER (dev->scroll), dev->widget); + gtk_notebook_append_page (container_, dev->scroll, label); gtk_widget_set_style (dev->widget, gtk_widget_get_style (GTK_WIDGET (container_))); + gtk_widget_show (label); + gtk_widget_show (dev->scroll); gtk_widget_show (dev->widget); - gtk_widget_draw (GTK_WIDGET (container_), NULL); } /* create a new mixgtk device */ @@ -363,32 +333,19 @@ mixgtk_device_copy_ (const struct mixgtk_device_t *from) { gchar *text = gtk_editable_get_chars (GTK_EDITABLE (from->widget), 0, -1); - gtk_text_insert (GTK_TEXT (result->widget), NULL, NULL, NULL, text, -1); + gtk_text_buffer_insert_at_cursor + (gtk_text_view_get_buffer (GTK_TEXT_VIEW (result->widget)), text, -1); g_free (text); } else { - static gchar *VALS[BIN_DEV_COL_] = {""}; struct mixgtk_bin_device_t *to = (struct mixgtk_bin_device_t *) result; struct mixgtk_bin_device_t *fr = (struct mixgtk_bin_device_t *) from; to->last_insert = fr->last_insert; to->dec = fr->dec; - if (to->last_insert > 0) - { - gint k, j, rows = to->last_insert / BIN_DEV_COL_; - GtkCList *tl = GTK_CLIST (result->widget); - GtkCList *fl = GTK_CLIST (from->widget); - for (k = 0; k < rows; ++k) - { - mix_word_t *words = g_new (mix_word_t, BIN_DEV_COL_); - mix_word_t *oldwords = - (mix_word_t *) gtk_clist_get_row_data (fl, k); - for (j = 0; j < BIN_DEV_COL_; ++j) words[j] = oldwords[j]; - gtk_clist_append (tl, VALS); - gtk_clist_set_row_data_full (tl, k, words, g_free); - } - redraw_bin_device_ (to); - } + gtk_tree_view_set_model (GTK_TREE_VIEW (result->widget), + GTK_TREE_MODEL (fr->store)); + to->store = fr->store; } return (mix_device_t *)result; } @@ -403,7 +360,6 @@ mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm) g_return_val_if_fail (vm != NULL, FALSE); container_ = container; vm_ = vm; - last_pos_ = 0; devdlg_ = NULL; devdir_dlg_ = NULL; devdir_entry_ = NULL; @@ -433,9 +389,6 @@ mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm) } } - /* set to first page */ - gtk_notebook_set_page (container_, 0); - return TRUE; } @@ -452,8 +405,8 @@ mixgtk_device_set_format (mix_device_type_t dev, gboolean dec) { if (dec) SET_DEC (decs_, dev); else CLEAR_DEC (decs_, dev); - redraw_bin_device_ ((struct mixgtk_bin_device_t *) - mix_vm_get_device (vm_, dev)); +/* redraw_bin_device_ ((struct mixgtk_bin_device_t *) */ +/* mix_vm_get_device (vm_, dev)); */ } } @@ -462,13 +415,13 @@ mixgtk_device_set_format (mix_device_type_t dev, gboolean dec) static mix_device_type_t get_device_idx_ (void) { - const gchar *name = gtk_entry_get_text - (GTK_ENTRY (GTK_COMBO (combo_)->entry)); - /* inefficient, but the list is short */ - int k; - for (k = 0; k <= LAST_BIN_DEV_; ++k) - if (!strcmp (name, DEF_NAMES_[k])) return k; - g_assert_not_reached (); +/* const gchar *name = gtk_entry_get_text */ +/* (GTK_ENTRY (GTK_COMBO (combo_)->entry)); */ +/* /\* inefficient, but the list is short *\/ */ +/* int k; */ +/* for (k = 0; k <= LAST_BIN_DEV_; ++k) */ +/* if (!strcmp (name, DEF_NAMES_[k])) return k; */ +/* g_assert_not_reached (); */ return 0; } @@ -492,7 +445,7 @@ init_devform_ (void) for (k = 0; k <= LAST_BIN_DEV_; ++k) names = g_list_append (names, (gchar *)DEF_NAMES_[k]); - gtk_combo_set_popdown_strings (GTK_COMBO (combo_), names); +/* gtk_combo_set_popdown_strings (GTK_COMBO (combo_), names); */ } void @@ -573,16 +526,32 @@ on_devdir_activate () gtk_widget_show (devdir_dlg_); } -static void -devdir_callback (const gchar *file) -{ - gtk_entry_set_text (devdir_entry_, file); -} - void on_devdir_browse_clicked () { - mixgtk_get_file (devdir_callback, _("Devices dir"), mix_device_get_dir ()); + GtkWidget *dialog; + const gchar *current = gtk_entry_get_text (devdir_entry_); + + dialog = + gtk_file_chooser_dialog_new (_("Devices folder"), + GTK_WINDOW (devdir_dlg_), + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + if (current != NULL) + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), current); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename + = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + gtk_entry_set_text (devdir_entry_, filename); + g_free (filename); + } + + gtk_widget_destroy (dialog); } void diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c index 7986f4d..50bcceb 100644 --- a/mixgtk/mixgtk_fontsel.c +++ b/mixgtk/mixgtk_fontsel.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_fontsel.c : * Implementation of the functions declared in mixgtk_fontsel.h * ------------------------------------------------------------------ - * $Id: mixgtk_fontsel.c,v 1.14 2001/09/18 22:51:29 jao Exp $ + * $Id: mixgtk_fontsel.c,v 1.15 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ #include @@ -33,8 +33,7 @@ static GHashTable *winfo_ = NULL; typedef struct winfo { GtkWidget *widget; - GtkStyle *style; - gchar *font; + const gchar *font; const gchar *key; } winfo; @@ -100,7 +99,7 @@ static winfo infos_[WIDGET_NO_]; /* initialise the font selection dialog */ static void -init_fontsel_ (void) +init_fontsel_ (void) { fontsel_dialog_ = mixgtk_widget_factory_get_dialog (MIXGTK_FONTSEL_DIALOG); g_assert (fontsel_dialog_ != NULL); @@ -117,7 +116,7 @@ change_font_ (mixgtk_widget_id_t widget) if (info->font) gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG (fontsel_dialog_), info->font); - + gtk_widget_show (fontsel_dialog_); } @@ -125,8 +124,9 @@ change_font_ (mixgtk_widget_id_t widget) void mixgtk_fontsel_load_defaults (void) { + int i; - const gchar *font = NULL; + const gchar *font; gboolean split = mixgtk_config_is_split (); fontsel_dialog_ = NULL; @@ -139,25 +139,13 @@ mixgtk_fontsel_load_defaults (void) infos_[i].widget = mixgtk_widget_factory_get (dialog_ids_[i], widget_ids_[i]); g_assert (infos_[i].widget != NULL); - if (infos_[i].style) gtk_style_unref (infos_[i].style); - infos_[i].style = gtk_style_copy - (gtk_widget_get_style (infos_[i].widget)); - gtk_widget_set_style (infos_[i].widget, infos_[i].style); - if (widget_ids_[i] == MIXGTK_WIDGET_MIXVM) - { - int k; - for (k = 0; k < CHILDREN_NO_; ++k) - gtk_widget_set_style (mixgtk_widget_factory_get - (MIXGTK_MIXVM_DIALOG, mixvm_children_[k]), - infos_[i].style); - } infos_[i].key = keys_[i]; g_hash_table_insert (winfo_, GINT_TO_POINTER (widget_ids_[i]), (gpointer)(infos_ + i)); infos_[i].font = NULL; font = mixgtk_config_get (keys_[i]); - if (font) mixgtk_fontsel_set (widget_ids_[i], font); + mixgtk_fontsel_set (widget_ids_[i], font? font : "Monospace"); } } @@ -168,30 +156,30 @@ mixgtk_fontsel_set (mixgtk_widget_id_t widget, const gchar *font) g_hash_table_lookup (winfo_, GINT_TO_POINTER (widget)); if (w != NULL && font != NULL) { - GdkFont *f = gdk_font_load (font); - if (f != NULL) + PangoFontDescription *font_desc = + pango_font_description_from_string (font); + if (font_desc != NULL) { - gdk_font_unref (w->style->font); - w->style->font = f; - if (w->font) g_free (w->font); - w->font = g_strdup (font); - gtk_widget_draw (w->widget, NULL); + gtk_widget_modify_font (w->widget, font_desc); if (widget == MIXGTK_WIDGET_MIXVM) { int k; for (k = 0; k < CHILDREN_NO_; ++k) - gtk_widget_draw - (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, - mixvm_children_[k]), - NULL); + { + GtkWidget *child = + mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, + mixvm_children_[k]); + gtk_widget_modify_font (child, font_desc); + } } + w->font = font; mixgtk_config_update (w->key, w->font); + pango_font_description_free (font_desc); } else mixgtk_config_remove (w->key); } - } const gchar * @@ -224,13 +212,13 @@ on_prompt_font_activate (void) } void -on_mix_font_activate (void) +on_mix_font_activate (void) { change_font_ (MIXGTK_WIDGET_MIXVM); } void -on_devices_font_activate (void) +on_devices_font_activate (void) { change_font_ (MIXGTK_WIDGET_DEVICE); } diff --git a/mixgtk/mixgtk_gen_handlers.c b/mixgtk/mixgtk_gen_handlers.c index 656286b..d33fbac 100644 --- a/mixgtk/mixgtk_gen_handlers.c +++ b/mixgtk/mixgtk_gen_handlers.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_gen_handlers.c : * Implementation of the functions declared in mixgtk_gen_handlers.h * ------------------------------------------------------------------ - * $Id: mixgtk_gen_handlers.c,v 1.8 2002/04/10 23:39:40 jao Exp $ + * $Id: mixgtk_gen_handlers.c,v 1.9 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ #include @@ -26,58 +26,51 @@ #include "mixgtk_cmd_dispatcher.h" #include "mixgtk_config.h" -static file_callback_t callback_ = NULL; - - -static void -on_file_ok_ (GtkWidget *w, gpointer fs) -{ - gchar *file = g_strdup - (gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs))); - gtk_widget_destroy (GTK_WIDGET (fs)); - if (callback_) callback_ (file); - g_free (file); -} - -static void -on_file_destroy_ (GtkWidget *w, gpointer data) -{ - gtk_grab_remove (GTK_WIDGET (w)); -} - -static void show_dlg_ (const gchar *title, const gchar *pattern) -{ - GtkWidget *file = gtk_file_selection_new (title); - if (pattern) - gtk_file_selection_complete (GTK_FILE_SELECTION (file), pattern); - - gtk_signal_connect (GTK_OBJECT (file), "destroy", - (GtkSignalFunc) on_file_destroy_, - GTK_OBJECT (file)); - gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file)->ok_button), - "clicked", (GtkSignalFunc) on_file_ok_, - GTK_OBJECT (file)); - gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION - (file)->cancel_button), - "clicked", (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (file)); - gtk_widget_show (file); - gtk_grab_add (file); -} - /* grab a file with an externally provided callback */ void mixgtk_get_file (file_callback_t callback, - const gchar *title, const gchar *pattern) + const gchar *title, + const gchar *pattern, + const gchar *def_file) { - g_return_if_fail (callback != NULL); - callback_ = callback; - show_dlg_ (title, pattern); -} + if (callback != NULL) + { + GtkWidget *dialog; + + dialog = + gtk_file_chooser_dialog_new (title, + NULL, + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + if (pattern != NULL) + { + GtkFileFilter *filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, pattern); + gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter); + } + + if (def_file != NULL) + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), def_file); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename; + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + callback (filename); + g_free (filename); + } + gtk_widget_destroy (dialog); + } +} /* exec prompt command */ -static void exec_cmd_ (mix_vm_command_t cmd, const gchar *arg) +static void +exec_cmd_ (mix_vm_command_t cmd, const gchar *arg) { gchar *command; if (arg) @@ -89,9 +82,10 @@ static void exec_cmd_ (mix_vm_command_t cmd, const gchar *arg) mixgtk_cmd_dispatcher_dispatch (command); g_free (command); } - + /* load mix binary */ -static void open_cb_ (const gchar *file) +static void +open_cb_ (const gchar *file) { if (file) exec_cmd_ (MIX_CMD_LOAD, file); @@ -100,11 +94,12 @@ static void open_cb_ (const gchar *file) void on_file_open_activate (GtkWidget *w, gpointer data) { - mixgtk_get_file (open_cb_, _("Load MIX program..."), "*.mix"); + mixgtk_get_file (open_cb_, _("Load MIX program..."), "*.mix", NULL); } /* edit mixal source */ -static void edit_cb_ (const gchar *file) +static void +edit_cb_ (const gchar *file) { exec_cmd_ (MIX_CMD_EDIT, file); } @@ -112,12 +107,13 @@ static void edit_cb_ (const gchar *file) void on_file_edit_activate (GtkWidget *w, gpointer data) { - mixgtk_get_file (edit_cb_, _("Edit MIXAL source file..."), + mixgtk_get_file (edit_cb_, _("Edit MIXAL source file..."), "*.mixal", mixgtk_cmd_dispatcher_get_src_path ()); } /* compile mixal source */ -static void compile_cb_ (const gchar *file) +static void +compile_cb_ (const gchar *file) { exec_cmd_ (MIX_CMD_COMPILE, file); } @@ -125,7 +121,7 @@ static void compile_cb_ (const gchar *file) void on_file_compile_activate (GtkWidget *w, gpointer data) { - mixgtk_get_file (compile_cb_, _("Compile MIXAL source file..."), + mixgtk_get_file (compile_cb_, _("Compile MIXAL source file..."), "*.mixal", mixgtk_cmd_dispatcher_get_src_path ()); } diff --git a/mixgtk/mixgtk_gen_handlers.h b/mixgtk/mixgtk_gen_handlers.h index 1e435c3..7028659 100644 --- a/mixgtk/mixgtk_gen_handlers.h +++ b/mixgtk/mixgtk_gen_handlers.h @@ -3,22 +3,22 @@ * ------------------------------------------------------------------ * Last change: Time-stamp: <2001-04-29 12:32:32 jao> * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ @@ -55,7 +55,7 @@ typedef void (*file_callback_t)(const gchar *file); extern void mixgtk_get_file (file_callback_t callback, const gchar *title, - const gchar *pattern); + const gchar *pattern, const gchar *def_file); #endif /* MIXGTK_GEN_HANDLERS_H */ diff --git a/mixgtk/mixgtk_input.c b/mixgtk/mixgtk_input.c index a516ced..90aa803 100644 --- a/mixgtk/mixgtk_input.c +++ b/mixgtk/mixgtk_input.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_input.c : * Implementation of the functions declared in mixgtk_input.h * ------------------------------------------------------------------ - * $Id: mixgtk_input.c,v 1.5 2002/04/09 23:28:19 jao Exp $ + * $Id: mixgtk_input.c,v 1.6 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ #include @@ -42,6 +42,11 @@ static GtkWidget *childs_[SIZE_]; static input_callback_t callback_; static gpointer data_; + +static void init_dialog_ (void); +static void set_word_ (mix_word_t word); + + /* init */ void mixgtk_input_init (void) @@ -49,41 +54,6 @@ mixgtk_input_init (void) dialog_ = NULL; } -static void -init_dialog_ (void) -{ - gint k; - - dialog_ = GTK_DIALOG (mixgtk_widget_factory_get_dialog (MIXGTK_WORD_DIALOG)); - g_assert (dialog_ != NULL); - for (k = 0; k < SIZE_; ++k) - { - childs_[k] = mixgtk_widget_factory_get_child_by_name - (MIXGTK_WORD_DIALOG, WGT_NAMES_[k]); - g_assert (childs_[k] != NULL); - } -} - -static void -set_word_ (mix_word_t word) -{ - enum {SIZE = 50}; - static gchar BUFFER[SIZE] = {0}; - gint k; - gint val = mix_word_magnitude (word); - gboolean neg = mix_word_is_negative (word); - g_snprintf (BUFFER, SIZE, "%s%d", neg ? "-" : "", val); - gtk_entry_set_text (GTK_ENTRY (childs_[DEC_]), BUFFER); - gtk_entry_set_text (GTK_ENTRY (childs_[SIGN_]), neg ? "-" : "+"); - for (k = 1; k < 6; ++k) - { - mix_byte_t b = mix_word_get_byte (word, k); - g_snprintf (BUFFER, SIZE, "%d", (int)b); - gtk_entry_set_text (GTK_ENTRY (childs_[SIGN_ + k]), BUFFER); - } -} - - /* get a word */ void mixgtk_input_word (const gchar *message, mix_word_t def, @@ -105,6 +75,7 @@ void mixgtk_input_short (const gchar *message, mix_short_t def, input_callback_t cb, gpointer data) { + if (!dialog_) init_dialog_ (); gtk_label_set_text (GTK_LABEL (childs_[MSG_]), message); set_word_ (mix_word_to_short_fast (def)); callback_ = cb; @@ -118,33 +89,34 @@ mixgtk_input_short (const gchar *message, mix_short_t def, #include /* dec and bytes input handler */ -gboolean -on_word_dec_key_press (GtkWidget *dec, GdkEvent *event, gpointer *data) +void +on_word_dec_changed (GtkEditable *dec, gpointer *data) { - GdkEventKey *key = (GdkEventKey *)event; - if (key->string && strlen (key->string) > 0 && !iscntrl (key->string[0])) + gchar *txt = gtk_editable_get_chars (dec, 0, -1); + + if (strlen (txt) > 0) { - gchar *text = gtk_entry_get_text (GTK_ENTRY (childs_[DEC_])); - gint val = atoi (text); + gint val = atoi (txt); set_word_ (mix_word_new (val)); } - return FALSE; + g_free (txt); } -gboolean -on_word_byte_key_press (GtkWidget *widget, GdkEvent *event, gpointer *data) +void +on_word_byte_changed (GtkEditable *byte, gpointer *data) { - GdkEventKey *key = (GdkEventKey *)event; - if (key->string && strlen (key->string) > 0 && !iscntrl (key->string[0])) + gchar *txt = gtk_editable_get_chars (byte, 0, 2); + + if (strlen (txt) > 0) { mix_byte_t bytes[5]; gint k; - gchar *s; + const gchar *s; mix_word_t w; - + for (k = 0; k < 5; ++k) { - gchar *text = gtk_entry_get_text (GTK_ENTRY (childs_[B1_ + k])); + const gchar *text = gtk_entry_get_text (GTK_ENTRY (childs_[B1_ + k])); bytes[k] = mix_byte_new (atoi (text)); } w = mix_bytes_to_word (bytes, 5); @@ -152,27 +124,32 @@ on_word_byte_key_press (GtkWidget *widget, GdkEvent *event, gpointer *data) if (s && s[0] == '-') mix_word_reverse_sign (w); set_word_ (w); } - return FALSE; + g_free (txt); } -gboolean -on_word_sign_key_press (GtkWidget *widget, GdkEvent *event, gpointer *data) +void +on_word_sign_changed (GtkEditable *sign, gpointer *data) { - GdkEventKey *key = (GdkEventKey *)event; - if (key->string && strlen (key->string) > 0 && !iscntrl (key->string[0])) + gchar *txt = gtk_editable_get_chars (sign, 0, 1); + + if (strlen (txt) > 0) { - gchar s = key->string[0]; - gchar *txt = gtk_entry_get_text (GTK_ENTRY (childs_[SIGN_])); - gchar c = txt ? txt[0] : '+'; - if ( (s == '+' || s == '-') && s != c) - { - mix_word_t w = - mix_word_new (atoi - (gtk_entry_get_text (GTK_ENTRY (childs_[DEC_])))); - set_word_ (mix_word_negative (w)); - } + gint pos = 0; + mix_word_t w = + mix_word_new (atoi (gtk_entry_get_text (GTK_ENTRY (childs_[DEC_])))); + + g_signal_handlers_block_by_func (GTK_OBJECT (sign), + on_word_sign_changed, data); + + if (txt[0] != '+' && txt[0] != '-') txt[0] = '+'; + gtk_editable_delete_text (sign, 0, 1); + gtk_editable_insert_text (sign, txt, 1, &pos); + + g_signal_handlers_unblock_by_func (GTK_OBJECT (sign), + on_word_sign_changed, data); + set_word_ (txt[0] == '-' ? mix_word_negative (w) : w); } - return FALSE; + g_free (txt); } void @@ -180,6 +157,11 @@ on_word_ok_clicked (GtkWidget *widget, gpointer *data) { const gchar *text = gtk_entry_get_text (GTK_ENTRY (childs_[DEC_])); mix_word_t w = mix_word_new (atoi (text)); + if (w == MIX_WORD_ZERO) + { + const gchar *sign = gtk_entry_get_text (GTK_ENTRY (childs_[SIGN_])); + if (sign && sign[0] == '-') mix_word_reverse_sign (w); + } callback_ (w, data_); gtk_widget_hide (GTK_WIDGET (dialog_)); } @@ -195,3 +177,57 @@ on_word_reset_clicked (GtkWidget *w, gpointer *data) { set_word_ (MIX_WORD_ZERO); } + +static void +init_dialog_ (void) +{ + gint k; + + dialog_ = GTK_DIALOG (mixgtk_widget_factory_get_dialog (MIXGTK_WORD_DIALOG)); + g_assert (dialog_ != NULL); + for (k = 0; k < SIZE_; ++k) + { + childs_[k] = mixgtk_widget_factory_get_child_by_name + (MIXGTK_WORD_DIALOG, WGT_NAMES_[k]); + g_assert (childs_[k] != NULL); + } +} + +static void +set_word_ (mix_word_t word) +{ + enum {SIZE = 50}; + static gchar BUFFER[SIZE] = {0}; + gint k; + gint val = mix_word_magnitude (word); + gboolean neg = mix_word_is_negative (word); + g_snprintf (BUFFER, SIZE, "%s%d", neg ? "-" : "", val); + + + g_signal_handlers_block_by_func (GTK_OBJECT (childs_[DEC_]), + on_word_dec_changed, NULL); + g_signal_handlers_block_by_func (GTK_OBJECT (childs_[SIGN_]), + on_word_sign_changed, NULL); + for (k = B1_; k <= B5_; ++k) + g_signal_handlers_block_by_func (GTK_OBJECT (childs_[k]), + on_word_byte_changed, NULL); + + gtk_entry_set_text (GTK_ENTRY (childs_[DEC_]), BUFFER); + gtk_entry_set_text (GTK_ENTRY (childs_[SIGN_]), neg ? "-" : "+"); + + for (k = 1; k < 6; ++k) + { + mix_byte_t b = mix_word_get_byte (word, k); + g_snprintf (BUFFER, SIZE, "%d", (int)b); + gtk_entry_set_text (GTK_ENTRY (childs_[SIGN_ + k]), BUFFER); + } + + for (k = B1_; k <= B5_; ++k) + g_signal_handlers_unblock_by_func (GTK_OBJECT (childs_[k]), + on_word_byte_changed, NULL); + g_signal_handlers_unblock_by_func (GTK_OBJECT (childs_[DEC_]), + on_word_dec_changed, NULL); + g_signal_handlers_unblock_by_func (GTK_OBJECT (childs_[SIGN_]), + on_word_sign_changed, NULL); +} + diff --git a/mixgtk/mixgtk_mixal.c b/mixgtk/mixgtk_mixal.c index dc0f6d5..b805c30 100644 --- a/mixgtk/mixgtk_mixal.c +++ b/mixgtk/mixgtk_mixal.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_mixal.c : * Implementation of the functions declared in mixgtk_mixal.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixal.c,v 1.16 2002/04/10 23:39:40 jao Exp $ + * $Id: mixgtk_mixal.c,v 1.17 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ @@ -33,7 +33,9 @@ #define MIXAL_TAB_POS_ 2 static mix_vm_t *vm_ = NULL; -static GtkCList *clist_; +static GtkTreeView *clist_ = NULL; +static GtkListStore *clist_store_ = NULL; + static gulong lineno_; static const gchar *LOCAL_STATUS_BAR_ = "mixal_statusbar"; static GtkStatusbar *status_; @@ -41,164 +43,203 @@ static gint status_context_; static GPtrArray *tips_text_ = NULL; static GtkWidget *symbols_dlg_ = NULL; -static GtkWidget *symbols_clist_ = NULL; -static const gchar *SYMBOLS_CLIST_NAME_ = "symbols_clist"; +static GtkTreeView *symbols_view_ = NULL; +static GtkListStore *symbols_store_ = NULL; +static const gchar *SYMBOLS_VIEW_NAME_ = "symbols_view"; + +static const gchar *bp_stock_id_ = NULL; +static const gchar *pc_stock_id_ = NULL; +static const guint bp_stock_size_ = GTK_ICON_SIZE_MENU; + +enum { + CLIST_BP_ID_COL, + CLIST_BP_SIZE_COL, + CLIST_ADDRESS_COL, + CLIST_BYTECODE_COL, + CLIST_CODE_COL, + CLIST_ADDRESS_NO_COL, + CLIST_LINE_NO_COL, + CLIST_COL_NO +}; + +enum { + SYMBOLS_NAME_COL, + SYMBOLS_VALUE_COL, + SYMBOLS_WORD_COL, + SYMBOLS_COL_NO +}; + + +static gboolean +mixal_event_ (GtkWidget *w, GdkEvent *event, gpointer data); + static void -init_symbols_ (void) +init_symbols_ (void) { + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + symbols_dlg_ = mixgtk_widget_factory_get_dialog (MIXGTK_SYMBOLS_DIALOG); g_assert (symbols_dlg_); - symbols_clist_ = mixgtk_widget_factory_get_child_by_name - (MIXGTK_SYMBOLS_DIALOG, SYMBOLS_CLIST_NAME_); - g_assert (symbols_clist_); - gtk_clist_set_sort_type (GTK_CLIST (symbols_clist_), GTK_SORT_ASCENDING); - gtk_clist_set_auto_sort (GTK_CLIST (symbols_clist_), TRUE); + symbols_view_ = GTK_TREE_VIEW + (mixgtk_widget_factory_get_child_by_name + (MIXGTK_SYMBOLS_DIALOG, SYMBOLS_VIEW_NAME_)); + g_assert (symbols_view_); + + symbols_store_ = gtk_list_store_new (SYMBOLS_COL_NO, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING); + + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (symbols_store_), + SYMBOLS_NAME_COL, + GTK_SORT_ASCENDING); + + gtk_tree_view_set_model (symbols_view_, GTK_TREE_MODEL (symbols_store_)); + g_object_unref (G_OBJECT (symbols_store_)); + gtk_tree_view_append_column + (symbols_view_, + gtk_tree_view_column_new_with_attributes ("Name", renderer, + "text", SYMBOLS_NAME_COL, + NULL)); + gtk_tree_view_append_column + (symbols_view_, + gtk_tree_view_column_new_with_attributes ("Value", renderer, + "text", SYMBOLS_VALUE_COL, + NULL)); + gtk_tree_view_append_column + (symbols_view_, + gtk_tree_view_column_new_with_attributes ("", renderer, + "text", SYMBOLS_WORD_COL, + NULL)); } static void -insert_symbol_ (gpointer symbol, gpointer value, gpointer list) +insert_symbol_ (gpointer symbol, gpointer value, gpointer data) { enum {DEC_SIZE = 25, WORD_SIZE = 20}; static gchar DEC[DEC_SIZE], WORD[WORD_SIZE]; - - gchar *text[] = {(gchar *)symbol, DEC, WORD}; + + GtkTreeIter iter; + mix_word_t w = (mix_word_t)GPOINTER_TO_INT (value); g_snprintf (DEC, DEC_SIZE, "%s%ld", mix_word_is_negative (w)? "-" : "+", mix_word_magnitude (w)); mix_word_print_to_buffer (w, WORD); - gtk_clist_append ((GtkCList *)list, text); + + gtk_list_store_append (symbols_store_, &iter); + gtk_list_store_set (symbols_store_, &iter, + SYMBOLS_NAME_COL, (const gchar*)symbol, + SYMBOLS_VALUE_COL, DEC, + SYMBOLS_WORD_COL, WORD, + -1); } static void fill_symbols_ (const mix_symbol_table_t *table) { - if (symbols_clist_) - gtk_clist_clear (GTK_CLIST (symbols_clist_)); + if (symbols_view_) + gtk_list_store_clear (symbols_store_); else init_symbols_ (); - + mix_symbol_table_foreach (((mix_symbol_table_t *)table), - insert_symbol_, (gpointer)symbols_clist_); + insert_symbol_, NULL); } -static GdkColor colors_[3][2]; -static GdkColormap *colormap_ = NULL; -static const char* default_colors_[3][2] = { - {"red", "black"}, - {"lightgrey", "black"}, - {"white", "black"} -}; +static gboolean +init_clist_ (mixgtk_dialog_id_t top) +{ + GtkStockItem item; -static const char* keys_[3][2] = { - {"MIXAL.bp.color.bg", "MIXAL.bp.color.fg"}, - {"MIXAL.lc.color.bg", "MIXAL.lc.color.fg"}, - {"MIXAL.pl.color.bg", "MIXAL.pl.color.fg"} -}; + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GtkCellRenderer *bprenderer = gtk_cell_renderer_pixbuf_new (); -static const GdkColor * -parse_color_ (const gchar *str) -{ - static GdkColor color; - if (sscanf (str, "%hd%hd%hd", &(color.red), &(color.green), &(color.blue)) < 3) + clist_ = GTK_TREE_VIEW + (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_MIXAL)); + + g_assert (clist_); + + clist_store_ = gtk_list_store_new (CLIST_COL_NO, + G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_INT); + + gtk_tree_view_set_model (clist_, GTK_TREE_MODEL (clist_store_)); + g_object_unref (G_OBJECT (clist_store_)); + + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("", bprenderer, + "stock-id", CLIST_BP_ID_COL, + "stock-size", CLIST_BP_SIZE_COL, + NULL)); + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("Address", renderer, + "text", CLIST_ADDRESS_COL, + NULL)); + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("Bytecode", renderer, + "text", CLIST_BYTECODE_COL, + NULL)); + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("Source", renderer, + "text", CLIST_CODE_COL, + NULL)); + + if (gtk_stock_lookup (GTK_STOCK_STOP, &item)) { - g_warning (_("Wrong color spec: %s\n"), str); - return NULL; + bp_stock_id_ = item.stock_id; } - - return &color; -} -static const gchar * -color_to_string_ (const GdkColor *color) -{ - enum {LEN = 100}; - static gchar buffer[LEN]; - g_snprintf (buffer, LEN, "%hd %hd %hd", - color->red, color->green, color->blue); - return buffer; -} + if (gtk_stock_lookup (GTK_STOCK_GO_FORWARD, &item)) + { + pc_stock_id_ = item.stock_id; + } -static gboolean -init_color_ (GdkColor *c, const gchar *name) -{ - return (gdk_color_parse (name, c) && - gdk_colormap_alloc_color (colormap_, c, FALSE, TRUE)); + return TRUE; } + /* initialise the mixal widgets */ gboolean mixgtk_mixal_init (mix_vm_t *vm, mixgtk_dialog_id_t top) { static gboolean restart = FALSE; - int i,j; - + g_return_val_if_fail (vm != NULL, FALSE); vm_ = vm; - clist_ = GTK_CLIST (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_MIXAL)); - g_return_val_if_fail (clist_ != NULL, FALSE); - + + if (!init_clist_ (top)) return FALSE; + if (!mixgtk_config_is_split ()) status_ = GTK_STATUSBAR (mixgtk_widget_factory_get (MIXGTK_MAIN, MIXGTK_WIDGET_STATUSBAR)); else status_ = GTK_STATUSBAR (mixgtk_widget_factory_get_child_by_name (top, LOCAL_STATUS_BAR_)); - + g_return_val_if_fail (status_ != NULL, FALSE); status_context_ = gtk_statusbar_get_context_id (status_, "MIXAL status"); - - symbols_dlg_ = symbols_clist_ = NULL; - - /* allocate colors */ - colormap_ = gtk_widget_get_colormap (GTK_WIDGET (clist_)); - for (i = 0; i < 3; ++i) - for (j = 0; j < 2; ++j) - { - const gchar *ccol = mixgtk_config_get (keys_[i][j]); - const GdkColor *color = NULL; - if (ccol && (color = parse_color_ (ccol))) - { - mixgtk_mixal_set_color (i, j, color); - } - else - { - g_return_val_if_fail (init_color_ - (&colors_[i][j], default_colors_[i][j]), - FALSE); - } - } + + symbols_dlg_ = NULL; + symbols_view_ = NULL; + + g_signal_connect (G_OBJECT (clist_), "event", + G_CALLBACK (mixal_event_), NULL); if (restart) mixgtk_mixal_load_file (); else restart = TRUE; - - return TRUE; -} - -/* set the plain, location pointer and break colors */ -void -mixgtk_mixal_set_color (mixal_line_t line, mixal_line_zone_t zone, - const GdkColor *color) -{ - g_return_if_fail (color != NULL); - g_return_if_fail (line <= MIXAL_LINE_PLAIN); - g_return_if_fail (zone <= MIXAL_LINE_FG); - colors_[line][zone].red = color->red; - colors_[line][zone].green = color->green; - colors_[line][zone].blue = color->blue; - gdk_colormap_alloc_color (colormap_, &colors_[line][zone], FALSE, TRUE); - mixgtk_mixal_update_bp_all (); - mixgtk_config_update (keys_[line][zone], - color_to_string_(&colors_[line][zone])); -} -const GdkColor * -mixgtk_mixal_get_color (mixal_line_t line, mixal_line_zone_t zone) -{ - g_return_val_if_fail (line <= MIXAL_LINE_PLAIN, FALSE); - g_return_val_if_fail (zone <= MIXAL_LINE_FG, FALSE); - return &colors_[line][zone]; + return TRUE; } /* load the corresponding mixal file */ @@ -241,180 +282,250 @@ update_tips_ (const mix_symbol_table_t *table, void mixgtk_mixal_load_file (void) { - enum {ADDR_SIZE = 20, CONT_SIZE = 200}; - static gchar ADDR[ADDR_SIZE], CONT[CONT_SIZE]; - static gchar *TEXT[] = {ADDR, CONT}; - static gchar *NULL_TEXT[] = {NULL, NULL}; - + enum {ADDR_SIZE = 20, CONT_SIZE = 200, WORD_SIZE = 20}; + static gchar ADDR[ADDR_SIZE], CONT[CONT_SIZE], WORD[WORD_SIZE]; + const mix_src_file_t *file; - + GtkTreeIter iter; + g_assert (vm_); g_assert (clist_); - - gtk_clist_clear (clist_); + + gtk_list_store_clear (clist_store_); + if (tips_text_) + { + g_ptr_array_free (tips_text_, TRUE); + tips_text_ = NULL; + } + file = mix_vm_get_src_file (vm_); if (file != NULL) { gint k; + mix_address_t addr; const mix_symbol_table_t *table = mix_vm_get_symbol_table (vm_); - + + if (table) tips_text_ = g_ptr_array_new (); + lineno_ = mix_src_file_get_line_no (file); - if (tips_text_) g_ptr_array_free (tips_text_, TRUE); - tips_text_ = g_ptr_array_new (); - gtk_clist_freeze (clist_); + for (k = 0; k < lineno_; ++k) { - const gchar *line = mix_src_file_get_line (file, k + 1); - - g_snprintf (CONT, CONT_SIZE, "%03d: %s", k + 1, line); + gchar *line = + g_strchomp ((gchar *)mix_src_file_get_line (file, k + 1)); + + g_snprintf (CONT, CONT_SIZE, " %03d: %s", k + 1, line); addr = mix_vm_get_lineno_address (vm_, k + 1); if (addr != MIX_VM_CELL_NO) { - g_snprintf (ADDR, ADDR_SIZE, "%04d: ", - mix_short_magnitude (addr)); + g_snprintf (ADDR, ADDR_SIZE, "%04d", mix_short_magnitude (addr)); mix_word_print_to_buffer (mix_vm_get_addr_contents (vm_, addr), - ADDR + strlen (ADDR)); + WORD); } else - ADDR[0] = '\0'; - gtk_clist_append (clist_, TEXT); - gtk_clist_set_row_data (clist_, k, GINT_TO_POINTER - (mix_short_magnitude (addr))); - if (table) update_tips_ (table, line); - + { + g_snprintf (ADDR, ADDR_SIZE, _("N/A")); + g_snprintf (WORD, WORD_SIZE, _("N/A")); + } + gtk_list_store_append (clist_store_, &iter); + gtk_list_store_set (clist_store_, &iter, + CLIST_ADDRESS_NO_COL, mix_short_magnitude (addr), + CLIST_LINE_NO_COL, k + 1, + CLIST_ADDRESS_COL, ADDR, + CLIST_CODE_COL, CONT, + CLIST_BYTECODE_COL, WORD, + CLIST_BP_SIZE_COL, bp_stock_size_, + -1); + if (table) update_tips_ (table, line); } if (table) fill_symbols_ (table); - gtk_clist_append (clist_, NULL_TEXT); - gtk_clist_set_row_data (clist_, k, GINT_TO_POINTER (MIX_VM_CELL_NO)); - gtk_clist_unselect_row (clist_, 0, 0); - gtk_clist_thaw (clist_); } else - lineno_ = 0; + { + lineno_ = 0; + gtk_list_store_append (clist_store_, &iter); + gtk_list_store_set (clist_store_, &iter, + CLIST_ADDRESS_NO_COL, MIX_VM_CELL_NO, + CLIST_LINE_NO_COL, 0, + CLIST_ADDRESS_COL, "", + CLIST_CODE_COL, _("Source not available"), + CLIST_BYTECODE_COL, "", + -1); + } } /* update the widgets */ +static gint +find_address_ (gint address) +{ + GtkTreeIter iter; + gint addr; + gint row = 0; + gboolean valid = + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (clist_store_), &iter); + + while (valid) + { + ++row; + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), &iter, + CLIST_ADDRESS_NO_COL, &addr, -1); + if (addr == address) return row; + valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (clist_store_), &iter); + } + return 0; +} + static void -reset_bg_ (gint row) +update_bp_ (gint row) { - gint addr = GPOINTER_TO_INT (gtk_clist_get_row_data (clist_, row)); - gboolean isset = mix_vm_has_breakpoint_at_address (vm_, addr); - gtk_clist_set_background (clist_, row, - isset ? &colors_[MIXAL_LINE_BREAK][MIXAL_LINE_BG]: - &colors_[MIXAL_LINE_PLAIN][MIXAL_LINE_BG]); - gtk_clist_set_foreground (clist_, row, - isset ? &colors_[MIXAL_LINE_BREAK][MIXAL_LINE_FG]: - &colors_[MIXAL_LINE_PLAIN][MIXAL_LINE_FG]); + if (row > 0) + { + GtkTreePath *path = gtk_tree_path_new_from_indices (row - 1, -1); + GtkTreeIter iter; + + if (gtk_tree_model_get_iter (GTK_TREE_MODEL (clist_store_), &iter, path)) + { + gint address; + const gchar *id = NULL; + + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), &iter, + CLIST_ADDRESS_NO_COL, &address, -1); + if (mix_vm_has_breakpoint_at_address (vm_, address)) + id = bp_stock_id_; + else if (address == + (gint) mix_short_magnitude (mix_vm_get_prog_count (vm_))) + id = pc_stock_id_; + + gtk_list_store_set (clist_store_, &iter, CLIST_BP_ID_COL, id, -1); + } + gtk_tree_path_free (path); + } } - + static void select_row_ (gint row) { - static gint last = -1; - - gtk_clist_set_background (clist_, row, &colors_[MIXAL_LINE_LOC][MIXAL_LINE_BG]); - gtk_clist_set_foreground (clist_, row, &colors_[MIXAL_LINE_LOC][MIXAL_LINE_FG]); - if (gtk_clist_row_is_visible (clist_, row) != GTK_VISIBILITY_FULL) - gtk_clist_moveto (clist_, row, 0, 0.25, 0); - if (last != -1 && last != row) reset_bg_ (last); - last = row; + static gint previous = 0; + + if (row > 0 && previous != row) + { + GtkTreePath *path = gtk_tree_path_new_from_indices (row - 1, -1); + GtkTreeIter iter; + + if (gtk_tree_model_get_iter (GTK_TREE_MODEL (clist_store_), &iter, path)) + { + gtk_list_store_set (clist_store_, &iter, + CLIST_BP_ID_COL, pc_stock_id_, + -1); + update_bp_ (previous); + previous = row; + gtk_tree_view_scroll_to_cell (clist_, path, NULL, FALSE, 0.3, 0); + } + gtk_tree_path_free (path); + } } void mixgtk_mixal_update (void) { gint addr = 0; - gint k = 0; - + g_assert (vm_); - g_assert (clist_); - - addr = mix_short_magnitude (mix_vm_get_prog_count (vm_)); - k = gtk_clist_find_row_from_data (clist_, GINT_TO_POINTER (addr)); - select_row_ (k); + + addr = (gint) mix_short_magnitude (mix_vm_get_prog_count (vm_)); + select_row_ (find_address_ (addr)); } /* breakpoints */ void mixgtk_mixal_update_bp_at_address (guint addr) { - gint k; - - g_assert (vm_); - g_assert (clist_); - - k = gtk_clist_find_row_from_data (clist_, GINT_TO_POINTER (addr)); - reset_bg_ (k); + update_bp_ (find_address_ ((gint)addr)); } void mixgtk_mixal_update_bp_at_line (guint line) { - if ( line < 1 ) return; - - while (line < lineno_) - { - gint addr = GPOINTER_TO_INT (gtk_clist_get_row_data (clist_, line - 1)); - if (addr != MIX_VM_CELL_NO) break; - ++line; - } - reset_bg_ (line - 1); + update_bp_ ((gint)line); } void -mixgtk_mixal_update_bp_all () +mixgtk_mixal_update_bp_all (void) { - gint k, addr; - for (k = 0; k < lineno_; ++k) reset_bg_ (k); - addr = mix_vm_get_prog_count (vm_); - k = gtk_clist_find_row_from_data (clist_, GINT_TO_POINTER (addr)); - select_row_ (k); + gint k; + for (k = 1; k <= lineno_; ++k) update_bp_ (k); + mixgtk_mixal_update (); } /* callbacks */ -void -on_mixal_select_row (GtkWidget *w, gint row, gint col, GdkEventButton *e, - gpointer data) +static void +mixal_row_clicked_ (GtkTreeIter *iter) { - gboolean isset; - gint addr, pc; - - gtk_clist_unselect_row (clist_, row, col); - addr = GPOINTER_TO_INT (gtk_clist_get_row_data (clist_, row)); - pc = mix_vm_get_prog_count (vm_); + + gint addr = MIX_VM_CELL_NO; + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), + iter, CLIST_ADDRESS_NO_COL, &addr, -1); + if (addr < MIX_VM_CELL_NO) { - isset = mix_vm_has_breakpoint_at_address (vm_, addr); + gboolean isset = mix_vm_has_breakpoint_at_address (vm_, addr); if (isset) - mix_vm_clear_breakpoint_address (vm_, addr); + mix_vm_clear_breakpoint_address (vm_, addr); else - mix_vm_set_breakpoint_address (vm_, addr); - reset_bg_ (row); + mix_vm_set_breakpoint_address (vm_, addr); + update_bp_ (find_address_ (addr)); } } -gint -on_mixal_motion_notify_event (GtkWidget *list, GdkEventMotion *event, - gpointer data) +static void +mixal_motion_ (GtkTreeIter *iter) { static gint last_row = 0; static guint last_message = 0; - gint row = last_row, col = 0; - if (gtk_clist_get_selection_info (clist_, event->x, event->y, &row, &col) - && row != last_row && tips_text_) + + gint row = last_row; + + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), iter, + CLIST_LINE_NO_COL, &row, -1); + + if (row > 0 && row != last_row && tips_text_) { const gchar *msg = NULL; last_row = row; if (last_message) - gtk_statusbar_remove (status_, status_context_, last_message); - msg = (const gchar *)g_ptr_array_index (tips_text_, row); + gtk_statusbar_remove (status_, status_context_, last_message); + msg = (const gchar *)g_ptr_array_index (tips_text_, row - 1); if (msg) - last_message = gtk_statusbar_push (status_, status_context_, msg); + last_message = gtk_statusbar_push (status_, status_context_, msg); else - last_message = 0; - } + last_message = 0; + } +} + +static gboolean +mixal_event_ (GtkWidget *w, GdkEvent *event, gpointer data) +{ + GdkEventType type = event->type; + if ((type == GDK_BUTTON_PRESS || type == GDK_MOTION_NOTIFY) + && (gtk_tree_view_get_bin_window (clist_) == event->any.window)) + { + gdouble x = (type == GDK_BUTTON_PRESS)? event->button.x : event->motion.x; + gdouble y = (type == GDK_BUTTON_PRESS)? event->button.y : event->motion.y; + GtkTreeIter iter; + GtkTreePath *path = NULL; + GtkTreeViewColumn *col = NULL; + if (gtk_tree_view_get_path_at_pos (clist_, x, y, &path, &col, NULL, NULL) + && gtk_tree_model_get_iter (GTK_TREE_MODEL (clist_store_), + &iter, path)) + { + if (type == GDK_BUTTON_PRESS) mixal_row_clicked_ (&iter); + else mixal_motion_ (&iter); + } + if (path) gtk_tree_path_free (path); + return TRUE; + } return FALSE; } diff --git a/mixgtk/mixgtk_mixal.h b/mixgtk/mixgtk_mixal.h index a1ab681..ccf3b61 100644 --- a/mixgtk/mixgtk_mixal.h +++ b/mixgtk/mixgtk_mixal.h @@ -3,22 +3,22 @@ * ------------------------------------------------------------------ * Last change: Time-stamp: <2001-04-21 23:54:18 jao> * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ @@ -29,32 +29,11 @@ #include #include "mixgtk_widgets.h" -/* the possible colorised elements */ -typedef enum { - MIXAL_LINE_BREAK, - MIXAL_LINE_LOC, - MIXAL_LINE_PLAIN -} mixal_line_t; - -typedef enum { - MIXAL_LINE_BG, - MIXAL_LINE_FG -} mixal_line_zone_t; - /* initialise the mixal widget */ extern gboolean mixgtk_mixal_init (mix_vm_t *vm, mixgtk_dialog_id_t top); -/* set the plain, location pointer and break colors */ -extern void -mixgtk_mixal_set_color (mixal_line_t line, mixal_line_zone_t zone, - const GdkColor *color); - -extern const GdkColor * -mixgtk_mixal_get_color (mixal_line_t line, mixal_line_zone_t zone); - - /* load the corresponding mixal file */ extern void mixgtk_mixal_load_file (void); diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c index d7f48c8..57fbb90 100644 --- a/mixgtk/mixgtk_mixvm.c +++ b/mixgtk/mixgtk_mixvm.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_mixvm.c : * Implementation of the functions declared in mixgtk_mixvm.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixvm.c,v 1.10 2002/04/10 23:39:40 jao Exp $ + * $Id: mixgtk_mixvm.c,v 1.11 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ #include @@ -28,7 +28,9 @@ #include "mixgtk_cmd_dispatcher.h" #include "mixgtk_input.h" -/* register widgets */ + +/* Local variables */ + #define REGISTER_NO_ (MIXGTK_WIDGET_rI6 - MIXGTK_WIDGET_rA + 1) static GtkEntry *reg_entries_[REGISTER_NO_]; @@ -38,7 +40,8 @@ static GtkWidget *goto_ = NULL; static GtkEntry *goto_entry_ = NULL; static GtkToggleButton *over_button_; static GtkToggleButton *cmp_buttons_[3]; -static GtkCList *memory_; +static GtkTreeView *memory_; +static GtkListStore *mem_store_; static GtkLabel *laptime_; static GtkLabel *progtime_; static GtkLabel *uptime_; @@ -46,76 +49,26 @@ static mix_vm_t *vm_; #define GOTO_ENTRY_NAME_ "goto_entry" -static void -init_goto_ (void) -{ - goto_ = mixgtk_widget_factory_get_dialog (MIXGTK_GOTO_DIALOG); - g_assert (goto_ != NULL); - goto_entry_ = GTK_ENTRY (mixgtk_widget_factory_get_child_by_name ( - MIXGTK_GOTO_DIALOG, GOTO_ENTRY_NAME_)); - g_assert (goto_entry_ != NULL); -} - -static void -update_register_ (mixgtk_widget_id_t reg) -{ - static gchar BUFFER[20]; - mix_word_t tipval = MIX_WORD_ZERO; - switch (reg) - { - case MIXGTK_WIDGET_rA: - tipval = mix_vm_get_rA (vm_); - mix_word_print_to_buffer (tipval, BUFFER); - break; - case MIXGTK_WIDGET_rX: - tipval = mix_vm_get_rX (vm_); - mix_word_print_to_buffer (tipval, BUFFER); - break; - case MIXGTK_WIDGET_rJ: - tipval = mix_short_to_word_fast (mix_vm_get_rJ (vm_)); - mix_short_print_to_buffer (mix_vm_get_rJ (vm_), BUFFER); - break; - case MIXGTK_WIDGET_rI1: - case MIXGTK_WIDGET_rI2: - case MIXGTK_WIDGET_rI3: - case MIXGTK_WIDGET_rI4: - case MIXGTK_WIDGET_rI5: - case MIXGTK_WIDGET_rI6: - { - gint k = reg - MIXGTK_WIDGET_rI1 + 1; - tipval = mix_short_to_word_fast (mix_vm_get_rI (vm_, k)); - mix_short_print_to_buffer (mix_vm_get_rI (vm_, k), BUFFER); - } - break; - default: - g_assert_not_reached (); - } - gtk_entry_set_text (reg_entries_[reg - MIXGTK_WIDGET_rA], BUFFER); - g_snprintf (BUFFER, 20, "%s%ld", mix_word_is_negative (tipval)? "-" : "", - mix_word_magnitude (tipval)); - gtk_tooltips_set_tip (tips_, - GTK_WIDGET (reg_entries_[reg - MIXGTK_WIDGET_rA]), - BUFFER, NULL); - -} - - -static void -on_mem_adj_change_ (GtkAdjustment *adj) -{ - mixgtk_mixvm_update_cells (); -} + +/* Static function prototypes */ +static void init_goto_ (void); +static void update_register_ (mixgtk_widget_id_t reg); +static gboolean init_mem_ (mixgtk_dialog_id_t top); + +enum { + MEM_ADDRESS_COL, + MEM_CONTENTS_COL, + MEM_COL_NO +}; + /* initialise the mixvm widgets */ gboolean mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top) { int k; - gchar *text[] = {"", ""}; - GtkWidget *scrol; - GtkAdjustment *adj; - + g_return_val_if_fail (vm != NULL, FALSE); vm_ = vm; @@ -152,31 +105,10 @@ mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top) g_return_val_if_fail (cmp_buttons_[k] != NULL, FALSE); } - memory_ = GTK_CLIST (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_CELLS)); - g_return_val_if_fail (memory_ != NULL, FALSE); - gtk_clist_set_column_justification (memory_, 0, GTK_JUSTIFY_CENTER); - gtk_clist_set_column_justification (memory_, 1, GTK_JUSTIFY_CENTER); - gtk_clist_freeze (memory_); - for (k = 0; k< MIX_VM_CELL_NO; ++k) - { - gchar buffer[20]; - g_snprintf (buffer, 20, "%04d", k); - text[0] = buffer; - gtk_clist_append (memory_, text); - } - gtk_clist_thaw (memory_); - - scrol = mixgtk_widget_factory_get (top, MIXGTK_WIDGET_CELLS_SCROLL); - g_return_val_if_fail (scrol != NULL, FALSE); - adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrol)); - gtk_signal_connect (GTK_OBJECT (adj), "value_changed", - GTK_SIGNAL_FUNC (on_mem_adj_change_), NULL); - goto_ = NULL; - - return TRUE; -} + return init_mem_ (top); +} /* update register widgets */ void @@ -201,9 +133,9 @@ void mixgtk_mixvm_update_cmp (void) { gint toggle; - + g_assert (cmp_buttons_); - + toggle = mix_vm_get_cmpflag (vm_); gtk_toggle_button_set_active (cmp_buttons_[toggle], TRUE); } @@ -214,33 +146,27 @@ void mixgtk_mixvm_update_cells (void) { static gchar BUFFER[20]; + GtkTreeIter iter; + gboolean valid = + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (mem_store_), &iter); gint k = 0; - - g_assert (memory_); - - gtk_clist_freeze (memory_); - - while (gtk_clist_row_is_visible (memory_, k) == GTK_VISIBILITY_NONE) ++k; - while (gtk_clist_row_is_visible (memory_, k) != GTK_VISIBILITY_NONE) + + while (valid) { - mix_word_print_to_buffer (mix_vm_get_addr_contents (vm_, k), BUFFER); - gtk_clist_set_text (memory_, k, 1, BUFFER); - ++k; + mix_word_print_to_buffer (mix_vm_get_addr_contents (vm_, k++), BUFFER); + gtk_list_store_set (mem_store_, &iter, MEM_CONTENTS_COL, BUFFER, -1); + valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (mem_store_), &iter); } - - gtk_clist_thaw (memory_); } void mixgtk_mixvm_update_cells_to_address (gint address) { - g_assert (memory_); + GtkTreePath *path = gtk_tree_path_new_from_indices (address, -1); + if (address >= MIX_VM_CELL_NO) return; - - gtk_clist_freeze (memory_); - gtk_clist_moveto (memory_, address, 0, 0, 0); - gtk_clist_thaw (memory_); - mixgtk_mixvm_update_cells (); + gtk_tree_view_scroll_to_cell (memory_, path, NULL, TRUE, 0, 0); + gtk_tree_path_free (path); } /* update the loc pointer */ @@ -250,9 +176,9 @@ mixgtk_mixvm_update_loc (void) enum {SIZE = 10 }; static gchar BUFFER[SIZE]; mix_short_t locval; - + g_assert (loc_entry_); - + locval = mix_vm_get_prog_count (vm_); g_snprintf (BUFFER, SIZE, "%04d", mix_short_magnitude (locval)); gtk_entry_set_text (loc_entry_, BUFFER); @@ -265,7 +191,7 @@ mixgtk_mixvm_update_times (void) enum {SIZE = 20 }; static gchar BUFFER[SIZE]; gint uptime, progtime, laptime; - + g_assert (uptime_ && progtime_ && laptime_); mixgtk_cmd_dispatcher_get_times (&uptime, &progtime, &laptime); g_snprintf (BUFFER, SIZE, "%d", uptime); @@ -289,7 +215,7 @@ mixgtk_mixvm_update_vm_widgets (void) mixgtk_mixvm_update_times (); } - + /* update cmp flag */ void on_cmp_e_toggled (GtkWidget *widget, gpointer data) @@ -318,15 +244,13 @@ on_overflow_toggled (GtkWidget *widget, gpointer data) mix_vm_set_overflow (vm_, GTK_TOGGLE_BUTTON (widget)->active); } - void -on_loc_arrow_clicked (GtkWidget *widget, gpointer data) +on_loc_arrow_clicked (GtkWidget *widget, gpointer data) { gint address = mix_short_magnitude (mix_vm_get_prog_count (vm_)); mixgtk_mixvm_update_cells_to_address (address); } - static void register_AX_ (mix_word_t w, gpointer reg) { @@ -359,7 +283,7 @@ on_register_click (GtkWidget *w, GdkEvent *e, gpointer data) enum {SIZE = 20}; static gchar BUFFER[SIZE]; gint k; - + if (w == GTK_WIDGET (reg_entries_[0])) mixgtk_input_word (_("Register A"), mix_vm_get_rA (vm_), register_AX_, GINT_TO_POINTER (0)); @@ -379,7 +303,7 @@ on_register_click (GtkWidget *w, GdkEvent *e, gpointer data) break; } } - return FALSE; + return TRUE; } static void @@ -391,39 +315,176 @@ mem_cell_ (mix_word_t w, gpointer a) } void -on_memory_cells_select_row (GtkCList *w, gint row, gint col, - GdkEvent *e, gpointer data) +on_goto_cancel_clicked (GtkWidget *w, gpointer data) { - enum {SIZE = 30}; - static gchar BUFFER[SIZE]; - g_snprintf (BUFFER, SIZE, _("Memory cell no. %d"), row); - mixgtk_input_word (BUFFER, - mix_vm_get_addr_contents (vm_, mix_short_new (row)), - mem_cell_, GINT_TO_POINTER (row)); + gtk_widget_hide (goto_); } void -on_memory_cells_click_column (GtkCList *w, gint row, gpointer data) +on_goto_ok_clicked (GtkWidget *w, gpointer data) +{ + const gchar *txt = gtk_entry_get_text (goto_entry_); + mix_short_t addr = mix_short_new (atoi (txt)); + if (addr < MIX_VM_CELL_NO) + { + gtk_widget_hide (goto_); + mixgtk_mixvm_update_cells_to_address (addr); + } +} + + + +/* static functions */ +static void +init_goto_ (void) +{ + goto_ = mixgtk_widget_factory_get_dialog (MIXGTK_GOTO_DIALOG); + g_assert (goto_ != NULL); + goto_entry_ = + GTK_ENTRY (mixgtk_widget_factory_get_child_by_name (MIXGTK_GOTO_DIALOG, + GOTO_ENTRY_NAME_)); + g_assert (goto_entry_ != NULL); +} + +static void +update_register_ (mixgtk_widget_id_t reg) +{ + static gchar BUFFER[20]; + mix_word_t tipval = MIX_WORD_ZERO; + switch (reg) + { + case MIXGTK_WIDGET_rA: + tipval = mix_vm_get_rA (vm_); + mix_word_print_to_buffer (tipval, BUFFER); + break; + case MIXGTK_WIDGET_rX: + tipval = mix_vm_get_rX (vm_); + mix_word_print_to_buffer (tipval, BUFFER); + break; + case MIXGTK_WIDGET_rJ: + tipval = mix_short_to_word_fast (mix_vm_get_rJ (vm_)); + mix_short_print_to_buffer (mix_vm_get_rJ (vm_), BUFFER); + break; + case MIXGTK_WIDGET_rI1: + case MIXGTK_WIDGET_rI2: + case MIXGTK_WIDGET_rI3: + case MIXGTK_WIDGET_rI4: + case MIXGTK_WIDGET_rI5: + case MIXGTK_WIDGET_rI6: + { + gint k = reg - MIXGTK_WIDGET_rI1 + 1; + tipval = mix_short_to_word_fast (mix_vm_get_rI (vm_, k)); + mix_short_print_to_buffer (mix_vm_get_rI (vm_, k), BUFFER); + } + break; + default: + g_assert_not_reached (); + } + gtk_entry_set_text (reg_entries_[reg - MIXGTK_WIDGET_rA], BUFFER); + g_snprintf (BUFFER, 20, "%s%ld", mix_word_is_negative (tipval)? "-" : "", + mix_word_magnitude (tipval)); + gtk_tooltips_set_tip (tips_, + GTK_WIDGET (reg_entries_[reg - MIXGTK_WIDGET_rA]), + BUFFER, NULL); + +} + + +static void +cells_clicked_ (GtkTreeViewColumn* col, gpointer data) { if (!goto_) init_goto_ (); gtk_widget_show (goto_); } -void -on_goto_cancel_clicked (GtkWidget *w, gpointer data) +static gboolean +cont_clicked_ (GtkWidget *w, GdkEvent *event, gpointer data) { - gtk_widget_hide (goto_); + enum {SIZE = 30}; + static gchar BUFFER[SIZE]; + + if (event->type == GDK_BUTTON_PRESS) + { + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (memory_)); + + if (gtk_tree_selection_get_selected (selection, &model, &iter)) + { + gint addr; + + gtk_tree_model_get (model, &iter, MEM_ADDRESS_COL, &addr, -1); + g_snprintf (BUFFER, SIZE, _("Memory cell no. %d"), addr); + mixgtk_input_word + (BUFFER, + mix_vm_get_addr_contents (vm_, mix_short_new (addr)), + mem_cell_, GINT_TO_POINTER (addr)); + } + } + + return FALSE; } -void -on_goto_ok_clicked (GtkWidget *w, gpointer data) + +static gboolean +init_mem_ (mixgtk_dialog_id_t top) { - gchar *txt = gtk_entry_get_text (goto_entry_); - mix_short_t addr = mix_short_new (atoi (txt)); - if (addr < MIX_VM_CELL_NO) + gint k; + GtkTreeIter iter; + GtkCellRenderer *renderer; + GtkTreeViewColumn *col; + + /* model */ + + mem_store_ = gtk_list_store_new (MEM_COL_NO, G_TYPE_INT, G_TYPE_STRING); + + g_assert (mem_store_); + + for (k = 0; k< MIX_VM_CELL_NO; ++k) { - gtk_widget_hide (goto_); - mixgtk_mixvm_update_cells_to_address (addr); + gtk_list_store_append (mem_store_, &iter); + gtk_list_store_set (mem_store_, &iter, + MEM_ADDRESS_COL, k, + MEM_CONTENTS_COL, "+ 00 00 00 00 00", + -1); } + + + /* view */ + + renderer = gtk_cell_renderer_text_new (); + memory_ = GTK_TREE_VIEW (mixgtk_widget_factory_get (top, + MIXGTK_WIDGET_CELLS)); + + g_assert (memory_); + g_assert (renderer); + + gtk_tree_view_set_model (memory_, GTK_TREE_MODEL (mem_store_)); + gtk_tree_view_set_headers_clickable (memory_, TRUE); + g_object_unref (G_OBJECT (mem_store_)); + + col = gtk_tree_view_column_new_with_attributes ("Address", renderer, + "text", 0, NULL); + gtk_tree_view_column_set_clickable (col, TRUE); + g_signal_connect (G_OBJECT (col), "clicked", + G_CALLBACK (cells_clicked_), NULL); + + gtk_tree_view_append_column (memory_, col); + + + col = gtk_tree_view_column_new_with_attributes ("Contents", renderer, + "text", 1, NULL); + gtk_tree_view_column_set_clickable (col, TRUE); + g_signal_connect (G_OBJECT (col), "clicked", + G_CALLBACK (cont_clicked_), NULL); + + gtk_tree_view_append_column (memory_, col); + + g_signal_connect (G_OBJECT (memory_), "event-after", + G_CALLBACK (cont_clicked_), NULL); + + return TRUE; } diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c index 9ff76a6..8a5e91f 100644 --- a/mixgtk/mixgtk_widgets.c +++ b/mixgtk/mixgtk_widgets.c @@ -100,7 +100,7 @@ static const gchar *file_ = NULL; static void init_xml_ (mixgtk_dialog_id_t dlg) { - xml_[dlg] = glade_xml_new (file_, dnames_[dlg]); + xml_[dlg] = glade_xml_new (file_, dnames_[dlg], NULL); glade_xml_signal_autoconnect (xml_[dlg]); g_assert (xml_[dlg] != NULL); } -- cgit v1.2.3