My Project
D:/source/c++/Programme/sally/sally/sallyAPI/Rating.h
Go to the documentation of this file.
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 "Form.h"
00030 #include "ImageBox.h"
00031 
00032 namespace SallyAPI
00033 {
00034         namespace GUI
00035         {
00041 
00042                 enum RatingType {RATING_TYPE_SELECT, RATING_TYPE_VIEW_ONLY};
00043 
00052 
00053                 class DLL_API_SALLY CRating :
00054                         public SallyAPI::GUI::CForm
00055                 {
00056                 private:
00057                         int                                                     m_iRating;
00058                         int                                                     m_iRatingTemp;
00059                         SallyAPI::GUI::CImageBox*       m_pImages[5];
00060                         RatingType                                      m_eRatingType;
00061 
00062                         void                    UpdateRating();
00063 
00064                         virtual bool    ProcessMouseDown(int x, int y);
00065                         virtual bool    ProcessMouseUp(int x, int y);
00066                         virtual bool    ProcessMouseMove(int x, int y);
00067                 public:
00068                         CRating(SallyAPI::GUI::CGUIBaseObject* parent, int x, int y, SallyAPI::GUI::RatingType ratingType, int controlId = 0);
00069                         virtual ~CRating();
00070                         
00071                         virtual void    SendMessageToChilds(SallyAPI::GUI::CGUIBaseObject* reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase* messageParameter = NULL);
00072                         int                             GetRating();
00073                         void                    SetRating(int rating);
00074                 };
00075         }
00076 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines