1#ifndef _UserProperties_h_ 2#define _UserProperties_h_ 3 4class BTextControl; 5class BCheckBox; 6class BMenu; 7class BMenuField; 8 9class UserPropertiesView : public BView 10{ 11 public: 12 UserPropertiesView(BRect rect, const char *name); 13 ~UserPropertiesView(); 14 15 void Draw(BRect rect); 16 void UpdateInfo(); 17 void SetPath(const char *path); 18 19 char *getUser() { return user; } 20 char *getFullName() { return fullName; } 21 char *getDesc() { return desc; } 22 char *getPassword() { return password; } 23 char *getHome() { return home; } 24 char *getGroup() { return group; } 25 uint32 getFlags() { return flags; } 26 uint32 getDays() { return days; } 27 28 private: 29 BBitmap *icon; 30 BTextControl *editName; 31 BTextControl *editFullName; 32 BTextControl *editDesc; 33 BTextControl *editPassword; 34 BTextControl *editPath; 35 BTextControl *editDays; 36 BCheckBox *chkDisabled; 37 BCheckBox *chkExpiresFirst; 38 BCheckBox *chkExpiresEvery; 39 BCheckBox *chkCantChange; 40 BMenu *mnuGroups; 41 BMenuField *mnuDefaultGroup; 42 43 char user[33]; 44 char fullName[64]; 45 char desc[64]; 46 char password[33]; 47 char home[B_PATH_NAME_LENGTH]; 48 char group[33]; 49 uint32 flags; 50 uint32 days; 51 52 bool newUser; 53}; 54 55 56class UserPropertiesPanel : public BWindow 57{ 58 public: 59 UserPropertiesPanel(BRect frame, const char *name, BWindow *parent); 60 61 void MessageReceived(BMessage *msg); 62 63 char *getUser() { return user; } 64 char *getFullName() { return fullName; } 65 char *getDesc() { return desc; } 66 bool isCancelled() { return cancelled; } 67 68 private: 69 UserPropertiesView *infoView; 70 BWindow *shareWin; 71 char user[33]; 72 char fullName[64]; 73 char desc[64]; 74 75 bool newUser; 76 bool cancelled; 77}; 78#endif 79