|
|
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:
25: WXPalettePanel(wxWindow *parent);
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: // ホストパレット
37: std::vector<ColorXBGR> pal {};
38:
39: // ゲストパレットを uint32 形式にしたもの。
40: // Bt454 なら $0000'0RGB、
41: // Bt458 なら $00RR'GGBB、
42: // X68030 なら $0000'WWWW (テキストパレット生データ)
43: std::vector<uint32> ipal {};
44:
45: // パレット欄の行数
46: int rows {};
47:
48: // パレット領域の開始オフセット [px]
49: int pal0x {};
50: int pal0y {};
51:
52: // 現在指しているパレット
53: int cursor {};
54:
55: BT45xDevice *bt45x {};
56: VideoCtlrDevice *videoctlr {};
57:
58: wxDECLARE_EVENT_TABLE();
59: };
60:
61: // パレットウィンドウ
62: class WXPaletteWindow : public WXSubWindow
63: {
64: using inherited = WXSubWindow;
65: public:
66: WXPaletteWindow(wxWindow *parent, const wxString& name);
67: ~WXPaletteWindow() override;
68: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.