File: Baseresource.hh

package info (click to toggle)
bbtime 0.1.5-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 456 kB
  • ctags: 510
  • sloc: cpp: 4,175; sh: 327; makefile: 88
file content (58 lines) | stat: -rw-r--r-- 1,315 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __BASERESOURCE_HH
#define __BASERESOURCE_HH

class ToolWindow;
class BImageControl;

struct STYLE {
	bool auto_config;
	char *conf_filename;
	char *style_filename;	
	time_t  mtime;
};

class BaseResource {

        public:
                BaseResource(ToolWindow *);
                virtual ~BaseResource(void);

                void CopyColor(BColor ,BColor *);
		void CopyTexture(BTexture ,BTexture *);
		void Reload(void);
		STYLE style;

	protected:
		void Load(void);
		void readDatabaseTexture(char *, char *,char *,char *,
					 BColor ,BColor ,unsigned long, 
	                                 BTexture *);

		void readDatabaseTexture(char *, char *,char *,char *,
					 char *, char *,unsigned long, 
	                                 BTexture *texture);


		void readDatabaseColor(char *, char *, char *,char *,
				       char *, BColor *);

		bool readDatabaseColor(char *, char *, char *,char *, 
				       BColor *);

		ToolWindow *bbtool;
		XrmDatabase resource_db;
		XrmDatabase db;
		time_t mtime;
		bool auto_config;

		virtual void LoadBBToolResource(void) = 0; 
        private:
		bool ReadResourceFromFilename(char *, char *);
		void ReadBBtoolResource(void);
		void ReadDefaultResource(void);
		void ReadBlackboxResource(void);

		int ResourceType;
};

#endif /* __BASERESOURCE_HH */