Drag[en]gine Script Module DragonScript  1.21
Dragengine.Gui.RangeModel Interface Reference

Value of scrollbar like widgets. More...

Inheritance diagram for Dragengine.Gui.RangeModel:
Dragengine.Gui.DefaultRangeModel

Public Member Functions

void addListener (RangeModelListener listener)
 Add listener. More...
 
int getIncrement ()
 Increment for changing the value by small increments. More...
 
int getMaximum ()
 Maximum value. More...
 
int getMinimum ()
 Minimal value. More...
 
int getPageSize ()
 Size of a page. More...
 
int getValue ()
 Current value. More...
 
void removeListener (RangeModelListener listener)
 Remove listener. More...
 
void setAll (int minimum, int maximum, int pageSize, int value, int increment)
 Set properties. More...
 
void setIncrement (int increment)
 Set increment for changing the value by small increments. More...
 
void setMaximum (int maximum)
 Set maximum value. More...
 
void setMinimum (int minimum)
 Set minimum value. More...
 
void setPageSize (int pageSize)
 Set page size. More...
 
void setValue (int value)
 Set current value clamped to the range. More...
 

Detailed Description

Value of scrollbar like widgets.

Provides value range, page size and current value. The range model is responsible for checking all constraints are met at all time. These are the constraints:

  • minimum_value <= maximum_value
  • page_size >= 1
  • value >= minimum_value
  • value <= maximum_value

If a parameter is changed breaking one or more of these constraints the range model implementor has to adjusted the parameters to fix the constraints.

The increment is used by scroll bars to change the value is the users clicks the scroll buttons.

Member Function Documentation

◆ addListener()

void Dragengine.Gui.RangeModel.addListener ( RangeModelListener  listener)

Add listener.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ getIncrement()

int Dragengine.Gui.RangeModel.getIncrement ( )

Increment for changing the value by small increments.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ getMaximum()

int Dragengine.Gui.RangeModel.getMaximum ( )

Maximum value.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ getMinimum()

int Dragengine.Gui.RangeModel.getMinimum ( )

Minimal value.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ getPageSize()

int Dragengine.Gui.RangeModel.getPageSize ( )

Size of a page.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ getValue()

int Dragengine.Gui.RangeModel.getValue ( )

Current value.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ removeListener()

void Dragengine.Gui.RangeModel.removeListener ( RangeModelListener  listener)

Remove listener.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ setAll()

void Dragengine.Gui.RangeModel.setAll ( int  minimum,
int  maximum,
int  pageSize,
int  value,
int  increment 
)

Set properties.

If the constraints would be broken the maximum value is adjusted then the current value until the condititions hold again.

Exceptions
EInvalidParampageSize is less than 1.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ setIncrement()

void Dragengine.Gui.RangeModel.setIncrement ( int  increment)

Set increment for changing the value by small increments.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ setMaximum()

void Dragengine.Gui.RangeModel.setMaximum ( int  maximum)

Set maximum value.

If the constraints would be broken the maximum value is adjusted then the current value until the conditions hold again.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ setMinimum()

void Dragengine.Gui.RangeModel.setMinimum ( int  minimum)

Set minimum value.

If the constraints would be broken the maximum value is adjusted then the current value until the condititions hold again.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ setPageSize()

void Dragengine.Gui.RangeModel.setPageSize ( int  pageSize)

Set page size.

If the constraints would be broken the current value is adjusted.

Exceptions
EInvalidParampageSize is less than 1.

Implemented in Dragengine.Gui.DefaultRangeModel.

◆ setValue()

void Dragengine.Gui.RangeModel.setValue ( int  value)

Set current value clamped to the range.

Implemented in Dragengine.Gui.DefaultRangeModel.


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