bool IBeamTool::is_mouse_in_end_drag_zone() const { const int end_x = view_window().time_to_x( get_state()->getSelectionEnd()); return (mousePoint.get_x() >= end_x && mousePoint.get_x() < end_x + DragZoneWidth); }
bool IBeamTool::on_scroll_slide_timer() { const Gdk::Rectangle body_rect (get_body_rectangle()); view_window().shift_view (body_rect.get_width(), scrollSlideRate); // Return true to keep the timer going return true; }
bool IBeamTool::is_mouse_in_start_drag_zone() const { const int start_x = view_window().time_to_x( get_state()->getSelectionStart()); return (mousePoint.get_x() <= start_x && mousePoint.get_x() > start_x - DragZoneWidth); }
static int context_hud_handler(window_info *win, int widget_id, int mx, int my, int option) { unsigned char protocol_name; switch (option) { case CMH_MINIMAP: view_window(&minimap_win, 0); break; case CMH_RANGSTATS: view_window(&range_win, 0); break; #ifdef NEW_SOUND case CMH_SOUND: toggle_sounds(&sound_on); set_var_unsaved("enable_sound", INI_FILE_VAR); break; case CMH_MUSIC: toggle_music(&music_on); set_var_unsaved("enable_music", INI_FILE_VAR); break; #endif // NEW_SOUND case CMH_LOCATION: copy_next_LOCATE_ME = 1; protocol_name= LOCATE_ME; my_tcp_send(my_socket,&protocol_name,1); break; default: init_misc_display(); } return 1; }