home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ool.zip
/
OOL
/
include
/
xgraphob.h
< prev
next >
Wrap
Text File
|
1997-02-23
|
2KB
|
52 lines
#ifndef __OOL_XGRAPHICOBJ_H__
#define __OOL_XGRAPHICOBJ_H__
/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/* class: XGraphicObject */
/* derived from: XObject */
/* last update: 7/96 */
/* programmed by: Stefan von Brauk (sbrauk@gwdg.de) */
/*===========================================================================*/
#include "xobject.h"
#include "xpoint.h"
#include "XColor.h"
#include "XGraphDv.h"
class XRect;
#define GO_HIDE 1
class _export_ XGraphicObject: public XObject
{
friend XGraphicDevice;
friend class XPrinterDevice;
protected:
XGraphicObject * next;
XGraphicDevice * dev;
XColor color;
XPoint p;
char settings;
virtual BOOL HitTest( const LONG , const LONG ) { return FALSE;}
XGraphicObject() { next=NULL; }
SHORT pattern;
public:
XGraphicObject( const XGraphicDevice*, const XPoint * p = NULL);
XGraphicObject( const XGraphicDevice*d, const LONG x, const LONG y);
virtual ~XGraphicObject() { if(dev) dev->RemoveObject( this, FALSE); }
virtual void Draw( const XRect * = NULL) { ;}
void GetColor( XColor * c) { *c = color; }
void GetPos( XPoint * point) { *point = p; }
void Move( const XPoint * point) { p = *point; }
void SetColor( const XColor * c) { color = *c;}
void SetPattern( SHORT p) { pattern = p; }
virtual void SetupDevice ( void ) { LONG c = color.GetColor(); if( dev->aktColor != c) dev->SetColor(c); if(dev->aktPattern != pattern) dev->SetPattern(pattern);};
void Show( const BOOL show = TRUE );
};
#endif