(svn r8699) [cpp_gui] -Cleanup: removed the word Window from some Window method names as just being Winddow methods indicates that it's working on a window cpp_gui
authorbjarni
Tue, 13 Feb 2007 10:27:18 +0000
branchcpp_gui
changeset 6240 8d4ea2d6befc
parent 6239 925a1bba771f
child 6241 6a7a41b0cd32
(svn r8699) [cpp_gui] -Cleanup: removed the word Window from some Window method names as just being Winddow methods indicates that it's working on a window
src/build_vehicle_gui.cpp
src/depot_gui.cpp
src/misc_gui.cpp
src/station_gui.cpp
src/vehicle_gui.cpp
src/window.cpp
src/window.h
--- a/src/build_vehicle_gui.cpp	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/build_vehicle_gui.cpp	Tue Feb 13 10:27:18 2007 +0000
@@ -967,17 +967,17 @@
 	switch (type) {
 		case VEH_Train:
 			WP(w,buildvehicle_d).filter.railtype = (tile == 0) ? RAILTYPE_END : GetRailType(tile);
-			w->ResizeWindow(0, 16);
+			w->Resize(0, 16);
 			break;
 		case VEH_Road:
-			w->ResizeWindow(20, 16);
+			w->Resize(20, 16);
 		case VEH_Ship:
-			w->ResizeWindow(27, 0);
+			w->Resize(27, 0);
 			break;
 		case VEH_Aircraft:
 			AcceptPlanes acc_planes = (tile == 0) ? ALL : GetAirport(GetStationByTile(tile)->airport_type)->acc_planes;
 			bv->filter.acc_planes = acc_planes;
-			w->ResizeWindow(12, 0);
+			w->Resize(12, 0);
 			break;
 	}
 	SetupWindowStrings(w, type);
--- a/src/depot_gui.cpp	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/depot_gui.cpp	Tue Feb 13 10:27:18 2007 +0000
@@ -711,12 +711,12 @@
 	w->resize.step_height = _block_sizes[type][1];
 
 	/* Enlarge the window to fit with the selected number of blocks of the selected size */
