+ x->range_text->update_range();
+ y->range_text->update_range();
+ z->range_text->update_range();
+}
+
+CWindowToolAutoRangeTumbler::CWindowToolAutoRangeTumbler(CWindowCoord *coord, int x, int y,
+ int use_max, const char *tip)
+ : BC_Tumbler(x, y, coord->gui->mwindow->theme->get_image_set("auto_range"),
+ TUMBLER_HORZ)
+{
+ this->coord = coord;
+ this->use_max = use_max;
+ set_tooltip(tip);
+}
+
+int CWindowToolAutoRangeTumbler::handle_up_event()
+{
+ coord->gui->mwindow->update_autorange(coord->type, 1, use_max);
+ coord->range_text->update_range();
+ return 1;
+}
+
+int CWindowToolAutoRangeTumbler::handle_down_event()
+{
+ coord->gui->mwindow->update_autorange(coord->type, 0, use_max);
+ coord->range_text->update_range();
+ return 1;
+}
+
+CWindowToolAutoRangeReset::CWindowToolAutoRangeReset(CWindowCoord *coord, int x, int y)
+ : BC_Button(x, y, coord->gui->mwindow->theme->get_image_set("reset_button"))
+{
+ this->coord = coord;
+ set_tooltip(_("Reset"));
+}
+
+int CWindowToolAutoRangeReset::handle_event()
+{
+ float v = 0;
+ int group = Automation::autogrouptype(coord->type, 0);
+ MWindow *mwindow = coord->gui->mwindow;
+ LocalSession *local_session = mwindow->edl->local_session;
+ float min = local_session->automation_mins[group];
+ float max = local_session->automation_maxs[group];
+ switch( group ) {
+ case AUTOGROUPTYPE_ZOOM: // exp
+ min = 0.005; max= 5.000; v = 1;
+ break;
+ case AUTOGROUPTYPE_X:
+ max = mwindow->edl->session->output_w;
+ min = -max;
+ break;
+ case AUTOGROUPTYPE_Y:
+ max = mwindow->edl->session->output_h;
+ min = -max;
+ break;
+ }
+ local_session->automation_mins[group] = min;
+ local_session->automation_maxs[group] = max;
+ coord->range_text->update_range();
+ unlock_window();
+ MWindowGUI *mgui = mwindow->gui;
+ mgui->lock_window("CWindowToolAutoRangeReset::update");
+ int color = GWindowGUI::auto_colors[coord->type];
+ mgui->zoombar->update_autozoom(group, color);
+ mgui->draw_overlays(0);
+ mgui->update_patchbay();
+ mgui->flash_canvas(1);
+ mgui->unlock_window();
+ mwindow->save_backup();
+ lock_window("CWindowToolAutoRangeReset::update");
+ CWindowCoordSlider *slider = coord->slider;
+ slider->update(slider->get_pointer_motion_range(), v, min, max);
+ return slider->handle_event();