1 #ifndef __SERVER_PICTURE_H 2 #define __SERVER_PICTURE_H 3 4 #include <Font.h> 5 #include <Rect.h> 6 #include <Region.h> 7 #include <DataIO.h> 8 #include <InterfaceDefs.h> 9 10 #include <stack> 11 12 using std::stack; 13 14 class ServerApp; 15 class ViewLayer; 16 class ServerPicture { 17 public: 18 int32 Token() { return fToken; } 19 20 void BeginOp(int16 op); 21 void EndOp(); 22 23 void EnterStateChange(); 24 void ExitStateChange(); 25 26 void EnterFontChange(); 27 void ExitFontChange(); 28 29 void AddInt8(int8 data); 30 void AddInt16(int16 data); 31 void AddInt32(int32 data); 32 void AddInt64(int64 data); 33 void AddFloat(float data); 34 void AddCoord(BPoint data); 35 void AddRect(BRect data); 36 void AddColor(rgb_color data); 37 void AddString(const char *data); 38 void AddData(const void *data, int32 size); 39 40 void SyncState(ViewLayer *view); 41 42 void Play(ViewLayer *view); 43 44 const void *Data() const { return fData.Buffer(); } 45 int32 DataLength() const { return fData.BufferLength(); } 46 47 private: 48 friend class ServerApp; 49 50 ServerPicture(); 51 ServerPicture(const ServerPicture &); 52 ~ServerPicture(); 53 54 int32 fToken; 55 BMallocIO fData; 56 stack<off_t> fStack; 57 // DrawState *fState; 58 }; 59 60 #endif // __SERVER_PICTURE_H 61