Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!decwrl!ucbvax!ucdavis!csusac!sactoh0!unify!openlook!openlook-request From: openlook-request@openlook Newsgroups: comp.windows.open-look Subject: re: OLIT BaseWindow ala' OPEN LOOK App Style Guidelines Message-ID: <9x6s352@openlook.Unify.Com> Date: 29 May 91 22:26:16 GMT Article-I.D.: openlook.9x6s352 Lines: 63 > Anyone have a short code fragment using OLIT that builds a Base Window, > as described in the Application Style Guidelines? For example, page 68 > contains a couple good examples. Unfortunately the OLIT widget set does > not contain a widget that creates a base window for you. I'm not sure why that is unfortunate...my experience shows that each application has unique needs for a base window, and trying to craft a single widget to handle all cases is likely to be fraught with error. Instead, OLIT (including the Intrinsics) provides several single-purpose widgets that can be combined. OLIT does supply a single widget, PopupWindow, for creating popup (pushpin) windows. I designed it--and I don't use it, because each popup window is different. Anyway, here is a (very abbreviated) code fragment to create the base window at the top of page 68 in the Style Guide. Depending on the details of one's needs this fragment may need to change, but I think it illustrates what can be done. top = OlInitialize(...); base = XtVaCreatePopupShell( "base", transientShellWidgetClass, top, XtNmenuButton, (XtArgVal)True, XtNresizeCorners, (XtArtVal)True, XtNmenuType, (XtArgVal)OL_MENU_FULL, (String)0 ); panel = XtVaCreateManagedWidget( "panel", footerPanelWidgetClass, base, (String)0 ); upper = XtVaCreateManagedWidget( "controls", controlAreaWidgetClass, panel, XtNlayoutType, (XtArgVal)OL_FIXEDCOLS, (String)0 ); footer = XtVaCreateManagedWidget( "footer", staticTextWidgetClass, panel, XtNstring, (XtArgVal)"", (String)0 ); controls = XtVaCreateManagedWidget( "controls", controlAreaWidgetClass, upper, (String)0 ); sw = XtVaCreateManagedWidget( "sw", scrolledWindowWidgetClass, upper, (String)0 ); /* * At this point, "controls" is a layout widget in which to * create the various buttons/menus for the ``Control Area'', * and "sw" is a layout widget that should be given a single * child, probably a TextEdit widget, for the ``Pane''. * "footer" is the widget for the footer area. NOTE: This footer * can only hold a single message, not both a status/error message * and state message. */ Steve Humphrey UNIX System Laboratories