[sword-svn] r133 - trunk/src/SwordReader_GUI
dtrotzjr at www.crosswire.org
dtrotzjr at www.crosswire.org
Tue May 20 19:45:36 MST 2008
Author: dtrotzjr
Date: 2008-05-20 19:45:35 -0700 (Tue, 20 May 2008)
New Revision: 133
Added:
trunk/src/SwordReader_GUI/SRFind.cpp
trunk/src/SwordReader_GUI/SRFind.h
Modified:
trunk/src/SwordReader_GUI/SRMainFrame.cpp
trunk/src/SwordReader_GUI/SRMainFrame.h
trunk/src/SwordReader_GUI/SRNumberChooser.cpp
trunk/src/SwordReader_GUI/SRTextView.cpp
trunk/src/SwordReader_GUI/SRTextView.h
trunk/src/SwordReader_GUI/SwordReaderResource.h
trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
Log:
Added Find window. Not fully functional.
Added: trunk/src/SwordReader_GUI/SRFind.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRFind.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/SRFind.cpp 2008-05-21 02:45:35 UTC (rev 133)
@@ -0,0 +1,271 @@
+#include "SRFind.h"
+#include "SRFramework/SRApp.h"
+#include "SwordReaderResource.h"
+
+using namespace SRFramework;
+
+BOOL SRFind::s_fRegistered = false;
+
+SRFind::SRFind()
+:m_hEdtQuery(NULL)
+,m_hBtnSearch(NULL)
+,m_hRadRangeBible(NULL)
+,m_hRadRangeTestament(NULL)
+,m_hRadRangeBook(NULL)
+,m_hRadMethodMultiword(NULL)
+,m_hRadMethodExactphrase(NULL)
+,m_hLstResults(NULL)
+,m_hProgressBar(NULL)
+,m_hBtnGoTo(NULL)
+,m_textPreview(NULL)
+,m_wMethodMode(SR_FIND_METHOD_MWORD)
+,m_wRangeMode(SR_FIND_RANGE_BIBLE)
+{
+ m_wcsClassName = "SRFind";
+ m_wcsWindowName = "Sword Search Window";
+}
+
+SRFind::~SRFind()
+{
+ if(m_textPreview)
+ delete m_textPreview;
+}
+
+
+BOOL SRFind::OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl)
+{
+ switch(wID)
+ {
+ case IDC_BTN_SEARCH:
+ break;
+ case IDC_RAD_BIBLE:
+ ::SendMessage(m_hRadRangeBible,BM_SETCHECK,BST_CHECKED,0);
+ ::SendMessage(m_hRadRangeTestament,BM_SETCHECK,BST_UNCHECKED,0);
+ ::SendMessage(m_hRadRangeBook,BM_SETCHECK,BST_UNCHECKED,0);
+ m_wRangeMode = SR_FIND_RANGE_BIBLE;
+ break;
+ case IDC_RAD_TESTAMENT:
+ ::SendMessage(m_hRadRangeBible,BM_SETCHECK,BST_UNCHECKED,0);
+ ::SendMessage(m_hRadRangeTestament,BM_SETCHECK,BST_CHECKED,0);
+ ::SendMessage(m_hRadRangeBook,BM_SETCHECK,BST_UNCHECKED,0);
+ m_wRangeMode = SR_FIND_RANGE_TESTAMENT;
+ break;
+ case IDC_RAD_BOOK:
+ ::SendMessage(m_hRadRangeBible,BM_SETCHECK,BST_UNCHECKED,0);
+ ::SendMessage(m_hRadRangeTestament,BM_SETCHECK,BST_UNCHECKED,0);
+ ::SendMessage(m_hRadRangeBook,BM_SETCHECK,BST_CHECKED,0);
+ m_wRangeMode = SR_FIND_RANGE_BOOK;
+ break;
+ case IDC_RAD_MWORD:
+ ::SendMessage(m_hRadMethodMultiword,BM_SETCHECK,BST_CHECKED,0);
+ ::SendMessage(m_hRadMethodExactphrase,BM_SETCHECK,BST_UNCHECKED,0);
+ m_wMethodMode = SR_FIND_METHOD_MWORD;
+ break;
+ case IDC_RAD_EPHRASE:
+ ::SendMessage(m_hRadMethodMultiword,BM_SETCHECK,BST_UNCHECKED,0);
+ ::SendMessage(m_hRadMethodExactphrase,BM_SETCHECK,BST_CHECKED,0);
+ m_wMethodMode = SR_FIND_METHOD_EPHRASE;
+ break;
+ case IDC_LST_RESULTS:
+ break;
+ case IDC_BTN_GOTO:
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+BOOL SRFind::OnPaint()
+{
+ RECT clientRect;
+ PAINTSTRUCT ps;
+
+ HDC hdc = BeginPaint(m_hWnd, &ps);
+ HBRUSH brushBG = CreateSolidBrush((COLORREF)BUTTON_BACKGROUND);
+ GetClientRect(m_hWnd, &clientRect);
+ FillRect(hdc, &clientRect, (HBRUSH)GetStockObject(WHITE_BRUSH));
+ EndPaint(m_hWnd, &ps);
+
+ PlaceWidgets();
+ m_textPreview->UpdateWindow();
+
+ return TRUE;
+}
+
+LRESULT SRFind::OnCreate(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
+{
+ m_hWnd = hWnd;
+
+ m_hEdtQuery = CreateWindow(_T("edit"), NULL,
+ WS_CHILD | ES_AUTOHSCROLL | ES_LEFT | WS_TABSTOP | WS_BORDER,
+ 0,0,0,0,
+ hWnd, NULL, SRApp::GetInstanceHandle(), NULL);
+ if(!m_hEdtQuery)
+ return FALSE;
+ ShowWindow(m_hEdtQuery, SW_SHOW);
+
+ m_hBtnSearch = CreateWindow(_T("button"), L"Search",
+ WS_CHILD | BS_PUSHBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_BTN_SEARCH), SRApp::GetInstanceHandle(), NULL);
+ if(!m_hBtnSearch)
+ return FALSE;
+ ShowWindow(m_hBtnSearch, SW_SHOW);
+
+ // Radio Buttons
+ m_hRadRangeBible = CreateWindow(_T("button"), L"Whole bible",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_RAD_BIBLE), SRApp::GetInstanceHandle(), NULL);
+ if(!m_hRadRangeBible)
+ return FALSE;
+ ::SendMessage(m_hRadRangeBible,BM_SETCHECK,BST_CHECKED,0);
+ m_wRangeMode = SR_FIND_RANGE_BIBLE;
+ ShowWindow(m_hRadRangeBible, SW_SHOW);
+
+ m_hRadRangeTestament = CreateWindow(_T("button"), L"This testament",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_RAD_TESTAMENT), SRApp::GetInstanceHandle(), NULL);
+ if(!m_hRadRangeTestament)
+ return FALSE;
+ ShowWindow(m_hRadRangeTestament, SW_SHOW);
+
+ m_hRadRangeBook = CreateWindow(_T("button"), L"This book",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_RAD_BOOK), SRApp::GetInstanceHandle(), NULL);
+ if(!m_hRadRangeBook)
+ return FALSE;
+ ShowWindow(m_hRadRangeBook, SW_SHOW);
+
+ m_hRadMethodMultiword = CreateWindow(_T("button"), L"Multi-word",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_RAD_MWORD), SRApp::GetInstanceHandle(), NULL);
+ if(!m_hRadMethodMultiword)
+ return FALSE;
+ ::SendMessage(m_hRadMethodMultiword,BM_SETCHECK,BST_CHECKED,0);
+ m_wMethodMode = SR_FIND_METHOD_MWORD;
+ ShowWindow(m_hRadMethodMultiword, SW_SHOW);
+
+ m_hRadMethodExactphrase = CreateWindow(_T("button"), L"Exact phrase",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_RAD_EPHRASE),SRApp::GetInstanceHandle(), NULL);
+ if(!m_hRadMethodExactphrase)
+ return FALSE;
+ ShowWindow(m_hRadMethodExactphrase, SW_SHOW);
+
+
+ m_hLstResults = CreateWindow(_T("listbox"),NULL,
+ WS_CHILD | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_NOTIFY | WS_BORDER | LBS_NOINTEGRALHEIGHT,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_LST_RESULTS), SRApp::GetInstanceHandle(), NULL); //bottom row of screen
+ if(!m_hLstResults)
+ return FALSE;
+ ShowWindow(m_hLstResults, SW_SHOW);
+
+ m_hProgressBar = CreateWindow(PROGRESS_CLASS, L"",
+ WS_CHILD | WS_BORDER | PBS_SMOOTH,
+ 0,0,0,0,
+ hWnd, NULL, SRApp::GetInstanceHandle(), NULL);
+ if(!m_hProgressBar)
+ return FALSE;
+ ShowWindow(m_hProgressBar, SW_SHOW);
+
+ m_hBtnGoTo = CreateWindow(_T("button"), L"Go to",
+ WS_CHILD | BS_PUSHBUTTON,
+ 0,0,0,0,
+ hWnd, (HMENU)(IDC_BTN_GOTO), SRApp::GetInstanceHandle(), NULL);
+ if(!m_hBtnGoTo)
+ return FALSE;
+ ShowWindow(m_hBtnGoTo, SW_SHOW);
+
+ m_textPreview = new SRTextView();
+
+ RECT tmpRect = {0,0,0,0};
+ WCString wcsPreview = "preview";
+ if(!m_textPreview || !m_textPreview->Create(this, tmpRect))
+ return FALSE;
+ m_textPreview->AddText(wcsPreview.w_str(), wcsPreview.length());
+ m_textPreview->Show();
+
+ PlaceWidgets();
+ return TRUE;
+}
+
+VOID SRFind::PlaceWidgets()
+{
+ int width = m_rect.right - m_rect.left;
+ int height = m_rect.bottom - m_rect.top;
+ int searchBtnW = 60;
+ int pad = 2;
+ int btnH = 24;
+ int margin = 2;
+ int row0 = margin;
+ int row1 = row0 + pad + btnH;
+ int row2 = row1 + pad + btnH;
+ int row3 = row2 + pad + btnH;
+ int row4 = row3 + pad + btnH;
+ int row5 = row4 + pad + btnH;
+ int col0 = margin;
+ int textW = (width - (2*margin + pad))/2;
+ int col1 = margin + textW + pad;
+ int gotoBtnW = 60;
+ int queryW = width - (margin + searchBtnW + pad + margin);
+ int listH = height - (row4 + margin);
+ int listW = 80;
+ int prevH = height - (row5 + margin);
+ int prevW = width - (margin + listW + pad + margin);
+ int progW = width - (margin + listW + pad + pad + gotoBtnW + margin);
+
+ ::MoveWindow(m_hEdtQuery,col0, row0, queryW, btnH,TRUE);
+ ::MoveWindow(m_hBtnSearch,col0 + queryW + pad, row0, searchBtnW, btnH,TRUE);
+ ::MoveWindow(m_hRadRangeBible,col0,row1,textW,btnH,TRUE);
+ ::MoveWindow(m_hRadRangeTestament,col0,row2,textW,btnH,TRUE);
+ ::MoveWindow(m_hRadRangeBook,col0,row3,textW,btnH,TRUE);
+ ::MoveWindow(m_hRadMethodMultiword,col1,row1,textW,btnH,TRUE);
+ ::MoveWindow(m_hRadMethodExactphrase,col1,row2,textW,btnH,TRUE);
+ ::MoveWindow(m_hLstResults,margin,row4,listW,listH,TRUE);
+ ::MoveWindow(m_hProgressBar,col0 + listW + pad,row4,progW,btnH,TRUE);
+ ::MoveWindow(m_hBtnGoTo,col0 + listW + pad + progW + pad,row4, gotoBtnW,btnH,TRUE);
+ m_textPreview->MoveWindow(margin + listW + pad,row5,prevW,prevH);
+}
+
+BOOL SRFind::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 SRFind::Create(SRFramework::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;
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/SRFind.h
===================================================================
--- trunk/src/SwordReader_GUI/SRFind.h (rev 0)
+++ trunk/src/SwordReader_GUI/SRFind.h 2008-05-21 02:45:35 UTC (rev 133)
@@ -0,0 +1,55 @@
+#ifndef _SRFIND_H_
+#define _SRFIND_H_
+#include "SRFramework/SRWnd.h"
+#include "SRTextView.h"
+
+
+#define IDC_WIDGET_BASE 0x0400
+#define IDC_EDT_QUERY IDC_WIDGET_BASE + 1
+#define IDC_BTN_SEARCH IDC_WIDGET_BASE + 2
+#define IDC_RAD_BIBLE IDC_WIDGET_BASE + 3
+#define IDC_RAD_TESTAMENT IDC_WIDGET_BASE + 4
+#define IDC_RAD_BOOK IDC_WIDGET_BASE + 5
+#define IDC_RAD_MWORD IDC_WIDGET_BASE + 6
+#define IDC_RAD_EPHRASE IDC_WIDGET_BASE + 7
+#define IDC_LST_RESULTS IDC_WIDGET_BASE + 8
+#define IDC_BTN_GOTO IDC_WIDGET_BASE + 9
+
+#define SR_FIND_RANGE_BIBLE 0x0002
+#define SR_FIND_RANGE_TESTAMENT 0x0008
+#define SR_FIND_RANGE_BOOK 0x0010
+
+#define SR_FIND_METHOD_EPHRASE 0x0100
+#define SR_FIND_METHOD_MWORD 0x0200
+
+class SRFind :
+ public SRFramework::SRWnd
+{
+public:
+ SRFind();
+ ~SRFind();
+ BOOL Register();
+ BOOL Create(SRWnd *pParentWnd, RECT bounds);
+ BOOL OnPaint();
+ LRESULT OnCreate(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
+ VOID PlaceWidgets();
+ BOOL OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl);
+private:
+ static BOOL s_fRegistered;
+ HWND m_hEdtQuery;
+ HWND m_hBtnSearch;
+ HWND m_hRadRangeBible;
+ HWND m_hRadRangeTestament;
+ HWND m_hRadRangeBook;
+ HWND m_hRadMethodMultiword;
+ HWND m_hRadMethodExactphrase;
+ HWND m_hLstResults;
+ HWND m_hProgressBar;
+ HWND m_hBtnGoTo;
+ SRTextView *m_textPreview;
+ WORD m_wRangeMode;
+ WORD m_wMethodMode;
+
+};
+
+#endif // _SRFIND_H_
\ No newline at end of file
Modified: trunk/src/SwordReader_GUI/SRMainFrame.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRMainFrame.cpp 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SRMainFrame.cpp 2008-05-21 02:45:35 UTC (rev 133)
@@ -41,6 +41,7 @@
,m_viewChapter(NULL)
,m_viewVerse(NULL)
,m_viewBook(NULL)
+,m_viewFind(NULL)
{
// Create a general options file for storing options
// and navigaiton history
@@ -63,6 +64,16 @@
delete m_swmgr;
if(m_bufModOptions)
delete [] m_bufModOptions;
+ if(m_viewBook)
+ delete m_viewBook;
+ if(m_viewChapter)
+ delete m_viewChapter;
+ if(m_viewVerse)
+ delete m_viewVerse;
+ if(m_viewFind)
+ delete m_viewFind;
+ if(m_viewText)
+ delete m_viewText;
}
BOOL SRMainFrame::Register()
@@ -112,12 +123,6 @@
InitSword();
view_rect.bottom -= m_menuBar->Height();
-
- m_viewText = new SRTextView();
- if(!m_viewText->Create(this, view_rect))
- return FALSE;
- m_viewText->Show();
- LoadTextView();
m_viewBook = new SRBookChooser(s_wcsBookNames,MENU_CHAP);
if(!m_viewBook->Create(this, view_rect))
@@ -131,10 +136,22 @@
if(!m_viewChapter->Create(this, view_rect))
return FALSE;
+ m_viewFind = new SRFind();
+ if(!m_viewFind->Create(this, view_rect))
+ return FALSE;
+
+ m_viewText = new SRTextView();
+ if(!m_viewText->Create(this, view_rect))
+ return FALSE;
m_viewText->Show();
+ LoadTextView();
+
m_viewBook->Hide();
m_viewChapter->Hide();
m_viewVerse->Hide();
+ m_viewFind->Hide();
+ m_viewText->Show();
+
return TRUE;
}
@@ -325,13 +342,15 @@
m_viewBook->Hide();
m_viewChapter->Hide();
m_viewVerse->Hide();
- LoadTextView();
+ m_viewFind->Hide();
+ //LoadTextView();
break;
case MENU_BOOK:
m_viewBook->Show();
m_viewChapter->Hide();
m_viewVerse->Hide();
m_viewText->Hide();
+ m_viewFind->Hide();
break;
case MENU_CHAP:
m_viewChapter->SetEndNumber(GetMaxChapters());
@@ -339,6 +358,7 @@
m_viewBook->Hide();
m_viewText->Hide();
m_viewVerse->Hide();
+ m_viewFind->Hide();
break;
case MENU_VERSE:
m_viewVerse->SetEndNumber(GetMaxVerses());
@@ -346,7 +366,15 @@
m_viewBook->Hide();
m_viewChapter->Hide();
m_viewText->Hide();
+ m_viewFind->Hide();
break;
+ case MENU_FIND:
+ m_viewFind->Show();
+ m_viewVerse->Hide();
+ m_viewBook->Hide();
+ m_viewChapter->Hide();
+ m_viewText->Hide();
+ break;
case SR_SETBOOK:
if(newValue > BIBLE_OT_BOOKS){
m_keyCurVerse->Testament(SWORD_NEW_TESTAMENT);
@@ -362,6 +390,8 @@
break;
case SR_SETVERSE:
m_keyCurVerse->Verse(newValue);
+ if(wNotifyCode == SR_MSRC_CHOOSER)
+ m_viewText->ScrollToVerse(m_keyCurVerse->Verse());
UpdateWindowTitle();
break;
default:
Modified: trunk/src/SwordReader_GUI/SRMainFrame.h
===================================================================
--- trunk/src/SwordReader_GUI/SRMainFrame.h 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SRMainFrame.h 2008-05-21 02:45:35 UTC (rev 133)
@@ -12,7 +12,9 @@
#include "SRMenuBar.h"
#include "SRNumberChooser.h"
#include "SRBookChooser.h"
+#include "SRFind.h"
+
using namespace SRFramework;
using namespace sword;
@@ -59,6 +61,7 @@
SRNumberChooser *m_viewVerse;
SRNumberChooser *m_viewChapter;
SRBookChooser *m_viewBook;
+ SRFind *m_viewFind;
static WCString s_wcsBookNames[BIBLE_TOTAL_BOOKS];
static BOOL s_fRegistered;
};
Modified: trunk/src/SwordReader_GUI/SRNumberChooser.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRNumberChooser.cpp 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SRNumberChooser.cpp 2008-05-21 02:45:35 UTC (rev 133)
@@ -221,7 +221,7 @@
}else if(found != 0 && found != -1){
m_nSelectedNumber = found;
// We also send the value found, thus when this messge is recv'd the new value can be processed.
- ::SendMessage(m_pParentWnd->GetWindowHandle(),WM_COMMAND,m_type == CHAPTER ? SR_SETCHAPTER : SR_SETVERSE, found);
+ ::SendMessage(m_pParentWnd->GetWindowHandle(),WM_COMMAND,(SR_MSRC_CHOOSER << 16) | (m_type == CHAPTER ? SR_SETCHAPTER : SR_SETVERSE), found);
::SendMessage(m_pParentWnd->GetWindowHandle(),WM_COMMAND,m_wNextMenuID, found);
}
return TRUE;
Modified: trunk/src/SwordReader_GUI/SRTextView.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRTextView.cpp 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SRTextView.cpp 2008-05-21 02:45:35 UTC (rev 133)
@@ -849,7 +849,7 @@
VOID SRTextView::SendVerseChangedMessage()
{
- ::SendMessage(m_pParentWnd->GetWindowHandle(),WM_COMMAND, SR_SETVERSE, GetVerseNum());
+ ::SendMessage(m_pParentWnd->GetWindowHandle(),WM_COMMAND, (SR_MSRC_TEXT << 16) | SR_SETVERSE, GetVerseNum());
}
VOID SRTextView::ScrollFullPage(INT nDirection)
@@ -887,7 +887,7 @@
SendVerseChangedMessage();
}
-VOID SRTextView::ScrollToPosition(INT yPos)
+VOID SRTextView::ScrollToPosition(INT yPos, BOOL fSendMessage)
{
POINT pt;
RECT rectUpdateRect;
@@ -903,12 +903,13 @@
InvalidateRect(m_hWnd, &rectUpdateRect, TRUE);
::UpdateWindow(m_hWnd);
}
- SendVerseChangedMessage();
+ if(fSendMessage)
+ SendVerseChangedMessage();
}
VOID SRTextView::ScrollToVerse(WORD wVerseNum)
{
- ScrollToPosition(m_BTLines.GetVersePosition(wVerseNum));
+ ScrollToPosition(m_BTLines.GetVersePosition(wVerseNum), FALSE);
}
Modified: trunk/src/SwordReader_GUI/SRTextView.h
===================================================================
--- trunk/src/SwordReader_GUI/SRTextView.h 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SRTextView.h 2008-05-21 02:45:35 UTC (rev 133)
@@ -438,8 +438,12 @@
VOID ScrollFullPage(INT nDirection);
//! Scrolls the window to a given y position.
/*! @param yPos the y position to scroll to.
+ @param fSendMessage if set will send message to update verse.
+ @note The second parameter was added to supress sending the message in
+ cases where we asked to scroll to a certain verse in the first
+ place. i.e. ScrollToVerse
*/
- VOID ScrollToPosition(INT yPos);
+ VOID ScrollToPosition(INT yPos, BOOL fSendMessage);
//! Scrolls the window to a specific verse.
/*! @param wVerseNum the verse to scroll to.
*/
Modified: trunk/src/SwordReader_GUI/SwordReaderResource.h
===================================================================
--- trunk/src/SwordReader_GUI/SwordReaderResource.h 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SwordReaderResource.h 2008-05-21 02:45:35 UTC (rev 133)
@@ -40,6 +40,7 @@
#define MENU_TRANS_START 0x1000
#define MENU_OPTS_START 0x2000
+
#define WM_TXT_START WM_USER + 0x00F1
#define WM_TXT_END WM_USER + 0x00F2
@@ -47,6 +48,11 @@
#define SR_SETCHAPTER 0x00FC
#define SR_SETVERSE 0x00FD
+// These help determine the source of the
+// SR_SETVERSE OnCommand Message
+#define SR_MSRC_CHOOSER 0x8000
+#define SR_MSRC_TEXT 0x4000
+
#define BUTTON_BACKGROUND 0x00b9ccd5
#define BUTTON_WIDTH_BOOK 26
#define BUTTON_WIDTH_NUMBER 20
Modified: trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
===================================================================
--- trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj 2008-05-20 22:40:17 UTC (rev 132)
+++ trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj 2008-05-21 02:45:35 UTC (rev 133)
@@ -646,6 +646,10 @@
>
</File>
<File
+ RelativePath=".\SRFind.cpp"
+ >
+ </File>
+ <File
RelativePath=".\SRMainFrame.cpp"
>
</File>
@@ -711,6 +715,10 @@
>
</File>
<File
+ RelativePath=".\SRFind.h"
+ >
+ </File>
+ <File
RelativePath=".\SRMainFrame.h"
>
</File>
More information about the sword-cvs
mailing list