smjg.libs.sdwf.control.ComboBox Class Reference

The smjg.libs.sdwf.control.ComboBox class interfaces a combo box (simple, drop-down or drop-down list). More...

Inheritance diagram for smjg.libs.sdwf.control.ComboBox:

smjg.libs.sdwf.control.ListBox smjg.libs.sdwf.control.Control smjg.libs.sdwf.windowbase.WindowBase

List of all members.

Public Member Functions

 this (Dialog parent, int id)
 Constructs a ComboBox object to interface a given combo box control.
 this (WindowBase parent, int id, string text, Rect position)
 Constructs a combo box to be created at runtime.
override int add (cstring s)
 Adds an item to the end of this list, or in its sorted position if the combo box has the CBS.SORT style.
override int add (int index, cstring s)
 Inserts an item at the given position.
override int remove (int index)
 Removes the item at the given position.
override int find (cstring s, int startAfter=-1, bool beginsWith=false)
 Finds an item in the combo box.
override void removeAll ()
 Removes all items from the list of this combo box, and clears the edit portion.
override string item (int index)
 Gets text of an item in the combo box.
override int findAndSelect (cstring s, int startAfter=-1)
 Finds an item in the combo box beginning with a given string, and selects it.
Public Properties
override int length ()
 The number of items in this combo box.
override int selected ()
 The zero-based index of the currently selected item.
override int selected (int index)
 The zero-based index of the currently selected item.
override int scrollPosition ()
 The zero-based index of the uppermost visible item in the list.
override int scrollPosition (int pos)
 The zero-based index of the uppermost visible item in the list.
bool droppedDown ()
 Whether the list portion of the combo box is visible at the moment.
bool droppedDown (bool d)
 Whether the list portion of the combo box is visible at the moment.
int dropDownWidth ()
 The minimum width, in pixels, of the drop-down list.
int dropDownWidth (int w)
 The minimum width, in pixels, of the drop-down list.
bool extendedUI ()
 Whether this combo box uses the so-called 'extended UI'.
bool extendedUI (bool e)
 Whether this combo box uses the so-called 'extended UI'.
uint maxLength (uint len)
 The maximum number of characters that may be entered the edit portion of this combo box.
uint maxLength ()
 The maximum number of characters that may be entered the edit portion of this combo box.

Public Attributes

mixin EditOperations


Detailed Description

The smjg.libs.sdwf.control.ComboBox class interfaces a combo box (simple, drop-down or drop-down list).

Since:
0.3
Todo:
add more features, probably in line with ListBox and EditBox.

Constructor & Destructor Documentation

smjg.libs.sdwf.control.ComboBox.this ( Dialog  parent,
int  id 
)

Constructs a ComboBox object to interface a given combo box control.

Parameters:
parent the dialog on which the control is placed.
id numeric ID of the control.
Precondition:
The parent interface element must already have been created. ComboBox objects should be constructed in an overridden Dialog.setup method, not in the constructor of a Dialog subclass.
Status:
done

Reimplemented from smjg.libs.sdwf.control.ListBox.

smjg.libs.sdwf.control.ComboBox.this ( WindowBase  parent,
int  id,
string  text,
Rect  position 
)

Constructs a combo box to be created at runtime.

Parameters:
parent the window or dialog on which the combo box will be placed.
id numeric ID that the combo box will have.
text the text that will initially be placed in the combo box's edit portion.
position the position on the parent window where the combo box will be placed. The height of the rectangle will be the combined height of the combo box's edit and list portions.
Since:
0.4
Status:
done


Member Function Documentation

override int smjg.libs.sdwf.control.ComboBox.add ( cstring  s  ) 

Adds an item to the end of this list, or in its sorted position if the combo box has the CBS.SORT style.

Parameters:
s text of item to add.
Returns:
zero-based index of added item.
Status:
done

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.add ( int  index,
cstring  s 
)

Inserts an item at the given position.

Unlike the add(string) form, this method ignores the CBS.SORT style.

