Changeset - r28350:2ccb2f8f699f
[Not reviewed]
master
0 4 0
Peter Nelson - 4 months ago 2023-12-29 14:52:42
peter1138@openttd.org
Codechange: Rename nested array to widget lookup.

This changes from naming storage-type to naming functionality.

* `FillNestedArray` is renamed to `FillWidgetLookup`.
* `Window::nested_array` is renamed to `Window::widget_lookup`.
* `array` parameter renamed as well.
4 files changed with 45 insertions and 45 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -900,13 +900,13 @@ void Window::DrawWidgets() const
 
 * @param state State of sort button
 
 */
 
void Window::DrawSortButtonState(int widget, SortButtonState state) const
 
{
 
	if (state == SBS_OFF) return;
 

	
 
	assert(this->nested_array != nullptr);
 
	assert(this->widget_lookup != nullptr);
 
	Rect r = this->GetWidget<NWidgetBase>(widget)->GetCurrentRect();
 

	
 
	/* Sort button uses the same sprites as vertical scrollbar */
 
	Dimension dim = NWidgetScrollbar::GetVerticalDimension();
 

	
 
	DrawSpriteIgnorePadding(state == SBS_DOWN ? SPR_ARROW_DOWN : SPR_ARROW_UP, PAL_NONE, r.WithWidth(dim.width, _current_text_dir == TD_LTR), SA_CENTER);
 
@@ -1020,14 +1020,14 @@ NWidgetBase::NWidgetBase(WidgetType tp) 
 
 *
 
 * Afterwards, \e pos_x and \e pos_y contain the top-left position of the widget, \e smallest_x and \e smallest_y contain
 
 * 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 NWidgetBase::FillNestedArray(NWidgetBase **array, uint length)
 
 * Fill the Window::nested_array array with pointers to nested widgets in the tree.
 
 * @fn void NWidgetBase::FillWidgetLookup(NWidgetBase **widget_lookup, uint length)
 
 * Fill the Window::widget_lookup array with pointers to nested widgets in the tree.
 
 * @param array Base pointer of the array.
 
 * @param length Length of the array.
 
 */
 

	
 
/**
 
 * @fn void NWidgetBase::Draw(const Window *w)
 
@@ -1273,15 +1273,15 @@ void NWidgetCore::SetToolTip(StringID to
 
 */
 
void NWidgetCore::SetAlignment(StringAlignment align)
 
{
 
	this->align = align;
 
}
 

	
 
void NWidgetCore::FillNestedArray(NWidgetBase **array, uint length)
 
void NWidgetCore::FillWidgetLookup(NWidgetBase **widget_lookup, uint length)
 
{
 
	if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;
 
	if (this->index >= 0 && (uint)(this->index) < length) widget_lookup[this->index] = this;
 
}
 

	
 
NWidgetCore *NWidgetCore::GetWidgetFromPos(int x, int y)
 
{
 
	return (IsInsideBS(x, this->pos_x, this->current_x) && IsInsideBS(y, this->pos_y, this->current_y)) ? this : nullptr;
 
}
 
@@ -1342,16 +1342,16 @@ void NWidgetContainer::Add(NWidgetBase *
 
		this->tail->next = wid;
 
		wid->prev = this->tail;
 
		this->tail = wid;
 
	}
 
}
 

	
 
void NWidgetContainer::FillNestedArray(NWidgetBase **array, uint length)
 
void NWidgetContainer::FillWidgetLookup(NWidgetBase **widget_lookup, uint length)
 
{
 
	for (NWidgetBase *child_wid = this->head; child_wid != nullptr; child_wid = child_wid->next) {
 
		child_wid->FillNestedArray(array, length);
 
		child_wid->FillWidgetLookup(widget_lookup, length);
 
	}
 
}
 

	
 
void NWidgetContainer::Draw(const Window *w)
 
{
 
	for (NWidgetBase *child_wid = this->head; child_wid != nullptr; child_wid = child_wid->next) {
 
@@ -1449,16 +1449,16 @@ void NWidgetStacked::AssignSizePosition(
 
		uint child_pos_y = child_wid->padding.top;
 

	
 
		child_wid->AssignSizePosition(sizing, x + child_pos_x, y + child_pos_y, child_width, child_height, rtl);
 
	}
 
}
 

	
 
void NWidgetStacked::FillNestedArray(NWidgetBase **array, uint length)
 
void NWidgetStacked::FillWidgetLookup(NWidgetBase **widget_lookup, uint length)
 
{
 
	if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;
 
	NWidgetContainer::FillNestedArray(array, length);
 
	if (this->index >= 0 && (uint)(this->index) < length) widget_lookup[this->index] = this;
 
	NWidgetContainer::FillWidgetLookup(widget_lookup, length);
 
}
 

	
 
void NWidgetStacked::Draw(const Window *w)
 
{
 
	if (this->shown_plane >= SZSP_BEGIN) return;
 

	
 
@@ -1922,13 +1922,13 @@ NWidgetSpacer::NWidgetSpacer(int width, 
 
void NWidgetSpacer::SetupSmallestSize(Window *)
 
{
 
	this->smallest_x = this->min_x;
 
	this->smallest_y = this->min_y;
 
}
 

	
 
void NWidgetSpacer::FillNestedArray(NWidgetBase **, uint)
 
void NWidgetSpacer::FillWidgetLookup(NWidgetBase **, uint)
 
{
 
}
 

	
 
void NWidgetSpacer::Draw(const Window *w)
 
{
 
	/* Spacer widget is never normally visible. */
 
@@ -2062,16 +2062,16 @@ void NWidgetMatrix::AssignSizePosition(S
 
	/* When resizing, update the scrollbar's count. E.g. with a vertical
 
	 * scrollbar becoming wider or narrower means the amount of rows in
 
	 * the scrollbar becomes respectively smaller or higher. */
 
	this->SetCount(this->count);
 
}
 

	
 
void NWidgetMatrix::FillNestedArray(NWidgetBase **array, uint length)
 
void NWidgetMatrix::FillWidgetLookup(NWidgetBase **widget_lookup, uint length)
 
{
 
	if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;
 
	NWidgetContainer::FillNestedArray(array, length);
 
	if (this->index >= 0 && (uint)(this->index) < length) widget_lookup[this->index] = this;
 
	NWidgetContainer::FillWidgetLookup(widget_lookup, length);
 
}
 

	
 
NWidgetCore *NWidgetMatrix::GetWidgetFromPos(int x, int y)
 
{
 
	/* Falls outside of the matrix widget. */
 
	if (!IsInsideBS(x, this->pos_x, this->current_x) || !IsInsideBS(y, this->pos_y, this->current_y)) return nullptr;
 
@@ -2332,16 +2332,16 @@ void NWidgetBackground::AssignSizePositi
 
		uint width = given_width - this->child->padding.Horizontal();
 
		uint height = given_height - this->child->padding.Vertical();
 
		this->child->AssignSizePosition(sizing, x + x_offset, y + this->child->padding.top, width, height, rtl);
 
	}
 
}
 

	
 
void NWidgetBackground::FillNestedArray(NWidgetBase **array, uint length)
 
void NWidgetBackground::FillWidgetLookup(NWidgetBase **widget_lookup, uint length)
 
{
 
	if (this->index >= 0 && (uint)(this->index) < length) array[this->index] = this;
 
	if (this->child != nullptr) this->child->FillNestedArray(array, length);
 
	if (this->index >= 0 && (uint)(this->index) < length) widget_lookup[this->index] = this;
 
	if (this->child != nullptr) this->child->FillWidgetLookup(widget_lookup, length);
 
}
 

	
 
void NWidgetBackground::Draw(const Window *w)
 
{
 
	if (this->current_x == 0 || this->current_y == 0) return;
 

	
src/widget_type.h
Show inline comments
 
@@ -133,13 +133,13 @@ public:
 
	NWidgetBase(WidgetType tp);
 

	
 
	virtual void AdjustPaddingForZoom();
 
	virtual void SetupSmallestSize(Window *w) = 0;
 
	virtual void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) = 0;
 

	
 
	virtual void FillNestedArray(NWidgetBase **array, uint length) = 0;
 
	virtual void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) = 0;
 

	
 
	virtual NWidgetCore *GetWidgetFromPos(int x, int y) = 0;
 
	virtual NWidgetBase *GetWidgetOfType(WidgetType tp);
 

	
 
	virtual bool IsHighlighted() const { return false; }
 
	virtual TextColour GetHighlightColour() const { return TC_INVALID; }
 
@@ -334,13 +334,13 @@ public:
 

	
 
	inline void SetLowered(bool lowered);
 
	inline bool IsLowered() const;
 
	inline void SetDisabled(bool disabled);
 
	inline bool IsDisabled() const;
 

	
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 
	void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) override;
 
	NWidgetCore *GetWidgetFromPos(int x, int y) override;
 
	bool IsHighlighted() const override;
 
	TextColour GetHighlightColour() const override;
 
	void SetHighlighted(TextColour highlight_colour) override;
 

	
 
	NWidgetDisplay disp_flags; ///< Flags that affect display and interaction with the widget.
 
@@ -416,13 +416,13 @@ class NWidgetContainer : public NWidgetB
 
public:
 
	NWidgetContainer(WidgetType tp);
 
	~NWidgetContainer();
 

	
 
	void AdjustPaddingForZoom() override;
 
	void Add(NWidgetBase *wid);
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 
	void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) override;
 

	
 
	void Draw(const Window *w) override;
 
	NWidgetCore *GetWidgetFromPos(int x, int y) override;
 

	
 
	/** Return whether the container is empty. */
 
	inline bool IsEmpty() { return head == nullptr; }
 
