void ScrollUpdate()
{
AT_MODE nScrollMode;
AT_SCROLL_INFO scroll_info;
if( IG_image_is_valid(hIGear) )
{
IG_dspl_scroll_get( hIGear, IG_GRP_DEFAULT, XtWindow(img_win), &nScrollMode,
&scroll_info );
XtVaSetValues( wHScrollbar,
XmNminimum, 0,
XmNmaximum, scroll_info.h_max - scroll_info.h_min + 10,
XmNsliderSize, 10,
XmNvalue, (int)(scroll_info.h_cur_pos-scroll_info.h_min),
NULL );
XtVaSetValues( wVScrollbar,
XmNminimum, 0,
XmNmaximum, scroll_info.v_max - scroll_info.v_min + 10,
XmNsliderSize, 10,
XmNvalue, (int)(scroll_info.v_cur_pos-scroll_info.v_min),
NULL );
}else
{
XtVaSetValues( wHScrollbar,
XmNminimum, 0,
XmNmaximum, 0,
XmNsliderSize, 10,
XmNvalue, 0,
NULL );
XtVaSetValues( wVScrollbar,
XmNminimum, 0,
XmNmaximum, 0,
XmNsliderSize, 10,
XmNvalue, 0,
NULL );
}}
|