This function is called by the event handling system everytime the user has moved or clicked the mouse. So if you want a window which reacts to the mouse in a specific way, you can inherit a class from Window. Another method to implement mouse behaviour is to use a window listener (in this case you have to inherit a class from WindowListener and attach it to this window, see WindowListener for more details) Reimplemented from OglGui::Window. Definition at line 324 of file TableWindow.h. References OglGui::ScrollBar::ChangePos(), ColumnCondense(), Impala::Application::MediaTable::TableDataView::DoUpdateSelectionEvent(), GetColumnForX(), GetRowForY(), Impala::Application::MediaTable::TableDataViewController::GetTableDataView(), ILOG_USER, OglGui::ScrollBar::LineIncrement(), Impala::Application::MediaTable::TableDataView::MarkAllRows(), Impala::Application::MediaTable::TableDataView::MarkRange(), Impala::Application::MediaTable::TableDataView::MarkRow(), mAutoZoom, mLastSelectedRow, mMouseX, mMouseY, mShowZoomView, mVertScrollBar, mZoomView, Impala::Application::MediaTable::TableDataViewController::OpenContextMenu(), OglGui::OglWindow::ToTopWindow(), UnZoomRows(), and ZoomRow(). 00325 { 00326 mMouseX = x; mMouseY = y; 00327 int nLine = ((state&oglShift) ? 5 : 1); 00328 if (msg == oglMouseWheelUp) 00329 { 00330 mVertScrollBar->ChangePos(-mVertScrollBar->LineIncrement() * nLine); 00331 ILOG_USER("TableWindow mouse wheel up"); 00332 } 00333 if (msg == oglMouseWheelDown) 00334 { 00335 mVertScrollBar->ChangePos(mVertScrollBar->LineIncrement() * nLine); 00336 ILOG_USER("TableWindow mouse wheel down"); 00337 } 00338 if (!mAutoZoom) 00339 UnZoomRows(); 00340 else //if (!mSelecting) 00341 ZoomRow(GetRowForY(y)); 00342 00343 if (msg == oglMouseEnter && mShowZoomView && mZoomView) 00344 viewSys.SetTags(mZoomView, visibleTag); 00345 if (msg == oglMouseLeave && mShowZoomView && mZoomView) 00346 viewSys.ClearTags(mZoomView, visibleTag); 00347 00348 if (msg == oglMouseDown && but == oglLeftButton) 00349 { 00350 int row = GetRowForY(y); 00351 if (row >= 0) 00352 { 00353 if (state & oglShift && mLastSelectedRow != -1) 00354 { 00355 ILOG_USER("TableWindow shift-select range " << mLastSelectedRow << 00356 " to " << row); 00357 GetTableDataView()->MarkRange(mLastSelectedRow, row, 1, true); 00358 } 00359 else 00360 { 00361 if (!(state & oglControl)) 00362 { 00363 ILOG_USER("TableWindow no ctrl -> unmark all " << row); 00364 GetTableDataView()->MarkAllRows(1, false); // unselect all 00365 } 00366 ILOG_USER("TableWindow mouse click mark row " << row); 00367 GetTableDataView()->MarkRow(row, 1, true, true); 00368 mLastSelectedRow = row; 00369 } 00370 GetTableDataView()->DoUpdateSelectionEvent(); 00371 } 00372 } 00373 00374 00375 ColumnCondense(GetColumnForX(x)); 00376 00377 /* Dragging 00378 if (msg == oglMouseMove && (state & oglLeftButton)) 00379 { 00380 mMouseXE = x; 00381 mMouseYE = y; 00382 if (!mSelecting) 00383 { 00384 mMouseXS = x; 00385 mMouseYS = y; 00386 mSelecting = true; 00387 } 00388 } 00389 if (msg == oglMouseUp && but == oglLeftButton) 00390 { 00391 if (mSelecting) 00392 ILOG_USER("TableWindow drag select finished"); 00393 mSelecting = false; 00394 GetTableDataView()->DoUpdateSelectionEvent(); 00395 }*/ 00396 00397 if (msg == oglMouseDown && but == oglRightButton) 00398 { 00399 ILOG_USER("mouse open right context menu on row " << GetRowForY(y)); 00400 int rx=0, ry=0; 00401 ToTopWindow(this, rx, ry); 00402 OpenContextMenu(rx+x,ry+y); 00403 } 00404 00405 }
Here is the call graph for this function:
|