Ejemplo n.º 1
0
void CSkinButton::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	if ( nChar == VK_SPACE )
		OnLButtonDown( 0, 0 );
	//CButton::OnKeyDown(nChar, nRepCnt, nFlags);
}
Ejemplo n.º 2
0
LRESULT CCharacterProcess::DefMainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch ( uMsg )
	{
		case WM_LBUTTONDOWN:
			OnLButtonDown(wParam, lParam);
			break;
		case WM_LBUTTONUP:
			OnLButtonUp(wParam, lParam);
			break;
		case ID_SOCKCLIENT_EVENT_MSG:
			g_xClientSocket.OnSocketMessage(wParam, lParam);
			break;
		case WM_KEYDOWN:
			OnKeyDown(wParam, lParam);
			break;
		case WM_MOUSEON:
			OnMouseOn(wParam,lParam);
			break;
		case WM_MOVE:
			OnWindowMove(wParam,lParam);
			break;
		case WM_MOUSEMOVE:
			OnMouseMove(wParam,lParam);
			break;
		default:
			break;
	}
	return CWHDefProcess::DefMainWndProc(hWnd, uMsg, wParam, lParam);
}
Ejemplo n.º 3
0
LRESULT CALLBACK HexGrid::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg){
	case WM_CREATE:
		OnCreate(hWnd, uMsg, wParam, lParam);
		break;
	case WM_PAINT:
		OnPaint(hWnd, uMsg, wParam, lParam);
		break;
	case WM_SETFONT:
		OnSetFont(hWnd, uMsg, wParam, lParam);
		break;
	case WM_SIZE:
		OnSize(hWnd, uMsg, wParam, lParam);
		break;
	case WM_LBUTTONDOWN:
		OnLButtonDown(hWnd, uMsg, wParam, lParam);
		break;
	case WM_LBUTTONUP:
		OnLButtonUp(hWnd, uMsg, wParam, lParam);
		break;
	case WM_MOUSEMOVE:
		OnMouseMove(hWnd, uMsg, wParam, lParam);
		break;
	case WM_VSCROLL:
		OnVScroll(hWnd, uMsg, wParam, lParam);
		break;

	default:
		return DefWindowProc(hWnd, uMsg, wParam, lParam);
	}
	return 0;
}
Ejemplo n.º 4
0
LRESULT CDreamSkinSpinCtrl::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
	LRESULT nResult = ERROR_SUCCESS;

	switch(message)
	{
	case WM_ERASEBKGND:
		break;
	case WM_LBUTTONDBLCLK:
		nResult = ::SendMessageW(m_hWnd, WM_LBUTTONDOWN, wParam, lParam);
		break;
	case WM_LBUTTONDOWN:
		nResult = OnLButtonDown(wParam, MAKEPOINTS(lParam));
		break;
	case WM_LBUTTONUP:
		nResult = OnLButtonUp(wParam, MAKEPOINTS(lParam));
		break;
	case WM_MOUSELEAVE:
		nResult = OnMouseLeave();
		break;
	case WM_MOUSEMOVE:
		nResult = OnMouseMove(wParam, MAKEPOINTS(lParam));
		break;
	case WM_PAINT:
		nResult = OnPaint();
		break;
	default:
		nResult = CDreamSkinWindow::DefWindowProc(message, wParam, lParam);
	}

	return nResult;
}
Ejemplo n.º 5
0
void CFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
#if _FX_OS_ == _FX_OS_MACOSX_
  if (!pMessage)
    return;

  switch (pMessage->GetType()) {
    case CFWL_Message::Type::Mouse: {
      CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
      switch (pMsg->m_dwCmd) {
        case FWL_MouseCommand::LeftButtonDown:
          OnLButtonDown(pMsg);
          break;
        case FWL_MouseCommand::LeftButtonUp:
          OnLButtonUp(pMsg);
          break;
        default:
          break;
      }
      break;
    }
    default:
      break;
  }
#endif  // _FX_OS_ == _FX_OS_MACOSX_
}
Ejemplo n.º 6
0
//窗口处理函数
LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, 
												 WPARAM wParam, LPARAM lParam )
{
	switch( msg )
	{
		case WM_MOUSEWHEEL:
			OnMouseWheel( hWnd, wParam );
			break;
		case WM_LBUTTONDBLCLK:
			OnLButtonDblClk( hWnd );
			break;
		case WM_PAINT:
			OnPaint( hWnd );
			break;
		case WM_MOUSEMOVE:
			OnMouseMove( hWnd, lParam );
			break;
		case WM_LBUTTONDOWN:
			OnLButtonDown( hWnd, wParam, lParam );
			break;
		case WM_LBUTTONUP:
			OnLButtonUp( hWnd, wParam, lParam );
			break;
		case WM_DESTROY:
			PostQuitMessage( 0 );
			break;
	}
	return DefWindowProc( hWnd, msg, wParam, lParam );
}
Ejemplo n.º 7
0
	//--------------------------------------------------------------------------------------------
	bool MouseHandlerBase::OnMsgProc( HWND i_hWnd, UINT i_nMsg, WPARAM i_wParam, LPARAM i_lParam )
	{
		bool ret = false;

		// マウスに関係するメッセージをハンドリングする
		switch( i_nMsg )
		{
		case WM_MOUSEMOVE:
			ret = OnMouseMove(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_LBUTTONDOWN:
			ret = OnLButtonDown(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_LBUTTONUP:
			ret = OnLButtonUp(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_RBUTTONDOWN:
			ret = OnRButtonDown(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_RBUTTONUP:
			ret = OnRButtonUp(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_MOUSEWHEEL:
			ret = OnMouseWheel( GET_WHEEL_DELTA_WPARAM(i_wParam) / WHEEL_DELTA );
			break;
		}

		return ret;
	}
Ejemplo n.º 8
0
// 캔버스 윈도우의 메시지 처리 함수
LRESULT CALLBACK CanvasProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam)
{
    switch(iMessage) {
    case WM_CREATE:
        return OnCreate(hWnd,wParam,lParam);
    case WM_DESTROY:
        return OnDestroy(hWnd,wParam,lParam);
    case WM_PAINT:
        return OnPaint(hWnd,wParam,lParam);
    case WM_COMMAND:
        return OnCommand(hWnd,wParam,lParam);
    case WM_LBUTTONDOWN:
        return OnLButtonDown(hWnd,wParam,lParam);
    case WM_MOUSEMOVE:
        return OnMouseMove(hWnd,wParam,lParam);
    case WM_LBUTTONUP:
        return OnLButtonUp(hWnd,wParam,lParam);
    case WM_KEYDOWN:
        return OnKeyDown(hWnd,wParam,lParam);
    case WM_SETCURSOR:
        return OnSetCursor(hWnd,wParam,lParam);
    case WM_SIZE:
        return OnSize(hWnd,wParam,lParam);
    case WM_CONTEXTMENU:
        return OnContextMenu(hWnd,wParam,lParam);
    case WM_LBUTTONDBLCLK:
        return OnLButtonDblclk(hWnd,wParam,lParam);
    }
    return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}
Ejemplo n.º 9
0
void CSequenceSetting::mousePressEvent(QMouseEvent *event)
{
   CPoint point(event->pos());
   unsigned int flags = 0;
   if ( event->modifiers()&Qt::ControlModifier )
   {
      flags |= MK_CONTROL;
   }
   if ( event->modifiers()&Qt::ShiftModifier )
   {
      flags |= MK_SHIFT;
   }
   if ( event->buttons()&Qt::LeftButton )
   {
      flags |= MK_LBUTTON;
   }
   if ( event->buttons()&Qt::MiddleButton )
   {
      flags |= MK_MBUTTON;
   }
   if ( event->buttons()&Qt::RightButton )
   {
      flags |= MK_RBUTTON;            
   }
   if ( event->button() == Qt::LeftButton )
   {
      OnLButtonDown(flags,point);
   }
   update();
}
Ejemplo n.º 10
0
void CObjectView::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	if (mode == ZOOM)
  	OnLButtonDown(nFlags, point);   //  nicer action
  else
  	CView ::OnLButtonDblClk(nFlags, point);
}
Ejemplo n.º 11
0
unsigned CClanOrganizeDlg::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam )
{
	if( !IsVision() ) return 0;
	if( unsigned uiProcID = CTDialog::Process( uiMsg, wParam,lParam ))
	{
		switch( uiMsg )
		{
		case WM_LBUTTONUP:
			{
				switch( uiProcID )
				{
				case IID_BTN_CONFIRM:
					OrganizeClan();
					break;
				case IID_BTN_CLOSE:
				case IID_BTN_CANCEL:
					Hide();
					break;
				default:
					break;
				}
			}
		case WM_LBUTTONDOWN:
			OnLButtonDown( uiProcID, wParam, lParam );
			break;
		default:
			break;
		}
		return uiMsg;
	}
	return 0;
}
Ejemplo n.º 12
0
LRESULT WindowImplBase::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	LRESULT lRes = 0;
	BOOL bHandled = TRUE;
	switch (uMsg)
	{
	case WM_CREATE:			lRes = OnCreate(uMsg, wParam, lParam, bHandled); break;
	case WM_CLOSE:			lRes = OnClose(uMsg, wParam, lParam, bHandled); break;
	case WM_DESTROY:		lRes = OnDestroy(uMsg, wParam, lParam, bHandled); break;
#if defined(WIN32) && !defined(UNDER_CE)
	case WM_NCACTIVATE:		lRes = OnNcActivate(uMsg, wParam, lParam, bHandled); break;
	case WM_NCCALCSIZE:		lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled); break;
	case WM_NCPAINT:		lRes = OnNcPaint(uMsg, wParam, lParam, bHandled); break;
	case WM_NCHITTEST:		lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled); break;
	case WM_GETMINMAXINFO:	lRes = OnGetMinMaxInfo(uMsg, wParam, lParam, bHandled); break;
	case WM_MOUSEWHEEL:		lRes = OnMouseWheel(uMsg, wParam, lParam, bHandled); break;
#endif
	case WM_SIZE:			lRes = OnSize(uMsg, wParam, lParam, bHandled); break;	
	case WM_SYSCOMMAND:		lRes = OnSysCommand(uMsg, wParam, lParam, bHandled); break;
	case WM_KEYDOWN:		lRes = OnKeyDown(uMsg, wParam, lParam, bHandled); break;
	case WM_KILLFOCUS:		lRes = OnKillFocus(uMsg, wParam, lParam, bHandled); break;
	case WM_SETFOCUS:		lRes = OnSetFocus(uMsg, wParam, lParam, bHandled); break;
	case WM_LBUTTONUP:		lRes = OnLButtonUp(uMsg, wParam, lParam, bHandled); break;
	case WM_LBUTTONDOWN:	lRes = OnLButtonDown(uMsg, wParam, lParam, bHandled); break;
	case WM_MOUSEMOVE:		lRes = OnMouseMove(uMsg, wParam, lParam, bHandled); break;
	default:				bHandled = FALSE; break;
	}
	if (bHandled) return lRes;

	lRes = HandleCustomMessage(uMsg, wParam, lParam, bHandled);
	if (bHandled) return lRes;

	if (paint_manager_.MessageHandler(uMsg, wParam, lParam, lRes)) return lRes;
	return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
}
BOOL CXTPCalendarWeekViewDay::OnLButtonDown(UINT nFlags, CPoint point)
{
	if (!GetView() || !GetCalendarControl())
	{
		ASSERT(FALSE);
		return FALSE;
	}

	if (GetView()->GetTheme())
	{
		if (XTP_SAFE_GET4(GetView(), GetTheme(), GetWeekViewPart(), GetDayPart(),
			OnLButtonDown(this, nFlags, point), FALSE))
		{
			return TRUE;
		}
	}
	else if (m_Layout.m_rcExpandSign.PtInRect(point))
	{
		if (UserAction_OnExpandDay(xtpCalendarExpandDayButton_WeekView))
			return TRUE;

		XTP_SAFE_CALL1(GetCalendarControl(), QueueDayViewSwitch(GetDayDate()));
		return TRUE;
	}

	return TBase::OnLButtonDown(nFlags, point);
}
Ejemplo n.º 14
0
LRESULT CALLBACK CodeList::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg){
	case WM_CREATE:
		OnCreate(hWnd, uMsg, wParam, lParam);
		break;
	case WM_PAINT:
		OnPaint(hWnd, uMsg, wParam, lParam);
		break;
	case WM_SETFONT:
		OnSetFont(hWnd, uMsg, wParam, lParam);
		break;
	case WM_LBUTTONDOWN:
		OnLButtonDown(hWnd, uMsg, wParam, lParam);
		break;
	case WM_VSCROLL:
		OnVScroll(hWnd, uMsg, wParam, lParam);
		break;
	case WM_ENABLE:
		OnEnable(hWnd, uMsg, wParam, lParam);
		break;
	default:
		return DefWindowProc(hWnd, uMsg, wParam, lParam);
	}
	return 0;
}
Ejemplo n.º 15
0
    LRESULT CALLBACK Slider_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {
        Slider_Info * const pInfo = GetInfo(hwnd);

        switch (uMsg)
        {
        case WM_CREATE:
            return OnCreate(hwnd);

        case WM_PAINT:
            return OnPaint(hwnd, pInfo);

        case WM_NCDESTROY:
            return OnNcDestroy(hwnd, pInfo);

        case WM_LBUTTONDOWN:
            return OnLButtonDown(hwnd, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), pInfo);

        case WM_LBUTTONUP:
            return OnLButtonUp(hwnd, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), pInfo);

        case WM_MOUSEMOVE:
            return OnMouseMove(hwnd, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), pInfo);

        case WM_ENABLE:
            if (wParam == FALSE) // Window is disabled. Stop tracking.
            {
                return OnReleaseSlider(hwnd, pInfo);
            }
            break;

        case WM_CAPTURECHANGED:
           // The window lost focus while the slider was tracking the mouse OR 
           // the slider released the mouse capture itself.
           return OnReleaseSlider(hwnd, pInfo);

            
        // Custom messages
        case WM_SLIDER_SET_THUMB_BITMAP:
            return OnSetThumbBitmap(hwnd, (WORD)wParam, pInfo);

        case WM_SLIDER_SET_BACKGROUND:
            return OnSetBackground(hwnd, (HBRUSH)wParam, pInfo);

        case WM_SLIDER_SET_MIN_MAX:
            return OnSetMinMax(hwnd, (LONG)wParam, (LONG)lParam, pInfo);

        case WM_SLIDER_SET_POSITION:
            return OnSetPosition(hwnd, (LONG)wParam, pInfo);

        case WM_SLIDER_GET_POSITION:
            return OnGetPosition(hwnd, pInfo);

        default:
            return DefWindowProc(hwnd, uMsg, wParam, lParam);
        }

        return 0;
    };
