#pragma once

#include "../Memory/ref_ptr.h"
#include "condition.h"

namespace roy {

    namespace ih {

        class bi_cdt : public condition
        {
        protected:
            typedef ::roy::memory::ref_ptr<condition> ref_ptr_Cdt;

        public:
            bi_cdt(const ref_ptr_Cdt& cdt1, const ref_ptr_Cdt& cdt2);

            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 bool    OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
            virtual bool    OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);

            virtual void    OnEntering(void);
            virtual void    OnLeaving(void);

        protected:
            ref_ptr_Cdt      _cdt[2];
        };

    }

}

