xj qian
2024-06-25 58c129e8f21f79396a822eaeadd78edf281b52a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#pragma once
 
#include "kcontrol.hpp"
#include "kdwview.hpp"
 
namespace Hxsoft{namespace XFrame{
    namespace XOffice {namespace XCell    {
        class IDwTable : public IDwView
        {
        public:
            int GetRow_() ;//µÃµ½ÐÐ
            int GetColumn_() ;//µÃµ½ÁÐ
            int GetRowCount_() ; //µÃµ½ÐÐÊý
            int GetColumnCount_() ; //µÃµ½ÁÐÊý
        public:
            int SetRow_(int row) ;
        public:
            LPCTSTR GetNote_(int nRow, int nColumn) ;//µÃµ½±¸×¢
            bool SetNote_(int nRow, int nColumn, LPCTSTR pStrNote) ; //ÉèÖñ¸×¢
            bool AddNote_(int nRow, int nColumn, LPCTSTR pStrNote, LPCTSTR pUser = NULL, LPCTSTR pData = NULL) ; //ÉèÖñ¸×¢
 
            LPCTSTR GetNote1_(int nRow, int nColumn) ;//µÃµ½ÐÞ¸Ä
            bool SetNote1_(int nRow, int nColumn, LPCTSTR pStrNote) ; //ÉèÖÃÐÞ¸Ä
            bool AddNote1_(int nRow, int nColumn, LPCTSTR pStrNote, LPCTSTR pUser = NULL, LPCTSTR pData = NULL) ; //ÉèÖÃÐÞ¸Ä
 
            LPCTSTR GetNote2_(int nRow, int nColumn) ;//µÃµ½Åú×¢
            bool SetNote2_(int nRow, int nColumn, LPCTSTR pStrNote) ; //ÉèÖÃÅú×¢
            bool AddNote2_(int nRow, int nColumn, LPCTSTR pStrNote, LPCTSTR pUser = NULL, LPCTSTR pData = NULL) ; //ÉèÖÃÅú×¢
 
        public:
            int InsertRow_(int nRow) ;//²åÈëÐÐ
            int DeleteRow_(int nRow) ;//ɾ³ýÐÐ
            int InsertRows_(int nRow, int nAmt) ;//²åÈë¶àÐÐ
            int DeleteRows_(int nRow, int nAmt) ;//ɾ³ý¶àÐÐ
        public:
            LPCTSTR GetColumnName_(int nColumn) ;//µÃµ½ÁÐÃû
            int GetColumnIndex_(LPCTSTR pColumn) ; //µÃµ½ÁкÅ
        public:
            LPCTSTR GetItemString_(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal) ;//µÃµ½Êý¾ÝÖµ
            LPCTSTR GetItemString_(int nRow, LPCTSTR ColumnName, DWBuffer dwBuffer = dbuf_normal) ;//µÃµ½Êý¾ÝÖµ
            bool SetItemString_(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal) ;//ÉèÖÃÊý¾ÝÖµ
            bool SetItemString_(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal) ;//ÉèÖÃÊý¾ÝÖµ
        public:
            bool SetItemStatus_(int nRow, int nColumn, RowStatus status, DWBuffer dwBuffer = dbuf_normal) ;//ÉèÖÃÐÐÁÐ״̬
            RowStatus GetItemStatus_(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal) ;//µÃµ½ÐÐÁÐ״̬
 
        public:
            int    SetKeyValue_(int nRow, int nKeyValue) ;//ÉèÖÃÕûÊý¹Ø½¡Öµ
            int GetKeyValue_(int nRow) ;//µÃµ½ÕûÊý¹Ø½¡Öµ
            bool GetGuid_(int nRow, TCHAR Guid[], int nMax) ;//ÉèÖÃguid
            bool SetGuid_(int nRow, LPCTSTR pStrGuid) ; //ÉèÖÃguid
 