@@ -459,21 +459,21 @@ public:
 

	
 
	void SetIndex(int index);
 

	
 
	void AdjustPaddingForZoom() override;
 
	void SetupSmallestSize(Window *w) override;
 
	void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override;
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 
	void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) override;
 

	
 
	void Draw(const Window *w) override;
 
	NWidgetCore *GetWidgetFromPos(int x, int y) override;
 

	
 
	bool SetDisplayedPlane(int plane);
 

	
 
	int shown_plane; ///< Plane being displayed (for #NWID_SELECTION only).
 
	int index;       ///< If non-negative, index in the #Window::nested_array.
 
	int index;       ///< If non-negative, index in the #Window::widget_lookup.
 
};
 

	
 
/** Nested widget container flags, */
 
enum NWidContainerFlags {
 
	NCB_EQUALSIZE = 0, ///< Containers should keep all their (resizing) children equally large.
 
	NCB_BIGFIRST  = 1, ///< Allocate space to biggest resize first.
 
@@ -561,18 +561,18 @@ public:
 
	void SetClicked(int clicked);
 
	void SetCount(int count);
 
	void SetScrollbar(Scrollbar *sb);
 

	
 
	void SetupSmallestSize(Window *w) override;
 
	void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override;
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 
	void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) override;
 

	
 
	NWidgetCore *GetWidgetFromPos(int x, int y) override;
 
	void Draw(const Window *w) override;
 
protected:
 
	int index;      ///< If non-negative, index in the #Window::nested_array.
 
	int index;      ///< If non-negative, index in the #Window::widget_lookup.
 
	Colours colour; ///< Colour of this widget.
 
	int clicked;    ///< The currently clicked widget.
 
	int count;      ///< Amount of valid widgets.
 
	Scrollbar *sb;  ///< The scrollbar we're associated with.
 
private:
 
	int widget_w;   ///< The width of the child widget including inter spacing.
 
@@ -590,13 +590,13 @@ private:
 
 */
 
class NWidgetSpacer : public NWidgetResizeBase {
 
public:
 
	NWidgetSpacer(int width, int height);
 

	
 
	void SetupSmallestSize(Window *w) override;
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 
	void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) override;
 

	
 
	void Draw(const Window *w) override;
 
	void SetDirty(const Window *w) const override;
 
	NWidgetCore *GetWidgetFromPos(int x, int y) override;
 
};
 

	
 
