void COSMCtrlMapOperationsDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { //Validate our parameters ASSERT(m_pOSMCtrl != NULL); //Let the base class do its thing CDialog::OnHScroll(nSBCode, nPos, pScrollBar); //Handle the notification if it is from our control AFXASSUME(pScrollBar != NULL); if (pScrollBar->GetSafeHwnd() == m_ctrlZoomLevel.GetSafeHwnd()) { switch (nSBCode) { case TB_BOTTOM: { UpdateZoom(min(COSMCtrl::OSMMaxZoom, static_cast<int>(m_pOSMCtrl->GetZoom()) + 5)); break; } case TB_TOP: { UpdateZoom(static_cast<int>(m_pOSMCtrl->GetZoom())); break; } case TB_LINEUP: case TB_PAGEUP: { UpdateZoom(m_ctrlZoomLevel.GetPos()); break; } case TB_LINEDOWN: case TB_PAGEDOWN: { UpdateZoom(m_ctrlZoomLevel.GetPos()); break; } case TB_THUMBTRACK: //deliberate fallthrough case TB_THUMBPOSITION: { UpdateZoom(nPos); break; } default: { //Nothing to do break; } } } }
void ManageViewScreen::UpdateAll() { UpdateCOR(); UpdatePan(); UpdateZoom(); UpdateRotations(); }
void wxMainToolBar::UpdateToolBar() { UpdateTemp(); // UpdateObject(); UpdateZoom(); // UpdateType(); }
void OsuManiaRenderer::UpdateUserControls(Window& _win) { if (_win.reciever.IsKeyDown(KEY_KEY_Z)) { if (this->isMouseOnObj(_win)) { UpdateZoom(_win); } } }
void TacRefDlg::OnCamZoom(AWEvent* event) { int w = Mouse::Wheel(); if (w < 0) { while (w < 0) { UpdateZoom(1.25); w += 120; } } else { while (w > 0) { UpdateZoom(0.75f); w -= 120; } } UpdateCamera(); }
BOOL COSMCtrlMapOperationsDlg::OnInitDialog() { //Let the base class do its thing CDialog::OnInitDialog(); //Validate our parameters ASSERT(m_pOSMCtrl != NULL); //Setup the various controls int nZoom = static_cast<int>(m_pOSMCtrl->GetZoom()); m_ctrlZoomLevel.SetRange(nZoom, min(COSMCtrl::OSMMaxZoom, nZoom+5), TRUE); //Only allow iteration up to 5 levels of zoom m_ctrlZoomLevel.EnableWindow(nZoom != COSMCtrl::OSMMaxZoom); m_ctrlStopOperation.EnableWindow(FALSE); UpdateZoom(nZoom); return TRUE; }