        public:
            int SetReadOnly_(bool bReadOnly = true) ; //ÉèÖÃÖ»¶Á
        public:
            int SelectRow_(int nRow, bool bSelect = true) ;//Ñ¡Öе¥ÐÐ
            int SelectRow_(int sRow, int eRow, bool bSelect = true) ;//Ñ¡ÖжàÐÐ
            int GetNextSelectRow_(int nStartRow) ; //µÃµ½ÏÂÀ­ÐÞ¸ÄÐÐ
            bool IsRowSelected_(int nRow) ; //ÅжÏÐÐÊÇ·ñ±»Ñ¡ÖÖ
            int SetSelectBkColor_(COLORREF color) ; //ÉèÖÃÑ¡ÔñµÄ±³¾°ÑÕÉ«
            int SetSelectionMode_(int nMode) ; //ÉèÖÃÑ¡ÔñµÄģʽ//0 unselection 1 singleSelection 2 multiselection 3 multiselectionex 
 
        public:
            int    DeletedCount_() ; //µÃµ½É¾³ýÐÐÐÐÊý
            int    ModifiedCount_() ; //µÃµ½ÐÞ¸ÄÐÐÐÐÊý
        public:
            int    Reset_() ; //Çå³ýÊý¾Ý
            int    ResetUpdateStatus_() ;//Çå³ýÐ޸ıê¼Ç
        public:
            BSTR GetXml_(LPCTSTR pRoot, bool bIncludeChild) ; //»ñÈ¡XMLÊý¾Ý
            int Load_(KXMLDOMElement  pElement) ;//¶ÁÈ¡Êý¾Ý
            int  LoadXml_(BSTR bstr) ;//¶ÁÈ¡Êý¾Ý
        public:
            int ClearObserver_() ;//Çå³ýʼþÕìÌý¶ÔÏó
        public:
            int DwUpdateTo_(KXMLDOMDocument pXmlDoc) ;//°ÑÊý¾Ý¸üе½XML¶ÔÏóÖÐ
            int DwUpdateAllTo_(KXMLDOMDocument  pXmlDoc) ;//°ÑÊý¾Ý¸üе½XML¶ÔÏóÖÐ
        public:
            int Retrieve_(LPCTSTR pServer, LPCTSTR pDataUrl, LPCTSTR pArgStr) ;//¶ÁÈ¡Êý¾Ý
            int Retrieve_(ITrans* pTrans, LPCTSTR pDataUrl, LPCTSTR pArgStr) ;//¶ÁÈ¡Êý¾Ý
            int Retrieve_(LPCTSTR pDataUrl, LPCTSTR pArgStr) ;//¶ÁÈ¡Êý¾Ý
 
            int Retrieve_(KXMLDOMElement  pElement) ;//¶ÁÈ¡Êý¾Ý
            int Retrieve_(KXMLDOMDocument& xml) ;//¶ÁÈ¡Êý¾Ý
 
            int RetrieveEx_(LPCTSTR pServer, LPCTSTR pEntity, LPCTSTR pEntityKey) ;//¶ÁÈ¡Êý¾Ý
            int RetrieveEx_(ITrans* pTrans, LPCTSTR pEntity, LPCTSTR pEntityKey) ;//¶ÁÈ¡Êý¾Ý
            int RetrieveEx_(LPCTSTR pEntity, LPCTSTR pEntityKey) ;//¶ÁÈ¡Êý¾Ý
        public:
            int SetDataObject_(LPCTSTR pServer, LPCTSTR pUrl) ;//ÉèÖÃÄ£°å¶ÔÏó
            int SetDataObject_(ITrans* pTrans, LPCTSTR pUrl) ;//ÉèÖÃÄ£°å¶ÔÏó
            int SetDataObject_(LPCTSTR pUrl) ;//ÉèÖÃÄ£°å¶ÔÏó
 
