#ifndef SRNUMBERCHOOSER_H #define SRNUMBERCHOOSER_H #include "SRFramework/SRWnd.h" using namespace SRFramework; enum ChooserType { CHAPTER, VERSE }; class SRNumberChooser: public SRWnd { public: SRNumberChooser(ChooserType type, WCString wcsPrompt, WORD wNextMenuID); virtual ~SRNumberChooser(); // redraw the screen. This should use methods in ApplicationInterface.h to do the drawing BOOL OnPaint(); INT GetSelectedNumber() { return m_nSelectedNumber; } void SetSelectedNumber(INT nSelectedNumber); void SetEndNumber(INT nEndNumber); 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 NumberAt(int x, int y); INT LeftEdge(); INT MaxRows(); INT MaxCols(); INT MaxNumbersPerScreen(); void MoveDown(); void MoveLeft(); void MoveRight(); void MoveUp(); INT m_nEndNumber; INT m_nStartAt; INT m_nSelectedNumber; WORD m_wNextMenuID; ChooserType m_type; WCString m_wcsPrompt; static BOOL s_fRegistered; UINT m_nLastChar; BOOL m_fLButtonDown; INT m_nButtonWidth; INT m_nButtonHeight; }; #endif