Annotation of nono/wx/wxmonitor.h, revision 1.1.1.8

1.1       root        1: //
                      2: // nono
1.1.1.2   root        3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
1.1.1.7   root        7: //
                      8: // モニターウィンドウ
                      9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "wxsubwindow.h"
1.1.1.8 ! root       14: #include "wxtextscreen.h"
        !            15: #include "wxscrollbar.h"
1.1.1.6   root       16: #include "monitor.h"
1.1       root       17: 
1.1.1.8 ! root       18: // モニタパネル
        !            19: class WXMonitorPanel : public WXTextScreen
        !            20: {
        !            21:        using inherited = WXTextScreen;
        !            22:  public:
        !            23:        WXMonitorPanel(wxWindow *parent, Monitor& monitor_);
        !            24:        virtual ~WXMonitorPanel() override;
        !            25: 
        !            26:        // 画面を更新して再描画する。
        !            27:        void DoRefresh();
        !            28: 
        !            29:        // 更新頻度設定
        !            30:        void SetRate(int hz);
        !            31: 
        !            32:        Monitor& GetMonitor() const { return monitor; }
        !            33: 
        !            34:  private:
        !            35:        void OnTimer(wxTimerEvent&);
        !            36: 
        !            37:        Monitor& monitor;
        !            38:        wxTimer timer {};
        !            39: 
        !            40:        wxDECLARE_EVENT_TABLE();
        !            41: };
        !            42: 
        !            43: // モニタウィンドウ (サイズ固定)
1.1       root       44: class WXMonitorWindow : public WXSubWindow
                     45: {
1.1.1.2   root       46:        using inherited = WXSubWindow;
1.1       root       47:  public:
1.1.1.6   root       48:        WXMonitorWindow(wxWindow *parent, const wxString& name,
                     49:                Monitor& monitor_);
1.1.1.5   root       50:        virtual ~WXMonitorWindow() override;
1.1       root       51: 
1.1.1.6   root       52:  protected:
1.1.1.8 ! root       53:        // モニタパネル
        !            54:        WXMonitorPanel *monpanel {};
        !            55: };
        !            56: 
        !            57: // 縦スクロールバー付きモニタウィンドウ
        !            58: class WXScrollMonitorWindow : public WXSubWindow
        !            59: {
        !            60:        using inherited = WXSubWindow;
        !            61:  public:
        !            62:        WXScrollMonitorWindow(wxWindow *parent, const wxString& name,
        !            63:                Monitor& monitor_);
        !            64:        virtual ~WXScrollMonitorWindow() override;
        !            65: 
        !            66:        bool Layout() override;
        !            67: 
        !            68:  private:
        !            69:        // サイズ変更イベント
        !            70:        void OnSize(wxSizeEvent& event);
        !            71: 
        !            72:        // マウスホイールイベント
        !            73:        void OnMouseWheel(wxMouseEvent&);
        !            74: 
        !            75:        // スクロールイベント
        !            76:        void OnScroll(wxScrollEvent& event);
        !            77: 
        !            78:        // スクロール処理
        !            79:        void DoScroll(int pos);
        !            80: 
        !            81:        // モニタパネル
        !            82:        WXMonitorPanel *monpanel {};
        !            83: 
        !            84:        // スクロールバー
        !            85:        WXScrollBar *vscroll {};
        !            86: 
        !            87:        // イベントテーブル
        !            88:        wxDECLARE_EVENT_TABLE();
1.1       root       89: };

unix.superglobalmegacorp.com

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