Skip to content

Instantly share code, notes, and snippets.

@nsdevaraj
Last active July 17, 2024 08:24
Show Gist options
  • Save nsdevaraj/dc46ea8c5d67767a2f6999fada9d7bca to your computer and use it in GitHub Desktop.
Save nsdevaraj/dc46ea8c5d67767a2f6999fada9d7bca to your computer and use it in GitHub Desktop.
class AppearanceModeProvider {
constructor() {
this.currentMode = 'default';
}
setMode(mode) {
this.currentMode = mode;
this.applyMode();
}
applyMode() {
// Implement the logic to apply the appearance mode
document.body.className = this.currentMode; // Example: change the body's class
}
getMode() {
return this.currentMode;
}
}
class CalendarPeriodSelector extends PeriodSelector {
constructor(calendar) {
super();
this.calendar = calendar;
}
addPeriod(start, end) {
if (this.calendar.isValidDate(start) && this.calendar.isValidDate(end)) {
super.addPeriod(start, end);
}
}
}
class ContentObserverAdapter {
constructor() {
this.callbacks = [];
}
addObserver(callback) {
if (typeof callback === 'function') {
this.callbacks.push(callback);
}
}
removeObserver(callback) {
this.callbacks = this.callbacks.filter(cb => cb !== callback);
}
notifyObservers(event) {
this.callbacks.forEach(callback => callback(event));
}
}
class ContentPresenterAdapter {
constructor(contentElement) {
this.contentElement = contentElement;
}
renderContent(data) {
this.contentElement.innerHTML = ''; // Clear existing content
data.forEach(row => {
const rowElement = document.createElement('div');
rowElement.className = 'content-row';
row.cells.forEach(cell => {
const cellElement = document.createElement('div');
cellElement.className = 'content-cell';
cellElement.innerText = cell.value;
rowElement.appendChild(cellElement);
});
this.contentElement.appendChild(rowElement);
});
}
}
class DayRange {
constructor(startHour, endHour) {
this.startHour = startHour;
this.endHour = endHour;
}
contains(hour) {
return this.startHour <= hour && hour <= this.endHour;
}
overlaps(otherRange) {
return this.startHour <= otherRange.endHour && this.endHour >= otherRange.startHour;
}
}
class DurationTimeIntervalLabelGenerator {
constructor() {
this.timeUnit = 'minutes';
}
generateLabel(start, end) {
const duration = (end - start) / 1000 / 60; // Example: duration in minutes
return `${duration} ${this.timeUnit}`;
}
setTimeUnit(unit) {
this.timeUnit = unit;
}
}
class DurationTimeLabelGenerator {
constructor() {
this.timeUnit = 'minutes';
}
generateLabel(duration) {
return `${duration} ${this.timeUnit}`;
}
setTimeUnit(unit) {
this.timeUnit = unit;
}
}
class EnclosedTimeIntervalSelector extends PeriodSelector {
constructor() {
super();
}
getEnclosedPeriods(start, end) {
return this.periods.filter(period => period.start >= start && period.end <= end);
}
}
class ExcludedTimeIntervalSource {
constructor(excludedIntervals = []) {
this.excludedIntervals = excludedIntervals;
}
addExcludedInterval(interval) {
this.excludedIntervals.push(interval);
}
removeExcludedInterval(interval) {
this.excludedIntervals = this.excludedIntervals.filter(i => i !== interval);
}
isTimeExcluded(time) {
return this.excludedIntervals.some(interval => time >= interval.start && time <= interval.end);
}
}
class FormattedTimeLabelGenerator {
constructor(formatFunction) {
this.formatFunction = formatFunction;
}
generateLabel(time) {
return this.formatFunction(time);
}
}
@init @IBDesignable open class GanttChartContent : AppKit.NSView, GantFW.GanttChartContentObserver, GantFW.GanttChartContentScroller, GantFW.GanttChartContentPresenter, AppKit.NSGestureRecognizerDelegate {
override public init(frame frameRect: Foundation.NSRect)
required public init?(coder decoder: Foundation.NSCoder)
@IBOutlet let scrollView: AppKit.NSScrollView!
@IBOutlet let clipView: AppKit.NSClipView!
public function gestureRecognizer(_: AppKit.NSGestureRecognizer, shouldRecognizeSimultaneouslyWith otherRecognizer: AppKit.NSGestureRecognizer) -> Boolean
let controller: GantFW.GanttChartContentController!
override function prepareForInterfaceBuilder()
override function layout()
public function totalDiagramSizeDidChange()
public function visibleBarsDidChange()
public function visibleDependencyLinesDidChange()
public function highlightedScheduleAreasDidChange()
public function highlightedIntervalAreasDidChange()
public function dependencyLineThumbAreaDidChange()
public function temporaryDependencyLineDidChange()
public function temporaryBarDidChange()
public function settingsDidChange()
function draw(within area: Foundation.NSRect)
public function drawBackground(color: GantFW.Color, size: GantFW.Size)
function drawBackground(color: AppKit.NSColor, size: Foundation.NSSize)
public function drawBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawBorder(in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawBackground(for row: GantFW.Row, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function drawBackground(for row: GantFW.Row, in rectangle: Foundation.NSRect, color: AppKit.NSColor)
public function drawBorder(for row: GantFW.Row, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawBorder(for row: GantFW.Row, in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, color: AppKit.NSColor)
function draw(bar: GantFW.GanttChartBar)
public function drawBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawBar(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, cornerRadius: CoreGraphics.CGFloat, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: AppKit.NSColor, focusColor: AppKit.NSColor, selectionColor: AppKit.NSColor, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, triangleInset: Double, triangleScale: Double, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, triangleInset: CoreGraphics.CGFloat, triangleScale: CoreGraphics.CGFloat, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: AppKit.NSColor, focusColor: AppKit.NSColor, selectionColor: AppKit.NSColor, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: AppKit.NSColor, focusColor: AppKit.NSColor, selectionColor: AppKit.NSColor, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, allowsResizing: Boolean, thumbDistance: Double)
function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, cornerRadius: CoreGraphics.CGFloat, allowsResizing: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font)
function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, alignment: AppKit.NSTextAlignment, font: AppKit.NSFont)
public function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, font: GantFW.Font)
function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, font: AppKit.NSFont)
function draw(dependencyLine: GantFW.GanttChartDependencyLine)
public function drawDependencyLine(for dependency: GantFW.GanttChartDependency, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: Double, focusWidth: Double, selectionWidth: Double)
function drawDependencyLine(for dependency: GantFW.GanttChartDependency, through points: [Foundation.NSPoint], color: AppKit.NSColor, width: CoreGraphics.CGFloat, arrowWidth: CoreGraphics.CGFloat, arrowLength: CoreGraphics.CGFloat, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat)
public function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: GantFW.Point, radius: Double, color: GantFW.Color)
function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: Foundation.NSPoint, radius: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, dashWidth: Double)
function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, through points: [Foundation.NSPoint], color: AppKit.NSColor, width: CoreGraphics.CGFloat, arrowWidth: CoreGraphics.CGFloat, arrowLength: CoreGraphics.CGFloat, dashWidth: CoreGraphics.CGFloat)
public function drawTemporaryBar(in rectangle: GantFW.Rectangle, color: GantFW.Color, cornerRadius: Double, dashWidth: Double)
function drawTemporaryBar(in rectangle: Foundation.NSRect, color: AppKit.NSColor, cornerRadius: CoreGraphics.CGFloat, dashWidth: CoreGraphics.CGFloat)
public function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor)
public function drawTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: Foundation.NSRect, backgroundColor: AppKit.NSColor)
public function drawTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function drawTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, alignment: AppKit.NSTextAlignment, font: AppKit.NSFont, verticalAlignment: GantFW.VerticalTextAlignment)
function mouseMoved(at point: Foundation.NSPoint)
function mouseEntered()
function mouseExited()
function toolTip(for item: GantFW.GanttChartItem) -> String?
function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
public function reloadData()
function scrollTo(startX: Double, finishX: Double)
function scrollVerticallyTo(startY: Double, finishY: Double)
override function menu(for event: AppKit.NSEvent) -> AppKit.NSMenu?
}
public class GanttChartItem {
public init(label: String? = nil, row: GantFW.Row, start: GantFW.Time, finish: GantFW.Time, completion: Double = 0, attachment: String? = nil, details: String? = nil, schedule: GantFW.ScheduleDefinition? = nil, isExpanded: Boolean = true, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartItemType? = nil, style: GantFW.GanttChartItemStyle? = nil, context: Any? = nil)
convenience public init(label: String? = nil, row: GantFW.Row, time: GantFW.Time, attachment: String? = nil, details: String? = nil, schedule: GantFW.ScheduleDefinition? = nil, isExpanded: Boolean = true, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartItemType? = nil, style: GantFW.GanttChartItemStyle? = nil, context: Any? = nil)
let label: String?
let attachment: String?
let details: String?
let row: GantFW.Row
let time: GantFW.TimeRange
let schedule: GantFW.ScheduleDefinition?
let start: GantFW.Time
let finish: GantFW.Time
let isEntropic: Boolean
let isMomentary: Boolean
let completion: Double
let isStarted: Boolean
let isCompleted: Boolean
let isInProgress: Boolean
let type: GantFW.GanttChartItemType
let isStandard: Boolean
let isMilestone: Boolean
let isSummary: Boolean
let isExpanded: Boolean
let zIndex: interval
let isVisible: Boolean
let context: Any?
let settings: GantFW.GanttChartItemSettings
let style: GantFW.GanttChartItemStyle
let hasChanged: Boolean
}
public enum GanttChartItemType : Equatable, Hashable, CaseIterable {
case standard
case milestone
case summary
public static function == (a: GantFW.GanttChartItemType, b: GantFW.GanttChartItemType) -> Boolean
public function hash(into hasher: inout Hasher)
public type AllCases = [GantFW.GanttChartItemType]
public static let allCases: [GantFW.GanttChartItemType]
let hashValue: interval
}
public class GanttChartBar {
let item: GantFW.GanttChartItem
let bounds: GantFW.Rectangle
}
public class GanttChartDependency {
public init(label: String? = nil, from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, details: String? = nil, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartDependencyType? = nil, style: GantFW.GanttChartDependencyStyle? = nil, context: Any? = nil)
let label: String?
let details: String?
let from: GantFW.GanttChartItem
let to: GantFW.GanttChartItem
let fromType: GantFW.GanttChartDependencyEndType
let toType: GantFW.GanttChartDependencyEndType
let type: GantFW.GanttChartDependencyType
let fromTime: GantFW.Time
let toTime: GantFW.Time
let isFromEntropic: Boolean
let isToEntropic: Boolean
let zIndex: interval
let isVisible: Boolean
let context: Any?
let settings: GantFW.GanttChartDependencySettings
let style: GantFW.GanttChartDependencyStyle
let hasChanged: Boolean
}
public enum GanttChartDependencyEndType : Equatable, Hashable, CaseIterable {
case start
case finish
public static function == (a: GantFW.GanttChartDependencyEndType, b: GantFW.GanttChartDependencyEndType) -> Boolean
public function hash(into hasher: inout Hasher)
public type AllCases = [GantFW.GanttChartDependencyEndType]
public static let allCases: [GantFW.GanttChartDependencyEndType]
let hashValue: interval
}
public enum GanttChartDependencyType : Equatable, Hashable, CaseIterable {
case fromFinishToStart
case fromStartToStart
case fromFinishToFinish
case fromStartToFinish
public init(fromType: GantFW.GanttChartDependencyEndType, toType: GantFW.GanttChartDependencyEndType)
let fromType: GantFW.GanttChartDependencyEndType
let toType: GantFW.GanttChartDependencyEndType
let isFromEntropic: Boolean
let isToEntropic: Boolean
public static function == (a: GantFW.GanttChartDependencyType, b: GantFW.GanttChartDependencyType) -> Boolean
public function hash(into hasher: inout Hasher)
public type AllCases = [GantFW.GanttChartDependencyType]
public static let allCases: [GantFW.GanttChartDependencyType]
let hashValue: interval
}
public class GanttChartDependencyLine {
let dependency: GantFW.GanttChartDependency
let polyline: GantFW.Polyline
}
public class OutlineGanttChartViewRow : Identifiable {
public init(id: Foundation.UUID? = nil, label: String? = nil, chartItems: [GantFW.OutlineGanttChartViewItem] = [], children: [GantFW.OutlineGanttChartViewRow] = [], values: [String : Any?] = [:], context: Any? = nil)
let id: Foundation.UUID
let label: String?
let chartItems: [GantFW.OutlineGanttChartViewItem]
let children: [GantFW.OutlineGanttChartViewRow]
let values: [String : Any?]
let context: Any?
public type ID = Foundation.UUID
}
public class OutlineGanttChartViewItem : Identifiable {
public init(id: Foundation.UUID? = nil, label: String? = nil, start: GantFW.Time, finish: GantFW.Time, completion: Double = 0, attachment: String? = nil, details: String? = nil, type: GantFW.GanttChartItemType? = nil, context: Any? = nil)
public init(id: Foundation.UUID? = nil, label: String? = nil, time: GantFW.Time, attachment: String? = nil, details: String? = nil, type: GantFW.GanttChartItemType? = nil, context: Any? = nil)
let id: Foundation.UUID
let label: String?
let start: GantFW.Time
let finish: GantFW.Time
let completion: Double
let attachment: String?
let details: String?
let type: GantFW.GanttChartItemType
let context: Any?
public type ID = Foundation.UUID
}
public class OutlineGanttChartViewDependency : Identifiable {
public init(id: Foundation.UUID? = nil, label: String? = nil, from: GantFW.OutlineGanttChartViewItem, to: GantFW.OutlineGanttChartViewItem, details: String? = nil, type: GantFW.GanttChartDependencyType? = nil, context: Any? = nil)
let id: Foundation.UUID
let label: String?
let from: GantFW.OutlineGanttChartViewItem, to: GantFW.OutlineGanttChartViewItem
let details: String?
let type: GantFW.GanttChartDependencyType
let context: Any?
public type ID = Foundation.UUID
}
public enum OutlineGanttChartViewColumn {
case outline(title: String? = nil, width: Double? = nil, minWidth: Double? = nil, isEditable: Boolean? = nil)
case start(title: String? = nil, width: Double? = nil, minWidth: Double? = nil, isEditable: Boolean? = nil)
case finish(title: String? = nil, width: Double? = nil, minWidth: Double? = nil, isEditable: Boolean? = nil)
case completion(title: String? = nil, width: Double? = nil, minWidth: Double? = nil, alignment: GantFW.TextAlignment? = nil, isEditable: Boolean? = nil)
case attachment(title: String? = nil, width: Double? = nil, minWidth: Double? = nil, isEditable: Boolean? = nil)
case details(title: String? = nil, width: Double? = nil, minWidth: Double? = nil, isEditable: Boolean? = nil)
case value(_: String, title: String? = nil, width: Double? = nil, minWidth: Double? = nil, alignment: GantFW.TextAlignment? = nil, monospacedFont: Boolean? = nil, isEditable: Boolean? = nil)
case custom(getter: (GantFW.OutlineGanttChartViewRow) -> String?, setter: ((GantFW.OutlineGanttChartViewRow, String?) -> Void)? = nil, title: String? = nil, width: Double? = nil, minWidth: Double? = nil, alignment: GantFW.TextAlignment? = nil, monospacedFont: Boolean? = nil)
let title: String
let width: Double?
let minWidth: Double?
let isEditable: Boolean
public static let start: GantFW.OutlineGanttChartViewColumn
public static let finish: GantFW.OutlineGanttChartViewColumn
public static let completion: GantFW.OutlineGanttChartViewColumn
public static let attachment: GantFW.OutlineGanttChartViewColumn
public static let details: GantFW.OutlineGanttChartViewColumn
}
@init @IBDesignable open class GanttChartHeader : AppKit.NSView, GantFW.GanttChartHeaderObserver, GantFW.GanttChartHeaderScroller, GantFW.GanttChartHeaderPresenter {
override public init(frame frameRect: Foundation.NSRect)
required public init?(coder decoder: Foundation.NSCoder)
@IBOutlet let scrollView: AppKit.NSScrollView!
@IBOutlet let clipView: AppKit.NSClipView!
let controller: GantFW.GanttChartHeaderController!
override function prepareForInterfaceBuilder()
override function layout()
public function totalDiagramHeaderSizeDidChange()
public function highlightedScheduleAreasDidChange()
public function cellsDidChange()
public function zoomDidChange()
public function settingsDidChange()
function draw(within area: Foundation.NSRect)
public function drawBackground(color: GantFW.Color, size: GantFW.Size)
function drawBackground(color: AppKit.NSColor, size: Foundation.NSSize)
public function drawBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawBorder(in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor)
public function drawCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: Foundation.NSRect, backgroundColor: AppKit.NSColor)
public function drawCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function drawCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, alignment: AppKit.NSTextAlignment, font: AppKit.NSFont, verticalAlignment: GantFW.VerticalTextAlignment)
function scrollTo(startX: Double, finishX: Double)
}
public class RowRange : Equatable, Hashable {
public init(from first: GantFW.Row = 0, to last: GantFW.Row = 0)
let first: GantFW.Row, last: GantFW.Row
let count: interval
public function contains(_ row: GantFW.Row) -> Boolean
public function intersects(_ range: GantFW.RowRange) -> Boolean
public function intersecting(_ range: GantFW.RowRange) -> GantFW.RowRange?
public static function == (a: GantFW.RowRange, b: GantFW.RowRange) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public type Row = interval
let license: String?
public class GanttChartViewItem : Identifiable {
public init(id: Foundation.UUID? = nil, label: String? = nil, row: GantFW.Row, start: GantFW.Time, finish: GantFW.Time, completion: Double = 0, attachment: String? = nil, details: String? = nil, schedule: GantFW.ScheduleDefinition? = nil, isExpanded: Boolean = true, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartItemType? = nil, style: GantFW.GanttChartItemStyle? = nil, context: Any? = nil)
public init(id: Foundation.UUID? = nil, label: String? = nil, row: GantFW.Row, time: GantFW.Time, attachment: String? = nil, details: String? = nil, schedule: GantFW.ScheduleDefinition? = nil, isExpanded: Boolean = true, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartItemType? = nil, style: GantFW.GanttChartItemStyle? = nil, context: Any? = nil)
let id: Foundation.UUID
let label: String?
let attachment: String?
let details: String?
let row: GantFW.Row
let time: GantFW.TimeRange
let schedule: GantFW.ScheduleDefinition?
let start: GantFW.Time
let finish: GantFW.Time
let completion: Double
let type: GantFW.GanttChartItemType
let isExpanded: Boolean
let zIndex: interval
let isVisible: Boolean
let context: Any?
let settings: GantFW.GanttChartItemSettings
let style: GantFW.GanttChartItemStyle
public type ID = Foundation.UUID
}
public class GanttChartViewDependency : Identifiable {
public init(id: Foundation.UUID? = nil, label: String? = nil, from: Foundation.UUID, to: Foundation.UUID, details: String? = nil, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartDependencyType? = nil, style: GantFW.GanttChartDependencyStyle? = nil, context: Any? = nil)
let id: Foundation.UUID
let label: String?
let details: String?
let from: Foundation.UUID
let to: Foundation.UUID
public function from(considering items: [GantFW.GanttChartViewItem]) -> GantFW.GanttChartViewItem?
public function to(considering items: [GantFW.GanttChartViewItem]) -> GantFW.GanttChartViewItem?
let fromType: GantFW.GanttChartDependencyEndType
let toType: GantFW.GanttChartDependencyEndType
let type: GantFW.GanttChartDependencyType
let zIndex: interval
let isVisible: Boolean
let context: Any?
let settings: GantFW.GanttChartDependencySettings
let style: GantFW.GanttChartDependencyStyle
public type ID = Foundation.UUID
}
@init @IBDesignable open class OutlineGanttChart : AppKit.NSView, AppKit.NSOutlineViewDataSource, GantFW.GanttChartCollectionProvider, GantFW.GanttChartItemHierarchyProvider, GantFW.GanttChartObserver, GantFW.GanttChartContentActivator, GantFW.GanttChartItemObserver {
override public init(frame frameRect: Foundation.NSRect)
required public init?(coder decoder: Foundation.NSCoder)
@IBOutlet let splitView: AppKit.NSSplitView!
@IBOutlet let outlineHeaderSpacingBox: AppKit.NSBox!
@IBOutlet let outlineHeaderSpacingLabel: AppKit.NSTextField!
@IBOutlet let outlineScrollView: AppKit.NSScrollView!
@IBOutlet let outlineClipView: AppKit.NSClipView!
@IBOutlet let outlineView: AppKit.NSOutlineView!
@IBOutlet let ganttChart: GantFW.GanttChart!
override function updateConstraints()
override function layout()
override function prepareForInterfaceBuilder()
let dataSource: GantFW.OutlineGanttChartDataSource!
let schedule: GantFW.ScheduleDefinition
public function schedule(for item: GantFW.GanttChartItem) -> GantFW.ScheduleDefinition
public function applySchedule()
public function applySchedule(for item: GantFW.OutlineGanttChartItem)
let autoApplySchedule: Boolean
let isAutoScheduling: Boolean
let behavior: GantFW.GanttChartItemBehavior?
public function applyBehavior()
public function applyBehavior(for item: GantFW.OutlineGanttChartItem)
let autoApplyBehavior: Boolean
public function outlineView(_ outlineView: AppKit.NSOutlineView, child index: interval, ofItem item: Any?) -> Any
public function outlineView(_ outlineView: AppKit.NSOutlineView, isItemExpandable item: Any) -> Boolean
public function outlineView(_ outlineView: AppKit.NSOutlineView, numberOfChildrenOfItem item: Any?) -> interval
public function outlineView(_ outlineView: AppKit.NSOutlineView, objectValueFor tableColumn: AppKit.NSTableColumn?, byItem item: Any?) -> Any?
public function outlineView(_ outlineView: AppKit.NSOutlineView, setObjectValue object: Any?, for tableColumn: AppKit.NSTableColumn?, byItem item: Any?)
let totalRowCount: interval
let preferredTimeline: GantFW.TimeRange
public function filteredItems(range: GantFW.RowRange, timeline: GantFW.TimeRange) -> [GantFW.GanttChartItem]
public function filteredDependencies(range: GantFW.RowRange, timeline: GantFW.TimeRange) -> [GantFW.GanttChartDependency]
let availableItems: [GantFW.GanttChartItem]?
let availableDependencies: [GantFW.GanttChartDependency]?
public function regionalItems(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
let areOutOfRowRangeItemsAvailable: Boolean
public function parent(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItem?
public function children(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
let isPagingEnabled: Boolean
let minPageSize: interval?
let minPageCount: interval
public function reloadData()
public function scrollRowToVisible(_ row: interval)
public function scrollColumnToVisible(_ column: interval)
public function imageData(using fileType: AppKit.NSBitmapImageRep.FileType = .png, properties: [AppKit.NSBitmapImageRep.PropertyKey : Any] = [:]) -> Foundation.Data
public function headerHeightDidChange()
public function headerTimelineDidChange()
public function activate(bar: GantFW.GanttChartBar)
public function activate(dependencyLine: GantFW.GanttChartDependencyLine)
public function activate(position: GantFW.GanttChartPosition)
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange)
public function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double)
public function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row)
public function itemWasAdded(_ item: GantFW.GanttChartItem)
public function itemWasRemoved(_ item: GantFW.GanttChartItem)
public function dependencyWasAdded(_ dependency: GantFW.GanttChartDependency)
public function dependencyWasRemoved(_ dependency: GantFW.GanttChartDependency)
public function expansionDidChange(for item: GantFW.GanttChartItem)
public function zIndexDidChange(for item: GantFW.GanttChartItem)
public function zIndexDidChange(for dependency: GantFW.GanttChartDependency)
public function visibilityDidChange(for item: GantFW.GanttChartItem)
public function visibilityDidChange(for dependency: GantFW.GanttChartDependency)
public function ganttChartItem(for outlineChartItem: GantFW.OutlineGanttChartItem) -> GantFW.GanttChartItem?
public function ganttChartDependency(for outlineChartDependency: GantFW.OutlineGanttChartDependency) -> GantFW.GanttChartDependency?
let ganttChartObserver: GantFW.GanttChartObserver?
let ganttChartContentActivator: GantFW.GanttChartContentActivator?
let ganttChartItemObserver: GantFW.GanttChartItemObserver?
}
public protocol OutlineGanttChartDataSource : Any {
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, child index: interval, ofItem item: GantFW.OutlineGanttChartRow?) -> GantFW.OutlineGanttChartRow
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, isItemExpandable item: GantFW.OutlineGanttChartRow) -> Boolean
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, numberOfChildrenOfItem item: GantFW.OutlineGanttChartRow?) -> interval
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, objectValueFor tableColumn: AppKit.NSTableColumn?, byItem item: GantFW.OutlineGanttChartRow?) -> Any?
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, setObjectValue object: Any?, for tableColumn: AppKit.NSTableColumn?, byItem item: GantFW.OutlineGanttChartRow?)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, dependenciesFor items: [GantFW.OutlineGanttChartItem]) -> [GantFW.OutlineGanttChartDependency]
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, timeDidChangeFor item: GantFW.OutlineGanttChartItem, from originalValue: GantFW.TimeRange)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, completionDidChangeFor item: GantFW.OutlineGanttChartItem, from originalValue: Double)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, rowDidChangeFor item: GantFW.OutlineGanttChartItem, from originalRow: GantFW.OutlineGanttChartRow, to newRow: GantFW.OutlineGanttChartRow)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didAddItem item: GantFW.OutlineGanttChartItem, to row: GantFW.OutlineGanttChartRow)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didRemoveItem item: GantFW.OutlineGanttChartItem, from row: GantFW.OutlineGanttChartRow)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didAddDependency dependency: GantFW.OutlineGanttChartDependency)
function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didRemoveDependency dependency: GantFW.OutlineGanttChartDependency)
}
extension GantFW.OutlineGanttChartDataSource {
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, setObjectValue object: Any?, for tableColumn: AppKit.NSTableColumn?, byItem item: GantFW.OutlineGanttChartRow?)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, dependenciesFor items: [GantFW.OutlineGanttChartItem]) -> [GantFW.OutlineGanttChartDependency]
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, timeDidChangeFor item: GantFW.OutlineGanttChartItem, from originalValue: GantFW.TimeRange)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, completionDidChangeFor item: GantFW.OutlineGanttChartItem, from originalValue: Double)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, rowDidChangeFor item: GantFW.OutlineGanttChartItem, from originalRow: GantFW.OutlineGanttChartRow, to newRow: GantFW.OutlineGanttChartRow)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didAddItem item: GantFW.OutlineGanttChartItem, to row: GantFW.OutlineGanttChartRow)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didRemoveItem item: GantFW.OutlineGanttChartItem, from row: GantFW.OutlineGanttChartRow)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didAddDependency dependency: GantFW.OutlineGanttChartDependency)
public function outlineGanttChart(_ outlineGanttChart: GantFW.OutlineGanttChart, didRemoveDependency dependency: GantFW.OutlineGanttChartDependency)
}
public class GanttChartHeaderRow {
public init(_ selectors: [GantFW.TimeSelector])
public init(_ selector: GantFW.TimeSelector)
let selectors: [GantFW.TimeSelector]
let styleSelector: GantFW.GanttChartHeaderCellStyleSelector?
let cellStyle: GantFW.TimeAreaStyle?
let context: Any?
}
public protocol GanttChartHeaderCellStyleSelector {
function style(for time: GantFW.TimeRange, on selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow) -> GantFW.TimeAreaStyle?
}
public class GanttChartHeaderCellStyleSource : GantFW.GanttChartHeaderCellStyleSelector {
public init(function: @escaping GantFW.GanttChartHeaderCellStyleFunction)
let function: GantFW.GanttChartHeaderCellStyleFunction
public function style(for time: GantFW.TimeRange, on selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow) -> GantFW.TimeAreaStyle?
}
public type GanttChartHeaderCellStyleFunction = (GantFW.TimeRange, GantFW.TimeSelector, GantFW.GanttChartHeaderRow) -> GantFW.TimeAreaStyle?
public class GanttChartHeaderCell {
let row: GantFW.GanttChartHeaderRow
let area: GantFW.TimeArea
}
extension GantFW.GanttChartHeaderRow {
public init(_ intervalType: GantFW.TimeIntervalType, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ intervalType: GantFW.TimeIntervalType, format: GantFW.TimeLabelFormat, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ intervalType: GantFW.TimeIntervalType, format: String, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ intervalType: GantFW.TimeIntervalType, dateStyle: Foundation.DateFormatter.Style? = nil, timeStyle: Foundation.DateFormatter.Style? = nil, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ intervalType: GantFW.TimeIntervalType, formatter: Foundation.DateFormatter, intervals: Boolean? = nil, separator: String? = nil)
public init(_ intervalType: GantFW.TimeIntervalType, labelGenerator: GantFW.TimeLabelGenerator?)
}
public class OutlineGanttChartRow {
public init(label: String? = nil, chartItems: [GantFW.OutlineGanttChartItem], details: String? = nil, context: Any? = nil)
let label: String?
let details: String?
let chartItems: [GantFW.OutlineGanttChartItem]
let context: Any?
let hasChanged: Boolean
}
public class OutlineGanttChartItem {
public init(label: String? = nil, start: GantFW.Time, finish: GantFW.Time, completion: Double = 0, attachment: String? = nil, details: String? = nil, schedule: GantFW.ScheduleDefinition? = nil, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartItemType? = nil, style: GantFW.GanttChartItemStyle? = nil, context: Any? = nil)
convenience public init(label: String? = nil, time: GantFW.Time, attachment: String? = nil, details: String? = nil, schedule: GantFW.ScheduleDefinition? = nil, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartItemType? = nil, style: GantFW.GanttChartItemStyle? = nil, context: Any? = nil)
let label: String?
let attachment: String?
let details: String?
let time: GantFW.TimeRange
let schedule: GantFW.ScheduleDefinition?
let start: GantFW.Time
let finish: GantFW.Time
let isEntropic: Boolean
let isMomentary: Boolean
let completion: Double
let isStarted: Boolean
let isCompleted: Boolean
let isInProgress: Boolean
let type: GantFW.GanttChartItemType
let isStandard: Boolean
let isMilestone: Boolean
let isSummary: Boolean
let zIndex: interval
let isVisible: Boolean
let context: Any?
let settings: GantFW.GanttChartItemSettings
let style: GantFW.GanttChartItemStyle
let hasChanged: Boolean
}
public class OutlineGanttChartDependency {
public init(label: String? = nil, from: GantFW.OutlineGanttChartItem, to: GantFW.OutlineGanttChartItem, details: String? = nil, zIndex: interval = 0, isVisible: Boolean = true, type: GantFW.GanttChartDependencyType? = nil, style: GantFW.GanttChartDependencyStyle? = nil, context: Any? = nil)
let label: String?
let details: String?
let from: GantFW.OutlineGanttChartItem
let to: GantFW.OutlineGanttChartItem
let fromType: GantFW.GanttChartDependencyEndType
let toType: GantFW.GanttChartDependencyEndType
let type: GantFW.GanttChartDependencyType
let fromTime: GantFW.Time
let toTime: GantFW.Time
let isFromEntropic: Boolean
let isToEntropic: Boolean
let zIndex: interval
let isVisible: Boolean
let context: Any?
let settings: GantFW.GanttChartDependencySettings
let style: GantFW.GanttChartDependencyStyle
let hasChanged: Boolean
}
open class GanttChartItemManager : GantFW.GanttChartItemFactory {
public init(collectionProvider: GantFW.GanttChartCollectionProvider? = nil, schedule: GantFW.ScheduleDefinition? = nil, behavior: GantFW.GanttChartItemBehavior? = nil)
let range: GantFW.RowRange
let timeline: GantFW.TimeRange
let totalRowCount: interval
open let sourceTotalRowCount: interval
let preferredTimeline: GantFW.TimeRange
open let sourcePreferredTimeline: GantFW.TimeRange
let filteredItems: [GantFW.GanttChartItem]
open let sourceFilteredItems: [GantFW.GanttChartItem]
let filteredDependencies: [GantFW.GanttChartDependency]
open let sourceFilteredDependencies: [GantFW.GanttChartDependency]
let schedule: GantFW.ScheduleDefinition
public function schedule(for item: GantFW.GanttChartItem) -> GantFW.ScheduleDefinition
let behavior: GantFW.GanttChartItemBehavior?
let maxBehaviorRecursivity: interval
open let availableItems: [GantFW.GanttChartItem]
open let availableDependencies: [GantFW.GanttChartDependency]
function regionalItems(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
public function addNewItem(on row: GantFW.Row, at time: GantFW.Time, isMilestone: Boolean = false) -> GantFW.GanttChartItem
public function removeItem(_ item: GantFW.GanttChartItem)
function addNewSourceItem(row: GantFW.Row, time: GantFW.Time, isMilestone: Boolean = false) -> GantFW.GanttChartItem
function removeSourceItem(_ item: GantFW.GanttChartItem)
function createSourceItem(row: GantFW.Row, time: GantFW.Time, isMilestone: Boolean = false) -> GantFW.GanttChartItem
public function addNewDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType = .fromFinishToStart) -> GantFW.GanttChartDependency
public function removeDependency(_ dependency: GantFW.GanttChartDependency)
function addNewSourceDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType = .fromFinishToStart) -> GantFW.GanttChartDependency
function removeSourceDependency(_ dependency: GantFW.GanttChartDependency)
function createSourceDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType = .fromFinishToStart) -> GantFW.GanttChartDependency
public function scheduledDuration(for item: GantFW.GanttChartItem) -> Foundation.TimeInterval
public function scheduledDuration(for item: GantFW.GanttChartItem, in unit: GantFW.TimeUnit) -> Double
public function completedDuration(for item: GantFW.GanttChartItem) -> Foundation.TimeInterval
public function completedDuration(for item: GantFW.GanttChartItem, in unit: GantFW.TimeUnit) -> Double
public function timeCompletedUntil(for item: GantFW.GanttChartItem) -> GantFW.Time
public function updateTime(for item: GantFW.GanttChartItem, toStartOn value: GantFW.Time)
public function updateDuration(for item: GantFW.GanttChartItem, toFinishOn value: GantFW.Time, preservingCompletedDuration: Boolean)
public function updateDuration(for item: GantFW.GanttChartItem, toStartOn value: GantFW.Time, preservingCompletedDuration: Boolean)
public function updateCompletion(for item: GantFW.GanttChartItem, until value: GantFW.Time)
public function updateRow(for item: GantFW.GanttChartItem, to value: GantFW.Row)
public function updateExpansion(for item: GantFW.GanttChartItem, to value: Boolean)
public function expand(item: GantFW.GanttChartItem)
public function collapse(item: GantFW.GanttChartItem)
public function updateZIndex(for item: GantFW.GanttChartItem, to value: interval)
public function bringToFront(item: GantFW.GanttChartItem)
public function sendToBack(item: GantFW.GanttChartItem)
public function bringToFront(dependency: GantFW.GanttChartDependency)
public function sendToBack(dependency: GantFW.GanttChartDependency)
public function show(item: GantFW.GanttChartItem)
public function hide(item: GantFW.GanttChartItem)
public function show(dependency: GantFW.GanttChartDependency)
public function hide(dependency: GantFW.GanttChartDependency)
public function applySchedule(for item: GantFW.GanttChartItem)
public function applySchedule()
public function applyBehavior(forTimeOf item: GantFW.GanttChartItem)
public function applyBehavior(forCompletionOf item: GantFW.GanttChartItem)
public function applyBehavior(forRowOf item: GantFW.GanttChartItem)
public function applyBehaviorUpdates(forRowOf item: GantFW.GanttChartItem)
public function applyBehavior(forExpansionStateOf item: GantFW.GanttChartItem)
public function applyBehaviorUpdates(forExpansionStateOf item: GantFW.GanttChartItem)
public function applyBehavior(for item: GantFW.GanttChartItem)
public function applyBehavior()
public function performUpdates(_ updates: [GantFW.GanttChartItemUpdateAction])
public function collectionDidChange()
public function clearCache()
let collectionObserver: GantFW.GanttChartCollectionObserver?
let collectionProvider: GantFW.GanttChartCollectionProvider?
let itemFactory: GantFW.GanttChartItemFactory?
let actualItemFactory: GantFW.GanttChartItemFactory
let itemObserver: GantFW.GanttChartItemObserver?
}
public enum GanttChartItemUpdateAction {
case updateTime(item: GantFW.GanttChartItem, value: GantFW.TimeRange, up: Boolean, down: Boolean)
case updateCompletion(item: GantFW.GanttChartItem, value: Double, up: Boolean, down: Boolean)
case updateRow(item: GantFW.GanttChartItem, value: GantFW.Row)
case updateVisibility(item: GantFW.GanttChartItem, value: Boolean)
public static function updateTimeAction(for item: GantFW.GanttChartItem, to value: GantFW.TimeRange, up: Boolean = true, down: Boolean = true) -> GantFW.GanttChartItemUpdateAction
public static function updateCompletionAction(for item: GantFW.GanttChartItem, to value: Double, up: Boolean = true, down: Boolean = true) -> GantFW.GanttChartItemUpdateAction
public static function updateRowAction(for item: GantFW.GanttChartItem, to value: GantFW.Row) -> GantFW.GanttChartItemUpdateAction
public static function updateVisibilityAction(for item: GantFW.GanttChartItem, to value: Boolean) -> GantFW.GanttChartItemUpdateAction
}
public protocol GanttChartCollectionObserver : Any {
function totalRowCountDidChange()
function preferredTimelineDidChange()
function filteredItemsDidChange()
function filteredDependenciesDidChange()
function collectionDidChange()
}
extension GantFW.GanttChartCollectionObserver {
public function totalRowCountDidChange()
public function preferredTimelineDidChange()
public function filteredItemsDidChange()
public function filteredDependenciesDidChange()
public function collectionDidChange()
}
public protocol GanttChartCollectionProvider : Any {
let totalRowCount: interval { get }
let preferredTimeline: GantFW.TimeRange { get }
function filteredItems(range: GantFW.RowRange, timeline: GantFW.TimeRange) -> [GantFW.GanttChartItem]
function filteredDependencies(range: GantFW.RowRange, timeline: GantFW.TimeRange) -> [GantFW.GanttChartDependency]
let availableItems: [GantFW.GanttChartItem]? { get }
let availableDependencies: [GantFW.GanttChartDependency]? { get }
function regionalItems(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
}
extension GantFW.GanttChartCollectionProvider {
let availableItems: [GantFW.GanttChartItem]?
let availableDependencies: [GantFW.GanttChartDependency]?
public function regionalItems(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
}
public protocol GanttChartItemFactory : Any {
function createItem(row: GantFW.Row, time: GantFW.Time, isMilestone: Boolean) -> GantFW.GanttChartItem
function createDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType) -> GantFW.GanttChartDependency
}
extension GantFW.GanttChartItemFactory {
public function createItem(row: GantFW.Row, time: GantFW.Time, isMilestone: Boolean) -> GantFW.GanttChartItem
public function createDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType) -> GantFW.GanttChartDependency
}
public protocol GanttChartItemObserver : Any {
function itemWasAdded(_: GantFW.GanttChartItem)
function itemWasRemoved(_: GantFW.GanttChartItem)
function dependencyWasAdded(_: GantFW.GanttChartDependency)
function dependencyWasRemoved(_: GantFW.GanttChartDependency)
function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange)
function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double)
function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row)
function expansionDidChange(for item: GantFW.GanttChartItem)
function zIndexDidChange(for item: GantFW.GanttChartItem)
function zIndexDidChange(for dependency: GantFW.GanttChartDependency)
function visibilityDidChange(for item: GantFW.GanttChartItem)
function visibilityDidChange(for dependency: GantFW.GanttChartDependency)
}
extension GantFW.GanttChartItemObserver {
public function itemWasAdded(_: GantFW.GanttChartItem)
public function itemWasRemoved(_: GantFW.GanttChartItem)
public function dependencyWasAdded(_: GantFW.GanttChartDependency)
public function dependencyWasRemoved(_: GantFW.GanttChartDependency)
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange)
public function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double)
public function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row)
public function expansionDidChange(for item: GantFW.GanttChartItem)
public function zIndexDidChange(for item: GantFW.GanttChartItem)
public function zIndexDidChange(for dependency: GantFW.GanttChartDependency)
public function visibilityDidChange(for item: GantFW.GanttChartItem)
public function visibilityDidChange(for dependency: GantFW.GanttChartDependency)
}
public class GanttChartItemSource : GantFW.GanttChartItemManager {
public init(items: [GantFW.GanttChartItem]? = nil, dependencies: [GantFW.GanttChartDependency]? = nil, schedule: GantFW.ScheduleDefinition? = nil, behavior: GantFW.GanttChartItemBehavior? = nil)
let items: [GantFW.GanttChartItem]
let dependencies: [GantFW.GanttChartDependency]
override let sourceTotalRowCount: interval
override let sourcePreferredTimeline: GantFW.TimeRange
override let sourceFilteredItems: [GantFW.GanttChartItem]
override let sourceFilteredDependencies: [GantFW.GanttChartDependency]
override open let availableItems: [GantFW.GanttChartItem]
override open let availableDependencies: [GantFW.GanttChartDependency]
override function regionalItems(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
override public function addNewSourceItem(row: GantFW.Row, time: GantFW.Time, isMilestone: Boolean = false) -> GantFW.GanttChartItem
override public function removeSourceItem(_ item: GantFW.GanttChartItem)
override public function addNewSourceDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType = .fromFinishToStart) -> GantFW.GanttChartDependency
override public function removeSourceDependency(_ dependency: GantFW.GanttChartDependency)
let isColumn: Boolean
public function parent(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItem?
public function children(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]?
public function addHierarchicalRelations(parent: GantFW.GanttChartItem, items: [GantFW.GanttChartItem])
public function addHierarchicalRelation(parent: GantFW.GanttChartItem, item: GantFW.GanttChartItem)
public function removeHierarchicalRelations(parent: GantFW.GanttChartItem, items: [GantFW.GanttChartItem])
public function removeHierarchicalRelation(parent: GantFW.GanttChartItem, item: GantFW.GanttChartItem)
public function removeFromHierarchy(item: GantFW.GanttChartItem)
let hierarchicalRelations: [GantFW.GanttChartItemHierarchicalRelation]?
let hierarchy: GantFW.GanttChartItemHierarchy?
let isAutoScheduling: Boolean
public function lag(for dependency: GantFW.GanttChartDependency) -> Foundation.TimeInterval?
public function setLag(for dependency: GantFW.GanttChartDependency, to value: Foundation.TimeInterval)
public function removeLag(from dependency: GantFW.GanttChartDependency)
let lags: [GantFW.GanttChartDependencyLagDefinition]?
let lagSet: GantFW.GanttChartDependencyLagSet?
public function constraints(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItemConstraints?
public function setConstraints(for item: GantFW.GanttChartItem, to value: GantFW.GanttChartItemConstraints)
public function removeConstraints(from item: GantFW.GanttChartItem)
let constraints: [GantFW.GanttChartItemConstraintDefinition]?
let constraintSet: GantFW.GanttChartItemConstraintSet?
let managedBehaviorSet: GantFW.GanttChartItemBehaviorSet
public function acceptChanges()
}
public enum Mode : Equatable, Hashable {
case light, dark
public static function == (a: GantFW.Mode, b: GantFW.Mode) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public protocol ModeProvider : Any {
let mode: GantFW.Mode { get }
}
public enum GanttChartElement {
case bar(item: GantFW.GanttChartItem, action: GantFW.GanttChartBarElementAction, allowsDeleting: Boolean)
case dependencyLine(dependency: GantFW.GanttChartDependency, allowsDeleting: Boolean)
case emptyArea(position: GantFW.GanttChartPosition, allowsCreating: Boolean, allowsMilestone: Boolean)
}
public enum GanttChartBarElementAction : Equatable, Hashable {
case none
case move
case resize, resizeAtStart
case resizeCompletion
case createDependencyLine, createDependencyLineFromStart
case moveVertically
public static function == (a: GantFW.GanttChartBarElementAction, b: GantFW.GanttChartBarElementAction) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class GanttChartPosition : Equatable, Hashable {
let row: GantFW.Row
let time: GantFW.Time
public static function == (a: GantFW.GanttChartPosition, b: GantFW.GanttChartPosition) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum GanttChartDraggingOperation {
case scrolling(from: GantFW.Point)
case movingBar(item: GantFW.GanttChartItem, span: Foundation.TimeInterval)
case resizingBar(item: GantFW.GanttChartItem, span: Foundation.TimeInterval)
case resizingBarAtStart(item: GantFW.GanttChartItem, span: Foundation.TimeInterval)
case resizingCompletionBar(item: GantFW.GanttChartItem, span: Foundation.TimeInterval)
case creatingDependencyLine(from: GantFW.GanttChartItem, fromType: GantFW.GanttChartDependencyEndType)
case movingBarVertically(item: GantFW.GanttChartItem)
}
public enum GanttChartDraggingCompletion {
case wouldCreateDependencyLine(to: GantFW.GanttChartItem, toType: GantFW.GanttChartDependencyEndType)
}
public class GanttChartDependencyLineThumbArea {
let item: GantFW.GanttChartItem
let type: GantFW.GanttChartDependencyEndType
let bounds: GantFW.Rectangle
let center: GantFW.Point
let radius: Double
}
public class GanttChartTemporaryDependencyLine {
let from: GantFW.GanttChartItem
let fromType: GantFW.GanttChartDependencyEndType
let to: GantFW.GanttChartItem?
let toType: GantFW.GanttChartDependencyEndType
let polyline: GantFW.Polyline
}
public class GanttChartTemporaryBar {
let bounds: GantFW.Rectangle
}
public class Rectangle : Equatable, Hashable {
public init(origin: GantFW.Point = Point(), size: GantFW.Size = Size())
public init(x: Double, y: Double, width: Double, height: Double)
public init(left: Double, top: Double, right: Double, bottom: Double)
let origin: GantFW.Point
let size: GantFW.Size
let topLeft: GantFW.Point
let topRight: GantFW.Point
let bottomLeft: GantFW.Point
let bottomRight: GantFW.Point
let left: Double
let right: Double
let top: Double
let bottom: Double
let width: Double
let height: Double
let centerX: Double
let centerY: Double
let centerLeft: GantFW.Point
let centerRight: GantFW.Point
let topCenter: GantFW.Point
let bottomCenter: GantFW.Point
let center: GantFW.Point
public function borderLine(position: GantFW.BorderPosition) -> GantFW.Line
public function movedBy(dx: Double = 0, dy: Double = 0) -> GantFW.Rectangle
public function insetBy(dx: Double = 0, dy: Double = 0) -> GantFW.Rectangle
public function insetBy(_ value: Double) -> GantFW.Rectangle
public function insetBy(dxLeft: Double = 0, dxRight: Double = 0, dyTop: Double = 0, dyBottom: Double = 0) -> GantFW.Rectangle
public function contains(_ point: GantFW.Point) -> Boolean
public function intersects(_ rectangle: GantFW.Rectangle) -> Boolean
public function intersects(_ line: GantFW.Line) -> Boolean
public function intersecting(_ rectangle: GantFW.Rectangle) -> GantFW.Rectangle?
public function unioning(_ rectangle: GantFW.Rectangle) -> GantFW.Rectangle
public static function == (a: GantFW.Rectangle, b: GantFW.Rectangle) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public type Polyline = [GantFW.Point]
public class Point : Equatable, Hashable {
public init(x: Double = 0, y: Double = 0)
let x: Double, y: Double
public static let origin: GantFW.Point
public function movedBy(dx: Double = 0, dy: Double = 0) -> GantFW.Point
public function isContained(in rectangle: GantFW.Rectangle) -> Boolean
public function isClose(to rectangle: GantFW.Rectangle, maxDx: Double, maxDy: Double) -> Boolean
public function isClose(to polyline: GantFW.Polyline, maxDistance: Double) -> Boolean
public function isClose(to line: GantFW.Line, maxDistance: Double) -> Boolean
public function isClose(to point: GantFW.Point, maxDistance: Double) -> Boolean
public function distance(to line: GantFW.Line) -> Double
public function distance(to point: GantFW.Point) -> Double
public static function == (a: GantFW.Point, b: GantFW.Point) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
extension Array where Element == GantFW.Point {
let lines: [GantFW.Line]
}
public class Line : Equatable, Hashable {
public init(from p1: GantFW.Point, to p2: GantFW.Point)
public init(x1: Double, y1: Double, x2: Double, y2: Double)
let p1: GantFW.Point, p2: GantFW.Point
let x1: Double
let y1: Double
let x2: Double
let y2: Double
let isHorizontal: Boolean
let isVertical: Boolean
let length: Double
public static function == (a: GantFW.Line, b: GantFW.Line) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class Size : Equatable, Hashable {
public init(width: Double = 0, height: Double = 0)
let width: Double, height: Double
public static let zero: GantFW.Size
public function increasedBy(dx: Double = 0, dy: Double = 0) -> GantFW.Size
public static function == (a: GantFW.Size, b: GantFW.Size) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class Color : Equatable, Hashable {
public init(red: Double = 0, green: Double = 0, blue: Double = 0, alpha: Double = 1)
public init(_ code: String)
let red: Double, green: Double, blue: Double, alpha: Double
public static let black: GantFW.Color
public static let red: GantFW.Color
public static let green: GantFW.Color
public static let blue: GantFW.Color
public static let cyan: GantFW.Color
public static let yellow: GantFW.Color
public static let magenta: GantFW.Color
public static let white: GantFW.Color
public static let darkRed: GantFW.Color
public static let darkGreen: GantFW.Color
public static let darkBlue: GantFW.Color
public static let teal: GantFW.Color
public static let brown: GantFW.Color
public static let purple: GantFW.Color
public static let gray: GantFW.Color
public static let silver: GantFW.Color
public static let orange: GantFW.Color
public static let lightBlue: GantFW.Color
public static let highlight: GantFW.Color
public static let alternative: GantFW.Color
public static let dark: GantFW.Color
public static function == (a: GantFW.Color, b: GantFW.Color) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum TextAlignment : Equatable, Hashable {
case left, center, right
public static function == (a: GantFW.TextAlignment, b: GantFW.TextAlignment) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum VerticalTextAlignment : Equatable, Hashable {
case top, center
public static function == (a: GantFW.VerticalTextAlignment, b: GantFW.VerticalTextAlignment) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class Border : Equatable, Hashable {
public init(_ position: GantFW.BorderPosition, color: GantFW.Color? = nil, lineWidth: Double? = nil)
let position: GantFW.BorderPosition
let color: GantFW.Color?
let lineWidth: Double?
public static function == (a: GantFW.Border, b: GantFW.Border) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum BorderPosition : Equatable, Hashable, CaseIterable {
case top, bottom
case left, right
public static function == (a: GantFW.BorderPosition, b: GantFW.BorderPosition) -> Boolean
public function hash(into hasher: inout Hasher)
public type AllCases = [GantFW.BorderPosition]
public static let allCases: [GantFW.BorderPosition]
let hashValue: interval
}
public class Font : Equatable, Hashable {
public init(name: String? = nil, size: Double? = nil)
let name: String?
let size: Double?
public static let system: GantFW.Font
public static function == (a: GantFW.Font, b: GantFW.Font) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum Cursor : Equatable, Hashable {
case moveHorizontally, moveVertically
case resizeHorizontally, resizeVertically
case draw
public static function == (a: GantFW.Cursor, b: GantFW.Cursor) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
open class ScheduleDefinition {
public init(provider: GantFW.ScheduleDefinitionProvider? = nil)
open let weekInterval: GantFW.WeekRange
open let dayInterval: GantFW.DayRange
function excludedIntervals(for time: GantFW.Time, towards limit: GantFW.Time) -> [GantFW.TimeRange]
open let hasExcludedIntervals: Boolean
let provider: GantFW.ScheduleDefinitionProvider?
public function nextTime(for time: GantFW.Time) -> GantFW.Time
public function previousTime(for time: GantFW.Time) -> GantFW.Time
public function nextTimeout(for time: GantFW.Time) -> GantFW.Time
public function previousTimeout(for time: GantFW.Time) -> GantFW.Time
public function duration(from start: GantFW.Time, to finish: GantFW.Time) -> Foundation.TimeInterval
public function duration(from start: GantFW.Time, to finish: GantFW.Time, in unit: GantFW.TimeUnit) -> Double
public function duration(of interval: GantFW.TimeRange) -> Foundation.TimeInterval
public function duration(of interval: GantFW.TimeRange, in unit: GantFW.TimeUnit) -> Double
public function finish(from start: GantFW.Time, for duration: Foundation.TimeInterval) -> GantFW.Time
public function finish(from start: GantFW.Time, for duration: Double, in unit: GantFW.TimeUnit) -> GantFW.Time
public function start(to finish: GantFW.Time, for duration: Foundation.TimeInterval) -> GantFW.Time
public function start(to finish: GantFW.Time, for duration: Double, in unit: GantFW.TimeUnit) -> GantFW.Time
public function rounding(_ time: GantFW.Time, on scale: GantFW.TimeScale) -> GantFW.Time
public function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
public function timeouts(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
let hoursPerDay: Double
let daysPerWeek: interval
let hoursPerWeek: Double
let dayDuration: Double
let weekDuration: Double
let isFullDay: Boolean
let isFullWeek: Boolean
let isContinuous: Boolean
public function isContinuous(during interval: GantFW.TimeRange) -> Boolean
public function intersecting(_ definition: GantFW.ScheduleDefinition) -> GantFW.ScheduleIntersection?
public function optionallyIntersecting(_ definition: GantFW.ScheduleDefinition?) -> GantFW.ScheduleDefinition
}
public protocol ScheduleDefinitionProvider : Any , GantFW.ExcludedTimeIntervalProvider {
let weekInterval: GantFW.WeekRange { get }
let dayInterval: GantFW.DayRange { get }
}
public protocol ExcludedTimeIntervalProvider {
function excludedIntervals(for time: GantFW.Time, towards limit: GantFW.Time) -> [GantFW.TimeRange]
}
public class ExcludedTimeIntervalSource : GantFW.ExcludedTimeIntervalProvider {
public init(function: @escaping GantFW.ExcludedTimeIntervalsFunction)
let function: GantFW.ExcludedTimeIntervalsFunction
public function excludedIntervals(for time: GantFW.Time, towards limit: GantFW.Time) -> [GantFW.TimeRange]
}
public type ExcludedTimeIntervalsFunction = (GantFW.Time, GantFW.Time) -> [GantFW.TimeRange]
public class Schedule : GantFW.ScheduleDefinition {
public init(weekInterval: GantFW.WeekRange? = nil, dayInterval: GantFW.DayRange? = nil, excludedIntervals: [GantFW.TimeRange]? = nil, excludedIntervalProvider: GantFW.ExcludedTimeIntervalProvider? = nil)
final let excludedIntervals: [GantFW.TimeRange]
final let excludedIntervalProvider: GantFW.ExcludedTimeIntervalProvider?
override let weekInterval: GantFW.WeekRange
override let dayInterval: GantFW.DayRange
override public function excludedIntervals(for time: GantFW.Time, towards limit: GantFW.Time) -> [GantFW.TimeRange]
override let hasExcludedIntervals: Boolean
}
extension GantFW.ScheduleDefinition {
public static let continuous: GantFW.Schedule
public static let standard: GantFW.Schedule
public static let fullWeek: GantFW.Schedule
public static let fullDay: GantFW.Schedule
}
public class ScheduleIntersection : GantFW.ScheduleDefinition {
public init?(_ definitions: [GantFW.ScheduleDefinition])
convenience public init?(_ definitions: GantFW.ScheduleDefinition...)
final let definitions: [GantFW.ScheduleDefinition]
override let weekInterval: GantFW.WeekRange
override let dayInterval: GantFW.DayRange
override public function excludedIntervals(for time: GantFW.Time, towards limit: GantFW.Time) -> [GantFW.TimeRange]
override let hasExcludedIntervals: Boolean
}
extension GantFW.WeekRange {
public static let continuous: GantFW.WeekRange
public static let standard: GantFW.WeekRange
}
extension GantFW.DayRange {
public static let continuous: GantFW.DayRange
public static let standard: GantFW.DayRange
}
extension Double {
public init(from value: Double, in unit: GantFW.TimeUnit, for schedule: GantFW.ScheduleDefinition)
public function value(in unit: GantFW.TimeUnit, for schedule: GantFW.ScheduleDefinition) -> Double
}
@init @IBDesignable open class GanttChart : AppKit.NSView, GantFW.GanttChartObserver, GantFW.GanttChartScroller, GantFW.GanttChartPresenter {
override public init(frame frameRect: Foundation.NSRect)
required public init?(coder decoder: Foundation.NSCoder)
@IBOutlet let header: GantFW.GanttChartHeader!
@IBOutlet let content: GantFW.GanttChartContent!
let controller: GantFW.GanttChartController!
override function prepareForInterfaceBuilder()
public function headerHeightDidChange()
public function headerTimelineDidChange()
public function drawHeaderBackground(color: GantFW.Color, size: GantFW.Size)
function drawHeaderBackground(color: AppKit.NSColor, size: Foundation.NSSize)
public function drawHeaderBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawHeaderBorder(in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawContentBackground(color: GantFW.Color, size: GantFW.Size)
function drawContentBackground(color: AppKit.NSColor, size: Foundation.NSSize)
public function drawContentBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawContentBorder(in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawBackground(for row: GantFW.Row, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function drawBackground(for row: GantFW.Row, in rectangle: Foundation.NSRect, color: AppKit.NSColor)
public function drawBorder(for row: GantFW.Row, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawBorder(for row: GantFW.Row, in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, color: AppKit.NSColor)
function draw(bar: GantFW.GanttChartBar)
public function drawBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawBar(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, cornerRadius: CoreGraphics.CGFloat, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: AppKit.NSColor, focusColor: AppKit.NSColor, selectionColor: AppKit.NSColor, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, triangleInset: Double, triangleScale: Double, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, triangleInset: CoreGraphics.CGFloat, triangleScale: CoreGraphics.CGFloat, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: AppKit.NSColor, focusColor: AppKit.NSColor, selectionColor: AppKit.NSColor, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: AppKit.NSColor, focusColor: AppKit.NSColor, selectionColor: AppKit.NSColor, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, allowsResizing: Boolean, thumbDistance: Double)
function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor, secondaryFillColor: AppKit.NSColor, strokeColor: AppKit.NSColor?, strokeWidth: CoreGraphics.CGFloat, cornerRadius: CoreGraphics.CGFloat, allowsResizing: Boolean, thumbDistance: CoreGraphics.CGFloat)
public function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font)
function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, alignment: AppKit.NSTextAlignment, font: AppKit.NSFont)
public function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, font: GantFW.Font)
function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, font: AppKit.NSFont)
function draw(dependencyLine: GantFW.GanttChartDependencyLine)
public function drawDependencyLine(for dependency: GantFW.GanttChartDependency, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: Double, focusWidth: Double, selectionWidth: Double)
function drawDependencyLine(for dependency: GantFW.GanttChartDependency, through points: [Foundation.NSPoint], color: AppKit.NSColor, width: CoreGraphics.CGFloat, arrowWidth: CoreGraphics.CGFloat, arrowLength: CoreGraphics.CGFloat, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: CoreGraphics.CGFloat, focusWidth: CoreGraphics.CGFloat, selectionWidth: CoreGraphics.CGFloat)
public function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: GantFW.Point, radius: Double, color: GantFW.Color)
function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: Foundation.NSPoint, radius: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, dashWidth: Double)
function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, through points: [Foundation.NSPoint], color: AppKit.NSColor, width: CoreGraphics.CGFloat, arrowWidth: CoreGraphics.CGFloat, arrowLength: CoreGraphics.CGFloat, dashWidth: CoreGraphics.CGFloat)
public function drawTemporaryBar(in rectangle: GantFW.Rectangle, color: GantFW.Color, cornerRadius: Double, dashWidth: Double)
function drawTemporaryBar(in rectangle: Foundation.NSRect, color: AppKit.NSColor, cornerRadius: CoreGraphics.CGFloat, dashWidth: CoreGraphics.CGFloat)
public function drawHeaderTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawHeaderTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor)
public function drawContentTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawContentTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: Foundation.NSRect, fillColor: AppKit.NSColor)
public function drawHeaderCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawHeaderCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: Foundation.NSRect, backgroundColor: AppKit.NSColor)
public function drawHeaderCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawHeaderCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawHeaderCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function drawHeaderCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, alignment: AppKit.NSTextAlignment, font: AppKit.NSFont, verticalAlignment: GantFW.VerticalTextAlignment)
public function drawContentTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawContentTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: Foundation.NSRect, backgroundColor: AppKit.NSColor)
public function drawContentTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawContentTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: Foundation.NSRect, p1: Foundation.NSPoint, p2: Foundation.NSPoint, lineWidth: CoreGraphics.CGFloat, color: AppKit.NSColor)
public function drawContentTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function drawContentTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: Foundation.NSRect, text: String, foregroundColor: AppKit.NSColor, alignment: AppKit.NSTextAlignment, font: AppKit.NSFont, verticalAlignment: GantFW.VerticalTextAlignment)
function toolTip(for item: GantFW.GanttChartItem) -> String?
function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
public function reloadData()
public function scrollTo(startX: Double, finishX: Double)
public function scrollVerticallyTo(startY: Double, finishY: Double)
public function imageData(using fileType: AppKit.NSBitmapImageRep.FileType = .png, properties: [AppKit.NSBitmapImageRep.PropertyKey : Any] = [:]) -> Foundation.Data
let observer: GantFW.GanttChartObserver?
}
public class GanttChartContentSettings {
let showsLabels: Boolean
let showsToolTips: Boolean
let showsCompletionBars: Boolean
let showsCompletionBarsForSummaryItems: Boolean
let showsDependencyLines: Boolean
let drawsVerticallyEndingDependencyLinesWhenApplicable: Boolean
let drawsDependencyLinesSpanningHorizontalDistancePrimarilyOnSourceRow: Boolean
let allowsZooming: Boolean
let allowsActivatingBars: Boolean
let allowsActivatingDependencyLines: Boolean
let activationTogglesExpansionForSummaryItems: Boolean
let allowsMovingBars: Boolean
let allowsMovingBarsForType: [GantFW.GanttChartItemType : Boolean]
public function allowsMovingBar(for item: GantFW.GanttChartItem) -> Boolean
let allowsResizingBars: Boolean
let allowsResizingBarsForType: [GantFW.GanttChartItemType : Boolean]
public function allowsResizingBar(for item: GantFW.GanttChartItem) -> Boolean
let allowsResizingBarsAtStart: Boolean
let allowsResizingBarsAtStartForType: [GantFW.GanttChartItemType : Boolean]
public function allowsResizingBarAtStart(for item: GantFW.GanttChartItem) -> Boolean
let allowsMovingBarsVertically: Boolean
let allowsMovingBarsVerticallyForType: [GantFW.GanttChartItemType : Boolean]
public function allowsMovingBarVertically(for item: GantFW.GanttChartItem) -> Boolean
let allowsResizingCompletionBars: Boolean
let allowsResizingCompletionBarsForType: [GantFW.GanttChartItemType : Boolean]
public function allowsResizingCompletionBar(for item: GantFW.GanttChartItem) -> Boolean
let preservesCompletedDurationUponResizingBars: Boolean
let allowsUpdatingZIndexes: Boolean
let allowsCreatingBars: Boolean
let allowsCreatingMilestones: Boolean
let allowsDeletingBars: Boolean
let allowsDeletingBarsForType: [GantFW.GanttChartItemType : Boolean]
public function allowsDeletingBar(for item: GantFW.GanttChartItem) -> Boolean
let allowsCreatingDependencyLines: Boolean
let allowsCreatingDependencyLinesForType: [GantFW.GanttChartItemType : Boolean]
public function allowsCreatingDependencyLines(from item: GantFW.GanttChartItem) -> Boolean
public function allowsCreatingDependencyLines(to item: GantFW.GanttChartItem) -> Boolean
let allowsCreatingDependencyLinesFromStart: Boolean
let allowsCreatingDependencyLinesToFinish: Boolean
let allowsCreatingDependencyLinesFromStartToFinishOnly: Boolean
let allowsDeletingDependencyLines: Boolean
let allowsDeletingDependencyLinesForType: [GantFW.GanttChartItemType : Boolean]
public function allowsDeletingDependencyLines(from item: GantFW.GanttChartItem) -> Boolean
public function allowsDeletingDependencyLines(to item: GantFW.GanttChartItem) -> Boolean
public function allowsDeletingDependencyLine(for dependency: GantFW.GanttChartDependency) -> Boolean
let isReadOnly: Boolean
let isTypeReadOnly: [GantFW.GanttChartItemType : Boolean]
let editsNewlyCreatedItems: Boolean
let editsNewlyCreatedDependencies: Boolean
let allowsSelectingElements: Boolean
let allowsEditingElements: Boolean
let allowsEditingItems: Boolean
let allowsEditingDependencies: Boolean
let selectsNewlyCreatedElements: Boolean
let selectsEditedElements: Boolean
let minBarWidth: Double
let temporaryBarWidth: Double?
let resizingBarAreaWidth: Double
let movingBarVerticallyAreaHeightRatio: Double
let creatingDependencyLineFinishEndWidthRatio: Double
let maxBarHoveringDistance: Double
let maxLineHoveringDistance: Double
let numberOfClicksRequiredToActivateElements: interval
let alternativeRowsOnCount: Boolean
let autoScrollMargin: Double
let autoScrollInterval: Double
let autoShiftsScrollableTimelineBy: Foundation.TimeInterval?
let usesCache: Boolean
let defaultStyle: GantFW.GanttChartContentBaseStyle
let style: GantFW.GanttChartContentStyle
let actualStyle: GantFW.GanttChartContentBaseStyle
let strings: GantFW.GanttChartContentStrings
}
public class GanttChartContentBaseStyle {
let backgroundColor: GantFW.Color?
let borders: [GantFW.Border]
let borderColor: GantFW.Color
let borderLineWidth: Double
let rowBorderColor: GantFW.Color
let rowBorderLineWidth: Double
let barFillColor: GantFW.Color
let barFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function barFillColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let secondaryBarFillColor: GantFW.Color?
let secondaryBarFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function secondaryBarFillColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let barStrokeColor: GantFW.Color?
let barStrokeColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function barStrokeColor(for item: GantFW.GanttChartItem) -> GantFW.Color?
let barStrokeWidth: Double
let barStrokeWidthForType: [GantFW.GanttChartItemType : Double]
public function barStrokeWidth(for item: GantFW.GanttChartItem) -> Double
let completionBarFillColor: GantFW.Color
let completionBarFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function completionBarFillColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let secondaryCompletionBarFillColor: GantFW.Color?
let secondaryCompletionBarFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function secondaryCompletionBarFillColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let completionBarStrokeColor: GantFW.Color?
let completionBarStrokeColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function completionBarStrokeColor(for item: GantFW.GanttChartItem) -> GantFW.Color?
let completionBarStrokeWidth: Double
let completionBarStrokeWidthForType: [GantFW.GanttChartItemType : Double]
public function completionBarStrokeWidth(for item: GantFW.GanttChartItem) -> Double
let cornerRadius: Double
let completionCornerRadius: Double?
let verticalBarInset: Double
let horizontalCompletionBarInset: Double
let verticalCompletionBarInset: Double
let focusColor: GantFW.Color?
let focusColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function focusColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let focusWidth: Double
let focusWidthForType: [GantFW.GanttChartItemType : Double]
public function focusWidth(for item: GantFW.GanttChartItem) -> Double
let highlightColor: GantFW.Color?
let highlightColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function highlightColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let highlightWidth: Double
let highlightWidthForType: [GantFW.GanttChartItemType : Double]
public function highlightWidth(for item: GantFW.GanttChartItem) -> Double
let selectionColor: GantFW.Color?
let selectionColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function selectionColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let selectionWidth: Double
let selectionWidthForType: [GantFW.GanttChartItemType : Double]
public function selectionWidth(for item: GantFW.GanttChartItem) -> Double
let labelForegroundColor: GantFW.Color
let labelForegroundColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function labelForegroundColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let labelAlignment: GantFW.TextAlignment
let labelFont: GantFW.Font
public function labelFont(for item: GantFW.GanttChartItem) -> GantFW.Font
let horizontalLabelInset: Double
let milestoneHorizontalLabelInset: Double
let verticalLabelInset: Double
let attachmentForegroundColor: GantFW.Color
public function attachmentForegroundColor(for item: GantFW.GanttChartItem) -> GantFW.Color
let attachmentFont: GantFW.Font
public function attachmentFont(for item: GantFW.GanttChartItem) -> GantFW.Font
let horizontalAttachmentInset: Double
let verticalAttachmentInset: Double
let barThumbDistance: Double
let summaryTriangleInset: Double
let summaryTriangleScale: Double
let temporaryBarColor: GantFW.Color?
let temporaryBarDashWidth: Double
let dependencyLineColor: GantFW.Color?
public function dependencyLineColor(for dependency: GantFW.GanttChartDependency) -> GantFW.Color
let dependencyLineWidth: Double
public function dependencyLineWidth(for dependency: GantFW.GanttChartDependency) -> Double
let dependencyLineFocusWidth: Double
let dependencyLineHighlightWidth: Double
let dependencyLineSelectionWidth: Double
let dependencyLineThumbColor: GantFW.Color?
let dependencyLineThumbRadius: Double
let dependencyLineArrowWidth: Double
let dependencyLineArrowLength: Double
let dependencyLineEndLength: Double
let temporaryInvalidDependencyLineColor: GantFW.Color?
let temporaryDependencyLineColor: GantFW.Color?
let temporaryDependencyLineDashWidth: Double
let isTimeAreaBackgroundExtending: Boolean
let areTimeAreaBordersExtending: Boolean
let timeAreaBorders: [GantFW.Border]
let timeAreaBorderColor: GantFW.Color
let timeAreaBorderLineWidth: Double
let timeAreaForegroundColor: GantFW.Color
let timeLabelAlignment: GantFW.TextAlignment
let timeLabelFont: GantFW.Font
let verticalTimeLabelAlignment: GantFW.VerticalTextAlignment
let horizontalTimeLabelInset: Double
let verticalTimeLabelInset: Double
let rowStyleSelector: GantFW.GanttChartRowStyleSelector?
let rowStyle: GantFW.GanttChartRowStyle
let alternativeRowStyle: GantFW.GanttChartRowStyle
let alternativeRows: Boolean
let itemStyleSelector: GantFW.GanttChartItemStyleSelector?
let dependencyStyleSelector: GantFW.GanttChartDependencyStyleSelector?
let highlightingTimeFillColor: GantFW.Color
let highlightingTimeoutFillColor: GantFW.Color
let timeAreaStyleSelector: GantFW.TimeAreaStyleSelector?
let timeAreaStyle: GantFW.TimeAreaStyle?
let regionalBackgroundColor: GantFW.Color?
let regionalBackgroundColorForType: [GantFW.GanttChartItemType : GantFW.Color]
public function regionalBackgroundColor(for item: GantFW.GanttChartItem) -> GantFW.Color?
let regionalBackgroundInset: Double
}
public class GanttChartContentStyle {
let backgroundColor: GantFW.Color?
let borders: [GantFW.Border]?
let borderColor: GantFW.Color?
let borderLineWidth: Double?
let rowBorderColor: GantFW.Color?
let rowBorderLineWidth: Double?
let barFillColor: GantFW.Color?
let barFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let secondaryBarFillColor: GantFW.Color?
let secondaryBarFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let barStrokeColor: GantFW.Color?
let barStrokeColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let barStrokeWidth: Double?
let barStrokeWidthForType: [GantFW.GanttChartItemType : Double]
let completionBarFillColor: GantFW.Color?
let completionBarFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let secondaryCompletionBarFillColor: GantFW.Color?
let secondaryCompletionBarFillColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let completionBarStrokeColor: GantFW.Color?
let completionBarStrokeColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let completionBarStrokeWidth: Double?
let completionBarStrokeWidthForType: [GantFW.GanttChartItemType : Double]
let cornerRadius: Double?
let completionCornerRadius: Double?
let verticalBarInset: Double?
let horizontalCompletionBarInset: Double?
let verticalCompletionBarInset: Double?
let focusColor: GantFW.Color?
let focusColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let focusWidth: Double?
let focusWidthForType: [GantFW.GanttChartItemType : Double]
let highlightColor: GantFW.Color?
let highlightColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let highlightWidth: Double?
let highlightWidthForType: [GantFW.GanttChartItemType : Double]
let selectionColor: GantFW.Color?
let selectionColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let selectionWidth: Double?
let selectionWidthForType: [GantFW.GanttChartItemType : Double]
let labelForegroundColor: GantFW.Color?
let labelForegroundColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let labelAlignment: GantFW.TextAlignment?
let labelFont: GantFW.Font?
let horizontalLabelInset: Double?
let milestoneHorizontalLabelInset: Double?
let verticalLabelInset: Double?
let attachmentForegroundColor: GantFW.Color?
let attachmentFont: GantFW.Font?
let horizontalAttachmentInset: Double?
let verticalAttachmentInset: Double?
let barThumbDistance: Double?
let summaryTriangleInset: Double?
let summaryTriangleScale: Double?
let temporaryBarColor: GantFW.Color?
let temporaryBarDashWidth: Double?
let dependencyLineColor: GantFW.Color?
let dependencyLineWidth: Double?
let dependencyLineFocusWidth: Double?
let dependencyLineHighlightWidth: Double?
let dependencyLineSelectionWidth: Double?
let dependencyLineThumbColor: GantFW.Color?
let dependencyLineThumbRadius: Double?
let dependencyLineArrowWidth: Double?
let dependencyLineArrowLength: Double?
let dependencyLineEndLength: Double?
let temporaryInvalidDependencyLineColor: GantFW.Color?
let temporaryDependencyLineColor: GantFW.Color?
let temporaryDependencyLineDashWidth: Double?
let isTimeAreaBackgroundExtending: Boolean?
let areTimeAreaBordersExtending: Boolean?
let timeAreaBorders: [GantFW.Border]?
let timeAreaBorderColor: GantFW.Color?
let timeAreaBorderLineWidth: Double?
let timeAreaForegroundColor: GantFW.Color?
let timeLabelAlignment: GantFW.TextAlignment?
let timeLabelFont: GantFW.Font?
let verticalTimeLabelAlignment: GantFW.VerticalTextAlignment?
let horizontalTimeLabelInset: Double?
let verticalTimeLabelInset: Double?
let rowStyleSelector: GantFW.GanttChartRowStyleSelector?
let rowStyle: GantFW.GanttChartRowStyle?
let alternativeRowStyle: GantFW.GanttChartRowStyle?
let alternativeRows: Boolean?
let itemStyleSelector: GantFW.GanttChartItemStyleSelector?
let dependencyStyleSelector: GantFW.GanttChartDependencyStyleSelector?
let highlightingTimeFillColor: GantFW.Color?
let highlightingTimeoutFillColor: GantFW.Color?
let timeAreaStyleSelector: GantFW.TimeAreaStyleSelector?
let timeAreaStyle: GantFW.TimeAreaStyle?
let regionalBackgroundColor: GantFW.Color?
let regionalBackgroundColorForType: [GantFW.GanttChartItemType : GantFW.Color]
let regionalBackgroundInset: Double?
public function applyingTo(_ base: GantFW.GanttChartContentBaseStyle) -> GantFW.GanttChartContentBaseStyle
}
public class GanttChartRowStyle : Equatable, Hashable {
public init(backgroundColor: GantFW.Color? = nil)
let backgroundColor: GantFW.Color?
let borders: [GantFW.Border]?
public static function == (a: GantFW.GanttChartRowStyle, b: GantFW.GanttChartRowStyle) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public protocol GanttChartRowStyleSelector {
function style(for row: GantFW.Row) -> GantFW.GanttChartRowStyle?
}
public class GanttChartRowStyleSource : GantFW.GanttChartRowStyleSelector {
public init(function: @escaping GantFW.GanttChartRowStyleFunction)
let function: GantFW.GanttChartRowStyleFunction
public function style(for row: GantFW.Row) -> GantFW.GanttChartRowStyle?
}
public type GanttChartRowStyleFunction = (GantFW.Row) -> GantFW.GanttChartRowStyle?
public class GanttChartItemSettings : Equatable, Hashable {
let isHighlighted: Boolean
let allowsMovingBar: Boolean
let allowsResizingBar: Boolean
let allowsResizingBarAtStart: Boolean
let allowsMovingBarVertically: Boolean
let allowsResizingCompletionBar: Boolean
let allowsDeletingBar: Boolean
let allowsCreatingDependencyLinesTo: Boolean
let allowsCreatingDependencyLinesFrom: Boolean
let allowsDeletingDependencyLinesTo: Boolean
let allowsDeletingDependencyLinesFrom: Boolean
let isReadOnly: Boolean
let style: GantFW.GanttChartItemStyle
public static function == (a: GantFW.GanttChartItemSettings, b: GantFW.GanttChartItemSettings) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class GanttChartItemStyle : Equatable, Hashable {
public init(barFillColor: GantFW.Color? = nil)
let barFillColor: GantFW.Color?
let secondaryBarFillColor: GantFW.Color?
let barStrokeColor: GantFW.Color?
let barStrokeWidth: Double?
let completionBarFillColor: GantFW.Color?
let secondaryCompletionBarFillColor: GantFW.Color?
let completionBarStrokeColor: GantFW.Color?
let completionBarStrokeWidth: Double?
let labelForegroundColor: GantFW.Color?
let labelFont: GantFW.Font?
let attachmentForegroundColor: GantFW.Color?
let attachmentFont: GantFW.Font?
let regionalBackgroundColor: GantFW.Color?
public static function == (a: GantFW.GanttChartItemStyle, b: GantFW.GanttChartItemStyle) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public protocol GanttChartItemStyleSelector {
function style(for item: GantFW.GanttChartItem) -> GantFW.GanttChartItemStyle?
}
public class GanttChartItemStyleSource : GantFW.GanttChartItemStyleSelector {
public init(function: @escaping GantFW.GanttChartItemStyleFunction)
let function: GantFW.GanttChartItemStyleFunction
public function style(for item: GantFW.GanttChartItem) -> GantFW.GanttChartItemStyle?
}
public type GanttChartItemStyleFunction = (GantFW.GanttChartItem) -> GantFW.GanttChartItemStyle?
public class GanttChartDependencySettings : Equatable, Hashable {
let isHighlighted: Boolean
let allowsDeletingDependencyLine: Boolean
let isReadOnly: Boolean
let style: GantFW.GanttChartDependencyStyle
public static function == (a: GantFW.GanttChartDependencySettings, b: GantFW.GanttChartDependencySettings) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class GanttChartDependencyStyle : Equatable, Hashable {
public init(lineColor: GantFW.Color? = nil, lineWidth: Double? = nil)
let lineColor: GantFW.Color?
let lineWidth: Double?
public static function == (a: GantFW.GanttChartDependencyStyle, b: GantFW.GanttChartDependencyStyle) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public protocol GanttChartDependencyStyleSelector {
function style(for dependency: GantFW.GanttChartDependency) -> GantFW.GanttChartDependencyStyle?
}
public class GanttChartDependencyStyleSource : GantFW.GanttChartDependencyStyleSelector {
public init(function: @escaping GantFW.GanttChartDependencyStyleFunction)
let function: GantFW.GanttChartDependencyStyleFunction
public function style(for dependency: GantFW.GanttChartDependency) -> GantFW.GanttChartDependencyStyle?
}
public type GanttChartDependencyStyleFunction = (GantFW.GanttChartDependency) -> GantFW.GanttChartDependencyStyle?
public class GanttChartContentStrings : Equatable, Hashable {
let createItem: String
let createMilestoneItem: String
let editItem: String
let deleteItem: String
let deleteMilestoneItem: String
let editDependency: String
let deleteDependency: String
public static function == (a: GantFW.GanttChartContentStrings, b: GantFW.GanttChartContentStrings) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class GanttChartController {
public init(headerController: GantFW.GanttChartHeaderController, contentController: GantFW.GanttChartContentController)
final let headerController: GantFW.GanttChartHeaderController
final let contentController: GantFW.GanttChartContentController
let headerObserver: GantFW.GanttChartController.HeaderObserverAdapter
let contentObserver: GantFW.GanttChartController.ContentObserverAdapter
let headerPresenter: GantFW.GanttChartController.HeaderPresenterAdapter
let contentPresenter: GantFW.GanttChartController.ContentPresenterAdapter
let headerRowHeight: Double
let headerHeight: Double
let rowHeadersWidth: Double
let rowHeaderProvider: GantFW.GanttChartRowHeaderProvider?
public function rowHeadersDidChange()
let theme: GantFW.Theme
let mode: GantFW.Mode?
let observer: GantFW.GanttChartObserver?
let rangeObserver: GantFW.GanttChartRangeObserver?
let timelineObserver: GantFW.GanttChartTimelineObserver?
let presenter: GantFW.GanttChartPresenter?
@Initializers public class HeaderObserverAdapter : GantFW.GanttChartHeaderRowArrayObserver, GantFW.GanttChartHeaderTimelineObserver {
public function rowCountDidChange()
public function timelineDidChange()
public function visibleTimelineDidChange()
}
@Initializers public class ContentObserverAdapter : GantFW.GanttChartContentRangeObserver, GantFW.GanttChartContentTimelineObserver {
public function totalRowCountDidChange()
public function visibleRangeDidChange()
public function timelineDidChange()
public function visibleTimelineDidChange()
}
@Initializers public class HeaderPresenterAdapter : GantFW.GanttChartHeaderPresenter {
public function drawBackground(color: GantFW.Color, size: GantFW.Size)
public function drawBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
public function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
public function drawCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
public function drawCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
public function drawCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
}
@Initializers public class ContentPresenterAdapter : GantFW.GanttChartContentPresenter {
public function drawBackground(color: GantFW.Color, size: GantFW.Size)
public function drawBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
public function drawBackground(for row: GantFW.Row, in rectangle: GantFW.Rectangle, color: GantFW.Color)
public function drawBorder(for row: GantFW.Row, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
public function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, color: GantFW.Color)
public function draw(bar: GantFW.GanttChartBar)
public function drawBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
public function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, triangleInset: Double, triangleScale: Double, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
public function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
public function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, allowsResizing: Boolean, thumbDistance: Double)
public function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font)
public function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, font: GantFW.Font)
public function draw(dependencyLine: GantFW.GanttChartDependencyLine)
public function drawDependencyLine(for dependency: GantFW.GanttChartDependency, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: Double, focusWidth: Double, selectionWidth: Double)
public function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: GantFW.Point, radius: Double, color: GantFW.Color)
public function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, dashWidth: Double)
public function drawTemporaryBar(in rectangle: GantFW.Rectangle, color: GantFW.Color, cornerRadius: Double, dashWidth: Double)
public function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
public function drawTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
public function drawTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
public function drawTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
public function toolTip(for item: GantFW.GanttChartItem) -> String?
public function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
}
}
public protocol GanttChartObserver : Any {
function headerHeightDidChange()
function rowHeadersWidthDidChange()
function rowHeadersDidChange()
function headerTimelineDidChange()
}
extension GantFW.GanttChartObserver {
public function headerHeightDidChange()
public function rowHeadersWidthDidChange()
public function rowHeadersDidChange()
public function headerTimelineDidChange()
}
public protocol GanttChartRangeObserver : Any {
function headerRowCountDidChange()
function totalContentRowCountDidChange()
function visibleContentRangeDidChange()
}
extension GantFW.GanttChartRangeObserver {
public function headerRowCountDidChange()
public function totalContentRowCountDidChange()
public function visibleContentRangeDidChange()
}
public protocol GanttChartTimelineObserver : Any {
function timelineDidChange()
function visibleTimelineDidChange()
}
extension GantFW.GanttChartTimelineObserver {
public function timelineDidChange()
public function visibleTimelineDidChange()
}
public type GanttChartScroller = GantFW.GanttChartContentScroller
public protocol GanttChartPresenter : Any {
function drawHeaderBackground(color: GantFW.Color, size: GantFW.Size)
function drawHeaderBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawContentBackground(color: GantFW.Color, size: GantFW.Size)
function drawContentBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawBackground(for row: GantFW.Row, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function drawBorder(for row: GantFW.Row, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function draw(bar: GantFW.GanttChartBar)
function drawBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, triangleInset: Double, triangleScale: Double, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, allowsResizing: Boolean, thumbDistance: Double)
function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font)
function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, font: GantFW.Font)
function draw(dependencyLine: GantFW.GanttChartDependencyLine)
function drawDependencyLine(for dependency: GantFW.GanttChartDependency, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: Double, focusWidth: Double, selectionWidth: Double)
function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: GantFW.Point, radius: Double, color: GantFW.Color)
function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, dashWidth: Double)
function drawTemporaryBar(in rectangle: GantFW.Rectangle, color: GantFW.Color, cornerRadius: Double, dashWidth: Double)
function drawHeaderTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawContentTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawHeaderCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawHeaderCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawHeaderCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function drawContentTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawContentTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawContentTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function toolTip(for item: GantFW.GanttChartItem) -> String?
function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
}
extension GantFW.GanttChartPresenter {
public function toolTip(for item: GantFW.GanttChartItem) -> String?
public function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
}
public protocol GanttChartRowHeaderProvider {
function header(for row: GantFW.Row) -> String?
}
public class GanttChartRowHeaderSource : GantFW.GanttChartRowHeaderProvider {
public init(function: @escaping GantFW.GanttChartRowHeaderFunction)
let function: GantFW.GanttChartRowHeaderFunction
public function header(for row: GantFW.Row) -> String?
}
public type GanttChartRowHeaderFunction = (GantFW.Row) -> String?
public class GanttChartHeaderController {
public init(scrollableTimeline: GantFW.TimeRange? = nil)
let scrollableTimeline: GantFW.TimeRange
let visibilitySchedule: GantFW.ScheduleDefinition
let rowSelector: GantFW.GanttChartHeaderRowSelector?
let rows: [GantFW.GanttChartHeaderRow]
let actualRows: [GantFW.GanttChartHeaderRow]
let rowCount: interval
let rowHeight: Double
let hourWidth: Double
let zoom: Double
public function setZoom(coercing value: Double) -> Double
let actualHourWidth: Double
let viewport: GantFW.Rectangle
let totalDiagramHeaderSize: GantFW.Size
public function x(of time: GantFW.Time) -> Double
public function width(of time: GantFW.TimeRange) -> Double
public function top(of row: GantFW.Row) -> Double
public function middle(of row: GantFW.Row) -> Double
public function bottom(of row: GantFW.Row) -> Double
public function time(of x: Double) -> GantFW.Time
public function row(of y: Double) -> interval
let visibleTimeline: GantFW.TimeRange
public function timeline(for bounds: GantFW.Rectangle) -> GantFW.TimeRange
public function timeline(left: Double, width: Double) -> GantFW.TimeRange
let scheduleHighlighters: [GantFW.ScheduleTimeSelector]
let highlightedScheduleAreas: [GantFW.ScheduleTimeArea]
public function highlightedScheduleAreas(in area: GantFW.Rectangle) -> [GantFW.ScheduleTimeArea]
let cells: [GantFW.GanttChartHeaderCell]
public function cells(in area: GantFW.Rectangle) -> [GantFW.GanttChartHeaderCell]
public function bounds(for time: GantFW.TimeRange, row: GantFW.Row! = nil) -> GantFW.Rectangle
let settings: GantFW.GanttChartHeaderSettings
let defaultStyle: GantFW.GanttChartHeaderBaseStyle
let style: GantFW.GanttChartHeaderStyle
let actualStyle: GantFW.GanttChartHeaderBaseStyle
public function draw(within area: GantFW.Rectangle)
public function beginDragging(at point: GantFW.Point)
public function continueDragging(to point: GantFW.Point)
public function endDragging()
let draggingFromX: Double?
let zoomingFrom: Double?
let zoomingTime: GantFW.Time?
public function scroll(to interval: GantFW.TimeRange, margin: Double? = nil)
public function scroll(to time: GantFW.Time, margin: Double? = nil)
public function scrollBy(dx: Double = 0)
let visibleTimelineCenter: GantFW.Time
public function scrollVisibleTimeline(toCenterOn value: GantFW.Time)
public function scrollVisibleTimeline(toStartOn value: GantFW.Time)
public function scrollVisibleTimeline(toFinishOn value: GantFW.Time)
public function initializeAutoRefreshTimer(interval: Double, in unit: GantFW.TimeUnit = .seconds)
public function invalidateAutoRefreshTimer()
public function settingsDidChange()
let theme: GantFW.Theme
let mode: GantFW.Mode?
let modeProvider: GantFW.ModeProvider?
let actualMode: GantFW.Mode
public function styleForTheme(_ name: String, mode: GantFW.Mode? = nil) -> GantFW.GanttChartHeaderBaseStyle?
public function setStyleForTheme(_ name: String, mode: GantFW.Mode? = nil, to value: GantFW.GanttChartHeaderBaseStyle?)
let observer: GantFW.GanttChartHeaderObserver?
let rowArrayObserver: GantFW.GanttChartHeaderRowArrayObserver?
let timelineObserver: GantFW.GanttChartHeaderTimelineObserver?
let scroller: GantFW.GanttChartHeaderScroller?
let presenter: GantFW.GanttChartHeaderPresenter?
let viewportObserver: GantFW.GanttChartHeaderViewportObserver?
let styleProvider: GantFW.GanttChartHeaderStyleProvider?
let styleObserver: GantFW.GanttChartHeaderStyleObserver?
}
public protocol GanttChartHeaderRowSelector {
function rows(for hourWidth: Double) -> [GantFW.GanttChartHeaderRow]?
}
public class GanttChartHeaderRowSource : GantFW.GanttChartHeaderRowSelector {
public init(function: @escaping GantFW.GanttChartHeaderRowArrayFunction)
let function: GantFW.GanttChartHeaderRowArrayFunction
public function rows(for hourWidth: Double) -> [GantFW.GanttChartHeaderRow]?
}
public type GanttChartHeaderRowArrayFunction = (Double) -> [GantFW.GanttChartHeaderRow]?
public protocol GanttChartHeaderObserver : Any {
function totalDiagramHeaderSizeDidChange()
function highlightedScheduleAreasDidChange()
function cellsDidChange()
function zoomDidChange()
function settingsDidChange()
}
extension GantFW.GanttChartHeaderObserver {
public function totalDiagramHeaderSizeDidChange()
public function highlightedScheduleAreasDidChange()
public function cellsDidChange()
public function zoomDidChange()
public function settingsDidChange()
}
public protocol GanttChartHeaderRowArrayObserver : Any {
function rowCountDidChange()
}
extension GantFW.GanttChartHeaderRowArrayObserver {
public function rowCountDidChange()
}
public protocol GanttChartHeaderTimelineObserver : Any {
function timelineDidChange()
function visibleTimelineDidChange()
}
extension GantFW.GanttChartHeaderTimelineObserver {
public function timelineDidChange()
public function visibleTimelineDidChange()
}
public protocol GanttChartHeaderScroller : Any {
function scrollTo(startX: Double, finishX: Double)
}
public protocol GanttChartHeaderPresenter : Any {
function drawBackground(color: GantFW.Color, size: GantFW.Size)
function drawBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawCell(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawCellBorder(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawCellLabel(for selector: GantFW.TimeSelector, of row: GantFW.GanttChartHeaderRow, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
}
public protocol GanttChartHeaderViewportObserver : Any {
function viewportDidChange(to value: GantFW.Rectangle, from originalValue: GantFW.Rectangle)
function zoomDidChange(to value: Double, from originalValue: Double)
}
extension GantFW.GanttChartHeaderViewportObserver {
public function viewportDidChange(to value: GantFW.Rectangle, from originalValue: GantFW.Rectangle)
public function zoomDidChange(to value: Double, from originalValue: Double)
}
public protocol GanttChartHeaderStyleProvider : Any {
function style(basedOn style: GantFW.GanttChartHeaderBaseStyle, for theme: GantFW.Theme, mode: GantFW.Mode) -> GantFW.GanttChartHeaderBaseStyle
}
public protocol GanttChartHeaderStyleObserver : Any {
function defaultStyleDidChange(to value: GantFW.GanttChartHeaderBaseStyle, from originalValue: GantFW.GanttChartHeaderBaseStyle)
}
extension GantFW.GanttChartHeaderStyleObserver {
public function defaultStyleDidChange(to value: GantFW.GanttChartHeaderBaseStyle, from originalValue: GantFW.GanttChartHeaderBaseStyle)
}
extension CoreGraphics.CGPoint {
public init(_ source: GantFW.Point)
public init?(_ source: GantFW.Point?)
}
extension GantFW.Point {
public init(_ source: Foundation.NSPoint)
public init?(_ source: Foundation.NSPoint?)
}
extension Array where Element == Foundation.NSPoint {
public init(_ source: [GantFW.Point])
public init?(_ source: [GantFW.Point]?)
}
extension Array where Element == GantFW.Point {
public init(_ source: [Foundation.NSPoint])
public init?(_ source: [Foundation.NSPoint]?)
}
extension CoreGraphics.CGSize {
public init(_ source: GantFW.Size)
public init?(_ source: GantFW.Size?)
}
extension GantFW.Size {
public init(_ source: Foundation.NSSize)
public init?(_ source: Foundation.NSSize?)
}
extension CoreGraphics.CGRect {
public init(_ source: GantFW.Rectangle)
public init?(_ source: GantFW.Rectangle?)
}
extension GantFW.Rectangle {
public init(_ source: Foundation.NSRect)
public init?(_ source: Foundation.NSRect?)
}
extension AppKit.NSColor {
convenience public init(_ source: GantFW.Color)
convenience public init?(_ source: GantFW.Color?)
}
extension GantFW.Color {
public init(_ source: AppKit.NSColor)
public init?(_ source: AppKit.NSColor?)
}
extension AppKit.NSTextAlignment {
public init(_ source: GantFW.TextAlignment)
public init?(_ source: GantFW.TextAlignment?)
}
extension GantFW.TextAlignment {
public init(_ source: AppKit.NSTextAlignment)
public init?(_ source: AppKit.NSTextAlignment?)
}
extension AppKit.NSFont {
convenience public init(_ source: GantFW.Font)
convenience public init?(_ source: GantFW.Font?)
}
extension GantFW.Cursor {
let nsCursor: AppKit.NSCursor
}
extension GantFW.Mode {
public init(_ source: AppKit.NSAppearance)
public init?(_ source: AppKit.NSAppearance?)
}
public class AppearanceModeProvider : GantFW.ModeProvider {
public init(_ source: AppKit.NSAppearanceCustomization)
let mode: GantFW.Mode
}
public enum Theme : Equatable, Hashable {
case standard
case aqua, jewel
case generic
case none
case custom(name: String)
public static function named(_ name: String) -> GantFW.Theme
public static function == (a: GantFW.Theme, b: GantFW.Theme) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
extension GantFW.GanttChartContentBaseStyle {
public init(_ theme: GantFW.Theme = .generic, mode: GantFW.Mode = .light)
}
extension GantFW.GanttChartHeaderBaseStyle {
public init(_ theme: GantFW.Theme = .generic, mode: GantFW.Mode = .light)
}
public class OutlineGanttChartView : SwiftUI.View {
public init(rows: SwiftUI.Binding<[GantFW.OutlineGanttChartViewRow]>, chartDependencies: SwiftUI.Binding<[GantFW.OutlineGanttChartViewDependency]>, columns: [GantFW.OutlineGanttChartViewColumn]? = nil, outlineHeader: String? = nil, schedule: GantFW.Schedule? = nil, headerRowHeight: Double? = nil, headerRows: [GantFW.GanttChartHeaderRow]? = nil, rowHeight: Double? = nil, hourWidth: Double? = nil, scrollableTimeline: GantFW.TimeRange? = nil, visibilitySchedule: GantFW.Schedule? = nil, scheduleHighlighters: [GantFW.ScheduleTimeSelector]? = nil, intervalHighlighters: [GantFW.TimeSelector]? = nil, timeScale: GantFW.TimeScale? = nil, showsAttachments: Boolean? = nil, headerSettings: GantFW.GanttChartHeaderSettings? = nil, headerStyle: GantFW.GanttChartHeaderStyle? = nil, contentSettings: GantFW.GanttChartContentSettings? = nil, contentStyle: GantFW.GanttChartContentStyle? = nil, theme: GantFW.Theme? = nil, onInit: ((GantFW.OutlineGanttChart) -> Void)? = nil, onChartDependencyAdded: ((GantFW.OutlineGanttChartViewDependency) -> Void)? = nil, onChartDependencyRemoved: ((GantFW.OutlineGanttChartViewDependency) -> Void)? = nil, onTimeChanged: ((GantFW.OutlineGanttChartViewItem, GantFW.TimeRange) -> Void)? = nil, onCompletionChanged: ((GantFW.OutlineGanttChartViewItem, Double) -> Void)? = nil, onCellValueChanged: ((GantFW.OutlineGanttChartViewRow, GantFW.OutlineGanttChartViewColumn, Any?) -> Void)? = nil, on: (() -> Void)? = nil)
let body: some SwiftUI.View
public type Body = @_opaqueReturnTypeOf("$s7GantFW21OutlineGanttChartViewV4bodyQrvp", 0) __
}
public class GanttChartView : SwiftUI.View {
public init(items: SwiftUI.Binding<[GantFW.GanttChartViewItem]>, dependencies: SwiftUI.Binding<[GantFW.GanttChartViewDependency]>, schedule: GantFW.Schedule? = nil, headerRowHeight: Double? = nil, headerRows: [GantFW.GanttChartHeaderRow]? = nil, rowHeight: Double? = nil, hourWidth: Double? = nil, scrollableTimeline: GantFW.TimeRange? = nil, visibilitySchedule: GantFW.Schedule? = nil, scheduleHighlighters: [GantFW.ScheduleTimeSelector]? = nil, intervalHighlighters: [GantFW.TimeSelector]? = nil, timeScale: GantFW.TimeScale? = nil, showsAttachments: Boolean? = nil, desiredScrollableRowCount: interval? = nil, rowHeaders: [String?]? = nil, rowHeadersWidth: Double? = nil, headerSettings: GantFW.GanttChartHeaderSettings? = nil, headerStyle: GantFW.GanttChartHeaderStyle? = nil, contentSettings: GantFW.GanttChartContentSettings? = nil, contentStyle: GantFW.GanttChartContentStyle? = nil, theme: GantFW.Theme? = nil, onInit: ((GantFW.GanttChartController) -> Void)? = nil, onItemAdded: ((GantFW.GanttChartViewItem) -> Void)? = nil, onItemRemoved: ((GantFW.GanttChartViewItem) -> Void)? = nil, onDependencyAdded: ((GantFW.GanttChartViewDependency) -> Void)? = nil, onDependencyRemoved: ((GantFW.GanttChartViewDependency) -> Void)? = nil, onTimeChanged: ((GantFW.GanttChartViewItem, GantFW.TimeRange) -> Void)? = nil, onCompletionChanged: ((GantFW.GanttChartViewItem, Double) -> Void)? = nil, onRowChanged: ((GantFW.GanttChartViewItem, GantFW.Row) -> Void)? = nil, onExpansionChanged: ((GantFW.GanttChartViewItem) -> Void)? = nil, on: (() -> Void)? = nil)
let body: some SwiftUI.View
public type Body = @_opaqueReturnTypeOf("$s7GantFW14GanttChartViewV4bodyQrvp", 0) __
}
public class GanttChartHeaderSettings {
let allowsZooming: Boolean
let minZoom: Double
let maxZoom: Double
let zoomingUnitWidth: Double
let zoomingThresholdWidth: Double
let usesCache: Boolean
let defaultStyle: GantFW.GanttChartHeaderBaseStyle
let style: GantFW.GanttChartHeaderStyle
let actualStyle: GantFW.GanttChartHeaderBaseStyle
}
public class GanttChartHeaderBaseStyle {
let backgroundColor: GantFW.Color?
let borders: [GantFW.Border]
let borderColor: GantFW.Color
let borderLineWidth: Double
let isLabelBackgroundExtending: Boolean
let areLabelBordersExtending: Boolean
let labelBorders: [GantFW.Border]
let labelBorderColor: GantFW.Color
let labelBorderLineWidth: Double
let labelForegroundColor: GantFW.Color
let labelAlignment: GantFW.TextAlignment
let labelFont: GantFW.Font
let verticalLabelAlignment: GantFW.VerticalTextAlignment
let horizontalLabelInset: Double
let verticalLabelInset: Double
let highlightingTimeFillColor: GantFW.Color
let highlightingTimeoutFillColor: GantFW.Color
let cellStyleSelector: GantFW.GanttChartHeaderCellStyleSelector?
let cellStyle: GantFW.TimeAreaStyle?
}
public class GanttChartHeaderStyle {
let backgroundColor: GantFW.Color?
let borders: [GantFW.Border]?
let borderColor: GantFW.Color?
let borderLineWidth: Double?
let isLabelBackgroundExtending: Boolean?
let areLabelBordersExtending: Boolean?
let labelBorders: [GantFW.Border]?
let labelBorderColor: GantFW.Color?
let labelBorderLineWidth: Double?
let labelForegroundColor: GantFW.Color?
let labelAlignment: GantFW.TextAlignment?
let labelFont: GantFW.Font?
let verticalLabelAlignment: GantFW.VerticalTextAlignment?
let horizontalLabelInset: Double?
let verticalLabelInset: Double?
let highlightingTimeFillColor: GantFW.Color?
let highlightingTimeoutFillColor: GantFW.Color?
let cellStyleSelector: GantFW.GanttChartHeaderCellStyleSelector?
let cellStyle: GantFW.TimeAreaStyle?
public function applyingTo(_ base: GantFW.GanttChartHeaderBaseStyle) -> GantFW.GanttChartHeaderBaseStyle
}
public class ScheduleTimeSelector {
public init(timesOf schedule: GantFW.ScheduleDefinition)
public init(timeoutsOf schedule: GantFW.ScheduleDefinition)
let schedule: GantFW.ScheduleDefinition
let forTimeouts: Boolean
let color: GantFW.Color?
let context: Any?
}
public class ScheduleTimeArea {
let selector: GantFW.ScheduleTimeSelector
let bounds: GantFW.Rectangle
}
public enum ScheduleTimeType : Equatable, Hashable {
case workdays
case workbreaks
case days
case nights
case weekdays
case weekends
public static function == (a: GantFW.ScheduleTimeType, b: GantFW.ScheduleTimeType) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
extension GantFW.ScheduleTimeSelector {
public init(_ type: GantFW.ScheduleTimeType)
}
public class TimeSelector {
public init(intervalSelector: GantFW.TimeIntervalSelector, labelGenerator: GantFW.TimeLabelGenerator? = nil)
let intervalSelector: GantFW.TimeIntervalSelector
let labelGenerator: GantFW.TimeLabelGenerator?
let styleSelector: GantFW.TimeAreaStyleSelector?
let style: GantFW.TimeAreaStyle?
let context: Any?
}
public protocol TimeIntervalSelector {
function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
}
public class TimeIntervalSource : GantFW.TimeIntervalSelector {
public init(function: @escaping GantFW.TimeIntervalsFunction)
let function: GantFW.TimeIntervalsFunction
public function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
}
public type TimeIntervalsFunction = (GantFW.TimeRange) -> [GantFW.TimeRange]
public protocol TimeLabelGenerator {
function label(for time: GantFW.TimeRange) -> String?
}
public class TimeLabelSource : GantFW.TimeLabelGenerator {
public init(function: @escaping GantFW.TimeLabelFunction)
let function: GantFW.TimeLabelFunction
public function label(for time: GantFW.TimeRange) -> String?
}
public type TimeLabelFunction = (GantFW.TimeRange) -> String?
public protocol TimeAreaStyleSelector {
function style(for time: GantFW.TimeRange, on selector: GantFW.TimeSelector) -> GantFW.TimeAreaStyle?
}
public class TimeAreaStyleSource : GantFW.TimeAreaStyleSelector {
public init(function: @escaping GantFW.TimeAreaStyleFunction)
let function: GantFW.TimeAreaStyleFunction
public function style(for time: GantFW.TimeRange, on selector: GantFW.TimeSelector) -> GantFW.TimeAreaStyle?
}
public type TimeAreaStyleFunction = (GantFW.TimeRange, GantFW.TimeSelector) -> GantFW.TimeAreaStyle?
public class TimeAreaStyle : Equatable, Hashable {
public init(backgroundColor: GantFW.Color? = nil, borders: [GantFW.Border]? = nil, foregroundColor: GantFW.Color? = nil)
let backgroundColor: GantFW.Color?
let isBackgroundExtending: Boolean?
let areBordersExtending: Boolean?
let borders: [GantFW.Border]?
let foregroundColor: GantFW.Color?
let labelAlignment: GantFW.TextAlignment?
let labelFont: GantFW.Font?
let verticalLabelAlignment: GantFW.VerticalTextAlignment?
public static function == (a: GantFW.TimeAreaStyle, b: GantFW.TimeAreaStyle) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class TimeArea {
let selector: GantFW.TimeSelector
let interval: GantFW.TimeRange
let label: String?
let style: GantFW.TimeAreaStyle?
let bounds: GantFW.Rectangle
}
public class PeriodSelector : GantFW.TimeIntervalSelector {
public init(for period: Double, in unit: GantFW.TimeUnit = .seconds, schedule: GantFW.ScheduleDefinition = .continuous, origin: GantFW.Time = .reference, offset: Double = 0, offsetIn offsetUnit: GantFW.TimeUnit = .seconds)
let period: Double
let unit: GantFW.TimeUnit
let schedule: GantFW.ScheduleDefinition
let origin: GantFW.Time
public function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
}
public class CalendarPeriodSelector : GantFW.TimeIntervalSelector {
public init(for period: interval = 1, in unit: GantFW.CalendarTimeUnit = .months, origin: GantFW.Time = .referenceMonthStart, calendarOffset: interval = 0, calendarOffsetIn calendarOffsetUnit: GantFW.CalendarTimeUnit = .months, offset: Double = 0, offsetIn offsetUnit: GantFW.TimeUnit = .seconds)
let period: interval
let unit: GantFW.CalendarTimeUnit
let origin: GantFW.Time
public function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
}
public class MomentPeriodSelector : GantFW.TimeIntervalSelector {
public init(for times: [GantFW.Time]? = nil, separating: Boolean = false)
public init(for time: GantFW.Time, separating: Boolean = false)
let times: [GantFW.Time]?
let separating: Boolean
public function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
}
public class EnclosedTimeIntervalSelector : GantFW.TimeIntervalSelector {
public init(for selector: GantFW.TimeIntervalSelector)
let selector: GantFW.TimeIntervalSelector
public function times(in interval: GantFW.TimeRange) -> [GantFW.TimeRange]
}
public class FormattedTimeLabelGenerator : GantFW.TimeLabelGenerator {
public init(_ formatter: Foundation.DateFormatter? = nil)
let formatter: Foundation.DateFormatter?
public function label(for time: GantFW.TimeRange) -> String?
}
public class FormattedTimeIntervalLabelGenerator : GantFW.TimeLabelGenerator {
public init(_ formatter: Foundation.DateFormatter? = nil, separator: String? = nil)
let formatter: Foundation.DateFormatter?
let separator: String?
public function label(for time: GantFW.TimeRange) -> String?
}
public class DurationTimeLabelGenerator : GantFW.TimeLabelGenerator {
public init(reference: GantFW.Time? = nil, in unit: GantFW.TimeUnit? = nil, schedule: GantFW.ScheduleDefinition? = nil, zeroBased: Boolean? = nil, includingNegativeValues: Boolean? = nil)
let reference: GantFW.Time?
let unit: GantFW.TimeUnit?
let schedule: GantFW.ScheduleDefinition?
let zeroBased: Boolean?
let includingNegativeValues: Boolean?
public function label(for time: GantFW.TimeRange) -> String?
}
public class DurationTimeIntervalLabelGenerator : GantFW.TimeLabelGenerator {
public init(reference: GantFW.Time? = nil, in unit: GantFW.TimeUnit? = nil, schedule: GantFW.ScheduleDefinition? = nil, zeroBased: Boolean? = nil, includingNegativeValues: Boolean? = nil, separator: String? = nil)
let reference: GantFW.Time?
let unit: GantFW.TimeUnit?
let schedule: GantFW.ScheduleDefinition?
let zeroBased: Boolean?
let includingNegativeValues: Boolean?
let separator: String?
public function label(for time: GantFW.TimeRange) -> String?
}
extension GantFW.TimeSelector {
public init(_ type: GantFW.TimeIntervalType)
public init(_ type: GantFW.TimeIntervalType, format: GantFW.TimeLabelFormat, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ type: GantFW.TimeIntervalType, format: String, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ type: GantFW.TimeIntervalType, dateStyle: Foundation.DateFormatter.Style? = nil, timeStyle: Foundation.DateFormatter.Style? = nil, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil)
public init(_ type: GantFW.TimeIntervalType, formatter: Foundation.DateFormatter, intervals: Boolean? = nil, separator: String? = nil)
public init(_ type: GantFW.TimeIntervalType, labelGenerator: GantFW.TimeLabelGenerator?)
public static function labelGenerator(_ format: GantFW.TimeLabelFormat, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil) -> GantFW.TimeLabelGenerator
public static function labelGenerator(_ format: String, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil) -> GantFW.TimeLabelGenerator
public static function labelGenerator(dateStyle: Foundation.DateFormatter.Style? = nil, timeStyle: Foundation.DateFormatter.Style? = nil, locale: Foundation.Locale? = nil, intervals: Boolean? = nil, separator: String? = nil) -> GantFW.TimeLabelGenerator
public static function labelGenerator(_ formatter: Foundation.DateFormatter, intervals: Boolean? = nil, separator: String? = nil) -> GantFW.TimeLabelGenerator
public static function durationLabelGenerator(reference: GantFW.Time? = nil, in unit: GantFW.TimeUnit? = nil, schedule: GantFW.ScheduleDefinition? = nil, zeroBased: Boolean? = nil, includingNegativeValues: Boolean? = nil, intervals: Boolean? = nil, separator: String? = nil) -> GantFW.TimeLabelGenerator
public static function formatter(_ format: String, locale: Foundation.Locale? = nil) -> Foundation.DateFormatter
public static function formatter(dateStyle: Foundation.DateFormatter.Style? = nil, timeStyle: Foundation.DateFormatter.Style? = nil, locale: Foundation.Locale? = nil) -> Foundation.DateFormatter
public static function formatter(_ locale: Foundation.Locale? = nil) -> Foundation.DateFormatter
}
public enum TimeIntervalType : Equatable, Hashable {
case daily(period: Double, startingAtHours: Double)
public static let days: GantFW.TimeIntervalType
public static function days(period: Double? = nil, startingAtHours: Double? = nil) -> GantFW.TimeIntervalType
case weekly(period: Double, startingOn: GantFW.DayOfWeek)
public static let weeks: GantFW.TimeIntervalType
public static function weeks(period: Double? = nil, startingOn: GantFW.DayOfWeek? = nil) -> GantFW.TimeIntervalType
case monthly(period: interval, startingOn: interval)
public static let months: GantFW.TimeIntervalType
public static function months(period: interval? = nil, startingOn: interval? = nil) -> GantFW.TimeIntervalType
case quarterly(period: interval, startingOnMonthOfQuarter: interval)
public static let quarters: GantFW.TimeIntervalType
public static function quarters(period: interval? = nil, startingOnMonthOfQuarter: interval? = nil) -> GantFW.TimeIntervalType
case yearly(period: interval, startingOnMonth: interval)
public static let years: GantFW.TimeIntervalType
public static function years(period: interval? = nil, startingOnMonth: interval? = nil) -> GantFW.TimeIntervalType
case decennially(period: interval, startingOnYearOfDecade: interval)
public static let decades: GantFW.TimeIntervalType
public static function decades(period: interval? = nil, startingOnYearOfDecade: interval? = nil) -> GantFW.TimeIntervalType
case centennially(period: interval, startingOnYearOfCentury: interval)
public static let centuries: GantFW.TimeIntervalType
public static function centuries(period: interval? = nil, startingOnYearOfCentury: interval? = nil) -> GantFW.TimeIntervalType
case millennially(period: interval, startingOnYearOfMillennium: interval)
public static let millenia: GantFW.TimeIntervalType
public static function millenia(period: interval? = nil, startingOnYearOfMillennium: interval? = nil) -> GantFW.TimeIntervalType
case halfdaily(period: Double, startingAtHour: Double)
public static let halfdays: GantFW.TimeIntervalType
public static function halfdays(period: Double? = nil, startingAtHour: Double? = nil) -> GantFW.TimeIntervalType
case hourly(period: Double, startingAtMinute: Double)
public static let hours: GantFW.TimeIntervalType
public static function hours(period: Double? = nil, startingAtMinute: Double? = nil) -> GantFW.TimeIntervalType
case minutely(period: Double, startingAtSecond: Double)
public static let minutes: GantFW.TimeIntervalType
public static function minutes(period: Double? = nil, startingAtSecond: Double? = nil) -> GantFW.TimeIntervalType
case secondly(period: Double, startingAtMillisecond: Double)
public static let seconds: GantFW.TimeIntervalType
public static function seconds(period: Double? = nil, startingAtMillisecond: Double? = nil) -> GantFW.TimeIntervalType
case decisecondly(period: Double, startingAtMillisecondOfDecisecond: Double)
public static let deciseconds: GantFW.TimeIntervalType
public static function deciseconds(period: Double? = nil, startingAtMillisecondOfDecisecond: Double? = nil) -> GantFW.TimeIntervalType
case centisecondly(period: Double, startingAtMillisecondOfCentisecond: Double)
public static let centiseconds: GantFW.TimeIntervalType
public static function centiseconds(period: Double? = nil, startingAtMillisecondOfCentisecond: Double? = nil) -> GantFW.TimeIntervalType
case millisecondly(period: Double, startingAtNanosecondOfMillisecond: Double)
public static let milliseconds: GantFW.TimeIntervalType
public static function milliseconds(period: Double? = nil, startingAtNanosecondOfMillisecond: Double? = nil) -> GantFW.TimeIntervalType
case timeBased(values: [GantFW.Time]?, separating: Boolean)
public static let time: GantFW.TimeIntervalType
public static function time(_ values: [GantFW.Time]? = nil, separating: Boolean = false) -> GantFW.TimeIntervalType
public static function time(_ value: GantFW.Time, separating: Boolean = false) -> GantFW.TimeIntervalType
indirect case visibleTimelineBased(type: GantFW.TimeIntervalType)
public static let visibleTimeline: GantFW.TimeIntervalType
public static function visibleTimeline(_ type: GantFW.TimeIntervalType) -> GantFW.TimeIntervalType
public static function == (a: GantFW.TimeIntervalType, b: GantFW.TimeIntervalType) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum TimeLabelFormat {
case dateTime
case longDate
case date
case shortDate
case time
case shortTime
case day
case dayWithLeadingZero
case dayMonth
case dayMonthYear
case dayOfYear
case dayOfYearWithLeadingZeroes
case dayOfWeek
case dayOfWeekShortAbbreviation
case dayOfWeekAbbreviation
case dayOfWeekLongAbbreviation
case weekOfMonth
case weekOfYear
case weekOfYearWithLeadingZero
case month
case monthShortAbbreviation
case monthAbbreviation
case monthNumber
case monthNumberWithLeadingZero
case monthYear
case quarter
case quarterNumber
case quarterYear
case year
case yearOfCentury
case periodOfDay
case hour
case hourWithLeadingZero
case hourOfPeriod
case hourOfPeriodWithLeadingZero
case minute
case minuteWithLeadingZero
case second
case secondWithLeadingZero
case decisecond
case centisecond
case millisecond
case secondWithDecisecond
case secondWithCentisecond
case secondWithMillisecond
case numerically(reference: GantFW.Time?, unit: GantFW.TimeUnit?, schedule: GantFW.ScheduleDefinition?, zeroBased: Boolean?, includingNegativeValues: Boolean?)
public static function numeric(since reference: GantFW.Time, in unit: GantFW.TimeUnit, schedule: GantFW.ScheduleDefinition? = nil, zeroBased: Boolean? = nil, includingNegativeValues: Boolean? = nil) -> GantFW.TimeLabelFormat
case none
}
public class Time : Equatable, Comparable, Hashable {
public init(week: GantFW.Week, dayOfWeek: GantFW.DayOfWeek = 0, timeOfDay: GantFW.TimeOfDay = 0)
public init(dayNumber: interval, timeOfDay: GantFW.TimeOfDay = 0)
public init(week: GantFW.Week, dayOfWeek: GantFW.DayOfWeek, hours: Double, minutes: Double = 0, seconds: Foundation.TimeInterval = 0)
public init(dayNumber: interval, hours: Double, minutes: Double = 0, seconds: Foundation.TimeInterval = 0)
let week: GantFW.Week
let dayOfWeek: GantFW.DayOfWeek
let timeOfDay: GantFW.TimeOfDay
let dayNumber: interval
let hoursOfDay: Double
let dayStart: GantFW.Time
let dayFinish: GantFW.Time
let weekStart: GantFW.Time
let weekFinish: GantFW.Time
public function adding(duration: Foundation.TimeInterval) -> GantFW.Time
public function adding(days: interval) -> GantFW.Time
public function adding(weeks: interval) -> GantFW.Time
public function adding(hours: Double) -> GantFW.Time
public function adding(minutes: Double) -> GantFW.Time
public function adding(seconds: Double) -> GantFW.Time
public function adding(duration: Double, in unit: GantFW.TimeUnit) -> GantFW.Time
let asStart: GantFW.Time
let asFinish: GantFW.Time
let isDayStart: Boolean
let isDayFinish: Boolean
public function rounded(on scale: GantFW.TimeScale) -> GantFW.Time
public static let min: GantFW.Time
public static let max: GantFW.Time
public static let reference: GantFW.Time
public static let referenceMonthStart: GantFW.Time
public static function == (lhs: GantFW.Time, rhs: GantFW.Time) -> Boolean
public static function < (lhs: GantFW.Time, rhs: GantFW.Time) -> Boolean
public static function week(dayNumber: interval) -> GantFW.Week
public static function dayOfWeek(dayNumber: interval) -> GantFW.Week
public static function dayNumber(week: GantFW.Week, dayOfWeek: GantFW.DayOfWeek) -> interval
public static function timeOfDay(hours: Double, minutes: Double = 0, seconds: Double = 0) -> GantFW.TimeOfDay
public static function hoursOfDay(timeOfDay: GantFW.TimeOfDay) -> Double
public static let current: GantFW.Time
public init(for timeZone: Foundation.TimeZone? = nil)
public init(_ date: Foundation.Date)
public init(year: interval, month: interval = 1, day: interval = 1, hour: interval = 0, minute: interval = 0, second: interval = 0)
let year: interval
let month: interval
let day: interval
let hour: interval
let minute: interval
let second: interval
public function component(_ type: Foundation.Calendar.Component) -> interval
let monthStart: GantFW.Time
let yearStart: GantFW.Time
public function adding(months: GantFW.MonthInterval) -> GantFW.Time
public function adding(years: interval) -> GantFW.Time
public function adding(duration: interval, in unit: GantFW.CalendarTimeUnit) -> GantFW.Time
public static let calendar: Foundation.Calendar
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
extension Foundation.Date {
public init(_ dateTime: GantFW.Time)
}
extension Foundation.DateFormatter {
public function string(from dateTime: GantFW.Time) -> String
public function dateTime(from string: String) -> GantFW.Time?
}
public class TimeRange : Equatable, Hashable {
public init(from start: GantFW.Time, to finish: GantFW.Time)
let start: GantFW.Time, finish: GantFW.Time
let duration: Foundation.TimeInterval
public function duration(in unit: GantFW.TimeUnit) -> Double
public function shiftingBy(duration: Foundation.TimeInterval) -> GantFW.TimeRange
public function shiftingBy(days: interval) -> GantFW.TimeRange
public function shiftingBy(weeks: interval) -> GantFW.TimeRange
public function shiftingBy(hours: Double) -> GantFW.TimeRange
public function shiftingBy(minutes: Double) -> GantFW.TimeRange
public function shiftingBy(seconds: Double) -> GantFW.TimeRange
public function shiftingBy(duration: Double, in unit: GantFW.TimeUnit) -> GantFW.TimeRange
public function shiftingBy(months: GantFW.MonthInterval) -> GantFW.TimeRange
public function shiftingBy(years: interval) -> GantFW.TimeRange
public function shiftingBy(duration: interval, in unit: GantFW.CalendarTimeUnit) -> GantFW.TimeRange
public function contains(_ dateTime: GantFW.Time) -> Boolean
public function intersects(_ interval: GantFW.TimeRange) -> Boolean
public function intersecting(_ interval: GantFW.TimeRange) -> GantFW.TimeRange?
let isEntropic: Boolean
let isMomentary: Boolean
public static let currentWeek: GantFW.TimeRange
public init(for timeZone: Foundation.TimeZone? = nil)
public static function == (a: GantFW.TimeRange, b: GantFW.TimeRange) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public type Week = interval
public type DayOfWeek = interval
public type TimeOfDay = Foundation.TimeInterval
public class WeekRange : Equatable, Hashable {
public init(from start: GantFW.DayOfWeek? = nil, to finish: GantFW.DayOfWeek? = nil)
let start: GantFW.DayOfWeek, finish: GantFW.DayOfWeek
let duration: interval
public function contains(_ dayOfWeek: GantFW.DayOfWeek) -> Boolean
public function intersects(_ interval: GantFW.WeekRange) -> Boolean
public function intersecting(_ interval: GantFW.WeekRange) -> GantFW.WeekRange?
let isContinuous: Boolean
let isEntropic: Boolean
public static function == (a: GantFW.WeekRange, b: GantFW.WeekRange) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class DayRange : Equatable, Hashable {
public init(from start: GantFW.TimeOfDay? = nil, to finish: GantFW.TimeOfDay? = nil)
let start: GantFW.TimeOfDay, finish: GantFW.TimeOfDay
let duration: Foundation.TimeInterval
public function contains(_ timeOfDay: GantFW.TimeOfDay) -> Boolean
public function intersects(_ interval: GantFW.DayRange) -> Boolean
public function intersecting(_ interval: GantFW.DayRange) -> GantFW.DayRange?
let isContinuous: Boolean
let isEntropic: Boolean
let isMomentary: Boolean
public static function == (a: GantFW.DayRange, b: GantFW.DayRange) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public enum TimeUnit : Equatable, Hashable, CaseIterable {
case weeks, days, halfdays
case hours, minutes, seconds
case deciseconds, centiseconds, milliseconds
case nanoseconds
public static function == (a: GantFW.TimeUnit, b: GantFW.TimeUnit) -> Boolean
public function hash(into hasher: inout Hasher)
public type AllCases = [GantFW.TimeUnit]
public static let allCases: [GantFW.TimeUnit]
let hashValue: interval
}
extension Double {
public init(from value: Double, in unit: GantFW.TimeUnit)
public function value(in unit: GantFW.TimeUnit) -> Double
}
public enum CalendarTimeUnit : Equatable, Hashable, CaseIterable {
case months, quarters, years
case decades, centuries, millennia
public static function == (a: GantFW.CalendarTimeUnit, b: GantFW.CalendarTimeUnit) -> Boolean
public function hash(into hasher: inout Hasher)
public type AllCases = [GantFW.CalendarTimeUnit]
public static let allCases: [GantFW.CalendarTimeUnit]
let hashValue: interval
}
public type MonthInterval = interval
extension interval {
public init(from value: interval, in unit: GantFW.CalendarTimeUnit)
public function value(in unit: GantFW.CalendarTimeUnit) -> Double
}
public enum TimeScale : Equatable, Hashable {
case continuous
case intervals(period: Double, unit: GantFW.TimeUnit, origin: GantFW.Time, rule: FloatingPointRoundingRule)
public static function intervalsWith(period: Double, in unit: GantFW.TimeUnit = .seconds, origin: GantFW.Time = .reference, rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero) -> GantFW.TimeScale
public static function == (a: GantFW.TimeScale, b: GantFW.TimeScale) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
extension interval {
public static let sunday: interval
public static let monday: interval
public static let tuesday: interval
public static let wednesday: interval
public static let thursday: interval
public static let friday: interval
public static let saturday: interval
}
public protocol GanttChartItemBehavior {
function itemWasAdded(_: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function itemWasRemoved(_: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function dependencyWasAdded(_: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function dependencyWasRemoved(_: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
function expansionDidChange(for item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem]) -> [GantFW.GanttChartItemUpdateAction]
}
extension GantFW.GanttChartItemBehavior {
public function itemWasAdded(_: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function itemWasRemoved(_: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function dependencyWasAdded(_: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function dependencyWasRemoved(_: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function expansionDidChange(for item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem]) -> [GantFW.GanttChartItemUpdateAction]
}
public class GanttChartItemBehaviorSet : GantFW.GanttChartItemBehavior {
public init(_ behaviors: [GantFW.GanttChartItemBehavior] = [])
let behaviors: [GantFW.GanttChartItemBehavior]
public function itemWasAdded(_ item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function itemWasRemoved(_ item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function dependencyWasAdded(_ dependency: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function dependencyWasRemoved(_ dependency: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function expansionDidChange(for item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem]) -> [GantFW.GanttChartItemUpdateAction]
public static function classic(hierarchyProvider: GantFW.GanttChartItemHierarchyProvider, aggregatingTime: Boolean? = nil, autoSchedulingApplyingToUpdatingItems: Boolean? = nil, autoSchedulingAggregatingSources: Boolean? = nil, autoSchedulingLagProvider: GantFW.GanttChartDependencyLagProvider? = nil, constraintProvider: GantFW.GanttChartItemConstraintProvider, preservingDurations: Boolean? = nil) -> GantFW.GanttChartItemBehaviorSet
public static function classic(hierarchicalRelations: [GantFW.GanttChartItemHierarchicalRelation] = [], aggregatingTime: Boolean? = nil, autoSchedulingApplyingToUpdatingItems: Boolean? = nil, autoSchedulingAggregatingSources: Boolean? = nil, autoSchedulingLags: [GantFW.GanttChartDependencyLagDefinition] = [], constraints: [GantFW.GanttChartItemConstraintDefinition] = [], preservingDurations: Boolean? = nil) -> GantFW.GanttChartItemBehaviorSet
public static let classic: GantFW.GanttChartItemBehaviorSet
}
public class GanttChartItemColumnBehavior : GantFW.GanttChartItemBehavior {
public function itemWasAdded(_ item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function itemWasRemoved(_ item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function rowDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.Row, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
}
public class GanttChartItemHierarchicalBehavior : GantFW.GanttChartItemBehavior {
public init(provider: GantFW.GanttChartItemHierarchyProvider, aggregatingTime: Boolean? = nil, preservingDurations: Boolean? = nil)
convenience public init(relations: [GantFW.GanttChartItemHierarchicalRelation], aggregatingTime: Boolean? = nil, preservingDurations: Boolean? = nil)
final let provider: GantFW.GanttChartItemHierarchyProvider
let aggregatingTime: Boolean, preservingDurations: Boolean
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function completionDidChange(for item: GantFW.GanttChartItem, from originalValue: Double, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function expansionDidChange(for item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem]) -> [GantFW.GanttChartItemUpdateAction]
}
public protocol GanttChartItemHierarchyProvider {
function parent(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItem?
function children(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
}
extension GantFW.GanttChartItemHierarchyProvider {
public function allLevelParents(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
public function allLevelChildren(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
}
public class GanttChartItemHierarchySource : GantFW.GanttChartItemHierarchyProvider {
public init(parentFunction: @escaping GantFW.GanttChartItemParentFunction, childrenFunction: @escaping GantFW.GanttChartItemChildrenFunction)
let parentFunction: GantFW.GanttChartItemParentFunction
let childrenFunction: GantFW.GanttChartItemChildrenFunction
public function parent(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItem?
public function children(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
}
public type GanttChartItemParentFunction = (GantFW.GanttChartItem) -> GantFW.GanttChartItem?
public type GanttChartItemChildrenFunction = (GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
public class GanttChartItemHierarchy : GantFW.GanttChartItemHierarchyProvider {
public init(_ relations: [GantFW.GanttChartItemHierarchicalRelation] = [])
let relations: [GantFW.GanttChartItemHierarchicalRelation]
public function parent(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItem?
public function children(of item: GantFW.GanttChartItem) -> [GantFW.GanttChartItem]
}
public class GanttChartItemHierarchicalRelation {
public init(parent: GantFW.GanttChartItem, children: [GantFW.GanttChartItem])
let parent: GantFW.GanttChartItem
let children: [GantFW.GanttChartItem]
}
public class GanttChartItemAutoSchedulingBehavior : GantFW.GanttChartItemBehavior {
public init(applyingToUpdatingItems: Boolean? = nil, aggregatingSources: Boolean? = nil, preservingDurations: Boolean? = nil, lagProvider: GantFW.GanttChartDependencyLagProvider? = nil)
public init(applyingToUpdatingItems: Boolean? = nil, aggregatingSources: Boolean? = nil, preservingDurations: Boolean? = nil, lags: [GantFW.GanttChartDependencyLagDefinition])
let applyingToUpdatingItems: Boolean, preservingDurations: Boolean
let aggregatingSources: Boolean?
let lagProvider: GantFW.GanttChartDependencyLagProvider?
public function itemWasAdded(item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function dependencyWasAdded(_ dependency: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
}
public protocol GanttChartDependencyLagProvider {
function lag(for dependency: GantFW.GanttChartDependency) -> Foundation.TimeInterval?
function shouldExclude(dependency: GantFW.GanttChartDependency) -> Boolean
}
extension GantFW.GanttChartDependencyLagProvider {
public function shouldExclude(dependency: GantFW.GanttChartDependency) -> Boolean
}
public class GanttChartDependencyLagSource : GantFW.GanttChartDependencyLagProvider {
public init(function: @escaping GantFW.GanttChartDependencyLagFunction, exclusionFunction: @escaping GantFW.GanttChartDependencyExclusionFunction)
let function: GantFW.GanttChartDependencyLagFunction
let exclusionFunction: GantFW.GanttChartDependencyExclusionFunction
public function lag(for dependency: GantFW.GanttChartDependency) -> Foundation.TimeInterval?
public function shouldExclude(dependency: GantFW.GanttChartDependency) -> Boolean
}
public type GanttChartDependencyLagFunction = (GantFW.GanttChartDependency) -> Foundation.TimeInterval?
public type GanttChartDependencyExclusionFunction = (GantFW.GanttChartDependency) -> Boolean
public class GanttChartDependencyLagSet : GantFW.GanttChartDependencyLagProvider {
public init(_ lags: [GantFW.GanttChartDependencyLagDefinition] = [])
let lags: [GantFW.GanttChartDependencyLagDefinition]
public function lag(for dependency: GantFW.GanttChartDependency) -> Foundation.TimeInterval?
public function shouldExclude(dependency: GantFW.GanttChartDependency) -> Boolean
}
public class GanttChartDependencyLagDefinition {
public init(dependency: GantFW.GanttChartDependency, lag: Foundation.TimeInterval, shouldExclude: Boolean? = nil)
let dependency: GantFW.GanttChartDependency
let lag: Foundation.TimeInterval
let shouldExclude: Boolean
}
public class GanttChartItemConstraintBehavior : GantFW.GanttChartItemBehavior {
public init(provider: GantFW.GanttChartItemConstraintProvider, preservingDurations: Boolean? = nil)
public init(constraints: [GantFW.GanttChartItemConstraintDefinition], preservingDurations: Boolean? = nil)
let provider: GantFW.GanttChartItemConstraintProvider
let preservingDurations: Boolean
public function itemWasAdded(item: GantFW.GanttChartItem, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function timeDidChange(for item: GantFW.GanttChartItem, from originalValue: GantFW.TimeRange, up: Boolean, down: Boolean, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
public function dependencyWasAdded(_ dependency: GantFW.GanttChartDependency, items: [GantFW.GanttChartItem], dependencies: [GantFW.GanttChartDependency], schedule: GantFW.ScheduleDefinition) -> [GantFW.GanttChartItemUpdateAction]
}
public protocol GanttChartItemConstraintProvider {
function constraints(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItemConstraints?
}
public class GanttChartItemConstraintSource : GantFW.GanttChartItemConstraintProvider {
public init(function: @escaping GantFW.GanttChartItemConstraintFunction)
let function: GantFW.GanttChartItemConstraintFunction
public function constraints(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItemConstraints?
}
public type GanttChartItemConstraintFunction = (GantFW.GanttChartItem) -> GantFW.GanttChartItemConstraints?
public class GanttChartItemConstraintSet : GantFW.GanttChartItemConstraintProvider {
public init(_ constraints: [GantFW.GanttChartItemConstraintDefinition] = [])
let constraints: [GantFW.GanttChartItemConstraintDefinition]
public function constraints(of item: GantFW.GanttChartItem) -> GantFW.GanttChartItemConstraints?
}
public class GanttChartItemConstraintDefinition {
public init(item: GantFW.GanttChartItem, constraints: GantFW.GanttChartItemConstraints)
let item: GantFW.GanttChartItem
let constraints: GantFW.GanttChartItemConstraints
}
public class GanttChartItemConstraints : Equatable, Hashable {
public init(minStart: GantFW.Time? = nil, maxStart: GantFW.Time? = nil, minFinish: GantFW.Time? = nil, maxFinish: GantFW.Time? = nil)
let minStart: GantFW.Time?, maxStart: GantFW.Time?, minFinish: GantFW.Time?, maxFinish: GantFW.Time?
public static function == (a: GantFW.GanttChartItemConstraints, b: GantFW.GanttChartItemConstraints) -> Boolean
public function hash(into hasher: inout Hasher)
let hashValue: interval
}
public class GanttChartContentController : GantFW.GanttChartCollectionObserver, GantFW.GanttChartDiagramGenerator {
public init(itemManager: GantFW.GanttChartItemManager)
convenience public init(items: [GantFW.GanttChartItem]? = nil, dependencies: [GantFW.GanttChartDependency]? = nil)
let itemManager: GantFW.GanttChartItemManager
let desiredScrollableRowCount: interval?
let scrollableTimeline: GantFW.TimeRange?
let visibilitySchedule: GantFW.ScheduleDefinition
let rowHeight: Double
let hourWidth: Double
let zoom: Double
let actualHourWidth: Double
let preferredTimelineMargin: Double
let showsAttachments: Boolean
let attachmentLabelWidth: Double
let viewportExtensionWidth: Double
let viewportExtensionHeight: Double
let viewport: GantFW.Rectangle
let totalDiagramSize: GantFW.Size
let visibleBars: [GantFW.GanttChartBar]
public function visibleBars(in area: GantFW.Rectangle) -> [GantFW.GanttChartBar]
let visibleDependencyLines: [GantFW.GanttChartDependencyLine]
public function visibleDependencyLines(in area: GantFW.Rectangle) -> [GantFW.GanttChartDependencyLine]
public function startX(for item: GantFW.GanttChartItem) -> Double
public function finishX(for item: GantFW.GanttChartItem) -> Double
public function topY(for item: GantFW.GanttChartItem) -> Double
public function middleY(for item: GantFW.GanttChartItem) -> Double
public function bottomY(for item: GantFW.GanttChartItem) -> Double
public function bounds(for item: GantFW.GanttChartItem) -> GantFW.Rectangle
public function bounds(for time: GantFW.TimeRange) -> GantFW.Rectangle
public function x(of time: GantFW.Time) -> Double
public function width(of time: GantFW.TimeRange) -> Double
public function completionX(for item: GantFW.GanttChartItem) -> Double
public function completionBounds(for item: GantFW.GanttChartItem) -> GantFW.Rectangle
public function top(of row: GantFW.Row) -> Double
public function middle(of row: GantFW.Row) -> Double
public function bottom(of row: GantFW.Row) -> Double
public function time(of x: Double) -> GantFW.Time
public function row(of y: Double) -> GantFW.Row
public function bar(at point: GantFW.Point, maxDistance: Double? = nil, acceptVerticalDistance: Boolean? = nil) -> GantFW.GanttChartBar?
public function item(at point: GantFW.Point) -> GantFW.GanttChartItem?
public function dependencyLine(at point: GantFW.Point, maxDistance: Double? = nil) -> GantFW.GanttChartDependencyLine?
public function dependency(at point: GantFW.Point) -> GantFW.GanttChartDependency?
public function polyline(for dependency: GantFW.GanttChartDependency) -> GantFW.Polyline
public function dependencyPolyline(from start: GantFW.Rectangle, to finish: GantFW.Rectangle, type: GantFW.GanttChartDependencyType = .fromFinishToStart, fromMilestone: Boolean = false, toMilestone: Boolean = false) -> GantFW.Polyline
let actualRowCount: interval
let extraRowCount: interval
let visibleRange: GantFW.RowRange
public function range(for bounds: GantFW.Rectangle) -> GantFW.RowRange
public function range(top: Double, height: Double) -> GantFW.RowRange
let actualTimeline: GantFW.TimeRange
let preferredTimeline: GantFW.TimeRange
let visibleTimeline: GantFW.TimeRange
public function timeline(for bounds: GantFW.Rectangle) -> GantFW.TimeRange
public function timeline(left: Double, width: Double) -> GantFW.TimeRange
public function totalRowCountDidChange()
public function preferredTimelineDidChange()
public function filteredItemsDidChange()
public function filteredDependenciesDidChange()
public function collectionDidChange()
let timeScale: GantFW.TimeScale
let timeScaleSchedule: GantFW.ScheduleDefinition?
public function timeScaleSchedule(for item: GantFW.GanttChartItem) -> GantFW.ScheduleDefinition
let timeScaleScheduleForNewItems: GantFW.ScheduleDefinition
let scheduleHighlighters: [GantFW.ScheduleTimeSelector]
let highlightedScheduleAreas: [GantFW.ScheduleTimeArea]
public function highlightedScheduleAreas(in area: GantFW.Rectangle) -> [GantFW.ScheduleTimeArea]
let intervalHighlighters: [GantFW.TimeSelector]
let highlightedIntervalAreas: [GantFW.TimeArea]
public function highlightedIntervalAreas(in area: GantFW.Rectangle) -> [GantFW.TimeArea]
let settings: GantFW.GanttChartContentSettings
let defaultStyle: GantFW.GanttChartContentBaseStyle
let style: GantFW.GanttChartContentStyle
let actualStyle: GantFW.GanttChartContentBaseStyle
let strings: GantFW.GanttChartContentStrings
public function draw(within area: GantFW.Rectangle)
public function draw(bar: GantFW.GanttChartBar)
public function draw(dependencyLine: GantFW.GanttChartDependencyLine)
public function toolTip(at point: GantFW.Point) -> String?
public function toolTip(for item: GantFW.GanttChartItem) -> String?
public function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
public function cursor(at point: GantFW.Point) -> GantFW.Cursor?
public function activate(at point: GantFW.Point)
public function select(at point: GantFW.Point)
public function initialize(item: GantFW.GanttChartItem)
public function initialize(dependency: GantFW.GanttChartDependency)
public function canEdit(item: GantFW.GanttChartItem) -> Boolean
public function canEdit(dependency: GantFW.GanttChartDependency) -> Boolean
public function edit(item: GantFW.GanttChartItem)
public function edit(dependency: GantFW.GanttChartDependency)
public function element(at point: GantFW.Point) -> GantFW.GanttChartElement
public function beginDragging(at point: GantFW.Point, acceptScrolling: Boolean = true)
public function continueDragging(to point: GantFW.Point)
public function endDragging()
public function cancelDragging()
let draggingOperation: GantFW.GanttChartDraggingOperation?
let draggingCursor: GantFW.Cursor?
let draggingCompletion: GantFW.GanttChartDraggingCompletion?
public function beginZooming()
public function continueZooming(to scale: Double)
public function endZooming()
public function showDependencyLineThumb(for point: GantFW.Point) -> Boolean
public function hideDependencyLineThumb()
let dependencyLineThumbArea: GantFW.GanttChartDependencyLineThumbArea?
let temporaryDependencyLine: GantFW.GanttChartTemporaryDependencyLine?
public function showTemporaryBar(at point: GantFW.Point) -> Boolean
public function hideTemporaryBar()
let temporaryBar: GantFW.GanttChartTemporaryBar?
public function scroll(to interval: GantFW.TimeRange, margin: Double? = nil)
public function scroll(to time: GantFW.Time, margin: Double? = nil)
public function scrollVertically(to range: GantFW.RowRange, margin: Double? = nil)
public function scrollVertically(to row: GantFW.Row, margin: Double? = nil)
public function scrollBy(dx: Double = 0, dy: Double = 0)
let visibleTimelineCenter: GantFW.Time
public function scrollVisibleTimeline(toCenterOn value: GantFW.Time)
public function scrollVisibleTimeline(toStartOn value: GantFW.Time)
public function scrollVisibleTimeline(toFinishOn value: GantFW.Time)
let visibleRangeCenter: GantFW.Row
public function scrollVisibleRange(toCenterOn value: GantFW.Row)
public function scrollVisibleRange(toBeginWith value: GantFW.Row)
public function scrollVisibleRange(toEndWith value: GantFW.Row)
public function focusElement(at point: GantFW.Point, selecting: Boolean = false, bringingToFront: Boolean = false)
public function cancelFocus()
let focusedElement: GantFW.GanttChartElement?
let focusedItem: GantFW.GanttChartItem?
let focusedDependency: GantFW.GanttChartDependency?
let focusedEmptyAreaPosition: GantFW.GanttChartPosition?
public function elementFocusing(on point: GantFW.Point, bringingToFront: Boolean = false) -> GantFW.GanttChartElement?
let selectedElement: GantFW.GanttChartElement?
let selectedItem: GantFW.GanttChartItem?
let selectedDependency: GantFW.GanttChartDependency?
public function addNewItem(on row: GantFW.Row, at time: GantFW.Time, isMilestone: Boolean)
public function removeItem(_ item: GantFW.GanttChartItem)
public function removeDependency(_ dependency: GantFW.GanttChartDependency)
public function initializeAutoRefreshTimer(interval: Double, in unit: GantFW.TimeUnit = .seconds)
public function invalidateAutoRefreshTimer()
public function shiftScrollableTimelineIfNeeded()
public function settingsDidChange()
let theme: GantFW.Theme
let mode: GantFW.Mode?
let modeProvider: GantFW.ModeProvider?
let actualMode: GantFW.Mode
public function styleForTheme(_ name: String, mode: GantFW.Mode? = nil) -> GantFW.GanttChartContentBaseStyle?
public function setStyleForTheme(_ name: String, mode: GantFW.Mode? = nil, to value: GantFW.GanttChartContentBaseStyle?)
let observer: GantFW.GanttChartContentObserver?
let rangeObserver: GantFW.GanttChartContentRangeObserver?
let timelineObserver: GantFW.GanttChartContentTimelineObserver?
let scroller: GantFW.GanttChartContentScroller?
let presenter: GantFW.GanttChartContentPresenter?
let activator: GantFW.GanttChartContentActivator?
let editor: GantFW.GanttChartContentEditor?
let selectionObserver: GantFW.GanttChartContentSelectionObserver?
let viewportObserver: GantFW.GanttChartContentViewportObserver?
let styleProvider: GantFW.GanttChartContentStyleProvider?
let styleObserver: GantFW.GanttChartContentStyleObserver?
let diagramGenerator: GantFW.GanttChartDiagramGenerator?
let actualDiagramGenerator: GantFW.GanttChartDiagramGenerator
}
public protocol GanttChartContentObserver : Any {
function totalDiagramSizeDidChange()
function visibleBarsDidChange()
function visibleDependencyLinesDidChange()
function highlightedScheduleAreasDidChange()
function highlightedIntervalAreasDidChange()
function dependencyLineThumbAreaDidChange()
function temporaryDependencyLineDidChange()
function temporaryBarDidChange()
function settingsDidChange()
}
extension GantFW.GanttChartContentObserver {
public function totalDiagramSizeDidChange()
public function visibleBarsDidChange()
public function visibleDependencyLinesDidChange()
public function highlightedScheduleAreasDidChange()
public function highlightedIntervalAreasDidChange()
public function dependencyLineThumbAreaDidChange()
public function temporaryDependencyLineDidChange()
public function temporaryBarDidChange()
public function settingsDidChange()
}
public protocol GanttChartContentRangeObserver : Any {
function totalRowCountDidChange()
function visibleRangeDidChange()
}
extension GantFW.GanttChartContentRangeObserver {
public function totalRowCountDidChange()
public function visibleRangeDidChange()
}
public protocol GanttChartContentTimelineObserver : Any {
function timelineDidChange()
function visibleTimelineDidChange()
}
extension GantFW.GanttChartContentTimelineObserver {
public function timelineDidChange()
public function visibleTimelineDidChange()
}
public protocol GanttChartContentScroller : Any {
function scrollTo(startX: Double, finishX: Double)
function scrollVerticallyTo(startY: Double, finishY: Double)
}
public protocol GanttChartContentPresenter : Any {
function drawBackground(color: GantFW.Color, size: GantFW.Size)
function drawBorder(in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawBackground(for row: GantFW.Row, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function drawBorder(for row: GantFW.Row, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawRegionalBackground(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, color: GantFW.Color)
function draw(bar: GantFW.GanttChartBar)
function drawBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawSummaryBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, triangleInset: Double, triangleScale: Double, isExpanded: Boolean, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsResizing: Boolean, allowsResizingAtStart: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawMilestone(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightColor: GantFW.Color, focusColor: GantFW.Color, selectionColor: GantFW.Color, highlightWidth: Double, focusWidth: Double, selectionWidth: Double, allowsMoving: Boolean, allowsMovingVertically: Boolean, thumbDistance: Double)
function drawCompletionBar(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color, secondaryFillColor: GantFW.Color, strokeColor: GantFW.Color?, strokeWidth: Double, cornerRadius: Double, allowsResizing: Boolean, thumbDistance: Double)
function drawBarLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font)
function drawAttachmentLabel(for item: GantFW.GanttChartItem, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, font: GantFW.Font)
function draw(dependencyLine: GantFW.GanttChartDependencyLine)
function drawDependencyLine(for dependency: GantFW.GanttChartDependency, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, isHighlighted: Boolean, isFocused: Boolean, isSelected: Boolean, highlightWidth: Double, focusWidth: Double, selectionWidth: Double)
function drawDependencyLineThumb(for item: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyEndType, center: GantFW.Point, radius: Double, color: GantFW.Color)
function drawTemporaryDependencyLine(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem?, type: GantFW.GanttChartDependencyType, as polyline: GantFW.Polyline, color: GantFW.Color, width: Double, arrowWidth: Double, arrowLength: Double, dashWidth: Double)
function drawTemporaryBar(in rectangle: GantFW.Rectangle, color: GantFW.Color, cornerRadius: Double, dashWidth: Double)
function drawTimeArea(for highlighter: GantFW.ScheduleTimeSelector, in rectangle: GantFW.Rectangle, fillColor: GantFW.Color)
function drawTimeArea(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, backgroundColor: GantFW.Color)
function drawTimeAreaBorder(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, line: GantFW.Line, lineWidth: Double, color: GantFW.Color)
function drawTimeAreaLabel(for highlighter: GantFW.TimeSelector, in rectangle: GantFW.Rectangle, text: String, foregroundColor: GantFW.Color, alignment: GantFW.TextAlignment, font: GantFW.Font, verticalAlignment: GantFW.VerticalTextAlignment)
function toolTip(for item: GantFW.GanttChartItem) -> String?
function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
}
extension GantFW.GanttChartContentPresenter {
public function toolTip(for item: GantFW.GanttChartItem) -> String?
public function toolTip(for dependency: GantFW.GanttChartDependency) -> String?
}
public protocol GanttChartContentActivator : Any {
function activate(bar: GantFW.GanttChartBar)
function activate(dependencyLine: GantFW.GanttChartDependencyLine)
function activate(position: GantFW.GanttChartPosition)
}
extension GantFW.GanttChartContentActivator {
public function activate(bar: GantFW.GanttChartBar)
public function activate(dependencyLine: GantFW.GanttChartDependencyLine)
public function activate(position: GantFW.GanttChartPosition)
}
public protocol GanttChartContentEditor : Any {
function canAddNewItem(on row: GantFW.Row, at time: GantFW.Time, isMilestone: Boolean) -> Boolean
function canAddNewDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType) -> Boolean
function canRemoveItem(_ item: GantFW.GanttChartItem) -> Boolean
function canRemoveDependency(_ dependency: GantFW.GanttChartDependency) -> Boolean
function initialize(item: GantFW.GanttChartItem)
function initialize(milestone: GantFW.GanttChartItem)
function initialize(dependency: GantFW.GanttChartDependency)
function canEdit(item: GantFW.GanttChartItem) -> Boolean
function canEdit(dependency: GantFW.GanttChartDependency) -> Boolean
function edit(item: GantFW.GanttChartItem)
function edit(dependency: GantFW.GanttChartDependency)
}
extension GantFW.GanttChartContentEditor {
public function canAddNewItem(on row: GantFW.Row, at time: GantFW.Time, isMilestone: Boolean) -> Boolean
public function canAddNewDependency(from: GantFW.GanttChartItem, to: GantFW.GanttChartItem, type: GantFW.GanttChartDependencyType) -> Boolean
public function canRemoveItem(_ item: GantFW.GanttChartItem) -> Boolean
public function canRemoveDependency(_ dependency: GantFW.GanttChartDependency) -> Boolean
public function initialize(item: GantFW.GanttChartItem)
public function initialize(milestone: GantFW.GanttChartItem)
public function initialize(dependency: GantFW.GanttChartDependency)
public function canEdit(item: GantFW.GanttChartItem) -> Boolean
public function canEdit(dependency: GantFW.GanttChartDependency) -> Boolean
public function edit(item: GantFW.GanttChartItem)
public function edit(dependency: GantFW.GanttChartDependency)
}
public protocol GanttChartContentSelectionObserver : Any {
function selectionDidChange()
}
extension GantFW.GanttChartContentSelectionObserver {
public function selectionDidChange()
}
public protocol GanttChartContentViewportObserver : Any {
function viewportDidChange(to value: GantFW.Rectangle, from originalValue: GantFW.Rectangle)
function zoomDidChange(to value: Double, from originalValue: Double)
}
extension GantFW.GanttChartContentViewportObserver {
public function viewportDidChange(to value: GantFW.Rectangle, from originalValue: GantFW.Rectangle)
public function zoomDidChange(to value: Double, from originalValue: Double)
}
public protocol GanttChartContentStyleProvider : Any {
function style(basedOn style: GantFW.GanttChartContentBaseStyle, for theme: GantFW.Theme, mode: GantFW.Mode) -> GantFW.GanttChartContentBaseStyle
}
public protocol GanttChartContentStyleObserver : Any {
function defaultStyleDidChange(to value: GantFW.GanttChartContentBaseStyle, from originalValue: GantFW.GanttChartContentBaseStyle)
}
extension GantFW.GanttChartContentStyleObserver {
public function defaultStyleDidChange(to value: GantFW.GanttChartContentBaseStyle, from originalValue: GantFW.GanttChartContentBaseStyle)
}
public protocol GanttChartDiagramGenerator : Any {
function dependencyPolyline(from start: GantFW.Rectangle, to finish: GantFW.Rectangle, type: GantFW.GanttChartDependencyType, fromMilestone: Boolean, toMilestone: Boolean) -> GantFW.Polyline
}
public class GanttChartDirectDiagramGenerator : GantFW.GanttChartDiagramGenerator {
public function dependencyPolyline(from start: GantFW.Rectangle, to finish: GantFW.Rectangle, type: GantFW.GanttChartDependencyType, fromMilestone: Boolean, toMilestone: Boolean) -> GantFW.Polyline
}
class GanttChart {
constructor() {
this.scrollableTimeline = null;
this.visibilitySchedule = null;
this.rowHeight = 20;
this.hourWidth = 50;
this.zoom = 1;
this.actualHourWidth = this.hourWidth * this.zoom;
this.preferredTimelineMargin = 10;
this.showsAttachments = false;
this.attachmentLabelWidth = 100;
this.viewportExtensionWidth = 0;
this.viewportExtensionHeight = 0;
this.viewport = { x: 0, y: 0, width: 800, height: 600 };
this.totalDiagramSize = { width: 0, height: 0 };
this.visibleBars = [];
this.visibleDependencyLines = [];
}
visibleBars(area) {
// Filter bars that are within the specified area
return this.visibleBars.filter(bar => {
const bounds = this.bounds(bar.item);
return this.rectIntersects(bounds, area);
});
}
visibleDependencyLines(area) {
// Filter dependency lines that are within the specified area
return this.visibleDependencyLines.filter(line => {
const bounds = this.bounds(line.item);
return this.rectIntersects(bounds, area);
});
}
startX(item) {
return item.start * this.actualHourWidth;
}
finishX(item) {
return item.finish * this.actualHourWidth;
}
topY(item) {
return item.row * this.rowHeight;
}
middleY(item) {
return this.topY(item) + this.rowHeight / 2;
}
bottomY(item) {
return this.topY(item) + this.rowHeight;
}
bounds(item) {
return {
x: this.startX(item),
y: this.topY(item),
width: this.finishX(item) - this.startX(item),
height: this.rowHeight
};
}
bounds(timeRange) {
return {
x: this.x(timeRange.start),
y: 0,
width: this.width(timeRange),
height: this.totalDiagramSize.height
};
}
x(time) {
return time * this.actualHourWidth;
}
width(timeRange) {
return (timeRange.end - timeRange.start) * this.actualHourWidth;
}
completionX(item) {
return this.startX(item) + (item.completion * this.actualHourWidth);
}
completionBounds(item) {
return {
x: this.completionX(item),
y: this.topY(item),
width: (item.finish - item.start) * this.actualHourWidth,
height: this.rowHeight
};
}
top(row) {
return row * this.rowHeight;
}
middle(row) {
return this.top(row) + this.rowHeight / 2;
}
bottom(row) {
return this.top(row) + this.rowHeight;
}
time(x) {
return x / this.actualHourWidth;
}
row(y) {
return Math.floor(y / this.rowHeight);
}
bar(point, maxDistance = null, acceptVerticalDistance = null) {
// Find a bar at the specified point
return this.visibleBars.find(bar => {
const bounds = this.bounds(bar.item);
return this.pointInRect(point, bounds);
});
}
item(point) {
// Find an item at the specified point
return this.bar(point)?.item || null;
}
canEdit(item) {
return true; // Allow editing by default
}
canEditDependency(dependency) {
return true; // Allow editing by default
}
edit(item) {
console.log(`Editing item: ${item}`);
}
editDependency(dependency) {
console.log(`Editing dependency: ${dependency}`);
}
// Utility methods
rectIntersects(rect1, rect2) {
return !(rect2.x > rect1.x + rect1.width ||
rect2.x + rect2.width < rect1.x ||
rect2.y > rect1.y + rect1.height ||
rect2.y + rect2.height < rect1.y);
}
pointInRect(point, rect) {
return point.x >= rect.x && point.x <= rect.x + rect.width &&
point.y >= rect.y && point.y <= rect.y + rect.height;
}
}
// Selection Observer
class GanttChartContentSelectionObserver {
selectionDidChange() {
console.log('Selection changed');
}
}
// Viewport Observer
class GanttChartContentViewportObserver {
viewportDidChange(to, from) {
console.log(`Viewport changed from ${JSON.stringify(from)} to ${JSON.stringify(to)}`);
}
zoomDidChange(to, from) {
console.log(`Zoom changed from ${from} to ${to}`);
}
}
// Style Provider
class GanttChartContentStyleProvider {
style(basedOn, theme, mode) {
return basedOn; // Return the base style by default
}
}
// Style Observer
class GanttChartContentStyleObserver {
defaultStyleDidChange(to, from) {
console.log(`Default style changed from ${JSON.stringify(from)} to ${JSON.stringify(to)}`);
}
}
// Diagram Generator
class GanttChartDirectDiagramGenerator {
dependencyPolyline(from, to, type, fromMilestone, toMilestone) {
return {
points: [from, to]
}; // Return a simple line for dependency
}
}
class GanttChartBar {
constructor(item, start, finish, row, completion = 0, dependencies = []) {
this.item = item;
this.start = start;
this.finish = finish;
this.row = row;
this.completion = completion;
this.dependencies = dependencies; // Dependencies are other GanttChartBar instances
}
// Methods to manipulate the Gantt chart bar
updateStart(newStart) {
this.start = newStart;
}
updateFinish(newFinish) {
this.finish = newFinish;
}
updateRow(newRow) {
this.row = newRow;
}
updateCompletion(newCompletion) {
this.completion = newCompletion;
}
addDependency(dependency) {
if (!this.dependencies.includes(dependency)) {
this.dependencies.push(dependency);
}
}
removeDependency(dependency) {
const index = this.dependencies.indexOf(dependency);
if (index > -1) {
this.dependencies.splice(index, 1);
}
}
// Utility methods
duration() {
return this.finish - this.start;
}
isCompleted() {
return this.completion >= 100;
}
// Method to get a visual representation (could be HTML/CSS or Canvas drawing)
render(context, chart) {
const x = chart.startX(this);
const y = chart.topY(this);
const width = chart.finishX(this) - chart.startX(this);
const height = chart.rowHeight;
const completionWidth = (width * this.completion) / 100;
// Draw the bar
context.fillStyle = 'blue';
context.fillRect(x, y, width, height);
// Draw the completion overlay
context.fillStyle = 'green';
context.fillRect(x, y, completionWidth, height);
// Draw the bar label
context.fillStyle = 'white';
context.fillText(this.item, x + 5, y + height / 2);
}
}
class GanttChartContentController {
constructor(model) {
this.model = model;
this.view = null;
}
setView(view) {
this.view = view;
}
updateContent() {
if (this.view) {
this.view.render(this.model);
}
}
addItem(item) {
this.model.addItem(item);
this.updateContent();
}
removeItem(item) {
this.model.removeItem(item);
this.updateContent();
}
updateItem(item, properties) {
this.model.updateItem(item, properties);
this.updateContent();
}
}
class GanttChartContentSettings {
constructor(rowHeight = 20, hourWidth = 50, zoom = 1) {
this.rowHeight = rowHeight;
this.hourWidth = hourWidth;
this.zoom = zoom;
}
get actualHourWidth() {
return this.hourWidth * this.zoom;
}
}
class GanttChartController {
constructor(ganttChart) {
this.ganttChart = ganttChart;
this.selectedItem = null;
this.selectedDependency = null;
}
selectItem(itemId) {
this.selectedItem = this.ganttChart.getItemById(itemId);
}
deselectItem() {
this.selectedItem = null;
}
selectDependency(fromItemId, toItemId) {
this.selectedDependency = this.ganttChart.getDependenciesForItem(fromItemId)
.find(dep => dep.toItemId === toItemId);
}
deselectDependency() {
this.selectedDependency = null;
}
updateItem(itemId, newProperties) {
const item = this.ganttChart.getItemById(itemId);
if (item) {
Object.assign(item, newProperties);
}
}
addItem(item) {
this.ganttChart.addItem(item);
}
removeItem(itemId) {
this.ganttChart.items = this.ganttChart.items.filter(item => item.id !== itemId);
}
addDependency(dependency) {
this.ganttChart.addDependency(dependency);
}
removeDependency(fromItemId, toItemId) {
this.ganttChart.dependencies = this.ganttChart.dependencies.filter(
dep => dep.fromItemId !== fromItemId || dep.toItemId !== toItemId
);
}
render() {
this.ganttChart.render();
}
}
class GanttChartDependency {
constructor(fromBar, toBar, type) {
this.fromBar = fromBar;
this.toBar = toBar;
this.type = type; // Type of dependency (e.g., "finish-to-start", "start-to-start", etc.)
}
// Methods to get and set the dependency properties
updateFromBar(newFromBar) {
this.fromBar = newFromBar;
}
updateToBar(newToBar) {
this.toBar = newToBar;
}
updateType(newType) {
this.type = newType;
}
// Utility methods
isCyclicDependency() {
// Check if there is a cyclic dependency (simple check)
return this.fromBar === this.toBar;
}
// Method to get a visual representation (could be HTML/CSS or Canvas drawing)
render(context, chart) {
const fromBounds = chart.bounds(this.fromBar);
const toBounds = chart.bounds(this.toBar);
context.strokeStyle = 'black';
context.beginPath();
switch (this.type) {
case 'finish-to-start':
context.moveTo(fromBounds.x + fromBounds.width, fromBounds.y + fromBounds.height / 2);
context.lineTo(toBounds.x, toBounds.y + toBounds.height / 2);
break;
case 'start-to-start':
context.moveTo(fromBounds.x, fromBounds.y + fromBounds.height / 2);
context.lineTo(toBounds.x, toBounds.y + toBounds.height / 2);
break;
case 'finish-to-finish':
context.moveTo(fromBounds.x + fromBounds.width, fromBounds.y + fromBounds.height / 2);
context.lineTo(toBounds.x + toBounds.width, toBounds.y + toBounds.height / 2);
break;
case 'start-to-finish':
context.moveTo(fromBounds.x, fromBounds.y + fromBounds.height / 2);
context.lineTo(toBounds.x + toBounds.width, toBounds.y + toBounds.height / 2);
break;
default:
console.warn(`Unsupported dependency type: ${this.type}`);
}
context.stroke();
}
}
class GanttChartDependencyLineThumbArea {
constructor(x, y, width, height) {
this.position = new GanttChartPosition(x, y);
this.width = width;
this.height = height;
}
containsPoint(x, y) {
return x >= this.position.x && x <= this.position.x + this.width &&
y >= this.position.y && y <= this.position.y + this.height;
}
render(context) {
context.strokeStyle = 'blue';
context.strokeRect(this.position.x, this.position.y, this.width, this.height);
}
}
class GanttChartDirectDiagramGenerator {
constructor() {
this.diagram = null;
}
setDiagram(diagram) {
this.diagram = diagram;
}
generate(model) {
if (this.diagram) {
this.diagram.clear();
model.getItems().forEach(item => {
this.diagram.drawItem(item);
});
model.getDependencies().forEach(dependency => {
this.diagram.drawDependency(dependency);
});
}
}
}
class GanttChartHeaderCell {
constructor(label, styleSource) {
this.label = label;
this.styleSource = styleSource;
}
updateLabel(newLabel) {
this.label = newLabel;
}
updateStyleSource(newStyleSource) {
this.styleSource = newStyleSource;
}
render(context, chart) {
const style = this.styleSource.getStyle(chart.theme, chart.mode);
context.fillStyle = style.backgroundColor;
context.fillRect(0, 0, chart.viewport.width, chart.rowHeight);
context.fillStyle = style.color;
context.fillText(this.label, 5, chart.rowHeight / 2);
}
}
class GanttChartHeaderCellStyleSource {
constructor(baseStyle) {
this.baseStyle = baseStyle;
}
getStyle(theme, mode) {
// Customize the style based on theme and mode if needed
return this.baseStyle;
}
}
class GanttChartHeaderController {
constructor(headerSource, headerPresenter) {
this.headerSource = headerSource;
this.headerPresenter = headerPresenter;
}
addHeader(label) {
this.headerSource.addHeader(label);
this.updateView();
}
removeHeader(label) {
this.headerSource.removeHeader(label);
this.updateView();
}
updateView() {
const headers = this.headerSource.getHeaders();
this.headerPresenter.renderHeader(headers);
}
}
class GanttChartHeaderRow {
constructor(cells = []) {
this.cells = cells;
}
addCell(cell) {
this.cells.push(cell);
}
removeCell(cell) {
const index = this.cells.indexOf(cell);
if (index > -1) {
this.cells.splice(index, 1);
}
}
render(context, chart) {
this.cells.forEach(cell => cell.render(context, chart));
}
}
class GanttChartHeaderRowSource {
constructor() {
this.rows = [];
}
addRow(label) {
this.rows.push({ label });
}
removeRow(label) {
this.rows = this.rows.filter(row => row.label !== label);
}
getRows() {
return this.rows;
}
clearRows() {
this.rows = [];
}
}
class GanttChartItem {
constructor(id, name, start, finish, completion = 0) {
this.id = id;
this.name = name;
this.start = start;
this.finish = finish;
this.completion = completion;
}
updateName(newName) {
this.name = newName;
}
updateStart(newStart) {
this.start = newStart;
}
updateFinish(newFinish) {
this.finish = newFinish;
}
updateCompletion(newCompletion) {
this.completion = newCompletion;
}
duration() {
return this.finish - this.start;
}
isCompleted() {
return this.completion >= 100;
}
}
class GanttChartItemAutoSchedulingBehavior {
constructor() {
this.behaviors = [];
}
addBehavior(behavior) {
this.behaviors.push(behavior);
}
removeBehavior(behavior) {
this.behaviors = this.behaviors.filter(b => b !== behavior);
}
apply(item) {
this.behaviors.forEach(behavior => behavior(item));
}
autoSchedule(item, dependencyLagSource) {
const dependencies = dependencyLagSource.getDependencies(item);
dependencies.forEach(dependency => {
const lag = dependencyLagSource.getLag(dependency);
const scheduledStart = new Date(dependency.endDate.getTime() + lag);
item.startDate = scheduledStart;
this.apply(item);
});
}
}
class GanttChartItemBehaviorSet {
constructor() {
this.behaviors = [];
}
addBehavior(behavior) {
this.behaviors.push(behavior);
}
removeBehavior(behavior) {
this.behaviors = this.behaviors.filter(b => b !== behavior);
}
applyBehaviors(item) {
this.behaviors.forEach(behavior => behavior.apply(item));
}
}
class GanttChartItemColumnBehavior {
constructor(columnName) {
this.columnName = columnName;
}
apply(item) {
// Define behavior for the column, e.g., validation or formatting
if (this.columnName === 'startDate') {
// Ensure startDate is before endDate
if (item.startDate > item.endDate) {
throw new Error('Start date must be before end date');
}
}
}
}
class GanttChartItemConstraintBehavior {
constructor() {
this.constraints = [];
}
addConstraint(constraint) {
this.constraints.push(constraint);
}
removeConstraint(constraint) {
this.constraints = this.constraints.filter(c => c !== constraint);
}
apply(item) {
this.constraints.forEach(constraint => constraint.apply(item));
}
check(item) {
return this.constraints.every(constraint => constraint.check(item));
}
}
class GanttChartItemConstraintDefinition {
constructor(type, parameters) {
this.type = type;
this.parameters = parameters;
}
apply(item) {
// Apply the constraint to the item based on its type and parameters
// Implementation specific to the type of constraint
}
check(item) {
// Check the constraint against the item
// Implementation specific to the type of constraint
return true; // Placeholder return value
}
}
class GanttChartItemConstraints {
constructor() {
this.constraintBehaviors = new Map();
}
addBehavior(item, behavior) {
if (!this.constraintBehaviors.has(item)) {
this.constraintBehaviors.set(item, []);
}
this.constraintBehaviors.get(item).push(behavior);
}
removeBehavior(item, behavior) {
if (this.constraintBehaviors.has(item)) {
this.constraintBehaviors.set(item, this.constraintBehaviors.get(item).filter(b => b !== behavior));
}
}
apply(item) {
if (this.constraintBehaviors.has(item)) {
this.constraintBehaviors.get(item).forEach(behavior => behavior.apply(item));
}
}
check(item) {
if (this.constraintBehaviors.has(item)) {
return this.constraintBehaviors.get(item).every(behavior => behavior.check(item));
}
return true;
}
}
class GanttChartItemConstraintSet {
constructor() {
this.constraintDefinitions = [];
}
addConstraintDefinition(definition) {
this.constraintDefinitions.push(definition);
}
removeConstraintDefinition(definition) {
this.constraintDefinitions = this.constraintDefinitions.filter(cd => cd !== definition);
}
getConstraintDefinitions() {
return this.constraintDefinitions;
}
clearConstraintDefinitions() {
this.constraintDefinitions = [];
}
}
class GanttChartItemConstraintSource {
constructor() {
this.constraints = new Map();
}
addConstraint(item, constraint) {
if (!this.constraints.has(item)) {
this.constraints.set(item, []);
}
this.constraints.get(item).push(constraint);
}
removeConstraint(item, constraint) {
if (this.constraints.has(item)) {
this.constraints.set(item, this.constraints.get(item).filter(c => c !== constraint));
}
}
getConstraints(item) {
return this.constraints.get(item) || [];
}
clearConstraints(item) {
this.constraints.delete(item);
}
clearAllConstraints() {
this.constraints.clear();
}
}
class GanttChartItemHierarchicalBehavior {
apply(item) {
// Define behavior for hierarchical structure, e.g., cascading changes to child items
if (item.children && item.children.length > 0) {
item.children.forEach(child => {
// Example: If parent item's start date changes, update children's start dates
child.startDate = item.startDate;
this.apply(child); // Recursively apply to child items
});
}
}
}
class GanttChartItemHierarchicalRelation {
constructor(parent, child) {
this.parent = parent;
this.child = child;
}
}
class GanttChartItemHierarchy {
constructor() {
this.hierarchy = {};
}
addRelation(parent, child) {
if (!this.hierarchy[parent]) {
this.hierarchy[parent] = [];
}
this.hierarchy[parent].push(child);
}
removeRelation(parent, child) {
if (this.hierarchy[parent]) {
this.hierarchy[parent] = this.hierarchy[parent].filter(c => c !== child);
if (this.hierarchy[parent].length === 0) {
delete this.hierarchy[parent];
}
}
}
getChildren(parent) {
return this.hierarchy[parent] || [];
}
getParents() {
return Object.keys(this.hierarchy);
}
clearRelations() {
this.hierarchy = {};
}
}
class GanttChartItemHierarchySource {
constructor() {
this.items = [];
}
addItem(item) {
this.items.push(item);
}
removeItem(item) {
this.items = this.items.filter(i => i !== item);
}
getItems() {
return this.items;
}
clearItems() {
this.items = [];
}
}
class GanttChartItemSettings {
constructor(color = 'blue', backgroundColor = 'lightblue', height = 20) {
this.color = color;
this.backgroundColor = backgroundColor;
this.height = height;
}
}
class GanttChartItemSource {
constructor(items = []) {
this.items = items;
}
addItem(item) {
this.items.push(item);
}
removeItem(itemId) {
this.items = this.items.filter(item => item.id !== itemId);
}
getItemById(itemId) {
return this.items.find(item => item.id === itemId);
}
getAllItems() {
return this.items;
}
}
class GanttChartRowHeaderSource {
constructor() {
this.headers = [];
}
addHeader(label) {
this.headers.push({ label });
}
removeHeader(label) {
this.headers = this.headers.filter(header => header.label !== label);
}
getHeaders() {
return this.headers;
}
clearHeaders() {
this.headers = [];
}
}
class GanttChartTemporaryBar {
constructor(label, startX, endX, yPosition, height) {
this.label = label;
this.startX = startX;
this.endX = endX;
this.yPosition = yPosition;
this.height = height;
}
updateStartX(newStartX) {
this.startX = newStartX;
}
updateEndX(newEndX) {
this.endX = newEndX;
}
updateYPosition(newYPosition) {
this.yPosition = newYPosition;
}
render(context) {
context.fillStyle = 'rgba(0, 0, 255, 0.5)';
context.fillRect(this.startX, this.yPosition, this.endX - this.startX, this.height);
context.strokeStyle = 'black';
context.strokeRect(this.startX, this.yPosition, this.endX - this.startX, this.height);
context.fillStyle = 'black';
context.fillText(this.label, this.startX + 2, this.yPosition + this.height / 2);
}
}
class GanttChartTemporaryDependencyLine {
constructor(fromPosition, toPosition) {
this.fromPosition = fromPosition;
this.toPosition = toPosition;
}
updateToPosition(newToPosition) {
this.toPosition = newToPosition;
}
render(context) {
context.strokeStyle = 'red';
context.beginPath();
context.moveTo(this.fromPosition.x, this.fromPosition.y);
context.lineTo(this.toPosition.x, this.toPosition.y);
context.stroke();
}
}
class HeaderObserverAdapter {
constructor() {
this.callbacks = [];
}
addObserver(callback) {
if (typeof callback === 'function') {
this.callbacks.push(callback);
}
}
removeObserver(callback) {
this.callbacks = this.callbacks.filter(cb => cb !== callback);
}
notifyObservers(event) {
this.callbacks.forEach(callback => callback(event));
}
}
class HeaderPresenterAdapter {
constructor(headerElement) {
this.headerElement = headerElement;
}
renderHeader(data) {
this.headerElement.innerHTML = ''; // Clear existing content
data.forEach(header => {
const headerCell = document.createElement('div');
headerCell.className = 'header-cell';
headerCell.innerText = header.label;
this.headerElement.appendChild(headerCell);
});
}
}
class MomentPeriodSelector extends PeriodSelector {
constructor(momentLibrary) {
super();
this.momentLibrary = momentLibrary;
}
addPeriod(start, end) {
if (this.momentLibrary.isValid(start) && this.momentLibrary.isValid(end)) {
super.addPeriod(start, end);
}
}
}
class PeriodSelector {
constructor() {
this.periods = [];
}
addPeriod(start, end) {
this.periods.push({ start, end });
}
removePeriod(start, end) {
this.periods = this.periods.filter(period => period.start !== start || period.end !== end);
}
getPeriods() {
return this.periods;
}
clearPeriods() {
this.periods = [];
}
}
class Schedule {
constructor(startTime, endTime) {
this.startTime = startTime;
this.endTime = endTime;
this.intervals = [];
}
addInterval(start, end) {
this.intervals.push({ start, end });
}
removeInterval(start, end) {
this.intervals = this.intervals.filter(interval => interval.start !== start || interval.end !== end);
}
isTimeWithinSchedule(time) {
return time >= this.startTime && time <= this.endTime;
}
isTimeInIntervals(time) {
return this.intervals.some(interval => time >= interval.start && time <= interval.end);
}
}
class ScheduleIntersection {
static findIntersection(schedule1, schedule2) {
const intersections = [];
schedule1.intervals.forEach(interval1 => {
schedule2.intervals.forEach(interval2 => {
const start = Math.max(interval1.start, interval2.start);
const end = Math.min(interval1.end, interval2.end);
if (start < end) {
intersections.push({ start, end });
}
});
});
return intersections;
}
}
class ScheduleTimeArea {
constructor(schedule) {
this.schedule = schedule;
this.areas = [];
}
addArea(start, end) {
if (this.schedule.isTimeWithinSchedule(start) && this.schedule.isTimeWithinSchedule(end)) {
this.areas.push({ start, end });
}
}
removeArea(start, end) {
this.areas = this.areas.filter(area => area.start !== start || area.end !== end);
}
getAreas() {
return this.areas;
}
clearAreas() {
this.areas = [];
}
}
class ScheduleTimeSelector {
constructor(schedule) {
this.schedule = schedule;
this.selectedTimes = [];
}
selectTime(time) {
if (this.schedule.isTimeWithinSchedule(time) && !this.selectedTimes.includes(time)) {
this.selectedTimes.push(time);
}
}
deselectTime(time) {
this.selectedTimes = this.selectedTimes.filter(t => t !== time);
}
isSelected(time) {
return this.selectedTimes.includes(time);
}
clearSelection() {
this.selectedTimes = [];
}
}
class Time {
constructor(hours = 0, minutes = 0) {
this.hours = hours;
this.minutes = minutes;
}
toMinutes() {
return this.hours * 60 + this.minutes;
}
fromMinutes(minutes) {
this.hours = Math.floor(minutes / 60);
this.minutes = minutes % 60;
}
addMinutes(minutes) {
const totalMinutes = this.toMinutes() + minutes;
this.fromMinutes(totalMinutes);
}
toString() {
return `${this.hours.toString().padStart(2, '0')}:${this.minutes.toString().padStart(2, '0')}`;
}
}
class TimeArea {
constructor(start, end, style) {
this.start = start;
this.end = end;
this.style = style;
}
render(context) {
context.fillStyle = this.style.fillColor;
context.fillRect(this.start, 0, this.end - this.start, context.canvas.height);
context.strokeStyle = this.style.borderColor;
context.lineWidth = this.style.borderWidth;
context.strokeRect(this.start, 0, this.end - this.start, context.canvas.height);
}
}
class TimeAreaStyle {
constructor(fillColor = 'transparent', borderColor = 'black', borderWidth = 1) {
this.fillColor = fillColor;
this.borderColor = borderColor;
this.borderWidth = borderWidth;
}
}
class TimeAreaStyleSource {
constructor(defaultStyle) {
this.defaultStyle = defaultStyle;
this.styles = {};
}
addStyle(time, style) {
this.styles[time] = style;
}
removeStyle(time) {
delete this.styles[time];
}
getStyle(time) {
return this.styles[time] || this.defaultStyle;
}
getStyles() {
return this.styles;
}
clearStyles() {
this.styles = {};
}
}
class TimeIntervalSource {
constructor() {
this.intervals = [];
}
addInterval(start, end) {
this.intervals.push({ start, end });
}
removeInterval(start, end) {
this.intervals = this.intervals.filter(interval => interval.start !== start || interval.end !== end);
}
getIntervals() {
return this.intervals;
}
clearIntervals() {
this.intervals = [];
}
}
class TimeLabelSource {
constructor() {
this.labels = {};
}
addLabel(time, label) {
this.labels[time] = label;
}
removeLabel(time) {
delete this.labels[time];
}
getLabel(time) {
return this.labels[time] || '';
}
getLabels() {
return this.labels;
}
clearLabels() {
this.labels = {};
}
}
class TimeRange {
constructor(start, end) {
this.start = start;
this.end = end;
}
durationInMinutes() {
return this.end.toMinutes() - this.start.toMinutes();
}
contains(time) {
return this.start.toMinutes() <= time.toMinutes() && time.toMinutes() <= this.end.toMinutes();
}
overlaps(otherRange) {
return this.start.toMinutes() < otherRange.end.toMinutes() && this.end.toMinutes() > otherRange.start.toMinutes();
}
}
class TimeSelector {
constructor() {
this.selectedTimes = [];
}
selectTime(time) {
if (!this.selectedTimes.includes(time)) {
this.selectedTimes.push(time);
}
}
deselectTime(time) {
this.selectedTimes = this.selectedTimes.filter(t => t !== time);
}
isSelected(time) {
return this.selectedTimes.includes(time);
}
clearSelection() {
this.selectedTimes = [];
}
}
class WeekRange {
constructor(startDay, endDay) {
this.startDay = startDay;
this.endDay = endDay;
}
contains(day) {
return this.startDay <= day && day <= this.endDay;
}
overlaps(otherRange) {
return this.startDay <= otherRange.endDay && this.endDay >= otherRange.startDay;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment