void float2_param_t::spinbox_moved( double value) { if( proportional_checked()) { Imath::V2f v = get_value<Imath::V2f>( *this); if( sender() == input0_) { float inc = value - v.x; v.x = value; v.y = clamp( v.y + ( inc * proportional_factor.y)); } else { float inc = value - v.y; v.y = value; v.x = clamp( v.x + ( inc * proportional_factor.x)); } set_value( absolute_to_relative( Imath::V2f( round ( v.x), round( v.y)))); update_widgets(); } else set_value( absolute_to_relative( Imath::V2f( round (input0_->value()), round( input1_->value())))); if( track_mouse()) param_set()->notify_parent(); ui::anim_editor_t::Instance().update(); }
void CSimpleGraph::OnMouseMove(UINT nFlags, CPoint point) { CWnd::OnMouseMove(nFlags, point); // Check for hover if no tip window is visible if (!m_tip.IsWindowVisible()) track_mouse(TME_HOVER); else if (get_bar(point) != m_bar && !m_tip.FadingOut()) m_tip.Hide(300); }
void CTipWnd::OnMouseMove(UINT nFlags, CPoint point) { if (m_down) { CPoint pt; GetCursorPos(&pt); pt -= m_down_pt; SetWindowPos(NULL, pt.x, pt.y, -1, -1, SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE); } else if (m_pSLWAfunc != 0) { m_hovering = true; track_mouse(TME_LEAVE); } }
LRESULT CSimpleGraph::OnMouseHover(WPARAM, LPARAM lp) { CPoint pt(LOWORD(lp), HIWORD(lp)); // client window coords CHexEditView *pv = GetView(); ASSERT(pv != NULL); m_bar = get_bar(pt); if (m_bar > -1 && !m_tip.IsWindowVisible()) { // Update the tip info m_tip.Clear(); CString ss; if (theApp.hex_ucase_) ss.Format("Byte: %d [%02.2Xh] %s", m_bar, m_bar, pv->DescChar(m_bar)); else ss.Format("Byte: %d [%02.2xh] %s", m_bar, m_bar, pv->DescChar(m_bar)); m_tip.AddString(ss); char buf[32]; // used with sprintf (CString::Format can't handle __int64) sprintf(buf, "%I64d", m_val[m_bar]); ss = buf; AddCommas(ss); m_tip.AddString("Count: " +ss); // Work out the tip window display position and move the tip window there CPoint tip_pt = pt + CSize(16, 16); ClientToScreen(&tip_pt); m_tip.Move(tip_pt, false); m_tip.Show(); track_mouse(TME_LEAVE); return 0; // return 0 to say we processed it } return 1; }
void float2_param_t::spinbox_released() { param_set()->end_edit( !track_mouse());}