xref: /haiku/src/apps/resedit/ResView.h (revision 2f470aec1c92ce6917b8a903e343795dc77af41f)
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 class ResView : public BView
21 {
22 public:
23 					ResView(const BRect &frame, const char *name,
24 							const int32 &resize, const int32 &flags,
25 							const entry_ref *ref = NULL);
26 					~ResView(void);
27 	void			AttachedToWindow(void);
28 	void			MessageReceived(BMessage *msg);
29 
30 	const char *	Filename(void) const { return fFileName.String(); }
31 	bool			IsDirty(void) const { return fIsDirty; }
32 
33 	void			OpenFile(const entry_ref &ref);
34 
35 private:
36 	void			EmptyDataList(void);
37 	void			UpdateRow(BRow *row);
38 
39 	BColumnListView	*fListView;
40 	entry_ref		*fRef;
41 	BString			fFileName;
42 	BMenuBar		*fBar;
43 	bool			fIsDirty;
44 	BList			fDataList;
45 };
46 
47 extern ResourceRoster gResRoster;
48 
49 #endif
50