| 624 | // ---------------------------------------------------------------------------------------- |
| 625 | |
| 626 | scroll_bar:: |
| 627 | scroll_bar( |
| 628 | drawable_window& w, |
| 629 | bar_orientation orientation |
| 630 | ) : |
| 631 | drawable(w), |
| 632 | b1(w), |
| 633 | b2(w), |
| 634 | slider(w,*this,&scroll_bar::on_slider_drag), |
| 635 | ori(orientation), |
| 636 | top_filler(w,*this,&scroll_bar::top_filler_down,&scroll_bar::top_filler_up), |
| 637 | bottom_filler(w,*this,&scroll_bar::bottom_filler_down,&scroll_bar::bottom_filler_up), |
| 638 | pos(0), |
| 639 | max_pos(0), |
| 640 | js(10), |
| 641 | b1_timer(*this,&scroll_bar::b1_down_t), |
| 642 | b2_timer(*this,&scroll_bar::b2_down_t), |
| 643 | top_filler_timer(*this,&scroll_bar::top_filler_down_t), |
| 644 | bottom_filler_timer(*this,&scroll_bar::bottom_filler_down_t) |
| 645 | { |
| 646 | set_style(scroll_bar_style_default()); |
| 647 | |
| 648 | // don't show the slider when there is no place it can move. |
| 649 | slider.hide(); |
| 650 | |
| 651 | set_length(100); |
| 652 | |
| 653 | b1.set_button_down_handler(*this,&scroll_bar::b1_down); |
| 654 | b2.set_button_down_handler(*this,&scroll_bar::b2_down); |
| 655 | |
| 656 | b1.set_button_up_handler(*this,&scroll_bar::b1_up); |
| 657 | b2.set_button_up_handler(*this,&scroll_bar::b2_up); |
| 658 | b1.disable(); |
| 659 | b2.disable(); |
| 660 | enable_events(); |
| 661 | } |
| 662 | |
| 663 | // ---------------------------------------------------------------------------------------- |
| 664 |
nothing calls this directly
no test coverage detected