Annotation of nono/wx/wxvideomonitor.h, revision 1.1

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2019 [email protected]
        !             4: //
        !             5: 
        !             6: #pragma once
        !             7: 
        !             8: #include "object.h"
        !             9: #include "wxsubwindow.h"
        !            10: 
        !            11: //
        !            12: // LUNA ビットマップパネル
        !            13: //
        !            14: class WXLunaBitmapPanel : public wxScrolledWindow
        !            15: {
        !            16:        typedef wxScrolledWindow inherited;
        !            17:  public:
        !            18:        WXLunaBitmapPanel(wxWindow *parent);
        !            19:        virtual ~WXLunaBitmapPanel();
        !            20: 
        !            21:  private:
        !            22:        void OnSize(wxSizeEvent& event);
        !            23:        void OnPaint(wxPaintEvent& event);
        !            24:        void OnScrollWin(wxScrollWinEvent& event);
        !            25:        void Draw();
        !            26: 
        !            27:        const uint8 *src = NULL;        // Bitmap デバイス内のバッファを指す
        !            28:        uint8 *bmpbuf = NULL;           // 裏バッファ
        !            29: 
        !            30:        int view_x = 0;                         // ビューの表示開始 X 座標
        !            31:        int view_y = 0;                         // ビューの表示開始 Y 座標
        !            32:        int view_width = 0;                     // ビュー幅
        !            33:        int view_height = 0;            // ビュー高さ
        !            34: 
        !            35:        // 縦は1ドットずつ処理出来るので特筆することはない。
        !            36:        // 横は少なくともバイト(8ドット)単位に制限したほうが実装が楽。
        !            37:        // 今はロングワード単位で描画しているため 32ドット単位としている。
        !            38:        static const int virtual_width = 2048;  // 仮想画面幅 [pixel]
        !            39:        static const int virtual_height = 1024; // 仮想画面高さ [pixel]
        !            40:        static const int width_per_unit = 32;   // 横スクロール単位 [pixel]
        !            41:        static const int height_per_unit = 1;   // 縦スクロール単位 [pixel]
        !            42:        static_assert(virtual_width  % width_per_unit  == 0, "");
        !            43:        static_assert(virtual_height % height_per_unit == 0, "");
        !            44: 
        !            45:        // イベントテーブル
        !            46:        wxDECLARE_EVENT_TABLE();
        !            47: };
        !            48: 
        !            49: //
        !            50: // LUNA ビットマップウィンドウ
        !            51: //
        !            52: class WXLunaBitmapWindow : public WXSubWindow
        !            53: {
        !            54:        typedef WXSubWindow inherited;
        !            55:  public:
        !            56:        WXLunaBitmapWindow(wxWindow *parent, wxWindowID id, const wxString& name);
        !            57:        virtual ~WXLunaBitmapWindow();
        !            58: 
        !            59:  private:
        !            60:        // タイマーイベント
        !            61:        void OnTimer(wxTimerEvent& event);
        !            62: 
        !            63:        // グラフィックパネル
        !            64:        WXLunaBitmapPanel *panel = NULL;
        !            65: 
        !            66:        // タイマー
        !            67:        wxTimer timer;
        !            68: 
        !            69:        // イベントテーブル
        !            70:        wxDECLARE_EVENT_TABLE();
        !            71: };

unix.superglobalmegacorp.com

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