|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // LUNA LCD パネル
9: //
10:
11: #pragma once
12:
13: #include "wxheader.h"
1.1.1.3 ! root 14: #include "wxbmp.h"
1.1 root 15: #include "wxsubwindow.h"
16:
17: // LCD パネル
18: class WXLCDPanel : public wxPanel
19: {
20: using inherited = wxPanel;
21: public:
22: WXLCDPanel(wxWindow *parent);
1.1.1.2 root 23: virtual ~WXLCDPanel() override;
1.1 root 24:
25: private:
26: void OnTimer(wxTimerEvent& event);
27: void OnPaint(wxPaintEvent& event);
28: void Draw(wxDC&);
29: void DrawChar(wxDC&, int x, int y, uint8 ch);
30:
31: const uint8 *ddram {};
32:
1.1.1.3 ! root 33: WXBitmap bitmap {};
1.1 root 34:
35: // 描画管理用
36: uint32 count {};
37: wxTimer timer {};
38:
39: wxDECLARE_EVENT_TABLE();
40: };
41:
42: // LCD ウィンドウ
43: class WXLCDWindow : public WXSubWindow
44: {
45: using inherited = WXSubWindow;
46: public:
47: WXLCDWindow(wxWindow *parent, wxWindowID id);
1.1.1.2 root 48: virtual ~WXLCDWindow() override;
1.1 root 49:
50: private:
51: WXLCDPanel *panel {};
52: };
53:
54: // LCD キャラクタパネル
1.1.1.3 ! root 55: class WXLCDCharPanel : public WXPaddingPanel
1.1 root 56: {
1.1.1.3 ! root 57: using inherited = WXPaddingPanel;
1.1 root 58: public:
59: WXLCDCharPanel(wxWindow *parent);
1.1.1.2 root 60: virtual ~WXLCDCharPanel() override;
1.1 root 61:
62: private:
63: void OnPaint(wxPaintEvent& event);
64: void Draw(wxDC&);
65:
1.1.1.3 ! root 66: WXBitmap bitmap {};
1.1 root 67:
68: wxDECLARE_EVENT_TABLE();
69: };
70:
71: // LCD キャラクタウィンドウ
72: class WXLCDMonitor : public WXSubWindow
73: {
74: using inherited = WXSubWindow;
75: public:
76: WXLCDMonitor(wxWindow *parent, wxWindowID id);
1.1.1.2 root 77: virtual ~WXLCDMonitor() override;
1.1 root 78:
79: private:
80: WXTextScreen *monpanel {};
81: WXLCDCharPanel *chrpanel {};
82: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.