MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / GUI_Widget_Link

Function GUI_Widget_Link

src/gui/widget.c:815–829  ·  view source on GitHub ↗

* Link a widget to another widget, where the new widget is linked at the end * of the list of the first widget. * @param w1 Widget to which the other widget is added. * @param w2 Widget which is added to the first widget (at the end of his chain). * @return The first widget of the chain. */

Source from the content-addressed store, hash-verified

813 * @return The first widget of the chain.
814 */
815Widget *GUI_Widget_Link(Widget *w1, Widget *w2)
816{
817 Widget *first = w1;
818
819 s_widgetReset = true;
820
821 if (w2 == NULL) return w1;
822 w2->next = NULL;
823 if (w1 == NULL) return w2;
824
825 while (w1->next != NULL) w1 = w1->next;
826
827 w1->next = w2;
828 return first;
829}
830
831/**
832 * Get scrollbar position.

Callers 6

GUI_PickHouseFunction · 0.85
GUI_Widget_InsertFunction · 0.85
GUI_Mentat_ShowDialogFunction · 0.85
GUI_Window_CreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected