Annotation of nono/wx/wxstatuspanel.h, revision 1.1.1.10

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2021 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
1.1.1.4   root        7: //
                      8: // ステータスパネル
                      9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "wxtextpanel.h"
1.1.1.5   root       14: #include "fdd.h"
                     15: #include <array>
1.1       root       16: 
1.1.1.6   root       17: class Indicator;
                     18: class PowerDevice;
                     19: class Syncer;
1.1.1.7   root       20: class Status;
1.1       root       21: class WXStatusPanel;
                     22: 
                     23: // ステータスパネル
                     24: class WXStatusPanel : public WXTextPanel
                     25: {
                     26:        using inherited = WXTextPanel;
1.1.1.6   root       27: 
1.1       root       28:  public:
1.1.1.9   root       29:        explicit WXStatusPanel(wxWindow *parent);
                     30:        ~WXStatusPanel() override;
1.1       root       31: 
1.1.1.4   root       32:        void FontChanged() override;
1.1.1.10! root       33:        void Fit() override;
        !            34:        bool Layout() override;
1.1       root       35: 
                     36:  private:
                     37:        void OnClose(wxCloseEvent&);
                     38:        void OnShow(wxShowEvent&);
                     39:        void OnTimer(wxTimerEvent&);
                     40:        void OnLeftDClick(wxMouseEvent&);
1.1.1.3   root       41:        void OnContextMenu(wxContextMenuEvent&);
                     42:        void OnSCSIMediaChanged(wxCommandEvent&);
1.1.1.5   root       43:        void OnFDDMediaChanged(wxCommandEvent&);
                     44:        void OnLEDChanged(wxCommandEvent&);
1.1       root       45: 
                     46:        bool UpdateStat();
1.1.1.4   root       47:        void Draw() override;
1.1       root       48:        void InitIndicators();
1.1.1.10! root       49:        wxSize LayoutIndicators();
1.1.1.4   root       50:        void DrawPerf(const Indicator *);
                     51:        void DrawSCSI(const Indicator *);
1.1.1.8   root       52:        void DrawVBlk(const Indicator *);
1.1.1.4   root       53:        void DrawNet(const Indicator *);
1.1.1.5   root       54:        void DrawFD(const Indicator *);
1.1.1.6   root       55:        void DrawNewsLED1(const Indicator *);
                     56:        void DrawNewsLED2(const Indicator *);
1.1.1.4   root       57:        void DrawPower(const Indicator *);
                     58:        void DrawTextLED(const Indicator *, Color fg, Color bg);
1.1.1.3   root       59:        void DClickPerf(const Indicator *);
                     60:        void ContextMenuCD(const Indicator *);
1.1.1.5   root       61:        void ContextMenuFD(const Indicator *);
1.1       root       62: 
1.1.1.7   root       63:        // 状態
                     64:        std::vector<Status*> stats {};
                     65: 
1.1       root       66:        // インジケータ情報
1.1.1.3   root       67:        std::vector<Indicator*> indicators {};
1.1       root       68: 
                     69:        // インジケータ表示用
                     70:        bool ispower {};
1.1.1.5   root       71:        bool powerled {};
1.1.1.9   root       72:        uint perf_mode {};
                     73:        uint perf_rate {};
1.1.1.7   root       74:        std::array<bool, 8> scsi_loaded {};
                     75:        std::array<bool, 4> fd_loaded {};
1.1.1.6   root       76: 
                     77:        // 丸いアクセスマーク (X68k FD 用)
                     78:        std::unique_ptr<BitmapI8> accmark /*{}*/;
1.1.1.5   root       79: 
                     80:        // 背景再描画
                     81:        bool refresh_background {};
1.1       root       82: 
1.1.1.7   root       83:        PowerDevice *power {};
                     84:        Syncer *syncer {};
                     85: 
1.1       root       86:        // タイマー
                     87:        wxTimer timer {};
                     88: 
                     89:        // イベントテーブル
                     90:        wxDECLARE_EVENT_TABLE();
1.1.1.5   root       91: 
                     92:        static const uint8 AccessMark12[];
                     93:        static const uint8 AccessMark16[];
1.1.1.6   root       94:        static const uint8 AccessMark24[];
1.1       root       95: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.