2006-01-03 12:29:22 +03:00
|
|
|
#ifndef __SERVER_PICTURE_H
|
|
|
|
#define __SERVER_PICTURE_H
|
2003-03-21 18:49:28 +03:00
|
|
|
|
2006-01-03 12:29:22 +03:00
|
|
|
#include <Font.h>
|
|
|
|
#include <Rect.h>
|
|
|
|
#include <Region.h>
|
|
|
|
#include <DataIO.h>
|
|
|
|
#include <InterfaceDefs.h>
|
2005-11-14 22:46:20 +03:00
|
|
|
|
2006-01-04 12:49:47 +03:00
|
|
|
#include <stack>
|
|
|
|
|
|
|
|
using std::stack;
|
|
|
|
|
|
|
|
class ServerApp;
|
2006-01-03 12:29:22 +03:00
|
|
|
class ViewLayer;
|
2005-11-14 22:46:20 +03:00
|
|
|
class ServerPicture {
|
2006-01-04 12:49:47 +03:00
|
|
|
public:
|
2006-01-03 12:29:22 +03:00
|
|
|
int32 Token() { return fToken; }
|
|
|
|
|
|
|
|
void BeginOp(int16 op);
|
|
|
|
void EndOp();
|
|
|
|
|
|
|
|
void EnterStateChange();
|
|
|
|
void ExitStateChange();
|
|
|
|
|
|
|
|
void EnterFontChange();
|
|
|
|
void ExitFontChange();
|
|
|
|
|
|
|
|
void AddInt8(int8 data);
|
|
|
|
void AddInt16(int16 data);
|
|
|
|
void AddInt32(int32 data);
|
|
|
|
void AddInt64(int64 data);
|
|
|
|
void AddFloat(float data);
|
|
|
|
void AddCoord(BPoint data);
|
|
|
|
void AddRect(BRect data);
|
|
|
|
void AddColor(rgb_color data);
|
|
|
|
void AddString(const char *data);
|
|
|
|
void AddData(const void *data, int32 size);
|
|
|
|
|
|
|
|
void SyncState(ViewLayer *view);
|
|
|
|
|
|
|
|
void Play(ViewLayer *view);
|
|
|
|
|
2006-01-04 12:49:47 +03:00
|
|
|
const void *Data() const { return fData.Buffer(); }
|
|
|
|
int32 DataLength() const { return fData.BufferLength(); }
|
2006-01-03 12:29:22 +03:00
|
|
|
|
|
|
|
private:
|
2006-01-04 12:49:47 +03:00
|
|
|
friend class ServerApp;
|
|
|
|
|
|
|
|
ServerPicture();
|
|
|
|
ServerPicture(const ServerPicture &);
|
|
|
|
~ServerPicture();
|
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
int32 fToken;
|
2006-01-03 12:29:22 +03:00
|
|
|
BMallocIO fData;
|
2006-01-04 12:49:47 +03:00
|
|
|
stack<off_t> fStack;
|
2006-01-03 12:29:22 +03:00
|
|
|
// DrawState *fState;
|
2003-03-21 18:49:28 +03:00
|
|
|
};
|
|
|
|
|
2006-01-03 12:29:22 +03:00
|
|
|
#endif // __SERVER_PICTURE_H
|