[sword-svn] r202 - trunk/src/SwordReader_GUI

dtrotzjr at crosswire.org dtrotzjr at crosswire.org
Sat Jan 31 16:43:33 MST 2009


Author: dtrotzjr
Date: 2009-01-31 16:43:33 -0700 (Sat, 31 Jan 2009)
New Revision: 202

Added:
   trunk/src/SwordReader_GUI/SRCommWidget.cpp
   trunk/src/SwordReader_GUI/SRCommWidget.h
   trunk/src/SwordReader_GUI/SRModuleWidget.cpp
   trunk/src/SwordReader_GUI/SRModuleWidget.h
Removed:
   trunk/src/SwordReader_GUI/SRWidgetView.h
Modified:
   trunk/src/SwordReader_GUI/SRBibleWidget.cpp
   trunk/src/SwordReader_GUI/SRBibleWidget.h
   trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
Log:
Reworked a few classes to allow for verse references on the commentary tab.

Modified: trunk/src/SwordReader_GUI/SRBibleWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRBibleWidget.cpp	2009-01-31 19:52:40 UTC (rev 201)
+++ trunk/src/SwordReader_GUI/SRBibleWidget.cpp	2009-01-31 23:43:33 UTC (rev 202)
@@ -1,11 +1,7 @@
 #include "SRBibleWidget.h"
-#include "SRFramework\SRApp.h"
 
-BOOL SRBibleWidget::s_fRegistered = false;
-
 SRBibleWidget::SRBibleWidget()
-:m_viewBible(NULL)
-,m_viewLexi(NULL)
+:m_viewLexi(NULL)
 ,m_viewNote(NULL)
 ,m_modGreekDef(NULL)
 ,m_modGreekMorph(NULL)
@@ -14,15 +10,15 @@
 ,m_fLexiVisible(FALSE)
 ,m_fNoteVisible(FALSE)
 {
+    /*
     m_wcsClassName = "SRBibleWidget";
     m_wcsWindowName = "";
     m_hInstance = SRFramework::SRApp::GetInstanceHandle();
+    */
 }
 
 SRBibleWidget::~SRBibleWidget()
 {
-    if(m_viewBible)
-        delete m_viewBible;
     if(m_viewLexi)
         delete m_viewLexi;
     if(m_subWndLexi)
@@ -33,148 +29,11 @@
         delete m_subWndNote;
 }
 