@@ -614,13 +614,13 @@ public:
 
	void SetPIPRatio(uint8_t pip_ratio_pre, uint8_t pip_ratio_inter, uint8_t pip_ratio_post);
 

	
 
	void AdjustPaddingForZoom() override;
 
	void SetupSmallestSize(Window *w) override;
 
	void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override;
 

	
 
	void FillNestedArray(NWidgetBase **array, uint length) override;
 
	void FillWidgetLookup(NWidgetBase **widget_lookup, uint length) override;
 

	
 
	void Draw(const Window *w) override;
 
	NWidgetCore *GetWidgetFromPos(int x, int y) override;
 
	NWidgetBase *GetWidgetOfType(WidgetType tp) override;
 

	
 
private:
src/window.cpp
Show inline comments
 
@@ -493,13 +493,13 @@ void Window::UnfocusFocusedWidget()
 
 */
 
bool Window::SetFocusedWidget(int widget_index)
 
{
 
	/* Do nothing if widget_index is already focused, or if it wasn't a valid widget. */
 
	if ((uint)widget_index >= this->nested_array_size) return false;
 

	
 
	assert(this->nested_array[widget_index] != nullptr); // Setting focus to a non-existing widget is a bad idea.
 
	assert(this->widget_lookup[widget_index] != nullptr); // Setting focus to a non-existing widget is a bad idea.
 
	if (this->nested_focus != nullptr) {
 
		if (this->GetWidget<NWidgetCore>(widget_index) == this->nested_focus) return false;
 

	
 
		/* Repaint the widget that lost focus. A focused edit box may else leave the caret on the screen. */
 
		this->nested_focus->SetDirty(this);
 
		if (this->nested_focus->type == WWT_EDITBOX) VideoDriver::GetInstance()->EditBoxLostFocus();
 
@@ -529,14 +529,14 @@ void Window::OnFocusLost(bool)
 
 * Raise the buttons of the window.
 
 * @param autoraise Raise only the push buttons of the window.
 
 */
 
void Window::RaiseButtons(bool autoraise)
 
{
 
	for (uint i = 0; i < this->nested_array_size; i++) {
 
		if (this->nested_array[i] == nullptr) continue;
 
		WidgetType type = this->nested_array[i]->type;
 
		if (this->widget_lookup[i] == nullptr) continue;
 
		WidgetType type = this->widget_lookup[i]->type;
 
		if (((type & ~WWB_PUSHBUTTON) < WWT_LAST || type == NWID_PUSHBUTTON_DROPDOWN) &&
 
				(!autoraise || (type & WWB_PUSHBUTTON) || type == WWT_EDITBOX) && this->IsWidgetLowered(i)) {
 
			this->RaiseWidget(i);
 
			this->SetWidgetDirty(i);
 
		}
 
	}
 
@@ -553,15 +553,15 @@ void Window::RaiseButtons(bool autoraise
 
 * Invalidate a widget, i.e. mark it as being changed and in need of redraw.
 
 * @param widget_index the widget to redraw.
 
 */
 
void Window::SetWidgetDirty(byte widget_index) const
 
{
 
	/* Sometimes this function is called before the window is even fully initialized */
 
	if (this->nested_array == nullptr) return;
 

	
 
	this->nested_array[widget_index]->SetDirty(this);
 
	if (this->widget_lookup == nullptr) return;
 

	
 
	this->widget_lookup[widget_index]->SetDirty(this);
 
}
 

	
 
/**
 
 * A hotkey has been pressed.
 
 * @param hotkey  Hotkey index, by default a widget index of a button or editbox.
 
 * @return #ES_HANDLED if the key press has been handled, and the hotkey is not unavailable for some reason.
 
@@ -1089,13 +1089,13 @@ Window::~Window()
 
{
 
	/* Make sure the window is closed, deletion is allowed only in Window::DeleteClosedWindows(). */
 
	assert(*this->z_position == nullptr);
 

	
 
	if (this->viewport != nullptr) DeleteWindowViewport(this);
 

	
 
	free(this->nested_array); // Contents is released through deletion of #nested_root.
 
	free(this->widget_lookup); // Contents is released through deletion of #nested_root.
 
	delete this->nested_root;
 
}
 

	
 
/**
 
 * Find a window by its class and window number
 
 * @param cls Window class
 
@@ -1363,13 +1363,13 @@ static void BringWindowToFront(Window *w
 

	
 
/**
 
 * Initializes the data (except the position and initial size) of a new Window.
 
 * @param window_number Number being assigned to the new window
 
 * @return Window pointer of the newly created window
 
 * @pre If nested widgets are used (\a widget is \c nullptr), #nested_root and #nested_array_size must be initialized.
 
 *      In addition, #nested_array is either \c nullptr, or already initialized.
 
 *      In addition, #widget_lookup is either \c nullptr, or already initialized.
 
 */
 
void Window::InitializeData(WindowNumber window_number)
 
{
 
	/* Set up window properties; some of them are needed to set up smallest size below */
 
	this->window_class = this->window_desc->cls;
 
	this->SetWhiteBorder();
 
@@ -1719,25 +1719,25 @@ static Point LocalGetWindowPlacement(con
 
{
 
	return LocalGetWindowPlacement(this->window_desc, sm_width, sm_height, window_number);
 
}
 

	
 
/**
 
 * Perform the first part of the initialization of a nested widget tree.
 
 * Construct a nested widget tree in #nested_root, and optionally fill the #nested_array array to provide quick access to the uninitialized widgets.
 
 * Construct a nested widget tree in #nested_root, and optionally fill the #widget_lookup array to provide quick access to the uninitialized widgets.
 
 * This is mainly useful for setting very basic properties.
 
 * @param fill_nested Fill the #nested_array (enabling is expensive!).
 
 * @param fill_nested Fill the #widget_lookup (enabling is expensive!).
 
 * @note Filling the nested array requires an additional traversal through the nested widget tree, and is best performed by #FinishInitNested rather than here.
 
 */
 
void Window::CreateNestedTree()
 
{
 
	int biggest_index = -1;
 
	this->nested_root = MakeWindowNWidgetTree(this->window_desc->nwid_begin, this->window_desc->nwid_end, &biggest_index, &this->shade_select);
 
	this->nested_array_size = (uint)(biggest_index + 1);
 

	
 
	this->nested_array = CallocT<NWidgetBase *>(this->nested_array_size);
 
	this->nested_root->FillNestedArray(this->nested_array, this->nested_array_size);
 
	this->widget_lookup = CallocT<NWidgetBase *>(this->nested_array_size);
 
	this->nested_root->FillWidgetLookup(this->widget_lookup, this->nested_array_size);
 
}
 

	
 
/**
 
 * Perform the second part of the initialization of a nested widget tree.
 
 * @param window_number Number of the new window.
 
 */
 
@@ -1838,13 +1838,13 @@ static void DecreaseWindowCounters()
 
	if (_scroller_click_timeout != 0) _scroller_click_timeout--;
 

	
 
	for (Window *w : Window::Iterate()) {
 
		if (_scroller_click_timeout == 0) {
 
			/* Unclick scrollbar buttons if they are pressed. */
 
			for (uint i = 0; i < w->nested_array_size; i++) {
 
				NWidgetBase *nwid = w->nested_array[i];
 
				NWidgetBase *nwid = w->widget_lookup[i];
 
				if (nwid != nullptr && (nwid->type == NWID_HSCROLLBAR || nwid->type == NWID_VSCROLLBAR)) {
 
					NWidgetScrollbar *sb = static_cast<NWidgetScrollbar*>(nwid);
 
					if (sb->disp_flags & (ND_SCROLLBAR_UP | ND_SCROLLBAR_DOWN)) {
 
						sb->disp_flags &= ~(ND_SCROLLBAR_UP | ND_SCROLLBAR_DOWN);
 
						w->mouse_capture_widget = -1;
 
						sb->SetDirty(w);
src/window_gui.h
Show inline comments
 
@@ -257,13 +257,13 @@ public:
 
	Owner owner;        ///< The owner of the content shown in this window. Company colour is acquired from this variable.
 

	
 
	ViewportData *viewport;          ///< Pointer to viewport data, if present.
 
	const NWidgetCore *nested_focus; ///< Currently focused nested widget, or \c nullptr if no nested widget has focus.
 
	std::map<int, QueryString*> querystrings; ///< QueryString associated to WWT_EDITBOX widgets.
 
	NWidgetBase *nested_root;        ///< Root of the nested tree.
 
	NWidgetBase **nested_array;      ///< Array of pointers into the tree. Do not access directly, use #Window::GetWidget() instead.
 
	NWidgetBase **widget_lookup;      ///< Array of pointers into the tree. Do not access directly, use #Window::GetWidget() instead.
 
	uint nested_array_size;          ///< Size of the nested array.
 
	NWidgetStacked *shade_select;    ///< Selection widget (#NWID_SELECTION) to use for shading the window. If \c nullptr, window cannot shade.
 
	Dimension unshaded_size;         ///< Last known unshaded size (only valid while shaded).
 

	
 
	int mouse_capture_widget;        ///< Widgetindex of current mouse capture widget (e.g. dragged scrollbar). -1 if no widget has mouse capture.
 

	
 
@@ -326,13 +326,13 @@ public:
 
	 * @param widget_index index of this widget in the window
 
	 * @param disab_stat status to use ie: disabled = true, enabled = false
 
	 */
 
	inline void SetWidgetDisabledState(byte widget_index, bool disab_stat)
 
	{
 
		assert(widget_index < this->nested_array_size);
 
		if (this->nested_array[widget_index] != nullptr) this->GetWidget<NWidgetCore>(widget_index)->SetDisabled(disab_stat);
 
		if (this->widget_lookup[widget_index] != nullptr) this->GetWidget<NWidgetCore>(widget_index)->SetDisabled(disab_stat);
 
	}
 

	
 
	/**
 
	 * Sets a widget to disabled.
 
	 * @param widget_index index of this widget in the window
 
	 */
 
@@ -517,13 +517,13 @@ public:
 
	void ProcessHighlightedInvalidations();
 

	
 
	/*** Event handling ***/
 

	
 
	/**
 
	 * Notification that the nested widget tree gets initialized. The event can be used to perform general computations.
 
	 * @note #nested_root and/or #nested_array (normally accessed via #GetWidget()) may not exist during this call.
 
	 * @note #nested_root and/or #widget_lookup (normally accessed via #GetWidget()) may not exist during this call.
 
	 */
 
	virtual void OnInit() { }
 

	
 
	virtual void ApplyDefaults();
 

	
 
	/**
 
@@ -891,24 +891,24 @@ inline bool AllEqual(It begin, It end, P
 
 * @param widnum Widget number of the widget to retrieve.
 
 * @return The requested widget if it is instantiated, \c nullptr otherwise.
 
 */
 
template <class NWID>
 
inline NWID *Window::GetWidget(uint widnum)
 
{
 
	if (widnum >= this->nested_array_size || this->nested_array[widnum] == nullptr) return nullptr;
 
	NWID *nwid = dynamic_cast<NWID *>(this->nested_array[widnum]);
 
	if (widnum >= this->nested_array_size || this->widget_lookup[widnum] == nullptr) return nullptr;
 
	NWID *nwid = dynamic_cast<NWID *>(this->widget_lookup[widnum]);
 
	assert(nwid != nullptr);
 
	return nwid;
 
}
 

	
 
/** Specialized case of #Window::GetWidget for the nested widget base class. */
 
template <>
 
inline const NWidgetBase *Window::GetWidget<NWidgetBase>(uint widnum) const
 
{
 
	if (widnum >= this->nested_array_size) return nullptr;
 
	return this->nested_array[widnum];
 
	return this->widget_lookup[widnum];
 
}
 

	
 
/**
 
 * Get the nested widget with number \a widnum from the nested widget tree.
 
 * @tparam NWID Type of the nested widget.
 
 * @param widnum Widget number of the widget to retrieve.
0 comments (0 inline, 0 general)