Canola
0.8.D001
|
00001 // 00002 // canola - canon canola 1614p emulator 00003 // Copyright (C) 2011, 2012 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License, version 3, as 00007 // published by the Free Software Foundation. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License along 00015 // with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #ifndef CANOLA_DEBUGGER_GNOME_H 00019 #define CANOLA_DEBUGGER_GNOME_H 00020 00021 #include <lib/config.h> 00022 #include <gtkmm.h> 00023 00024 #include <lib/debugger.h> 00025 00030 class debugger_gnome: 00031 public debugger, 00032 public Gtk::HBox 00033 { 00034 public: 00038 virtual ~debugger_gnome(); 00039 00043 debugger_gnome(); 00044 00045 typedef sigc::signal1<void, int, sigc::nil> address_value_changed_signal_t; 00046 00052 address_value_changed_signal_t &address_value_changed_signal(void); 00053 00054 private: 00055 // See base class for documentation. 00056 void display_x_register(const number &value); 00057 00058 // See base class for documentation. 00059 void display_y_register(const number &value); 00060 00061 // See base class for documentation. 00062 void display_memory(int n, const number &value); 00063 00064 // See base class for documentation. 00065 void display_address(int addr); 00066 00067 // See base class for documentation. 00068 void display_opcode(opcode_t op); 00069 00070 // See base class for documentation. 00071 void display_location(const location::pointer &where); 00072 00073 // See base class for documentation. 00074 void display_mstate(const char *text); 00075 00076 private: 00077 00078 Gtk::Table left_panel; 00079 00080 Gtk::Label x_reg_name; 00081 00082 Gtk::TextView x_reg_value; 00083 00084 Gtk::Label y_reg_name; 00085 00086 Gtk::TextView y_reg_value; 00087 00088 Gtk::Label memory_name[14]; 00089 00090 Gtk::TextView memory_value[14]; 00091 00092 Gtk::Label address_name; 00093 00099 Gtk::SpinButton address_value; 00100 00108 bool address_value_changed_signal_enable; 00109 00115 void on_address_value_changed(void); 00116 00122 address_value_changed_signal_t address_value_changed_signal_instance; 00123 00124 Gtk::Label opcode_name; 00125 00126 Gtk::TextView opcode_value; 00127 00128 Gtk::Label mstate_name; 00129 00130 Gtk::TextView mstate_value; 00131 00132 Gtk::Frame source_code_frame; 00133 00134 Gtk::ScrolledWindow source_code_scroller; 00135 00136 Gtk::TextView source_code; 00137 00142 std::string filename; 00143 00151 debugger_gnome(const debugger_gnome &rhs); 00152 00160 debugger_gnome &operator=(const debugger_gnome &rhs); 00161 }; 00162 00163 #endif // CANOLA_DEBUGGER_GNOME_H