--- nono/util/viewcgrom/viewcgrom.cpp 2026/04/29 17:04:28 1.1 +++ nono/util/viewcgrom/viewcgrom.cpp 2026/04/29 17:04:52 1.1.1.2 @@ -11,8 +11,8 @@ #include #include -#define TITLE "X680x0 CGROMビューア" -#define COPYRIGHT "Copyright (C) 2012-2019 isaki@NetBSD.org" +#define TITLE wxT("X680x0 CGROMビューア") +#define COPYRIGHT wxT("Copyright (C) 2012-2019 isaki@NetBSD.org") /* CGROM.DAT の大きさ(バイト単位) */ #define CGROM_SIZE (768 * 1024) @@ -38,7 +38,7 @@ class MyFrame; struct ctxmenu_t { int id; int addr; - const char *label; + wxString label; int size; }; @@ -198,13 +198,13 @@ END_EVENT_TABLE() // ショートカット用データ struct ctxmenu_t MyFrame::ctxmenu[] = { - { ID_FONT_16x16, 0x00000, "16x16フォント", SIZE_16x16, }, - { ID_FONT_8x8, 0x3a000, "8x8フォント", SIZE_8x8, }, - { ID_FONT_8x16, 0x3a800, "8x16フォント", SIZE_8x16, }, - { ID_FONT_12x12, 0x3b800, "12x12フォント", SIZE_12x12, }, - { ID_FONT_12x24, 0x3d000, "12x24フォント", SIZE_12x24, }, - { ID_FONT_24x24, 0x40000, "24x24フォント", SIZE_24x24, }, - { ID_FONT_6x12, 0xbf400, "6x12フォント", SIZE_6x12, }, + { ID_FONT_16x16, 0x00000, wxT("16x16フォント"), SIZE_16x16, }, + { ID_FONT_8x8, 0x3a000, wxT("8x8フォント"), SIZE_8x8, }, + { ID_FONT_8x16, 0x3a800, wxT("8x16フォント"), SIZE_8x16, }, + { ID_FONT_12x12, 0x3b800, wxT("12x12フォント"), SIZE_12x12, }, + { ID_FONT_12x24, 0x3d000, wxT("12x24フォント"), SIZE_12x24, }, + { ID_FONT_24x24, 0x40000, wxT("24x24フォント"), SIZE_24x24, }, + { ID_FONT_6x12, 0xbf400, wxT("6x12フォント"), SIZE_6x12, }, }; // コンストラクタ @@ -255,24 +255,24 @@ MyFrame::MyFrame() ctrlbox->Add(new wxStaticText(panel, wxID_ANY, wxT("開始アドレス"))); /* 開始アドレス(コントロール) */ - addrctrl = new wxTextCtrl(panel, ID_ADDRBOX, "", + addrctrl = new wxTextCtrl(panel, ID_ADDRBOX, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER); ctrlbox->Add(addrctrl); ctrlbox->AddSpacer(5); /* フォントサイズ */ - ctrlbox->Add(new wxStaticText(panel, wxID_ANY, "フォントサイズ")); + ctrlbox->Add(new wxStaticText(panel, wxID_ANY, wxT("フォントサイズ"))); /* フォントサイズ(コントロール) */ wxString sizelist[] = { - "8x8", - "8x16", - "12x12", - "12x24", - "16x16", - "24x24", - "6x12", + wxT("8x8"), + wxT("8x16"), + wxT("12x12"), + wxT("12x24"), + wxT("16x16"), + wxT("24x24"), + wxT("6x12"), }; sizectrl = new wxChoice(panel, ID_SIZEBOX, wxDefaultPosition, wxDefaultSize, @@ -288,7 +288,7 @@ MyFrame::MyFrame() ctxmenu_t *c = &ctxmenu[i]; wxString label; - label.Printf("%05X: ", c->addr); + label.Printf(wxT("%05X: "), c->addr); label += c->label; wxButton *btn = new wxButton(panel, c->id, label, wxDefaultPosition, wxDefaultSize, wxBU_LEFT); @@ -297,14 +297,14 @@ MyFrame::MyFrame() ctrlbox->AddSpacer(5); ctrlbox->Add(new wxStaticText(panel, wxID_ANY, - "(6x12 フォントは\nX68030 のみ)")); + wxT("(6x12 フォントは\nX68030 のみ)"))); panel->SetSizer(hbox); hbox->SetSizeHints(this); /* コンテキストメニュー */ menu = new wxMenu(); - menu->Append(ID_RELOAD, "リロード"); + menu->Append(ID_RELOAD, wxT("リロード")); /* 固定地 */ num.x = 16; @@ -347,9 +347,9 @@ MyFrame::OnOpen(wxCommandEvent& event) void MyFrame::DoOpenDialog() { - wxFileDialog dialog(this, "Select a file", + wxFileDialog dialog(this, wxT("Select a file"), ::wxGetCwd(), wxEmptyString, - "DAT files (*.DAT)|*.DAT;*.dat|すべてのファイル (*.*)|*.*"); + wxT("DAT files (*.DAT)|*.DAT;*.dat|すべてのファイル (*.*)|*.*")); if (dialog.ShowModal() != wxID_OK) { return; @@ -381,7 +381,7 @@ MyFrame::DoOpen() /* オープンできたのでタイトルを変更 */ wxString title; title = TITLE; - title += " - "; + title += wxT(" - "); title += filename; SetTitle(title); @@ -401,8 +401,8 @@ MyFrame::OnAbout(wxCommandEvent& event) { wxAboutDialogInfo ab; - ab.SetName("viewcgrom"); - ab.SetVersion("1.1"); + ab.SetName(wxT("viewcgrom")); + ab.SetVersion(wxT("1.1")); ab.SetDescription(TITLE); ab.SetCopyright(COPYRIGHT); @@ -606,7 +606,7 @@ MyFrame::DoUpdateAddr() /* アドレス欄に反映 */ wxString str; - str.Printf("%05X", addr); + str.Printf(wxT("%05X"), addr); addrctrl->SetValue(str); /* スクロールバーに反映 */