mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 06:14:47 +02:00
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);
|
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)
|
void Gripper::startGrip(DockingCont* pCont, DockingManager* pDockMgr)
|
||||||
{
|
{
|
||||||
|
@ -40,16 +40,16 @@ static const WORD DotPattern[] =
|
|||||||
#define MDLG_CLASS_NAME TEXT("moveDlg")
|
#define MDLG_CLASS_NAME TEXT("moveDlg")
|
||||||
|
|
||||||
|
|
||||||
class Gripper
|
class Gripper final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Gripper();
|
Gripper() = default;;
|
||||||
|
|
||||||
void init(HINSTANCE hInst, HWND hParent) {
|
void init(HINSTANCE hInst, HWND hParent) {
|
||||||
_hInst = hInst;
|
_hInst = hInst;
|
||||||
_hParent = hParent;
|
_hParent = hParent;
|
||||||
DWORD hwndExStyle = (DWORD)GetWindowLongPtr(_hParent, GWL_EXSTYLE);
|
DWORD hwndExStyle = (DWORD)GetWindowLongPtr(_hParent, GWL_EXSTYLE);
|
||||||
isRTL = hwndExStyle & WS_EX_LAYOUTRTL;
|
_isRTL = hwndExStyle & WS_EX_LAYOUTRTL;
|
||||||
};
|
};
|
||||||
|
|
||||||
void startGrip(DockingCont* pCont, DockingManager* pDockMgr);
|
void startGrip(DockingCont* pCont, DockingManager* pDockMgr);
|
||||||
@ -99,7 +99,7 @@ protected :
|
|||||||
ShrinkRcToSize(rc);
|
ShrinkRcToSize(rc);
|
||||||
};
|
};
|
||||||
void ShrinkRcToSize(RECT *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;
|
rc->bottom -= rc->top;
|
||||||
};
|
};
|
||||||
void DoCalcGripperRect(RECT* rc, RECT rcCorr, POINT pt) {
|
void DoCalcGripperRect(RECT* rc, RECT rcCorr, POINT pt) {
|
||||||
@ -111,41 +111,41 @@ protected :
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Handle
|
// Handle
|
||||||
HINSTANCE _hInst;
|
HINSTANCE _hInst = nullptr;
|
||||||
HWND _hParent;
|
HWND _hParent = nullptr;
|
||||||
HWND _hSelf;
|
HWND _hSelf = nullptr;
|
||||||
|
|
||||||
// data of container
|
// data of container
|
||||||
tDockMgr _dockData;
|
tDockMgr _dockData;
|
||||||
DockingManager *_pDockMgr;
|
DockingManager *_pDockMgr = nullptr;
|
||||||
DockingCont *_pCont;
|
DockingCont *_pCont = nullptr;
|
||||||
|
|
||||||
// mouse offset in moving rectangle
|
// mouse offset in moving rectangle
|
||||||
POINT _ptOffset;
|
POINT _ptOffset = { 0 };
|
||||||
|
|
||||||
// remembers old mouse point
|
// remembers old mouse point
|
||||||
POINT _ptOld;
|
POINT _ptOld = { 0 };
|
||||||
BOOL _bPtOldValid;
|
BOOL _bPtOldValid = FALSE;
|
||||||
|
|
||||||
// remember last drawn rectangle (jg)
|
// remember last drawn rectangle (jg)
|
||||||
RECT _rcPrev;
|
RECT _rcPrev = { 0 };
|
||||||
|
|
||||||
// for sorting tabs
|
// for sorting tabs
|
||||||
HWND _hTab;
|
HWND _hTab = nullptr;
|
||||||
HWND _hTabSource;
|
HWND _hTabSource = nullptr;
|
||||||
BOOL _startMovingFromTab;
|
BOOL _startMovingFromTab = FALSE;
|
||||||
int _iItem;
|
int _iItem = 0;
|
||||||
RECT _rcItem;
|
RECT _rcItem = { 0 };
|
||||||
TCITEM _tcItem;
|
TCITEM _tcItem;
|
||||||
|
|
||||||
HDC _hdc;
|
HDC _hdc = nullptr;
|
||||||
HBITMAP _hbm;
|
HBITMAP _hbm = nullptr;
|
||||||
HBRUSH _hbrush;
|
HBRUSH _hbrush = nullptr;
|
||||||
|
|
||||||
// is class registered
|
// is class registered
|
||||||
static BOOL _isRegistered;
|
static BOOL _isRegistered;
|
||||||
|
|
||||||
// get layout direction
|
// get layout direction
|
||||||
bool isRTL;
|
bool _isRTL = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user