-BOOL SRBibleWidget::Create(SRWnd *pParentWnd, RECT bounds)
-{
-    if(!Register())
-        return FALSE;
 
-    if(!SRWnd::Create(m_wcsClassName,m_wcsWindowName,WS_CHILD | WS_VISIBLE, bounds, pParentWnd, NULL, m_hInstance))
-        return FALSE;
-
-
-    return TRUE;
-}
-
-BOOL SRBibleWidget::Register()
-{
-    // Register window class...
-    WNDCLASS    wc;
-    if(s_fRegistered)
-        return TRUE;
-
-    wc.style            = CS_HREDRAW | CS_VREDRAW | CS_PARENTDC;
-    wc.lpfnWndProc      = (WNDPROC) MessageRoute;
-    wc.cbClsExtra       = 0;
-    wc.cbWndExtra       = 0;
-    wc.hInstance        = m_hInstance;
-    wc.hIcon            = NULL;
-    wc.hCursor          = 0;
-    wc.hbrBackground    = (HBRUSH) GetStockObject(WHITE_BRUSH);
-    wc.lpszMenuName     = 0;
-    wc.lpszClassName    = m_wcsClassName.w_str();
-
-    if(RegisterClass(&wc) == 0) 
-        return FALSE;
-    
-    s_fRegistered = TRUE;
-
-    return TRUE;
-}
-
-
-BOOL SRBibleWidget::OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl)
-{
-    if(m_pParentWnd)
-        return m_pParentWnd->OnCommand(wNotifyCode, wID, hWndCtl);
-    return FALSE;
-}
-
-VOID SRBibleWidget::SetModule(SWModule *pModule)
-{
-    if(m_viewBible)
-        m_viewBible->SetModule(pModule);
-}
-
-VOID SRBibleWidget::SetKey(const VerseKey &verse)
-{
-    if(m_viewBible)
-        m_viewBible->SetKey(verse);
-}
-
-VOID SRBibleWidget::SetBook(INT nBook)
-{
-    if(m_viewBible)
-        m_viewBible->SetBook(nBook);
-}
-
-VOID SRBibleWidget::SetChapter(INT nChapter)
-{
-    if(m_viewBible)
-        m_viewBible->SetChapter(nChapter);
-}
-
-VOID SRBibleWidget::SetVerse(INT nVerse, BOOL fScroll)
-{
-    if(m_viewBible)
-        m_viewBible->SetVerse(nVerse, fScroll);
-}
-
-WCString SRBibleWidget::GetWindowTitle()
-{
-    if(m_viewBible)
-        return m_viewBible->GetWindowTitle();
-    return "";
-}
-
-const SWModule*   SRBibleWidget::GetModule() 
-{ 
-    if(m_viewBible)
-        return m_viewBible->GetModule();
-    return NULL;
-}
-
-INT SRBibleWidget::GetBook()
-{
-    if(m_viewBible)
-        return m_viewBible->GetBook();
-    return -1;
-}
-
-INT SRBibleWidget::GetChapter()
-{
-    if(m_viewBible)
-        return m_viewBible->GetChapter();
-    return -1;
-}
-
-INT SRBibleWidget::GetVerse()
-{
-    if(m_viewBible)
-        return m_viewBible->GetVerse();
-    return -1;
-}
-
-const VerseKey& SRBibleWidget::GetVerseKey() const
-{
-    if(m_viewBible)
-        return m_viewBible->GetVerseKey();
-    return m_keyDummy;
-}
-
-INT SRBibleWidget::GetTestament()
-{
-    if(m_viewBible)
-        return m_viewBible->GetTestament();
-    return -1;
-}
-
-INT SRBibleWidget::GetChapterMax() 
-{
-    if(m_viewBible)
-        return m_viewBible->GetChapterMax();
-    return -1;
-}
-
-INT SRBibleWidget::GetVerseMax()
-{
-    if(m_viewBible)
-        return m_viewBible->GetVerseMax();
-    return -1;
-}
 VOID SRBibleWidget::SetSwordReady()
 {
-    if(m_viewBible)
-        m_viewBible->SetSwordReady();
+    if(m_viewModule)
+        m_viewModule->SetSwordReady();
     if(m_viewLexi)
         m_viewLexi->SetSwordReady();
 }
@@ -186,8 +45,8 @@
     RECT notesRect = {0,0,0,0};
     GetClientRect(m_hWnd, &clientRect);
 
-    m_viewBible = new SRModuleView(BibleView);
-    if(!m_viewBible || !m_viewBible->Create(this, clientRect))
+    m_viewModule = new SRModuleView(BibleView);
+    if(!m_viewModule || !m_viewModule->Create(this, clientRect))
         return FALSE;
 
     m_viewLexi = new SRLexiView(TRUE);
@@ -210,14 +69,14 @@
 VOID SRBibleWidget::Show()
 {
     SRWnd::Show();
-    if(m_viewBible)
-        m_viewBible->Show();
+    if(m_viewModule)
+        m_viewModule->Show();
 }
-    
+
 BOOL SRBibleWidget::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
 {
-    if(m_viewBible)
-        return m_viewBible->OnKeyDown(nChar, nRepCnt, nFlags);
+    if(m_viewModule)
+        return m_viewModule->OnKeyDown(nChar, nRepCnt, nFlags);
     return FALSE;
 }
 
@@ -265,33 +124,6 @@
     m_fNoteVisible = TRUE;
 }
 
