void XxMeter::OnPreFlush () { IntVal = CalcIntVal (MaxVal); SetCurVal (CurVal); IntVal = -1; SetCurVal (CurVal); };
XxMeter::XxMeter ( EzString Name , XxDrawable *pParent , int XPos, int YPos , int Width, int Height , int MinVal, int MaxVal , int Dir , int StepSize , int Offset ) : XxVirtual (Name, pParent, XPos, YPos, Width, Height) , OnMap (Name + EzString ("_OnMap"), Width, Height) , OffMap (Name + EzString ("_OffMap"), Width, Height) { XxMeter::MinVal = MinVal; XxMeter::MaxVal = MaxVal; XxMeter::Dir = Dir ^ 2; XxMeter::StepSize = StepSize; XxMeter::Offset = Offset; XxMeter::NrLines = (Dir & 1 ? Width : Height); DrawGC.SetForeground (XxWhite); OnMap.FillRectangle (DrawGC, 0, 0, Width, Height); DrawGC.SetForeground (XxBlack); OffMap.FillRectangle (DrawGC, 0, 0, Width, Height); IntVal = CalcIntVal (MaxVal); SetCurVal (MinVal); };
void SetMaxVal(float max) { xbc_maxVal = max; SetCurVal(xc0_roundedCurVal); }
void SetMinVal(float min) { xb8_minVal = min; SetCurVal(xc0_roundedCurVal); }