Parameters:
index zero-based index at which to add item, or -1 to add to the end of the list.
s text of item to add.
Returns:
zero-based index at which the item was actually added.
Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.remove ( int  index  ) 

Removes the item at the given position.

Parameters:
index zero-based index of item to remove from the list.
Returns:
number of items remaining in the list.
Status:
done

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.find ( cstring  s,
int  startAfter = -1,
bool  beginsWith = false 
)

Finds an item in the combo box.

Parameters:
s string to match.
startAfter zero-based index of item after which to start the search, or -1 to start at the beginning.
beginsWith whether to look for an item merely beginning with s, as opposed to an exact match.
Returns:
zero-based index of item found.
Return values:
-1 if no matching item was found.
Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override void smjg.libs.sdwf.control.ComboBox.removeAll (  ) 

Removes all items from the list of this combo box, and clears the edit portion.

Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override string smjg.libs.sdwf.control.ComboBox.item ( int  index  ) 

Gets text of an item in the combo box.

Parameters:
index zero-based index of item to inspect.
Returns:
the text of the requested item.
Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.findAndSelect ( cstring  s,
int  startAfter = -1 
)

Finds an item in the combo box beginning with a given string, and selects it.

Parameters:
s string to match.
startAfter zero-based index of item after which to start the search, or -1 to start at the beginning.
Returns:
zero-based index of item found.
Return values:
-1 if no matching item was found.
Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.length (  ) 

The number of items in this combo box.

Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.selected (  ) 

The zero-based index of the currently selected item.

A value of -1 denotes that no item is selected.

Status:
done

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.selected ( int  index  ) 

The zero-based index of the currently selected item.

A value of -1 denotes that no item is selected.

Status:
test

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.scrollPosition (  ) 

The zero-based index of the uppermost visible item in the list.

Status:
done

Reimplemented from smjg.libs.sdwf.control.ListBox.

override int smjg.libs.sdwf.control.ComboBox.scrollPosition ( int  pos  ) 

The zero-based index of the uppermost visible item in the list.

If set to an index that would scroll the list beyond the last item, it scrolls to the end of the list.

Status:
done

Reimplemented from smjg.libs.sdwf.control.ListBox.

bool smjg.libs.sdwf.control.ComboBox.droppedDown (  ) 

Whether the list portion of the combo box is visible at the moment.

Status:
test

bool smjg.libs.sdwf.control.ComboBox.droppedDown ( bool  d  ) 

Whether the list portion of the combo box is visible at the moment.

Status:
test

int smjg.libs.sdwf.control.ComboBox.dropDownWidth (  ) 

The minimum width, in pixels, of the drop-down list.

Status:
test

int smjg.libs.sdwf.control.ComboBox.dropDownWidth ( int  w  ) 

The minimum width, in pixels, of the drop-down list.

Status:
test

bool smjg.libs.sdwf.control.ComboBox.extendedUI (  ) 

Whether this combo box uses the so-called 'extended UI'.

This has an effect only on drop-down combo boxes (CBS_DROPDOWN and CBS_DROPDOWNLIST styles).

Status:
done

bool smjg.libs.sdwf.control.ComboBox.extendedUI ( bool  e  ) 

Whether this combo box uses the so-called 'extended UI'.

This has an effect only on drop-down combo boxes (CBS_DROPDOWN and CBS_DROPDOWNLIST styles).

Status:
done

uint smjg.libs.sdwf.control.ComboBox.maxLength ( uint  len  ) 

The maximum number of characters that may be entered the edit portion of this combo box.

Status:
test

uint smjg.libs.sdwf.control.ComboBox.maxLength (  ) 

The maximum number of characters that may be entered the edit portion of this combo box.

Since:
0.51


Member Data Documentation

mixin smjg.libs.sdwf.control.ComboBox.EditOperations


The documentation for this class was generated from the following file:
Generated on Sun Jan 11 21:54:11 2009 for Stewart's D Windows Framework by  doxygen 1.5.4