Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.Slider.ActionSlide Class Reference

Action slide. More...

Inheritance diagram for Dragengine.Gui.Slider.ActionSlide:
Dragengine.Gui.Events.DefaultActionListener Dragengine.Gui.Events.ActionListener Dragengine.Gui.Slider.ActionSlide.ActionSlideDown Dragengine.Gui.Slider.ActionSlide.ActionSlideUp

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

Detailed Description

Action slide.

Member Function Documentation

◆ createContent()

◆ dispose()

void Dragengine.Gui.Slider.ActionSlide.dispose ( )

Dispose of widget.

Referenced by createContent().

◆ doLayout()

void Dragengine.Gui.Slider.ActionSlide.doLayout ( )

◆ focusDirectional()

void Dragengine.Gui.Slider.ActionSlide.focusDirectional ( int direction)

◆ getDesignerFromTheme()

WidgetDesigner Dragengine.Gui.Slider.ActionSlide.getDesignerFromTheme ( )
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.

◆ getFocusMouseLocation()

Point Dragengine.Gui.Slider.ActionSlide.getFocusMouseLocation ( )

◆ getKnobOffset()

int Dragengine.Gui.Slider.ActionSlide.getKnobOffset ( )

Knob offset along orientation axis.

Stored value from designer.

References doLayout(), getSliderSize(), and pWidgetKnob.

◆ getKnobPosition()

Point Dragengine.Gui.Slider.ActionSlide.getKnobPosition ( int value)

Knob position matching model value.

References new(), and pModel.

◆ getKnobValue()

int Dragengine.Gui.Slider.ActionSlide.getKnobValue ( Point position)

Closest model value matching knob position.

References pModel, pShowTicks, and pSliderSize.

◆ getModel()

◆ getOrientation()

Orientation Dragengine.Gui.Slider.ActionSlide.getOrientation ( )

Orientation.

References new(), and pSlider.

Referenced by createContent(), getWidgetBar(), and onGuiThemeChanged().

◆ getReverseWheel()

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().

◆ getShowTicks()

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().

◆ getSlideArea()

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.

◆ getSliderSize()

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().

◆ getSmallTickCountRatio()

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().

◆ getTickSize()

int Dragengine.Gui.Slider.ActionSlide.getTickSize ( )

Tick size along orientation axis.

Stored value from designer.

References Dragengine.Gui.Widget.getPadding(), and pWidgetBar.

◆ getWidgetBar()

Widget Dragengine.Gui.Slider.ActionSlide.getWidgetBar ( )

◆ getWidgetKnob()

Widget Dragengine.Gui.Slider.ActionSlide.getWidgetKnob ( )

◆ increaseValue()

◆ new() [1/3]

ActionSlide Dragengine.Gui.Slider.ActionSlide.new ( Orientation orientation)

Create slide widget.

References getModel(), and pSlider.

◆ new() [2/3]

◆ new() [3/3]

ActionSlide Dragengine.Gui.Slider.ActionSlide.new ( Slider slider,
bool isWheelAction )

◆ onAction()

void Dragengine.Gui.Slider.ActionSlide.onAction ( ActionEvent event)

◆ onButtonPress()

void Dragengine.Gui.Slider.ActionSlide.onButtonPress ( MouseEvent event)

◆ onButtonRelease()

void Dragengine.Gui.Slider.ActionSlide.onButtonRelease ( MouseEvent event)

Mouse button has been released.

References pOrientation.

◆ onDesignerChanged()

void Dragengine.Gui.Slider.ActionSlide.onDesignerChanged ( )

Designer changed.

References new().

◆ onGuiThemeChanged()

void Dragengine.Gui.Slider.ActionSlide.onGuiThemeChanged ( )

Notification that the gui theme changed.

References getOrientation(), and new().

◆ onResize()

void Dragengine.Gui.Slider.ActionSlide.onResize ( WidgetEvent event)

◆ rangeChanged()

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().

◆ repositionKnob()

void Dragengine.Gui.Slider.ActionSlide.repositionKnob ( )

Reposition knob to match current model value.

References pKnobOffset, pSmallTickCountRatio, and pTickSize.

Referenced by createContent(), and valueChanged().

◆ setEnabled()

void Dragengine.Gui.Slider.ActionSlide.setEnabled ( bool enabled)

Set if widget is enabled.

◆ setModel()

void Dragengine.Gui.Slider.ActionSlide.setModel ( RangeModel model)

Set range model.

References getModel(), and pSlider.

Referenced by createContent().

◆ setOrientation()

void Dragengine.Gui.Slider.ActionSlide.setOrientation ( Orientation orientation)

Set orientation.

References pSlider.

Referenced by createContent().

◆ setReverseWheel()

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().

◆ setShowTicks()

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().

◆ setSmallTickCountRatio()

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().

◆ valueChanged()

void Dragengine.Gui.Slider.ActionSlide.valueChanged ( RangeModel rangeModel)

Send if the value has changed.

References Dragengine.Gui.Container.getMinimumSize(), and repositionKnob().

Member Data Documentation

◆ pIsWheelAction

◆ pKnobOffset

int Dragengine.Gui.Slider.ActionSlide.pKnobOffset

◆ pModel

RangeModel Dragengine.Gui.Slider.ActionSlide.pModel

◆ pOrientation

Orientation Dragengine.Gui.Slider.ActionSlide.pOrientation

Referenced by createContent(), and onButtonRelease().

◆ pRepeatSlideTimer

RepeatActionTimer Dragengine.Gui.Slider.ActionSlide.pRepeatSlideTimer

Referenced by getDesignerFromTheme().

◆ pReverseWheel

bool Dragengine.Gui.Slider.ActionSlide.pReverseWheel

◆ pShowTicks

bool Dragengine.Gui.Slider.ActionSlide.pShowTicks

◆ pSlideArea

RectArea Dragengine.Gui.Slider.ActionSlide.pSlideArea

Referenced by getDesignerFromTheme().

◆ pSlider

◆ pSliderSize

int Dragengine.Gui.Slider.ActionSlide.pSliderSize

◆ pSmallTickCountRatio

float Dragengine.Gui.Slider.ActionSlide.pSmallTickCountRatio

◆ pTickSize

int Dragengine.Gui.Slider.ActionSlide.pTickSize

◆ pWidgetBar

◆ pWidgetKnob


The documentation for this class was generated from the following file: