summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-09-01 23:48:25 +0000
committerIan C <ianc@noddybox.co.uk>2006-09-01 23:48:25 +0000
commit37141ac197eaefeae9dada0bcc1c429ff584df44 (patch)
tree6bd93dbf3735d22e9dadb9d41ae1c68b980d0c0e /interface.c
parent025fbd0c161c8f528e20f034d84ad986a4ebef36 (diff)
GEMMA largely working. Fixed broken expressions with white space.
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c53
1 files changed, 44 insertions, 9 deletions
diff --git a/interface.c b/interface.c
index 6ecaa11..ad0defe 100644
--- a/interface.c
+++ b/interface.c
@@ -36,10 +36,15 @@ create_top_window (void)
GtkWidget *register_view;
GtkWidget *hbox1;
GtkWidget *vbox5;
+ GtkWidget *hbox3;
GtkWidget *memory_view_choice;
+ GtkWidget *viewmode_check;
GtkWidget *memory_view;
GtkWidget *scrolledwindow1;
GtkWidget *log_view;
+ GtkWidget *hbox4;
+ GtkWidget *label1;
+ GtkWidget *breakpoint_text;
GtkWidget *hbuttonbox1;
GtkWidget *run_button;
GtkWidget *step_button;
@@ -61,23 +66,23 @@ create_top_window (void)
gtk_widget_show (vbox4);
gtk_container_add (GTK_CONTAINER (top_window), vbox4);
- hbox2 = gtk_hbox_new (TRUE, 0);
+ hbox2 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (vbox4), hbox2, TRUE, TRUE, 0);
assem_view = gtk_label_new (_("<b>Assembler View</b>"));
gtk_widget_show (assem_view);
gtk_box_pack_start (GTK_BOX (hbox2), assem_view, FALSE, FALSE, 0);
- gtk_widget_set_size_request (assem_view, 451, 80);
+ gtk_widget_set_size_request (assem_view, 550, 80);
gtk_label_set_use_markup (GTK_LABEL (assem_view), TRUE);
gtk_misc_set_alignment (GTK_MISC (assem_view), 0.03, 0);
- register_view = gtk_label_new (_("<b>Regsiter View</b>"));
+ register_view = gtk_label_new (_("<b>Register View</b>"));
gtk_widget_show (register_view);
gtk_box_pack_start (GTK_BOX (hbox2), register_view, FALSE, FALSE, 0);
- gtk_widget_set_size_request (register_view, 450, 80);
+ gtk_widget_set_size_request (register_view, 350, 80);
gtk_label_set_use_markup (GTK_LABEL (register_view), TRUE);
- gtk_misc_set_alignment (GTK_MISC (register_view), 0.03, 0);
+ gtk_misc_set_alignment (GTK_MISC (register_view), 0, 0);
hbox1 = gtk_hbox_new (TRUE, 0);
gtk_widget_show (hbox1);
@@ -88,19 +93,29 @@ create_top_window (void)
gtk_widget_show (vbox5);
gtk_box_pack_start (GTK_BOX (hbox1), vbox5, FALSE, TRUE, 0);
+ hbox3 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_show (hbox3);
+ gtk_box_pack_start (GTK_BOX (vbox5), hbox3, FALSE, TRUE, 0);
+
memory_view_choice = gtk_combo_box_new_text ();
gtk_widget_show (memory_view_choice);
- gtk_box_pack_start (GTK_BOX (vbox5), memory_view_choice, FALSE, FALSE, 0);
- gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("SP"));
+ gtk_box_pack_start (GTK_BOX (hbox3), memory_view_choice, TRUE, TRUE, 0);
gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("HL"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("SP"));
gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("IX"));
gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("IY"));
gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("BC"));
gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("DE"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (memory_view_choice), _("PC"));
+
+ viewmode_check = gtk_check_button_new_with_mnemonic (_("View as Words"));
+ gtk_widget_show (viewmode_check);
+ gtk_box_pack_start (GTK_BOX (hbox3), viewmode_check, FALSE, FALSE, 0);
memory_view = gtk_label_new (_("<b>Memory View</b>"));
gtk_widget_show (memory_view);
- gtk_box_pack_start (GTK_BOX (vbox5), memory_view, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox5), memory_view, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (memory_view, -1, 200);
gtk_label_set_use_markup (GTK_LABEL (memory_view), TRUE);
gtk_misc_set_alignment (GTK_MISC (memory_view), 0.03, 0);
@@ -116,6 +131,18 @@ create_top_window (void)
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (log_view), GTK_WRAP_CHAR);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (log_view), FALSE);
+ hbox4 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_show (hbox4);
+ gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, TRUE, 0);
+
+ label1 = gtk_label_new (_("Run Until Expression: "));
+ gtk_widget_show (label1);
+ gtk_box_pack_start (GTK_BOX (hbox4), label1, FALSE, FALSE, 0);
+
+ breakpoint_text = gtk_entry_new ();
+ gtk_widget_show (breakpoint_text);
+ gtk_box_pack_start (GTK_BOX (hbox4), breakpoint_text, TRUE, TRUE, 0);
+
hbuttonbox1 = gtk_hbutton_box_new ();
gtk_widget_show (hbuttonbox1);
gtk_box_pack_start (GTK_BOX (vbox4), hbuttonbox1, FALSE, TRUE, 0);
@@ -153,7 +180,7 @@ create_top_window (void)
gtk_container_add (GTK_CONTAINER (hbuttonbox1), load_labels_button);
GTK_WIDGET_SET_FLAGS (load_labels_button, GTK_CAN_DEFAULT);
- run_until_button = gtk_button_new_with_mnemonic (_("Run Until"));
+ run_until_button = gtk_button_new_with_mnemonic (_("Run Until..."));
gtk_widget_show (run_until_button);
gtk_container_add (GTK_CONTAINER (hbuttonbox1), run_until_button);
GTK_WIDGET_SET_FLAGS (run_until_button, GTK_CAN_DEFAULT);
@@ -169,6 +196,9 @@ create_top_window (void)
g_signal_connect ((gpointer) memory_view_choice, "changed",
G_CALLBACK (OnMemoryViewChoice),
NULL);
+ g_signal_connect ((gpointer) viewmode_check, "toggled",
+ G_CALLBACK (OnViewMode),
+ NULL);
g_signal_connect ((gpointer) run_button, "clicked",
G_CALLBACK (OnRun),
NULL);
@@ -202,10 +232,15 @@ create_top_window (void)
GLADE_HOOKUP_OBJECT (top_window, register_view, "register_view");
GLADE_HOOKUP_OBJECT (top_window, hbox1, "hbox1");
GLADE_HOOKUP_OBJECT (top_window, vbox5, "vbox5");
+ GLADE_HOOKUP_OBJECT (top_window, hbox3, "hbox3");
GLADE_HOOKUP_OBJECT (top_window, memory_view_choice, "memory_view_choice");
+ GLADE_HOOKUP_OBJECT (top_window, viewmode_check, "viewmode_check");
GLADE_HOOKUP_OBJECT (top_window, memory_view, "memory_view");
GLADE_HOOKUP_OBJECT (top_window, scrolledwindow1, "scrolledwindow1");
GLADE_HOOKUP_OBJECT (top_window, log_view, "log_view");
+ GLADE_HOOKUP_OBJECT (top_window, hbox4, "hbox4");
+ GLADE_HOOKUP_OBJECT (top_window, label1, "label1");
+ GLADE_HOOKUP_OBJECT (top_window, breakpoint_text, "breakpoint_text");
GLADE_HOOKUP_OBJECT (top_window, hbuttonbox1, "hbuttonbox1");
GLADE_HOOKUP_OBJECT (top_window, run_button, "run_button");
GLADE_HOOKUP_OBJECT (top_window, step_button, "step_button");