#include <ListBox.h>
Inheritance diagram for GG::ListBox:
Signal Types | |
typedef boost::signal< void()> | ClearedSignalType |
typedef boost::signal< void(const std::set< int > &)> | SelChangedSignalType |
typedef boost::signal< void(int, ListBox::Row *)> | RowSignalType |
typedef boost::signal< void(int, ListBox::Row *, const Pt &)> | RowClickSignalType |
typedef RowSignalType | InsertedSignalType |
typedef RowSignalType | DroppedSignalType |
typedef RowClickSignalType | LeftClickedSignalType |
typedef RowClickSignalType | RightClickedSignalType |
typedef RowSignalType | DoubleClickedSignalType |
typedef RowSignalType | ErasedSignalType |
typedef boost::signal< void(int)> | BrowsedSignalType |
Slot Types | |
typedef ClearedSignalType::slot_type | ClearedSlotType |
typedef SelChangedSignalType::slot_type | SelChangedSlotType |
typedef InsertedSignalType::slot_type | InsertedSlotType |
typedef LeftClickedSignalType::slot_type | LeftClickedSlotType |
typedef RightClickedSignalType::slot_type | RightClickedSlotType |
typedef DoubleClickedSignalType::slot_type | DoubleClickedSlotType |
typedef ErasedSignalType::slot_type | ErasedSlotType |
typedef DroppedSignalType::slot_type | DroppedSlotType |
typedef BrowsedSignalType::slot_type | BrowsedSlotType |
Accessors | |
ClearedSignalType | ClearedSignal |
SelChangedSignalType | SelChangedSignal |
InsertedSignalType | InsertedSignal |
DroppedSignalType | DroppedSignal |
LeftClickedSignalType | LeftClickedSignal |
RightClickedSignalType | RightClickedSignal |
DoubleClickedSignalType | DoubleClickedSignal |
ErasedSignalType | ErasedSignal |
BrowsedSignalType | BrowsedSignal |
virtual Pt | MinUsableSize () const |
virtual Pt | ClientUpperLeft () const |
virtual Pt | ClientLowerRight () const |
bool | Empty () const |
const Row & | GetRow (int n) const |
int | Caret () const |
const std::set< int > & | Selections () const |
bool | Selected (int n) const |
Clr | InteriorColor () const |
Clr | HiliteColor () const |
Flags< ListBoxStyle > | Style () const |
const Row & | ColHeaders () const |
int | FirstRowShown () const |
int | FirstColShown () const |
int | LastVisibleRow () const |
int | LastVisibleCol () const |
int | NumRows () const |
int | NumCols () const |
bool | KeepColWidths () const |
int | SortCol () const |
int | ColWidth (int n) const |
Alignment | ColAlignment (int n) const |
Alignment | RowAlignment (int n) const |
const std::set< std::string > & | AllowedDropTypes () const |
bool | AutoScrollDuringDragDrops () const |
int | AutoScrollMargin () const |
int | AutoScrollInterval () const |
Structors | |
ListBox (int x, int y, int w, int h, Clr color, Clr interior=CLR_ZERO, Flags< WndFlag > flags=CLICKABLE) | |
virtual | ~ListBox () |
Mutators | |
virtual void | StartingChildDragDrop (const Wnd *wnd, const GG::Pt &offset) |
virtual void | AcceptDrops (std::list< Wnd * > &wnds, const Pt &pt) |
virtual void | ChildrenDraggedAway (const std::list< Wnd * > &wnds, const Wnd *destination) |
virtual void | Render () |
virtual void | KeyPress (Key key, Flags< ModKey > mod_keys) |
virtual void | MouseWheel (const Pt &pt, int move, Flags< ModKey > mod_keys) |
virtual void | DragDropEnter (const Pt &pt, const std::map< Wnd *, Pt > &drag_drop_wnds, Flags< ModKey > mod_keys) |
virtual void | DragDropHere (const Pt &pt, const std::map< Wnd *, Pt > &drag_drop_wnds, Flags< ModKey > mod_keys) |
virtual void | DragDropLeave () |
virtual void | TimerFiring (int ticks, Timer *timer) |
virtual void | SizeMove (const Pt &ul, const Pt &lr) |
virtual void | Disable (bool b=true) |
virtual void | SetColor (Clr c) |
int | Insert (Row *row, int at=-1) |
Row * | Erase (int idx) |
void | Clear () |
void | SelectRow (int n) |
void | DeselectRow (int n) |
void | SelectAll () |
void | DeselectAll () |
Row & | GetRow (int n) |
void | SetSelections (const std::set< int > &s) |
void | SetCaret (int idx) |
void | BringRowIntoView (int n) |
void | SetInteriorColor (Clr c) |
void | SetHiliteColor (Clr c) |
void | SetStyle (Flags< ListBoxStyle > s) |
void | SetColHeaders (Row *r) |
void | RemoveColHeaders () |
void | SetColWidth (int n, int w) |
void | SetNumCols (int n) |
void | SetSortCol (int n) |
void | SetSortCmp (const boost::function< bool(const Row &, const Row &, int)> &sort_cmp) |
void | LockColWidths () |
void | UnLockColWidths () |
void | SetColAlignment (int n, Alignment align) |
void | SetRowAlignment (int n, Alignment align) |
void | AllowDropType (const std::string &str) |
void | DisallowDropType (const std::string &str) |
void | AutoScrollDuringDragDrops (bool auto_scroll) |
void | SetAutoScrollMargin (int margin) |
void | SetAutoScrollInterval (int interval) |
virtual void | DefineAttributes (WndEditor *editor) |
Exceptions | |
GG_ABSTRACT_EXCEPTION (Exception) | |
GG_CONCRETE_EXCEPTION (DontAcceptDrop, GG::ListBox, Exception) | |
Structors | |
ListBox () | |
Accessors | |
int | RightMargin () const |
int | BottomMargin () const |
int | CellMargin () const |
int | RowUnderPt (const Pt &pt) const |
int | OldSelRow () const |
int | OldRDownRow () const |
int | LClickRow () const |
int | RClickRow () const |
bool | AutoScrollingUp () const |
bool | AutoScrollingDown () const |
bool | AutoScrollingLeft () const |
bool | AutoScrollingRight () const |
int | VerticalScrollPadding (int client_height_without_horizontal_scroll) |
int | HorizontalScrollPadding (int client_width_without_vertical_scroll) |
Mutators | |
virtual bool | EventFilter (Wnd *w, const WndEvent &event) |
int | Insert (Row *row, int at, bool dropped) |
Row * | Erase (int idx, bool removing_duplicate) |
void | BringCaretIntoView () |
void | RecreateScrolls () |
void | ResetAutoScrollVars () |
void | Resort () |
Static Public Attributes | |
static const int | BORDER_THICK |
Friends | |
class | DropDownList |
Classes | |
struct | DefaultRowCmp |
sorts two Rows of a ListBox using operator<() on the Row::SortKeyType provided by the rows' SortKey() methods. More... | |
struct | Row |
This is a single item in a listbox. More... |
A ListBox consists of rows of controls, usually text or graphics. Each row represents one item; rows can be added or removed, but not columns or individual controls (though the individual controls can be removed from a row by accessing it directly). Each Row in a ListBox must have the same number of cells and the same cell widths as all the others. If you add a row that has fewer cells than the ListBox you are adding it to, it will be padded with empty cells; likewise, if it has too many cells to fit into the Listbox, it will have cells removed. ListBoxes are designed to be easy to use in common cases, and useful in uncommon cases with only a little work. Adding a row to an empty ListBox will cause the ListBox to take on the number of columns that the row has cells, and each column will have an equal portion of the ListBox's width (any remainder is placed in the last column). This allows you to just add rows to a ListBox without worrying about setting up the ListBox in any way ahead of time. Use LockColWidths() to prevent empty ListBoxes from taking on a new row's number of columns. To create a ListBox with user-defined widths, use the ctor designed for that, or call SetNumCols(), set individual widths with SetColWidth(), and lock the column widths with LockColWidths().
Note that Rows are stored by pointer. If you want to move a Row from one ListBox to another, use GetRow(int) and Insert(Row*, int).
Note that drag-and-drop support is a key part of ListBox's functionality. As such, special effort has been made to make its use as natural and flexible as possible. This includes allowing arbitrary reordering of ListBox rows when the LIST_NOSORT is in effect, and includes the use of the DontAcceptDrop exception. The DontAcceptDrop exception can be thrown by any client of the ListBox in response to its DroppedSignal. Such a throw will cause the drop to be cancelled, even though by the time a client responds to the DroppedSignal, the dropped row is already in place in the ListBox. The exception to this is that the dropped row may be altered with a call to NormalizeRow() before the drop can be reversed; this means that drag-and-drops between ListBoxes with different numbers of columns, or different column widths or alignments should be avoided, or caught and handled. Note that a DroppedSignal is emitted for each row dropped into the ListBox, so individual rows may be accepted or rejected from a single multi-row drop.
Also note that while a ListBox can contain arbitrary Control-derived controls, in order for such controls to be automatically serialized, any user-defined Control subclasses must be registered. See the boost serialization documentation for details.
Definition at line 93 of file ListBox.h.
typedef boost::signal<void ()> GG::ListBox::ClearedSignalType |
typedef boost::signal<void (const std::set<int>&)> GG::ListBox::SelChangedSignalType |
typedef boost::signal<void (int, ListBox::Row*)> GG::ListBox::RowSignalType |
typedef boost::signal<void (int, ListBox::Row*, const Pt&)> GG::ListBox::RowClickSignalType |
typedef boost::signal<void (int)> GG::ListBox::BrowsedSignalType |
typedef ClearedSignalType::slot_type GG::ListBox::ClearedSlotType |
typedef SelChangedSignalType::slot_type GG::ListBox::SelChangedSlotType |
typedef InsertedSignalType::slot_type GG::ListBox::InsertedSlotType |
typedef LeftClickedSignalType::slot_type GG::ListBox::LeftClickedSlotType |
typedef RightClickedSignalType::slot_type GG::ListBox::RightClickedSlotType |
typedef DoubleClickedSignalType::slot_type GG::ListBox::DoubleClickedSlotType |
typedef ErasedSignalType::slot_type GG::ListBox::ErasedSlotType |
typedef DroppedSignalType::slot_type GG::ListBox::DroppedSlotType |
typedef BrowsedSignalType::slot_type GG::ListBox::BrowsedSlotType |
GG::ListBox::ListBox | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
Clr | color, | |||
Clr | interior = CLR_ZERO , |
|||
Flags< WndFlag > | flags = CLICKABLE | |||
) |
basic ctor
virtual GG::ListBox::~ListBox | ( | ) | [virtual] |
virtual dtor
GG::ListBox::ListBox | ( | ) | [protected] |
default ctor
virtual Pt GG::ListBox::MinUsableSize | ( | ) | const [virtual] |
returns the size of the minimum bounding box that can enclose the Wnd and still show all of its elements, plus enough room for interaction with those elements (if applicable).
For example, a TextControl's MinUsableSize() is just the area of its text, and a Scroll's RenderableMinSize() is the combined sizes of its up-button, down-button, and tab (plus a bit of room in which to drag the tab).
Reimplemented from GG::Wnd.
virtual Pt GG::ListBox::ClientUpperLeft | ( | ) | const [virtual] |
returns upper-left corner of window's client area in screen coordinates (or of the entire area, if no client area is specified).
Virtual because different windows have different shapes (and so ways of calculating client area)
Reimplemented from GG::Wnd.
virtual Pt GG::ListBox::ClientLowerRight | ( | ) | const [virtual] |
returns (one pixel past) lower-right corner of window's client area in screen coordinates (or of the entire area, if no client area is specified).
Virtual because different windows have different shapes (and so ways of calculating client area)
Reimplemented from GG::Wnd.
bool GG::ListBox::Empty | ( | ) | const |
returns true when the ListBox is empty
const Row& GG::ListBox::GetRow | ( | int | n | ) | const |
returns a const reference to the row at index n; not range-checked
int GG::ListBox::Caret | ( | ) | const |
returns the index of the row that has the caret
const std::set<int>& GG::ListBox::Selections | ( | ) | const |
returns a const reference to the set row indexes that is currently selected
bool GG::ListBox::Selected | ( | int | n | ) | const |
returns true if row n is selected
Clr GG::ListBox::InteriorColor | ( | ) | const |
returns the color painted into the client area of the control
Clr GG::ListBox::HiliteColor | ( | ) | const |
returns the color behind selected line items
Flags<ListBoxStyle> GG::ListBox::Style | ( | ) | const |
returns the style flags of the listbox
const Row& GG::ListBox::ColHeaders | ( | ) | const |
returns the row containing the headings for the columns, if any. If undefined, the returned heading Row will have size() 0.
int GG::ListBox::FirstRowShown | ( | ) | const |
returns the index of the first row visible in the listbox
int GG::ListBox::FirstColShown | ( | ) | const |
returns the index of the first column visible in the listbox
int GG::ListBox::LastVisibleRow | ( | ) | const |
last row that could be drawn, taking into account the contents and the size of client area
int GG::ListBox::LastVisibleCol | ( | ) | const |
last column that could be drawn, taking into account the contents and the size of client area
int GG::ListBox::NumRows | ( | ) | const |
returns the total number of rows in the ListBox
int GG::ListBox::NumCols | ( | ) | const |
returns the total number of columns in the ListBox
bool GG::ListBox::KeepColWidths | ( | ) | const |
int GG::ListBox::SortCol | ( | ) | const |
returns the index of the column used to sort rows, when sorting is enabled.
int GG::ListBox::ColWidth | ( | int | n | ) | const |
returns the width of column n in pixels; not range-checked
Alignment GG::ListBox::ColAlignment | ( | int | n | ) | const |
returns the alignment of column n; must be ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT; not range-checked
Alignment GG::ListBox::RowAlignment | ( | int | n | ) | const |
returns the alignment of row n; must be ALIGN_TOP, ALIGN_VCENTER, or ALIGN_BOTTOM; not range-checked
const std::set<std::string>& GG::ListBox::AllowedDropTypes | ( | ) | const |
returns the set of data types allowed to be dropped over this ListBox when drag-and-drop is enabled.
bool GG::ListBox::AutoScrollDuringDragDrops | ( | ) | const |
whether the list should autoscroll when the user is attempting to drop an item into a location that is not currently visible.
int GG::ListBox::AutoScrollMargin | ( | ) | const |
the thickness of the area around the border of the client area that will provoke an auto-scroll, if AutoScrollDuringDragDrops() returns true.
int GG::ListBox::AutoScrollInterval | ( | ) | const |
the number of milliseconds that elapse between row/column scrolls when auto-scrolling.
virtual void GG::ListBox::StartingChildDragDrop | ( | const Wnd * | wnd, | |
const GG::Pt & | offset | |||
) | [virtual] |
indicates to the Wnd that a child Wnd wnd is being dragged in a drag-and-drop operation, which gives it the opportunity to add other associated drag-and-drop Wnds (see GUI::RegisterDragDropWnd()).
offset indicates the position of the mouse relative to wnd's UpperLeft().
Reimplemented from GG::Wnd.
handles a drop of one or more drag-and-drop wnds into this Wnd; the accepted wnds remain in the list wnds; the rejected ones do not.
This function must not not alter the order of the elements in wnds. It may only remove elements.
Reimplemented from GG::Control.
virtual void GG::ListBox::ChildrenDraggedAway | ( | const std::list< Wnd * > & | wnds, | |
const Wnd * | destination | |||
) | [virtual] |
handles the removal of one or more child windows that have been dropped onto another window which has accepted them as drops.
The accepting window retains ownership, so this function must not delete the children. Note that CancellingChildDragDrop() and ChildrenDraggedAway() are always called in that order, and are always called at the end of any drag-and-drop sequence performed on a child of this Wnd, whether the drag-and-drop is successful or not.
Reimplemented from GG::Wnd.
virtual void GG::ListBox::Render | ( | ) | [virtual] |
draws this Wnd.
Note that Wnds being dragged for a drag-and-drop operation are rendered twice -- once in-place as normal, once in the location of the drag operation, attached to the cursor. Such Wnds may wish to render themselves differently in those two cases. To determine which render is being performed, they can call GUI::GetGUI()->RenderingDragDropWnds().
Implements GG::Control.
respond to down-keystrokes (focus window only).
A window may receive KeyPress() messages passed up to it from its children. For instance, Control-derived classes pass KeyPress() messages to their Parent() windows by default.
Reimplemented from GG::Control.
virtual void GG::ListBox::MouseWheel | ( | const Pt & | pt, | |
int | move, | |||
Flags< ModKey > | mod_keys | |||
) | [virtual] |
respond to movement of the mouse wheel (move > 0 indicates the wheel is rolled up, < 0 indicates down)
Reimplemented from GG::Control.
virtual void GG::ListBox::DragDropEnter | ( | const Pt & | pt, | |
const std::map< Wnd *, Pt > & | drag_drop_wnds, | |||
Flags< ModKey > | mod_keys | |||
) | [virtual] |
respond to the cursor entering the Wnd's coords while dragging drag-and-drop Wnds.
The Pts in drag_drop_wnds are the Wnds' offsets from pt.
Reimplemented from GG::Wnd.
virtual void GG::ListBox::DragDropHere | ( | const Pt & | pt, | |
const std::map< Wnd *, Pt > & | drag_drop_wnds, | |||
Flags< ModKey > | mod_keys | |||
) | [virtual] |
respond to cursor moving about within the Wnd, or to cursor lingering within the Wnd for a long period of time, while dragging drag-and-drop Wnds.
A DragDropHere() message will not be generated the first time the cursor enters the window's area. In that case, a DragDropEnter() message is generated The Pts in drag_drop_wnds are the Wnds' offsets from pt.
Reimplemented from GG::Wnd.
virtual void GG::ListBox::DragDropLeave | ( | ) | [virtual] |
respond to cursor leaving the Wnd's bounds while dragging drag-and-drop Wnds.
Reimplemented from GG::Wnd.
virtual void GG::ListBox::TimerFiring | ( | int | ticks, | |
Timer * | timer | |||
) | [virtual] |
virtual void GG::ListBox::Disable | ( | bool | b = true |
) | [virtual] |
virtual void GG::ListBox::SetColor | ( | Clr | c | ) | [virtual] |
int GG::ListBox::Insert | ( | Row * | row, | |
int | at = -1 | |||
) |
Row* GG::ListBox::Erase | ( | int | idx | ) |
removes and returns the row at index idx from the ListBox, or 0 if no such row exists
void GG::ListBox::Clear | ( | ) |
empties the ListBox
void GG::ListBox::SelectRow | ( | int | n | ) |
selects row n
void GG::ListBox::DeselectRow | ( | int | n | ) |
deselects row n
void GG::ListBox::SelectAll | ( | ) |
selects all rows
void GG::ListBox::DeselectAll | ( | ) |
deselects all rows
void GG::ListBox::SetSelections | ( | const std::set< int > & | s | ) |
sets the set of selected rows to s
void GG::ListBox::SetCaret | ( | int | idx | ) |
sets the position of the caret to idx
void GG::ListBox::BringRowIntoView | ( | int | n | ) |
moves the scrollbars so that row n is visible
void GG::ListBox::SetInteriorColor | ( | Clr | c | ) |
sets the color painted into the client area of the control
void GG::ListBox::SetHiliteColor | ( | Clr | c | ) |
sets the color behind selected line items
void GG::ListBox::SetStyle | ( | Flags< ListBoxStyle > | s | ) |
void GG::ListBox::SetColHeaders | ( | Row * | r | ) |
void GG::ListBox::RemoveColHeaders | ( | ) |
removes any columns headings set
void GG::ListBox::SetColWidth | ( | int | n, | |
int | w | |||
) |
sets the width of column
to w; not range-checked
void GG::ListBox::SetNumCols | ( | int | n | ) |
sets the number of columns in the ListBox to n; if no column widths exist before this call, proportional widths are calulated and set, otherwise no column widths are set
void GG::ListBox::SetSortCol | ( | int | n | ) |
sets the index of the column used to sort rows when sorting is enabled; not range-checked
void GG::ListBox::SetSortCmp | ( | const boost::function< bool(const Row &, const Row &, int)> & | sort_cmp | ) |
sets the comparison function used to sort a given pair of Rows during row sorting.
Note that sort_cmp is assumed to produce an ascending order when used to sort; setting the LIST_SORTDESCENDING style can be used to produce a reverse sort.
void GG::ListBox::LockColWidths | ( | ) |
fixes the column widths; by default, an empty ListBox will take on the number of columns of its first added row.
void GG::ListBox::UnLockColWidths | ( | ) |
allows the number of columns to be determined by the first row added to an empty ListBox
void GG::ListBox::SetColAlignment | ( | int | n, | |
Alignment | align | |||
) |
sets the alignment of column n to align; not range-checked
void GG::ListBox::SetRowAlignment | ( | int | n, | |
Alignment | align | |||
) |
sets the alignment of the Row at row index n to align; not range-checked
void GG::ListBox::AllowDropType | ( | const std::string & | str | ) |
allows Rows with data type str to be dropped over this ListBox when drag-and-drop is enabled.
void GG::ListBox::DisallowDropType | ( | const std::string & | str | ) |
disallows Rows with data type str to be dropped over this ListBox when drag-and-drop is enabled.
void GG::ListBox::AutoScrollDuringDragDrops | ( | bool | auto_scroll | ) |
set this to determine whether the list should autoscroll when the user is attempting to drop an item into a location that is not currently visible.
void GG::ListBox::SetAutoScrollMargin | ( | int | margin | ) |
sets the thickness of the area around the border of the client area that will provoke an auto-scroll, if AutoScrollDuringDragDrops() returns true.
void GG::ListBox::SetAutoScrollInterval | ( | int | interval | ) |
sets the number of milliseconds that elapse between row/column scrolls when auto-scrolling.
virtual void GG::ListBox::DefineAttributes | ( | WndEditor * | editor | ) | [virtual] |
provides the attributes of this object that are appropriate for a user to edit in a WndEditor; see WndEditor for details.
Reimplemented from GG::Control.
GG::ListBox::GG_ABSTRACT_EXCEPTION | ( | Exception | ) |
GG::ListBox::GG_CONCRETE_EXCEPTION | ( | DontAcceptDrop | , | |
GG::ListBox | , | |||
Exception | ||||
) |
Thrown by a ListBox that does not wish to accept a received drop, for whatever reason.
This may be throw at any time during the receipt of a drop -- even in client code activated by a DroppedSignal, which is emitted after the drop has been processed and the dropped item inserted.
int GG::ListBox::RightMargin | ( | ) | const [protected] |
space skipped at right of client area for vertical scroll bar
int GG::ListBox::BottomMargin | ( | ) | const [protected] |
space skipped at bottom of client area for horizontal scroll bar
int GG::ListBox::CellMargin | ( | ) | const [inline, protected] |
int GG::ListBox::RowUnderPt | ( | const Pt & | pt | ) | const [protected] |
returns row under pt, if any; value must be checked (it may be < 0 or >= NumRows())
int GG::ListBox::OldSelRow | ( | ) | const [protected] |
returns the last row that was selected with a left-button mouse-down
int GG::ListBox::OldRDownRow | ( | ) | const [protected] |
returns the last row that was selected with a right-button mouse-down
int GG::ListBox::LClickRow | ( | ) | const [protected] |
returns the last row that was left-clicked
int GG::ListBox::RClickRow | ( | ) | const [protected] |
returns the last row that was right-clicked
bool GG::ListBox::AutoScrollingUp | ( | ) | const [protected] |
returns true iff the list is being autoscrolled up due to drag-and-drop
bool GG::ListBox::AutoScrollingDown | ( | ) | const [protected] |
returns true iff the list is being autoscrolled down due to drag-and-drop
bool GG::ListBox::AutoScrollingLeft | ( | ) | const [protected] |
returns true iff the list is being autoscrolled left due to drag-and-drop
bool GG::ListBox::AutoScrollingRight | ( | ) | const [protected] |
returns true iff the list is being autoscrolled right due to drag-and-drop
int GG::ListBox::VerticalScrollPadding | ( | int | client_height_without_horizontal_scroll | ) | [protected] |
Returns the amount of vertical padding it is necessary to add to the combined height of all rows to make the vertical scroll the proper length to fully show the last row.
This is calculated by first determining the first row when the last row is visible, then determining how much left over space would result if only the range first-row-shown to last-row were visible.
int GG::ListBox::HorizontalScrollPadding | ( | int | client_width_without_vertical_scroll | ) | [protected] |
Returns the amount of horizontal padding it is necessary to add to the combined width of all columns to make the horizontal scroll the proper length to fully show the last column.
This is calculated by first determining the first column when the last column is visible, then determining how much left over space would result if only the range first-column-shown to last-column were visible.
int GG::ListBox::Insert | ( | Row * | row, | |
int | at, | |||
bool | dropped | |||
) | [protected] |
insertion sorts into list, or inserts into an unsorted list before index "at"; returns index of insertion point
Row* GG::ListBox::Erase | ( | int | idx, | |
bool | removing_duplicate | |||
) | [protected] |
erases the row at index idx, handling it as a duplicate removal (such as for drag-and-drops within a single ListBox) if indicated
void GG::ListBox::BringCaretIntoView | ( | ) | [protected] |
makes sure caret is visible when scrolling occurs due to keystrokes etc.
void GG::ListBox::RecreateScrolls | ( | ) | [protected] |
recreates the vertical and horizontal scrolls as needed.
void GG::ListBox::ResetAutoScrollVars | ( | ) | [protected] |
resets all variables related to auto-scroll to their initial values
void GG::ListBox::Resort | ( | ) | [protected] |
performs a full resort of all rows, using the current sort functor.
friend class DropDownList [friend] |
allow complete access to DropDownList, which relies on ListBox to do its rendering
ClearedSignalType GG::ListBox::ClearedSignal [mutable] |
DroppedSignalType GG::ListBox::DroppedSignal [mutable] |
ErasedSignalType GG::ListBox::ErasedSignal [mutable] |
BrowsedSignalType GG::ListBox::BrowsedSignal [mutable] |
const int GG::ListBox::BORDER_THICK [static] |