Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site













SourceForge.net Logo

class ColumnList : public Ctrl

 

 

This widget displays the same type of item in several columns. The number of columns can be altered by user action. Typical use is to display the list of files.

 

Callback WhenEnterItem

Cursor entered a new item. (deprecated, use WhenSel)

 

Callback WhenKillCursor

Cursor left an item. (deprecated, use WhenSel)

 

Callback WhenLeftClick

User clicked the widget with the left mouse button, clicked item has the cursor.

 

Callback1<PointWhenLeftClickPos

Similar to WhenLeftClick but also provides coordinates within clicking item.

 

Callback WhenLeftDouble

User double-clicked the widget with the left mouse button.

 

Callback1<Bar&> WhenBar

Callback to provide the context sensitive menu (upon the right mouse button click). Client code can set this callback with the menu.

 

Callback WhenSelection

Selection status of widget has changed. (deprecated, use WhenSel)

 

Callback WhenSel

Cursor or selection status of widget has changed.

 

int GetColumnItems() const

Return the number of items that fit within the single column at current size.  

 

int GetColumnCx(int i = 0const

Return the current width of column.

 

int GetPageItems() const

Returns the number of items that fit into the current view size.

 

int GetItem(Point p)

Returns the item index for the given point of view area (accounts for scrollbar position too).

 

Rect GetItemRect(int iconst

Returns the item view rectangle.

 

int GetCursor() const

Returns the current cursor position. If there is no cursor, returns negative value.

 

void SetCursor(int c)

Sets the current cursor position. If c is out of range, it is "fixed" (negative becomes 0, >GetCount() becomes GetCount() - 1).

 

void KillCursor()

Cancels the cursor.

 

bool IsCursor() const

Tests whether cursor is at any item. Same as GetCursor() >= 0.

 

int GetSbPos() const

Returns the scrollbar position.

 

void SetSbPos(int y)

Sets the scrollbar position.

 

void SetFrame(CtrlFrame& _frame)

Sets the decorative frame of ColumnList. This is required because ColumnList has special zero index (decorative) frame to provide RoundSize option. Decorative frame set by this method is used by this special rounding frame.

 

void Clear()

Empties the ColumnList.

 

 

void Insert(int ii, const Value& val, bool canselect)

void Insert(int ii, const Value& val, const Display& display, bool canselect)

Insert an item at position ii.If canselect is false, item cannot be selected. If specified, display is used to display the item (otherwise common display as set by SetDisplay is used).

 

void Remove(int ii)

Removes an item at position ii.

 

void Add(const Value& val, bool canselect = true)

void Add(const Value& val, const Display& display, bool canselect)

Adds an item to the ColumnList. If canselect is false, item cannot be selected. If specified, display is used to display the item (otherwise common display as set by SetDisplay is used).

 

int GetCount() const

Returns the current number of items in the list.

 

const ValueGet(int iconst

const Valueoperator[](int iconst

Returns the item with index i.

 

bool IsSelection() const

Test whether any items are selected.

 

void ClearSelection()

Clear the selection.

 

void SelectOne(int i, bool sel)

Sets the selection status for item at position i.

 

bool IsSelected(int iconst

Returns the selection status at position i.

 

bool IsSel(int iconst

If there is selection in the widget, returns true if i is selected, otherwise returns true if cursor is at i.

 

void Sort(const ValueOrder& order)

Sorts items.

 

ColumnList& Columns(int _n)

Sets the number of columns. (User action can change the number of columns by dragging the column boundary too). Returns *this.

 

ColumnList& ItemHeight(int _cy)

Sets the item height in pixels. Returns *this.

 

int GetItemHeight() const

Returns the value set by ItemHeight.

 

ColumnList& RoundSize(bool b = true)

This mode visually changes the decorative frame of ColumnList so that there are no empty areas at the bottom of view (GetSize().cy % GetItemHeight()). Default is off. Returns *this.

 

ColumnList& NoRoundSize()

Same as RoundSize(false). Returns *this.

 

ColumnList& ClickKill(bool b = true)

In this mode, if user clicks on view area that does not contain any items, cursor is canceled. Default is off. Returns *this.

 

ColumnList& NoClickKill()

Same as ClickKill(false). Returns *this.

 

ColumnList& SetDisplay(const Display& d)

Sets the display for items, unless item-specific display is specified in Add or Insert. Returns *this.

 

ColumnList& Multi(bool b = true)

Sets the mode where multiple items can be selected. Returns *this.

 

ColumnList& NoBackground(bool b = true)

Sets the widget into transparent mode - background is not painted and Transparent is activated - a result, anything painted behind the widget is visible, allowing client code to provide any background it needs.

 

bool IsMulti() const

Returns the status of Multi mode.

 

Last edit by unodgs on 07/15/2007. Do you want to contribute?. T++