Exemplo n.º 1
0
/*-------------------------------------------------------------------
CVSplitter::OnMouseMove
マウスが動かされたときの処理
-------------------------------------------------------------------*/
void CVSplitter::OnMouseMove(int x,int y){
	/*if (m_bDrag)
		MoveWin(m_x+x,m_y,m_nBaseWidth,m_nBaseHeight);
	CCursor::UseRightLeft();*/
	// 中央でのドラッグ処理追加 by Tetr@pod
	if (m_bDrag) {
		if (m_nMode == SPLIT_QUAD && m_pOtherSplit && m_bIsCenter) {// 中心か?
			FOOTY2_PRINTF( L"Center dragging! x=%d, y=%d, mx=%d, my=%d, omx=%d, omy=%d\n", x, y, m_x, m_y, m_pOtherSplit->GetX(), m_pOtherSplit->GetY() );
			MoveWin(m_x+x,m_y,m_nBaseWidth,m_nBaseHeight);
			m_pOtherSplit->OnBaseWindowMove(m_nBaseX,m_nBaseY,m_nBaseWidth,m_nBaseHeight);
			m_pOtherSplit->MoveWin(m_pOtherSplit->GetX(),y,m_nBaseWidth,m_nBaseHeight);
			CCursor::UseCross();
		}
		else {
			MoveWin(m_x+x,m_y,m_nBaseWidth,m_nBaseHeight);
			CCursor::UseRightLeft();
		}
	}
	else {
		if (m_nMode == SPLIT_QUAD && m_pOtherSplit && y >= m_pOtherSplit->GetY() - SPLIT_CENTER_RANGE1 && y < m_pOtherSplit->GetY() + SPLIT_CENTER_RANGE2) {// 中心か?
			CCursor::UseCross();
		}
		else {
			CCursor::UseRightLeft();
		}
	}
}
Exemplo n.º 2
0
void CWidget::MoveWindow(int x, int y)
{
    int realx = x + GetWX(GetParentWin());
    int realy = y + GetWY(GetParentWin());
    
    MoveWin(this, realx, realy);
    MoveDerWin(this, x, y);
}