12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /*
- * CPullWindow.h
- *
- * Created on: 2021年3月30日
- * Author: Administrator
- */
- #ifndef JNI_W_FILE_INCLUDE_W_SCROLLWINDOWWRAPPER_H_
- #define JNI_W_FILE_INCLUDE_W_SCROLLWINDOWWRAPPER_H_
- #include "w_DefPullWidnow.h"
- class CPullWindow:public Thread {
- public:
- CPullWindow();
- /// 清空
- void resetPage();
- /// 设置下拉栏初始位置
- void onCPullWindow_init(ZKBase *pBase = NULL);
- // 通过滑动判断左移还是右移动
- bool onTouchEvent(const MotionEvent &ev);
- /// 获取下拉栏y轴坐标
- LayoutPosition getPosition();
- /// 上移。增加移动效果
- void setBaseUpMove();
- /// 上拉。增加移动效果
- void setBaseDownMove();
- /** 额外添加的功能 *****************************************/
- /// 下拉状态栏,设置透明度
- void setBottomWindowColor(ZKBase* pBaseColor = NULL);
- protected:
- // 判断可不可以滑动
- bool needToRoll() const;
- // 移动函数
- void movePage(int dy);
- /**
- * @brief 线程循环调用该接口
- * @return true 不退出线程,false 将退出线程
- */
- virtual bool threadLoop();
- private:
- /// 额外添加功能成员
- bool isTextView1GraymaskShow;/// 灰色蒙版
- ZKBase* mBaseColor; /// 设置Base背景色
- /// 固定成员
- bool isDownPull;//true:是下拉
- bool isRegistered;
- bool isCanMove;//true:有滑动事件
- bool isFuncMove;/// 函数调用移动
- bool mHasDown;
- bool mIsRolling;
- int mCurRollSpeed;
- unsigned int mRollSpeed;
- ZKBase* mBase;
- long int mStartDownTime;
- PWPOINT mDownPoint;
- PWPOINT mUpPoint;
- VelocityTracker mVelocityTracker; // 速度追踪
- };
- #endif /* JNI_W_FILE_INCLUDE_W_SCROLLWINDOWWRAPPER_H_ */
|