main.cesium.AnimationViewModel.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
@file:Suppress(
"NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE",
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* The view model for the [Animation] widget.
* @see Online Documentation
*
* @constructor
* @property [clockViewModel] The ClockViewModel instance to use.
* @see Online Documentation
*/
@JsName("\$cesium__AnimationViewModel")
external class AnimationViewModel(var clockViewModel: ClockViewModel) {
/**
* Gets or sets whether the shuttle ring is currently being dragged. This property is observable.
* @see Online Documentation
*/
var shuttleRingDragging: Boolean
/**
* Gets or sets whether dragging the shuttle ring should cause the multiplier
* to snap to the defined tick values rather than interpolating between them.
* This property is observable.
* @see Online Documentation
*/
var snapToTicks: Boolean
/**
* Gets the string representation of the current time. This property is observable.
* @see Online Documentation
*/
var timeLabel: String
/**
* Gets the string representation of the current date. This property is observable.
* @see Online Documentation
*/
var dateLabel: String
/**
* Gets the string representation of the current multiplier. This property is observable.
* @see Online Documentation
*/
var multiplierLabel: String
/**
* Gets or sets the current shuttle ring angle. This property is observable.
* @see Online Documentation
*/
var shuttleRingAngle: Double
/**
* Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.
* @return The array of known clock multipliers associated with the shuttle ring.
* @see Online Documentation
*/
fun getShuttleRingTicks(): Array
/**
* Sets the array of positive known clock multipliers to associate with the shuttle ring.
* These values will have negative equivalents created for them and sets both the minimum
* and maximum range of values for the shuttle ring as well as the values that are snapped
* to when a single click is made. The values need not be in order, as they will be sorted
* automatically, and duplicate values will be removed.
* @param [positiveTicks] The list of known positive clock multipliers to associate with the shuttle ring.
* @see Online Documentation
*/
fun setShuttleRingTicks(positiveTicks: Array)
/**
* Gets a command that decreases the speed of animation.
* @see Online Documentation
*/
var slower: Command
/**
* Gets a command that increases the speed of animation.
* @see Online Documentation
*/
var faster: Command
/**
* Gets the pause toggle button view model.
* @see Online Documentation
*/
var pauseViewModel: ToggleButtonViewModel
/**
* Gets the reverse toggle button view model.
* @see Online Documentation
*/
var playReverseViewModel: ToggleButtonViewModel
/**
* Gets the play toggle button view model.
* @see Online Documentation
*/
var playForwardViewModel: ToggleButtonViewModel
/**
* Gets the realtime toggle button view model.
* @see Online Documentation
*/
var playRealtimeViewModel: ToggleButtonViewModel
/**
* Gets or sets the function which formats a date for display.
* @see Online Documentation
*/
var dateFormatter: DateFormatter
/**
* Gets or sets the function which formats a time for display.
* @see Online Documentation
*/
var timeFormatter: TimeFormatter
companion object {
/**
* Gets or sets the default date formatter used by new instances.
* @see Online Documentation
*/
var defaultDateFormatter: DateFormatter
/**
* Gets or sets the default array of known clock multipliers associated with new instances of the shuttle ring.
* @see Online Documentation
*/
var defaultTicks: Array
/**
* Gets or sets the default time formatter used by new instances.
* @see Online Documentation
*/
var defaultTimeFormatter: TimeFormatter
}
}
/**
* A function that formats a date for display.
* @param [date] The date to be formatted
* @param [viewModel] The AnimationViewModel instance requesting formatting.
* @see Online Documentation
*/
typealias DateFormatter = (date: JulianDate, viewModel: AnimationViewModel) -> String
/**
* A function that formats a time for display.
* @param [date] The date to be formatted
* @param [viewModel] The AnimationViewModel instance requesting formatting.
* @see Online Documentation
*/
typealias TimeFormatter = (date: JulianDate, viewModel: AnimationViewModel) -> String