Ejemplo n.º 16
0
//右键按下,选中状态
void CGuiderView::OnRButtonDown(UINT nFlags, CPoint point)
{
	// TODO: 在此添加消息处理程序代码和/或调用默认值
	OnLButtonDown(nFlags,  point);
	App_Veriable::LBDown=false;//左键状态

	CView::OnRButtonDown(nFlags, point);
}
Ejemplo n.º 17
0
void CSkinTab::SetSelTab()
{
	CPoint point;
    point.x = 13;
	point.y = 14;
	OnLButtonDown(1, point);
	OnMouseMove(0,  point);
}
Ejemplo n.º 18
0
void CRScrlBarCtrl::OnTimer(UINT nIDEvent) 
{
	if (nIDEvent && nIDEvent==m_timerID)
	{
		OnLButtonDown(NULL,m_point);
	}
	COleControl::OnTimer(nIDEvent);
}
Ejemplo n.º 19
0
//Only time we should have a timer is if the user is holding down the
//mouse button.  We want to move the slider in the direction of the pointer
//in this case.
void 
CTriThreshold::OnTimer(UINT nIDEvent) 
{
	//Basically, just pretend they clicked, again:
	OnLButtonDown(MK_LBUTTON, mClickPosition);
	
	CButton::OnTimer(nIDEvent);
}
Ejemplo n.º 20
0
bool CPlayerDisplay::OnLButtonDoubleClick (int x, int y)

