void BChannelSlider::_MouseMovedCommon(BPoint point, BPoint point2) { float floatValue = 0; int32 limitRange = MaxLimitList()[fCurrentChannel] - MinLimitList()[fCurrentChannel]; float range = ThumbRangeFor(fCurrentChannel); if (fIsVertical) floatValue = range - (point.y - fMinPoint); else floatValue = range + (point.x - fMinPoint); int32 value = (int32)(floatValue / range * limitRange) + MinLimitList()[fCurrentChannel]; if (fAllChannels) SetAllValue(value); else SetValueFor(fCurrentChannel, value); if (ModificationMessage()) _FinishChange(true); _DrawThumbs(); }
Node::Node(bool isLeaf ,int position,string value) { SetAllValue(isLeaf ,position,value); }