int mBarRange::filtreValue(int value)
{
if(value<_min)
+ {
value = _min;
- else if (value>_max)
+ } else if (value>_max) {
value = _max;
-
+ }
return value;
}
-
+//----------------------------------------------------------------------------
int mBarRange::GetStart()
{
return _start;
void mBarRange::SetStart(int newstart)
{
_start = filtreValue(newstart);
- if (_start>_end) { _start=_end; }
+
+ if (_start>_end)
+ {
+ _start=_end;
+ }
+
if (_in_rangeProperty==true)
{
if (_start>_actual) { _start=_actual; }
}
+
RefreshForce();
}
//----------------------------------------------------------------------------
if (_end<_start) { _end=_start; }
if (_in_rangeProperty==true)
{
- if (_end<_actual) { _end=_actual; }
+ if (_end<_actual)
+ {
+ _end=_actual;
+ } // _end
}
RefreshForce();
}
{
return trianglesHalfWidth;
}
+
//----------------------------------------------------------------------------
void mBarRange::SetTrianglesHalfWidth(int nwTriHalfWidth)
{
if(_orientation)
{
SetWidth( rectTotal.GetWidth() - deviceEndMargin );
- }
- else
- {
+ } else {
SetWidth( rectTotal.GetHeight() - deviceEndMargin);
}
_selectionMoveId = -1;
//----------------------------------------------------------------------------
void mBarRange::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
- if (_bitmap_bar!=NULL){
+ if (_bitmap_bar!=NULL)
+ {
//repaint rectangle
if(_orientation)
{
// dc.Blit(0,_w, _h+deviceStart_y+200, _w+deviceStart_x+200-deviceEndMargin, &temp_dc, deviceStart_y,_w+deviceStart_x);
// }
-
}
- }
+ } // _bitmap_bar
}