[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

408.0. "UIS to X function mapping" by SMMVAX::MEISNER () Wed Mar 15 1989 15:05

    
    Hello...could someone tell me if I'm reinventing the wheel....
    
    
    Recently, I was handed a project that involved making changes to
    an old UIS program to allow it to create the same display and some
    of the same functions under X and/or DECwindows. The number of uis
    function calls is small...mostly changing fonts, setting fill colors,
    etc. -- nothing TOO complicated. I realize UIS and X are different
    philosophies, but the changes should be few and straight forward;
    like I said, there aren't any complicated uis calls being used.
    
    My question...does anybody have any code I can steal??? like keeping
    track of GC's and making changes to them like UIS$SET_WRITING_INDEX
    or $SET_FONT do?
    
    Any help would be REALLY appreciated!!
    
    
    Thanks,
    Steve
    

T.RTitleUserPersonal
Name
DateLines
408.1VWSENG::KLEINSORGEToys 'R' UsThu Mar 16 1989 11:2335
    
    No there isn't any cut and dried way of moving any given UIS
    application to DECwindows, each is a unique experience.  I had
    hopes a *long* time ago that the art of porting would be fairly
    mechanical, but I've since learned that this isn't true.
    
    Just the uncomplicated function to draw a line segment in DECwindows
    requires that you maintain your own internal display list or backing
    store whereas in UIS you *never* have to worry about this mundane
    chore regardless if you are using the built in display list or not.
    GC's are a lot like one-way ATB's, you must "remember" what the
    settings are (though this is usually no big deal).  You must do
    your own world cooridinate conversions unless you want to convert
    the application to use device coordinates.  The fill patterns for UIS
    are the same as the DDIF patterns (as far as I can tell) so there's no
    big deal there.  Fonts (on the other hand) must be matched, since the
    UIS fonts do not exist on DECwindows and the naming conventions
    are completely different.
    
    So, if you are lucky, you "should" be able to do a straight conversion
    (by hand) to Xlib, of course then you also have to think about the
    DECwindows look and Feel, so maybe "straight" Xlib isn't the way
    to go.  Maybe you create a WINDOW widget with the toolkit and do
    the Xlib graphics into this widget... so you can wrap the XUI look
    & feel around the application.
    
    We have someone who will in the next couple months begin work on
    a application that will "annotate" UIS source code with suggested
    Xlib/XToolkit equivalents.  But it can't do everything, and if it
    could it wouldn't do it well.
    
    There ain't no free lunch.

    _Fred

408.2GObEKALKIN::BUTENHOFBetter Living Through Concurrency!Fri Mar 17 1989 06:5813
For an internally developed product, you might want to look into the GObE
widget... it takes care of display list management and exposure handling for
you.  The display list and graphics attributes aren't really the same as UIS,
but it might well be far easier than adapting to straight Xlib graphics.

There's been some talk about turning GObE into a product so customers can get at
it... but I'm no longer involved in the project, and I haven't tried to follow
the details.

There's a GObE NOTES conference at CLT::GOBE-WIDGET

	/dave

408.3I just need the vanilla code...SMMVAX::MEISNERTue Mar 21 1989 21:0316
    
    The program I am converting uses only 3 fonts, a handful of fill
    patterns....it's pretty straight forward - in fact, I don't even
    need the "look and feel of DECWindows". It's supposed to be the
    same program and UI that appeared under UIS. So there shouldn't
    be any widgets or anything like that. I'm really looking for ways
    to handle or simulate ASTs, perform a UISDC$PLOT, do the UIS$..._KB
    routines -- some of the functions that don't have a replacement
    function under Xlib. If somebody has already done the painstaking
    work, I thought I could use my time to instead glue all the routines
    together.
    
    Thanks,
    Steve
    

408.4VWSENG::KLEINSORGEToys 'R' UsTue Mar 21 1989 21:5915
    
    Don't know if it'll help, but you might check a partial UIS
    emulation that was done by a CAD group.  There is a notesfile
    on TALLIS::XUIS for it.  It was done to get GED to work.  The
    source in Pascal is also provided so you may be able to add what
    you need.
    
    We are currently hoping to have a X11 implementation of UIS sometime
    around fall of this year...  no guarantees yet.
    
    Maybe we'll even throw in a window manager to give the UIS look
    and feel :-)