comparison mde/gui/widget/Ifaces.d @ 144:66c58e5b0062

Added a BoolContent-based collapsible widget.
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 10 Feb 2009 12:57:09 +0000
parents c94ec5594449
children 783969f4665c
comparison
equal deleted inserted replaced
143:2ac3e0012788 144:66c58e5b0062
271 interface IChildWidget 271 interface IChildWidget
272 { 272 {
273 //BEGIN Load and save 273 //BEGIN Load and save
274 /** 2nd stage of initialization for widgets; also called on some changes. 274 /** 2nd stage of initialization for widgets; also called on some changes.
275 * 275 *
276 * Widgets should call recursively on their children, redo anything indicated by flags, and 276 * Widgets should call recursively on their children, redo anything
277 * adjust their size and other cached data dependant on any thing which may have changed. 277 * indicated by flags, and adjust their size and other cached data
278 * dependant on any thing which may have changed.
278 * Widgets may rely on setPosition being called afterwards. 279 * Widgets may rely on setPosition being called afterwards.
279 * 280 *
280 * Params: 281 * Params:
281 * n = Indicates this is the (n+1)-th time the function has been called. 282 * n = Indicates this is the (n+1)-th time the function has been called.
282 * flags = if (flags & 1) the renderer has been changed, 283 * flags = if (flags & 1) the renderer has been changed,
283 * if (flags & 2) translation strings are being reloaded. 284 * if (flags & 2) translation strings are being reloaded.
284 * These flags are always true on first run. 285 * These flags are always true on first run.
285 * 286 *
286 * Returns: 287 * Returns:
287 * The method should return true if the dimensions (may) have been changed. This may not be 288 * The method must return true on initial setup and if its dimensions
288 * the case on the first run (when n == 0)!. 289 * (may) have changed. */
289 */
290 bool setup (uint n, uint flags); 290 bool setup (uint n, uint flags);
291 291
292 /** When this is called, if the widget has any changed data to save it should call 292 /** When this is called, if the widget has any changed data to save it should call
293 * IWidgetManager.setData (id, data) to set it and return true. Otherwise it should return 293 * IWidgetManager.setData (id, data) to set it and return true. Otherwise it should return
294 * false. 294 * false.