#pragma once

#include "condition.h"

namespace roy {

    namespace ih {

        class btn_down_cdt : public condition
        {
        public:
            btn_down_cdt(void);
            btn_down_cdt(UINT mk, bool init_down = false);

            virtual bool    OnLButtonDown(UINT nFlags, CPoint point);
            virtual bool    OnLButtonUp(UINT nFlags, CPoint point);
            virtual bool    OnLButtonDblClk(UINT nFlags, CPoint point);

            virtual bool    OnRButtonDown(UINT nFlags, CPoint point);
            virtual bool    OnRButtonUp(UINT nFlags, CPoint point);
            virtual bool    OnRButtonDblClk(UINT nFlags, CPoint point);

            virtual bool    OnMButtonDown(UINT nFlags, CPoint point);
            virtual bool    OnMButtonUp(UINT nFlags, CPoint point);
            virtual bool    OnMButtonDblClk(UINT nFlags, CPoint point);

            virtual bool    OnMouseMove(UINT nFlags, CPoint point);

            virtual void    OnEntering(void);

        public:
            
            virtual bool    is_valid(void);

        protected:
            UINT            _mk;
            bool            _init_down;
            bool            _down;
        };

    }

}

