#include "SRScripRefView.h" #include "SRFramework/WCString.h" #include "SRMainFrame.h" #include SRScripRefView::SRScripRefView() : SRTextView() , m_pModule(NULL) , m_fSwordInit(FALSE) { } SRScripRefView::~SRScripRefView(void) { } BOOL SRScripRefView::OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl) { if(m_pParentWnd){ return m_pParentWnd->OnCommand(wNotifyCode, wID, hWndCtl); } return FALSE; } VOID SRScripRefView::SetModule(SWModule *pModule) { if(m_pModule == pModule) return; m_pModule = pModule; LoadTextView(); } VOID SRScripRefView::SetKeys(const ListKey &refs) { m_refs = refs; LoadTextView(); } VOID SRScripRefView::LoadTextView() { WCString buf, text, s; SWKey *keyCur; INT nCur = 0; if(!m_fSwordInit || !m_refs.Count()) return; keyCur = m_refs.getElement(nCur++); Clear(); buf = ""; AddText(buf.w_str(), buf.length()); // a