xref: /haiku/src/apps/resedit/ResView.h (revision 6a45488dd93a920bccd174756ad44613d844189c)
1 /*
2  * Copyright (c) 2005-2006, Haiku, Inc.
3  * Distributed under the terms of the MIT license.
4  *
5  * Author:
6  *		DarkWyrm <darkwyrm@earthlink.net>
7  */
8 #ifndef RESVIEW_H
9 #define RESVIEW_H
10 
11 #include <View.h>
12 #include <ColumnListView.h>
13 #include <Entry.h>
14 #include <String.h>
15 #include <ListItem.h>
16 #include <List.h>
17 #include <Resources.h>
18 #include "ResourceRoster.h"
19 
20 
21 class BMenuBar;
22 
23 class ResView : public BView {
24 public:
25 					ResView(const BRect &frame, const char *name,
26 							const int32 &resize, const int32 &flags,
27 							const entry_ref *ref = NULL);
28 					~ResView(void);
29 	void			AttachedToWindow(void);
30 	void			MessageReceived(BMessage *msg);
31 
32 	const char *	Filename(void) const { return fFileName.String(); }
33 	bool			IsDirty(void) const { return fIsDirty; }
34 
35 	void			OpenFile(const entry_ref &ref);
36 
37 private:
38 	void			EmptyDataList(void);
39 	void			UpdateRow(BRow *row);
40 
41 	BColumnListView	*fListView;
42 	entry_ref		*fRef;
43 	BString			fFileName;
44 	BMenuBar		*fBar;
45 	bool			fIsDirty;
46 	BList			fDataList;
47 };
48 
49 extern ResourceRoster gResRoster;
50 
51 #endif
52