130 |
#ifdef HAVE_XAW3D |
#ifdef HAVE_XAW3D |
131 |
#include <X11/Xaw3d/Simple.h> |
#include <X11/Xaw3d/Simple.h> |
132 |
#include <X11/Xaw3d/Scrollbar.h> |
#include <X11/Xaw3d/Scrollbar.h> |
133 |
#define ARROW_SCROLLBAR |
#include <X11/Xaw3d/ThreeD.h> |
|
#define XAW_ARROW_SCROLLBARS |
|
|
#include <X11/Xaw3d/ScrollbarP.h> |
|
134 |
#else /* !HAVE_XAW3D */ |
#else /* !HAVE_XAW3D */ |
135 |
#include <X11/Xaw/Simple.h> |
#include <X11/Xaw/Simple.h> |
136 |
#include <X11/Xaw/Scrollbar.h> |
#include <X11/Xaw/Scrollbar.h> |
4545 |
f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; |
f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; |
4546 |
} |
} |
4547 |
|
|
4548 |
|
#ifdef XtNbeNiceToColormap |
4549 |
/* Tell the toolkit about them. */ |
/* Tell the toolkit about them. */ |
4550 |
if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 |
if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 |
4551 |
|| f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) |
|| f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) |
4569 |
pixel = f->output_data.x->scroll_bar_top_shadow_pixel; |
pixel = f->output_data.x->scroll_bar_top_shadow_pixel; |
4570 |
if (pixel != -1) |
if (pixel != -1) |
4571 |
{ |
{ |
4572 |
XtSetArg (av[ac], "topShadowPixel", pixel); |
XtSetArg (av[ac], XtNtopShadowPixel, pixel); |
4573 |
++ac; |
++ac; |
4574 |
} |
} |
4575 |
pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; |
pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; |
4576 |
if (pixel != -1) |
if (pixel != -1) |
4577 |
{ |
{ |
4578 |
XtSetArg (av[ac], "bottomShadowPixel", pixel); |
XtSetArg (av[ac], XtNbottomShadowPixel, pixel); |
4579 |
++ac; |
++ac; |
4580 |
} |
} |
4581 |
} |
} |
4582 |
|
#endif |
4583 |
|
|
4584 |
widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, |
widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, |
4585 |
f->output_data.x->edit_widget, av, ac); |
f->output_data.x->edit_widget, av, ac); |
4725 |
XawScrollbarSetThumb (widget, top, shown); |
XawScrollbarSetThumb (widget, top, shown); |
4726 |
else |
else |
4727 |
{ |
{ |
|
#ifdef HAVE_XAW3D |
|
|
ScrollbarWidget sb = (ScrollbarWidget) widget; |
|
|
int scroll_mode = 0; |
|
|
|
|
|
/* `scroll_mode' only exists with Xaw3d + ARROW_SCROLLBAR. */ |
|
|
if (xaw3d_arrow_scroll) |
|
|
{ |
|
|
/* Xaw3d stupidly ignores resize requests while dragging |
|
|
so we have to make it believe it's not in dragging mode. */ |
|
|
scroll_mode = sb->scrollbar.scroll_mode; |
|
|
if (scroll_mode == 2) |
|
|
sb->scrollbar.scroll_mode = 0; |
|
|
} |
|
|
#endif |
|
4728 |
/* Try to make the scrolling a tad smoother. */ |
/* Try to make the scrolling a tad smoother. */ |
4729 |
if (!xaw3d_pick_top) |
if (!xaw3d_pick_top) |
4730 |
shown = min (shown, old_shown); |
shown = min (shown, old_shown); |
4731 |
|
|
4732 |
XawScrollbarSetThumb (widget, top, shown); |
XawScrollbarSetThumb (widget, top, shown); |
|
|
|
|
#ifdef HAVE_XAW3D |
|
|
if (xaw3d_arrow_scroll && scroll_mode == 2) |
|
|
sb->scrollbar.scroll_mode = scroll_mode; |
|
|
#endif |
|
4733 |
} |
} |
4734 |
} |
} |
4735 |
} |
} |