Public Member Functions | Data Fields | Static Public Attributes

SignListWindow Struct Reference

Inheritance diagram for SignListWindow:
QueryStringBaseWindow SignList Window QueryString ZeroedMemoryAllocator

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 WID_SIL_LIST widget.
Scrollbarvscroll

Static Public Attributes

static Hotkey< SignListWindowsignlist_hotkeys []

Detailed Description

Definition at line 158 of file signs_gui.cpp.


Member Function Documentation

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 187 of file signs_gui.cpp.

References QueryStringBaseWindow::edit_str_buf, Window::SetWidgetDirty(), UpdateTextBufferSize(), and WID_SIL_FILTER_TEXT.

virtual void SignListWindow::OnInvalidateData ( int  data = 0,
bool  gui_scope = true 
) [inline, virtual]

Some data on this window has become invalid.

Parameters:
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 385 of file signs_gui.cpp.

References SignList::filter_string, GUIList< T, F >::ForceRebuild(), GUIList< T, F >::ForceResort(), 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 201 of file signs_gui.cpp.

References Window::DisableWidget(), Window::EnableWidget(), SignList::filter_string, Window::InvalidateData(), lastof, Window::SetWidgetDirty(), strecpy(), StrEmpty(), and WID_SIL_FILTER_CLEAR_BTN.


Field Documentation

Hotkey< SignListWindow > SignListWindow::signlist_hotkeys [static]
Initial value:
 {
  Hotkey<SignListWindow>('F', "focus_filter_box", SLHK_FOCUS_FILTER_BOX),

}

Definition at line 398 of file signs_gui.cpp.


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