Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!uwm.edu!uakari.primate.wisc.edu!aplcen!uunet!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (R.L.Hesketh) Newsgroups: comp.windows.x Subject: Re: Reverse Engineering to a User Interface Devl Environment Message-ID: <3348@harrier.ukc.ac.uk> Date: 2 Dec 89 13:10:55 GMT References: <639@ncis.tis.llnl.gov> <2213@bacchus.dec.com> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 49 In article <2213@bacchus.dec.com> klee@decwrl.dec.com writes: >In article <639@ncis.tis.llnl.gov>, carlson@lance.tis.llnl.gov (John >Carlson) writes: >> Now that we are all good toolkit programmers, toolkit >> programming is being replaced by user interface builders. How >> can we easily take our existing applications and bring them into >> the user interface builder world? > >It's probably not too hard to write a tool that will read your C code >(or query your running widgets) and spit out some sort of high level >layout/resource specification language. Reverse engineering dialog, on >the other hand, seems extremely difficult. Yup, reading a widget tree and producing a user interface "layout" specification is not too difficult .. I know, I've done it 8-). Ken is right about the dialog though. You can extract all the resources on a widget instance, including the current translations and compare these against the widget classes' default values, junking the ones that are the same. You can even check the application added actions and callback routines on the callback lists and produce procedural stubs for these. I am currently developing a layout/UI builder/resource manager tool which has a "vampire tap" facility to latch on to existing toolkit programs. The only proviso is however, that the application must be recompiled and linked against a library containing the inter-client communication mechanisms .. plus any Xt{App}MainLoop()'s must be replaced by one of my own. This sets up the link behind the application's back ... it then allows the UI layout (or whatever you want to call it) to latch on to the running application and suck out a copy of its contents. This also means that the application can be edited as it is running (you can do this to some extent using the Macintosh's ResEdit program). Of course this also means you can cause a program to core dump remotely 8-}. My tool has already attached to itself and further refinements to its own interface should be possible using itself (this appears to be a standard test a for UI builder .. can it build itself?). So reverse engineering using the toolkit is very much possible and highly practical. I would very much like to discuss with any interested people the problems involved with interactive UI building and, more importantly to me, the practicalities of end-user customization of user interfaces. >Ken Lee Richard Hesketh : rlh2@ukc.ac.uk ..!mcvax!ukc!rlh2 : @nsfnet-relay.ac.uk:rlh2@ukc.ac.uk --- Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: +44 227 764000 ext 3682/7620