[comp.windows.x] Multiple top level windows

davis@b11.ingr.com (Chris Davis) (05/03/91)

We have an application that creates multiple top-level windows.

We would like to provide a command line argument(s) that allows the
user to specify x number of these windows.  Each window may use a
different resource name in order to specify alternate resource values.

For example:

    $ app -window blue -window red

This would create two top level windows, one with a resource name "blue"
and one woth a resource name "red".

Xt will only return the last "-window" argument when parsing the command
line.

Pre-processing the command line is an option, but we were curious if there
was an alternative.

Any help is appreciated.

--

Chris Davis
Intergraph Motif Integration
davis@nuwave.b11.ingr.com
205-730-6236

doyle@b11.ingr.com (Doyle Davidson) (05/03/91)

In article <1991May2.185712.11423@b11.ingr.com>, davis@b11.ingr.com (Chris Davis) writes:
> We have an application that creates multiple top-level windows.

Oooohhh! :-) :-)

> We would like to provide a command line argument(s) that allows the
> user to specify x number of these windows.  Each window may use a
> different resource name in order to specify alternate resource values.
> 
> Pre-processing the command line is an option, but we were curious if there
> was an alternative.

How about using "XrmoptionSkipArg" or "XrmoptionSkipLine" to specify
them.  This should make life much easier to parse.  You will only be
left with these args after Xt rips out what it wants.
So the user says:
	prog ... -window red ... -window blue ... (XrmoptionSkipArg style)
    or
	proc ... -windows red blue green<cr>	  (XrmoptionSkipLine style)

Although it seems to me that these two Xrm options are useless and really don't
change the argc/argv that you get back.  It you must get these values
into the resource database, use the Xrm* functions to put in resources
programmatically.  Ask me for details if you care.

Doyle x8666
-------------------------------------------------------------------
Doyle C. Davidson              |
Intergraph Corp.               | Intergraph - Everywhere you look!!
Third Party Software           |
1 Madison Industrial Park      |
Huntsville, AL 35806           |  These comments are...
(205) 730-2000                 |
                               |         X-clusively my own.
..!uunet!ingr!doyle            |
-------------------------------------------------------------------