#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);
|
|
};
|
}}
|
}}
|