mainwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(mainwin), PACKAGE);
- gtk_window_set_default_size(GTK_WINDOW(mainwin),
- MAIN_WIN_WIDTH, MAIN_WIN_HEIGHT);
gtk_container_set_border_width(GTK_CONTAINER(mainwin), 0);
/* Window DESTROY event. */
g_signal_connect(mainwin, "destroy",
G_CALLBACK(WindowDestroyEvent), NULL);
- /*
- * Setting main window geometry based on command line options
- * (if specified).
- */
- /*MainWindowSetGeometry();*/
-
/*
* main_vbox contains the menu bar and body_vbox (for all remaining
* items).
hbox = gtk_hbox_new(FALSE, 1);
/* 8051 registers frame. */
- fixed_frame = regwin_init(REG_WIN_WIDTH, REG_WIN_HEIGHT);
+ fixed_frame = regwin_init();
gtk_box_pack_start(GTK_BOX(hbox), fixed_frame, true, true, 1);
/* Program disassembly frame. */
- fixed_frame = pgmwin_init(PGM_WIN_WIDTH, PGM_WIN_HEIGHT);
+ fixed_frame = pgmwin_init();
gtk_box_pack_start(GTK_BOX(hbox), fixed_frame, true, true, 1);
/* Adding hbox window to main_vbox */
gtk_box_pack_start(GTK_BOX(main_vbox), hbox, true, true, 1);
/* Memory dump frame. */
- fixed_frame = memwin_init(MEM_WIN_WIDTH, MEM_WIN_HEIGHT);
+ fixed_frame = memwin_init();
/* Adding memory dump window to main_vbox */
gtk_box_pack_start(GTK_BOX(main_vbox), fixed_frame, true, true, 1);
#ifndef _GTKSIZES_H_
#define _GTKSIZES_H_
-/* Width, in pixels, of a fixed font symbol. */
-#define FIXED_FONT_SYMBOL_WIDTH 10
-
-/* Height, in pixels, of a fixed font symbol. */
-#define FIXED_FONT_SYMBOL_HEIGHT 22
-
-#define BUTTON_HEIGHT 60
-#define BUTTONS_BAR_HEIGHT BUTTON_HEIGHT
-
-/* 12 symbols + border. */
-#define REG_WIN_WIDTH (FIXED_FONT_SYMBOL_WIDTH * 13)
-#define REG_WIN_HEIGHT (FIXED_FONT_SYMBOL_HEIGHT * 24)
-
-#define MEM_WIN_WIDTH (FIXED_FONT_SYMBOL_WIDTH * 68) /* 68 symbols. */
-#define MEM_WIN_HEIGHT (FIXED_FONT_SYMBOL_HEIGHT * 17)
-
-#define PGM_WIN_WIDTH (MEM_WIN_WIDTH - REG_WIN_WIDTH)
-#define PGM_WIN_HEIGHT REG_WIN_HEIGHT
-
-#define MENU_BAR_HEIGHT 0
-
-#define MAIN_WIN_WIDTH MEM_WIN_WIDTH
-#define MAIN_WIN_HEIGHT (BUTTONS_BAR_HEIGHT + REG_WIN_HEIGHT + MEM_WIN_HEIGHT)
-
#endif /* _GTKSIZES_H_ */
static GtkWidget *memclist;
GtkWidget *
-memwin_init(int width, int height)
+memwin_init(void)
{
int i;
GtkWidget *scrollwin;
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_widget_set_size_request(GTK_WIDGET(scrollwin), width, height);
-
memclist = gtk_clist_new(18);
gtk_clist_set_selection_mode(GTK_CLIST(memclist), GTK_SELECTION_SINGLE);
- gtk_widget_set_size_request(GTK_WIDGET(memclist), 620, 250);
for (i = 0; i < 18; i++) {
gtk_clist_set_column_justification(
GTK_CLIST(memclist), i, GTK_JUSTIFY_LEFT);
}
- gtk_clist_set_column_width(GTK_CLIST(memclist), 0,
- 5 * FIXED_FONT_SYMBOL_WIDTH);
-
- for (i = 1; i < 17; i++)
- gtk_clist_set_column_width(GTK_CLIST(memclist), i,
- 2 * FIXED_FONT_SYMBOL_WIDTH);
-
- gtk_clist_set_column_width(GTK_CLIST(memclist), 17,
- 16 * FIXED_FONT_SYMBOL_WIDTH);
-
pango_font = pango_font_description_from_string(FIXED_FONT);
gtk_widget_modify_font(memclist, pango_font);
#include <gtk/gtk.h>
GtkWidget *
-memwin_init(int width, int height);
+memwin_init(void);
void
memwin_DumpD(char *Address);
GtkWidget *
-pgmwin_init(int width, int height)
+pgmwin_init(void)
{
int i;
GtkWidget *scrollwin;
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_widget_set_size_request(GTK_WIDGET(scrollwin), width, height);
-
pgmclist = gtk_clist_new(1);
gtk_clist_set_selection_mode(GTK_CLIST(pgmclist), GTK_SELECTION_SINGLE);
- gtk_widget_set_size_request(GTK_WIDGET(pgmclist), width, height);
gtk_clist_set_column_justification(GTK_CLIST(pgmclist), 0,
GTK_JUSTIFY_LEFT);
- gtk_clist_set_column_width(GTK_CLIST(pgmclist), 0, width-10);
PangoFontDescription *pango_font;
pango_font = pango_font_description_from_string(FIXED_FONT);
#include "gtksizes.h"
GtkWidget *
-pgmwin_init(int width, int height);
+pgmwin_init(void);
void
pgmwin_Disasm(void);
static GtkWidget *regclist;
GtkWidget *
-regwin_init(int width, int height)
+regwin_init(void)
{
int i;
GtkWidget *scrollwin;
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_widget_set_size_request(GTK_WIDGET(scrollwin), width, height);
-
regclist = gtk_clist_new(1);
gtk_clist_set_selection_mode(GTK_CLIST(regclist), GTK_SELECTION_SINGLE);
- gtk_widget_set_size_request(GTK_WIDGET(regclist), width, height);
gtk_clist_set_column_justification(GTK_CLIST(regclist), 0,
GTK_JUSTIFY_LEFT);
- gtk_clist_set_column_width(GTK_CLIST(regclist), 0, width);
-
pango_font = pango_font_description_from_string(FIXED_FONT);
gtk_widget_modify_font(regclist, pango_font);
#include "gtksizes.h"
GtkWidget *
-regwin_init(int width, int height);
+regwin_init(void);
void
regwin_Show(void);