2 * Copyright 2010, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
7 * Stephan Aßmus <superstippi@gmx.de>
9 * Copyright 1999, Be Incorporated. All Rights Reserved.
10 * This file may be used under the terms of the Be Sample Code License.
17 #include <ObjectList.h>
21 class AttributeTextControl
;
30 M_GROUP_MENU
= 'grmn',
34 class PersonView
: public BGridView
{
36 PersonView(const char* name
,
37 const char* categoryAttribute
,
38 const entry_ref
* ref
);
39 virtual ~PersonView();
41 virtual void MakeFocus(bool focus
= true);
42 virtual void MessageReceived(BMessage
* message
);
43 virtual void Draw(BRect updateRect
);
45 void AddAttribute(const char* label
,
46 const char* attribute
);
48 void BuildGroupMenu();
50 void CreateFile(const entry_ref
* ref
);
55 const char* AttributeValue(const char* attribute
) const;
56 void SetAttribute(const char* attribute
, bool update
);
57 void SetAttribute(const char* attribute
,
58 const char* value
, bool update
);
60 void UpdatePicture(const entry_ref
* ref
);
62 bool IsTextSelected() const;
65 const entry_ref
* fRef
;
66 time_t fLastModificationTime
;
68 typedef BObjectList
<AttributeTextControl
> AttributeList
;
69 AttributeList fControls
;
71 BString fCategoryAttribute
;
72 PictureView
* fPictureView
;
76 #endif // PERSON_VIEW_H