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