#pragma once #include "SRFramework/SRWnd.h" #include "SRFramework/SRTabCtrl.h" #include "SRBibleWidget.h" #include "SRCommWidget.h" #include "SRModuleView.h" #include "SRLexiWidget.h" #include "SRAboutView.h" using namespace SRFramework; using namespace sword; class SRTabbedViews : public SRFramework::SRWnd { public: SRTabbedViews(void); virtual ~SRTabbedViews(void); BOOL Create(SRWnd *pParentWnd, RECT bounds); BOOL Register(); BOOL Init(); BOOL UpdateWindow(); BOOL OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl); const SWModule *GetBibleModule(); const SWModule *GetCommModule(); const SWModule *GetDictModule(); const VerseKey &GetBibleVerseKey(); const VerseKey &GetCommVerseKey(); const SWKey &GetDictKey(); VOID SetBibleModule(SWModule *pModule); VOID SetBibleKey(const VerseKey &verse); VOID SetCommModule(SWModule *pModule); VOID SetCommKey(const VerseKey &verse); VOID SetDictModule(SWModule *pModule); VOID SetDictKey(const StrKey &entry); const SWModule *GetCurrentModule(); VOID SetSwordReady(); VOID RefreshScreen(BOOL fReloadText); INT GetCurrentBookNum(); INT GetCurrentChapter(); INT GetCurrentChapterMax(); INT GetCurrentVerse(); INT GetCurrentVerseMax(); INT GetCurrentTestament(); WCString GetCurrentWindowTitle(); const VerseKey &GetCurrentVerseKey(); VOID SetCurrentBookNum(INT nBook); VOID SetCurrentChapter(INT nChapter); VOID SetCurrentVerse(INT nVerse, BOOL fScroll); VOID SetCurrentModule(SWModule *pModule); VOID SetCurrentKey(const VerseKey &verse); VOID SetLinkedKey(const VerseKey &key) { m_keyLinked = key; } VOID ManualChangeCurrentTab(INT nNewTab); INT GetCurTabSel(); void MoveWindow(LPCRECT lpRect,BOOL bRepaint = TRUE); BOOL OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); BOOL OnNotify(int idCtrl, LPNMHDR pnmh); INT SwitchToCurrentView(); VOID SetGreekDefModule(SWModule *pModule); VOID SetGreekMorphModule(SWModule *pModule); VOID SetHebrewDefModule(SWModule *pModule); VOID SetHebrewMorphModule(SWModule *pModule); VOID ShowGreekDef(const WCString &key); VOID ShowHebrewDef(const WCString &key); VOID ShowGreekMorph(const WCString &key); VOID ShowHebrewMorph(const WCString &key); VOID ShowBibleNote(const WCString ¬e); VOID ShowScriptRef(const WCString &ref); //VOID HyperLinkClicked(); WCString GetWindowTitle(); private: SRTabCtrl m_tabs; BOOL InitTabs(); BOOL InitViews(); SRWnd *GetCurrentView(); // When there is nothing valid to return return these dummy keys. VerseKey m_verseDummy; SWKey m_dictDummy; static BOOL s_fRegistered; SRBibleWidget *m_viewBible; SRCommWidget *m_viewComm; SRLexiWidget *m_viewDict; SRAboutView *m_viewAbout; VerseKey m_keyLinked; };