(svn r16839) -Codechange: Remove obsolete FillNestedArray().

pull/155/head
alberth 15 years ago
parent 62fc8bd6c5
commit 1aa6de3873

@ -917,13 +917,6 @@ NWidgetBase::NWidgetBase(WidgetType tp) : ZeroedMemoryAllocator()
* the smallest size such that all widgets of the window are consistent, and \e current_x and \e current_y contain the current size. * the smallest size such that all widgets of the window are consistent, and \e current_x and \e current_y contain the current size.
*/ */
/**
* @fn void FillNestedArray(NWidgetCore **array, uint length)
* Fill the Window::nested_array array with pointers to nested widgets in the tree.
* @param array Base pointer of the array.
* @param length Length of the array.
*/
/** /**
* Store size and position. * Store size and position.
* @param sizing Type of resizing to perform. * @param sizing Type of resizing to perform.
@ -1082,11 +1075,6 @@ void NWidgetCore::SetDataTip(uint16 widget_data, StringID tool_tip)
this->tool_tip = tool_tip; this->tool_tip = tool_tip;
} }
void NWidgetCore::FillNestedArray(NWidgetCore **array, uint length)
{
if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;
}
void NWidgetCore::StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) void NWidgetCore::StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl)
{ {
if (this->index < 0) return; if (this->index < 0) return;
@ -1184,13 +1172,6 @@ void NWidgetContainer::Add(NWidgetBase *wid)
} }
} }
void NWidgetContainer::FillNestedArray(NWidgetCore **array, uint length)
{
for (NWidgetBase *child_wid = this->head; child_wid != NULL; child_wid = child_wid->next) {
child_wid->FillNestedArray(array, length);
}
}
/** /**
* Return the biggest possible size of a nested widget. * Return the biggest possible size of a nested widget.
* @param base Base size of the widget. * @param base Base size of the widget.
@ -1614,10 +1595,6 @@ void NWidgetSpacer::SetupSmallestSize(Window *w, bool init_array)
this->smallest_y = this->min_y; this->smallest_y = this->min_y;
} }
void NWidgetSpacer::FillNestedArray(NWidgetCore **array, uint length)
{
}
void NWidgetSpacer::StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) void NWidgetSpacer::StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl)
{ {
/* Spacer widgets are never stored in the widget array. */ /* Spacer widgets are never stored in the widget array. */
@ -1742,12 +1719,6 @@ void NWidgetBackground::StoreWidgets(Widget *widgets, int length, bool left_movi
if (this->child != NULL) this->child->StoreWidgets(widgets, length, left_moving, top_moving, rtl); if (this->child != NULL) this->child->StoreWidgets(widgets, length, left_moving, top_moving, rtl);
} }
void NWidgetBackground::FillNestedArray(NWidgetCore **array, uint length)
{
if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;
if (this->child != NULL) this->child->FillNestedArray(array, length);
}
void NWidgetBackground::Draw(const Window *w) void NWidgetBackground::Draw(const Window *w)
{ {
if (this->current_x == 0 || this->current_y == 0) return; if (this->current_x == 0 || this->current_y == 0) return;

@ -169,7 +169,6 @@ public:
virtual void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl) = 0; virtual void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl) = 0;
virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0; virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0;
virtual void FillNestedArray(NWidgetCore **array, uint length) = 0;
virtual NWidgetCore *GetWidgetFromPos(int x, int y) = 0; virtual NWidgetCore *GetWidgetFromPos(int x, int y) = 0;
virtual NWidgetBase *GetWidgetOfType(WidgetType tp) = 0; virtual NWidgetBase *GetWidgetOfType(WidgetType tp) = 0;
@ -285,7 +284,6 @@ public:
inline bool IsDisabled(); inline bool IsDisabled();
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
virtual Scrollbar *FindScrollbar(Window *w, bool allow_next = true) = 0; virtual Scrollbar *FindScrollbar(Window *w, bool allow_next = true) = 0;
@ -335,7 +333,6 @@ public:
~NWidgetContainer(); ~NWidgetContainer();
void Add(NWidgetBase *wid); void Add(NWidgetBase *wid);
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
/** Return whether the container is empty. */ /** Return whether the container is empty. */
inline bool IsEmpty() { return head == NULL; }; inline bool IsEmpty() { return head == NULL; };
@ -432,7 +429,6 @@ public:
void SetupSmallestSize(Window *w, bool init_array); void SetupSmallestSize(Window *w, bool init_array);
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
/* virtual */ void Draw(const Window *w); /* virtual */ void Draw(const Window *w);
/* virtual */ void Invalidate(const Window *w) const; /* virtual */ void Invalidate(const Window *w) const;
@ -454,7 +450,6 @@ public:
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl); void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool allow_resize_x, bool allow_resize_y, bool rtl);
void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl);
/* virtual */ void FillNestedArray(NWidgetCore **array, uint length);
/* virtual */ void Draw(const Window *w); /* virtual */ void Draw(const Window *w);
/* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y); /* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y);

Loading…
Cancel
Save