1 // Baseresource.hh for bbtools - tools to display resources in X11.
3 // Copyright (c) 1998-1999 John Kennis, jkennis@chello.nl
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 // (See the included file COPYING / GPL-2.0)
23 #ifndef __BASERESOURCE_HH
24 #define __BASERESOURCE_HH
26 #ifdef HAVE_SYS_TYPES_H
27 # include <sys/types.h>
30 #ifdef HAVE_SYS_STAT_H
31 # include <sys/stat.h>
40 #include <X11/Xresource.h>
48 #define BBTOOL_LOCAL ".bbtools/bbkeys.nobb"
49 #define BLACKBOX_LOCAL ".bbtools/bbkeys.bb"
64 class BaseResource
: public TimeoutHandler
{
67 BaseResource(ToolWindow
*);
68 virtual ~BaseResource(void);
70 void CopyColor(BColor
*,BColor
*);
71 void CopyTexture(BTexture
,BTexture
*);
77 void readDatabaseColor(const char *, const char *, BColor
*);
78 void readDatabaseTexture(const char *, const char *, BTexture
*);
79 void readColor(const char *, const char *, const char *, const char *,
80 const char *,BColor
*);
81 void readTexture(const char *, const char *, const char *, const char *,
82 const char *, const char *, const char *, BTexture
*);
86 XrmDatabase resource_db
;
89 virtual void LoadBBToolResource(void) = 0;
90 virtual void timeout(void);
92 bool ReadResourceFromFilename(const char *, const char *);
93 void ReadBBtoolResource(void);
94 void ReadDefaultResource(void);
95 void ReadBlackboxResource(void);
96 BImageControl
*image_control
;
101 struct stat file_status
;
105 #endif /* __BASERESOURCE_HH */