Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!kepler1!fcaggian From: fcaggian@kepler.com (Frank Caggiano) Newsgroups: comp.lang.eiffel Subject: Re: X resource managment with source Keywords: resources Message-ID: <449@kepler1.kepler.com> Date: 28 Nov 90 20:44:09 GMT References: <447@kepler1.kepler.com> Organization: Kepler Financial Mgmt., Setuket, NY Lines: 56 I removed the geometry parsing from resource.e and xresource.c and made it a seperate class. Not sure if sending the address of the integers to XParseGeometry using the '@' operator is considered ok. It works here. Anyone have any comments? This is useable without modification to any of the standard ISE classes. Setting x and y in the root window before the first display will position the window on the screen. Also the screen size is avaliable in Device.width and Device.height to allow for relative positioning from the right or bottom edge of the screen. If you use this remove parse_geometry from resource.e. -- -- class GEOMETRY -- class for parsing the X geometry string. -- -- Copyright (c) Kepler Financial Mgmt. -- -- Frank Caggiano -- Tue Nov 6 13:12:08 EST 1990 -- class GEOMETRY export parse_geometry, width_hint, height_hint, x_hint, y_hint, feature parse_geometry(geos: STRING) is -- parse X geometry string in the form: -- =x{+-}{+-} require a_geometry: not geos.void external x_parse_geometry:INTEGER name "XParseGeometry" language "C" local x: INTEGER do x := x_parse_geometry(geos.to_c, @x_hint, @y_hint, @width_hint, @height_hint); end; -- Create width_hint, height_hint: INTEGER; -- From parsed string, width and height values. x_hint, y_hint: INTEGER; -- From parse stringd, x,y screen position. end; -- GEOMETRY -- Frank Caggiano INTERNET: fcaggian@kepler.com Kepler Financial Management, Ltd. UUCP: ..!uunet!kepler1!fcaggian 100 North Country Rd. fax: (516) 751-8678 Sekauket, NY 11733 voice: (516) 689-6300