/* CMUgraphics Package Macintosh version 1.0 Copyright (c) 1998 by Mark Stehlik. All rights reserved. Portions of the code in this file may be derived from code written by Geoff Washburn, Patrick Doane, Jim Roberts, and Lily Hou. Please send all bug reports via e-mail to Mark Stehlik at 'mjs@cs.cmu.edu'. Redistribution and use in source and binary forms of this library, with or without modification, are permitted provided that the following conditions are met: 1. Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. When redistributing modified version of this library it must carry prominent notices stating the name of individual(s) that altered the files, the nature of the modifications, and the date they were performed. 4. No fee is charged for redistribution or use without prior written permission from the author. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This file was last modified on 10.06.1998 */ #ifndef CMU_Graphics_h #define CMU_Graphics_h #include "127Graphics.h" #include "apstring.h" enum drawstyle { NONE, FILLED, FRAME, INVERTED }; class window { public: window(); int GetWidth(); int GetHeight(); void GetWindowSize(int &iX, int &iY); void GetMouseCoord(int &iX, int &iY); void WaitMouseClick(int &iX, int &iY); void GetKeyPress(char &cKey); void SetBrush(int color); void SetBrush(int iRed, int iGreen, int iBlue); void SetPen(int width); void SetFont(int iSize, int iStyle, int iFamily); void DrawPixel(int iX, int iY); void DrawLine(int iX1, int iY1, int iX2, int iY2); void DrawRectangle(int iX1, int iY1, int iX2, int iY2, drawstyle dsStyle = FILLED, int iWidth = 0, int iHeight = 0); void DrawCircle(int iX, int iY, int iRadius, drawstyle dsStyle = FILLED); void DrawEllipse(int iX1, int iY1, int iX2, int iY2, drawstyle dsStyle = FILLED); void DrawArc(int iX, int iY, int iRadius, int iStartDegrees, int iNumDegrees, drawstyle dsStyle = FRAME); void DrawString(int iX, int iY, apstring strText); void DrawInteger(int iX, int iY, int number); private: // to prevent inadvertent copyying, these are declared private void operator= (window&); window(const window &); }; #endif