////////////////////////////////////////////////////////////////////////// // // XFE_TaskBar Private Methods // ////////////////////////////////////////////////////////////////////////// void XFE_TaskBar::setIconGroupForCommand(CommandType cmd, IconGroup *icons) { Widget * children; Cardinal num_children; Cardinal i; XfeChildrenGet(m_widget,&children,&num_children); for (i = 0; i < num_children; i ++) { if (XfeIsButton(children[i])) { if (Command::intern(XtName(children[i])) == cmd) { XFE_Button * button = (XFE_Button *) XfeInstancePointer(children[i]); XP_ASSERT(button); if (!button) return; button->setPixmap(icons); return; } } } XP_ASSERT(0); // command not found in the taskbar... }
/*----------------------------------------------------------------------*/ static Boolean AcceptChild(Widget child) { Widget w = _XfeParent(child); XfeFancyBoxPart * fp = _XfeFancyBoxPart(w); return (!_XfeIsAlive(fp->icon) && XfeIsButton(child)); }