Public Types | |
enum | AIListWindowWidgets { AIL_WIDGET_CLOSEBOX = 0, AIL_WIDGET_CAPTION, AIL_WIDGET_LIST, AIL_WIDGET_SCROLLBAR, AIL_WIDGET_INFO_BG, AIL_WIDGET_ACCEPT, AIL_WIDGET_CANCEL, AIL_WIDGET_CONTENT_DOWNLOAD, AIL_WIDGET_RESIZE } |
Enum referring to the widgets of the AI list window. More... | |
Public Member Functions | |
AIListWindow (const WindowDesc *desc, CompanyID slot) | |
virtual void | OnPaint () |
This window is currently being repainted. | |
void | ChangeAI () |
virtual void | OnClick (Point pt, int widget) |
A click with the left mouse button has been made on the window. | |
virtual void | OnDoubleClick (Point pt, int widget) |
A double click with the left mouse button has been made on the window. | |
virtual void | OnResize (Point new_size, Point delta) |
Called when the window got resized. | |
Data Fields | |
const AIInfoList * | ai_info_list |
int | selected |
CompanyID | slot |
Definition at line 30 of file ai_gui.cpp.
Enum referring to the widgets of the AI list window.
AIL_WIDGET_CLOSEBOX | Close window button. |
AIL_WIDGET_CAPTION | Window caption. |
AIL_WIDGET_LIST | The matrix with all available AIs. |
AIL_WIDGET_SCROLLBAR | Scrollbar next to the AI list. |
AIL_WIDGET_INFO_BG | Panel to draw some AI information on. |
AIL_WIDGET_ACCEPT | Accept button. |
AIL_WIDGET_CANCEL | Cancel button. |
AIL_WIDGET_CONTENT_DOWNLOAD | Download content button. |
AIL_WIDGET_RESIZE | Resize button. |
Definition at line 32 of file ai_gui.cpp.
virtual void AIListWindow::OnClick | ( | Point | pt, | |
int | widget | |||
) | [inline, virtual] |
A click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. | |
widget | the clicked widget. |
Reimplemented from Window.
Definition at line 122 of file ai_gui.cpp.
References AIL_WIDGET_ACCEPT, AIL_WIDGET_CANCEL, AIL_WIDGET_CONTENT_DOWNLOAD, AIL_WIDGET_LIST, INVALID_STRING_ID, Scrollbar::pos, Window::SetDirty(), Window::vscroll, and Point::y.
virtual void AIListWindow::OnDoubleClick | ( | Point | pt, | |
int | widget | |||
) | [inline, virtual] |
A double click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. | |
widget | the clicked widget. |
Reimplemented from Window.
Definition at line 156 of file ai_gui.cpp.
References AIL_WIDGET_LIST, Scrollbar::pos, Window::vscroll, and Point::y.
Called when the window got resized.
new_size | the new size of the window. | |
delta | the amount of which the window size changed. |
Reimplemented from Window.
Definition at line 171 of file ai_gui.cpp.
References AIL_WIDGET_ACCEPT, AIL_WIDGET_CANCEL, AIL_WIDGET_LIST, Scrollbar::cap, Widget::data, ResizeButtons(), Window::vscroll, Window::widget, Point::x, and Point::y.