Changeset - r16591:81de49de095c
[Not reviewed]
src/ai/ai_gui.cpp
Show inline comments
 
@@ -88,11 +88,6 @@ struct AIListWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		switch (widget) {
 
@@ -284,11 +279,6 @@ struct AISettingsWindow : public Window 
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != AIS_WIDGET_BACKGROUND) return;
 
@@ -581,11 +571,6 @@ struct AIConfigWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		switch (widget) {
src/airport_gui.cpp
Show inline comments
 
@@ -94,11 +94,6 @@ struct BuildAirToolbarWindow : Window {
 
		if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		if (!IsInsideBS(widget, ATW_AIRPORT, lengthof(_build_air_button_proc))) return;
src/bridge_gui.cpp
Show inline comments
 
@@ -160,11 +160,6 @@ public:
 
		delete bridges;
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
src/cheat_gui.cpp
Show inline comments
 
@@ -270,11 +270,6 @@ struct CheatWindow : Window {
 
		size->height = this->header_height + WD_FRAMERECT_TOP + WD_PAR_VSEP_NORMAL + WD_FRAMERECT_BOTTOM + (FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL) * lengthof(_cheats_ui);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		const NWidgetBase *wid = this->GetWidget<NWidgetBase>(CW_PANEL);
src/company_gui.cpp
Show inline comments
 
@@ -2084,11 +2084,6 @@ struct BuyCompanyWindow : Window {
 
		this->InitNested(desc, window_number);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
src/date_gui.cpp
Show inline comments
 
@@ -146,11 +146,6 @@ struct SetDateWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
src/dock_gui.cpp
Show inline comments
 
@@ -225,11 +225,6 @@ struct BuildDocksToolbarWindow : Window 
 
			WIDGET_LIST_END);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		this->last_clicked_widget = (DockToolbarWidgets)widget;
src/engine_gui.cpp
Show inline comments
 
@@ -72,11 +72,6 @@ struct EnginePreviewWindow : Window {
 
		this->InitNested(desc, window_number);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != EPW_QUESTION) return;
src/genworld_gui.cpp
Show inline comments
 
@@ -1239,11 +1239,6 @@ struct GenerateProgressWindow : public W
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
src/graph_gui.cpp
Show inline comments
 
@@ -61,11 +61,6 @@ struct GraphLegendWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (!IsInsideMM(widget, GLW_FIRST_COMPANY, MAX_COMPANIES + GLW_FIRST_COMPANY)) return;
 
@@ -490,11 +485,6 @@ protected:
 
	}
 

	
 
public:
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != this->graph_widget) return;
 
@@ -1394,12 +1384,6 @@ struct PerformanceRatingDetailWindow : W
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		/* Draw standard stuff */
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		/* No need to draw when there's nothing to draw */
src/industry_gui.cpp
Show inline comments
 
@@ -470,11 +470,6 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
@@ -1234,11 +1229,6 @@ public:
 
		if (widget == IDW_DROPDOWN_CRITERIA) SetDParam(0, IndustryDirectoryWindow::sorter_names[this->industries.SortType()]);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		switch (widget) {
 
@@ -2585,11 +2575,6 @@ struct IndustryCargoesWindow : public Wi
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnResize()
 
	{
 
		this->vscroll->SetCapacityFromWidget(this, ICW_PANEL);
src/intro_gui.cpp
Show inline comments
 
@@ -65,11 +65,6 @@ struct SelectGameWindow : public Window 
 
		this->SetWidgetLoweredState(SGI_TOYLAND_LANDSCAPE,   _settings_newgame.game_creation.landscape == LT_TOYLAND);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void SetStringParameters(int widget) const
 
	{
 
		if (widget == SGI_DIFFICULTIES) SetDParam(0, STR_DIFFICULTY_LEVEL_EASY + _settings_newgame.difficulty.diff_level);
src/misc_gui.cpp
Show inline comments
 
@@ -79,11 +79,6 @@ public:
 
	char landinfo_data[LAND_INFO_LINE_END][LAND_INFO_LINE_BUFF_SIZE];
 
	TileIndex tile;
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != LIW_BACKGROUND) return;
 
@@ -473,11 +468,6 @@ struct AboutWindow : public Window {
 
		*size = maxdim(*size, d);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != AW_SCROLLING_TEXT) return;
 
@@ -641,11 +631,6 @@ public:
 
		return pt;
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnInvalidateData(int data)
 
	{
 
		/* If company gets shut down, while displaying an error about it, remove the error message. */
 
@@ -896,12 +881,6 @@ struct TooltipsWindow : public Window
 
		DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM, this->string_id, TC_FROMSTRING, SA_CENTER);
 
	}
 

	
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnMouseLoop()
 
	{
 
		/* Always close tooltips when the cursor is not in our window. */
 
@@ -1520,11 +1499,6 @@ struct QueryWindow : public Window {
 
		DrawStringMultiLine(r.left, r.right, r.top, r.bottom, this->message, TC_FROMSTRING, SA_CENTER);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
src/music_gui.cpp
Show inline comments
 
@@ -396,11 +396,6 @@ struct MusicTrackSelectionWindow : publi
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
@@ -642,11 +637,6 @@ struct MusicWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnInvalidateData(int data = 0)
 
	{
 
		for (int i = 0; i < 6; i++) {
src/network/network_content_gui.cpp
Show inline comments
 
@@ -138,11 +138,6 @@ public:
 
		_network_content_client.RemoveCallback(this);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != NCDSWW_BACKGROUND) return;
src/network/network_gui.cpp
Show inline comments
 
@@ -1937,11 +1937,6 @@ struct NetworkClientListPopupWindow : Wi
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnMouseLoop()
 
	{
 
		/* We selected an action */
 
@@ -2163,11 +2158,6 @@ struct NetworkJoinStatusWindow : Window 
 
		this->InitNested(desc, 0);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != NJSW_BACKGROUND) return;
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -416,11 +416,6 @@ struct NewGRFInspectWindow : Window {
 
		const_cast<NewGRFInspectWindow*>(this)->vscroll->SetCount(i);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
@@ -657,11 +652,6 @@ struct SpriteAlignerWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
src/newgrf_gui.cpp
Show inline comments
 
@@ -217,11 +217,6 @@ struct NewGRFParametersWindow : public W
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void SetStringParameters(int widget) const
 
	{
 
		switch (widget) {
src/news_gui.cpp
Show inline comments
 
@@ -348,11 +348,6 @@ struct NewsWindow : Window {
 
		return pt;
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		StringID str = STR_NULL;
 
@@ -1136,11 +1131,6 @@ struct MessageOptionsWindow : Window {
 
		this->SetWidgetDisabledState(element + WIDGET_NEWSOPT_START_OPTION + 2, value == 2);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget >= WIDGET_NEWSOPT_START_OPTION && widget < WIDGET_NEWSOPT_END_OPTION && (widget -  WIDGET_NEWSOPT_START_OPTION) % MOS_WIDG_PER_SETTING == 1) {
src/object_gui.cpp
Show inline comments
 
@@ -205,11 +205,6 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	void SelectOtherObject(int object_index)
 
	{
 
		_selected_object_index = object_index;
src/rail_gui.cpp
Show inline comments
 
@@ -717,11 +717,6 @@ struct BuildRailToolbarWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		if (widget >= RTW_BUILD_NS) {
 
@@ -1544,11 +1539,6 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (IsInsideMM(widget, BSW_SEMAPHORE_NORM, BSW_ELECTRIC_PBS_OWAY + 1)) {
 
@@ -1689,11 +1679,6 @@ struct BuildRailDepotWindow : public Pic
 
		this->LowerWidget(_build_depot_direction + BRDW_DEPOT_NE);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (!IsInsideMM(widget, BRDW_DEPOT_NE, BRDW_DEPOT_NW + 1)) return;
src/road_gui.cpp
Show inline comments
 
@@ -527,11 +527,6 @@ struct BuildRoadToolbarWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		if (widget >= RTW_ROAD_X) {
 
@@ -880,11 +875,6 @@ struct BuildRoadDepotWindow : public Pic
 
		this->FinishInitNested(desc, TRANSPORT_ROAD);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (!IsInsideMM(widget, BRDW_DEPOT_NE, BRDW_DEPOT_NW + 1)) return;
src/settings_gui.cpp
Show inline comments
 
@@ -202,11 +202,6 @@ struct GameOptionsWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		switch (widget) {
 
@@ -627,11 +622,6 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		if (widget >= GDW_OPTIONS_START) {
 
@@ -1555,11 +1545,6 @@ struct GameSettingsWindow : Window {
 
				this->vscroll->GetPosition(), this->vscroll->GetPosition() + this->vscroll->GetCapacity());
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		if (widget != SETTINGSEL_OPTIONSPANEL) return;
 
@@ -1840,11 +1825,6 @@ struct CustomCurrencyWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		int line = 0;
src/smallmap_gui.cpp
Show inline comments
 
@@ -1130,11 +1130,6 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	/**
 
	 * Select a new map type.
 
	 * @param map_type New map type.
src/station_gui.cpp
Show inline comments
 
@@ -1393,11 +1393,6 @@ struct SelectStationWindow : Window {
 
		*size = d;
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != JSW_PANEL) return;
src/statusbar_gui.cpp
Show inline comments
 
@@ -104,11 +104,6 @@ struct StatusBarWindow : Window {
 
		return pt;
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		Dimension d;
src/subsidy_gui.cpp
Show inline comments
 
@@ -106,11 +106,6 @@ struct SubsidyListWindow : Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	/**
 
	 * Count the number of lines in this window.
 
	 * @return the number of lines
src/terraform_gui.cpp
Show inline comments
 
@@ -245,12 +245,6 @@ struct TerraformToolbarWindow : Window {
 
		show_object->SetDisplayedPlane(ObjectClass::GetCount() != 0 ? 0 : SZSP_NONE);
 
	}
 

	
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		if (widget >= TTW_BUTTONS_START) _terraform_button_proc[widget - TTW_BUTTONS_START](this);
src/town_gui.cpp
Show inline comments
 
@@ -338,11 +338,6 @@ public:
 
		this->SetWidgetDisabledState(TVW_CHANGENAME, _networking && !_network_server);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void SetStringParameters(int widget) const
 
	{
 
		if (widget == TVW_CAPTION) SetDParam(0, this->town->index);
 
@@ -734,11 +729,6 @@ public:
 
		this->last_sorting = this->towns.GetListing();
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void SetStringParameters(int widget) const
 
	{
 
		if (widget == TDW_BOTTOM_TEXT) SetDParam(0, GetWorldPopulation());
src/vehicle_gui.cpp
Show inline comments
 
@@ -513,11 +513,6 @@ struct RefitWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
src/viewport_gui.cpp
Show inline comments
 
@@ -97,11 +97,6 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
src/waypoint_gui.cpp
Show inline comments
 
@@ -88,11 +88,6 @@ public:
 
		if (widget == WAYPVW_CAPTION) SetDParam(0, this->wp->index);
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
src/widgets/dropdown.cpp
Show inline comments
 
@@ -219,11 +219,6 @@ struct DropdownWindow : Window {
 
		return false;
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != DDM_ITEMS) return;
src/window_gui.h
Show inline comments
 
@@ -460,7 +460,10 @@ public:
 
	 * The window must be repainted.
 
	 * @note This method should not change any state, it should only use drawing functions.
 
	 */
 
	virtual void OnPaint() {}
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	/**
 
	 * Draw the contents of a nested widget.
0 comments (0 inline, 0 general)