#ifndef SRBOOKCHOOSER_H #define SRBOOKCHOOSER_H #include "SRFramework/SRWnd.h" using namespace SRFramework; class SRBookChooser: public SRWnd { public: SRBookChooser(WCString *wcsBookNames, WORD wNextMenuID); virtual ~SRBookChooser(); // redraw the screen. This should use methods in ApplicationInterface.h to do the drawing BOOL OnPaint(); INT GetSelectedBook() { return m_nSelectedBook; } void SetSelectedBook(INT nSelectedBook); void SetEndBook(INT nEndBook); BOOL Register(); BOOL Create(SRWnd *pParentWnd, RECT bounds); BOOL OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); BOOL OnLButtonUp(WORD fwKeys, INT xPos, INT yPos); BOOL OnLButtonDown(WORD fwKeys, INT xPos, INT yPos); BOOL OnMouseMove(WORD fwKeys, INT xPos, INT yPos); protected: INT BookAt(int x, int y); void DrawButtons(); void DrawButton(HDC hdc, RECT buttonRect, LPCWSTR caption, UINT nTestament, bool selected); INT LeftEdge(); INT MaxRows(); INT MaxCols(); INT MaxBooksPerScreen(); void MoveDown(); void MoveLeft(); void MoveRight(); void MoveUp(); INT m_nEndBook; INT m_nStartAt; INT m_nSelectedBook; WORD m_wNextMenuID; WCString m_wcsPrompt; WCString *m_wcsBookNames; static BOOL s_fRegistered; UINT m_nLastChar; BOOL m_fLButtonDown; INT m_nButtonWidth; INT m_nButtonHeight; }; #endif