#pragma once #include #include #include #include #include "resource.h" #include "SwordReaderResource.h" #include "SRFramework/SRFrame.h" #include "SRFramework/SRCommandBar.h" #include "SRFramework/SRCommandBar.h" #include "SRFramework/SRMenu.h" #include "SRMenuBar.h" #include "SRNumberChooser.h" #include "SRBookChooser.h" #include "SRFind.h" #include "SRTabbedViews.h" using namespace SRFramework; using namespace sword; class SRMainFrame : public SRFrame { public: SRMainFrame(); virtual ~SRMainFrame(); virtual BOOL Register(); BOOL Init(); BOOL Create(); BOOL UpdateWindow(); BOOL CreateCommandBar(); BOOL OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl); void SelectBibleModule(INT nModIndex); void SelectCommModule(INT nModIndex); void SelectDictModule(INT nModIndex); BOOL GetSupportedOptions(); void ToggleOption(WORD wID); void SetFocus(); void UpdateWindowTitle(); void SetWindowTitle(const WCString &wcsTitle); BOOL HandleClickedURL(const WCString &wcsURL); // Sword related BOOL InitSword(); // Do these belong here?... dctrotz static const WCString *GetBookNames() { return s_wcsBookNames; } BOOL OnSize(UINT nType, int cx, int cy); BOOL OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); VOID SetBook(INT nBook); VOID SetChapter(INT nChapter); VOID SetVerse(INT nVerse, BOOL fScroll); VOID SetVerseKey(VerseKey verse); VOID SaveOptions(); VOID LoadOptions(); private: INT m_nTotalOpts; SWConfig *m_confOptions; SWBuf *m_bufModOptions; SRMenuBar *m_menuBar; // The following two variables will allow for multiple views (commentary, bible, parallel, etc.) // For now we only have one. INT m_nCurrentModule; /*REM */ SWMgr *m_swmgr; ModuleMap *m_modBibles; ModuleMap *m_modDicts; ModuleMap *m_modComms; SWModule *m_modGreekLex; SWModule *m_modGreekMorph; SWModule *m_modHebrewLex; SWModule *m_modHebrewMorph; SRNumberChooser *m_viewVerse; SRNumberChooser *m_viewChapter; SRBookChooser *m_viewBook; SRFind *m_viewFind; SRTabbedViews *m_tabViews; BOOL m_fChapterChanged; BOOL m_fInit; static WCString s_wcsBookNames[BIBLE_TOTAL_BOOKS]; static BOOL s_fRegistered; };