From 350ecf8d15cfc2a102b5c4e49833959f45d8bb58 Mon Sep 17 00:00:00 2001 From: ramiro Date: Fri, 22 May 1998 06:50:41 +0000 Subject: [PATCH] Add initial support for layable children resource. git-svn-id: svn://10.0.0.236/trunk@2171 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/xfe/XfeWidgets/Xfe/Chrome.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/ComboBox.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/DashBoard.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/FancyBox.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/Geometry.c | 5 +- mozilla/cmd/xfe/XfeWidgets/Xfe/Manager.c | 384 ++++++++++++++------ mozilla/cmd/xfe/XfeWidgets/Xfe/ManagerP.h | 66 +++- mozilla/cmd/xfe/XfeWidgets/Xfe/Oriented.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/StringDefs.h | 4 + mozilla/cmd/xfe/XfeWidgets/Xfe/TaskBar.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/TempTwo.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBar.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBox.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/ToolItem.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/ToolScroll.c | 2 + mozilla/cmd/xfe/XfeWidgets/Xfe/XfeP.h | 2 + 17 files changed, 362 insertions(+), 123 deletions(-) diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/Chrome.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/Chrome.c index 5505bc7930e..17b0becfe04 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/Chrome.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/Chrome.c @@ -356,6 +356,8 @@ _XFE_WIDGET_CLASS_RECORD(chrome,Chrome) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ NULL, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/ComboBox.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/ComboBox.c index 96adbd5ae95..b981cddf45b 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/ComboBox.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/ComboBox.c @@ -575,6 +575,8 @@ _XFE_WIDGET_CLASS_RECORD(combobox,ComboBox) = NULL, /* draw_background */ DrawShadow, /* draw_shadow */ DrawComponents, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/DashBoard.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/DashBoard.c index f4bb3bef794..e5bb5ee5ba7 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/DashBoard.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/DashBoard.c @@ -364,6 +364,8 @@ _XFE_WIDGET_CLASS_RECORD(dashboard,DashBoard) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ NULL, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/FancyBox.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/FancyBox.c index 3ebbcc06990..cbc3f649465 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/FancyBox.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/FancyBox.c @@ -531,6 +531,8 @@ _XFE_WIDGET_CLASS_RECORD(fancybox,FancyBox) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ XfeInheritDrawComponents, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/Geometry.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/Geometry.c index c9925076518..e9eed768465 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/Geometry.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/Geometry.c @@ -29,7 +29,7 @@ #include #include -#if 1 +#if 0 #ifdef DEBUG_ramiro #define DEBUG_DIMENSIONS 1 #endif @@ -345,11 +345,12 @@ _XfeConfigureWidget(Widget w,int x,int y,int width,int height) * * These assertions help me find such problems. */ +#if 0 #ifdef DEBUG_ramiro assert( width >= 0 ); assert( height >= 0 ); #endif - +#endif /* Ignore this request if width or height are 0. * * The right thing would be for the above asserts to catch 0 as well. diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/Manager.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/Manager.c index cf15f101cfc..0e57d39bbc8 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/Manager.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/Manager.c @@ -45,6 +45,8 @@ #define MESSAGE13 "The XmNborderWidth of a child cannot be set explicitly." #define MESSAGE14 "Cannot accept new child '%s'." #define MESSAGE15 "XmNnumPrivateComponents is a read-only resource." +#define MESSAGE16 "XmNlayableChildren is a read-only resource." +#define MESSAGE17 "XmNnumLayableChildren is a read-only resource." #define MIN_LAYOUT_WIDTH 10 #define MIN_LAYOUT_HEIGHT 10 @@ -312,6 +314,26 @@ static XtResource resources[] = (XtPointer) 0 }, + /* Layable children resources */ + { + XmNnumLayableChildren, + XmCReadOnly, + XmRCardinal, + sizeof(Cardinal), + XtOffsetOf(XfeManagerRec , xfe_manager . num_layable_children), + XmRImmediate, + (XtPointer) 0 + }, + { + XmNlayableChildren, + XmCReadOnly, + XmRWidgetList, + sizeof(WidgetList), + XtOffsetOf(XfeManagerRec , xfe_manager . layable_children), + XmRImmediate, + (XtPointer) NULL + }, + /* Popup children resources */ { XmNnumPopupChildren, @@ -538,7 +560,9 @@ _XFE_WIDGET_CLASS_RECORD(manager,Manager) = NULL, /* draw_background */ DrawShadow, /* draw_shadow */ NULL, /* draw_components */ - NULL /* extension */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ + NULL, /* extension */ }, }; @@ -608,6 +632,12 @@ ClassPartInit(WidgetClass wc) _XfeResolve(cc,sc,xfe_manager_class,draw_components, XfeInheritDrawComponents); + + _XfeResolve(cc,sc,xfe_manager_class,count_layable_children, + XfeInheritCountLayableChildren); + + _XfeResolve(cc,sc,xfe_manager_class,child_is_layable, + XfeInheritChildIsLayable); } /*----------------------------------------------------------------------*/ static void @@ -653,6 +683,12 @@ Destroy(Widget w) /* XtRemoveAllCallbacks(w,XmNlayoutCallback); */ /* XtRemoveAllCallbacks(w,XmNresizeCallback); */ /* XtRemoveAllCallbacks(w,XmNexposeCallback); */ + + /* Free the layable children list */ + if (_XfemLayableChildren(w) != NULL) + { + XtFree((char *) _XfemLayableChildren(w)); + } } /*----------------------------------------------------------------------*/ static void @@ -757,6 +793,22 @@ SetValues(Widget ow,Widget rw,Widget nw,ArgList args,Cardinal *nargs) _XfeWarning(nw,MESSAGE15); } + /* num_layable_children */ + if (_XfemNumLayableChildren(nw) != _XfemNumLayableChildren(ow)) + { + _XfemNumLayableChildren(nw) = _XfemNumLayableChildren(ow); + + _XfeWarning(nw,MESSAGE17); + } + + /* layable_children */ + if (_XfemLayableChildren(nw) != _XfemLayableChildren(ow)) + { + _XfemLayableChildren(nw) = _XfemLayableChildren(ow); + + _XfeWarning(nw,MESSAGE16); + } + /* height */ if (_XfeHeight(nw) != _XfeHeight(ow)) { @@ -1834,132 +1886,21 @@ _XfeManagerDrawShadow(Widget w, } } /*----------------------------------------------------------------------*/ - -/* Public Functions */ -/*----------------------------------------------------------------------*/ -void -XfeManagerLayout(Widget w) +/* extern */ Boolean +_XfeManagerChildIsLayable(Widget child) { - assert( _XfeIsAlive(w) ); - assert( XfeIsManager(w) ); + Widget w = _XfeParent(child); + XfeManagerWidgetClass mc = (XfeManagerWidgetClass) XtClass(w); + Boolean filter = True; - XfeResize(w); - -#if 0 - /* Setup the max children dimensions */ - _XfeManagerChildrenInfo(w, - &_XfemMaxChildWidth(w), - &_XfemMaxChildHeight(w), - &_XfemTotalChildrenWidth(w), - &_XfemTotalChildrenHeight(w), - &_XfemNumManaged(w), - &_XfemNumComponents(w)); - - - /* Make sure some components exist */ - if (!_XfemNumComponents(w)) + if (mc->xfe_manager_class.delete_child != NULL) { - return; + filter = (*mc->xfe_manager_class.delete_child)(child); } - /* Layout the components */ - _XfeManagerLayoutComponents(w); - - /* Layout the children */ - _XfeManagerLayoutChildren(w); -#endif + return (filter && _XfeChildIsShown(child) && _XfeIsRealized(child)); } /*----------------------------------------------------------------------*/ -void -XfeManagerSetChildrenValues(Widget w, - ArgList args, - Cardinal count, - Boolean only_managed) -{ - Cardinal i; - - assert(w != NULL); - - /* Make sure its a Manager */ - if (!XfeIsManager(w)) - { - _XfeWarning(w,MESSAGE5); - return; - } - - _XfemIgnoreConfigure(w) = True; - - /* Iterate through all the items */ - for (i = 0; i < _XfemNumChildren(w); i++) - { - Widget obj = _XfemChildren(w)[i]; - - if (_XfeIsAlive(obj)) - { - if (only_managed && XtIsManaged(obj)) - { - XtSetValues(obj,args,count); - } - else - { - XtSetValues(obj,args,count); - } - } - } - - _XfemIgnoreConfigure(w) = False; - -/* XfeConfigure(w); */ -} -/*----------------------------------------------------------------------*/ -void -XfeManagerApply(Widget w, - XfeManagerApplyProc proc, - XtPointer data, - Boolean only_managed) -{ - Cardinal i; - - assert(w != NULL); - - /* Make sure its a Manager */ - if (!XfeIsManager(w)) - { - _XfeWarning(w,MESSAGE5); - - return; - } - - /* Show the action button as needed */ - _XfemIgnoreConfigure(w) = True; - - /* Iterate through all the items */ - for (i = 0; i < _XfemNumChildren(w); i++) - { - Widget child = _XfemChildren(w)[i]; - - if (child && - _XfeIsAlive(child) && - !_XfeManagerPrivateComponent(child)) - { - if (only_managed) - { - if (XtIsManaged(child)) - { - proc(w,child,data); - } - } - else - { - proc(w,child,data); - } - } - } - - _XfemIgnoreConfigure(w) = False; - - XfeManagerLayout(w); -} /*----------------------------------------------------------------------*/ @@ -2218,3 +2159,206 @@ _XfeManagerComponentInfo(Widget w, } } /*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/* */ +/* Name: _XfeManagerGetLayableChildren() */ +/* */ +/* Purpose: Obtain a list of layable children */ +/* */ +/* Ret Val: void */ +/* */ +/* Args in: w The manager widget. */ +/* */ +/* Args out: layable_children_out Array of layable children */ +/* num_layable_children_out Size of the array */ +/* */ +/*----------------------------------------------------------------------*/ +/* extern */ void +layable_children(Widget w, + WidgetList * layable_children_out, + Cardinal * num_layable_children_out) +{ + Widget child; + Cardinal i; + WidgetList layable_children = NULL; + Cardinal num_layable_children = 0; + + assert( XfeIsManager(w) ); + assert( layable_children_out != NULL ); + assert( num_layable_children_out != NULL ); + assert( XfeIsManager(w) ); + + + + *layable_children_out = layable_children; + *num_layable_children_out = num_layable_children; + +#if 0 + /* Iterate through all the items */ + for (i = 0; i < _XfemNumChildren(w); i++) + { + child = _XfemChildren(w)[i]; + + /* Check for private components */ + if (_XfeManagerPrivateComponent(child) && + XtIsManaged(child) && + _XfeIsAlive(child)) + { + /* Keep track of largest width */ + if (_XfeWidth(child) > max_width) + { + max_width = _XfeWidth(child); + } + + /* Keep track of largest height */ + if (_XfeHeight(child) > max_height) + { + max_height = _XfeHeight(child); + } + } + } + + /* Assign only required arguments */ + if (max_width_out) + { + *max_width_out = max_width; + } + + if (max_height_out) + { + *max_height_out = max_height; + } +#endif +} +/*----------------------------------------------------------------------*/ + + +/*----------------------------------------------------------------------*/ +/* */ +/* XfeManager public functions */ +/* */ +/*----------------------------------------------------------------------*/ +void +XfeManagerLayout(Widget w) +{ + assert( _XfeIsAlive(w) ); + assert( XfeIsManager(w) ); + + XfeResize(w); + +#if 0 + /* Setup the max children dimensions */ + _XfeManagerChildrenInfo(w, + &_XfemMaxChildWidth(w), + &_XfemMaxChildHeight(w), + &_XfemTotalChildrenWidth(w), + &_XfemTotalChildrenHeight(w), + &_XfemNumManaged(w), + &_XfemNumComponents(w)); + + + /* Make sure some components exist */ + if (!_XfemNumComponents(w)) + { + return; + } + + /* Layout the components */ + _XfeManagerLayoutComponents(w); + + /* Layout the children */ + _XfeManagerLayoutChildren(w); +#endif +} +/*----------------------------------------------------------------------*/ +void +XfeManagerSetChildrenValues(Widget w, + ArgList args, + Cardinal count, + Boolean only_managed) +{ + Cardinal i; + + assert(w != NULL); + + /* Make sure its a Manager */ + if (!XfeIsManager(w)) + { + _XfeWarning(w,MESSAGE5); + return; + } + + _XfemIgnoreConfigure(w) = True; + + /* Iterate through all the items */ + for (i = 0; i < _XfemNumChildren(w); i++) + { + Widget obj = _XfemChildren(w)[i]; + + if (_XfeIsAlive(obj)) + { + if (only_managed && XtIsManaged(obj)) + { + XtSetValues(obj,args,count); + } + else + { + XtSetValues(obj,args,count); + } + } + } + + _XfemIgnoreConfigure(w) = False; + +/* XfeConfigure(w); */ +} +/*----------------------------------------------------------------------*/ +void +XfeManagerApply(Widget w, + XfeManagerApplyProc proc, + XtPointer data, + Boolean only_managed) +{ + Cardinal i; + + assert(w != NULL); + + /* Make sure its a Manager */ + if (!XfeIsManager(w)) + { + _XfeWarning(w,MESSAGE5); + + return; + } + + /* Show the action button as needed */ + _XfemIgnoreConfigure(w) = True; + + /* Iterate through all the items */ + for (i = 0; i < _XfemNumChildren(w); i++) + { + Widget child = _XfemChildren(w)[i]; + + if (child && + _XfeIsAlive(child) && + !_XfeManagerPrivateComponent(child)) + { + if (only_managed) + { + if (XtIsManaged(child)) + { + proc(w,child,data); + } + } + else + { + proc(w,child,data); + } + } + } + + _XfemIgnoreConfigure(w) = False; + + XfeManagerLayout(w); +} +/*----------------------------------------------------------------------*/ diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/ManagerP.h b/mozilla/cmd/xfe/XfeWidgets/Xfe/ManagerP.h index 3f239921c9f..af2f4fdb6d5 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/ManagerP.h +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/ManagerP.h @@ -46,19 +46,62 @@ extern "C" { typedef struct { XfeBitGravityType bit_gravity; /* bit_gravity */ + XfeGeometryProc preferred_geometry; /* preferred_geometry */ XfeGeometryProc minimum_geometry; /* minimum_geometry */ + XtWidgetProc update_rect; /* update_rect */ + XfeChildFunc accept_child; /* accept_child */ XfeChildFunc insert_child; /* insert_child */ XfeChildFunc delete_child; /* delete_child */ XtWidgetProc change_managed; /* change_managed */ + XfePrepareProc prepare_components; /* prepare_components */ + XtWidgetProc layout_components; /* layout_components */ XtWidgetProc layout_children; /* layout_children */ + XfeExposeProc draw_background; /* draw_background */ XfeExposeProc draw_shadow; /* draw_shadow */ XfeExposeProc draw_components; /* draw_components */ + + /* + * Layable children support. + * + * If the widget class sets the 'count_layable_children' field to + * 'True', then a read-only list of layable children will be allocated + * and maintained by the XfeManager super class. This list can be + * accessed via the XmNlayableChildren and XmNnumLayableChildren. + * + * The purpose of these two fields is to give the sub class widget + * writer the ability to control children layout in detail. The feature + * is optional so that sub classes of XfeManager that don't need detailed + * layout control will not suffer a runtime resource and performance + * penalty. + * + * The 'child_is_layable' is used to determine whether a child is + * layable. By default all children that comply with the following + * are considered layable: + * + * 1. _XfeIsAlive(child) + * 2. _XfeIsRealized(child) + * 3. _XfeIsManaged(child) + * 4. !_XfemNumPrivateComponents(child) + * + * The XfeManager class does not define an 'child_is_layable' method + * by default. Thus, all children that comply with the above + * conditions are considered layable. + * + * A sub class can further filter which children are layable by + * defining an 'child_is_layable' method. If defined, this method + * will be invoked as needed by the XfeManager class. If should + * return 'True' if the given child is layable, or 'False' otherwise. + * + */ + Boolean count_layable_children; + XfeChildFunc child_is_layable; + XtPointer extension; /* extension */ } XfeManagerClassPart; @@ -120,6 +163,10 @@ typedef struct _XfeManagerPart /* Private Component resources */ Cardinal num_private_components; /* Num private components*/ + /* Layable children resources */ + Cardinal num_layable_children; /* Num layable children */ + WidgetList layable_children; /* Layable children */ + /* Private Data Members */ int config_flags; /* Require Geometry */ int prepare_flags; /* Require Geometry */ @@ -245,6 +292,9 @@ _XfeManagerDrawShadow (Widget w, Region region, XRectangle * clip_rect); /*----------------------------------------------------------------------*/ +extern Boolean +_XfeManagerChildIsLayable (Widget child); +/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /* */ @@ -272,7 +322,15 @@ _XfeManagerComponentInfo (Widget w, /* */ /*----------------------------------------------------------------------*/ #define _XfeManagerAccessBitGravity(w) \ -(((XfeManagerWidgetClass) XtClass(w))->xfe_manager_class.bit_gravity) +(((XfeManagerWidgetClass) XtClass(w))->xfe_manager_class . bit_gravity) + +/*----------------------------------------------------------------------*/ +/* */ +/* XfeManagerWidgetClass bit_gravity access macro */ +/* */ +/*----------------------------------------------------------------------*/ +#define _XfeManagerTrackLayableChildren(w) \ +(((XfeManagerWidgetClass) XtClass(w))->xfe_manager_class . count_layable_children) /*----------------------------------------------------------------------*/ /* */ @@ -475,6 +533,12 @@ _XfeManagerComponentInfo (Widget w, #define _XfemNumPrivateComponents(w) \ (((XfeManagerWidget) (w))->xfe_manager . num_private_components) /*----------------------------------------------------------------------*/ +#define _XfemLayableChildren(w) \ +(((XfeManagerWidget) (w))->xfe_manager . layable_children) +/*----------------------------------------------------------------------*/ +#define _XfemNumLayableChildren(w) \ +(((XfeManagerWidget) (w))->xfe_manager . num_layable_children) +/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /* */ diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/Oriented.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/Oriented.c index 9d372827b09..78e310e7b58 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/Oriented.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/Oriented.c @@ -306,6 +306,8 @@ _XFE_WIDGET_CLASS_RECORD(oriented,Oriented) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ NULL, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c index 5396e27b979..a91c8e5eda9 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c @@ -639,6 +639,8 @@ _XFE_WIDGET_CLASS_RECORD(pane,Pane) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ DrawComponents, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/StringDefs.h b/mozilla/cmd/xfe/XfeWidgets/Xfe/StringDefs.h index 25d89062384..77295162b83 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/StringDefs.h +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/StringDefs.h @@ -198,6 +198,7 @@ #define XmNlabelAlignment "labelAlignment" #define XmNlabelDirection "labelDirection" #define XmNlabelPixmapMask "labelPixmapMask" +#define XmNlayableChildren "layableChildren" #define XmNleftPixmap "leftPixmap" #define XmNleftRaisedPixmap "leftRaisedPixmap" #define XmNleftView "leftView" @@ -211,6 +212,7 @@ #define XmNmaxNumRows "maxNumRows" #define XmNnumAnimationPixmaps "numAnimationPixmaps" #define XmNnumFontItems "numFontItems" +#define XmNnumLayableChildren "numLayableChildren" #define XmNnumPopupChildren "numPopupChildren" #define XmNnumPrivateComponents "numPrivateComponents" #define XmNnumRows "numRows" @@ -400,6 +402,7 @@ #define XmCLabelAlignment "LabelAlignment" #define XmCLabelDirection "LabelDirection" #define XmCLabelPixmapMask "LabelPixmapMask" +#define XmCLayableChildren "LayableChildren" #define XmCLeftPixmap "LeftPixmap" #define XmCLeftRaisedPixmap "LeftRaisedPixmap" #define XmCListFontList "ListFontList" @@ -408,6 +411,7 @@ #define XmCMaxNumRows "MaxNumRows" #define XmCNumAnimationPixmaps "NumAnimationPixmaps" #define XmCNumFontItems "NumFontItems" +#define XmCNumLayableChildren "NumLayableChildren" #define XmCNumLogoPixmaps "NumLogoPixmaps" #define XmCNumRows "NumRows" #define XmCOpen "Open" diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/TaskBar.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/TaskBar.c index 84923897075..c09ae89b43f 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/TaskBar.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/TaskBar.c @@ -265,6 +265,8 @@ _XFE_WIDGET_CLASS_RECORD(taskbar,TaskBar) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ XfeInheritDrawComponents, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/TempTwo.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/TempTwo.c index 746a4ac61f7..1954ca3fa55 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/TempTwo.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/TempTwo.c @@ -463,6 +463,8 @@ _XFE_WIDGET_CLASS_RECORD(temptwo,TempTwo) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ DrawComponents, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBar.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBar.c index f351ec7e244..161ee096a7d 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBar.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBar.c @@ -539,6 +539,8 @@ _XFE_WIDGET_CLASS_RECORD(toolbar,ToolBar) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ DrawComponents, /* draw_components */ + True, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBox.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBox.c index 171ff1cac2a..4c99e374c84 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBox.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolBox.c @@ -649,6 +649,8 @@ _XFE_WIDGET_CLASS_RECORD(toolbox,ToolBox) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ NULL, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolItem.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolItem.c index b0e2d3bd3d4..b799cc14875 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolItem.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolItem.c @@ -197,6 +197,8 @@ _XFE_WIDGET_CLASS_RECORD(toolitem,ToolItem) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ NULL, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolScroll.c b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolScroll.c index 724602aca7e..e1689469f41 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolScroll.c +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/ToolScroll.c @@ -311,6 +311,8 @@ _XFE_WIDGET_CLASS_RECORD(toolscroll,ToolScroll) = NULL, /* draw_background */ XfeInheritDrawShadow, /* draw_shadow */ DrawComponents, /* draw_components */ + False, /* count_layable_children*/ + NULL, /* child_is_layable */ NULL, /* extension */ }, diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeP.h b/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeP.h index fdfca969ae4..d93533b3cf1 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeP.h +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeP.h @@ -114,6 +114,7 @@ typedef int XfeBitGravityType; #define XfeInheritArmTimeout ((XtTimerCallbackProc) _XtInherit) #define XfeInheritBitGravity ((XfeBitGravityType) _XtInherit) #define XfeInheritChangeManaged ((XtWidgetProc) _XtInherit) +#define XfeInheritChildIsLayable ((XfeChildFunc) _XtInherit) #define XfeInheritClickTimeout ((XtTimerCallbackProc) _XtInherit) #define XfeInheritDeleteChild ((XfeChildFunc) _XtInherit) #define XfeInheritDescendantDragEnd ((XfeOrientedProc) _XtInherit) @@ -152,6 +153,7 @@ typedef int XfeBitGravityType; #define XfeInheritMotion ((XfeOrientedProc) _XtInherit) #define XfeInheritPreferredGeometry ((XfeGeometryProc) _XtInherit) #define XfeInheritToggleSelection ((XtWidgetProc) _XtInherit) +#define XfeInheritCountLayableChildren ((Boolean) _XtInherit) #define XfeInheritUpdateRect ((XtWidgetProc) _XtInherit) /*----------------------------------------------------------------------*/