1 /* 2 * Copyright 2006, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 9 #ifndef DOCUMENT_H 10 #define DOCUMENT_H 11 12 #include <String.h> 13 14 #include "RWLocker.h" 15 16 struct entry_ref; 17 18 class CommandStack; 19 class Icon; 20 class Selection; 21 22 class Document : public RWLocker { 23 public: 24 Document(const char* name = NULL); 25 virtual ~Document(); 26 27 inline ::CommandStack* CommandStack() const 28 { return fCommandStack; } 29 30 inline ::Selection* Selection() const 31 { return fSelection; } 32 33 void SetName(const char* name); 34 const char* Name() const; 35 36 void SetRef(const entry_ref& ref); 37 inline const entry_ref* Ref() const 38 { return fRef; } 39 40 inline ::Icon* Icon() const 41 { return fIcon; } 42 43 private: 44 ::Icon* fIcon; 45 ::CommandStack* fCommandStack; 46 ::Selection* fSelection; 47 48 BString fName; 49 entry_ref* fRef; 50 }; 51 52 #endif // DOCUMENT_H 53