|
|
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:
1.1.1.4 root 13: #include "wxnono.h"
14: #include "wxbitmapbuf.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:
1.1.1.5 ! root 26: void OnLCDChanged(wxCommandEvent& event);
1.1 root 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.4 root 33: WXBitmapBuf bitmap {};
1.1 root 34:
35: wxDECLARE_EVENT_TABLE();
36: };
37:
38: // LCD ウィンドウ
39: class WXLCDWindow : public WXSubWindow
40: {
41: using inherited = WXSubWindow;
42: public:
1.1.1.4 root 43: WXLCDWindow(wxWindow *parent);
1.1.1.2 root 44: virtual ~WXLCDWindow() override;
1.1 root 45:
46: private:
47: WXLCDPanel *panel {};
48: };
49:
50: // LCD キャラクタパネル
1.1.1.3 root 51: class WXLCDCharPanel : public WXPaddingPanel
1.1 root 52: {
1.1.1.3 root 53: using inherited = WXPaddingPanel;
1.1 root 54: public:
55: WXLCDCharPanel(wxWindow *parent);
1.1.1.2 root 56: virtual ~WXLCDCharPanel() override;
1.1 root 57:
58: private:
59: void OnPaint(wxPaintEvent& event);
60: void Draw(wxDC&);
61:
1.1.1.4 root 62: WXBitmapBuf bitmap {};
1.1 root 63:
64: wxDECLARE_EVENT_TABLE();
65: };
66:
67: // LCD キャラクタウィンドウ
68: class WXLCDMonitor : public WXSubWindow
69: {
70: using inherited = WXSubWindow;
71: public:
1.1.1.4 root 72: WXLCDMonitor(wxWindow *parent);
1.1.1.2 root 73: virtual ~WXLCDMonitor() override;
1.1 root 74:
75: private:
76: WXTextScreen *monpanel {};
77: WXLCDCharPanel *chrpanel {};
78: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.