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