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

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       root       33: 
                     34:  private:
                     35:        void OnClose(wxCloseEvent&);
                     36:        void OnShow(wxShowEvent&);
                     37:        void OnSize(wxSizeEvent&);
                     38:        void OnTimer(wxTimerEvent&);
                     39:        void OnLeftDClick(wxMouseEvent&);
1.1.1.3   root       40:        void OnContextMenu(wxContextMenuEvent&);
                     41:        void OnSCSIMediaChanged(wxCommandEvent&);
1.1.1.5   root       42:        void OnFDDMediaChanged(wxCommandEvent&);
                     43:        void OnLEDChanged(wxCommandEvent&);
1.1       root       44: 
                     45:        bool UpdateStat();
1.1.1.4   root       46:        void Draw() override;
1.1       root       47:        void InitIndicators();
                     48:        void LayoutIndicators();
1.1.1.4   root       49:        void DrawPerf(const Indicator *);
                     50:        void DrawSCSI(const Indicator *);
1.1.1.8   root       51:        void DrawVBlk(const Indicator *);
1.1.1.4   root       52:        void DrawNet(const Indicator *);
1.1.1.5   root       53:        void DrawFD(const Indicator *);
1.1.1.6   root       54:        void DrawNewsLED1(const Indicator *);
                     55:        void DrawNewsLED2(const Indicator *);
1.1.1.4   root       56:        void DrawPower(const Indicator *);
                     57:        void DrawTextLED(const Indicator *, Color fg, Color bg);
1.1.1.3   root       58:        void DClickPerf(const Indicator *);
                     59:        void ContextMenuCD(const Indicator *);
1.1.1.5   root       60:        void ContextMenuFD(const Indicator *);
1.1       root       61: 
1.1.1.7   root       62:        // 状態
                     63:        std::vector<Status*> stats {};
                     64: 
1.1       root       65:        // インジケータ情報
1.1.1.3   root       66:        std::vector<Indicator*> indicators {};
1.1       root       67: 
                     68:        // インジケータ表示用
                     69:        bool ispower {};
1.1.1.5   root       70:        bool powerled {};
1.1.1.9 ! root       71:        uint perf_mode {};
        !            72:        uint perf_rate {};
1.1.1.7   root       73:        std::array<bool, 8> scsi_loaded {};
                     74:        std::array<bool, 4> fd_loaded {};
1.1.1.6   root       75: 
                     76:        // 丸いアクセスマーク (X68k FD 用)
                     77:        std::unique_ptr<BitmapI8> accmark /*{}*/;
1.1.1.5   root       78: 
                     79:        // 背景再描画
                     80:        bool refresh_background {};
1.1       root       81: 
1.1.1.7   root       82:        PowerDevice *power {};
                     83:        Syncer *syncer {};
                     84: 
1.1       root       85:        // タイマー
                     86:        wxTimer timer {};
                     87: 
                     88:        // イベントテーブル
                     89:        wxDECLARE_EVENT_TABLE();
1.1.1.5   root       90: 
                     91:        static const uint8 AccessMark12[];
                     92:        static const uint8 AccessMark16[];
1.1.1.6   root       93:        static const uint8 AccessMark24[];
1.1       root       94: };

unix.superglobalmegacorp.com

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