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

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       root       16: 
1.1.1.8   root       17: // モニタパネル
                     18: class WXMonitorPanel : public WXTextScreen
                     19: {
                     20:        using inherited = WXTextScreen;
                     21:  public:
1.1.1.10  root       22:        WXMonitorPanel(wxWindow *parent, Monitor *monitor_);
1.1.1.9   root       23:        ~WXMonitorPanel() override;
1.1.1.8   root       24: 
1.1.1.13! root       25:        void FontChanged() override;
        !            26: 
1.1.1.8   root       27:        // 画面を更新して再描画する。
1.1.1.12  root       28:        virtual void DoRefresh();
1.1.1.8   root       29: 
                     30:        // 更新頻度設定
                     31:        void SetRate(int hz);
                     32: 
1.1.1.10  root       33:        Monitor *GetMonitor() const { return monitor; }
1.1.1.8   root       34: 
                     35:  private:
                     36:        void OnTimer(wxTimerEvent&);
                     37: 
1.1.1.10  root       38:        Monitor *monitor {};
1.1.1.8   root       39:        wxTimer timer {};
                     40: 
                     41:        wxDECLARE_EVENT_TABLE();
                     42: };
                     43: 
                     44: // モニタウィンドウ (サイズ固定)
1.1       root       45: class WXMonitorWindow : public WXSubWindow
                     46: {
1.1.1.2   root       47:        using inherited = WXSubWindow;
1.1       root       48:  public:
1.1.1.6   root       49:        WXMonitorWindow(wxWindow *parent, const wxString& name,
1.1.1.10  root       50:                Monitor *monitor_);
1.1.1.9   root       51:        ~WXMonitorWindow() override;
1.1       root       52: 
1.1.1.6   root       53:  protected:
1.1.1.8   root       54:        // モニタパネル
                     55:        WXMonitorPanel *monpanel {};
                     56: };
                     57: 
                     58: // 縦スクロールバー付きモニタウィンドウ
                     59: class WXScrollMonitorWindow : public WXSubWindow
                     60: {
                     61:        using inherited = WXSubWindow;
                     62:  public:
                     63:        WXScrollMonitorWindow(wxWindow *parent, const wxString& name,
1.1.1.10  root       64:                Monitor *monitor_);
1.1.1.9   root       65:        ~WXScrollMonitorWindow() override;
1.1.1.8   root       66: 
1.1.1.11  root       67:        void FontChanged() override;
1.1.1.8   root       68:        bool Layout() override;
                     69: 
1.1.1.13! root       70:  protected:
        !            71:        // モニタパネル
        !            72:        WXMonitorPanel *monpanel {};
        !            73: 
1.1.1.8   root       74:  private:
1.1.1.12  root       75:        bool GetMySizeHints(wxSize *, wxSize *, wxSize *, wxSize *) override;
1.1.1.8   root       76: 
                     77:        // マウスホイールイベント
                     78:        void OnMouseWheel(wxMouseEvent&);
                     79: 
                     80:        // スクロールイベント
                     81:        void OnScroll(wxScrollEvent& event);
                     82: 
                     83:        // スクロール処理
                     84:        void DoScroll(int pos);
                     85: 
                     86:        // スクロールバー
                     87:        WXScrollBar *vscroll {};
1.1       root       88: };

unix.superglobalmegacorp.com

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