1 //-------------------------------------------------------------------- 2 // 3 // PeopleApp.h 4 // 5 // Written by: Robert Polic 6 // 7 //-------------------------------------------------------------------- 8 /* 9 Copyright 1999, Be Incorporated. All Rights Reserved. 10 This file may be used under the terms of the Be Sample Code License. 11 */ 12 13 #ifndef PEOPLEAPP_H 14 #define PEOPLEAPP_H 15 16 #define B_PERSON_MIMETYPE "application/x-person" 17 #define APP_SIG "application/x-vnd.Be-PEPL" 18 19 #define P_NAME "META:name" 20 #define P_NICKNAME "META:nickname" 21 #define P_COMPANY "META:company" 22 #define P_ADDRESS "META:address" 23 #define P_CITY "META:city" 24 #define P_STATE "META:state" 25 #define P_ZIP "META:zip" 26 #define P_COUNTRY "META:country" 27 #define P_HPHONE "META:hphone" 28 #define P_WPHONE "META:wphone" 29 #define P_FAX "META:fax" 30 #define P_EMAIL "META:email" 31 #define P_URL "META:url" 32 #define P_GROUP "META:group" 33 34 enum MESSAGES {M_NEW = 128, M_SAVE, M_SAVE_AS, M_REVERT, 35 M_UNDO, M_SELECT, M_GROUP_MENU, M_DIRTY, 36 M_NAME, M_NICKNAME, M_COMPANY, M_ADDRESS, 37 M_CITY, M_STATE, M_ZIP, M_COUNTRY, M_HPHONE, 38 M_WPHONE, M_FAX, M_EMAIL, M_URL, M_GROUP}; 39 40 enum FIELDS {F_NAME = 0, F_NICKNAME, F_COMPANY, F_ADDRESS, 41 F_CITY, F_STATE, F_ZIP, F_COUNTRY, F_HPHONE, 42 F_WPHONE, F_FAX, F_EMAIL, F_URL, F_GROUP, F_END}; 43 44 class TPeopleWindow; 45 46 47 //==================================================================== 48 49 #include <Application.h> 50 51 class TPeopleApp : public BApplication { 52 53 private: 54 55 bool fHaveWindow; 56 BRect fPosition; 57 58 public: 59 60 BFile *fPrefs; 61 62 TPeopleApp(void); 63 ~TPeopleApp(void); 64 virtual void AboutRequested(void); 65 virtual void ArgvReceived(int32, char**); 66 virtual void MessageReceived(BMessage*); 67 virtual void RefsReceived(BMessage*); 68 virtual void ReadyToRun(void); 69 TPeopleWindow *FindWindow(entry_ref); 70 TPeopleWindow *NewWindow(entry_ref* = NULL); 71 }; 72 73 #endif /* PEOPLEAPP_H */ 74