SaveLoadWindow Struct Reference

Inheritance diagram for SaveLoadWindow:
QueryStringBaseWindow Window QueryString ZeroedMemoryAllocator

Public Member Functions

void GenerateFileName ()
 SaveLoadWindow (const WindowDesc *desc, SaveLoadDialogMode mode)
virtual void DrawWidget (const Rect &r, int widget) const
 Draw the contents of a nested widget.
virtual void UpdateWidgetSize (int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 Update size and resize step of a widget in the window.
virtual void OnPaint ()
 The window must be repainted.
virtual void OnClick (Point pt, int widget, int click_count)
 A click with the left mouse button has been made on the window.
virtual void OnMouseLoop ()
 Called for every mouse loop run, which is at least once per (game) tick.
virtual EventState OnKeyPress (uint16 key, uint16 keycode)
 A key has been pressed.
virtual void OnTimeout ()
 Called when this window's timeout has been reached.
virtual void OnResize ()
 Called after the window got resized.
virtual void OnInvalidateData (int data)
 Some data on this window has become invalid.

Private Attributes

FiosItem o_dir
const FiosItemselected
Scrollbarvscroll

Detailed Description

Definition at line 239 of file fios_gui.cpp.


Member Function Documentation

virtual void SaveLoadWindow::DrawWidget ( const Rect r,
int  widget 
) const [inline, virtual]
virtual void SaveLoadWindow::OnClick ( Point  pt,
int  widget,
int  click_count 
) [inline, virtual]
virtual void SaveLoadWindow::OnInvalidateData ( int  data  )  [inline, virtual]
virtual EventState SaveLoadWindow::OnKeyPress ( uint16  key,
uint16  keycode 
) [inline, virtual]

A key has been pressed.

Parameters:
key the Unicode value of the key.
keycode the untranslated key code including shift state.
Returns:
ES_HANDLED if the key press has been handled and no other window should receive the event.

Reimplemented from Window.

Definition at line 617 of file fios_gui.cpp.

References ES_HANDLED, ES_NOT_HANDLED, Window::HandleButtonClick(), SLWW_SAVE_GAME, and SLWW_SAVE_OSK_TITLE.

virtual void SaveLoadWindow::OnPaint (  )  [inline, virtual]

The window must be repainted.

Note:
This method should not change any state, it should only use drawing functions.

Reimplemented from Window.

Definition at line 489 of file fios_gui.cpp.

References Window::DrawWidgets(), Scrollbar::SetCount(), and SLWW_SAVE_OSK_TITLE.

virtual void SaveLoadWindow::OnResize (  )  [inline, virtual]

Called after the window got resized.

For nested windows with a viewport, call NWidgetViewport::UpdateViewportCoordinates.

Reimplemented from Window.

Definition at line 658 of file fios_gui.cpp.

References Scrollbar::SetCapacityFromWidget().

virtual void SaveLoadWindow::UpdateWidgetSize ( int  widget,
Dimension size,
const Dimension padding,
Dimension fill,
Dimension resize 
) [inline, virtual]

Update size and resize step of a widget in the window.

After retrieval of the minimal size and the resize-steps of a widget, this function is called to allow further refinement, typically by computing the real maximal size of the content. Afterwards, size is taken to be the minimal size of the widget and resize is taken to contain the resize steps. For the convenience of the callee, padding contains the amount of padding between the content and the edge of the widget. This should be added to the returned size.

Parameters:
widget Widget number.
size Size of the widget.
padding Recommended amount of space between the widget content and the widget edge.
fill Fill step of the widget.
resize Resize step of the widget.

Reimplemented from Window.

Definition at line 467 of file fios_gui.cpp.

References FONT_HEIGHT_NORMAL, GetStringBoundingBox(), maxdim(), WD_FRAMERECT_BOTTOM, WD_FRAMERECT_TOP, and WD_SORTBUTTON_ARROW_WIDTH.


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

Generated on Sun Jan 23 01:50:23 2011 for OpenTTD by  doxygen 1.6.1