|
@@ -138,13 +138,14 @@ static void ScrollbarClickPositioning(Wi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
w->SetDirty();
|
|
|
}
|
|
|
|
|
|
/** Special handling for the scrollbar widget type.
|
|
|
/**
|
|
|
* Special handling for the scrollbar widget type.
|
|
|
* Handles the special scrolling buttons and other scrolling.
|
|
|
* @param w Window on which a scroll was performed.
|
|
|
* @param nw Pointer to the scrollbar widget.
|
|
|
* @param x The X coordinate of the mouse click.
|
|
|
* @param y The Y coordinate of the mouse click.
|
|
|
*/
|
|
@@ -173,13 +174,14 @@ void ScrollbarClickHandler(Window *w, co
|
|
|
|
|
|
default: NOT_REACHED();
|
|
|
}
|
|
|
ScrollbarClickPositioning(w, nw->type, x, y, mi, ma);
|
|
|
}
|
|
|
|
|
|
/** Returns the index for the widget located at the given position
|
|
|
/**
|
|
|
* Returns the index for the widget located at the given position
|
|
|
* relative to the window. It includes all widget-corner pixels as well.
|
|
|
* @param *w Window to look inside
|
|
|
* @param x The Window client X coordinate
|
|
|
* @param y The Window client y coordinate
|
|
|
* @return A widget index, or -1 if no widget was found.
|
|
|
*/
|
|
@@ -1030,13 +1032,14 @@ NWidgetCore *NWidgetStacked::GetWidgetFr
|
|
|
return child_wid->GetWidgetFromPos(x, y);
|
|
|
}
|
|
|
}
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
/** Select which plane to show (for #NWID_SELECTION only).
|
|
|
/**
|
|
|
* Select which plane to show (for #NWID_SELECTION only).
|
|
|
* @param plane Plane number to display.
|
|
|
*/
|
|
|
void NWidgetStacked::SetDisplayedPlane(int plane)
|
|
|
{
|
|
|
this->shown_plane = plane;
|
|
|
}
|
|
@@ -2352,13 +2355,14 @@ NWidgetContainer *MakeNWidgets(const NWi
|
|
|
if (container == NULL) container = new NWidgetVertical();
|
|
|
NWidgetBase *cont_ptr = container;
|
|
|
MakeWidgetTree(parts, count, &cont_ptr, biggest_index);
|
|
|
return container;
|
|
|
}
|
|
|
|
|
|
/** Make a nested widget tree for a window from a parts array. Besides loading, it inserts a shading selection widget
|
|
|
/**
|
|
|
* Make a nested widget tree for a window from a parts array. Besides loading, it inserts a shading selection widget
|
|
|
* between the title bar and the window body if the first widget in the parts array looks like a title bar (it is a horizontal
|
|
|
* container with a caption widget) and has a shade box widget.
|
|
|
* @param parts Array with parts of the widgets.
|
|
|
* @param count Length of the \a parts array.
|
|
|
* @param biggest_index Pointer to biggest nested widget index collected in the tree.
|
|
|
* @param [out] shade_select Pointer to the inserted shade selection widget (\c NULL if not unserted).
|