1*d5f7f405SAugustin Cavalier // InfoWindow.h 2*d5f7f405SAugustin Cavalier // Generated by Interface Elements (Window v2.3) on Feb 23 2004 3*d5f7f405SAugustin Cavalier // This is a user written class and will not be overwritten. 4*d5f7f405SAugustin Cavalier 5*d5f7f405SAugustin Cavalier #ifndef _INFOWINDOW_H_ 6*d5f7f405SAugustin Cavalier #define _INFOWINDOW_H_ 7*d5f7f405SAugustin Cavalier 8*d5f7f405SAugustin Cavalier #include "IEWindow.h" 9*d5f7f405SAugustin Cavalier #include "InfoWindowDefs.h" 10*d5f7f405SAugustin Cavalier #include "PopUpMenuDefs.h" 11*d5f7f405SAugustin Cavalier #include "TPreferences.h" 12*d5f7f405SAugustin Cavalier 13*d5f7f405SAugustin Cavalier extern const char *XCONTAINER_APP; 14*d5f7f405SAugustin Cavalier 15*d5f7f405SAugustin Cavalier enum 16*d5f7f405SAugustin Cavalier { 17*d5f7f405SAugustin Cavalier CMD_UPDATE_CONTAINER_ITEM = 'updC', 18*d5f7f405SAugustin Cavalier CMD_UNLOAD_LIBRARY = 'unld', 19*d5f7f405SAugustin Cavalier CMD_IMPORT_REPLICANT = 'dupr', 20*d5f7f405SAugustin Cavalier CMD_TICK = 'tick', 21*d5f7f405SAugustin Cavalier }; 22*d5f7f405SAugustin Cavalier 23*d5f7f405SAugustin Cavalier 24*d5f7f405SAugustin Cavalier class InfoWindow : public IEWindow 25*d5f7f405SAugustin Cavalier { 26*d5f7f405SAugustin Cavalier public: 27*d5f7f405SAugustin Cavalier InfoWindow(void); 28*d5f7f405SAugustin Cavalier ~InfoWindow(void); 29*d5f7f405SAugustin Cavalier 30*d5f7f405SAugustin Cavalier virtual void MessageReceived(BMessage *message); 31*d5f7f405SAugustin Cavalier virtual bool QuitRequested(); 32*d5f7f405SAugustin Cavalier virtual void MenusBeginning(); 33*d5f7f405SAugustin Cavalier 34*d5f7f405SAugustin Cavalier void GetPrefs(); 35*d5f7f405SAugustin Cavalier void SetPrefs(); 36*d5f7f405SAugustin Cavalier 37*d5f7f405SAugustin Cavalier private: 38*d5f7f405SAugustin Cavalier // These are the interesting functions showing how you can 39*d5f7f405SAugustin Cavalier // interact via BMessages with a Shelf/Container view 40*d5f7f405SAugustin Cavalier BMessenger MessengerForTarget(type_code w) const; 41*d5f7f405SAugustin Cavalier int32 GetReplicantAt(int32 index) const; 42*d5f7f405SAugustin Cavalier status_t GetReplicantName(int32 uid, BMessage *result) const; 43*d5f7f405SAugustin Cavalier status_t DeleteReplicant(int32 uid); 44*d5f7f405SAugustin Cavalier status_t ImportReplicant(int32 uid); 45*d5f7f405SAugustin Cavalier 46*d5f7f405SAugustin Cavalier bool IsReplicantLoaded(int32 uid) const; 47*d5f7f405SAugustin Cavalier 48*d5f7f405SAugustin Cavalier void UpdateLists(bool make_empty); 49*d5f7f405SAugustin Cavalier void EmptyLists(); 50*d5f7f405SAugustin Cavalier 51*d5f7f405SAugustin Cavalier BMessenger fTarget; 52*d5f7f405SAugustin Cavalier BMessageRunner fTickToken; 53*d5f7f405SAugustin Cavalier 54*d5f7f405SAugustin Cavalier BPoint fImportLoc; 55*d5f7f405SAugustin Cavalier 56*d5f7f405SAugustin Cavalier BMessage *ReadMessageFromResource(const char *resName); 57*d5f7f405SAugustin Cavalier void CreateViews(); 58*d5f7f405SAugustin Cavalier BMenuField *fMenuField; 59*d5f7f405SAugustin Cavalier BBox *fMainBox; 60*d5f7f405SAugustin Cavalier 61*d5f7f405SAugustin Cavalier BListView *fReplicantList; 62*d5f7f405SAugustin Cavalier BListView *fLibraryList; 63*d5f7f405SAugustin Cavalier 64*d5f7f405SAugustin Cavalier BButton *fDeleteRep; 65*d5f7f405SAugustin Cavalier BButton *fCopyRep; 66*d5f7f405SAugustin Cavalier BButton *fUnloadLib; 67*d5f7f405SAugustin Cavalier 68*d5f7f405SAugustin Cavalier TPreferences *fPrefs; 69*d5f7f405SAugustin Cavalier }; 70*d5f7f405SAugustin Cavalier 71*d5f7f405SAugustin Cavalier #endif 72