Represents a class that is responsible for handling all the input for a RadGanttView
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class BaseGanttViewBehavior
Inheritance: objectBaseGanttViewBehavior
Constructors
Initializes a new instance of the BaseGanttViewBehavior class.
public BaseGanttViewBehavior()
Properties
Gets the timer that delays cell editing after a second click.
protected Timer ClickTimer { get; }
Gets or sets the column-header cell whose column is being resized.
protected GanttViewTextViewHeaderCellElement ColumnHeaderCell { get; set; }
Gets or sets whether the current mouse sequence is a double-click, which suppresses cell editing on mouse-up.
protected bool DoubleClick { get; set; }
Gets or sets the existing task link whose endpoint is being edited.
protected GanttViewLinkDataItem EditedLink { get; set; }
Gets or sets the original task endpoint temporarily detached while editing a link.
protected GanttViewDataItem EditedLinkTaskCache { get; set; }
Gets or sets the link type saved before editing, so it can be restored if the edit is canceled.
protected TasksLinkType EditedLinkTypeCache { get; set; }
Gets or sets the graphical task element currently being resized.
protected GanttGraphicalViewBaseTaskElement EditedTaskElement { get; set; }
Gets the mutable list of exact element types that can initiate kinetic scrolling.
public List<Type> ElementsStartingKineticScrolling { get; }
Gets the GanttView element whose input and interaction state this behavior manages.
public RadGanttViewElement GanttViewElement { get; }
Gets or sets the signed horizontal scrollbar increment used on each horizontal auto-scroll timer tick.
public int HorizontalScrollStep { get; set; }
Gets the timer that advances horizontal scrolling while an interaction is dragged beyond the graphical view.
public Timer HorizontalScrollTimer { get; }
Gets or sets whether a new task link is being created by dragging a link handle.
protected bool IsCreatingLink { get; set; }
Gets or sets whether an existing task link endpoint is being edited.
protected bool IsEditingLink { get; set; }
Gets or sets whether a column resize is in progress.
protected bool IsResizingColumn { get; set; }
Gets or sets whether the end edge of a task is being resized.
protected bool IsResizingEnd { get; set; }
Gets or sets whether the start edge of a task is being resized.
protected bool IsResizingStart { get; set; }
Gets or sets the pointer location recorded when a cell press begins.
protected Point MouseDownLocation { get; set; }
Gets or sets the task link being assembled during a link-creation drag.
protected GanttViewLinkDataItem NewLink { get; set; }
Gets or sets the column width captured before resizing, for restoring it if the operation is canceled.
protected int OriginalColumnWidth { get; set; }
Gets or sets the task end time captured before an end-edge resize, for restoring it if the operation is canceled.
protected DateTime OriginalEnd { get; set; }
Gets or sets the task start time captured before a start-edge resize, for restoring it if the operation is canceled.
protected DateTime OriginalStart { get; set; }
Gets or sets whether the current pointer gesture is eligible for kinetic scrolling.
protected bool ShouldProcessKineticScrolling { get; set; }
Gets or sets the signed pointer-offset increment used on each vertical auto-scroll timer tick.
public int VerticalScrollStep { get; set; }
Gets the timer that advances vertical scrolling while an interaction is dragged beyond the graphical view.
public Timer VerticalScrollTimer { get; }
Gets or sets whether the view was already editing when the pointer was pressed.
protected bool WasInEditModeOnMouseDown { get; set; }
Gets or sets whether the task was already selected when the pointer was pressed, which affects second-click editing.
protected bool WasSelectedOnMouseDown { get; set; }
Methods
Advances the horizontal scrollbar by the configured step, extending the timeline by a day when scrolling reaches an edge.
protected virtual void OnHorizontalScrollTimerTick()
Converts the configured pointer offset to a row-scroll change and clamps it to the available vertical range.
protected virtual void OnVerticalScrollTimerTick()
Expands the selected task, if any.
public virtual bool ProcessAddKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Opens the task-specific, control-level, or allowed default context menu at the specified point.
Removes the selected link when the GanttView is not read-only; it does not delete selected tasks.
public virtual bool ProcessDeleteKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Provides a customization hook for double-click handling; the base implementation does not handle the event.
public virtual bool ProcessDoubleClick(MouseEventArgs e)
The mouse event data.
Returns:false in the base implementation.
Selects the next traversed item, or the first item when nothing is selected.
public virtual bool ProcessDownKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Selects the last item reached by the GanttView item traverser.
public virtual bool ProcessEndKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Releases pointer capture and cancels the active resize or edit, restoring the value captured when resizing began.
protected virtual void ProcessEscapeKey(KeyEventArgs e)
The Escape key event data.
Ends the current edit or begins editing the selected item.
public virtual bool ProcessF2Key(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Selects the first item reached by the GanttView item traverser.
public virtual bool ProcessHomeKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Routes supported key-down commands to navigation, expansion, editing, and link-deletion handlers when the view is not editing.
public virtual bool ProcessKeyDown(KeyEventArgs e)
The key event data.
Returns:false in the base implementation so the key event is not marked handled.
Provides an override hook for character input; the base implementation does not handle the key press.
public virtual bool ProcessKeyPress(KeyPressEventArgs e)
The key-press event data.
Returns:false in the base implementation.
Provides an override hook for key release; the base implementation does not handle the event.
public virtual bool ProcessKeyUp(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Moves to the previous column, collapses an expanded selected task, or moves to the previous task.
public virtual bool ProcessLeftKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Provides a customization hook for mouse-click handling; the base implementation does not handle the event.
public virtual bool ProcessMouseClick(MouseEventArgs e)
The mouse event data.
Returns:false in the base implementation.
Coordinates selection, editing, task and column interaction, link operations, and kinetic-scrolling startup for a mouse press.
public virtual bool ProcessMouseDown(MouseEventArgs e)
The mouse event data.
Returns:true if the input is handled; this base implementation returns false.
Ends an active edit when needed, selects the owning task, and records the press state for click-to-edit handling.
protected virtual void ProcessMouseDownOnCellElement(GanttViewTextViewCellElement cellElement, MouseEventArgs e)
The pressed task cell.
eMouseEventArgsThe mouse event data.
For a left-button press, starts resizing the column when the press is on its resize grip; otherwise, starts dragging the header cell.
protected virtual void ProcessMouseDownOnCellHeaderElement(GanttViewTextViewHeaderCellElement element, MouseEventArgs e)
The pressed column-header cell.
eMouseEventArgsThe mouse event data.
For a left-button press on an editable task, starts resizing an edge when its resize grip is pressed, or starts dragging the task otherwise.
protected virtual void ProcessMouseDownOnTaskElement(GanttGraphicalViewBaseTaskElement element, MouseEventArgs e)
The pressed graphical task element.
eMouseEventArgsThe mouse event data.
For a left-button press on an editable view, creates a pending link from the task endpoint represented by the pressed handle.
protected virtual void ProcessMouseDownOnTaskLinkHandleElement(GanttViewTaskLinkHandleElement element, MouseEventArgs e)
The pressed link handle.
eMouseEventArgsThe mouse event data.
For a left-button press on an editable view, temporarily detaches the selected link endpoint so it can be reconnected.
protected virtual void ProcessMouseDownOnTaskLinkHandleElementWhenEditingLink(GanttViewTaskLinkHandleElement element, MouseEventArgs e)
The pressed handle on the selected link.
eMouseEventArgsThe mouse event data.
Updates an active resize or link operation and forwards the pointer movement to kinetic scrolling.
public virtual bool ProcessMouseMove(MouseEventArgs e)
The mouse event data.
Returns:true if the input is handled; this base implementation returns false.
Chooses a candidate task endpoint and link type from the pointer position, then updates the pending link preview.
protected virtual void ProcessMouseMoveWhenCreatingLink(MouseEventArgs e)
The mouse event data.
Updates the detached endpoint and link type from the pointer position, then refreshes the edited link preview.
protected virtual void ProcessMouseMoveWhenEditingLink(MouseEventArgs e)
The mouse event data.
Adjusts the header column width while the pointer is captured for resizing.
protected virtual void ProcessMouseMoveWhenResizingColumn(MouseEventArgs e)
The mouse event data.
Changes the task start or end time, enforces the minimum task width, and updates link lines during a resize.
protected virtual void ProcessMouseMoveWhenResizingTask(GanttGraphicalViewBaseTaskElement element, MouseEventArgs e)
The graphical task element being resized.
eMouseEventArgsThe mouse event data.
Completes the active interaction, releases pointer capture, stops auto-scroll timers, and refreshes the graphical view.
public virtual bool ProcessMouseUp(MouseEventArgs e)
The mouse event data.
Returns:true if the input is handled; this base implementation returns false.
Applies click-to-edit modes when the recorded press point lies within the released task item's bounds and the release is not on an editor, scrollbar, or double-click.
protected virtual void ProcessMouseUpOnCellElement(GanttViewTextViewCellElement cellElement, MouseEventArgs e)
The cell under the release point.
eMouseEventArgsThe mouse event data.
Adds the pending link when released on another task's link handle; otherwise discards the unfinished link.
protected virtual void ProcessMouseUpWhenCreatingLink(MouseEventArgs e)
The mouse event data.
Reconnects the edited endpoint when released on a link handle, or restores the original endpoint and type when canceled.
protected virtual void ProcessMouseUpWhenEditingLink(MouseEventArgs e)
The mouse event data.
Clears the column-resize state after the pointer is released.
protected virtual void ProcessMouseUpWhenResizingColumn(MouseEventArgs e)
The mouse event data.
Clears the task-resize element and edge flags after the pointer is released.
protected virtual void ProcessMouseUpWhenResizingTask(GanttGraphicalViewBaseTaskElement element, MouseEventArgs e)
The graphical task element that was resized.
eMouseEventArgsThe mouse event data.
Scrolls the column or timeline horizontally when Ctrl is held, or the graphical view vertically otherwise.
public virtual bool ProcessMouseWheel(MouseEventArgs e)
The mouse-wheel event data.
Returns:false while editing; otherwise, true to indicate that the wheel event is handled.
Moves to the next column, expands a collapsed selected task, or moves to the next task.
public virtual bool ProcessRightKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Starts or stops edge auto-scrolling according to the pointer's position relative to the graphical view.
Collapses the selected task, if any.
public virtual bool ProcessSubtractKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Selects the previous traversed item, or the first item when nothing is selected.
public virtual bool ProcessUpKey(KeyEventArgs e)
The key event data.
Returns:false in the base implementation.
Enables kinetic scrolling for a left-button press on an element type listed in ElementsStartingKineticScrolling.
protected virtual bool ShouldHandleKineticScrolling(MouseEventArgs e)
The mouse event data.
Returns:true when the pressed element's exact type is in the eligible-type list; otherwise, false.
Determines whether the specified link handle can be used to move an endpoint for the link's current type.
protected virtual bool ShouldStartLinkEditOperation(GanttViewLinkDataItem link, GanttViewTaskLinkHandleElement element)
The selected link being edited.
elementGanttViewTaskLinkHandleElementThe handle that was pressed.
Returns:true when the handle is eligible to start endpoint editing; otherwise, false.
Stops both auto-scroll timers used during pointer interactions.
public virtual void StopScrollTimers()