[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

948.0. "Changing visuals from toolkit?" by CSC32::K_TICE (Ada...Keeping the world safe for bureaucracy!) Wed Jun 14 1989 12:05

    Seems like such a simple question.
    
    Is it true that there is no way to change a visual from toolkit
    routines?  ...meaning that it can only be done from Xlib.
    
    You can only affect the visual of a window at window cretion time,
    right?   ...so if you use a toolkit routine to create a window, and if
    there is no way to modify a visual of a window at creation time with the
    toolkit...
    
    ...that means you cannot affect the visual of a window created via
    toolkit, ever.  (?)
    
    Will you (in future releases) ever be able to affect a visual of a
    window from toolkit routines?  ...or change a visual after the window 
    has been created?
    
    I suspect the answer to both the above questions in "no."  What I am
    after is the right language to use to covey this to others in a simple,
    understandable manner.   ...and since I am struggling with these
    concepts myself, I need a little help.
    
    
    Thanks!
    Ken

T.RTitleUserPersonal
Name
DateLines
948.1PSW::WINALSKICareful with that VAX, EugeneWed Jun 14 1989 18:0612
It doesn't look like it's possible to get the XUI Toolkit to use a visual other
than the default one.  This seems to be a shortcoming in the Xt Intrinsics.
The visual is a parameter to the XtCreateWindow() routine that widgets use to
create their windows, but there is no resource to tell a widget which visual
to use.  If you write your own widget as a subclass of an existing one, you can
supply your own realization routine and call XtCreateWindow() with an alternate
visual.  Aside from that, the only ways I can think of to do it involve nasty
hacks that trick the Xt Intrinsics by making them think the visual you wish to
use is the default.

--PSW

948.2Here's a suggestion17305::WESTI'm just visiting this planet.Thu Jun 15 1989 12:3723
  You would still have to change to visual with Xlib calls.  The way I see
it is that you can do this but you will not be able to do XtInitialize.

  You would have to do all the calls involved with Xtinitialize and change
the visual after you get a display id.  I believe the calls are something
like the following:

    XtToolkitInitialize
    XtCreateApplicationContext
    XtOpenDisplay
    XtAppCreateShell
-- Somewhere after the XtOpenDisplay you could possibly change the visual

-- Then create any widgets...
    DwtMainWindow
    
  I've never tried anything like this, but this seems like it might do the
trick.

					-=> Jim <=-


948.3PSW::WINALSKICareful with that VAX, EugeneFri Jun 16 1989 21:259
RE: .2

You can't change the visual associated with a window.  The visual is set at
window creation time and can't be changed after that.  The problem is that
the Xt intrinsics don't provide any way for you to tell a widget that you want
it to use something other than the default visual.

--PSW

948.4Will be added to IntrinsicsLEOVAX::TREGGIARIMon Jun 19 1989 07:046
    The Intrinsics plan to add a "visual" resource to shell widgets for
    the MIT R4 release.  I don't know yet when that means it will be
    in the DECwindows Intrinsics (but not the currently frozen release...).
    
    Leo

948.5Hmmmm...17305::WESTI&#039;m just visiting this planet.Mon Jun 19 1989 09:459
  Well, that's too bad.  I thought that after the XtOpenDisplay you could
make Xlib calls to change the default visual.  I made the assumption (probably
a bad thing to do) that when the widgets created windows that they would use
the visual that was set.

					-=> Jim <=-