//	OnLButtonDoubleClick
//
//	Handle lbuttondoubleclick

	{
	return OnLButtonDown(x, y);
	}
Ejemplo n.º 21
0
bool CButtonBarDisplay::OnLButtonDoubleClick (int x, int y)

//	OnLButtonDoubleClick
//
//	Handle double-click

	{
	return OnLButtonDown(x, y);
	}
Ejemplo n.º 22
0
LRESULT CTitleView::Reaction(UINT message, WPARAM wParam, LPARAM lParam){

	switch(message){

	case WM_LBUTTONDOWN:
		return OnLButtonDown(wParam,lParam);
	default:
		return CWSTitleView::Reaction(message,wParam,lParam);
	}
}
Ejemplo n.º 23
0
void CFWL_CheckBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
  if (!pMessage)
    return;

  switch (pMessage->GetClassID()) {
    case CFWL_MessageType::Activate: {
      OnActivate(pMessage);
      break;
    }
    case CFWL_MessageType::SetFocus: {
      OnFocusChanged(pMessage, TRUE);
      break;
    }
    case CFWL_MessageType::KillFocus: {
      OnFocusChanged(pMessage, FALSE);
      break;
    }
    case CFWL_MessageType::Mouse: {
      CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
      switch (pMsg->m_dwCmd) {
        case FWL_MouseCommand::LeftButtonDown: {
          OnLButtonDown(pMsg);
          break;
        }
        case FWL_MouseCommand::LeftButtonUp: {
          OnLButtonUp(pMsg);
          break;
        }
        case FWL_MouseCommand::Move: {
          OnMouseMove(pMsg);
          break;
        }
        case FWL_MouseCommand::Leave: {
          OnMouseLeave(pMsg);
          break;
        }
        default:
          break;
      }
      break;
    }
    case CFWL_MessageType::Key: {
      CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage);
      if (pKey->m_dwCmd == FWL_KeyCommand::KeyDown)
        OnKeyDown(pKey);
      break;
    }
    default: {
      break;
    }
  }

  CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
}
Ejemplo n.º 24
0
void CTransitionDirectionUI::handleEvent(System::Event* evt)
{
	if (evt->get_eventPhase() !=  System::CAPTURING_PHASE)
	{
		if (*evt->get_type() == L"mousedown")
		{
			evt->stopPropagation();
			OnLButtonDown(dynamic_cast<UI::MouseEvent*>(evt));
		}
	}
}
Ejemplo n.º 25
0
void CCheckListBox::OnLButtonDblClk(UINT nFlags, CPoint point)
{
	_AFX_CHECKLIST_STATE* pChecklistState = _afxChecklistState;
	if (point.x < pChecklistState->m_sizeCheck.cx)
	{
		// Double and single clicks act the same on the check box!
		OnLButtonDown(nFlags, point);
		return;
	}
	CListBox::OnLButtonDblClk(nFlags, point);
}
Ejemplo n.º 26
0
LRESULT CHyperlink::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch (uMsg)
	{
	case WM_LBUTTONDOWN:  OnLButtonDown();		break;
	case WM_LBUTTONUP:	  OnLButtonUp(lParam);	break;
	case WM_SETCURSOR:	  return OnSetCursor();	
	case WM_NCHITTEST:	  return HTCLIENT;		// Claim that the mouse is in a client area
	}

	return WndProcDefault(uMsg, wParam, lParam);
}
void CMy150716MapToolmfcView::OnMouseMove(UINT nFlags, CPoint point)
{
	// TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다.
	if (!(GetKeyState(VK_LBUTTON)& 0x8000))
	{
		return;
	}

	OnLButtonDown(nFlags,point);

	CScrollView::OnMouseMove(nFlags, point);
}
Ejemplo n.º 28
0
int32_t CFWL_PushButtonImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
  if (!pMessage)
    return 0;
  if (!m_pOwner->IsEnabled()) {
    return 1;
  }
  int32_t iRet = 1;
  FX_DWORD dwMsgCode = pMessage->GetClassID();
  switch (dwMsgCode) {
    case FWL_MSGHASH_SetFocus:
    case FWL_MSGHASH_KillFocus: {
      OnFocusChanged(pMessage, dwMsgCode == FWL_MSGHASH_SetFocus);
      break;
    }
    case FWL_MSGHASH_Mouse: {
      CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
      FX_DWORD dwCmd = pMsg->m_dwCmd;
      switch (dwCmd) {
        case FWL_MSGMOUSECMD_LButtonDown: {
          OnLButtonDown(pMsg);
          break;
        }
        case FWL_MSGMOUSECMD_LButtonUp: {
          OnLButtonUp(pMsg);
          break;
        }
        case FWL_MSGMOUSECMD_MouseMove: {
          OnMouseMove(pMsg);
          break;
        }
        case FWL_MSGMOUSECMD_MouseLeave: {
          OnMouseLeave(pMsg);
          break;
        }
        default: {}
      }
      break;
    }
    case FWL_MSGHASH_Key: {
      CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage);
      if (pKey->m_dwCmd == FWL_MSGKEYCMD_KeyDown) {
        OnKeyDown(pKey);
      }
      break;
    }
    default: {
      iRet = 0;
      break;
    }
  }
  CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
  return iRet;
}
Ejemplo n.º 29
0
//Input handler
void Game::Input(SDL_Event* Event) {
	switch(Event->type) {
		case SDL_KEYDOWN: {
			OnKeyDown(Event->key.keysym.sym, (SDL_Keymod) Event->key.keysym.mod);
			break;
		}
		case SDL_KEYUP: {
			break;
		}
        case SDL_MOUSEMOTION: {
            OnMouseMove(Event->motion.x,Event->motion.y,Event->motion.xrel,Event->motion.yrel,(Event->motion.state&SDL_BUTTON(SDL_BUTTON_LEFT))!=0,(Event->motion.state&SDL_BUTTON(SDL_BUTTON_RIGHT))!=0,(Event->motion.state&SDL_BUTTON(SDL_BUTTON_MIDDLE))!=0);
            break;
        }
 
        case SDL_MOUSEBUTTONDOWN: {
            switch(Event->button.button) {
                case SDL_BUTTON_LEFT: {
                    OnLButtonDown(Event->button.x,Event->button.y);
                    break;
                }
                case SDL_BUTTON_RIGHT: {
                    OnRButtonDown(Event->button.x,Event->button.y);
                    break;
                }
                case SDL_BUTTON_MIDDLE: {
                    break;
                }
            }
            break;
        }
 
        case SDL_MOUSEBUTTONUP:    {
            switch(Event->button.button) {
                case SDL_BUTTON_LEFT: {
                    break;
                }
                case SDL_BUTTON_RIGHT: {
                    break;
                }
                case SDL_BUTTON_MIDDLE: {
                    break;
                }
            }
            break;
        }
 
        case SDL_QUIT: {
            OnExit();
            break;
        }

    }
}
Ejemplo n.º 30
0
// -----------------------------------------------------------------------------------
bool cgUILineEdit::OnMessage( UINT uMsg, unsigned wparam, unsigned lparam )
{
	switch (uMsg)
	{
	case WM_LBUTTONDOWN:
		{
			OnLButtonDown(wparam, lparam);
		}break;
	case WM_MOUSEMOVE:
		{
			OnMouseMove(wparam, lparam);
		}break;
	case WM_CHAR:
		{
			return OnChar(wparam, lparam);
		}break;
	case WM_KEYDOWN:
		{
			if ( OnKeyDown(wparam, lparam))
				return true;
		}break;
	case WM_LBUTTONDBLCLK:
		{
			SetSelBegin(0);
			SetCursorPos(m_strText.length());
		}break;
	case cgUIMsg_Copy:
		{
			return OnCopy();
		}break;
	case cgUIMsg_Cut:
		{
			return OnCut();
		}break;
	case cgUIMsg_Paste:
		{
			return OnPaste();
		}break;
	case cgUIMsg_MouseOut:
		{
			OnMouseMove(wparam, lparam);
		}break;
	case cgUIMsg_MouseIn:
		{

		}
	default:
		break;
	}

	return cgUIWidget::OnMessage(uMsg, wparam, lparam);
}