Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.programmer Subject: Re: Some Intuition/Graphics questions Message-ID: <17840@cbmvax.commodore.com> Date: 21 Jan 91 17:56:37 GMT References: <1991Jan20.022627.13975@cs.dal.ca> Reply-To: peter@cbmvax.commodore.com (Peter Cherna) Distribution: na Organization: Commodore, West Chester, PA Lines: 43 In article <1991Jan20.022627.13975@cs.dal.ca> dewolfe@ug.cs.dal.ca (Colin DeWolfe) writes: >I am doing a project for my 4550 Computer Science class (microcomputers) and >have a couple of questions. > >1) How would one find out what the dimensions of the window borders are > without actually opening a window. Some people open a small window first, and use the border dimensions from that. You could add a "Welcome" window that introduced the program. Something that said "Welcome to MyUtility, by Colin DeWolfe", would seamlessly give you that information. Many people rely on knowledge of the quantities that will be placed in the Border variables of the windows they create. These values have not changed in 2.0, though I'll warn you that Intuition now renders into ALL the pixels that those values declare. >2) How does one find the size of the default system font so that I will know > how large a window to open (as per above) as well the size of the font for > the border. As above, I need to figure this out WITHOUT opening a window. The font that your window will get (if it's on the Workbench screen) is GfxBase->DefaultFont for the text that will be contained, and the WorkbenchScreen->Font for the title bar. The title-bar's height will be WorkbenchScreen->WBorTop + WorkbenchScreen->Font->ta_YSize + 1. >3) how does one find out in C whether you were launced from workbench or CLI? The standard argc variable is zero from the Workbench, and always at least one from the CLI. You can use your workbench startup message to get Workbench arguments, and argv[] to get your CLI arguments. >-- >Colin DeWolfe >dewolfe@ug.cs.dal.ca Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com My opinions do not necessarily represent the opinions of my employer. "Oh, PIN-compatible! I thought you wanted me to make it IN-compatible!"