dd10337fd0
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the BPrivate namespace. Made AppServerLink a cheap object - it will use the applications receiver/sender and not create its own buffers. Fixed broken communication stuff here and there (mostly Font.cpp). Put the newly introduced set|get_system_colors() into the BPrivate namespace - please don't introduce private functions into the public namespace!!! Also fixed their broken communication use, as Darkwyrm obviously forgot about it again: the sequence Flush(); GetNextMessage() without error checking is purely wrong and can make the app hang and/or crash! :-) Other minor cleanup. The input_server used some test mode with the haiku build target which is probably wrong. Hopefully I did not forget anything this time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96
99 lines
2.4 KiB
C++
99 lines
2.4 KiB
C++
/*******************************************************************************
|
|
/
|
|
/ File: Shape.h
|
|
/
|
|
/ Description: BShape encapsulates a Postscript-style "path"
|
|
/
|
|
/ Copyright 1992-98, Be Incorporated, All Rights Reserved
|
|
/
|
|
*******************************************************************************/
|
|
|
|
#ifndef _SHAPE_H
|
|
#define _SHAPE_H
|
|
|
|
#include <BeBuild.h>
|
|
#include <Archivable.h>
|
|
|
|
namespace BPrivate {
|
|
class ServerLink;
|
|
};
|
|
|
|
|
|
/*----------------------------------------------------------------*/
|
|
/*----- BShapeIterator class -------------------------------------*/
|
|
|
|
class BShapeIterator {
|
|
|
|
public:
|
|
BShapeIterator();
|
|
virtual ~BShapeIterator();
|
|
|
|
virtual status_t IterateMoveTo(BPoint *point);
|
|
virtual status_t IterateLineTo(int32 lineCount, BPoint *linePts);
|
|
virtual status_t IterateBezierTo(int32 bezierCount, BPoint *bezierPts);
|
|
virtual status_t IterateClose();
|
|
|
|
status_t Iterate(BShape *shape);
|
|
|
|
private:
|
|
|
|
virtual void _ReservedShapeIterator1();
|
|
virtual void _ReservedShapeIterator2();
|
|
virtual void _ReservedShapeIterator3();
|
|
virtual void _ReservedShapeIterator4();
|
|
|
|
uint32 reserved[4];
|
|
};
|
|
|
|
/*----------------------------------------------------------------*/
|
|
/*----- BShape class ---------------------------------------------*/
|
|
|
|
class BShape : public BArchivable {
|
|
|
|
public:
|
|
BShape();
|
|
BShape(const BShape ©From);
|
|
BShape(BMessage *data);
|
|
virtual ~BShape();
|
|
|
|
virtual status_t Archive(BMessage *into, bool deep = true) const;
|
|
static BArchivable *Instantiate(BMessage *data);
|
|
|
|
void Clear();
|
|
BRect Bounds() const;
|
|
|
|
status_t AddShape(const BShape *other);
|
|
|
|
status_t MoveTo(BPoint point);
|
|
status_t LineTo(BPoint linePoint);
|
|
status_t BezierTo(BPoint controlPoints[3]);
|
|
status_t Close();
|
|
|
|
/*----- Private or reserved ---------------*/
|
|
virtual status_t Perform(perform_code d, void *arg);
|
|
|
|
private:
|
|
|
|
virtual void _ReservedShape1();
|
|
virtual void _ReservedShape2();
|
|
virtual void _ReservedShape3();
|
|
virtual void _ReservedShape4();
|
|
|
|
friend class BShapeIterator;
|
|
friend class TPicture;
|
|
friend class BView;
|
|
friend class BFont;
|
|
friend class BPrivate::ServerLink;
|
|
|
|
void GetData(int32 *opCount, int32 *ptCount, uint32 **opList, BPoint **ptList);
|
|
void SetData(int32 opCount, int32 ptCount, uint32 *opList, BPoint *ptList);
|
|
void InitData();
|
|
|
|
uint32 fState;
|
|
uint32 fBuildingOp;
|
|
void * fPrivateData;
|
|
uint32 reserved[4];
|
|
};
|
|
|
|
#endif
|