Public Member Functions | |
SignListWindow (const WindowDesc *desc, WindowNumber window_number) | |
void | ClearFilterTextWidget () |
Empties the string buffer that is edited by the filter text edit widget. | |
void | SetFilterString (const char *new_filter_string) |
This function sets the filter string of the sign list. | |
virtual void | OnPaint () |
virtual void | DrawWidget (const Rect &r, int widget) const |
virtual void | SetStringParameters (int widget) const |
virtual void | OnClick (Point pt, int widget, int click_count) |
virtual void | OnResize () |
virtual void | UpdateWidgetSize (int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) |
virtual EventState | OnKeyPress (uint16 key, uint16 keycode) |
virtual void | OnOSKInput (int widget) |
virtual void | OnMouseLoop () |
void | BuildSortSignList () |
virtual void | OnHundredthTick () |
virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
Some data on this window has become invalid. | |
Data Fields | |
int | text_offset |
Offset of the sign text relative to the left edge of the SLW_LIST widget. | |
Scrollbar * | vscroll |
Static Public Attributes | |
static Hotkey< SignListWindow > | signlist_hotkeys [] |
Definition at line 157 of file signs_gui.cpp.
void SignListWindow::ClearFilterTextWidget | ( | ) | [inline] |
Empties the string buffer that is edited by the filter text edit widget.
It also triggers the redraw of the widget so it become visible that the string has been made empty.
Definition at line 186 of file signs_gui.cpp.
References QueryStringBaseWindow::edit_str_buf, Window::SetWidgetDirty(), SLW_FILTER_TEXT, and UpdateTextBufferSize().
virtual void SignListWindow::OnInvalidateData | ( | int | data = 0 , |
|
bool | gui_scope = true | |||
) | [inline, virtual] |
Some data on this window has become invalid.
data | Information about the changed data. | |
gui_scope | Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See InvalidateWindowData() for details. |
Definition at line 387 of file signs_gui.cpp.
References _display_opt, DO_SHOW_COMPETITOR_SIGNS, SignList::filter_string, GUIList< T, F >::ForceRebuild(), GUIList< T, F >::ForceResort(), HasBit(), GUIList< T, F >::SetFilterState(), and StrEmpty().
void SignListWindow::SetFilterString | ( | const char * | new_filter_string | ) | [inline] |
This function sets the filter string of the sign list.
The contents of the edit widget is not updated by this function. Depending on if the new string is zero-length or not the clear button is made disabled/enabled. The sign list is updated according to the new filter.
Definition at line 200 of file signs_gui.cpp.
References _display_opt, Window::DisableWidget(), DO_SHOW_COMPETITOR_SIGNS, Window::EnableWidget(), SignList::filter_string, HasBit(), Window::InvalidateData(), lastof, GUIList< T, F >::SetFilterState(), Window::SetWidgetDirty(), SLW_FILTER_CLEAR_BTN, strecpy(), and StrEmpty().
Hotkey< SignListWindow > SignListWindow::signlist_hotkeys [static] |
{ Hotkey<SignListWindow>('F', "focus_filter_box", SLHK_FOCUS_FILTER_BOX), }
Definition at line 405 of file signs_gui.cpp.