src/window.cpp
changeset 10434 d6accd017341
parent 10433 cca9f7948fe5
child 10435 0e2b98df9707
--- a/src/window.cpp	Tue May 06 21:28:30 2008 +0000
+++ b/src/window.cpp	Tue May 06 22:08:18 2008 +0000
@@ -252,7 +252,7 @@
 			int pos = Clamp(sb->pos + wheel, 0, sb->count - sb->cap);
 			if (pos != sb->pos) {
 				sb->pos = pos;
-				SetWindowDirty(w);
+				w->SetDirty();
 			}
 		}
 	}
@@ -564,7 +564,7 @@
 	if (w != NULL) {
 		w->flags4 |= WF_WHITE_BORDER_MASK;
 		BringWindowToFront(w);
-		SetWindowDirty(w);
+		w->SetDirty();
 	}
 
 	return w;
@@ -602,7 +602,7 @@
 	memmove(wz, wz + 1, (byte*)vz - (byte*)wz);
 	*vz = tempz;
 
-	SetWindowDirty(w);
+	w->SetDirty();
 }
 
 /** We have run out of windows, so find a suitable candidate for replacement.
@@ -795,7 +795,7 @@
 	w->left = nx;
 	w->top = ny;
 
-	SetWindowDirty(w);
+	w->SetDirty();
 
 	return w;
 }
@@ -1117,7 +1117,7 @@
 		/* Unclick scrollbar buttons if they are pressed. */
 		if (w->flags4 & (WF_SCROLL_DOWN | WF_SCROLL_UP)) {
 			w->flags4 &= ~(WF_SCROLL_DOWN | WF_SCROLL_UP);
-			SetWindowDirty(w);
+			w->SetDirty();
 		}
 		CallWindowEventNP(w, WE_MOUSELOOP);
 	}
@@ -1259,7 +1259,7 @@
 
 	if (x == 0 && y == 0) return;
 
-	SetWindowDirty(w);
+	w->SetDirty();
 	for (wi = w->widget; wi->type != WWT_LAST; wi++) {
 		/* Isolate the resizing flags */
 		byte rsizeflag = GB(wi->display_flags, 0, 4);
@@ -1292,7 +1292,7 @@
 	if (resize_width)  w->width  += x;
 	if (resize_height) w->height += y;
 
-	SetWindowDirty(w);
+	w->SetDirty();
 }
 
 static bool _dragging_window;
@@ -1321,7 +1321,7 @@
 				break;
 			}
 
-			SetWindowDirty(w);
+			w->SetDirty();
 
 			x = _cursor.pos.x + _drag_delta.x;
 			y = _cursor.pos.y + _drag_delta.y;
@@ -1442,7 +1442,7 @@
 			w->left = nx;
 			w->top  = ny;
 
-			SetWindowDirty(w);
+			w->SetDirty();
 			return false;
 		} else if (w->flags4 & WF_SIZING) {
 			WindowEvent e;
@@ -1451,7 +1451,7 @@
 			/* Stop the sizing if the left mouse button was released */
 			if (!_left_button_down) {
 				w->flags4 &= ~WF_SIZING;
-				SetWindowDirty(w);
+				w->SetDirty();
 				break;
 			}
 
@@ -1547,7 +1547,7 @@
 			/* Abort if no button is clicked any more. */
 			if (!_left_button_down) {
 				w->flags4 &= ~WF_SCROLL_MIDDLE;
-				SetWindowDirty(w);
+				w->SetDirty();
 				break;
 			}
 
@@ -1566,7 +1566,7 @@
 			pos = min(max(0, i + _scrollbar_start_pos) * sb->count / _scrollbar_size, max(0, sb->count - sb->cap));
 			if (pos != sb->pos) {
 				sb->pos = pos;
-				SetWindowDirty(w);
+				w->SetDirty();
 			}
 			return false;
 		}
@@ -1652,7 +1652,7 @@
 		/* A modal child will prevent the activation of the parent window */
 		if (u->parent == w && (u->desc_flags & WDF_MODAL)) {
 			u->flags4 |= WF_WHITE_BORDER_MASK;
-			SetWindowDirty(u);
+			u->SetDirty();
 			return false;
 		}
 
@@ -2059,7 +2059,7 @@
 		if (w->flags4 & WF_WHITE_BORDER_MASK) {
 			w->flags4 -= WF_WHITE_BORDER_ONE;
 
-			if (!(w->flags4 & WF_WHITE_BORDER_MASK)) SetWindowDirty(w);
+			if (!(w->flags4 & WF_WHITE_BORDER_MASK)) w->SetDirty();
 		}
 	}
 
@@ -2105,7 +2105,7 @@
 
 	FOR_ALL_WINDOWS(wz) {
 		const Window *w = *wz;
-		if (w->window_class == cls && w->window_number == number) SetWindowDirty(w);
+		if (w->window_class == cls && w->window_number == number) w->SetDirty();
 	}
 }
 
@@ -2136,7 +2136,7 @@
 	Window* const *wz;
 
 	FOR_ALL_WINDOWS(wz) {
-		if ((*wz)->window_class == cls) SetWindowDirty(*wz);
+		if ((*wz)->window_class == cls) (*wz)->SetDirty();
 	}
 }
 
@@ -2147,7 +2147,7 @@
 void InvalidateThisWindowData(Window *w)
 {
 	CallWindowEventNP(w, WE_INVALIDATE_DATA);
-	SetWindowDirty(w);
+	w->SetDirty();
 }
 
 /**