-	w->ResizeWindow(_block_sizes[type][0] * w->hscroll.cap,
+	w->Resize(_block_sizes[type][0] * w->hscroll.cap,
 	                _block_sizes[type][1] * w->vscroll.cap);
 
 	if (type == VEH_Train) {
 		/* The train depot has a horizontal scroller so we should make room for it */
-		w->ResizeWindow(0, 12);
+		w->Resize(0, 12);
 		/* substract the newly added space from the matrix since it was meant for the scrollbar */
 		w->widget[DEPOT_WIDGET_MATRIX].bottom -= 12;
 	}
--- a/src/misc_gui.cpp	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/misc_gui.cpp	Tue Feb 13 10:27:18 2007 +0000
@@ -498,7 +498,7 @@
 		COPY_IN_DPARAM(0, _errmsg_decode_params, lengthof(_errmsg_decode_params));
 		DrawWindowWidgets(w);
 		COPY_IN_DPARAM(0, _errmsg_decode_params, lengthof(_errmsg_decode_params));
-		if (!w->IsWindowOfPrototype(_errmsg_face_widgets)) {
+		if (!w->IsOfPrototype(_errmsg_face_widgets)) {
 			DrawStringMultiCenter(
 				120,
 				(_errmsg_message_1 == INVALID_STRING_ID ? 25 : 15),
--- a/src/station_gui.cpp	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/station_gui.cpp	Tue Feb 13 10:27:18 2007 +0000
@@ -683,7 +683,7 @@
 		}
 	} while (pos > -5 && ++i != NUM_CARGO);
 
-	if (w->IsWindowOfPrototype(_station_view_widgets)) {
+	if (w->IsOfPrototype(_station_view_widgets)) {
 		char *b = _userstring;
 		bool first = true;
 
@@ -742,11 +742,11 @@
 			w->SetDirty();
 
 			/* toggle height/widget set */
-			if (w->IsWindowOfPrototype(_station_view_expanded_widgets)) {
-				w->AssignWidgetToWindow(_station_view_widgets);
+			if (w->IsOfPrototype(_station_view_expanded_widgets)) {
+				w->AssignWidget(_station_view_widgets);
 				w->height = 110;
 			} else {
-				w->AssignWidgetToWindow(_station_view_expanded_widgets);
+				w->AssignWidget(_station_view_expanded_widgets);
 				w->height = 210;
 			}
 
--- a/src/vehicle_gui.cpp	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/vehicle_gui.cpp	Tue Feb 13 10:27:18 2007 +0000
@@ -1250,11 +1250,11 @@
 		default: NOT_REACHED();
 		case VEH_Train:
 			w = AllocateWindowDescFront(&_player_vehicle_list_train_desc, num);
-			if (w != NULL) w->ResizeWindow(65, 38);
+			if (w != NULL) w->Resize(65, 38);
 			break;
 		case VEH_Road:
 			w = AllocateWindowDescFront(&_player_vehicle_list_road_veh_desc, num);
-			if (w != NULL) w->ResizeWindow(0, 38);
+			if (w != NULL) w->Resize(0, 38);
 			break;
 		case VEH_Ship:
 			w = AllocateWindowDescFront(&_player_vehicle_list_ship_desc, num);
--- a/src/window.cpp	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/window.cpp	Tue Feb 13 10:27:18 2007 +0000
@@ -134,7 +134,7 @@
 	width = w;
 	height = h;
 	wndproc = proc;
-	this->AssignWidgetToWindow(widget);
+	this->AssignWidget(widget);
 	resize.width = width;
 	resize.height = height;
 	resize.step_width = 1;
@@ -559,8 +559,8 @@
 	_drag_delta.x += x;
 	_drag_delta.y += y;
 
-	/* ResizeWindow sets both pre- and after-size to dirty for redrawal */
-	this->ResizeWindow(x, y);
+	/* Resize sets both pre- and after-size to dirty for redrawal */
+	this->Resize(x, y);
 
 	e.event = WE_RESIZE;
 	e.we.sizing.size.x = x + width;
@@ -922,13 +922,13 @@
 //	}
 //}
 
-bool Window::IsWindowOfPrototype(const Widget *widgets) const
+bool Window::IsOfPrototype(const Widget *widgets) const
 {
 	return (original_widget == widgets);
 }
 
 /* Copies 'widget' to 'w->widget' to allow for resizable windows */
-void Window::AssignWidgetToWindow(const Widget *widget_array)
+void Window::AssignWidget(const Widget *widget_array)
 {
 	original_widget = widget_array;
 
@@ -1367,7 +1367,7 @@
  * ensuring proper redrawal.
  * @param x delta x-size of changed window (positive if larger, etc.(
  * @param y delta y-size of changed window */
-void Window::ResizeWindow(int x, int y)
+void Window::Resize(int x, int y)
 {
 	Widget *wi;
 	bool resize_height = false;
--- a/src/window.h	Tue Feb 13 10:17:24 2007 +0000
+++ b/src/window.h	Tue Feb 13 10:27:18 2007 +0000
@@ -387,11 +387,11 @@
 	static Window* FindById(WindowClass cls, WindowNumber num);
 	static void SetDirtyById(WindowClass cls, WindowNumber num);
 
-	bool IsWindowOfPrototype(const Widget *widgets) const;
+	bool IsOfPrototype(const Widget *widgets) const;
 	int GetMenuItemIndex(int x, int y) const;
-	void ResizeWindow(int x, int y);
+	void Resize(int x, int y);
 
-	void AssignWidgetToWindow(const Widget *widget);
+	void AssignWidget(const Widget *widget);
 
 	void InvalidateWidget(byte widget_index) const;