本文整理汇总了C++中UpdateCursor函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateCursor函数的具体用法?C++ UpdateCursor怎么用?C++ UpdateCursor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateCursor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateCursor
bool Interactor2DMeasure::ProcessMouseMoveEvent( QMouseEvent* event, RenderView* renderview )
{
RenderView2D* view = ( RenderView2D* )renderview;
if ( m_bDrawing )
{
UpdateCursor( event, view );
int posX = event->x();
int posY = event->y();
// LayerCollection* lc = MainWindow::GetMainWindowPointer()->GetLayerCollection( m_strLayerTypeName.c_str() );
// LayerVolumeBase* mri = ( LayerVolumeBase* )lc->GetActiveLayer();
if ( m_region )
{
if ( m_nAction == MM_Line )
{
((Region2DLine*)m_region)->SetPoint2( posX, posY );
}
else if ( m_nAction == MM_Spline || m_nAction == MM_Polyline )
{
((Region2DPolyline*)m_region)->UpdatePoint( -1, posX, posY );
}
else if ( m_nAction == MM_Rectangle )
{
((Region2DRectangle*)m_region)->SetBottomRight( posX, posY );
}
view->RequestRedraw();
}
return false;
}
else if ( m_bEditing )
{
UpdateCursor( event, view );
int offsetX = event->x() - m_nMousePosX;
int offsetY = event->y() - m_nMousePosY;
if ( m_region )
{
m_nMousePosX = event->x();
m_nMousePosY = event->y();
if ( m_nPointIndex >= 0 )
{
m_region->UpdatePoint( m_nPointIndex, m_nMousePosX, m_nMousePosY );
}
else
{
m_region->Offset( offsetX, offsetY );
}
view->RequestRedraw();
}
return false;
}
else
{
return Interactor2D::ProcessMouseMoveEvent( event, renderview );
}
}
示例2: _SetTransformBox
// _SetMode
void
PathManipulator::_SetMode(uint32 mode)
{
if (fMode != mode) {
//printf("switching mode: %s -> %s\n", string_for_mode(fMode), string_for_mode(mode));
fMode = mode;
if (fMode == TRANSFORM_POINTS) {
_SetTransformBox(new TransformPointsBox(fCanvasView,
this,
fPath,
fSelection->Items(),
fSelection->CountItems()));
// fCanvasView->Perform(new EnterTransformPointsCommand(this,
// fSelection->Items(),
// fSelection->CountItems()));
} else {
if (fTransformBox)
_SetTransformBox(NULL);
}
if (BWindow* window = fCanvasView->Window()) {
window->PostMessage(MSG_UPDATE_SHAPE_UI);
}
UpdateCursor();
}
}
示例3: UpdateCursor
void CChildView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (theApp.m_map.IsEmpty()) goto mend;
UpdateCursor();
mend:
CWnd ::OnKeyUp(nChar, nRepCnt, nFlags);
}
示例4: UpdateCursor
void NEO::Screen::ColocarCursor(uint8_t x, uint8_t y)
{
cursor_x=x;
cursor_y=y;
UpdateCursor();
}
示例5: UpdateCursor
bool Interactor2DVolumeEdit::ProcessKeyDownEvent( QKeyEvent* event, RenderView* renderview )
{
UpdateCursor( event, renderview );
RenderView2D* view = ( RenderView2D* )renderview;
if ( event->modifiers() & Qt::AltModifier && event->key() == Qt::Key_H )
{
Contour2D* c2d = view->GetContour2D();
c2d->SetVisible( !c2d->IsVisible() );
view->RequestRedraw();
return false;
}
else if (event->modifiers() & Qt::ShiftModifier && event->key() == Qt::Key_C)
{
m_bColorPicking = true;
return false;
}
else if (event->key() == Qt::Key_Escape)
{
m_bColorPicking = false;
return false;
}
if ( !m_bEditing )
{
return Interactor2D::ProcessKeyDownEvent( event, renderview );
}
else
{
return false;
}
}
示例6: XGrabPointer
int
XGrabPointer(
Display *display,
Window grab_window,
Bool owner_events,
unsigned int event_mask,
int pointer_mode,
int keyboard_mode,
Window confine_to,
Cursor cursor,
Time time)
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
display->request++;
tsdPtr->grabWinPtr = (TkWindow *) Tk_IdToWindow(display, grab_window);
tsdPtr->restrictWinPtr = NULL;
TkpSetCapture(tsdPtr->grabWinPtr);
if (TkPositionInTree(tsdPtr->lastWinPtr, tsdPtr->grabWinPtr)
!= TK_GRAB_IN_TREE) {
UpdateCursor(tsdPtr->grabWinPtr);
}
return GrabSuccess;
}
示例7: UpdateCursor
/**
* @brief Sets the cursor via software
* @param x The position of X
* @param y The position of y
* */
void ND::Screen::SetCursor(uint8_t x, uint8_t y)
{
cursor_x=x;
cursor_y=y;
UpdateCursor();
}
示例8: GetAttr
/// @todo Implement
void
Console::Erase(EraseDirection d, bool line)
{
const uint16_t attr = GetAttr(0);
if (line) {
switch(d) {
case FORWARD:
break;
case BACKWARD:
break;
case BOTH:
break;
}
} else {
switch(d) {
case FORWARD:
break;
case BACKWARD:
break;
case BOTH: {
_canvas.Fill(attr);
_cursor = _canvas.Buffer();
UpdateCursor();
Invalidate();
break;
}
}
}
}
示例9: UpdateCursor
void
Console::PrintChar (char c)
{
if (AnsiEscFilter(c)) {
UpdateCursor();
return;
}
switch(c) {
case '\n': PutNewLine(); break;
case '\t': PutTab(); break;
case '\r': PutReturn(); break;
case '\b': PutBackspace(); break;
default: PutChar(c); break;
}
UpdateCursor();
}
示例10: UpdateCursor
bool Interactor2DVolumeEdit::ProcessMouseUpEvent( QMouseEvent* event, RenderView* renderview )
{
// RenderView2D* view = ( RenderView2D* )renderview;
UpdateCursor( event, renderview );
if ( m_bEditing )
{
m_nMousePosX = event->x();
m_nMousePosY = event->y();
if ( event->button() != Qt::LeftButton ||
(m_nAction != EM_Polyline && m_nAction != EM_Livewire ) ||
m_dPolylinePoints.size() == 0 )
{
m_bEditing = false;
}
LayerCollection* lc = MainWindow::GetMainWindow()->GetLayerCollection( m_strLayerTypeName );
LayerVolumeBase* mri = ( LayerVolumeBase* )lc->GetActiveLayer();
// mri->SendBroadcast( "LayerEdited", mri );
return false;
}
else
{
return Interactor2D::ProcessMouseUpEvent( event, renderview );
}
}
示例11: HostMain
//*****************************************************************************
//
// This is the main loop that runs the application.
//
//*****************************************************************************
void
HostMain(void)
{
switch(iUSBState)
{
//
// This state is entered when the mouse is first detected.
//
case eStateMouseInit:
{
//
// Initialize the newly connected mouse.
//
USBHMouseInit(g_psMouseInstance);
//
// Proceed to the mouse connected state.
//
iUSBState = eStateMouseConnected;
//
// Update the status on the screen.
//
UpdateStatus(0, 0, true);
//
// Update the cursor on the screen.
//
UpdateCursor(GrContextDpyWidthGet(&g_sContext) / 2,
GrContextDpyHeightGet(&g_sContext)/ 2);
break;
}
case eStateMouseConnected:
{
//
// Nothing is currently done in the main loop when the mouse
// is connected.
//
break;
}
case eStateNoDevice:
{
//
// The mouse is not connected so nothing needs to be done here.
//
break;
}
default:
{
break;
}
}
//
// Periodically call the main loop for the Host controller driver.
//
USBHCDMain();
}
示例12: UpdateCursor
bool Interactor2DNavigate::ProcessMouseUpEvent( QMouseEvent* event, RenderView* renderview )
{
UpdateCursor( event, renderview );
m_bEditing = false;
return Interactor2D::ProcessMouseUpEvent( event, renderview );
}
示例13: MoveCursor
void MoveCursor() {
if (cursor >= _tcslen(buffer))
buffer[cursor + 1] = 0;
lettercursor = FindEntryLetter(ToUpperASCII(buffer[cursor]));
UpdateCursor();
}
示例14: UpdateCursor
void CDragVirtualListCtrl::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_Dragging) {
UpdateCursor(point);
AutoScroll(point);
}
CListCtrl::OnMouseMove(nFlags, point);
}
示例15: UpdateCursor
void EditFrame::SetGeomMode(EnumGeomMode geomMode)
{
if(m_GeomMode != geomMode)
{
m_GeomMode = geomMode;
UpdateCursor();
}
}