Drag[en]gine Script Module DragonScript Script API  1.0
DefaultListElementRenderer Class Reference

Default implementation of ListElementRenderer using Label. More...

Inheritance diagram for DefaultListElementRenderer:
ListElementRenderer EditBindingsListRenderer

Public Member Functions

Widget createRenderer (ListBox listBox)
 Create renderer. More...
 
Object getDefaultObject ()
 Object used to measure default size with. More...
 
Point getDefaultSize (ListBox listBox)
 Default size of list element. More...
 
String getDesignerSelector ()
 Dsigner selector. More...
 
DefaultListElementRenderer new ()
 Create default list element renderer. More...
 
void setDefaultObject (Object object)
 Object used to measure default size with. More...
 
void setDesignerSelector (String selector)
 Set designer selector. More...
 
void updateRenderer (ListBox listBox, Widget renderer, Object element, bool selected, bool focused)
 Update renderer with object state. More...
 

Detailed Description

Default implementation of ListElementRenderer using Label.

Text is set to Object.toString(). Uses a Label widget to display the text. The label designer selectors are stored in the renderer and assigned to all created labels. Two selectors can be assigned one for the selected and one for the deselected (normal) state of the label. They are derived from a base designer selector with the default value 'Label.ListRenderer'. The derived selectors are these:

  • normal (deselected) state: base-selector
  • selected state: base-selector + '.Selected'

Member Function Documentation

◆ createRenderer()

Widget createRenderer ( ListBox  listBox)

Create renderer.

Implements ListElementRenderer.

◆ getDefaultObject()

Object getDefaultObject ( )

Object used to measure default size with.

Default reference object is null.

◆ getDefaultSize()

Point getDefaultSize ( ListBox  listBox)

Default size of list element.

Default implementation constructs a temporary renderer using createRenderer() and updates using updateRenderer() with the assigned minimum size object. The minimum size reported by this renderer instance is returned as default size.

Implements ListElementRenderer.

◆ getDesignerSelector()

String getDesignerSelector ( )

Dsigner selector.

◆ new()

Create default list element renderer.

◆ setDefaultObject()

void setDefaultObject ( Object  object)

Object used to measure default size with.

◆ setDesignerSelector()

void setDesignerSelector ( String  selector)

Set designer selector.

◆ updateRenderer()

void updateRenderer ( ListBox  listBox,
Widget  renderer,
Object  element,
bool  selected,
bool  focused 
)

Update renderer with object state.

Implements ListElementRenderer.


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