|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2022 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // パレットモニターウィンドウ
9: //
10:
11: #pragma once
12:
13: #include "wxtextpanel.h"
14: #include "wxsubwindow.h"
15:
16: class BT45xDevice;
17: class VideoCtlrDevice;
18:
19: // パレットパネル
20: class WXPalettePanel : public WXTextPanel
21: {
22: using inherited = WXTextPanel;
23: public:
1.1.1.2 root 24: explicit WXPalettePanel(wxWindow *parent);
1.1 root 25: ~WXPalettePanel() override;
26:
27: void FontChanged() override;
28: void Draw() override;
29:
30: private:
31: void PaletteChanged();
32: void OnMouse(wxMouseEvent& event);
33: void OnPaletteChanged(wxCommandEvent& event);
34:
35: // ホストパレット
1.1.1.2 root 36: std::vector<Color> pal {};
1.1 root 37:
1.1.1.3 root 38: // ゲストパレット。
39: std::vector<uint16> vcpal {}; // X68030 のパレットレジスタ
40: std::vector<uint8> btpal {}; // Bt454/458 のパレット
1.1 root 41:
42: // パレット欄の行数
43: int rows {};
44:
45: // パレット領域の開始オフセット [px]
46: int pal0x {};
1.1.1.3 root 47: int pal1x {}; // X68030 の右列
1.1 root 48: int pal0y {};
49:
1.1.1.3 root 50: // パレット番号に必要な16進桁数。
51: uint idxlen {};
52:
1.1 root 53: // 現在指しているパレット
54: int cursor {};
55:
56: BT45xDevice *bt45x {};
57: VideoCtlrDevice *videoctlr {};
58:
59: wxDECLARE_EVENT_TABLE();
60: };
61:
62: // パレットウィンドウ
63: class WXPaletteWindow : public WXSubWindow
64: {
65: using inherited = WXSubWindow;
66: public:
67: WXPaletteWindow(wxWindow *parent, const wxString& name);
68: ~WXPaletteWindow() override;
69: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.