OSDN Git Service

チャットクラスのアクセス修飾子を変更
[nlite/nlite.git] / nlite / nlite_chatData.h
index a61cca0..dbc88ea 100644 (file)
@@ -4,6 +4,10 @@ namespace nlite{
 
        //\91O\95û\90é\8c¾
        class CCommentListWindow;
+       class CListenerColorCollector;
+       class CCommentList;
+       class CListenerList;
+       class CReadUserSettingXML;
 
        //\8d\91\83R\81[\83h
        namespace cuntry{
@@ -19,10 +23,13 @@ namespace nlite{
        ///
        ///\83\8a\83X\83i\81[\83f\81[\83^
        ///
-       struct ListenerData{
+       class CListenerData{
        private:
+               friend CListenerColorCollector;
+               friend CCommentList;
+               friend CListenerList;
+               friend CReadUserSettingXML;
 
-       public:
                CNLiteString user_id;                                   //\83\86\81[\83U\81[ID
                CNLiteString name;                                              //\83\86\81[\83U\81[\96¼
                CNLiteString community;                                 //\93o\98^\82µ\82½\83R\83~\83\85\83j\83e\83B
@@ -36,11 +43,15 @@ namespace nlite{
                        INIT_COLOR = -1
 
                };
+
+
+               //\83Z\83b\83^\81[
+       public:
                
                ///
                ///\83R\83\93\83X\83g\83\89\83N\83^
                ///
-               ListenerData();
+               CListenerData();
 
                ///
                ///\94w\8ci\90F\90Ý\92è
@@ -56,6 +67,32 @@ namespace nlite{
                ///\83\86\81[\83U\96¼\90Ý\92è
                ///
                VOID SetUserName(LPCTSTR name);
+
+
+               //\83Q\83b\83^\81[
+       public:
+
+               ///
+               ///\94w\8ci\90F\82ð\8eæ\93¾
+               ///
+               COLORREF GetBackColor() const;
+
+
+               ///
+               ///\83j\83b\83N\83l\81[\83\80\82Ì\90F\82ð\8eæ\93¾
+               ///
+               COLORREF GetNameColor() const;
+
+               ///
+               ///\83\86\81[\83U\96¼\82ð\8eæ\93¾
+               ///
+               const CNLiteString &GetUserID() const;
+
+
+               ///
+               ///\83\86\81[\83U\96¼\82ð\8eæ\93¾
+               ///
+               const CNLiteString &GetName() const;
        };
 
        //
@@ -79,9 +116,9 @@ namespace nlite{
                }
 
                //\83t\83@\83\93\83N\83V\83\87\83i\83\8b
-               void operator()(ListenerData &target){
+               void operator()(CListenerData &target){
 
-                       if(target.bgcolor != ListenerData::INIT_COLOR){
+                       if(target.bgcolor != CListenerData::INIT_COLOR){
 
                                colorlist.push_back(target.bgcolor);
                        }
@@ -97,7 +134,7 @@ namespace nlite{
        class CListenerList{
 
        private:
-               typedef ListenerData InternalType;
+               typedef CListenerData InternalType;
                typedef std::list<InternalType> ListenerList_Internal; 
                ListenerList_Internal m_listenerList;
 
@@ -112,7 +149,7 @@ namespace nlite{
                ///
                ///\83\86\81[\83U\81[\93o\98^
                ///
-               reference Register(ListenerData &listener,BOOL bUpdate);
+               reference Register(CListenerData &listener,BOOL bUpdate);
 
 
                ///
@@ -136,7 +173,7 @@ namespace nlite{
        
 
        class CChatData{
-
+               friend CCommentList;
                
        public:
                struct ViewData{
@@ -155,6 +192,7 @@ namespace nlite{
                        ViewData();
                };
 
+       private:
                ViewData viewData;                                      //\95\\8e¦\97p\83f\81[\83^
                UINT_PTR premium;                                       //\83v\83\8c\83~\83A\83\80\8eí\95Ê
                BOOL anonymity;                                         //\93½\96¼\83t\83\89\83O
@@ -162,19 +200,79 @@ namespace nlite{
                UINT_PTR vpos;                                          //\83R\83\81\83\93\83g\95\\8e¦\88Ê\92u
                time_t date;                                            //\8e\9e\8aÔ
                cuntry::LOCALE locale;                          //\8d\91\83R\81[\83h
-               ListenerData *listenerData;                     //\83\86\81[\83U\8fî\95ñ
+               CListenerData *listenerData;                    //\83\86\81[\83U\8fî\95ñ
                CNLiteString name;                                      //\96¼\91O\81B\82Â\82¢\82Ä\82±\82È\82¢\8e\9e\82à\82 \82é
                CNLiteString chatBuf;                           //\83`\83\83\83b\83g\96{\95
                std::vector<CNLiteString> mail;         //\83\81\81[\83\8b\83R\83}\83\93\83h
                ULONG_PTR thread;                                       //\83X\83\8c\83b\83h\94Ô\8d\86
                
-       public:
 
+               //\83Z\83b\83^\81[
+       public:
 
                ///
                ///nlib\82Ì\83`\83\83\83b\83g\83f\81[\83^\82ð\83Z\83b\83g
                ///
-               VOID SetChat(NicoLiveChat &chat_in,ListenerData &listener);
+               VOID SetChat(NicoLiveChat &chat_in,CListenerData &listener);
+
+               ///
+               ///\95\\8e¦\97p\8d\82\82³\82ð\90Ý\92è
+               ///
+               VOID SetHeight(UINT_PTR height);
+
+               //\83Q\83b\83^\81[
+       public:
+
+               ///
+               ///\83\8a\83X\83i\81[\8fî\95ñ\83N\83\89\83X\82Ì\8eQ\8fÆ\82ð\8eæ\93¾
+               ///
+               CListenerData &GetListnerData();
+
+               ///
+               ///\83`\83\83\83b\83g\96{\95\8eæ\93¾
+               ///
+               const CNLiteString &GetChatBuff()const;
+
+               ///
+               ///\91I\91ð\8fó\91Ô\94»\92è\83t\83\89\83O\8eæ\93¾
+               ///
+               BOOL IsSelect()const;
+
+               ///
+               ///\94w\8ci\90F\82ð\8eæ\93¾
+               ///
+               COLORREF GetBackColor()const;
+
+               ///
+               ///\83v\83\8c\83~\83A\83\80\8eí\95Ê\8eæ\93¾
+               ///
+               UINT_PTR GetPremium()const;
+
+               ///
+               ///\83R\83\81\83\93\83g\8e\9e\8aÔ\8eæ\93¾
+               ///
+               time_t GetDate()const;
+
+               ///
+               ///\83R\83\81\83\93\83g\94Ô\8d\86\8eæ\93¾
+               ///
+               UINT_PTR GetNo()const;
+
+               ///
+               ///\95\8e\9a\97ñ\95\\8e¦\8e\9e\82Ì\90F\82ð\8eæ\93¾
+               ///
+               COLORREF GetStringColor()const;
+
+               ///
+               ///\98g\90ü\90F\8eæ\93¾
+               ///
+               COLORREF GetSellLineColor()const;
+
+               ///
+               ///\95\\8e¦\97p\82Ì\8d\82\82³\8eæ\93¾
+               ///
+               UINT_PTR GetHeight()const;
+
 
        };
 
@@ -320,10 +418,10 @@ namespace nlite{
        ///
        ///\83\86\81[\83U\90Ý\92è\83t\83@\83C\83\8b\93Ç\8eæ\83N\83\89\83X
        ///
-       class ReadUserSettingXML:public CXmlParser{
+       class CReadUserSettingXML:public CXmlParser{
 
        private:
-               ListenerData listenerBuff;
+               CListenerData listenerBuff;
                CListenerList &m_listenerList;
                BOOL userNodeFlag;
                
@@ -333,7 +431,7 @@ namespace nlite{
 
        public:
 
-               ReadUserSettingXML(CListenerList &in_listenerList);
+               CReadUserSettingXML(CListenerList &in_listenerList);
 
                void OnStartElement (const XML_Char *pszName, const XML_Char **papszAttrs);