-VOID SRBibleWidget::ShowSubWindow(SRSubWindow *pSubWnd)
-{
-    RECT clientRect;
-    RECT mainRect, subRect, nullRect = {0,0,0,0};
-    int i,j,tmp;
-    if(!m_viewNote || !m_viewBible)
-        return;
-
-    GetClientRect(m_hWnd, &clientRect);
-    mainRect = clientRect;
-    subRect = clientRect;
-
-    pSubWnd->MoveWindow(&nullRect);
-    pSubWnd->Show();
-    for(i = 0, j = 1; i < 80;){
-        //Sleep(5);
-        tmp = 20 - j++;
-        i += tmp;
-        mainRect.bottom -= tmp;
-        subRect.top = mainRect.bottom;
-        m_viewBible->MoveWindow(&mainRect);
-        pSubWnd->MoveWindow(&subRect);
-        m_viewBible->RefreshWindow();
-        pSubWnd->RefreshWindow();
-    }
-}
-
 VOID SRBibleWidget::ShowGreekDef(const WCString &key)
 {
     if(m_modGreekDef)
@@ -350,30 +182,8 @@
     
 VOID SRBibleWidget::HideSubWindow(SRSubWindow *pSubWnd)
 {
-    RECT mainRect, subRect, nullRect = {0,0,0,0};
-    int i,j,tmp;
-    if(!pSubWnd || !m_viewBible)
-        return;
+    SRModuleWidget::HideSubWindow(pSubWnd);
 
-    mainRect = m_viewBible->GetBounds();
-    subRect = pSubWnd->GetBounds();
-    subRect.top += mainRect.bottom;
-    subRect.bottom += mainRect.bottom;
-            
-    //pSubWnd->MoveWindow(&nullRect);
-    for(i = 0, j = 1; i < 80;){
-        //Sleep(5);
-        tmp = 20 - j++;
-        i += tmp;
-        mainRect.bottom += tmp;
-        subRect.top = mainRect.bottom;
-        m_viewBible->MoveWindow(&mainRect);
-        m_viewBible->RefreshWindow();
-        pSubWnd->MoveWindow(&subRect);
-        pSubWnd->RefreshWindow();
-    }
-    pSubWnd->Hide();
-
     if(pSubWnd == m_subWndLexi)
         m_fLexiVisible = FALSE;
     else if(pSubWnd == m_subWndNote)

Modified: trunk/src/SwordReader_GUI/SRBibleWidget.h
===================================================================
--- trunk/src/SwordReader_GUI/SRBibleWidget.h	2009-01-31 19:52:40 UTC (rev 201)
+++ trunk/src/SwordReader_GUI/SRBibleWidget.h	2009-01-31 23:43:33 UTC (rev 202)
@@ -1,36 +1,17 @@
 #pragma once
 #include "SRModuleView.h"
-#include "SRModuleHolder.h"
-#include "SRWidgetView.h"
+#include "SRModuleWidget.h"
 #include "SRSubWindow.h"
 #include "SRLexiView.h"
 #include "swmodule.h"
 #include "versekey.h"
 
-class SRBibleWidget : public SRWnd, public SRModuleHolder, public SRWidgetView
+class SRBibleWidget : public SRModuleWidget
 {
 public:
     SRBibleWidget();
     ~SRBibleWidget();
-    BOOL Create(SRWnd *pParentWnd, RECT bounds);
-    BOOL Register();
-    BOOL OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl);
-    VOID        SetModule(SWModule *pModule);
-    VOID        SetKey(const VerseKey &verse);
-    VOID        SetBook(INT nBook);
-    VOID        SetChapter(INT nChapter);
-    VOID        SetVerse(INT nVerse, BOOL fScroll);
     BOOL        Init();
-    WCString    GetWindowTitle();
-    const SWModule*   GetModule();
-    INT         GetBook();
-    INT         GetChapter();
-    INT         GetVerse();
-    const VerseKey& GetVerseKey() const;
-    INT         GetTestament();
-    INT         GetChapterMax();
-    INT         GetVerseMax();
-    VOID        SetSwordReady();
     VOID        Show();
     VOID        SetGreekDefModule(SWModule *pModule);
     VOID        SetGreekMorphModule(SWModule *pModule);
@@ -42,17 +23,16 @@
     VOID        ShowHebrewMorph(const WCString &key);
     VOID        ShowBibleNote(const WCString &note);
 
-    VOID        ShowSubWindow(SRSubWindow *pSubWnd);
     VOID        HideSubWindow(SRSubWindow *pSubWnd);
     VOID        ShowLexiSubWindow();
     VOID        ShowNoteSubWindow();
     
+    VOID        SetSwordReady();
+    
     BOOL        OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
 private:
     VOID        ShowLexiEntry(SWModule *pModule, const WCString &key);
 
-    static BOOL s_fRegistered;
-    SRModuleView    *m_viewBible;
     SRLexiView      *m_viewLexi;
     SRSubWindow     *m_subWndLexi;
     SRTextView      *m_viewNote;
@@ -63,5 +43,4 @@
     SWModule        *m_modHebrewDef;
     BOOL            m_fLexiVisible;
     BOOL            m_fNoteVisible;
-    VerseKey        m_keyDummy;
 };
\ No newline at end of file

Added: trunk/src/SwordReader_GUI/SRCommWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRCommWidget.cpp	                        (rev 0)
+++ trunk/src/SwordReader_GUI/SRCommWidget.cpp	2009-01-31 23:43:33 UTC (rev 202)
@@ -0,0 +1,90 @@
+#include "SRCommWidget.h"
+
+SRCommWidget::SRCommWidget()
+:m_viewBibleRef(NULL)
+,m_fBibleRefVisible(FALSE)
+{
+    /*
+    m_wcsClassName = "SRCommWidget";
+    m_wcsWindowName = "";
+    m_hInstance = SRFramework::SRApp::GetInstanceHandle();
+    */
+}
+
+SRCommWidget::~SRCommWidget()
+{
+    if(m_viewBibleRef)
+        delete m_viewBibleRef;
+    if(m_subWndBibleRef)
+        delete m_subWndBibleRef;
+}
+
+
+VOID SRCommWidget::SetSwordReady()
+{
+    if(m_viewModule)
+        m_viewModule->SetSwordReady();
+    if(m_viewBibleRef)
+        m_viewBibleRef->SetSwordReady();
+}
+
+BOOL SRCommWidget::Init()
+{
+    RECT clientRect;
+    RECT bibleRect = {0,0,0,0};
+    GetClientRect(m_hWnd, &clientRect);
+
+    m_viewModule = new SRModuleView(CommView);
+    if(!m_viewModule || !m_viewModule->Create(this, clientRect))
+        return FALSE;
+    
+    m_viewBibleRef = new SRModuleView(BibleView);
+    if(!m_viewBibleRef) // Create is handled in the sub-window
+        return FALSE;
+    m_subWndBibleRef = new SRSubWindow(m_viewBibleRef);
+    if(!m_subWndBibleRef || !m_subWndBibleRef->Create(this, bibleRect))
+        return FALSE;
+
+    return TRUE;
+}
+
+VOID SRCommWidget::Show()
+{
+    SRWnd::Show();
+    if(m_viewModule)
+        m_viewModule->Show();
+}
+
+BOOL SRCommWidget::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+{
+    if(m_viewModule)
+        return m_viewModule->OnKeyDown(nChar, nRepCnt, nFlags);
+    return FALSE;
+}
+
+VOID SRCommWidget::ShowBibleRefSubWindow()
+{
+    if(m_fBibleRefVisible)
+        return;
+    ShowSubWindow(m_subWndBibleRef);
+    m_fBibleRefVisible = TRUE;
+}
+    
+
+VOID SRCommWidget::ShowBibleRef(SWModule *pModule, const WCString &key)
+{
+    if(!pModule || !m_viewBibleRef)
+        return;
+    m_viewBibleRef->SetModule(pModule);
+    m_viewBibleRef->SetKey(key.c_str());
+    if(!m_fBibleRefVisible){
+        ShowBibleRefSubWindow();
+    }
+}
+
+    
+VOID SRCommWidget::HideSubWindow(SRSubWindow *pSubWnd)
+{
+    SRModuleWidget::HideSubWindow(pSubWnd);
+    m_fBibleRefVisible = FALSE;
+}
\ No newline at end of file


Property changes on: trunk/src/SwordReader_GUI/SRCommWidget.cpp
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/src/SwordReader_GUI/SRCommWidget.h
===================================================================
--- trunk/src/SwordReader_GUI/SRCommWidget.h	                        (rev 0)
+++ trunk/src/SwordReader_GUI/SRCommWidget.h	2009-01-31 23:43:33 UTC (rev 202)
@@ -0,0 +1,29 @@
+#pragma once
+#include "SRModuleView.h"
+#include "SRModuleWidget.h"
+#include "SRSubWindow.h"
+#include "swmodule.h"
+#include "versekey.h"
+
+class SRCommWidget : public SRModuleWidget
+{
+public:
+    SRCommWidget();
+    ~SRCommWidget();
+    BOOL        Init();
+    VOID        Show();
+    //VOID        ShowBibleRef(const WCString &note);
+    VOID        HideSubWindow(SRSubWindow *pSubWnd);
+    VOID        ShowBibleRef(SWModule *pModule, const WCString &key);
+
+    VOID        ShowBibleRefSubWindow();
+    
+    VOID        SetSwordReady();
+    
+    BOOL        OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
+private:
+
+    SRModuleView    *m_viewBibleRef;
+    SRSubWindow     *m_subWndBibleRef;
+    BOOL            m_fBibleRefVisible;
+};
\ No newline at end of file


Property changes on: trunk/src/SwordReader_GUI/SRCommWidget.h
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/src/SwordReader_GUI/SRModuleWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRModuleWidget.cpp	                        (rev 0)
+++ trunk/src/SwordReader_GUI/SRModuleWidget.cpp	2009-01-31 23:43:33 UTC (rev 202)
@@ -0,0 +1,223 @@
+#include "SRFramework\SRApp.h"
+#include "SRModuleWidget.h"
+#include "SRModuleView.h"
+#include "SRSubWindow.h"
+#include <swmodule.h>
+#include <versekey.h>
+
+
+BOOL SRModuleWidget::s_fRegistered = false;
+
+SRModuleWidget::SRModuleWidget()
+:m_viewModule(NULL)
+{
+    m_wcsClassName = "SRModuleWidget";
+    m_wcsWindowName = "";
+    m_hInstance = SRFramework::SRApp::GetInstanceHandle();
+}
+
+SRModuleWidget::~SRModuleWidget()
+{
+    if(m_viewModule)
+        delete m_viewModule;
+}
+
+BOOL SRModuleWidget::Create(SRWnd *pParentWnd, RECT bounds)
+{
+    if(!Register())
+        return FALSE;
+
+    if(!SRWnd::Create(m_wcsClassName,m_wcsWindowName,WS_CHILD | WS_VISIBLE, bounds, pParentWnd, NULL, m_hInstance))
+        return FALSE;
+
+
+    return TRUE;
+}
+
+BOOL SRModuleWidget::Register()
+{
+    // Register window class...
+    WNDCLASS    wc;
+    if(s_fRegistered)
+        return TRUE;
+
+    wc.style            = CS_HREDRAW | CS_VREDRAW | CS_PARENTDC;
+    wc.lpfnWndProc      = (WNDPROC) MessageRoute;
+    wc.cbClsExtra       = 0;
+    wc.cbWndExtra       = 0;
+    wc.hInstance        = m_hInstance;
+    wc.hIcon            = NULL;
+    wc.hCursor          = 0;
+    wc.hbrBackground    = (HBRUSH) GetStockObject(WHITE_BRUSH);
+    wc.lpszMenuName     = 0;
+    wc.lpszClassName    = m_wcsClassName.w_str();
+
+    if(RegisterClass(&wc) == 0) 
+        return FALSE;
+    
+    s_fRegistered = TRUE;
+
+    return TRUE;
+}
+
+VOID SRModuleWidget::SetSwordReady()
+{
+    if(m_viewModule)
+        m_viewModule->SetSwordReady();
+}
+
+BOOL SRModuleWidget::OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl)
+{
+    if(m_pParentWnd)
+        return m_pParentWnd->OnCommand(wNotifyCode, wID, hWndCtl);
+    return FALSE;
+}
+
+VOID SRModuleWidget::SetModule(SWModule *pModule)
+{
+    if(m_viewModule)
+        m_viewModule->SetModule(pModule);
+}
+
+VOID SRModuleWidget::SetKey(const VerseKey &verse)
+{
+    if(m_viewModule)
+        m_viewModule->SetKey(verse);
+}
+
+VOID SRModuleWidget::SetBook(INT nBook)
+{
+    if(m_viewModule)
+        m_viewModule->SetBook(nBook);
+}
+
+VOID SRModuleWidget::SetChapter(INT nChapter)
+{
+    if(m_viewModule)
+        m_viewModule->SetChapter(nChapter);
+}
+
+VOID SRModuleWidget::SetVerse(INT nVerse, BOOL fScroll)
+{
+    if(m_viewModule)
+        m_viewModule->SetVerse(nVerse, fScroll);
+}
+
+WCString SRModuleWidget::GetWindowTitle()
+{
+    if(m_viewModule)
+        return m_viewModule->GetWindowTitle();
+    return "";
+}
+
+const SWModule*   SRModuleWidget::GetModule() 
+{ 
+    if(m_viewModule)
+        return m_viewModule->GetModule();
+    return NULL;
+}
+
+INT SRModuleWidget::GetBook()
+{
+    if(m_viewModule)
+        return m_viewModule->GetBook();
+    return -1;
+}
+
+INT SRModuleWidget::GetChapter()
+{
+    if(m_viewModule)
+        return m_viewModule->GetChapter();
+    return -1;
+}
+
+INT SRModuleWidget::GetVerse()
+{
+    if(m_viewModule)
+        return m_viewModule->GetVerse();
+    return -1;
+}
+
+const VerseKey& SRModuleWidget::GetVerseKey() const
+{
+    if(m_viewModule)
+        return m_viewModule->GetVerseKey();
+    return m_keyDummy;
+}
+
+INT SRModuleWidget::GetTestament()
+{
+    if(m_viewModule)
+        return m_viewModule->GetTestament();
+    return -1;
+}
+
+INT SRModuleWidget::GetChapterMax() 
+{
+    if(m_viewModule)
+        return m_viewModule->GetChapterMax();
+    return -1;
+}
+
+INT SRModuleWidget::GetVerseMax()
+{
+    if(m_viewModule)
+        return m_viewModule->GetVerseMax();
+    return -1;
+}
+
+VOID SRModuleWidget::ShowSubWindow(SRSubWindow *pSubWnd)
+{
+    RECT clientRect = GetBounds();
+    RECT mainRect, subRect;
+    int i,j,tmp;
+    if(!pSubWnd || !m_viewModule)
+        return;
+
+    mainRect = clientRect;
+    subRect = clientRect;
+    subRect.top = mainRect.bottom;
+
+    pSubWnd->MoveWindow(&subRect);
+    pSubWnd->Show();
+
+    for(i = 0, j = 1; i < 80;){
+        tmp = 20 - j++;
+        i += tmp;
+        mainRect.bottom -= tmp;
+        subRect.top = mainRect.bottom;
+        
+        m_viewModule->MoveWindow(&mainRect);
+        pSubWnd->MoveWindow(&subRect);
+        
+        m_viewModule->RefreshWindow();
+        pSubWnd->RefreshWindow();
+    }
+}
+
+VOID SRModuleWidget::HideSubWindow(SRSubWindow *pSubWnd)
+{
+    RECT mainRect, subRect;
+    int i,j,tmp;
+    if(!pSubWnd || !m_viewModule)
+        return;
+
+    mainRect = m_viewModule->GetBounds();
+    subRect = pSubWnd->GetBounds();
+    subRect.top += mainRect.bottom;
+    subRect.bottom += mainRect.bottom;
+            
+    for(i = 0, j = 1; i < 80;){
+        tmp = 20 - j++;
+        i += tmp;
+        mainRect.bottom += tmp;
+        subRect.top = mainRect.bottom;
+        
+        m_viewModule->MoveWindow(&mainRect);
+        m_viewModule->RefreshWindow();
+        
+        pSubWnd->MoveWindow(&subRect);
+        pSubWnd->RefreshWindow();
+    }
+    pSubWnd->Hide();
+}
\ No newline at end of file


Property changes on: trunk/src/SwordReader_GUI/SRModuleWidget.cpp
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/src/SwordReader_GUI/SRModuleWidget.h
===================================================================
--- trunk/src/SwordReader_GUI/SRModuleWidget.h	                        (rev 0)
+++ trunk/src/SwordReader_GUI/SRModuleWidget.h	2009-01-31 23:43:33 UTC (rev 202)
@@ -0,0 +1,47 @@
+#pragma once
+#include "SRSubWindow.h"
+#include "SRFramework/SRWnd.h"
+#include "SRModuleHolder.h"
+#include <versekey.h>
+#include <swmodule.h>
+
+using namespace SRFramework;
+using namespace sword;
+class SRModuleView;
+
+class SRModuleWidget : public SRWnd, public SRModuleHolder
+{
+public:
+    SRModuleWidget();
+    virtual ~SRModuleWidget();
+    BOOL Create(SRWnd *pParentWnd, RECT bounds);
+    BOOL Register();
+
+    virtual BOOL Init() = 0;
+    virtual VOID HideSubWindow(SRSubWindow *pSubWnd) = 0;
+    virtual VOID ShowSubWindow(SRSubWindow *pSubWnd);
+    
+    virtual WCString    GetWindowTitle();
+    virtual const SWModule*   GetModule();
+
+    virtual BOOL OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl);
+    virtual VOID        SetModule(SWModule *pModule);
+    virtual VOID        SetKey(const VerseKey &verse);
+    virtual VOID        SetBook(INT nBook);
+    virtual VOID        SetChapter(INT nChapter);
+    virtual VOID        SetVerse(INT nVerse, BOOL fScroll);
+    virtual INT         GetBook();
+    virtual INT         GetChapter();
+    virtual INT         GetVerse();
+    virtual const VerseKey& GetVerseKey() const;
+    virtual INT         GetTestament();
+    virtual INT         GetChapterMax();
+    virtual INT         GetVerseMax();
+    virtual VOID        SetSwordReady();
+
+protected:
+    static BOOL     s_fRegistered;
+    SRModuleView    *m_viewModule;
+    VerseKey        m_keyDummy;
+
+};
\ No newline at end of file


Property changes on: trunk/src/SwordReader_GUI/SRModuleWidget.h
___________________________________________________________________
Added: svn:executable
   + *

Deleted: trunk/src/SwordReader_GUI/SRWidgetView.h
===================================================================
--- trunk/src/SwordReader_GUI/SRWidgetView.h	2009-01-31 19:52:40 UTC (rev 201)
+++ trunk/src/SwordReader_GUI/SRWidgetView.h	2009-01-31 23:43:33 UTC (rev 202)
@@ -1,8 +0,0 @@
-#pragma once
-class SRSubWindow;
-
-class SRWidgetView
-{
-public:
-    virtual VOID HideSubWindow(SRSubWindow *pSubWnd) = 0;
-};
\ No newline at end of file

Modified: trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
===================================================================
--- trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj	2009-01-31 19:52:40 UTC (rev 201)
+++ trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj	2009-01-31 23:43:33 UTC (rev 202)
@@ -874,6 +874,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\SRCommWidget.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\SRFind.cpp"
 				>
 			</File>
@@ -898,6 +902,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\SRModuleWidget.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\SRNumberChooser.cpp"
 				>
 			</File>
@@ -999,6 +1007,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\SRCommWidget.h"
+				>
+			</File>
+			<File
 				RelativePath=".\SRFind.h"
 				>
 			</File>
@@ -1027,6 +1039,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\SRModuleWidget.h"
+				>
+			</File>
+			<File
 				RelativePath=".\SRNumberChooser.h"
 				>
 			</File>
@@ -1047,10 +1063,6 @@
 				>
 			</File>
 			<File
-				RelativePath=".\SRWidgetView.h"
-				>
-			</File>
-			<File
 				RelativePath=".\SwordReaderResource.h"
 				>
 			</File>
@@ -1124,11 +1136,11 @@
 			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
 			>
 			<File
-				RelativePath=".\BibleReader.ICO"
+				RelativePath="..\gui\BibleReader.ICO"
 				>
 			</File>
 			<File
-				RelativePath="..\gui\BibleReader.ICO"
+				RelativePath=".\BibleReader.ICO"
 				>
 			</File>
 			<File




More information about the sword-cvs mailing list