Public Member Functions | Static Public Member Functions | Data Fields

NetworkChatWindow Struct Reference

Inheritance diagram for NetworkChatWindow:
QueryStringBaseWindow Window QueryString ZeroedMemoryAllocator

Public Member Functions

 NetworkChatWindow (const WindowDesc *desc, DestType type, int dest)
const char * ChatTabCompletionNextItem (uint *item)
 Find the next item of the list of things that can be auto-completed.
void ChatTabCompletion ()
 See if we can auto-complete the current text of the user.
virtual void OnPaint ()
virtual Point OnInitialPosition (const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
virtual void UpdateWidgetSize (int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
virtual void DrawWidget (const Rect &r, int widget) const
virtual void OnClick (Point pt, int widget, int click_count)
virtual void OnMouseLoop ()
virtual EventState OnKeyPress (uint16 key, uint16 keycode)
virtual void OnOpenOSKWindow (int wid)
virtual void OnInvalidateData (int data=0, bool gui_scope=true)
 Some data on this window has become invalid.

Static Public Member Functions

static char * ChatTabCompletionFindText (char *buf)
 Find what text to complete.

Data Fields

DestType dtype
StringID dest_string
int dest

Detailed Description

Definition at line 281 of file network_chat_gui.cpp.


Member Function Documentation

static char* NetworkChatWindow::ChatTabCompletionFindText ( char *  buf  )  [inline, static]

Find what text to complete.

It scans for a space from the left and marks the word right from that as to complete. It also writes a at the position of the space (if any). If nothing found, buf is returned.

Definition at line 358 of file network_chat_gui.cpp.

Referenced by ChatTabCompletion().

const char* NetworkChatWindow::ChatTabCompletionNextItem ( uint *  item  )  [inline]

Find the next item of the list of things that can be auto-completed.

Parameters:
item The current indexed item to return. This function can, and most likely will, alter item, to skip empty items in the arrays.
Returns:
Returns the char that matched to the index.

Definition at line 321 of file network_chat_gui.cpp.

References NetworkClientInfo::client_name, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_town_pool >::GetPoolSize(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, lastof, MAX_CLIENT_SLOTS, and SetDParam().

Referenced by ChatTabCompletion().

virtual void NetworkChatWindow::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 539 of file network_chat_gui.cpp.


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