Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!ll-xn!ames!pasteur!cory.Berkeley.EDU!dheller From: dheller@cory.Berkeley.EDU.UUCP Newsgroups: comp.windows.x Subject: Mixing Widgets with non-widgets code (again) Keywords: widets, events Message-ID: <3755@pasteur.Berkeley.Edu> Date: 2 Jun 88 23:12:14 GMT Sender: news@pasteur.Berkeley.Edu Reply-To: dheller@cory.Berkeley.EDU (Dan Heller) Organization: University of California, Berkeley Lines: 31 Posted: Thu Jun 2 19:12:14 1988 I posted a similar note a while ago and no one followed up or responded to me personally, so let me simplify the question a little bit. I want to write an application which opens some windows in which I manage everything about them --their contents, events, gc's, etc... There is quite a bit of blitting of my own XImage's and the like. But I also want to be able to open dialog boxes that contain widget trees of scrollbars, text widgets and command widgets. I don't really care about the dialog box except for functionality (thus, the use of widgets), however, in order to do this, I have to call XtInitialize() (which means that I can NOT have widgets inside of a window I create on my own -- so much for having a "panel" within a window I've already created). Ok, so I accept that the widgets have their own window to play with, but I can't call XtMainLoop() unless I fork() and that not only wastes too much resources, but is tough to manage (if the man program exits, I can't get the widgets to die unless I have that process exit() too). I tried not forking and not calling XtMainLoop() and having my own main loop use XNextEvent() and read events for both my window and the widgets window (I don't know why, but it doesn't seem to work). If I don't call XtMainLoop(), the dialog box (widget tree) never gets displayed -- I also can't seem to get events from it. The bottom line is: if you use widgets, can you ONLY use widgets and no more CreateWindow's? Dan Heller