My Project
|
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 00026 00027 00028 #pragma once 00029 #include "Define.h" 00030 #include "Control.h" 00031 #include "GUIHelper.h" 00032 #include "ParameterHoldClick.h" 00033 00034 namespace SallyAPI 00035 { 00036 namespace GUI 00037 { 00043 00044 enum ImageBoxDisplayType {IMAGEBOX_DISPLAY_TYPE_STRETCH, IMAGEBOX_DISPLAY_TYPE_SCALE, IMAGEBOX_DISPLAY_TYPE_CENTER}; 00045 00054 00055 class DLL_API_SALLY CImageBox : 00056 public SallyAPI::GUI::CControl 00057 { 00058 protected: 00059 int m_iImage; 00060 SallyAPI::GUI::CPicture* m_pPicture; 00061 ImageBoxDisplayType m_eDiyplayType; 00062 00063 virtual void RenderControl(); 00064 virtual bool ProcessMouseDoubleClick(int x, int y); 00065 virtual bool ProcessMouseUp(int x, int y); 00066 virtual bool ProcessMouseMove(int x, int y); 00067 public: 00068 CImageBox(SallyAPI::GUI::CGUIBaseObject* parent, int x, int y, int width, int height, int controlId = 0); 00069 virtual ~CImageBox(); 00070 00071 virtual void Timer(float timeDelta); 00072 00073 void SetImageId(int image); 00074 int GetImageId(); 00075 00076 void SetPicture(SallyAPI::GUI::CPicture* picture); 00077 SallyAPI::GUI::CPicture* GetPicture(); 00078 00079 void SetDisplayType(ImageBoxDisplayType value); 00080 ImageBoxDisplayType GetDiyplayType(); 00081 }; 00082 } 00083 }