00001 #if !defined( __ARSRSRC_H__ )
00002 #define __ARSRSRC_H__
00003
00004 #define WGRES_POINTER_CURSOR 1
00005 #define WGRES_IBEAM_CURSOR 2
00006 #define WGRES_WAIT_CURSOR 3
00007
00008 namespace Ars
00009 {
00010
00011 class Rsrc {
00012 private:
00013
00014 char *buffer;
00015
00016 public:
00017
00018 Rsrc( const string &aFilename = "" );
00019
00020 ~Rsrc( void );
00021
00025 Form *Load( const string &aSection , const int aId );
00026
00027 static Form *GetAddr( const int id );
00028 void SetAddr( Form *f );
00029
00030 const bool Free( const int id );
00031
00032 static icstring GetId( icstring &aStr );
00033 static icstring FindCrdOf( icstring aStr , const icstring &car );
00034 static icstring GetList( icstring &aStr );
00035
00036 static int GetInt( icstring &aStr , const int aDefault = -1 );
00037 static double GetDbl( icstring &aStr , const double aDefault = 0.0 );
00038 static string GetStr( icstring &aStr , const std::string aDefault = string( "" ) );
00039 static RGBColor GetColor( icstring &aStr , const RGBColor &defaultColor );
00040 static int GetMnemo( icstring &aStr , map<icstring,unsigned long> &aMnemo = ArsApplication::Mnemo_f , const int aDefault = 0 );
00041
00042 icstring FindCombination( const icstring &aSection );
00043 };
00044
00045 const bool AddCallBack( const string str , void *f );
00046
00047 icstring &strip( icstring &s );
00048 }
00049 #endif