Public Member Functions | Data Fields

SetMinutesWindow Struct Reference

Inheritance diagram for SetMinutesWindow:
SetDateWindow Window ZeroedMemoryAllocator

Public Member Functions

 SetMinutesWindow (const WindowDesc *desc, WindowNumber window_number, Window *parent, DateTicks initial_date, Year min_year, Year max_year, SetDateCallback *callback)
 Constructor.
virtual void ShowDateDropDown (int widget)
 Helper function to construct the dropdown.
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 SetStringParameters (int widget) const
 Initialize string parameters for a widget.
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 OnDropdownSelect (int widget, int index)
 A dropdown option associated to this window has been selected.

Data Fields

Minutes minutes

Detailed Description

Definition at line 185 of file date_gui.cpp.


Constructor & Destructor Documentation

SetMinutesWindow::SetMinutesWindow ( const WindowDesc desc,
WindowNumber  window_number,
Window parent,
DateTicks  initial_date,
Year  min_year,
Year  max_year,
SetDateCallback callback 
) [inline]

Constructor.

Definition at line 190 of file date_gui.cpp.


Member Function Documentation

virtual void SetMinutesWindow::OnClick ( Point  pt,
int  widget,
int  click_count 
) [inline, virtual]

A click with the left mouse button has been made on the window.

Parameters:
pt the point inside the window that has been clicked.
widget the clicked widget.
click_count Number of fast consecutive clicks at same position

Reimplemented from SetDateWindow.

Definition at line 264 of file date_gui.cpp.

References _settings_client, SetDateWindow::callback, ClientSettings::gui, Window::parent, SDW_DAY, SDW_MONTH, SDW_SET_DATE, SDW_YEAR, ShowDateDropDown(), and GUISettings::ticks_per_minute.

virtual void SetMinutesWindow::OnDropdownSelect ( int  widget,
int  index 
) [inline, virtual]

A dropdown option associated to this window has been selected.

Parameters:
widget the widget (button) that the dropdown is associated with.
index the element in the dropdown that is selected.

Reimplemented from SetDateWindow.

Definition at line 280 of file date_gui.cpp.

References CURRENT_MINUTE, MINUTES_DATE, MINUTES_DAY, MINUTES_HOUR, MINUTES_MINUTE, SDW_DAY, SDW_MONTH, and Window::SetDirty().

virtual void SetMinutesWindow::SetStringParameters ( int  widget  )  const [inline, virtual]

Initialize string parameters for a widget.

Calls to this function are made during initialization to measure the size (that is as part of InitNested()), during drawing, and while re-initializing the window. Only for widgets that render text initializing is requested.

Parameters:
widget Widget number.

Reimplemented from SetDateWindow.

Definition at line 256 of file date_gui.cpp.

References MINUTES_HOUR, MINUTES_MINUTE, SDW_DAY, SDW_MONTH, and SetDParam().

virtual void SetMinutesWindow::ShowDateDropDown ( int  widget  )  [inline, virtual]

Helper function to construct the dropdown.

Parameters:
widget the dropdown widget to create the dropdown for

Reimplemented from SetDateWindow.

Definition at line 200 of file date_gui.cpp.

References MINUTES_HOUR, MINUTES_MINUTE, SDW_DAY, SDW_MONTH, and ShowDropDownList().

Referenced by OnClick().

virtual void SetMinutesWindow::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 SetDateWindow.

Definition at line 230 of file date_gui.cpp.

References GetStringBoundingBox(), maxdim(), SDW_DAY, SDW_MONTH, and SetDParam().


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