Initialize the values of Gripper's varible member
This commit is contained in:
parent
d939e4a6ed
commit
2159126d8e
|
@ -74,36 +74,6 @@ static LRESULT CALLBACK hookProcKeyboard(int nCode, WPARAM wParam, LPARAM lParam
|
|||
return ::CallNextHookEx(hookKeyboard, nCode, wParam, lParam);
|
||||
}
|
||||
|
||||
Gripper::Gripper()
|
||||
{
|
||||
_hInst = NULL;
|
||||
_hParent = NULL;
|
||||
_hSelf = NULL;
|
||||
_pDockMgr = NULL;
|
||||
_pCont = NULL;
|
||||
|
||||
_ptOffset.x = 0;
|
||||
_ptOffset.y = 0;
|
||||
|
||||
_ptOld.x = 0;
|
||||
_ptOld.y = 0;
|
||||
_bPtOldValid = FALSE;
|
||||
|
||||
_hTab = NULL;
|
||||
_hTabSource = NULL;
|
||||
_startMovingFromTab = FALSE;
|
||||
_iItem = 0;
|
||||
|
||||
_hdc = NULL;
|
||||
_hbm = NULL;
|
||||
_hbrush = NULL;
|
||||
|
||||
memset(&_rcPrev, 0, sizeof(RECT));
|
||||
memset(&_rcItem, 0, sizeof(RECT));
|
||||
memset(&_tcItem, 0, sizeof(TCITEM));
|
||||
memset(&_dockData, 0, sizeof(tDockMgr));
|
||||
}
|
||||
|
||||
|
||||
void Gripper::startGrip(DockingCont* pCont, DockingManager* pDockMgr)
|
||||
{
|
||||
|
|
|
@ -40,16 +40,16 @@ static const WORD DotPattern[] =
|
|||
#define MDLG_CLASS_NAME TEXT("moveDlg")
|
||||
|
||||
|
||||
class Gripper
|
||||
class Gripper final
|
||||
{
|
||||
public:
|
||||
Gripper();
|
||||
Gripper() = default;;
|
||||
|
||||
void init(HINSTANCE hInst, HWND hParent) {
|
||||
_hInst = hInst;
|
||||
_hParent = hParent;
|
||||
DWORD hwndExStyle = (DWORD)GetWindowLongPtr(_hParent, GWL_EXSTYLE);
|
||||
isRTL = hwndExStyle & WS_EX_LAYOUTRTL;
|
||||
_isRTL = hwndExStyle & WS_EX_LAYOUTRTL;
|
||||
};
|
||||
|
||||
void startGrip(DockingCont* pCont, DockingManager* pDockMgr);
|
||||
|
@ -99,7 +99,7 @@ protected :
|
|||
ShrinkRcToSize(rc);
|
||||
};
|
||||
void ShrinkRcToSize(RECT *rc) {
|
||||
isRTL ? rc->right = rc->left - rc->right : rc->right -= rc->left;
|
||||
_isRTL ? rc->right = rc->left - rc->right : rc->right -= rc->left;
|
||||
rc->bottom -= rc->top;
|
||||
};
|
||||
void DoCalcGripperRect(RECT* rc, RECT rcCorr, POINT pt) {
|
||||
|
@ -111,41 +111,41 @@ protected :
|
|||
|
||||
private:
|
||||
// Handle
|
||||
HINSTANCE _hInst;
|
||||
HWND _hParent;
|
||||
HWND _hSelf;
|
||||
HINSTANCE _hInst = nullptr;
|
||||
HWND _hParent = nullptr;
|
||||
HWND _hSelf = nullptr;
|
||||
|
||||
// data of container
|
||||
tDockMgr _dockData;
|
||||
DockingManager *_pDockMgr;
|
||||
DockingCont *_pCont;
|
||||
DockingManager *_pDockMgr = nullptr;
|
||||
DockingCont *_pCont = nullptr;
|
||||
|
||||
// mouse offset in moving rectangle
|
||||
POINT _ptOffset;
|
||||
POINT _ptOffset = { 0 };
|
||||
|
||||
// remembers old mouse point
|
||||
POINT _ptOld;
|
||||
BOOL _bPtOldValid;
|
||||
POINT _ptOld = { 0 };
|
||||
BOOL _bPtOldValid = FALSE;
|
||||
|
||||
// remember last drawn rectangle (jg)
|
||||
RECT _rcPrev;
|
||||
RECT _rcPrev = { 0 };
|
||||
|
||||
// for sorting tabs
|
||||
HWND _hTab;
|
||||
HWND _hTabSource;
|
||||
BOOL _startMovingFromTab;
|
||||
int _iItem;
|
||||
RECT _rcItem;
|
||||
HWND _hTab = nullptr;
|
||||
HWND _hTabSource = nullptr;
|
||||
BOOL _startMovingFromTab = FALSE;
|
||||
int _iItem = 0;
|
||||
RECT _rcItem = { 0 };
|
||||
TCITEM _tcItem;
|
||||
|
||||
HDC _hdc;
|
||||
HBITMAP _hbm;
|
||||
HBRUSH _hbrush;
|
||||
HDC _hdc = nullptr;
|
||||
HBITMAP _hbm = nullptr;
|
||||
HBRUSH _hbrush = nullptr;
|
||||
|
||||
// is class registered
|
||||
static BOOL _isRegistered;
|
||||
|
||||
// get layout direction
|
||||
bool isRTL;
|
||||
bool _isRTL = false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue