|
Drag[en]gine Script Module DragonScript 1.35
|
Action slide. More...
Classes | |
| class | ActionSlideDown |
| Action slide down action. More... | |
| class | ActionSlidePageDown |
| Action slide page down action. More... | |
| class | ActionSlidePageUp |
| Action slide page up action. More... | |
| class | ActionSlideUp |
| Action slide up action. More... | |
| enum | DragArea |
| class | DragKnobMouseListener |
| Drag knob mouse listener. More... | |
| class | KnobKeyListener |
| Knob key listener. More... | |
| class | SliderLayout |
| Slider layout. More... | |
Public Member Functions | |
| void | dispose () |
| Dispose of widget. | |
| void | doLayout () |
| Layout widget. | |
| void | focusDirectional (int direction) |
| Point | getFocusMouseLocation () |
| int | getKnobOffset () |
| Knob offset along orientation axis. | |
| Point | getKnobPosition (int value) |
| Knob position matching model value. | |
| int | getKnobValue (Point position) |
| Closest model value matching knob position. | |
| RangeModel | getModel () |
| Range model. | |
| Orientation | getOrientation () |
| Orientation. | |
| bool | getReverseWheel () |
| Reverse wheel direction. | |
| bool | getShowTicks () |
| Show ticks. | |
| RectArea | getSlideArea () |
| Slide area in pixels. | |
| int | getSliderSize () |
| Slider size along non-orientation axis. | |
| float | getSmallTickCountRatio () |
| Percentage of small ticks to show per large tick. | |
| int | getTickSize () |
| Tick size along orientation axis. | |
| Widget | getWidgetBar () |
| Bar widget. | |
| Widget | getWidgetKnob () |
| Knob widget. | |
| ActionSlide | new (Orientation orientation) |
| Create slide widget. | |
| ActionSlide | new (Slider slider) |
| ActionSlide | new (Slider slider, bool isWheelAction) |
| void | onAction (ActionEvent event) |
| Run action. | |
| void | onButtonPress (MouseEvent event) |
| void | onButtonRelease (MouseEvent event) |
| void | onDesignerChanged () |
| Designer changed. | |
| void | onGuiThemeChanged () |
| void | onResize (WidgetEvent event) |
| Size changed. | |
| void | rangeChanged (RangeModel rangeModel) |
| void | repositionKnob () |
| Reposition knob to match current model value. | |
| void | setEnabled (bool enabled) |
| Set if widget is enabled. | |
| void | setModel (RangeModel model) |
| Set range model. | |
| void | setOrientation (Orientation orientation) |
| Set orientation. | |
| void | setReverseWheel (bool reverseWheel) |
| Set reverse wheel direction. | |
| void | setShowTicks (bool showTicks) |
| Set show ticks. | |
| void | setSmallTickCountRatio (float ratio) |
| Set percentage of small ticks to show per large tick. | |
| void | valueChanged (RangeModel rangeModel) |
| Public Member Functions inherited from Dragengine.Gui.Events.DefaultActionListener | |
| DefaultActionListener | new () |
| Create default action listener. | |
Public Attributes | |
| int | pKnobOffset |
| RangeModel | pModel |
| Orientation | pOrientation |
| RepeatActionTimer | pRepeatSlideTimer |
| bool | pReverseWheel |
| bool | pShowTicks |
| RectArea | pSlideArea |
| int | pSliderSize |
| float | pSmallTickCountRatio |
| int | pTickSize |
| Widget | pWidgetBar |
| Widget | pWidgetKnob |
Protected Member Functions | |
| void | createContent () |
| WidgetDesigner | getDesignerFromTheme () |
| Get designer from gui theme. | |
| bool | increaseValue () |
Protected Attributes | |
| bool | pIsWheelAction |
| Slider | pSlider |
Action slide.
|
protected |
Create content widgets.
References createContent(), dispose(), getModel(), getOrientation(), getReverseWheel(), getShowTicks(), getSmallTickCountRatio(), new(), pModel, pOrientation, pReverseWheel, pShowTicks, pSmallTickCountRatio, pWidgetBar, pWidgetKnob, repositionKnob(), setModel(), setOrientation(), setReverseWheel(), setShowTicks(), and setSmallTickCountRatio().
Referenced by createContent().
| void Dragengine.Gui.Slider.ActionSlide.dispose | ( | ) |
Dispose of widget.
Referenced by createContent().
| void Dragengine.Gui.Slider.ActionSlide.doLayout | ( | ) |
Layout widget.
References Dragengine.Gui.Container.runWhileBlockingLayout().
Referenced by getKnobOffset().
| void Dragengine.Gui.Slider.ActionSlide.focusDirectional | ( | int | direction | ) |
|
protected |
Get designer from gui theme.
Modified to ensure a DefaultSliderDesigner is used if super.getDesignerFromTheme() returns null.
References pKnobOffset, pModel, pRepeatSlideTimer, pReverseWheel, pShowTicks, pSlideArea, pSliderSize, pSmallTickCountRatio, pTickSize, pWidgetBar, and pWidgetKnob.
| Point Dragengine.Gui.Slider.ActionSlide.getFocusMouseLocation | ( | ) |
| int Dragengine.Gui.Slider.ActionSlide.getKnobOffset | ( | ) |
Knob offset along orientation axis.
Stored value from designer.
References doLayout(), getSliderSize(), and pWidgetKnob.
| Point Dragengine.Gui.Slider.ActionSlide.getKnobPosition | ( | int | value | ) |
| int Dragengine.Gui.Slider.ActionSlide.getKnobValue | ( | Point | position | ) |
Closest model value matching knob position.
References pModel, pShowTicks, and pSliderSize.
| RangeModel Dragengine.Gui.Slider.ActionSlide.getModel | ( | ) |
| Orientation Dragengine.Gui.Slider.ActionSlide.getOrientation | ( | ) |
Orientation.
References new(), and pSlider.
Referenced by createContent(), getWidgetBar(), and onGuiThemeChanged().
| bool Dragengine.Gui.Slider.ActionSlide.getReverseWheel | ( | ) |
Reverse wheel direction.
If false wheeling up decreases the range model. If true increases the range model.
References getModel(), and pSlider.
Referenced by createContent(), Dragengine.Gui.Slider.ActionSlide.ActionSlidePageDown.onAction(), and Dragengine.Gui.Slider.ActionSlide.DragKnobMouseListener.onMouseMove().
| bool Dragengine.Gui.Slider.ActionSlide.getShowTicks | ( | ) |
Show ticks.
If page size in model is 1 shows only large ticks. Otherwise shows large ticks every page size step with small ticks for each value step. If the density is too large tick count is reduced.
References getModel(), and pSlider.
Referenced by createContent().
| RectArea Dragengine.Gui.Slider.ActionSlide.getSlideArea | ( | ) |
Slide area in pixels.
For horizontal slider returns X coordinate of left and right slide end point and Y coordinate center of slider. For vertical slider returns Y coordinate of top and bottom slide end point and X coordinate center of slider.
| int Dragengine.Gui.Slider.ActionSlide.getSliderSize | ( | ) |
Slider size along non-orientation axis.
Stored value from designer.
References pWidgetBar, pWidgetKnob, and Dragengine.Gui.Container.removeWidget().
Referenced by getKnobOffset().
| float Dragengine.Gui.Slider.ActionSlide.getSmallTickCountRatio | ( | ) |
Percentage of small ticks to show per large tick.
Value is in the range from 0 to 1. Model page size is multiplied by this value to get the count of small ticks to show.
References Dragengine.Gui.Container.addWidget(), and new().
Referenced by createContent().
| int Dragengine.Gui.Slider.ActionSlide.getTickSize | ( | ) |
Tick size along orientation axis.
Stored value from designer.
References Dragengine.Gui.Widget.getPadding(), and pWidgetBar.
| Widget Dragengine.Gui.Slider.ActionSlide.getWidgetBar | ( | ) |
Bar widget.
References getOrientation(), pWidgetBar, Dragengine.Gui.Widget.setPosition(), and Dragengine.Gui.Widget.setSize().
| Widget Dragengine.Gui.Slider.ActionSlide.getWidgetKnob | ( | ) |
Knob widget.
References pWidgetBar, Dragengine.Gui.Widget.setPosition(), and Dragengine.Gui.Widget.setSize().
|
protected |
Reimplemented in Dragengine.Gui.Slider.ActionSlide.ActionSlideDown, and Dragengine.Gui.Slider.ActionSlide.ActionSlideUp.
References pIsWheelAction.
Referenced by Dragengine.Gui.Slider.ActionSlide.ActionSlidePageUp.new(), Dragengine.Gui.Slider.ActionSlide.ActionSlidePageDown.onAction(), and Dragengine.Gui.Slider.ActionSlide.DragKnobMouseListener.onButtonRelease().
| ActionSlide Dragengine.Gui.Slider.ActionSlide.new | ( | Orientation | orientation | ) |
Create slide widget.
References getModel(), and pSlider.
| ActionSlide Dragengine.Gui.Slider.ActionSlide.new | ( | Slider | slider | ) |
Reimplemented in Dragengine.Gui.Slider.ActionSlide.ActionSlideDown, and Dragengine.Gui.Slider.ActionSlide.ActionSlideUp.
References new(), and pSlider.
Referenced by createContent(), getKnobPosition(), getOrientation(), getSmallTickCountRatio(), new(), onAction(), onDesignerChanged(), and onGuiThemeChanged().
| ActionSlide Dragengine.Gui.Slider.ActionSlide.new | ( | Slider | slider, |
| bool | isWheelAction ) |
Reimplemented in Dragengine.Gui.Slider.ActionSlide.ActionSlideDown, and Dragengine.Gui.Slider.ActionSlide.ActionSlideUp.
| void Dragengine.Gui.Slider.ActionSlide.onAction | ( | ActionEvent | event | ) |
Run action.
Reimplemented from Dragengine.Gui.Events.DefaultActionListener.
References new(), and pSlider.
Referenced by Dragengine.Gui.Slider.ActionSlide.KnobKeyListener.onKeyPress(), and Dragengine.Gui.Slider.ActionSlide.SliderLayout.removeWidget().
| void Dragengine.Gui.Slider.ActionSlide.onButtonPress | ( | MouseEvent | event | ) |
Mouse button has been pressed.
References Dragengine.Gui.Container.getMinimumSize(), and Dragengine.Gui.Container.getMinimumSizeForHeight().
| void Dragengine.Gui.Slider.ActionSlide.onButtonRelease | ( | MouseEvent | event | ) |
Mouse button has been released.
References pOrientation.
| void Dragengine.Gui.Slider.ActionSlide.onDesignerChanged | ( | ) |
Designer changed.
References new().
| void Dragengine.Gui.Slider.ActionSlide.onGuiThemeChanged | ( | ) |
Notification that the gui theme changed.
References getOrientation(), and new().
| void Dragengine.Gui.Slider.ActionSlide.onResize | ( | WidgetEvent | event | ) |
Size changed.
References Dragengine.Gui.Container.getMinimumSize(), and Dragengine.Gui.Container.getMinimumSizeForWidth().
| void Dragengine.Gui.Slider.ActionSlide.rangeChanged | ( | RangeModel | rangeModel | ) |
Send if the outer range properties like minimum value, maximum value or page size has changed.
References pWidgetKnob, and Dragengine.Gui.Widget.setSize().
| void Dragengine.Gui.Slider.ActionSlide.repositionKnob | ( | ) |
Reposition knob to match current model value.
References pKnobOffset, pSmallTickCountRatio, and pTickSize.
Referenced by createContent(), and valueChanged().
| void Dragengine.Gui.Slider.ActionSlide.setEnabled | ( | bool | enabled | ) |
Set if widget is enabled.
| void Dragengine.Gui.Slider.ActionSlide.setModel | ( | RangeModel | model | ) |
| void Dragengine.Gui.Slider.ActionSlide.setOrientation | ( | Orientation | orientation | ) |
| void Dragengine.Gui.Slider.ActionSlide.setReverseWheel | ( | bool | reverseWheel | ) |
Set reverse wheel direction.
If false wheeling up decreases the range model. If true increases the range model.
References getModel(), and pSlider.
Referenced by createContent().
| void Dragengine.Gui.Slider.ActionSlide.setShowTicks | ( | bool | showTicks | ) |
Set show ticks.
If page size in model is 1 shows only large ticks. Otherwise shows large ticks every page size step with small ticks for each value step. If the density is too large tick count is reduced.
References pWidgetBar, and pWidgetKnob.
Referenced by createContent().
| void Dragengine.Gui.Slider.ActionSlide.setSmallTickCountRatio | ( | float | ratio | ) |
Set percentage of small ticks to show per large tick.
Value is in the range from 0 to 1. Model page size is multiplied by this value to get the count of small ticks to show.
References pWidgetBar, and pWidgetKnob.
Referenced by createContent().
| void Dragengine.Gui.Slider.ActionSlide.valueChanged | ( | RangeModel | rangeModel | ) |
Send if the value has changed.
References Dragengine.Gui.Container.getMinimumSize(), and repositionKnob().
|
protected |
| int Dragengine.Gui.Slider.ActionSlide.pKnobOffset |
Referenced by getDesignerFromTheme(), and repositionKnob().
| RangeModel Dragengine.Gui.Slider.ActionSlide.pModel |
Referenced by createContent(), getDesignerFromTheme(), getKnobPosition(), and getKnobValue().
| Orientation Dragengine.Gui.Slider.ActionSlide.pOrientation |
Referenced by createContent(), and onButtonRelease().
| RepeatActionTimer Dragengine.Gui.Slider.ActionSlide.pRepeatSlideTimer |
Referenced by getDesignerFromTheme().
| bool Dragengine.Gui.Slider.ActionSlide.pReverseWheel |
Referenced by createContent(), and getDesignerFromTheme().
| bool Dragengine.Gui.Slider.ActionSlide.pShowTicks |
Referenced by createContent(), getDesignerFromTheme(), and getKnobValue().
| RectArea Dragengine.Gui.Slider.ActionSlide.pSlideArea |
Referenced by getDesignerFromTheme().
|
protected |
Referenced by Dragengine.Gui.Slider.ActionSlide.SliderLayout.getMinimumSizeForHeight(), getOrientation(), getReverseWheel(), getShowTicks(), Dragengine.Gui.Slider.ActionSlide.ActionSlideUp.new(), new(), new(), Dragengine.Gui.Slider.ActionSlide.SliderLayout.new(), onAction(), Dragengine.Gui.Slider.ActionSlide.SliderLayout.removeWidget(), setModel(), setOrientation(), and setReverseWheel().
| int Dragengine.Gui.Slider.ActionSlide.pSliderSize |
Referenced by getDesignerFromTheme(), and getKnobValue().
| float Dragengine.Gui.Slider.ActionSlide.pSmallTickCountRatio |
Referenced by createContent(), getDesignerFromTheme(), and repositionKnob().
| int Dragengine.Gui.Slider.ActionSlide.pTickSize |
Referenced by getDesignerFromTheme(), and repositionKnob().
| Widget Dragengine.Gui.Slider.ActionSlide.pWidgetBar |
Referenced by createContent(), getDesignerFromTheme(), getSliderSize(), getTickSize(), getWidgetBar(), getWidgetKnob(), setShowTicks(), and setSmallTickCountRatio().
| Widget Dragengine.Gui.Slider.ActionSlide.pWidgetKnob |
Referenced by createContent(), getDesignerFromTheme(), getKnobOffset(), getSliderSize(), rangeChanged(), setShowTicks(), and setSmallTickCountRatio().