            int SetDataObject_(KXMLDOMElement  pElement) ;//ÉèÖÃÄ£°å¶ÔÏó
            int SetDataObject_(KXMLDOMDocument  pDoc) ;
        public:
            int ImportFile_() ; //תÈëÊý¾Ý
            int ImportFile_(LPCTSTR pStrFile, LPCTSTR pType = NULL, bool Header = false) ; //תÈëÊý¾Ý
            int ImportString_(LPCTSTR pStr, LPCTSTR pType = NULL, bool Header = false) ; //תÈëÎı¾Êý¾Ý
        public:
            int SetValues_(LPCTSTR pColName, LPCTSTR pExpr) ; //ÅúÁ¿ÉèÖÃÖµ
            int AddCalcColumn_(LPCTSTR pColName, LPCTSTR pExpr) ;//ÉèÖùØÁª¼ÆËãÁÐ
            int ClearCalcColumn_(LPCTSTR pColName = NULL) ;//Çå³ý¹ØÁª¼ÆËãÁÐ
        public:
            int GetNextModifyRow_(int nStart) ; //µÃµ½ÏÂÒ»ÐÞ¸ÄÐÐ
        public:
            int Modify_(LPCTSTR pStr) ; //Óï·¨ÐÞ¸Ä
            int Evaluate_(int nRow, LPCTSTR pExpr) ; //ÆÀ¹À±í´ïʽ
        public:
            int SetAutoFilter_(bool bAutoFilter) ; //ÉèÖÃ×Ô¶¯¹ýÂË
            int SetFilter_(LPCTSTR pStrFilter) ; //ÉèÖùýÂËÌõ¼þ
            int Filter_() ; //¹ýÂË
            int SetSort_(LPCTSTR pStrSort) ; //ÉèÖÃÅÅÐò²ÎÊý
            int Sort_() ; //ÅÅÐò
            int Find_(LPCTSTR pCondition = NULL) ; //²éÕÒ
            int FindNext_() ; //²éÕÒ
        public:
            int GetFirstVisibleRow_() ; //µÃµ½µ±Ç°ÏÔʾµÄµÚÒ»ÐÐ
            int Expand_(bool bExpand) ;//ÊÕËõ»òÕ¹¿ªÊý¾ÝÊÓͼ
        public:
            int Print_(LPCTSTR pXmlArg = NULL) ; //´òÓ¡
            int PrintPreview_(LPCTSTR pXmlArg = NULL) ; //´òÓ¡Ô¤ÀÀ
        public:
            int SaveAs_(LPCTSTR pXmlArg = NULL) ; //Áí´æÎª
            int SaveAsEx_() ; //ÕûÌåÁí´æÎª
            int SaveAsEx_(LPCTSTR pStrFile) ; //ÕûÌåÁí´æÎª
        public:
            LPTSTR GetColumnProps_(LPCTSTR pColName) ; //µÃµ½ÁÐÕûÌåXMLÊôÐÔ
            int SetColumnProps_(LPCTSTR pColName, LPCTSTR pXmlProp) ; //ÉèÖÃÁÐÕûÌåXMLÊôÐÔ
            LPTSTR GetColumnProp_(LPCTSTR pColName, LPCTSTR pItem) ; //µÃµ½ÁÐÊôÐÔ
            int SetColumnProp_(LPCTSTR pColName, LPCTSTR pItem, LPCTSTR pProp) ;//ÉèÖÃÁÐÊôÐÔ
 
            LPTSTR GetColumnProps_(int nCol) ; //µÃµ½ÁÐÕûÌåXMLÊôÐÔ
            int SetColumnProps_(int nCol, LPCTSTR pXmlProp) ; //ÉèÖÃÁÐÕûÌåXMLÊôÐÔ
            LPTSTR GetColumnProp_(int nCol, LPCTSTR pItem) ; //µÃµ½ÁÐÊôÐÔ
            int SetColumnProp_(int nCol, LPCTSTR pItem, LPCTSTR pProp) ;//ÉèÖÃÁÐÊôÐÔ
        public:
            int DataBI_(LPCTSTR pSchema = NULL) ;//Êý¾ÝBI·ÖÎö
        public:
            int chart_(LPCTSTR pXmlArg = NULL) ;//ͼÐÎ
 
            //send event message
            int event_ItemFocusChanged_(int nRow, int nCol) ;
            int event_RowFocusChanged_(int nRow, int nOldRow) ;
            int event_GetFocus_() ;
            int event_LoseFocus_() ;
            int event_ItemChanged_(int nRow, int nCol, LPCTSTR pData) ;
            int event_ItemChanging_(int nRow, int nCol, LPCTSTR pData) ;
 
