libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / people / PersonView.h
blobf6ecc2794192aef156a36b1f838b70cb0e9db392
1 /*
2 * Copyright 2010, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Robert Polic
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.
12 #ifndef PERSON_VIEW_H
13 #define PERSON_VIEW_H
16 #include <GridView.h>
17 #include <ObjectList.h>
18 #include <String.h>
21 class AttributeTextControl;
22 class BFile;
23 class BPopUpMenu;
24 class PictureView;
26 enum {
27 M_SAVE = 'save',
28 M_REVERT = 'rvrt',
29 M_SELECT = 'slct',
30 M_GROUP_MENU = 'grmn',
34 class PersonView : public BGridView {
35 public:
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);
52 bool IsSaved() const;
53 void Save();
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;
64 private:
65 const entry_ref* fRef;
66 time_t fLastModificationTime;
67 BPopUpMenu* fGroups;
68 typedef BObjectList<AttributeTextControl> AttributeList;
69 AttributeList fControls;
71 BString fCategoryAttribute;
72 PictureView* fPictureView;
73 bool fSaving;
76 #endif // PERSON_VIEW_H