Annotation of nono/wx/wxdumpmonitor.h, revision 1.1.1.7

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.6   root        7: //
                      8: // メモリダンプウィンドウ
                      9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "wxsubwindow.h"
1.1.1.7 ! root       14: #include "wxmonitor.h"
1.1.1.6   root       15: #include <array>
1.1       root       16: 
1.1.1.7 ! root       17: class WXMemdumpWindow : public WXSubWindow
1.1       root       18: {
1.1.1.7 ! root       19:        using inherited = WXSubWindow;
1.1       root       20:  public:
1.1.1.5   root       21:        WXMemdumpWindow(wxWindow *parent, int idx_);
1.1.1.3   root       22:        virtual ~WXMemdumpWindow() override;
                     23: 
1.1.1.5   root       24:        // ウィンドウID(モニタID) に対応する sticky address を取得する
                     25:        static uint32 GetStickyAddr(int id);
                     26:        // ウィンドウID(モニタID) に対応する sitcky address を設定する
                     27:        static void SetStickyAddr(int id, uint32 addr);
1.1       root       28: 
1.1.1.7 ! root       29:        bool Layout() override;
        !            30: 
1.1       root       31:  private:
                     32:        // テキスト入力イベント
                     33:        void OnTextEnter(wxCommandEvent& event);
                     34: 
                     35:        // ページアップダウンイベント
                     36:        void OnPrev(wxCommandEvent& event);
                     37:        void OnNext(wxCommandEvent& event);
                     38: 
1.1.1.5   root       39:        // アドレス欄を更新
                     40:        void UpdateAddr();
1.1       root       41: 
1.1.1.5   root       42:        // コントロール
                     43:        wxTextCtrl *addrctrl {};
1.1.1.4   root       44:        wxButton *prev_btn {};
                     45:        wxButton *next_btn {};
1.1       root       46: 
1.1.1.3   root       47:        // コントロールパネルを格納する sizer
                     48:        wxBoxSizer *ctrlbox {};
                     49: 
1.1.1.7 ! root       50:        // コントロールパネル部分の長さ
        !            51:        int fixed_height {};
        !            52: 
        !            53:        WXMonitorPanel *screen {};
        !            54: 
1.1.1.5   root       55:        // 識別子、または sticky_addr[] の添字。
                     56:        // メモリダンプウィンドウは複数枚あるので自分がそのうちの何番目か。
                     57:        int idx {};
1.1       root       58: 
                     59:        // イベントテーブル
                     60:        wxDECLARE_EVENT_TABLE();
1.1.1.5   root       61: 
                     62:        // 開始番地の二次記憶域。
                     63:        // サブウィンドウは今のところ開いてる時だけオブジェクトが存在している
                     64:        // タイプだが、メモリダンプウィンドウを閉じてまた開くとさっきのアドレスが
                     65:        // 見えていてほしいので、ここでその状況を真似する。
                     66:        // こっちはあくまで補助用の領域で、現在表示中のアドレスの一次情報は
                     67:        // screen.userdata のほう。
                     68:        static std::array<uint32, MAX_MEMDUMP_MONITOR> sticky_addr;
1.1       root       69: };

unix.superglobalmegacorp.com

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