XtManageChildren(3)

๐Ÿ“ฆ
version 1.3.1 ยท 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, opensuse-leap 16.0

๐ŸŒธ NAME ๐ŸŒธ

okay bestie, welcome to the XT FUNCTIONS corner of the X Toolkit Intrinsics manual ๐Ÿ’– โ€” this page is about XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild, XtChangeManagedSet, and XtIsManaged. their whole job? manage and unmanage children. that's the vibe. periodt. ๐Ÿ‘‘


โœจ SYNTAX โœจ

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal
       num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer
       client_data, WidgetList manage_children, Cardinal
       num_manage_children);

Boolean XtIsManaged(Widget widget);

no cap, that's the whole roster. ๐Ÿซถ


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • child โ€” specifies the child. just the one. the solo girl. ๐Ÿ’…
  • children โ€” specifies a list of child widgets. the whole friend group. ๐Ÿฆ‹
  • num_children โ€” specifies the number of children. yes, you have to count them yourself, i don't make the rules. ๐Ÿ”ข
  • widget โ€” specifies the widget. ๐ŸŒธ
  • manage_children โ€” specifies the list of widget children to add to the managed set. welcome to the group chat. โœจ
  • num_manage_children โ€” specifies the number of entries in the manage_children list. ๐Ÿงฎ
  • unmanage_children โ€” specifies the list of widget children to remove from the managed set. it's giving banishment, lowkey. ๐Ÿ™ˆ
  • num_unmanage_children โ€” specifies the number of entries in the unmanage_children list. ๐Ÿ”ข
  • do_change_proc โ€” specifies the post unmanage, pre manage hook procedure to invoke. the lil intermission between acts. ๐ŸŽญ
  • client_data โ€” specifies the client data to be passed to the hook procedure. lil gift bag for the hook. ๐ŸŽ

๐Ÿ’– DESCRIPTION ๐Ÿ’–

๐Ÿ’ซ XtManageChildren ๐Ÿ’ซ

okay so XtManageChildren does the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass. ๐Ÿšจ like, they ALL have to share one parent, bestie, no mixing families.
  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not. ๐Ÿ’€ so if the parent is actively getting destroyed, we just โœŒ๏ธ out.
  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:
    • Calls the change_managed routine of the widgets' parent.
    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.
    • Maps each previously unmanaged child that has map_when_managed True. ๐Ÿ—บ๏ธโœจ

Managing children is independent of the ordering of children and independent of creating and deleting children. the layout routine of the parent should consider children whose managed field is True and should ignore all other children. ๐Ÿ‘€ and note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure. iykyk. ๐ŸŽ

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. the parent can reposition and resize any of its children. it moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized. ๐Ÿ’ƒ


๐Ÿ’ซ XtManageChild ๐Ÿ’ซ

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren. that's it, that's the whole function โ€” a lil wrapper, an icon, a legend. ๐ŸŒˆ


๐Ÿ’ซ XtUnmanageChildren ๐Ÿ’ซ

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass. ๐Ÿšจ same rule as before, bestie.
  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:
    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.
    • If the child is realized, it makes it nonvisible by unmapping it. ๐Ÿ‘ป poof, gone from view.
  • Calls the change_managed routine of the widgets' parent after all children have been marked if the parent is realized.
XtUnmanageChildren does not destroy the children widgets. โš ๏ธ removing widgets from a parent's managed set is often a temporary banishment, and, some time later, you may manage the children again. so likeโ€ฆ soft block, not a block block. ๐Ÿซฃ

๐Ÿ’ซ XtUnmanageChild ๐Ÿ’ซ

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren. tiny. adorable. efficient. ๐ŸŽ€


๐Ÿ’ซ XtChangeManagedSet ๐Ÿ’ซ

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass. ๐Ÿšจ
  • Returns immediately if the common parent is being destroyed.
  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:
    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).
    • Calls the do_change_proc specified.
    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately. ๐Ÿƒโ€โ™€๏ธ
  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:
    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.
    • If the do_change_proc procedure is non-NULL then it is invoked as specified.
    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed. ๐ŸŽฏ
  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:
    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.
    • Mapping each previously unmanaged child that has map_when_managed True. ๐ŸŒŸ

๐Ÿ’ซ XtIsManaged ๐Ÿ’ซ

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise. the vibe check of the widget world. โœ…โŒ


๐Ÿ”ฎ SEE ALSO ๐Ÿ”ฎ


and that's the page, bestie!! ๐Ÿซถ this was X Version 11, libXt 1.3.1, and the page itself is XtManageChildren(3) โ€” go forth and manage your children responsibly, mwah ๐Ÿ’‹โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from