        public:
            bool ItemChangeTo(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
            bool ItemChangeTo(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
 
        public:
            LPCTSTR GetGuid(int nRow);
            //follow function for cell table
        public:
            int InsertRow_(int nGroup, int nRow) ; //²åÈë×éÐÐ
            int DeleteRow_(int nGroup, int nRow) ; //ɾ³ý×éÐÐ
            int InsertRows_(int nGroup, int nRow, int nAmt) ; //²åÈë×é¶àÐÐ
            int DeleteRows_(int nGroup, int nRow, int nAmt) ;//ɾ³ý×é¶àÐÐ
        public:
            int GetGroupStartRow_(int nGroup) ; //µÃµ½Ö¸¶¨×éµÄ¿ªÊ¼ÐÐ
            int GetGroupRowCount_(int nGroup) ; //µÃµ½Ö¸¶¨×éµÄ½áÊøÐÐ
            int InsertGroupRow_(int nGroup, int nRow) ; //²åÈë×éÐÐ
        public:
            int GetMaxDeep_() ; //²åÈëÊý¾ÝÊÓͼµÄ×î´óÉî¶È
            int GetLevel_() ; //µÃµ½Êý¾ÝÊÓͼµÄ¼¶ºÅ
            LPCTSTR GetDwXPath_() ; //µÃµ½Êý¾ÝÊÓͼµÄXPATH
        public:
            IDwView* GetParent_() ; //µÃµ½¸¸Êý¾ÝÊÔͼ
        public:
            int GetChildCount_() ; //µÃµ½×ÓÊý¾ÝÊÓͼÊý
            IDwView* GetChild_(int nIndex) ; //µÃµ½Ö¸¶¨ÐòºÅµÄ×ÓÊý¾ÝÊÓͼ
        public:
            LPCTSTR GetDwName_() ; //µÃµ½Êý¾ÝÊÓͼµÄÃû³Æ
            IDwView* FindDwTable_(LPCTSTR pStrName, IDwView* pParent = NULL) ; //²éÕÒÊý¾ÝÊÔͼ
            IDwView* GetCurTable_(int& nRow, int& nCol) ;//µÃµ½µ±Ç°Êý¾ÝÊÓͼ£¬²¢·µ»ØÐÐÁÐ
            IDwView* GetCurTable_() ;//µÃµ½µ±Ç°Êý¾ÝÊÓͼ
 
        public:
            int SetRowSelectorWidth(int nWidth);
            int ResetRowSelector();
            int GetRowSelectorWidth();
            int GetRowSelectorDefaultWidth();
 
            int SetColHeaderHeight(int nHeight);
            int GetColHeaderDefaultHeight();
            int ResetColHeaderHeight();
            int GetColHeaderHeight();
        public:
            LPTSTR GetHtml();
        public:
            int SetScrollState(bool both);
            int SetHScrollState(bool bShow);
            int SetVScrollState(bool bShow);
 
        public:
            COLORREF    GetDirectColor();
            void        SetDirectColor(COLORREF cr);
            COLORREF    GetAdvanceColor();
            void        SetAdvanceColor(COLORREF cr);
        public:
            LPTSTR        GetNoteString(int nRow, int nCol);
            LPTSTR        GetOriginString(int nRow, int nCol);
            LPTSTR        GetAdvanceString(int nRow, int nCol);
 
            void        SetNoteString(int nRow, int nCol, LPTSTR pStr);
            void        SetOriginString(int nRow, int nCol, LPTSTR pStr);
            void        SetAdvanceString(int nRow, int nCol, LPTSTR pStr);
 
            void        ClearNoteString(int nRow, int nCol);
            void        ClearOriginString(int nRow, int nCol);
            void        ClearAdvanceString(int nRow, int nCol);
        public:
            int AcceptText();
            int getNullCell(POINT& p);
            int ExpandRow();
            int ExpandRow(int sRow, int eRow);
            int ExpandCellRow(int sRow, int eRow);
            int ExpandMarginRow(int sRow, int eRow);
            int GetCellRowFromRowColumn(int sRow, int sCol); //µÃµ½ÐÐÁÐ
            int SetSelectionBorder(int Flag);
            int SetItemText(int row, int col, LPTSTR name);
        public:
            void SetEditUpperMode(bool upper);
            bool GetEditUpperMode();
        public:
            int SetRowSort(LPTSTR colName, bool colOrder = true);
        public:
            LPCTSTR GetItemDisplayString(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal);
            LPCTSTR GetItemDisplayString(int nRow, LPCTSTR ColumnName, DWBuffer dwBuffer = dbuf_normal);
            bool SetItemDisplayString(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
            bool SetItemDisplayString(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
 
            LPCTSTR GetItemTipString(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal);
            LPCTSTR GetItemTipString(int nRow, LPCTSTR ColumnName, DWBuffer dwBuffer = dbuf_normal);
            bool SetItemTipString(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
            bool SetItemTipString(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
 
        };
    }}
}}