00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _WG_RESOURCES_H_
00026 #define _WG_RESOURCES_H_
00027
00028 #include "SDL.h"
00029 #include "wg_resource_handle.h"
00030 #include "wg_color.h"
00031
00032
00033 namespace wGui
00034 {
00035
00037 enum EwgResourceId {
00038
00039 WGRES_UP_ARROW_BITMAP = 1,
00040 WGRES_DOWN_ARROW_BITMAP,
00041 WGRES_LEFT_ARROW_BITMAP,
00042 WGRES_RIGHT_ARROW_BITMAP,
00043 WGRES_X_BITMAP,
00044 WGRES_MAXIMIZE_UNMAXED_BITMAP,
00045 WGRES_MAXIMIZE_MAXED_BITMAP,
00046 WGRES_MINIMIZE_BITMAP,
00047
00048
00049 WGRES_WGUI_STRING,
00050 WGRES_VERSION_STRING,
00051
00052
00053 WGRES_POINTER_CURSOR,
00054 WGRES_IBEAM_CURSOR,
00055 WGRES_WAIT_CURSOR,
00056 WGRES_MOVE_CURSOR,
00057 WGRES_ZOOM_CURSOR
00058 };
00059
00060
00061
00062
00063
00064
00065
00067
00068 class CwgBitmapResourceHandle : public CBitmapResourceHandle
00069 {
00070 public:
00073 CwgBitmapResourceHandle(EwgResourceId resId);
00074
00075 private:
00076 SDL_Surface* DrawBitmap(CRGBColor Data[], int iDataLength, int iWidth, int iHeight) const;
00077 };
00078
00079
00081
00082 class CwgStringResourceHandle : public CStringResourceHandle
00083 {
00084 public:
00087 CwgStringResourceHandle(EwgResourceId resId);
00088 };
00089
00090
00092
00093 class CwgCursorResourceHandle : public CCursorResourceHandle
00094 {
00095 public:
00098 CwgCursorResourceHandle(EwgResourceId resId);
00099
00100 private:
00101 enum ECursorDataMask {
00102 O,
00103 M,
00104 D,
00105 X
00106 };
00107
00108 SDL_Cursor* CreateCursor(const char DataIn[], int iDataLength, int iWidth, int iHeight, int iXHotSpot, int iYHotSpot) const;
00109 };
00110
00111 }
00112
00113 #endif // _WG_RESOURCES_H_
00114