用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
3.9 KiB

5 months ago
/**
* Copyright (C) 2014-2050 SOUI团队
* All rights reserved.
*
* @file SSliderBar.h
* @brief
* @version v1.0
* @author soui
* @date 2014-07-08
*
* Describe
*/
#pragma once
#include "SCmnCtrl.h"
namespace SOUI
{
/**
* @class SSliderBar
* @brief
*
* Describe
*/
class SOUI_EXP SSliderBar : public SProgress
{
SOUI_CLASS_NAME(SSliderBar, L"sliderbar")
struct RANGE
{
int value1;
int value2;
};
public:
/**
* SSliderBar::SSliderBar
* @brief
*
* Describe
*/
SSliderBar();
/**
* SSliderBar::~SSliderBar
* @brief
*
* Describe
*/
~SSliderBar();
enum
{
SC_RAIL,
SC_SELECT,
SC_THUMB,
SC_RAILBACK,
};
public:
/**
* SSliderBar::HitTest
* @brief
* @param CPoint pt --
*
* Describe
*/
int HitTest(CPoint pt);
protected:
BOOL m_bDrag; /**< 是否允许拖动 */
CPoint m_ptDrag; /**< 拖动位置 */
int m_nDragValue; /**< 拖动距离 */
int m_uHtPrev; /**< 上次的鼠标位置 */
SAutoRefPtr<ISkinObj> m_pSkinThumb; /**< 皮肤对象 */
BOOL m_bThumbInRail; /**< 滑块包含在轨道中 */
protected:
/**
* SSliderBar::NotifyPos
* @brief
* @param UINT uCode --
* @param int nPos --
*
* Describe
*/
LRESULT NotifyPos(UINT uCode, int nPos);
/**
* SSliderBar::GetDesiredSize
* @brief
* @param int wid --
* @param int hei --
* @return CSize
*
* Describe
*/
virtual CSize GetDesiredSize(int wid,int hei);
virtual void OnColorize(COLORREF cr);
virtual void OnScaleChanged(int scale);
/**
* SSliderBar::GetPartRect
* @brief
* @param UINT uSBCode
*
* Describe
*/
CRect GetPartRect(UINT uSBCode);
RANGE _GetPartRange(int nLength,int nThumbSize, BOOL bThumbInRail, int nMin,int nMax,int nValue, UINT uSBCode);
/**
* SSliderBar::OnPaint
* @brief
* @param IRenderTarget * pRT --
*
* Describe
*/
void OnPaint(IRenderTarget * pRT);
/**
* SSliderBar::OnLButtonUp
* @brief
* @param UINT nFlags --
* @param CPoint point --
*
* Describe
*/
void OnLButtonUp(UINT nFlags, CPoint point);
/**
* SSliderBar::OnLButtonDown
* @brief
* @param UINT nFlags --
* @param CPoint point --
*
* Describe
*/
void OnLButtonDown(UINT nFlags, CPoint point);
/**
* SSliderBar::OnMouseMove
* @brief
* @param UINT nFlags --
* @param CPoint point --
*
* Describe
*/
void OnMouseMove(UINT nFlags, CPoint point);
/**
* SSliderBar::OnMouseLeave
* @brief
*
* Describe
*/
void OnMouseLeave();
SOUI_MSG_MAP_BEGIN()
MSG_WM_LBUTTONDOWN(OnLButtonDown)
MSG_WM_LBUTTONUP(OnLButtonUp)
MSG_WM_MOUSEMOVE(OnMouseMove)
MSG_WM_MOUSELEAVE(OnMouseLeave)
MSG_WM_PAINT_EX(OnPaint)
SOUI_MSG_MAP_END()
SOUI_ATTRS_BEGIN()
ATTR_SKIN(L"thumbSkin", m_pSkinThumb, TRUE)
ATTR_BOOL(L"thumbInRail",m_bThumbInRail,TRUE)
SOUI_ATTRS_END()
};
}