Window to enter the chat message in. More...
Public Member Functions | |
| NetworkChatWindow (const WindowDesc *desc, DestType type, int dest) | |
| Create a chat input window. | |
| 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) |
| Callback for when the OSK window is opened. | |
| 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 |
| The type of destination. | |
| StringID | dest_string |
| String representation of the destination. | |
| int | dest |
| The identifier of the destination. | |
Window to enter the chat message in.
Definition at line 287 of file network_chat_gui.cpp.
| NetworkChatWindow::NetworkChatWindow | ( | const WindowDesc * | desc, | |
| DestType | type, | |||
| int | dest | |||
| ) | [inline] |
Create a chat input window.
| desc | Description of the looks of the window. | |
| type | The type of destination. | |
| dest | The actual destination index. |
Definition at line 298 of file network_chat_gui.cpp.
References dest_string, dtype, QueryStringBaseWindow::edit_str_buf, QueryStringBaseWindow::edit_str_size, Window::height, InitializeTextBuffer(), Window::InitNested(), InvalidateWindowData(), lengthof, PositionNetworkChatWindow(), Window::SetFocusedWidget(), WC_NEWS_WINDOW, and WID_NC_TEXTBOX.
| 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 370 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.
| item | The current indexed item to return. This function can, and most likely will, alter item, to skip empty items in the arrays. |
Definition at line 333 of file network_chat_gui.cpp.
References NetworkClientInfo::client_name, FOR_ALL_CLIENT_INFOS_FROM, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_town_pool >::GetPoolSize(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, 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.
| 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 551 of file network_chat_gui.cpp.
References dest.
| virtual void NetworkChatWindow::OnOpenOSKWindow | ( | int | wid | ) | [inline, virtual] |
Callback for when the OSK window is opened.
| wid | The widget the OSK is opened of. |
Reimplemented from QueryStringBaseWindow.
Definition at line 541 of file network_chat_gui.cpp.
References ShowOnScreenKeyboard(), WID_NC_CLOSE, and WID_NC_SENDBUTTON.
1.7.1