Definition at line 135 of file IntervalChooser.h. References ClampX(), OglGui::IntervalChooserListener::IntervalChanged(), mEndThumb, mEndVal, mListener, mMaxVal, mMinSizePix, mOldEndX, mOldStartX, mStartThumb, mStartVal, mUserData, NeedleX(), Pixel2Val(), SetNeedleX(), and OglGui::OglWindow::W(). Referenced by DisplayFunc(). 00136 { 00137 int oldStartVal = mStartVal; 00138 int oldEndVal = mEndVal; 00139 int sX = NeedleX(mStartThumb); 00140 int eX = NeedleX(mEndThumb); 00141 00142 ClampX(sX); 00143 ClampX(eX); 00144 if (mOldStartX < sX && sX >= eX-mMinSizePix) 00145 { 00146 if (eX==W()) 00147 sX = eX-mMinSizePix+1; 00148 else 00149 eX = sX+mMinSizePix; 00150 } 00151 else if (mOldEndX > eX && eX <= sX+mMinSizePix) 00152 { 00153 if (sX == 0) 00154 eX = mMinSizePix; 00155 else 00156 sX = eX-mMinSizePix; 00157 } 00158 mOldStartX = sX = SetNeedleX(mStartThumb,sX); 00159 mOldEndX = eX = SetNeedleX(mEndThumb,eX); 00160 mStartVal = Pixel2Val(sX); 00161 mEndVal = mStartVal + Pixel2Val(eX-sX); 00162 00163 if (mEndVal > mMaxVal) 00164 mEndVal = mMaxVal; 00165 00166 if (oldStartVal == mStartVal && oldEndVal == mEndVal) 00167 return; 00168 // printf("%d %d\n", mStartVal, mEndVal); 00169 if (mListener) 00170 mListener->IntervalChanged(this,mStartVal,mEndVal,mUserData); 00171 }
Here is the call graph for this function:
|