[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

547.0. "how to enable iconize button?" by ULTIM8::HSU () Thu Apr 06 1989 16:14

    In my application I'm using UIL to define all my widgets. I have a
    bunch of popup dialog boxes (well okay, they're popup adbs). When
    I bring them up they don't have available the button in the
    upper-left corner which allows you to iconize the dialog box.
    (it's blackened out) Is there a way, preferable via UIL, that I
    can enables the iconize button? 

    Thanks,
    William

T.RTitleUserPersonal
Name
DateLines
547.1Only window manager owned windows have 'emCSC32::G_JOHNSONJust a nickle's worth of dreamsFri Apr 07 1989 15:587
    Pardon my ignorance if this is not correct, but the way that I
    understand that, is that this window(dialog box) is not owned by the window
    manager and that only windows which ARE owned by the window manager
    can have shrink to icon buttons.  
    
    Greg...

547.2more infoLDP::WEAVERLaboratory Data Products/ScienceMon Apr 10 1989 13:4548
    What .1 is trying not to say is that the iconify button is owned by
    the window manager, so there is no way to have it set from UIL.
    You can, however, use XtParent to find the widget ID of the window
    manager's window given the dialog box widget ID.  Simply fetch
    your popup from your hierarchy, use XtSetArg to set XtNnoIconify
    to FALSE, XtSetValues to set the parameter in the parent, and then
    XtManageChild to cause the widget to be realized.
    
    If a different window manager comes along and behaves differently,
    it is possible this mechanism could break, but this seems to work
    OK for the current DECwindows default window manager and somewhat
    for the hp window manager.
    
    The following is some code to implement iconify buttons and icons
    in the DECwindows V1 environment.  The hp window manager behaves a
    little differently in that I think it uses 64x64 icons, rather than
    32x32, and it doesn't make use of the "iconify" pixmap, the following
    code also doesn't produce an icon for the "main window" (if memory
    serves me correctly) but does produce them for the popups.
    
        static Arg args[5];
    
        if (widget == NULL)
          {
            if (DwtFetchWidget(hierarchy, "my_popup", toplevel,
              &widget, &dummy_class) != DRMSuccess)
              {
                s_error("can't fetch popup widget");
              }
            /* Set the title for the title bar */
            XtSetArg (args[0], DwtNtitle, widget_banner);
            /* Allow the window to be iconified (double negative) */
            XtSetArg (args[1], XtNnoIconify, FALSE);
            /* Set the name to be used beside the icon */
            XtSetArg (args[2], XtNiconName, widget_icon_name);
            /* Set the big icon */
            XtSetArg (args[3], XtNiconPixmap, widget_icon);
            /* Now set the iconify button (and small icon) */
            XtSetArg (args[4], XtNiconifyPixmap, widget_iconify);
            XtSetValues (XtParent (widget), args, 5);
          }
        XtManageChild(widget);
    
    I wish window manager designer's had been more consistent in their
    designs (like allowing XGetIconSizes to return useful information!).
    
    						-Dave

547.3well, it sort of works...ULTIM8::HSUMon Apr 10 1989 21:0718
    re: < Note 547.2 by LDP::WEAVER "Laboratory Data Products/Science">

    I did as you suggested, I set the XtNnoIconify argument to false,
    and indeed I did get the shrink to an icon box on my popup dbs.
    The strange thing is that the dialog boxes exhibit unusual
    behavior. For some reason, when I iconize one of the dialog
    boxes, then iconize the main window, and then un-iconize the main
    window the dialog box reappears as well. The shrink to an icon box
    on the dialog box does not work at this stage, and the icon in the
    icon box is still dark (not grayed). When I click on the icon in
    the icon box focus is then moved to the dialog box. Clicking on
    the icon in the icon box again will iconize the dialog box. Has
    anyone else seen this peculiar behavior?

    Thanks for the help so far,
    William

547.4What about Xlib ??GSRC::WESTI&#039;m just visiting this planet.Thu Apr 13 1989 02:008
    I have been able to enable/disable the icon button with the toolkit.
    Does anyone know how this can be done from Xlib calls.  I think it has
    something to do with WMHINTS but alas I have had no success to date.
    
    Thanks for any help.
    
                                 -=> Jim <=-

547.5OK...but????CSC32::K_TICEAda...Keeping the world safe for bureaucracy!Wed Jun 14 1989 14:4714
    RE: .2
    
    Ok.  This code works, but I am confused.
    
    We did an XtParent on widget, but we just said toplevel was the parent
    of widget???
    
    What is XtParent really returning?  Is the parent of widget not simply
    toplevel?  ...and if not, I'm confused!?
    
    
    
    Ken

547.6Shell widgetsGR8FUL::HERBERTClass B Computing DeviceWed Jun 14 1989 14:5416
    When you create a popup dialog box, the toolkit creates a hidden
    "shell" widget in between the toplevel widget and the popup widget. The
    shell widget contains the code necessary to communicate with the window
    manager, and gives the dialog box its "popup" characteristics.
    
    You can also create shell widgets explicitly, and use them as parents
    of other types of windows.
    
    The shell widgets are documented in the Toolkit Reference Manual (if I
    recall correctly - I'm writing this from home). The widget that you get
    back from XtParent(popup) is a shell widget - you'll see that there are
    many resources that you can set on them to change the interface with
    the window manager.
    
    Kevin