version 1.2, 1996/09/21 06:23:02 |
version 1.3, 1996/10/14 03:55:12 |
|
|
|
|
if (XtIsRealized((Widget) sbw)) |
if (XtIsRealized((Widget) sbw)) |
{ |
{ |
if (thickness * 2 > sbw->scrollbar.length) |
if ((int)thickness * 2 > (int)sbw->scrollbar.length) |
{ |
{ |
size = sbw->scrollbar.length / 2; |
size = sbw->scrollbar.length / 2; |
off = (thickness - size) / 2; |
off = (int)(thickness - size) / 2; |
} |
} |
else |
else |
{ |
{ |
|
|
/* also call Move and Notify if we're already in continuous scroll mode */ |
/* also call Move and Notify if we're already in continuous scroll mode */ |
if (sbw->scrollbar.scroll_mode == SMODE_CONT || |
if (sbw->scrollbar.scroll_mode == SMODE_CONT || |
(loc >= sbw->scrollbar.topLoc && |
(loc >= sbw->scrollbar.topLoc && |
loc <= sbw->scrollbar.topLoc + sbw->scrollbar.shownLength)) |
loc <= sbw->scrollbar.topLoc + (int)sbw->scrollbar.shownLength)) |
{ |
{ |
XtCallActionProc(w, "MoveThumb", event, params, *num_params); |
XtCallActionProc(w, "MoveThumb", event, params, *num_params); |
XtCallActionProc(w, "NotifyThumb", event, params, *num_params); |
XtCallActionProc(w, "NotifyThumb", event, params, *num_params); |
|
|
ExtractPosition(event, &x, &y, &state); |
ExtractPosition(event, &x, &y, &state); |
loc = PICKLENGTH(sbw, x, y); |
loc = PICKLENGTH(sbw, x, y); |
|
|
if (sbw->scrollbar.thickness * 2 > sbw->scrollbar.length) |
if ((int)sbw->scrollbar.thickness * 2 > (int)sbw->scrollbar.length) |
arrow_size = sbw->scrollbar.length / 2; |
arrow_size = sbw->scrollbar.length / 2; |
else |
else |
arrow_size = sbw->scrollbar.thickness; |
arrow_size = sbw->scrollbar.thickness; |
|
|
margin = MARGIN(sbw); |
margin = MARGIN(sbw); |
x -= margin; |
x -= margin; |
y -= margin; |
y -= margin; |
height = sbw->core.height - 2 * margin; |
height = (float)sbw->core.height - 2 * margin; |
width = sbw->core.width - 2 * margin; |
width = (float)sbw->core.width - 2 * margin; |
return PICKLENGTH(sbw, x / width, y / height); |
return PICKLENGTH(sbw, x / width, y / height); |
} |
} |
|
|