comparison mde/gui/WidgetManager.d @ 123:d3b2cefd46c9

minSizeChange() allows run-time changes to widgets' minimal size (except for shrinking in a GridLayoutWidget). FloatingAreaWidget: correct resize limiters AStringContent: allows space and ignores modifier keys
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 04 Jan 2009 17:35:15 +0000
parents 5b37d0400732
children 3e648bc53bde
comparison
equal deleted inserted replaced
122:f96e8d18c00a 123:d3b2cefd46c9
240 240
241 //BEGIN IParentWidget methods 241 //BEGIN IParentWidget methods
242 // If call reaches the widget manager there isn't any recursion. 242 // If call reaches the widget manager there isn't any recursion.
243 //NOTE: should be override 243 //NOTE: should be override
244 final void recursionCheck (widgetID) {} 244 final void recursionCheck (widgetID) {}
245 //FIXME: implement
246 override void minSizeChange (IChildWidget widget, wdim mw, wdim mh) {}
245 //END IParentWidget methods 247 //END IParentWidget methods
246 248
247 //BEGIN IWidgetManager methods 249 //BEGIN IWidgetManager methods
248 override IChildWidget makeWidget (IParentWidget parent, widgetID id, IContent content = null) 250 override IChildWidget makeWidget (IParentWidget parent, widgetID id, IContent content = null)
249 { 251 {
402 MenuButtonContent = TAKES_CONTENT | 0x44, 404 MenuButtonContent = TAKES_CONTENT | 0x44,
403 405
404 GridLayout = TAKES_CONTENT | 0x100, 406 GridLayout = TAKES_CONTENT | 0x100,
405 ContentList = TAKES_CONTENT | SAFE_RECURSION | 0x110, 407 ContentList = TAKES_CONTENT | SAFE_RECURSION | 0x110,
406 408
407 FloatingArea = 0x200, 409 FloatingArea = TAKES_CONTENT | 0x200,
408 } 410 }
409 411
410 // Only used for binarySearch algorithm generation; must be ordered by numerical values. 412 // Only used for binarySearch algorithm generation; must be ordered by numerical values.
411 const char[][] WIDGETS = [ 413 const char[][] WIDGETS = [
412 "FixedBlank", 414 "FixedBlank",
413 "SizableBlank", 415 "SizableBlank",
414 "Debug", 416 "Debug",
415 "TextLabel", 417 "TextLabel",
416 "FloatingArea",
417 "addContent", 418 "addContent",
418 "PopupMenu", 419 "PopupMenu",
419 "SubMenu", 420 "SubMenu",
420 "ContentLabel", 421 "ContentLabel",
421 "DisplayContent", 422 "DisplayContent",
422 "BoolContent", 423 "BoolContent",
423 "AStringContent", 424 "AStringContent",
424 "ButtonContent", 425 "ButtonContent",
425 "MenuButtonContent", 426 "MenuButtonContent",
426 "GridLayout", 427 "GridLayout",
428 "FloatingArea",
427 "subMenuContent", 429 "subMenuContent",
428 "ContentList", 430 "ContentList",
429 "editContent", 431 "editContent",
430 "flatMenuContent"]; 432 "flatMenuContent"];
431 433