[sword-svn] r105 - in trunk/src: . SwordReader_GUI
dtrotzjr at www.crosswire.org
dtrotzjr at www.crosswire.org
Tue Mar 25 21:18:45 MST 2008
Author: dtrotzjr
Date: 2008-03-25 21:18:44 -0700 (Tue, 25 Mar 2008)
New Revision: 105
Added:
trunk/src/SwordReader_GUI/
trunk/src/SwordReader_GUI/ApplicationInterface.cpp
trunk/src/SwordReader_GUI/ApplicationInterface.h
trunk/src/SwordReader_GUI/BTextViewer.cpp
trunk/src/SwordReader_GUI/BTextViewer.h
trunk/src/SwordReader_GUI/BibleReader.ICO
trunk/src/SwordReader_GUI/Main.cpp
trunk/src/SwordReader_GUI/Main.h
trunk/src/SwordReader_GUI/NavBooks.cpp
trunk/src/SwordReader_GUI/NavBooks.h
trunk/src/SwordReader_GUI/NavChap.cpp
trunk/src/SwordReader_GUI/NavChap.h
trunk/src/SwordReader_GUI/NavFind.cpp
trunk/src/SwordReader_GUI/NavFind.h
trunk/src/SwordReader_GUI/NavNumbers.cpp
trunk/src/SwordReader_GUI/NavNumbers.h
trunk/src/SwordReader_GUI/NavPage.h
trunk/src/SwordReader_GUI/NavRenderText.cpp
trunk/src/SwordReader_GUI/NavRenderText.h
trunk/src/SwordReader_GUI/NavVerse.cpp
trunk/src/SwordReader_GUI/NavVerse.h
trunk/src/SwordReader_GUI/Navigator.cpp
trunk/src/SwordReader_GUI/Navigator.h
trunk/src/SwordReader_GUI/SRWidget.cpp
trunk/src/SwordReader_GUI/SRWidget.h
trunk/src/SwordReader_GUI/SimpleNavigator.cpp
trunk/src/SwordReader_GUI/SimpleNavigator.h
trunk/src/SwordReader_GUI/SwordIndex.cpp
trunk/src/SwordReader_GUI/SwordIndex.h
trunk/src/SwordReader_GUI/SwordReaderApp.cpp
trunk/src/SwordReader_GUI/SwordReaderApp.h
trunk/src/SwordReader_GUI/SwordReader_GUI.rc
trunk/src/SwordReader_GUI/SwordReader_GUI.vcp
trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
trunk/src/SwordReader_GUI/TextControl.cpp
trunk/src/SwordReader_GUI/TextControl.h
trunk/src/SwordReader_GUI/Utils.cpp
trunk/src/SwordReader_GUI/Utils.h
trunk/src/SwordReader_GUI/VerseTextControl.cpp
trunk/src/SwordReader_GUI/VerseTextControl.h
trunk/src/SwordReader_GUI/WCString.cpp
trunk/src/SwordReader_GUI/WCString.h
trunk/src/SwordReader_GUI/newres.h
trunk/src/SwordReader_GUI/resource.h
Removed:
trunk/src/gui/
trunk/src/simplegui/
Modified:
trunk/src/SwRd.sln
trunk/src/SwRd.vcw
Log:
removed project 'gui' and renamed 'simplegui' to SwordReader_GUI. - Does not build...
Modified: trunk/src/SwRd.sln
===================================================================
--- trunk/src/SwRd.sln 2008-03-26 03:40:36 UTC (rev 104)
+++ trunk/src/SwRd.sln 2008-03-26 04:18:44 UTC (rev 105)
@@ -7,7 +7,7 @@
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplegui", "simplegui\simplegui.vcproj", "{697017EE-0728-4DD1-AFBB-ABDA11CE86D5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SwordReader_GUI", "SwordReader_GUI\SwordReader_GUI.vcproj", "{697017EE-0728-4DD1-AFBB-ABDA11CE86D5}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
Modified: trunk/src/SwRd.vcw
===================================================================
--- trunk/src/SwRd.vcw 2008-03-26 03:40:36 UTC (rev 104)
+++ trunk/src/SwRd.vcw 2008-03-26 04:18:44 UTC (rev 105)
@@ -1,53 +1,44 @@
-Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Dll1"=.\Dll1\Dll1.vcp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "gui"=.\gui\gui.vcp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "simplegui"=.\simplegui\simplegui.vcp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Dll1"=.\Dll1\Dll1.vcp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+###############################################################################
+
+Project: "SwordReader_GUI"=.\SwordReader_GUI\SwordReader_GUI
+.vcp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Added: trunk/src/SwordReader_GUI/ApplicationInterface.cpp
===================================================================
--- trunk/src/SwordReader_GUI/ApplicationInterface.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/ApplicationInterface.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,38 @@
+#include "ApplicationInterface.h"
+#include <commctrl.h>
+#include <aygshell.h>
+#include <sipapi.h>
+
+#include "resource.h"
+
+HINSTANCE g_hInst; // The current instance
+HWND g_hWnd; // The main window
+DWORD g_tMain; // The main thread id.
+HWND g_hwndCB; // The command bar handle
+HDC hdc; // Only valid when painting
+HBRUSH background;
+HFONT navFont; // For navigation
+HFONT textFont; // For navigation
+int font; // Current font id
+HFONT defaultFont;
+
+void initApplicationInterface() {
+ font=FONT_DEFAULT;
+ LOGFONT fontSpecs;
+ memset(&fontSpecs,0,sizeof(fontSpecs));
+ fontSpecs.lfHeight=-10;
+ fontSpecs.lfWeight=200;
+ fontSpecs.lfPitchAndFamily=FF_SWISS;
+ fontSpecs.lfQuality=5;
+ navFont=CreateFontIndirect(&fontSpecs);
+
+ fontSpecs.lfHeight=-12;
+ textFont=CreateFontIndirect(&fontSpecs);
+
+ background=(HBRUSH) GetStockObject(WHITE_BRUSH);
+}
+
+void closeApplicationInterface() {
+ DeleteObject(textFont);
+ DeleteObject(navFont);
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/ApplicationInterface.h
===================================================================
--- trunk/src/SwordReader_GUI/ApplicationInterface.h (rev 0)
+++ trunk/src/SwordReader_GUI/ApplicationInterface.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,107 @@
+#ifndef APPLICATIONINTERFACE_H
+#define APPLICATIONINTERFACE_H
+// This file contains a wrapper for the windows CE functions that are needed for the gui
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <aygshell.h>
+#include <htmlctrl.h>
+
+#include "utils.h"
+#include "WCString.h"
+#include "swordce.h"
+#include "../simplegui/resource.h"
+
+
+#define setMenuSelected(hWndMB, idButton, checked) SendMessage((hWndMB), TB_CHECKBUTTON,\
+ (WPARAM)idButton, (LPARAM)MAKELONG(checked,0));
+#define getMenu(hWndMB) (HMENU)SendMessage((hWndMB), SHCMBM_GETMENU, (WPARAM)0, (LPARAM)0);
+#define getSubMenu(hWndMB,ID_MENU) (HMENU)SendMessage((hWndMB), SHCMBM_GETSUBMENU, (WPARAM)0, (LPARAM)ID_MENU);
+#define setSubMenu(hWndMB,ID_MENU) (HMENU)SendMessage((hWndMB), SHCMBM_SETSUBMENU, (WPARAM)0, (LPARAM)ID_MENU);
+#define registerID(id) (HMENU)(USERBUTTONS+id)
+
+#define WM_TXT_START WM_USER + 0x00F1
+#define WM_TXT_END WM_USER + 0x00F2
+
+#define MENU_HEIGHT 26
+#define MAX_LOADSTRING 100
+
+#define FONT_DEFAULT 0
+#define FONT_NAVIGATION 1
+#define FONT_TEXT 2
+
+#define NOCOLOR 0xFFFFFFFF
+
+#define BUTTON_WIDTH_BK 26
+#define BUTTON_WIDTH_NM 20
+#define BUTTON_HEIGHT 17
+
+#define PADDING_WIDTH 3
+#define PADDING_HEIGHT 3
+/*
+void initApplicationInterface();
+
+void closeApplicationInterface();
+
+// load string from string table
+void loadString(UINT id, LPTSTR buffer);
+WCString loadString(UINT id);
+
+// sets the main title
+void setTitle(const WCString &title);
+
+// Refreshes the whole application screen
+void refreshScreen();
+
+// Draws the text inside the rectangle
+inline void drawText(RECT* rt, const TCHAR* text, int length) {
+ ExtTextOut(hdc, rt->left+2, rt->top+2, ETO_CLIPPED|ETO_OPAQUE,
+ rt, text, length, 0);
+}
+
+void drawText(RECT* rt,const WCString &text);
+
+// Draws the text right-aligned inside the rectangle
+inline void drawRText(RECT* rt, const TCHAR* text, int length) {
+ SIZE textSize;
+ GetTextExtentPoint(hdc,text,length,&textSize);
+ ExtTextOut(hdc, rt->right-2-textSize.cx, rt->top+2, ETO_CLIPPED|ETO_OPAQUE,
+ rt, text, length, 0);
+}
+
+void drawRText(RECT* rt,const WCString &text);
+
+int drawVerseText(RECT* rt,const WCString &text);
+
+// fill the rectangle with the original background color
+inline void clearRect(RECT* rt) {
+ FillRect(hdc, rt, background);
+}
+
+// set the font
+void setFont(int id=FONT_DEFAULT);
+
+// set the background color
+inline void setBackground(COLORREF color=NOCOLOR) {
+ if (color==NOCOLOR)
+ SetBkColor(hdc,(COLORREF)GetSysColor(COLOR_WINDOW));
+ else
+ SetBkColor(hdc,color);
+}
+
+void selectMenu(std::map<int,int>& menus, int mode);
+//void selectMenu(int mode);
+
+void addMenu(HMENU menu, int flags, int id,const WCString& text);
+
+void checkMenu(HMENU menu, int id, bool checked);
+
+// Get an id to give to the CreateWindow as hMenu
+HMENU registerID(int id);
+
+WCString getText(HWND edit);
+
+*/
+#endif
Added: trunk/src/SwordReader_GUI/BTextViewer.cpp
===================================================================
--- trunk/src/SwordReader_GUI/BTextViewer.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/BTextViewer.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,1189 @@
+/******************************************************************************
+ * BTextViewer.cpp - HTML Renderer for rendering biblical texts on Pocket PC
+ * devices.
+ * Author: David C Trotz Jr.
+ * e-mail: dtrotzjr at crosswire.org
+ *
+ * $Id$
+ *
+ * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
+ * CrossWire Bible Society
+ * P. O. Box 2528
+ * Tempe, AZ 85280-2528
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ */
+#include <Winuser.h>
+#include "stdafx.h"
+#include "BTextViewer.h"
+
+
+VOID LOGTAG(const char *tag)
+{
+#if 0
+ FILE *fp = fopen("\\Storage Card\\tags.txt", "a");
+ fprintf(fp, "%s\n", tag);
+ fclose(fp);
+#endif
+}
+
+BTextViewer::BTextViewer(HINSTANCE hInstance, HWND hWndParent, RECT lRect)
+: m_fDragging(FALSE)
+, m_nTop(0)
+, m_nDragStart(0)
+, m_dwBuffSize(BTEXT_BUFF_INC)
+, m_dwBuffEnd(0)
+, m_fPreRendered(FALSE)
+, m_nRollVelocity(FALSE)
+, m_dwTrueStartPos(0)
+, m_dwTrueStartTime(0)
+, m_hCurFont(NULL)
+{
+ TCHAR szWindowClass[] = L"BTextViewer";
+ m_ptLastClick.x = 0; m_ptLastClick.y = 0;
+
+ // Init the current font
+ HFONT hSystemVariableFont = (HFONT ) GetStockObject(SYSTEM_FONT);
+ GetObject(hSystemVariableFont, sizeof(LOGFONT), &m_lfCurFont);
+ m_lfCurFont.lfHeight = -11;
+ m_lfCurFont.lfQuality = CLEARTYPE_QUALITY;
+ lstrcpy(m_lfCurFont.lfFaceName, _T("Veranda"));
+
+ m_lpszBuff = new TCHAR[m_dwBuffSize];
+
+ // Register window class...
+ WNDCLASS wc;
+ wc.style = CS_HREDRAW | CS_VREDRAW | CS_PARENTDC;
+ wc.lpfnWndProc = (WNDPROC) BTextViewer::MessageRoute;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = hInstance;
+ wc.hIcon = NULL;
+ wc.hCursor = 0;
+ wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
+ wc.lpszMenuName = 0;
+ wc.lpszClassName = szWindowClass;
+
+ RegisterClass(&wc);
+ m_hWnd = CreateWindow(szWindowClass, NULL, WS_CHILD | WS_VISIBLE,
+ lRect.left, lRect.top, lRect.right - lRect.left, lRect.bottom - lRect.top, hWndParent, NULL, hInstance, this);
+ for(DWORD i = 0; i < BTEXT_FONT_CACHE_MAX; i++)
+ m_hFontCache[i] = 0;
+}
+
+BTextViewer::~BTextViewer()
+{
+ if(m_lpszBuff)
+ delete [] m_lpszBuff;
+
+ DestroyWindow(m_hWnd);
+}
+
+VOID BTextViewer::Show()
+{
+ ShowWindow(m_hWnd, SW_SHOW);
+ // FOR COMPARATIVE PERFORMANCE TESTING...
+ // REMOVE ONCE INTEGRATED
+ m_fPreRendered = FALSE;
+ InvalidateRect(m_hWnd, NULL, TRUE);
+ UpdateWindow(m_hWnd);
+}
+
+VOID BTextViewer::Hide()
+{
+ ShowWindow(m_hWnd, SW_HIDE);
+}
+
+/* Routes the messages to the appropiate WindowProcedure by unwrapping the lParam
+* we associated with this window upon creation.
+*/
+LRESULT CALLBACK BTextViewer::MessageRoute(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ BTextViewer* wnd = NULL;
+
+ if (message == WM_CREATE) {
+ ::SetWindowLong (hwnd, GWL_USERDATA, long((LPCREATESTRUCT(lParam))->lpCreateParams));
+ }
+
+ wnd = (BTextViewer*) (::GetWindowLong (hwnd, GWL_USERDATA));
+
+ if (wnd)
+ return wnd->WndProcBText(hwnd, message, wParam, lParam);
+ return ::DefWindowProc(hwnd, message, wParam, lParam);
+}
+
+LRESULT CALLBACK BTextViewer::WndProcBText(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ HDC hdc;
+ PAINTSTRUCT ps;
+
+ switch (message)
+ {
+ case WM_PAINT:
+ hdc = BeginPaint(hWnd, &ps);
+ this->Paint(hWnd,hdc,ps);
+ EndPaint(hWnd, &ps);
+ break;
+ case WM_LBUTTONDOWN:
+ this->SetTapState(TRUE, lParam);
+ break;
+ case WM_LBUTTONUP:
+ this->SetTapState(FALSE, lParam);
+ break;
+ case WM_MOUSEMOVE:
+ this->DragScreenToPoint(lParam);
+ break;
+ default:
+ return DefWindowProc(hWnd, message, wParam, lParam);
+ }
+ return 0;
+}
+VOID BTextViewer::MoveWindow(INT x, INT y, INT w, INT h)
+{
+ ::MoveWindow(m_hWnd, x, y, w, h, FALSE);
+}
+
+INT BTextViewer::GetHTMLTags(RenderState& rsState, DWORD &dwWordIndex)
+{
+ BOOL fDone = FALSE;
+ DWORD dwBegin;
+ DWORD dwEnd;
+ DWORD dwIdentifyResult;
+ INT nLineBreaks = 0;
+
+ while(!fDone){
+ GetSpaces(rsState, dwWordIndex);
+ dwBegin = dwWordIndex + 1;
+ if(m_lpszBuff[dwWordIndex] != 0 && m_lpszBuff[dwWordIndex] == '<'){
+ while(m_lpszBuff[dwWordIndex] != 0 && m_lpszBuff[dwWordIndex] != '>')
+ dwWordIndex++;
+ dwEnd = dwWordIndex - dwBegin;
+ dwIdentifyResult = IndentifyTag(rsState, dwBegin, dwEnd);
+ dwWordIndex++;
+ switch(dwIdentifyResult){
+ case BTEXT_HTML_B_BEG:
+ rsState.m_wBoldState++;
+ break;
+ case BTEXT_HTML_B_END:
+ if(rsState.m_wBoldState)
+ rsState.m_wBoldState--;
+ break;
+ case BTEXT_HTML_BR:
+ nLineBreaks++;
+ break;
+ case BTEXT_HTML_I_BEG:
+ rsState.m_wItalicState++;
+ break;
+ case BTEXT_HTML_I_END:
+ if(rsState.m_wItalicState)
+ rsState.m_wItalicState--;
+ break;
+ case BTEXT_HTML_A_BEG:
+ rsState.m_wAState++;
+ rsState.m_dwlWordNum++;
+ rsState.m_dwSubWordNum = 0;
+ break;
+ case BTEXT_HTML_A_END:
+ if(rsState.m_wAState)
+ rsState.m_wAState--;
+ rsState.m_dwlWordNum++;
+ rsState.m_dwSubWordNum = 0;
+ break;
+ case BTEXT_HTML_SUB_BEG:
+ rsState.m_wSubState++;
+ break;
+ case BTEXT_HTML_SUB_END:
+ if(rsState.m_wSubState)
+ rsState.m_wSubState--;
+ break;
+ case BTEXT_HTML_SUP_BEG:
+ rsState.m_wSuperState++;
+ break;
+ case BTEXT_HTML_SUP_END:
+ if(rsState.m_wSuperState)
+ rsState.m_wSuperState--;
+ break;
+ case BTEXT_HTML_P_BEG:
+ rsState.m_wParagraphState++;
+ nLineBreaks++;
+ break;
+ case BTEXT_HTML_P_END:
+ if(rsState.m_wParagraphState)
+ rsState.m_wParagraphState--;
+ nLineBreaks++;
+ break;
+ }
+ }else
+ fDone = TRUE;
+ }
+ return nLineBreaks;
+}
+
+DWORD BTextViewer::IndentifyTag(RenderState& rsState,DWORD dwWordIndex,DWORD dwWordEnd)
+{
+ DWORD dwMask = 0x00000000;
+ DWORD dwResult = 0x00000000;
+ DWORD dwLen = 0;
+ DWORD dwOrigIndex = dwWordIndex;
+ DWORD dwSubIndex = 0;
+
+ if(!dwWordEnd)
+ return BTEXT_HTML_ILLEGAL_TAG_FORMAT; // There is nothing to do here.
+
+ if((dwWordIndex - dwOrigIndex) >= dwWordEnd)
+ return BTEXT_HTML_ILLEGAL_TAG_FORMAT;
+
+ if(m_lpszBuff[dwWordIndex] == '/'){
+ dwMask = 0xFFFFFFFF;
+ dwWordIndex++;
+ }
+
+ if((dwWordIndex - dwOrigIndex) >= dwWordEnd)
+ return BTEXT_HTML_ILLEGAL_TAG_FORMAT;
+ // Get the token
+ while((dwWordIndex - dwOrigIndex) + dwLen < dwWordEnd && m_lpszBuff[dwWordIndex + dwLen] != ' '){
+ dwLen++;
+ }
+
+ // Determine the token
+ switch(dwLen){
+ case 0:
+ dwResult = BTEXT_HTML_ILLEGAL_TAG_FORMAT;
+ break;
+ case 1:
+ if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"a", 1) == 0){
+ dwSubIndex = dwWordIndex + 1;
+ while(m_lpszBuff[dwSubIndex] == ' ')
+ dwSubIndex++;
+ if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"name=\"", 6) == 0){
+ dwSubIndex += 6;
+ rsState.m_wVerseNum = (short)_wtoi(&m_lpszBuff[dwSubIndex]);
+ }else if(dwMask == 0){ // This is not an '/a'
+ while(m_lpszBuff[dwSubIndex] == ' ')
+ dwSubIndex++;
+ if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"href=\"", 6) == 0){
+ dwSubIndex += 6;
+ rsState.m_lpszHref = &m_lpszBuff[dwSubIndex];
+ rsState.m_dwHrefLen = 0;
+ while(m_lpszBuff[dwSubIndex++] != '\"')
+ rsState.m_dwHrefLen++;
+ }
+ dwResult = dwMask ^ BTEXT_HTML_A_BEG;
+ }else
+ dwResult = dwMask ^ BTEXT_HTML_A_BEG;
+
+ }else if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"b", 1) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_B_BEG;
+ }else if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"i", 1) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_I_BEG;
+ }else if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"p", 1) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_P_BEG;
+ }
+ break;
+ case 2:
+ if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"br", 2) == 0){
+ dwResult = BTEXT_HTML_BR;
+ }
+ break;
+ case 3:
+ if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"sup", 3) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_SUP_BEG;
+ }else if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"sub", 3) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_SUB_BEG;
+ }else if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"br/", 3) == 0){
+ dwResult = BTEXT_HTML_BR;
+ }
+ break;
+ case 4:
+ if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"font", 4) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_FONT_BEG;
+ if(!dwMask){
+ // Found a <font... element
+ if(!rsState.m_lpftFontTagTail){
+ rsState.m_lpftFontTagHead = new FontTagItem();
+ rsState.m_lpftFontTagTail = rsState.m_lpftFontTagHead;
+ }else{
+ rsState.m_lpftFontTagTail->m_lpftNext = new FontTagItem();
+ rsState.m_lpftFontTagTail = rsState.m_lpftFontTagTail->m_lpftNext;
+ }
+ dwSubIndex += dwWordIndex + 4;
+ while(m_lpszBuff[dwSubIndex] != '>'){
+ while(m_lpszBuff[dwSubIndex] == ' ')
+ dwSubIndex++;
+ if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"size=\"", 6) == 0){
+ dwSubIndex += 6;
+ rsState.m_lpftFontTagTail->m_siRelFontSize = (short)_wtoi(&m_lpszBuff[dwSubIndex]);
+ while(m_lpszBuff[dwSubIndex] != '\"')
+ dwSubIndex++;
+ dwSubIndex++;
+ }else if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"color=\"", 7) == 0){
+ dwSubIndex += 7;
+ if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"red\"", 4) == 0){
+ dwSubIndex += 4;
+ rsState.m_lpftFontTagTail->m_crFontColor = 0x000000FF;
+ }else if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"green\"", 6) == 0){
+ dwSubIndex += 6;
+ rsState.m_lpftFontTagTail->m_crFontColor = 0x0000FF00;
+ }else if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"blue\"", 5) == 0){
+ dwSubIndex += 5;
+ rsState.m_lpftFontTagTail->m_crFontColor = 0x00FF0000;
+ }else if(wcsnicmp(&m_lpszBuff[dwSubIndex], L"black\"", 6) == 0){
+ dwSubIndex += 6;
+ rsState.m_lpftFontTagTail->m_crFontColor = 0x00000000;
+ }
+ }
+ }
+ }else{
+ // Its a </font pop the last item off the linked list
+ // this has potential to be memory leak central...
+ if(rsState.m_lpftFontTagTail){
+ if(rsState.m_lpftFontTagHead == rsState.m_lpftFontTagTail){
+ delete rsState.m_lpftFontTagHead;
+ rsState.m_lpftFontTagHead = NULL;
+ rsState.m_lpftFontTagTail = NULL;
+ }else{
+ FontTagItem *next = rsState.m_lpftFontTagHead;
+ FontTagItem *prev = next;
+
+ while(next != rsState.m_lpftFontTagTail){
+ prev = next;
+ next = prev->m_lpftNext;
+ }
+ delete next;
+ rsState.m_lpftFontTagTail = prev;
+ }
+ }
+ }
+ }
+ break;
+ case 5:
+ if(wcsnicmp(&m_lpszBuff[dwWordIndex], L"small", 5) == 0){
+ dwResult = dwMask ^ BTEXT_HTML_SMALL_BEG;
+ }
+ break;
+ default:
+ dwResult = 0;
+ }
+
+ return dwResult;
+}
+
+
+INT BTextViewer::NextWord(RenderState& rsState,DWORD dwWordIndex, DWORD &dwWordEnd)
+{
+ dwWordEnd = 0;
+ // Special Entities are:
+ // > < &
+ // and others (later)
+ rsState.m_wTotalSpclEnt = 0;
+
+ while(m_lpszBuff[dwWordIndex + dwWordEnd] != 0 && m_lpszBuff[dwWordIndex + dwWordEnd] != ' ' && m_lpszBuff[dwWordIndex + dwWordEnd] != '\n' && m_lpszBuff[dwWordIndex + dwWordEnd] != '<'){
+ if(m_lpszBuff[dwWordIndex + dwWordEnd] == '&'){
+ dwWordEnd++;
+ while(m_lpszBuff[dwWordIndex + dwWordEnd] != ';'){
+ dwWordEnd++;
+ rsState.m_wTotalSpclEnt++;
+ }
+ }
+ dwWordEnd++;
+ }
+ if(m_lpszBuff[dwWordIndex + dwWordEnd] == '\n')
+ return BTEXT_NEWLINE_ENCOUNTERED;
+ else if(m_lpszBuff[dwWordIndex + dwWordEnd] == '<')
+ return BTEXT_HTML_OPEN_BRACKET;
+
+ return BTEXT_SPACE_ENCOUNTERED;
+}
+VOID BTextViewer::Clear()
+{
+ m_BTLines.ClearLines();
+ m_BTLines.InitLines(0);
+ if(m_lpszBuff)
+ delete [] m_lpszBuff;
+ m_lpszBuff = NULL;
+ m_dwBuffEnd = 0;
+ m_dwBuffSize = 0;
+ m_nTop = 0;
+ m_fPreRendered = FALSE;
+}
+VOID BTextViewer::PreRenderBuff(HDC hdc)
+{
+ BTextWord thisWord;
+ RenderState rsState;
+ memset(&rsState, 0, sizeof(rsState));
+ RECT rectDims;
+ INT nLineX = BTEXT_MARGIN;
+ INT nLineY = BTEXT_MARGIN;
+ DWORD dwLineNum = 0;
+ rectDims.top = 0;
+ rectDims.left = 0;
+ rectDims.right = 0;
+ rectDims.bottom = 0;
+ INT nLineH = (INT)(BTEXT_LINE_SPACING*(FLOAT)DrawText(hdc, L" ", 1, &rectDims, DT_CALCRECT | DT_LEFT | DT_BOTTOM | DT_SINGLELINE));
+ DWORD dwWordIndex = 0;
+ DWORD dwWordEnd = 0;
+ INT nSpaceWidth = rectDims.right - rectDims.left;
+ INT nScreenWidth= GetSystemMetrics(SM_CXSCREEN) - BTEXT_MARGIN;
+ DWORD dwResult = 0;
+ INT nAddLines = 0;
+ DWORDLONG dwlFontState= 0;
+ DWORDLONG dwlFontColor;
+ DWORDLONG dwlFontHeight;
+
+ m_BTLines.ClearLines();
+ m_BTLines.InitLines(nLineH);
+
+ while(TRUE){
+ thisWord.Clear();
+ rsState.m_space_encountered = FALSE;
+
+ GetSpaces(rsState, dwWordIndex);
+ nAddLines = GetHTMLTags(rsState, dwWordIndex);
+ if(nAddLines){
+ dwLineNum += nAddLines;
+ nLineX = BTEXT_MARGIN;
+ nLineY += nAddLines * nLineH;
+ rsState.m_space_encountered = FALSE;
+ }
+ GetSpaces(rsState, dwWordIndex);
+ if(rsState.m_space_encountered){
+ nLineX += nSpaceWidth;
+ rsState.m_space_encountered = FALSE;
+ rsState.m_dwlWordNum++;
+ rsState.m_dwSubWordNum = 0;
+ }else
+ rsState.m_dwSubWordNum++;
+
+ dwResult = NextWord(rsState, dwWordIndex, dwWordEnd);
+ if(dwWordEnd == 0){
+ break;
+ }
+ rectDims.left = nLineX;
+
+ // Font...
+ FontTagItem *tag = rsState.m_lpftFontTagHead;
+ dwlFontColor = BTEXT_DEFAULT_FONT_COLOR;
+ dwlFontHeight = abs(BTEXT_DEFAULT_FONT_HEIGHT);
+ while(tag){
+ if(tag->m_crFontColor != BTEXT_FONT_NOT_A_COLOR)
+ dwlFontColor = tag->m_crFontColor;
+ dwlFontHeight += tag->m_siRelFontSize;
+ tag = tag->m_lpftNext;
+ }
+ if(rsState.m_wSubState || rsState.m_wSuperState)
+ dwlFontHeight -= 3;
+
+ dwlFontState =
+ ((DWORDLONG)(dwlFontColor << 40) & 0xFFFFFF0000000000) |
+ ((DWORDLONG)(dwlFontHeight << 32) & 0x000000FF00000000) |
+ (rsState.m_wAState > 0 ? BTEXT_HTML_A_BEG : 0) |
+ (rsState.m_wBoldState > 0 ? BTEXT_HTML_B_BEG : 0) |
+ (rsState.m_wItalicState > 0 ? BTEXT_HTML_I_BEG : 0);
+ SetFont(hdc, dwlFontState);
+
+ rectDims.top = nLineY;
+ // Set the properties for this word.
+ thisWord.m_rect = rectDims;
+ thisWord.m_dwlfFontState = dwlFontState;
+ thisWord.m_lpszHref = rsState.m_lpszHref;
+ thisWord.m_dwHrefLen = rsState.m_dwHrefLen;
+ thisWord.m_dwlWordNum = rsState.m_dwlWordNum;
+ thisWord.m_dwSubWordNum = rsState.m_dwSubWordNum;
+ // Determine if we encountered any special entities...
+ if(rsState.m_wTotalSpclEnt > 0){
+ InterpretSpecialEntities(dwWordIndex, dwWordEnd, &thisWord);
+ }else{
+ thisWord.m_fOwner = FALSE;
+ thisWord.m_lpszWord = &m_lpszBuff[dwWordIndex];
+ thisWord.m_dwWordLen = dwWordEnd;
+ }
+ // Calc the text rect
+ DrawText(hdc, thisWord.m_lpszWord, thisWord.m_dwWordLen, &thisWord.m_rect,
+ DT_CALCRECT | DT_LEFT | DT_BOTTOM | DT_SINGLELINE);
+
+ if(rsState.m_wSuperState)
+ thisWord.m_rect.top -= 1; // TODO: Determine the '1' value based upon the font size
+ else if(rsState.m_wSubState)
+ thisWord.m_rect.top = 2*thisWord.m_rect.top + nLineH - thisWord.m_rect.bottom + 1; // TODO: Same as above...
+ else
+ thisWord.m_rect.top = 2*thisWord.m_rect.top + nLineH - thisWord.m_rect.bottom; // Baseline justify
+
+ if(thisWord.m_rect.right > (nScreenWidth - BTEXT_MARGIN)){
+ // Place on next line. But...
+ // We may need to move the prefix of this word down, thus we need to adjust the left
+ // edge of this word to make room.
+ int adjustedMargin = BTEXT_MARGIN;
+ if(thisWord.m_dwSubWordNum > 0)
+ adjustedMargin = m_BTLines.ValidateNewLineWord(thisWord.m_dwlWordNum,nLineH, BTEXT_MARGIN);
+
+ dwLineNum++;
+ thisWord.m_rect.right = thisWord.m_rect.right - thisWord.m_rect.left + adjustedMargin;
+ thisWord.m_rect.left = adjustedMargin;
+ thisWord.m_rect.top += nLineH;
+ thisWord.m_rect.bottom += nLineH;
+
+ nLineY += nLineH;
+ }
+
+ // Store the line to be rendered later.
+ m_BTLines.AddWordToLine(dwLineNum, thisWord);
+
+ // Prep for next iteration
+ if(rsState.m_space_encountered)
+ nLineX = thisWord.m_rect.right + nSpaceWidth;
+ else
+ nLineX = thisWord.m_rect.right;
+
+ //curWord++;
+ dwWordIndex += dwWordEnd;
+ }
+ if(rsState.m_lpftFontTagHead) // Properly formatted text would never need this, but that cannot be assumed.
+ delete rsState.m_lpftFontTagHead; // Do not delete Tail it is a convenience pointer...
+
+ m_fPreRendered = TRUE;
+}
+
+// I wanted to use the same font setter for both prerendering and rendering
+// so I wrote this method. The first if statement will try to determine if
+// we can safely skip this call since it is a rather expensive call
+// after several thousand words are pre-rendered and rendered. But,
+// If the text is already pre-rendered and we are calling this during
+// the actual rendering stage we are sure we want to make this call already
+// and thus the !m_bnRendering statement ensures we will change the font - otherwise
+// certain lines get the wrong fonts applied to them.
+VOID BTextViewer::SetFont(HDC hdc, DWORDLONG dwlFontState)
+{
+ INT lfWeight = dwlFontState & BTEXT_HTML_B_BEG ? FW_BOLD : FW_NORMAL;
+ UCHAR lfItalic = (char)((dwlFontState & BTEXT_HTML_I_BEG) > 0 ? 1 : 0);
+ UCHAR lfUnderline = (char)((dwlFontState & BTEXT_HTML_A_BEG) > 0 ? 1 : 0);
+ INT lfHeight = -1*((int)(0x000000FF & ((dwlFontState & 0x000000FF00000000) >> 32)));
+ HGDIOBJ oldFont = 0;
+ // Compute the font cache index...
+ DWORD dwFontCacheIndex = 0x000000FF & ((dwlFontState & (BTEXT_HTML_B_BEG | BTEXT_HTML_I_BEG | BTEXT_HTML_A_BEG)) | ((dwlFontState & 0x000000FF00000000) >> 24));
+
+ if(!m_fPreRendered &&
+ m_lfCurFont.lfWeight == lfWeight &&
+ m_lfCurFont.lfItalic == lfItalic &&
+ m_lfCurFont.lfHeight == lfHeight &&
+ m_lfCurFont.lfUnderline == lfUnderline)
+ return;
+
+ m_lfCurFont.lfWeight = lfWeight;
+ m_lfCurFont.lfItalic = lfItalic;
+ m_lfCurFont.lfHeight = lfHeight;
+ m_lfCurFont.lfUnderline = lfUnderline;
+
+ if(!m_hFontCache[dwFontCacheIndex]){
+ m_hFontCache[dwFontCacheIndex] = CreateFontIndirect(&m_lfCurFont);
+ }
+ SelectObject(hdc, m_hFontCache[dwFontCacheIndex]);
+ /*
+ m_hCurFont = CreateFontIndirect(&m_lfCurFont);
+ oldFont = SelectObject(hdc, m_hCurFont);
+ if(oldFont)
+ DeleteObject(oldFont);
+ */
+}
+
+BOOL BTextViewer::GetSpaces(RenderState& rsState, DWORD &dwWordIndex){
+ DWORD i = 0;
+
+ while(m_lpszBuff[dwWordIndex] != '\0' && (m_lpszBuff[dwWordIndex] == ' ' || (m_lpszBuff[dwWordIndex] == '&' && wcsnicmp(&m_lpszBuff[dwWordIndex], L" ", 6) == 0)) ){
+ dwWordIndex += m_lpszBuff[dwWordIndex] == '&' ? 6 : 1; // Did we find a then we need to increment that much.
+ i++;
+
+ }
+
+ if(i)
+ rsState.m_space_encountered = TRUE;
+ return i > 0;
+}
+
+VOID BTextViewer::InterpretSpecialEntities(DWORD dwWordIndex, DWORD dwWordLen, BTextWord *pbtWord)
+{
+ DWORD dwSubIndex = 0;
+ DWORD dwBufIndex = 0;
+ TCHAR szBuf[256] = {0};
+
+ while(dwSubIndex < dwWordLen){
+ if(m_lpszBuff[dwWordIndex + dwSubIndex] == '&'){
+ dwSubIndex++;
+ if(wcsncmp(&m_lpszBuff[dwWordIndex + dwSubIndex], L"lt;",3) == 0){
+ szBuf[dwBufIndex++] = '<';
+ dwSubIndex += 3;
+ }else if(wcsncmp(&m_lpszBuff[dwWordIndex + dwSubIndex], L"gt;",3) == 0){
+ szBuf[dwBufIndex++] = '>';
+ dwSubIndex += 3;
+ }else if(wcsncmp(&m_lpszBuff[dwWordIndex + dwSubIndex], L"amp;",4) == 0){
+ szBuf[dwBufIndex++] = '&';
+ dwSubIndex += 4;
+ }else if(wcsncmp(&m_lpszBuff[dwWordIndex + dwSubIndex], L"nbsp;",5) == 0){
+ szBuf[dwBufIndex++] = ' ';
+ dwSubIndex += 5;
+ }else{
+ // I have no idea what this is, simply display it...
+ szBuf[dwBufIndex++] = '&';
+ dwSubIndex++;
+ }
+ }
+ else
+ szBuf[dwBufIndex++] = m_lpszBuff[dwWordIndex + dwSubIndex++];
+ }
+
+ pbtWord->OwnWord(szBuf, dwBufIndex);
+}
+
+INT BTextViewer::Paint(HWND hWnd, HDC hdc, PAINTSTRUCT ps)
+{
+ COLORREF crColor = 0x00000000;
+ COLORREF crOldColor = SetTextColor(hdc, crColor);
+ INT nSavedDC = SaveDC(hdc);
+ RECT rectDims;
+ rectDims.top = 0;
+ rectDims.left = 0;
+ rectDims.right = 0;
+ rectDims.bottom = 0;
+
+ SetBkMode(hdc, TRANSPARENT);
+ if(!m_fPreRendered)
+ PreRenderBuff(hdc);
+
+ for(unsigned int line = 0; line <= m_BTLines.m_dwLastLine; line++){
+ BTextWord *pTWord = &m_BTLines.m_lpLines[line];
+ if((pTWord->m_rect.top + m_BTLines.m_nLineH + m_nTop) <= ps.rcPaint.top)
+ continue; // this line is above the region we are interested in painting
+ else if(pTWord->m_rect.top + m_nTop > ps.rcPaint.bottom)
+ break; // We are done the rest of the lines are below the region we care about.
+ while(pTWord->m_lpszWord){
+ if(!pTWord->m_lpPrevWord || pTWord->m_dwlfFontState != pTWord->m_lpPrevWord->m_dwlfFontState){
+ if(pTWord->m_dwlfFontState & BTEXT_HTML_A_BEG){ // links get priority coloring
+ crColor = COLORREF(0x00FF0000);
+ }else{
+ crColor = COLORREF(((pTWord->m_dwlfFontState >> 40) & 0x00FFFFFF));
+ }
+ SetTextColor(hdc, crColor);
+ SetFont(hdc, pTWord->m_dwlfFontState);
+ }
+
+ ExtTextOut(hdc,pTWord->m_rect.left, pTWord->m_rect.top + m_nTop, NULL, NULL, pTWord->m_lpszWord, pTWord->m_dwWordLen, NULL);
+ pTWord = pTWord->m_lpNextWord;
+ }
+ }
+
+ SetTextColor(hdc, crOldColor);
+ ClearFontCache(hdc);
+ RestoreDC(hdc, nSavedDC);
+ return 0;
+}
+
+VOID BTextViewer::ClearFontCache(HDC hdc)
+{
+ // Clear the font from device context so it can be deleted with the rest...
+ SelectObject(hdc, GetStockObject(SYSTEM_FONT));
+
+ for(DWORD i = 0; i < BTEXT_FONT_CACHE_MAX; i++){
+ if(m_hFontCache[i]){
+ DeleteObject(m_hFontCache[i]);
+ m_hFontCache[i] = 0;
+
+ }
+ }
+}
+
+VOID BTextViewer::SetTapState(BOOL fMouseDown, LPARAM lParam)
+{
+ POINT pt;
+ DWORD dwDiffTime = 0;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+ ScreenToClient(m_hWnd, &pt);
+ // Test if the mouse moved more than some threshold value.
+ BOOL mouseMoved = (abs(m_ptLastClick.y - pt.y) > 5) || (abs(m_ptLastClick.x - pt.x) > 5);
+
+ if(!m_fDragging){
+ m_nDragStart = pt.y;
+ }
+
+ // If we are about to go into a dragging mode,
+ // or we are about to leave a dragging mode,
+ // we should calculate a rolling velocity.
+ if(fMouseDown && !m_fDragging){
+ m_dwTrueStartPos = pt.y;
+ m_dwTrueStartTime = GetTickCount();
+ m_nRollVelocity = 0;
+ }else if(!fMouseDown && m_fDragging){
+ dwDiffTime = GetTickCount() - m_dwTrueStartTime;
+ if(dwDiffTime > 200)
+ m_nRollVelocity = 0;
+ else
+ m_nRollVelocity = (80*(int)(pt.y - m_dwTrueStartPos))/((int)dwDiffTime);
+ }
+
+ if(fMouseDown){
+ m_dwClickTime = GetTickCount();
+ m_fDragging = TRUE;
+ SetCapture(m_hWnd);
+ }else{
+ m_fDragging = FALSE;
+ ReleaseCapture();
+ }
+
+ // If we are absolutely positive the user wants to click...
+ if(!fMouseDown && !mouseMoved && (GetTickCount() - m_dwClickTime) < 120)
+ GetWordAtPoint(lParam);
+ m_ptLastClick = pt;
+
+ // If there is a velocity set this will use it up, otherwise it drops out nicely.
+ RollTillStopped();
+}
+
+VOID BTextViewer::GetWordAtPoint(LPARAM lParam)
+{
+ POINT pt;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+ BTextWord *pbtWord;
+ DWORD dwLineNum = 0;
+ TCHAR szWordFound[128] = {0};
+
+ while(dwLineNum <= m_BTLines.m_dwLastLine && (m_BTLines.m_lpLines[dwLineNum].m_rect.bottom + m_nTop) < pt.y)
+ dwLineNum++;
+ if(dwLineNum > m_BTLines.m_dwLastLine)
+ return;
+ pbtWord = &m_BTLines.m_lpLines[dwLineNum];
+ while(pbtWord->m_lpszWord && pbtWord->m_rect.right < pt.x)
+ pbtWord = pbtWord->m_lpNextWord;
+ if(pbtWord->m_lpszWord){
+ if(pbtWord->m_dwlfFontState & BTEXT_HTML_A_BEG && pbtWord->m_lpszHref){
+ wcsncpy(szWordFound, pbtWord->m_lpszHref, pbtWord->m_dwHrefLen);
+ }else{
+ wcsncpy(szWordFound, pbtWord->m_lpszWord, pbtWord->m_dwWordLen);
+ }
+ MessageBox(m_hWnd, szWordFound, L"Found...", MB_OK);
+ }
+}
+
+VOID BTextViewer::DragScreenToPoint(LPARAM lParam)
+{
+ POINT pt;
+ RECT rectUpdateRect;
+ INT nDragDist = 0;
+
+ if(m_fDragging){
+ pt.x = 0;
+ pt.y = HIWORD(lParam);
+ ScreenToClient(m_hWnd, &pt);
+ nDragDist = pt.y - m_nDragStart;
+ m_nTop += nDragDist;
+ // Prevent rolling past top or bottom
+ if(m_nTop > 0){
+ nDragDist -= m_nTop;
+ m_nTop = 0;
+ }else if(m_nTop < -m_BTLines.m_lpLines[m_BTLines.m_dwLastLine].m_rect.bottom){
+ // nDragDist does not matter here because we are Scrolling a white window,
+ // Keeping track of m_nTop is important as it is our reference point for
+ // scrolling later
+ m_nTop = -(m_BTLines.m_lpLines[m_BTLines.m_dwLastLine].m_rect.bottom);
+ }
+
+ ScrollWindowEx(m_hWnd, 0, nDragDist, NULL, NULL, NULL, &rectUpdateRect, NULL);
+ InvalidateRect(m_hWnd, &rectUpdateRect, TRUE);
+ UpdateWindow(m_hWnd);
+
+ m_nDragStart = pt.y;
+ }
+}
+
+VOID BTextViewer::RollTillStopped()
+{
+ RECT rectUpdateRect;
+ BOOL fDone = FALSE;
+ INT nDirection = m_nRollVelocity > 0 ? 1 : -1;
+
+ while(!fDone && nDirection*m_nRollVelocity > 0){
+ m_nTop += m_nRollVelocity;
+
+ // Prevent rolling beyond the top of the page.
+ if(m_nTop > 0){
+ m_nRollVelocity -= m_nTop;
+ m_nTop = 0;
+ fDone = TRUE;
+ }else if(m_nTop < -m_BTLines.m_lpLines[m_BTLines.m_dwLastLine].m_rect.bottom){
+ // dist does not matter here because we are Scrolling a white window,
+ // Keeping track of m_nTop is important as it is our reference point for
+ // scrolling later
+ m_nTop = -(m_BTLines.m_lpLines[m_BTLines.m_dwLastLine].m_rect.bottom);
+ fDone = TRUE;
+ }
+
+ ScrollWindowEx(m_hWnd, 0, m_nRollVelocity, NULL, NULL, NULL, &rectUpdateRect, NULL);
+ InvalidateRect(m_hWnd, &rectUpdateRect, TRUE);
+ UpdateWindow(m_hWnd);
+ m_nRollVelocity = (m_nRollVelocity - m_nRollVelocity/6) - ((nDirection*m_nRollVelocity < 10) ? nDirection : 0); // the nDirection part ensures continual degrading in the velocity
+ }
+}
+
+VOID BTextViewer::ScrollFullPage(INT nDirection)
+{
+ RECT rectUpdateRect;
+ RECT rectClientRect;
+ INT nDist = 0;
+ BOOL fDone = FALSE;
+ GetClientRect(m_hWnd,&rectClientRect);
+ INT nRollBy = rectClientRect.bottom - rectClientRect.top;
+ INT nCalcDist = 0;
+ CONST INT UPPER_SB = 15; // Upper bound on the scrolling per iteration.
+ nDirection = (nDirection > 0) ? 1 : -1;
+
+ for(INT i = 0;!fDone && i < nRollBy; i+=nCalcDist){
+ nCalcDist = UPPER_SB - (int)(UPPER_SB*((float)i/(float)nRollBy)) + 1;
+ nDist = nDirection*nCalcDist;
+ m_nTop += nDist;
+ // Prevent rolling beyond the top of the page.
+ if(m_nTop > 0){
+ nDist -= m_nTop;
+ m_nTop = 0;
+ fDone = TRUE;
+ }else if(m_nTop < -m_BTLines.m_lpLines[m_BTLines.m_dwLastLine].m_rect.bottom){
+ // nDist does not matter here because we are Scrolling a white window,
+ // Keeping track of m_nTop is important as it is our reference point for
+ // scrolling later
+ m_nTop = -(m_BTLines.m_lpLines[m_BTLines.m_dwLastLine].m_rect.bottom);
+ fDone = TRUE;
+ }
+ ScrollWindowEx(m_hWnd, 0, nDist, NULL, NULL, NULL, &rectUpdateRect, NULL);
+ InvalidateRect(m_hWnd, &rectUpdateRect, TRUE);
+ UpdateWindow(m_hWnd);
+ }
+}
+
+VOID BTextViewer::AddText(TCHAR *szText, DWORD dwSize)
+{
+ DWORD i = 0;
+
+ // Do we need to make room for the new szText
+ if((m_dwBuffEnd + dwSize) > m_dwBuffSize){
+ DWORD dwNewSize = BTEXT_BUFF_INC > dwSize ? BTEXT_BUFF_INC : dwSize;
+ TCHAR *lpszTmp = new TCHAR[dwNewSize];
+ for(i = 0; i < m_dwBuffSize; i++){
+ lpszTmp[i] = m_lpszBuff[i];
+ }
+ delete [] m_lpszBuff;
+ m_lpszBuff = lpszTmp;
+ m_dwBuffSize = dwNewSize;
+ }
+
+ // If this is a new buffer we need to
+ // discard HTML header stuff by pointing to the beginning of the <body></body>
+ i = 0;
+ if(m_dwBuffEnd == 0){
+ do{
+ while(szText[i] != '<' && i < dwSize) i++;
+ if(wcsnicmp(&szText[i], L"<body>", 6) == 0){
+ i += 6;
+ break;
+ }
+ while(szText[i++] != '>' && i < dwSize);
+ }while(TRUE);
+ }
+
+ // Copy it in, and ignore the closing tags, if any
+ for(; i < dwSize; i++){
+ // We arbitrarily choose to start looking at the last 100 characters for the tail end
+ // of this HTML stream. If we fail to chop it off its not the end of the world, but
+ // it would be nice to get out of the way now.
+ if(dwSize > 100 && i > (dwSize - 100) && wcsnicmp(&szText[i], L"</body>", 7) == 0)
+ break;
+ if(szText[i] == 0x09) // Horizontal tab, replace with a single space. (for now at least.)
+ m_lpszBuff[m_dwBuffEnd++] = ' ';
+ else if(szText[i] != '\n') // Ignore new-lines
+ m_lpszBuff[m_dwBuffEnd++] = szText[i];
+ }
+ for(i = 0; i + m_dwBuffEnd < m_dwBuffSize; i++)
+ m_lpszBuff[i + m_dwBuffEnd] = 0;
+}
+
+/*****************************************************************************
+ * BTextWord *
+ *****************************************************************************/
+
+BTextViewer::BTextWord::BTextWord()
+: m_lpNextWord(0)
+, m_lpPrevWord(0)
+, m_lpszWord(NULL)
+, m_dwWordLen(0)
+, m_lpszHref(NULL)
+, m_dwHrefLen(0)
+, m_fOwner(FALSE)
+, m_dwlfFontState(0)
+, m_dwlWordNum(0)
+, m_dwSubWordNum(0)
+{
+ m_rect.top = 0;
+ m_rect.left = 0;
+ m_rect.bottom = 0;
+ m_rect.right = 0;
+}
+
+VOID BTextViewer::BTextWord::Clear()
+{
+ if(m_fOwner && m_lpszWord)
+ delete [] m_lpszWord;
+ m_fOwner = FALSE;
+ m_dwlfFontState = 0;
+ m_dwHrefLen = 0;
+ m_dwWordLen = 0;
+ m_lpszWord = NULL;
+ m_lpszHref = NULL;
+ m_rect.top = 0;
+ m_rect.bottom = 0;
+ m_rect.left = 0;
+ m_rect.right = 0;
+ m_dwlWordNum = 0;
+ m_dwSubWordNum = 0;
+ m_lpNextWord = NULL;
+ m_lpPrevWord = NULL;
+}
+
+VOID BTextViewer::BTextWord::OwnWord(TCHAR *lpszWord, DWORD dwWordLen)
+{
+ if(m_fOwner && m_lpszWord){
+ delete [] m_lpszWord;
+ }
+ m_lpszWord = new TCHAR[dwWordLen + 1];
+ for(DWORD i = 0; i < dwWordLen; i++)
+ m_lpszWord[i] = lpszWord[i];
+
+ m_lpszWord[dwWordLen] = 0;
+ m_dwWordLen = dwWordLen;
+ m_fOwner = TRUE;
+}
+
+BTextViewer::BTextWord::BTextWord(const BTextViewer::BTextWord &rhs)
+{
+ m_dwlfFontState = rhs.m_dwlfFontState;
+ m_dwHrefLen = rhs.m_dwHrefLen;
+ m_dwWordLen = rhs.m_dwWordLen;
+ m_lpszHref = rhs.m_lpszHref;
+ m_lpNextWord = rhs.m_lpNextWord;
+ m_lpPrevWord = rhs.m_lpPrevWord;
+ m_fOwner = rhs.m_fOwner;
+ m_rect = rhs.m_rect;
+ m_dwlWordNum = rhs.m_dwlWordNum;
+ m_dwSubWordNum = rhs.m_dwSubWordNum;
+
+ if(m_fOwner && rhs.m_lpszWord){
+ m_lpszWord = new TCHAR[m_dwWordLen + 1];
+ for(DWORD i = 0; i < m_dwWordLen; i++)
+ m_lpszWord[i] = rhs.m_lpszWord[i];
+ m_lpszWord[m_dwWordLen] = 0;
+ }else{
+ m_lpszWord = rhs.m_lpszWord;
+ }
+}
+BTextViewer::BTextWord & BTextViewer::BTextWord::operator=(const BTextViewer::BTextWord &rhs)
+{
+ if(this == &rhs)
+ return *this; // We detect self assignment
+
+ m_dwlfFontState = rhs.m_dwlfFontState;
+ m_dwHrefLen = rhs.m_dwHrefLen;
+ m_dwWordLen = rhs.m_dwWordLen;
+ m_lpszHref = rhs.m_lpszHref;
+ m_lpNextWord = rhs.m_lpNextWord;
+ m_lpPrevWord = rhs.m_lpPrevWord;
+ m_rect = rhs.m_rect;
+ m_dwlWordNum = rhs.m_dwlWordNum;
+ m_dwSubWordNum = rhs.m_dwSubWordNum;
+
+ if(m_fOwner && m_lpszWord)
+ delete [] m_lpszWord;
+
+ m_fOwner = rhs.m_fOwner;
+
+ if(m_fOwner && rhs.m_lpszWord){
+ m_lpszWord = new TCHAR[m_dwWordLen + 1];
+ for(DWORD i = 0; i < m_dwWordLen; i++)
+ m_lpszWord[i] = rhs.m_lpszWord[i];
+ m_lpszWord[m_dwWordLen] = 0;
+ }else{
+ m_lpszWord = rhs.m_lpszWord;
+ }
+ return *this;
+}
+
+BTextViewer::BTextWord::~BTextWord()
+{
+ if(m_fOwner && m_lpszWord){
+ delete [] m_lpszWord;
+ }
+}
+/*****************************************************************************
+ * BTextLines *
+ *****************************************************************************/
+
+BTextViewer::BTextLines::BTextLines()
+: m_nLineH(0)
+, m_dwLastLine(0)
+{
+ InitLines(0);
+}
+
+VOID BTextViewer::BTextLines::InitLines(CONST INT nLineH)
+{
+ m_dwLines = BTEXT_LINE_INC;
+ m_lpLines = new BTextWord[m_dwLines];
+ m_lppLinesLastWord = new BTextWord*[m_dwLines];
+
+ for(DWORD i = 0; i < m_dwLines; i++)
+ m_lppLinesLastWord[i] = &m_lpLines[i];
+ m_nLineH = nLineH;
+}
+
+BTextViewer::BTextLines::BTextLines(CONST BTextViewer::BTextLines &rhs)
+{
+ m_dwLastLine = rhs.m_dwLastLine;
+ m_dwLines = rhs.m_dwLines;
+ m_lpLines = new BTextWord[m_dwLines];
+ m_lppLinesLastWord = new BTextWord*[m_dwLines];
+
+ for(DWORD i = 0; i < m_dwLines; i++){
+ m_lpLines[i] = rhs.m_lpLines[i];
+ m_lppLinesLastWord[i] = rhs.m_lppLinesLastWord[i];
+ }
+}
+
+BTextViewer::BTextLines & BTextViewer::BTextLines::operator=(CONST BTextViewer::BTextLines &rhs)
+{
+ if(this == &rhs)
+ return *this; // We detect self assignment
+
+ ClearLines();
+
+ m_dwLastLine = rhs.m_dwLastLine;
+ m_dwLines = rhs.m_dwLines;
+
+ m_lpLines = new BTextWord[m_dwLines];
+ m_lppLinesLastWord = new BTextWord*[m_dwLines];
+
+ for(DWORD i = 0; i < m_dwLines; i++){
+ m_lpLines[i] = rhs.m_lpLines[i];
+ m_lppLinesLastWord[i] = rhs.m_lppLinesLastWord[i];
+ }
+
+ return *this;
+}
+
+BTextViewer::BTextLines::~BTextLines()
+{
+ ClearLines();
+}
+
+VOID BTextViewer::BTextLines::ClearLines()
+{
+ DWORD dwCurLine = 0;
+ BTextWord *pbtNextWord = NULL;
+ BTextWord *pbtTempWord = NULL;
+
+ for(dwCurLine = 0; dwCurLine < m_dwLines; dwCurLine++){
+ pbtNextWord = m_lpLines[dwCurLine].m_lpNextWord;
+ // Delete all the words in this line
+ while(pbtNextWord){
+ pbtTempWord = pbtNextWord->m_lpNextWord;
+ delete pbtNextWord;
+ pbtNextWord = pbtTempWord;
+ }
+ }
+ m_dwLastLine = 0;
+ m_dwLines = 0;
+
+ delete [] m_lpLines;
+ m_lpLines = NULL;
+ delete [] m_lppLinesLastWord;
+ m_lppLinesLastWord = NULL;
+}
+
+INT BTextViewer::BTextLines::ValidateNewLineWord(CONST DWORDLONG dwlWordNum,CONST INT nLineH, CONST INT nMargin)
+{
+ if(!m_lppLinesLastWord[m_dwLastLine]->m_lpPrevWord)
+ return nMargin; // There is no word on the last line, nothing to do...
+
+ BTextViewer::BTextWord *pbtWord = m_lppLinesLastWord[m_dwLastLine]->m_lpPrevWord;
+
+ if(pbtWord->m_dwlWordNum != dwlWordNum)
+ return nMargin; // Different word, nothing to do...
+
+ pbtWord->m_rect.top += nLineH;
+ pbtWord->m_rect.bottom += nLineH;
+ pbtWord->m_rect.right = nMargin + (pbtWord->m_rect.right - pbtWord->m_rect.left);
+ pbtWord->m_rect.left = nMargin;
+
+ // break this word off the old line's chain
+ BTextViewer::BTextWord *pbtChainPrev = pbtWord->m_lpPrevWord;
+ BTextViewer::BTextWord *pbtChainNext = pbtWord->m_lpNextWord;
+
+ if(pbtWord->m_lpPrevWord)
+ pbtWord->m_lpPrevWord->m_lpNextWord = pbtChainNext;
+ if(pbtWord->m_lpNextWord)
+ pbtWord->m_lpNextWord->m_lpPrevWord = pbtChainPrev;
+
+ m_lppLinesLastWord[m_dwLastLine] = pbtChainNext;
+ pbtWord->m_lpPrevWord = NULL;
+ pbtWord->m_lpNextWord = NULL;
+ AddWordToLine(m_dwLastLine + 1, *pbtWord);
+ delete pbtWord;
+
+ return m_lppLinesLastWord[m_dwLastLine]->m_lpPrevWord->m_rect.right;
+}
+
+VOID BTextViewer::BTextLines::AddWordToLine(DWORD dwLine, CONST BTextViewer::BTextWord &btWord)
+{
+ DWORD dwLines = 0;
+ DWORD i = 0;
+
+ // Check if we are about to overflow the allocated lines
+ // If so resize...
+ if(dwLine >= m_dwLines){
+ dwLines = m_dwLines + BTEXT_LINE_INC;
+ //unsigned int nLastLine = m_dwLastLine;
+ i = 0;
+ BTextWord *pbtTemp1 = new BTextWord[dwLines];
+ BTextWord **ppbtTemp2 = new BTextWord*[dwLines];
+
+ for(i = 0; i <= m_dwLastLine; i++){
+ pbtTemp1[i] = m_lpLines[i];
+ // Now the next btWord doesn't know it has a new prev btWord
+ // Fixing...
+ if(pbtTemp1[i].m_lpNextWord)
+ pbtTemp1[i].m_lpNextWord->m_lpPrevWord = &pbtTemp1[i];
+ ppbtTemp2[i] = m_lppLinesLastWord[i];
+ }
+ for(;i < dwLines; i++){
+ ppbtTemp2[i] = &pbtTemp1[i];
+ }
+ m_dwLastLine = dwLine;
+ m_dwLines = dwLines;
+ delete [] m_lpLines;
+ delete [] m_lppLinesLastWord;
+ m_lpLines = pbtTemp1;
+ m_lppLinesLastWord = ppbtTemp2;
+ }else if(dwLine > m_dwLastLine){
+ m_dwLastLine = dwLine;
+ }
+ BTextViewer::BTextWord *pbtPrevWord = m_lppLinesLastWord[dwLine]->m_lpPrevWord;
+ *m_lppLinesLastWord[dwLine] = btWord;
+ m_lppLinesLastWord[dwLine]->m_lpNextWord = new BTextWord();
+ m_lppLinesLastWord[dwLine]->m_lpPrevWord = pbtPrevWord;
+ // Create the relationship between this btWord and the next
+ // potential btWord...
+ m_lppLinesLastWord[dwLine]->m_lpNextWord->m_lpPrevWord = m_lppLinesLastWord[dwLine];
+ m_lppLinesLastWord[dwLine] = m_lppLinesLastWord[dwLine]->m_lpNextWord;
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/BTextViewer.h
===================================================================
--- trunk/src/SwordReader_GUI/BTextViewer.h (rev 0)
+++ trunk/src/SwordReader_GUI/BTextViewer.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,668 @@
+/******************************************************************************
+* BTextViewer.h - HTML Renderer for rendering biblical texts on Pocket PC
+* devices.
+* Author: David C Trotz Jr.
+* e-mail: dtrotzjr at crosswire.org
+*
+* $Id$
+*
+* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
+* CrossWire Bible Society
+* P. O. Box 2528
+* Tempe, AZ 85280-2528
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License as published by the
+* Free Software Foundation version 2.
+*
+* This program is distributed in the hope that it will be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+*/
+
+#pragma once
+
+//! BTextViewer::m_lpszBuff gets re-sized in increments based upon this number.
+#define BTEXT_BUFF_INC 2000
+//! BTextViewer::m_BTLines gets re-sized based upon this number
+#define BTEXT_LINE_INC 400
+//! Determines the margin around the border of the display.
+//! May be broken into Top, Bottom, Left, and Right margins in the future.
+#define BTEXT_MARGIN 4
+
+#define BTEXT_FONT_CACHE_MAX 0x7FFF
+
+
+//! Determines the default font height.
+//! @note Future implementations may read this from a config file.
+#define BTEXT_DEFAULT_FONT_HEIGHT -11
+//! Flags an uninitialized color state.
+//! This is actually an invalid COLOREF Color, which makes it ideal for
+//! this type of use, as it will never come up naturally.
+#define BTEXT_FONT_NOT_A_COLOR 0xFF000000
+//! Determines the default font face color.
+//! @note Future implementations may read this from a config file.
+#define BTEXT_DEFAULT_FONT_COLOR 0x00000000
+//! Determines the line spacing factor.
+//! @note Future implementations may read this from a config file.
+#define BTEXT_LINE_SPACING 1.1
+
+//! Flag indicating a space of some sort was encountered.
+//! @deprecated Future implementations will move away from this flag
+#define BTEXT_SPACE_ENCOUNTERED 0
+//! Flag indicating a new line has been encountered
+//! @deprecated Use of this flag may not be needed in future releases.
+#define BTEXT_NEWLINE_ENCOUNTERED -1
+//! Flag indicating we have encountered an opening bracket for HTML processing.
+#define BTEXT_HTML_OPEN_BRACKET -2
+
+//! Flag indicating a <br> element was encountered
+#define BTEXT_HTML_BR 0x00000001
+//! Flag used to mask against the ..._BEG counterpart of an ..._END.
+#define BTEXT_HTML_MASK 0xFFFFFFFF
+
+//!Flag indicating we encountered a <b> element
+#define BTEXT_HTML_B_BEG 0x00000002
+//!Flag indicating we encountered a </b> element
+#define BTEXT_HTML_B_END BTEXT_HTML_MASK ^ BTEXT_HTML_B_BEG
+
+//!Flag indicating we encountered a <i> element
+#define BTEXT_HTML_I_BEG 0x00000004
+//!Flag indicating we encountered a </i> element
+#define BTEXT_HTML_I_END BTEXT_HTML_MASK ^ BTEXT_HTML_I_BEG
+
+//!Flag indicating we encountered a <sup> element
+#define BTEXT_HTML_SUP_BEG 0x00000008
+//!Flag indicating we encountered a </sup> element
+#define BTEXT_HTML_SUP_END BTEXT_HTML_MASK ^ BTEXT_HTML_SUP_BEG
+
+//!Flag indicating we encountered a <sub> element
+#define BTEXT_HTML_SUB_BEG 0x00000010
+//!Flag indicating we encountered a </sub> element
+#define BTEXT_HTML_SUB_END BTEXT_HTML_MASK ^ BTEXT_HTML_SUB_BEG
+
+//!Flag indicating we encountered a <small> element
+#define BTEXT_HTML_SMALL_BEG 0x00000020
+//!Flag indicating we encountered a </small> element
+#define BTEXT_HTML_SMALL_END BTEXT_HTML_MASK ^ BTEXT_HTML_SMALL_BEG
+
+//!Flag indicating we encountered a <font ...> element
+#define BTEXT_HTML_FONT_BEG 0x00000040
+//!Flag indicating we encountered a </font> element
+#define BTEXT_HTML_FONT_END BTEXT_HTML_MASK ^ BTEXT_HTML_FONT_BEG
+
+//!Flag indicating we encountered a <a ...> element
+#define BTEXT_HTML_A_BEG 0x00000080
+//!Flag indicating we encountered a </a> element
+#define BTEXT_HTML_A_END BTEXT_HTML_MASK ^ BTEXT_HTML_A_BEG
+
+//!Flag indicating we encountered a <p> element
+#define BTEXT_HTML_P_BEG 0x00000100
+//!Flag indicating we encountered a </p> element
+#define BTEXT_HTML_P_END BTEXT_HTML_MASK ^ BTEXT_HTML_P_BEG
+
+//! Flag indicating we encountered an illegal tag format.
+#define BTEXT_HTML_ILLEGAL_TAG_FORMAT 0x80000000
+//! Flag indicating we encountered an unknown tag.
+#define BTEXT_HTML_UNKNOWN_TAG 0x40000000
+
+//! BTextViewer - A custom HTML Renderer for Biblical Texts on WinCE Platforms.
+/*!
+ BTextViewer was designed to be a replacement for the built in HTML Renderer
+ on Windows CE platforms. This replacement was decided necessary due to the
+ limitations and performance issues encountered when designing a front end
+ for The SWORD Project on the Windows CE platform.
+
+ When implementing this class I have taken every precaution I could to ensure
+ the class could be easily manipulated in the future to add support for new
+ features necessary to display biblical and supporting texts. Whether I have
+ been successful at this or not is unfounded, only time will tell.
+ */
+class BTextViewer
+{
+private:
+
+ //! BTextWord - The most basic element of this text display.
+ /*! BTextWord represents a single (whole or partial) word. Each word
+ contains information to describe its placement on the screen and any
+ display characteristics it may possess such as bold, italic, font
+ size, etc. In order to preserve memory and time copying text from the
+ main buffer BTextWord objects typically only point to the main text
+ buffer BTextViewer::m_lpszBuff
+
+ On rare occasions it is necessary for the word to store its own copy
+ of the word it represents, in these cases m_fOwner will be true and
+ special care is taken to manage its memory.
+
+ This Class also represents a doubly linked list, care must be taken
+ whenever a single node is removed from the list or else you risk
+ memory leaks or dangling pointers, both of which are a death sentence
+ on the WinCE platform.
+
+ */
+ class BTextWord
+ {
+ public:
+ //! Default Constructor
+ BTextWord();
+ //! Copy Constructor
+ BTextWord(CONST BTextViewer::BTextWord &rhs);
+ //! Destructor
+ ~BTextWord();
+ //! Assignment operator
+ BTextViewer::BTextWord &operator=(CONST BTextViewer::BTextWord &rhs);
+ //! Clears the contents of this word.
+ //! This may include deleting any memory it may own.
+ VOID Clear();
+ //! Copy the pWord object internally and manage it internally.
+ //! Tells this instance of BTextWord that it needs to make a copy of
+ //! this word and "own" the word.
+ //! @param pWord pointer to the word being copied in.
+ //! @param dwWordLen length of the word being copied in.
+ VOID OwnWord(TCHAR *lpszWord, DWORD dwWordLen);
+ //! Points to a specific word inside a buffered string stored and
+ //! managed outside of this class.
+ //! Thus we do not try to manage the memory, unless the m_fOwner
+ //! flag is set.
+ TCHAR * m_lpszWord;
+ //! Indicates how many characters this word is in length.
+ DWORD m_dwWordLen;
+ //! Points to a specific href inside a buffered string stored and
+ //! managed outside of this class.
+ //! Thus we do not try to manage the memory, not even if m_fOwner is set
+ TCHAR * m_lpszHref;
+ //! Indicates how many characters this href is in length.
+ DWORD m_dwHrefLen;
+ //! Indicates the on screen bounds of this word.
+ RECT m_rect;
+ //! Flags indicating the font status of this word.
+ //! @code
+ //! X = Reserved H = Font Height
+ //! M = Small B = Subscript
+ //! U = Superscript O = Bold
+ //! I = Italic A = Link
+ //! P = Paragraph
+ //! F = Font (not used here)
+ //! RR = Red GG = Green BB = Blue
+ //! - = Line-break bit (not used here)
+ //! BYTE: 7[7654 3210] 6[7654 3210] 5[7654 3210] 4[7654 3210]
+ //! [BBBB BBBB] [GGGG GGGG] [RRRR RRRR] [HHHH HHHH]
+ //! BYTE: 3[7654 3210] 2[7654 3210] 1[7654 3210] 0[7654 3210]
+ //! [XXXX XXXX] [XXXX XXXX] [XXXX XXXP] [AFMB UIO-]
+ //! @endcode
+ DWORDLONG m_dwlfFontState;
+
+ //! Indicates that this BTextWord object should manage the memory
+ //! pointed to by m_lpszWord.
+ //! There are times when this BTextWord needs to clean up the
+ //! character allocation it points to, such as when Special
+ //! Entities are interpreted and stored separately from the main
+ //! text buffer.
+ BOOL m_fOwner;
+ //! Points to the next word in the list.
+ BTextWord * m_lpNextWord;
+ //! Points to the previous word in the list.
+ BTextWord * m_lpPrevWord;
+ //! Indicates the unique number assigned to each word.
+ //! This number is helpful in keeping words together when a
+ //! html element is introduced mid-word such as
+ //! L<font size="-1">ORD</font> In this case two BTextWord
+ //! objects are created and all that ties them together is this
+ //! variable.
+ //! @see m_dwSubWordNum.
+ DWORDLONG m_dwlWordNum;
+ //! Indicates which piece of a word this word is (most often it will be 0)
+ DWORD m_dwSubWordNum;
+ };
+
+ //! BTextLines - Stores all the words in an array of lines.
+ /*! BTextLines is responsible for storing the BTextWord objects in a way that
+ is convenient for rendering on the display, and for x,y coordinate to
+ BTextWord object look-up.
+ */
+ class BTextLines
+ {
+ public:
+ //! Default Constructor
+ BTextLines();
+ // Copy Constructor
+ BTextLines(CONST BTextViewer::BTextLines &rhs);
+ //! Destructor
+ ~BTextLines();
+ //! Assignment operator.
+ BTextViewer::BTextLines &operator=(CONST BTextViewer::BTextLines &rhs);
+
+ //! Adds the given word to the end of the line indicated by the line number.
+ /*! If dwLine is larger than the current m_dwLastLine property, then
+ m_dwLastLine is changed accordingly (hence it grows). Since we do
+ not want to thrash the heap by reallocating every time m_dwLastLine
+ increments (and we expect it will often), we instead allocate in
+ increments of BTEXT_LINE_INC.
+ @param dwLine Indicates the line number where the new btWord is being
+ added.
+ @param btWord The BTextWord object we will copy into the BTextLines
+ object.
+ */
+ VOID AddWordToLine(DWORD dwLine, CONST BTextViewer::BTextWord &btWord);
+ //! Clears all lines from this instance of BTextLines.
+ /*! BEWARE - Once this is called the object is not usable again until,
+ InitLines is called to re-initialize the memory for m_lpLines and
+ m_lppLinesLastWord
+ */
+ VOID ClearLines();
+ //! Initializes (or allocates) memory to store the words.
+ /*! @param nLineH indicates the physical line height in pixels.
+ @note Not sure how appropriate nLineH is here. Expect this to change
+ in future releases.
+ */
+ VOID InitLines(CONST INT nLineH);
+ //! Validates the incoming word's position on a new line.
+ /*!
+ Checks to see if this word might be part of a word that ended on the
+ previous line. If it is part of the previous line's word, it moves
+ the previous word down to the new line and prepares this word to be
+ inserted immediately following.
+ @param dwWordNum indicates the word's unique number to determine if it
+ belongs to the word in the line above.
+ @param nLineH indicates how far down to move the word (physically in
+ pixels) if it is determined that it needs to be moved.
+ @param nMargin indicates the margin to obey when placing the word on
+ a new line if it is determined that it needs to be moved.
+ @return the position in pixels that the new word can start at. If it
+ was determined that the word above did not need to be moved, it
+ simply returns nMargin as its value, if it did move down its
+ rightmost extent is returned instead.
+ */
+ INT ValidateNewLineWord(CONST DWORDLONG dwlWordNum,CONST INT nLineH, CONST INT nMargin);
+ //! Indicates the total number of lines currently allocated.
+ DWORD m_dwLines;
+ //! Indicates the last line actually being used,
+ //! hence m_dwLastLine < m_dwLines is always true!
+ DWORD m_dwLastLine;
+ //! Indicates the physical line height in pixels. Useful for
+ //! determining line boundaries.
+ int m_nLineH;
+ //! Pointer to an array of BTextWords, where each index into the array
+ //! represents a single line of text.
+ BTextWord* m_lpLines;
+ //! Convenience pointer to the last word in each line.
+ //! @note Do not manage this memory!!! It is already managed
+ //! as m_lpLines.
+ BTextWord** m_lppLinesLastWord;
+ };
+
+ //! FontTagItem - Tracks font tag elements and their respected properties.
+ /*! This simple class is a basic queue for tracking font tags and the properties related to those tags.
+ */
+ class FontTagItem{
+ public:
+ //! Default Constructor
+ FontTagItem(){ m_siAbsFontSize = BTEXT_DEFAULT_FONT_HEIGHT; m_siRelFontSize = 0; m_crFontColor = BTEXT_FONT_NOT_A_COLOR; m_lpftNext = NULL; };
+ //! Destructor
+ ~FontTagItem() { if(m_lpftNext) delete m_lpftNext; };
+
+ //! Represents the absolute font size related to this font tag.
+ //! @note not fully implemented.
+ SHORT m_siAbsFontSize;
+ //! Represents the relative font size related to this font tag.
+ //! Examples: <font size="+2"> -- indicates a font size +2
+ //! greater than the current font size.
+ SHORT m_siRelFontSize;
+ //! Represents the fore color of the font related to this font tag.
+ COLORREF m_crFontColor;
+ //! Points to the next font tag item (if there exists one.)
+ FontTagItem* m_lpftNext;
+ };
+
+ //! RenderState - Keeps track of the current rendering state.
+ /*! As new tags are encountered this structure is useful for keeping
+ track of such changes so that each word is rendered with the correct
+ formatting tags applied.
+ */
+ struct RenderState{
+ //! Indicates that we encountered a space outside of a tag element.
+ BOOL m_space_encountered;
+ //! Indicates the bold state.
+ /*! \code
+ m_wBoldState == 0 indicates not bold;
+ m_wBoldState > 0 indicates bold
+ \endcode
+ */
+ WORD m_wBoldState;
+ //! Indicates the italic state.
+ /*! \code
+ m_wItalicState == 0 indicates not italicized;
+ m_wItalicState > 0 indicates italicized
+ \endcode
+ */
+ WORD m_wItalicState;
+ //! Indicates the super script state.
+ /*! \code
+ m_wSuperState == 0 indicates not super scripted;
+ m_wSuperState > 0 indicates super scripted
+ \endcode
+ */
+ WORD m_wSuperState;
+ //! Indicates the anchor (link) state.
+ /*! \code
+ m_wAState == 0 indicates not in anchor state
+ m_wAState > 0 indicates anchor state
+ \endcode
+ @note it is assumed that anchors are not nested
+ thus: \code -1 < m_wAState > 1 \endcode
+ */
+ WORD m_wAState;
+ //! Indicates the sub script state.
+ /*! \code
+ m_wSubState == 0 indicates not sub scripted
+ m_wSubState > 0 indicates sub scripted
+ \endcode
+ */
+ WORD m_wSubState;
+ //! Indicates the paragraph state.
+ /*! \code
+ m_wParagraphState == 0 indicates not in paragraph
+ m_wParagraphState > indicates in a paragraph
+ \endcode
+ */
+ WORD m_wParagraphState;
+ //! Tracks the font tag elements that help make the current font
+ //! state. This linked list is treated as a last in first out (LIFO)
+ //! queue.
+ FontTagItem* m_lpftFontTagHead;
+ //! This is where new elements are pushed/popped on to the queue.
+ FontTagItem* m_lpftFontTagTail;
+ //! Pointer to an anchor href property the current font state
+ //! may reference.
+ TCHAR* m_lpszHref;
+ //! The length of that anchor href property ( m_lpszHref ) string
+ DWORD m_dwHrefLen;
+ //! Indicates the current verse we believe we are representing.
+ WORD m_wVerseNum;
+ //! Indicates how many HTML Special entities we have encountered and
+ //! need to be interpreted later.
+ WORD m_wTotalSpclEnt;
+ //! Used to compose a word that may be broken up by rendering
+ //! tags introduced mid-word such as the very common
+ //! L<font size="-1">ORD</font>
+ DWORDLONG m_dwlWordNum;
+ //! Further helps compose words broken apart by tags.
+ DWORD m_dwSubWordNum;
+ };
+
+public:
+ // Public Methods
+ //! Default Constructor
+ BTextViewer(HINSTANCE hInstance, HWND hWndParent, RECT lRect);
+ //! Destructor
+ virtual ~BTextViewer();
+ //! Adds the given text to the window control for rendering.
+ /*! The method appends the given text string to the text currently being
+ stored in m_lpszBuff. To save on constantly resizing m_lpszBuff at
+ each call to this method we instead re-size at increments of
+ BTEXT_BUFF_INC
+ @param szText the text being added to this control.
+ @param dwSize the length of the text being added.
+ */
+ VOID AddText(TCHAR *szText, DWORD dwSize);
+ //! Scrolls the window a full height in a given direction.
+ /*! @param nDirection the direction to scroll
+ \code
+ nDirection > 0 indicates up.
+ nDirection <= 0 indicates down.
+ \endcode
+ */
+ VOID ScrollFullPage(INT nDirection);
+ //! Shows the window control.
+ //! Calls ShowWindow with the SW_SHOW parameter for the underlying window.
+ VOID Show();
+ //! Hides the window control.
+ //! Calls ::ShowWindow with the SW_HIDE parameter for the underlying window.
+ VOID Hide();
+ //! Changes the position and or size of the window.
+ //! Calls ::MoveWindow for the underlying window.
+ VOID MoveWindow(INT x, INT y, INT w, INT h);
+ //! Clears the text from m_lpszBuff and removes the lines from m_BTLines.
+ VOID Clear();
+private:
+ // Private Methods
+ //! Handles the WM_PAINT message for this window control.
+ /*! This is the heart and soul of this window control. Well in theory it
+ is, except most of the real work is done in PreRenderBuff. This method
+ checks to see if the buffer has been pre-rendered, if not it calls
+ PreRenderBuff. Once it is established that the buffer has been
+ pre-rendered the method continues to actually render the text on
+ screen, skipping any lines not expected to be showing on the screen.
+ @param hWnd handle to the window being painted
+ @param hdc device context to do our rendering on.
+ @param ps contains information about what to paint.
+ @note
+ It is expected that
+ \code hWnd == m_hWnd \endcode
+ is always true.
+ Given this assumption this first parameter may be removed in
+ future releases.
+ */
+ INT Paint(HWND hWnd, HDC hdc, PAINTSTRUCT ps);
+ //! Drags the text across the screen.
+ /*! Drags the text across the screen according to the point given and the
+ current value of m_nDragStart.
+ @param lParam contains information about the pointer's position.
+ @note
+ \code
+ xPos = LOWORD(lParam);
+ yPos = HIWORD(lParam);
+ \endcode
+ */
+ VOID DragScreenToPoint(LPARAM lParam);
+ //! Set's the state of the pen.
+ /*! The pen's state includes its current position and whether the pen is
+ considered up or down. This method also tries to detect what the user
+ is intending to do, such as tap a word or scroll a few lines or send the
+ window in a rolling motion.
+ @param fMouseDown indicates the pen is in the down position.
+ @param lParam contains information about the pointer's position.
+ @note
+ \code
+ xPos = LOWORD(lParam);
+ yPos = HIWORD(lParam);
+ \endcode
+ */
+ VOID SetTapState(BOOL fMouseDown, LPARAM lParam);
+ //! Gets the word (if any) at the given point on the screen.
+ /*! Does a methodical search for the word that exists under the given point.
+ @param lParam contains information about the position to be searched.
+ @note
+ \code
+ xPos = LOWORD(lParam);
+ yPos = HIWORD(lParam);
+ \endcode
+
+ @par
+ @note Future implementations will return the word found. The current
+ implementation only displays a MessageBox containing the word.
+ */
+ VOID GetWordAtPoint(LPARAM lParam);
+ //! Rolls the screen until the m_nRollVelocity member has reached a value of 0.
+ /*! @note Future implementations will work a little differently to allow the
+ cancellation of a roll by replacing the main loop in this method with
+ sending a user defined message indicating a roll is requested which will
+ call this method until either m_nRollVelocity is 0 at which point this
+ method will no longer send the user defined message to itself, or the
+ user taps the screen in the middle of a roll resetting the
+ m_nRollVelocity data member.
+ */
+ VOID RollTillStopped();
+ //! The actual call back function for this window.
+ /*! This only acts as a mediator between the callback function we really
+ want and the call back the Win API is expecting.
+ @param hwnd Handle to the window.
+ @param message Specifies the message.
+ @param wParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ @param lParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ */
+ static LRESULT CALLBACK MessageRoute(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+ //! The expected WinProc callback function.
+ /*! Handles any messages sent to this window.
+ @param hwnd Handle to the window.
+ @param message Specifies the message.
+ @param wParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ @param lParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ */
+ LRESULT CALLBACK WndProcBText(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+ //! Sets the Font for the given device context.
+ /*! Tries to determine if changing the font is even necessary. If not it
+ returns immediately otherwise it proceeds to change the font based
+ upon the dwlFontState parameter.
+ @param hdc the device context getting the font change.
+ @param dwlFontState contains flags indicating the new state of the
+ font.
+ @note If called, be sure to free the last created font prior to
+ releasing the device context otherwise a resource leak will
+ occur. Sequential calls to this method do take care of any
+ fonts created in prior calls. Its the last call that needs
+ the extra attention.
+ @see BTextViewer::BTextWord::m_dwlfFontState
+ */
+ VOID SetFont(HDC hdc, DWORDLONG dwlFontState);
+ //! Tries to detect any spaces at the current stream position.
+ /*! Spaces are then discarded (by incrementing the dwWordIndex) and their
+ existence is recorded in the rsState.m_space_encountered parameter.
+ @param rsState contains current rendering information. This is
+ where we store our 'space' encounters.
+ @param dwWordIndex Index into the current stream m_lpszBuff indicating
+ where to be looking for spaces.
+ @return A BOOL value where a non-zero value indicates that spaces were
+ encountered.
+ @note The return value is redundant information, it was the original
+ way I dealt with acknowledging spaces. Since then I have moved
+ onto a structure containing the overall state of the renderer,
+ as such the return value here may change to void in future
+ implementations.
+ */
+ BOOL GetSpaces(RenderState& rsState, DWORD &dwWordIndex);
+ //! Determines location the next word in the stream.
+ /*! Based upon the current stream position this method will determine the
+ extents of the word assumed to have its origin at dwWordIndex.
+ @param rsState the current state of the renderer.
+ @param dwWordIndex where in m_lpszBuff to begin looking.
+ @param dwWordEnd the determined length of the word will land here.
+ @return An INT value indicating the character that terminated the search.
+ @note The return value was originally designed help determine what state
+ we should be in next, but is currently unused and may end up
+ going unused and removed in future releases.
+ */
+ INT NextWord(RenderState& rsState,DWORD dwWordIndex, DWORD &dwWordEnd);
+ //! Determines what HTML tags are at the location in the stream.
+ /*! As HTML tags are encountered they are logged in the rsState parameter
+ for future rendering.
+ @param rsState the current state of the renderer
+ @param dwWordIndex where in m_lpszBuff to begin looking. This value is
+ also updated as the tags are being encountered and
+ recorded.
+ @return An INT indicating how many line breaks <br> were
+ encountered during this call.
+ */
+ INT GetHTMLTags(RenderState& rsState, DWORD &dwWordIndex);
+ //! Identifies what tag element is at the stream position.
+ /*! Once GetHTMLTags encounters a new tag it needs to know what tag it is,
+ and that job falls to this method. This method is also the one
+ responsible for building the FontTagItem linked list representing any
+ <font ...> tags it encounters.
+ @param rsState the current state of the renderer, and the recipient
+ of any changes to that state as a result of the tag
+ encountered. i.e An anchor tag may have an href
+ property attached to it, as such this state will
+ reflect that property upon return.
+ @param dwWordIndex where in m_lpszBuff to begin looking
+ @param dwWordEnd the predetermined length of the tag element being
+ examined.
+ @return A DWORD value indicating which tag was identified.
+ */
+ DWORD IndentifyTag(RenderState& rsState, DWORD dwWordIndex, DWORD dwWordEnd);
+ //! Looks for HTML special entities and translates them into their single character equivalents.
+ /*! @param dwWordIndex where in m_lpszBuff to begin looking.
+ @param dwWordLen where to stop translating
+ @param pbtWord where the new translated string will be copied.
+ @note This causes the given pbtWord object to "own" its own copy of the
+ newly translated string.
+ */
+ VOID InterpretSpecialEntities(DWORD dwWordIndex, DWORD dwWordLen, BTextWord *pbtWord);
+ //! Pre-Renders the internal buffer stream.
+ /*! @par
+ This is the big boss!
+ @par
+ This method is responsible for interpreting how the text stream is
+ intended to be rendered.
+ @par
+ The main body of this function is a loop. At each iteration of the loop
+ a single word is extracted. However every word has the possibility of
+ being preceded with spaces, and/or html tags so we try to parse these
+ out first. Once we have determined that we are at the start of a new
+ word we call NextWord and get the actual word. If it happens that
+ dwWordEnd is 0 after this call we exit, this is the only exit condition
+ from this loop. Once we have the word we then set the font according
+ to the current rendering state and do a "fake" draw of the word to
+ determine its bounding rectangle. Now that we have the word, its font
+ settings, and its boundaries, we store the word for actual rendering
+ later. The loop continues to the next word, and so on...
+ @param hdc the current device context to base our "fake" drawing on.
+ */
+ VOID PreRenderBuff(HDC hdc);
+
+ VOID ClearFontCache(HDC hdc);
+
+ // Private data members
+
+ //! Indicates whether we are in a dragging state.
+ BOOL m_fDragging;
+ //!
+ POINT m_ptLastClick;
+ //! Indicates the yPos that the current dragging motion should start from.
+ INT m_nDragStart;
+ /*! Like m_nDragStart except it keeps track of the true start point
+ as opposed to the m_nDragStart which is updated upon each WM_MOUSEMOVE
+ message sent to this window.
+ */
+ DWORD m_dwTrueStartPos;
+ //! The start time related to m_dwTrueStartPos
+ DWORD m_dwTrueStartTime;
+ //! A virtual velocity used to do the fancy rolling motion.
+ INT m_nRollVelocity;
+ //! Indicates where the top of the "canvas" is in relationship to the top
+ //! of the physical screen.
+ INT m_nTop;
+ //! The actual text stream is stored here.
+ TCHAR* m_lpszBuff;
+ //! Indicates how much memory has been allocated to the text buffer pointed
+ //! to by m_lpszBuff
+ DWORD m_dwBuffSize;
+ //! Indicates the end of the text stream and the actual memory used in
+ //! m_lpszBuff
+ DWORD m_dwBuffEnd;
+ //! Indicates when the time when the pen down event was first registered
+ DWORD m_dwClickTime;
+ //! A handle to the currently selected font.
+ HFONT m_hCurFont;
+ //! A LOGFONT description of the current font.
+ LOGFONT m_lfCurFont;
+ //! Represents rendered words sorted by line.
+ BTextViewer::BTextLines m_BTLines;
+ //! A handle to the window that this object represents.
+ HWND m_hWnd;
+ //! Indicates whether the text stream has been pre-rendered according to
+ //! the current window layout.
+ BOOL m_fPreRendered;
+
+ HFONT m_hFontCache[BTEXT_FONT_CACHE_MAX];
+};
Added: trunk/src/SwordReader_GUI/BibleReader.ICO
===================================================================
(Binary files differ)
Property changes on: trunk/src/SwordReader_GUI/BibleReader.ICO
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/SwordReader_GUI/Main.cpp
===================================================================
--- trunk/src/SwordReader_GUI/Main.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/Main.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,71 @@
+#include "ApplicationInterface.h"
+#include "Main.h"
+#include "swordce.h"
+#include "SwordReaderApp.h"
+
+#ifdef SIMPLE
+ #include "SimpleNavigator.h"
+ #define NAVIGATOR SimpleNavigator
+ #include "../simplegui/resource.h"
+#else
+ #include "Navigator.h"
+ #define NAVIGATOR Navigator
+ #include "resource.h"
+#endif
+
+#include <aygshell.h>
+#include <htmlctrl.h>
+
+NAVIGATOR* g_navigator;
+SWConfig *g_swordConf;
+static SHACTIVATEINFO s_sai;
+
+int WINAPI WinMain( HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPTSTR lpCmdLine,
+ int nCmdShow)
+{
+ SwordReaderApp *app = new SwordReaderApp();
+ MSG msg;
+ HACCEL hAccelTable;
+ bool ignoreMsgs = false;
+ DWORD ignoreTill = GetTickCount();
+
+ // Some visual indication things are taking place...
+ HCURSOR hOldCursor = SetCursor(LoadCursor(NULL, IDC_WAIT));
+
+ // Perform application initialization:
+ if (!app->InitApp(hInstance, nCmdShow))
+ return FALSE; // Either it failed, or it's already loaded...
+
+ hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_BIBLEREADER);
+
+ // Turn off the wait icon...
+ SetCursor(hOldCursor);
+
+ // Main message loop:
+ while (GetMessage(&msg, NULL, 0, 0))
+ {
+ if(msg.message == WM_TXT_START){
+ ignoreMsgs = true;
+ }else if(msg.message == WM_TXT_END){
+ ignoreMsgs = false;
+ ignoreTill = msg.time;
+ }
+ // If we have a button or key event, and we are in the ignore message
+ // window of time we ignore this message
+ if((msg.message == WM_LBUTTONDOWN || msg.message == WM_KEYDOWN) && (ignoreMsgs || msg.time < ignoreTill))
+ continue;
+
+ if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+ return msg.wParam;
+}
+
+namespace sword {
+ char *SWBuf::nullStr = "";
+}
Added: trunk/src/SwordReader_GUI/Main.h
===================================================================
--- trunk/src/SwordReader_GUI/Main.h (rev 0)
+++ trunk/src/SwordReader_GUI/Main.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,16 @@
+#ifndef MAIN_H
+#define MAIN_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "ApplicationInterface.h"
+#include "Utils.h"
+
+int WINAPI WinMain( HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPTSTR lpCmdLine,
+ int nCmdShow);
+
+#endif
Added: trunk/src/SwordReader_GUI/NavBooks.cpp
===================================================================
--- trunk/src/SwordReader_GUI/NavBooks.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/NavBooks.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,162 @@
+#include "ApplicationInterface.h"
+#include "NavBooks.h"
+
+#include "SimpleNavigator.h"
+
+//RECT RECT_SCREEN = {0,0,240,294};
+
+// #define MAXVERTICAL 10 // altered BD Nov 07 to make OK in landscape
+//#define MAXVERTICAL 9
+//#define MAX_OT_COLS 5
+
+
+// #define ROW0 15
+// #define ROW1 30
+// #define ROW2 45
+
+// all uses of ROW1 and ROW2 removed BD Nov 2007 to make buttons fit on landscape
+// the message "Select a book:" will only show in portrait display as it is now
+// re-sited below the buttons - but it's not really that important anyway
+
+#define ROW0 5
+
+NavBooks::NavBooks(SimpleNavigator* navigator): NavPage(navigator) {
+ this->position=&(navigator->position);
+ this->command = "Select a book from the above:";
+ this->maxOTNumber=position->otBookCount();
+ this->maxNumber=position->bookCount();
+}
+
+NavBooks::~NavBooks() {
+}
+
+void NavBooks::paint() {
+ RECT rt;
+ memset(&rt,0,sizeof(rt));
+
+ //RECT_SCREEN.bottom = 320; // portrait or landscape for clearing (Big square area)
+ //RECT_SCREEN.right = 320;
+
+ RECT_SCREEN.bottom = GetSystemMetrics(SM_CYSCREEN) - 2*MENU_HEIGHT;
+ RECT_SCREEN.right = GetSystemMetrics(SM_CXSCREEN);
+
+ rt.right=RECT_SCREEN.right;
+
+ // to see if the whole screen gets filled
+ //rt.bottom=RECT_SCREEN.bottom;
+ //setBackground(0x00000000);
+ //drawText(&rt,UString(L"test"));
+ //setBackground();
+
+ // below simply padded the top of the screen downwards and displayed the string
+ // rt.bottom=ROW0;
+ // clearRect(&rt);
+ // rt.top=ROW0; rt.bottom=ROW1;
+ // drawText(&rt,command);
+ // rt.top=ROW1; rt.bottom=ROW2;
+ // clearRect(&rt);
+
+ // all references below changed to ROW0 :some were formerly ROW2 - amended BD Nov 07
+
+ setBackground(BUTTON_BACKGROUND);
+ setFont(FONT_NAVIGATION);
+ TCHAR** bookNames=position->getBookNames();
+ int current=1;
+ int maxTNumber=maxOTNumber;
+ //padding left of books
+ rt.top=rt.bottom; rt.bottom=RECT_SCREEN.bottom;
+ rt.right=PADDING_WIDTH;
+ clearRect(&rt);
+ while (current<=maxNumber) {
+ //Paint one testament
+ while (current<=maxTNumber) {
+ int colStart=current;
+ rt.left=rt.right; rt.right=rt.left+BUTTON_WIDTH_BK; rt.bottom=ROW0;
+ while ((current<=maxTNumber)&&(current-colStart<getMaxRows())) {
+ //padding top of button
+ rt.top=rt.bottom;rt.bottom=rt.top+PADDING_HEIGHT;
+ clearRect(&rt);
+ //button
+ rt.top=rt.bottom;rt.bottom=rt.top+BUTTON_HEIGHT;
+ drawText(&rt,bookNames[current-1],3);
+ current++;
+ }
+
+ // padding below buttons
+ rt.top=rt.bottom;rt.bottom=RECT_SCREEN.bottom;
+ clearRect(&rt);
+ // padding right of buttons
+ // rt.top=ROW2; rt.left=rt.right; rt.right=rt.left+PADDING_WIDTH;
+ rt.top=ROW0; rt.left=rt.right; rt.right=rt.left+PADDING_WIDTH;
+ clearRect(&rt);
+ // six lines above commented out while testing BD
+ }
+ if (current<maxNumber) {
+ //space between testaments
+ maxTNumber=maxNumber;
+ rt.right=rt.left+PADDING_WIDTH+PADDING_WIDTH;
+ // rt.right=rt.left+BUTTON_WIDTH+PADDING_WIDTH;
+ clearRect(&rt);
+ }
+
+ }
+ //space right of the buttons
+ rt.left=rt.right; rt.right=RECT_SCREEN.right; rt.bottom=RECT_SCREEN.bottom;
+ clearRect(&rt);
+ // next three lines draw text which will only be seen in portrait mode
+ setBackground(0xFFFFFFFF); // white
+ rt.left=0;
+ rt.top = ROW0 + 20 + getMaxRows()*(BUTTON_HEIGHT+PADDING_HEIGHT);
+ rt.bottom=ROW0+20+BUTTON_HEIGHT+getMaxRows()*(BUTTON_HEIGHT+PADDING_HEIGHT);
+ drawText(&rt,command);
+ setBackground();
+ setFont();
+}
+
+int NavBooks::numberAt(int x, int y) {
+ // The addition portion adds a partial column to the total
+ int totalOTCols = maxOTNumber / getMaxRows() + (maxOTNumber % getMaxRows() ? 1 : 0);
+
+ if ((y>=ROW0)&&(y < ROW0 + getMaxRows()*(PADDING_HEIGHT+BUTTON_HEIGHT))) {
+ y=y-ROW0;
+
+ if ((x>=PADDING_WIDTH)&&(x<PADDING_WIDTH+totalOTCols*(BUTTON_WIDTH_BK+PADDING_WIDTH))) {
+ x=x-PADDING_WIDTH;
+ int horizontal=(x/(PADDING_WIDTH+BUTTON_WIDTH_BK));
+ x=x-horizontal*(PADDING_WIDTH+BUTTON_WIDTH_BK);
+ int vertical=(y/(PADDING_HEIGHT+BUTTON_HEIGHT));
+ if (vertical<getMaxRows()) {
+ y=y-vertical*(PADDING_HEIGHT+BUTTON_HEIGHT);
+ //button is in bottom left corner
+ if ((x<BUTTON_WIDTH_BK)&&(y>=PADDING_HEIGHT)) {
+ int current=horizontal*getMaxRows()+vertical+1;
+ if (current<=maxOTNumber) return current; // it was a valid OT book
+ }
+ }
+ }
+ // it wasn't an old testament book, so try for NT book
+ else if (x>=PADDING_WIDTH+totalOTCols*(BUTTON_WIDTH_BK+PADDING_WIDTH)) {
+ x=x-(PADDING_WIDTH+totalOTCols*(BUTTON_WIDTH_BK+PADDING_WIDTH));
+ int horizontal=(x/(PADDING_WIDTH+BUTTON_WIDTH_BK));
+ x=x-horizontal*(PADDING_WIDTH+BUTTON_WIDTH_BK);
+ int vertical=(y/(PADDING_HEIGHT+BUTTON_HEIGHT));
+ if (vertical<getMaxRows()) {
+ y=y-vertical*(PADDING_HEIGHT+BUTTON_HEIGHT);
+ //button is in bottom left corner
+ if ((x<BUTTON_WIDTH_BK)&&(y>=PADDING_HEIGHT)) {
+ int current=horizontal*getMaxRows()+vertical+maxOTNumber+1;
+ if (current<=maxNumber) return current;
+ }
+ }
+ }
+ }
+ return -1;
+}
+
+void NavBooks::userTap(int x, int y) {
+ int number=numberAt(x,y);
+ if (number>0) {
+ navigator->setBook(number);
+ navigator->setMode(MODE_CHAP);
+ }
+}
Added: trunk/src/SwordReader_GUI/NavBooks.h
===================================================================
--- trunk/src/SwordReader_GUI/NavBooks.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavBooks.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,34 @@
+#ifndef NAVBOOKS_H
+#define NAVBOOKS_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+#include "WCString.h"
+#include "NavPage.h"
+
+class SimpleNavigator;
+class SwordIndex;
+
+class NavBooks: public NavPage {
+public:
+ NavBooks(SimpleNavigator* navigator);
+ virtual ~NavBooks();
+ // redraw the screen. This should use methods in ApplicationInterface.h to do the drawing
+ void paint();
+ // signals that the user has tapped somewhere.
+ // returns: the number that the user has tapped. -1 if no number
+ void userTap(int x, int y);
+ int getMaxRows() {
+ return (GetSystemMetrics(SM_CYSCREEN) - 2*MENU_HEIGHT) / (BUTTON_HEIGHT + PADDING_HEIGHT) - 1;
+ };
+private:
+ int numberAt(int x, int y);
+ SwordIndex* position;
+ WCString command;
+ int maxNumber, maxOTNumber;
+};
+
+#endif
Added: trunk/src/SwordReader_GUI/NavChap.cpp
===================================================================
--- trunk/src/SwordReader_GUI/NavChap.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/NavChap.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,24 @@
+#include "NavChap.h"
+#include "ApplicationInterface.h"
+#include "NavFind.h"
+#include "SimpleNavigator.h"
+
+NavChap::NavChap(SimpleNavigator* navigator):NavNumbers(navigator){
+ command=L"Select a chapter";
+}
+
+NavChap::~NavChap(){
+}
+
+void NavChap::show() {
+ maxNumber=navigator->chapCount();
+ NavNumbers::show();
+}
+
+void NavChap::userTap(int x, int y) {
+ int number=numberAt(x,y);
+ if (number>0) {
+ navigator->setChap(number);
+ navigator->setMode(MODE_VERSE);
+ }
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/NavChap.h
===================================================================
--- trunk/src/SwordReader_GUI/NavChap.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavChap.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,22 @@
+#ifndef NAVCHAP_H
+#define NAVCHAP_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+#include "NavPage.h"
+#include "NavNumbers.h"
+
+class SimpleNavigator;
+
+class NavChap : public NavNumbers {
+public:
+ NavChap(SimpleNavigator* navigator);
+ virtual ~NavChap();
+ void show();
+ void userTap(int x, int y);
+};
+
+#endif
Added: trunk/src/SwordReader_GUI/NavFind.cpp
===================================================================
--- trunk/src/SwordReader_GUI/NavFind.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/NavFind.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,269 @@
+#include "ApplicationInterface.h"
+#include "NavFind.h"
+#include "SimpleNavigator.h"
+
+#include <aygshell.h>
+
+#define check(checkButtonHWND) SendMessage(checkButtonHWND,BM_SETCHECK,BST_CHECKED,0);
+#define uncheck(checkButtonHWND) SendMessage(checkButtonHWND,BM_SETCHECK,BST_UNCHECKED,0);
+
+// added Nov 2007 to check mode before painting 'find' listbox - BD
+// this was written as a separate function in case we want to call it from elsewhere
+int IsPortrait() {
+ if (GetSystemMetrics(SM_CYSCREEN) > GetSystemMetrics(SM_CXSCREEN)) return(100);
+ return(0);
+}
+
+
+NavFind::NavFind(SimpleNavigator* navigator) : NavPage(navigator) {
+ // register ID's so we get feedback
+ searchID=navigator->getID();
+ rangeBibleID=navigator->getID();
+ rangeTestamentID=navigator->getID();
+ rangeBookID=navigator->getID();
+ methodMultiwordID=navigator->getID();
+ methodExactphraseID=navigator->getID();
+ goID=navigator->getID();
+ resultsID=navigator->getID();
+
+ // create windows ce managed controls
+ queryEdit = CreateWindow(_T("edit"), NULL,
+ WS_CHILD | ES_AUTOHSCROLL | ES_LEFT | WS_TABSTOP | WS_BORDER,
+ 0,0,0,0,
+ g_hWnd, NULL, g_hInst, NULL);
+ search = CreateWindow(_T("button"), L"Search",
+ WS_CHILD | BS_PUSHBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(searchID), g_hInst, NULL);
+
+ // Radio Buttons
+ rangeBible = CreateWindow(_T("button"), L"Whole bible",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(rangeBibleID),g_hInst, NULL);
+ rangeTestament = CreateWindow(_T("button"), L"This testament",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(rangeTestamentID),g_hInst, NULL);
+ rangeBook = CreateWindow(_T("button"), L"This book",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(rangeBookID),g_hInst, NULL);
+ methodMultiword = CreateWindow(_T("button"), L"Multi-word",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(methodMultiwordID),g_hInst, NULL);
+ methodExactphrase = CreateWindow(_T("button"), L"Exact phrase",
+ WS_CHILD | BS_RADIOBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(methodExactphraseID),g_hInst, NULL);
+ check(rangeBook);
+ rangeMode=RANGEBOOK;
+ check(methodMultiword);
+ methodMode=METHODMULTIWORD;
+
+ results = CreateWindow(_T("listbox"),NULL,
+ WS_CHILD | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_NOTIFY | WS_BORDER | LBS_NOINTEGRALHEIGHT,
+ 0,0,0,0,
+ g_hWnd, registerID(resultsID), g_hInst, NULL); //bottom row of screen
+ // the last figure in above line needs to be 100 for landscape or 173 for portrait (scrHeight)
+
+ progressBar = CreateWindow(PROGRESS_CLASS, L"",
+ WS_CHILD | WS_BORDER | PBS_SMOOTH,
+ 0,0,0,0,
+ g_hWnd, NULL, g_hInst, NULL);
+ go = CreateWindow(_T("button"), L"Go to",
+ WS_CHILD | BS_PUSHBUTTON,
+ 0,0,0,0,
+ g_hWnd, registerID(goID), g_hInst, NULL);
+ // HTML control
+ // preview=new TextControl(80,120,160,148); // this is OK for portrait
+ // we now change the preview size for landscape. Note, however that
+ // preview window does not have scroll bars. Are long verses going to
+ // become a problem? Maybe it's not that important. If it is, then add scrollbars.
+
+ preview=new TextControl(0,0,0,0, true); // the last figure is the height
+ // I haven't bothered changing the height - what is off-screen simply doesn't show.
+ // There is no test and no error.
+ preview->clearText();
+ preview->addText(L"preview");
+ preview->endOfText();
+ placeWidgets();
+}
+
+NavFind::~NavFind() {
+ delete preview;
+}
+
+void NavFind::show() {
+ // set our controls to visible
+ ShowWindow(queryEdit,SW_SHOW);
+ ShowWindow(search,SW_SHOW);
+
+ ShowWindow(rangeBible,SW_SHOW);
+ ShowWindow(rangeTestament,SW_SHOW);
+ ShowWindow(rangeBook,SW_SHOW);
+ ShowWindow(methodMultiword,SW_SHOW);
+ ShowWindow(methodExactphrase,SW_SHOW);
+ //ShowWindow(title,SW_SHOW);
+
+ ShowWindow(results,SW_SHOW);
+ ShowWindow(progressBar,SW_SHOW);
+ ShowWindow(go,SW_SHOW);
+
+ // propagate to HTML control
+ preview->show();
+}
+
+void NavFind::hide() {
+ // set our controls to visible
+ ShowWindow(queryEdit,SW_HIDE);
+ ShowWindow(search,SW_HIDE);
+
+ ShowWindow(rangeBible,SW_HIDE);
+ ShowWindow(rangeTestament,SW_HIDE);
+ ShowWindow(rangeBook,SW_HIDE);
+ ShowWindow(methodMultiword,SW_HIDE);
+ ShowWindow(methodExactphrase,SW_HIDE);
+ //ShowWindow(title,SW_HIDE);
+
+ ShowWindow(results,SW_HIDE);
+ ShowWindow(progressBar,SW_HIDE);
+ ShowWindow(go,SW_HIDE);
+ // propagate to HTML control
+ preview->hide();
+}
+
+void NavFind::paint() {
+ placeWidgets();
+ // this method can be used to do custom painting, for an example, see NavBooks::paint()
+ // propagate to HTML control
+ preview->paint();
+}
+
+void NavFind::placeWidgets(){
+ int width = GetSystemMetrics(SM_CXSCREEN);
+ int height = GetSystemMetrics(SM_CYSCREEN);
+ 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 + 2*MENU_HEIGHT);
+ 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(queryEdit,col0, row0, queryW, btnH,TRUE);
+ MoveWindow(search,col0 + queryW + pad, row0, searchBtnW, btnH,TRUE);
+ MoveWindow(rangeBible,col0,row1,textW,btnH,TRUE);
+ MoveWindow(rangeTestament,col0,row2,textW,btnH,TRUE);
+ MoveWindow(rangeBook,col0,row3,textW,btnH,TRUE);
+ MoveWindow(methodMultiword,col1,row1,textW,btnH,TRUE);
+ MoveWindow(methodExactphrase,col1,row2,textW,btnH,TRUE);
+ MoveWindow(results,margin,row4,listW,listH,TRUE);
+ MoveWindow(progressBar,col0 + listW + pad,row4,progW,btnH,TRUE);
+ MoveWindow(go,col0 + listW + pad + progW + pad,row4, gotoBtnW,btnH,TRUE);
+ preview->moveTo(margin + listW + pad,row5,prevW,prevH);
+}
+
+void NavFind::buttonClicked(int id) {
+ // is it one of our registered ID's?
+ if (id==searchID) {
+ searchFor(getText(queryEdit));
+ refreshScreen();
+ } else if (id==rangeBibleID) {
+ check(rangeBible);
+ uncheck(rangeTestament);
+ uncheck(rangeBook);
+ rangeMode=RANGEBIBLE;
+ } else if (id==rangeTestamentID) {
+ uncheck(rangeBible);
+ check(rangeTestament);
+ uncheck(rangeBook);
+ rangeMode=RANGETESTAMENT;
+ } else if (id==rangeBookID) {
+ uncheck(rangeBible);
+ uncheck(rangeTestament);
+ check(rangeBook);
+ rangeMode=RANGEBOOK;
+ } else if (id==methodMultiwordID) {
+ check(methodMultiword);
+ uncheck(methodExactphrase);
+ methodMode=METHODMULTIWORD;
+ } else if (id==methodExactphraseID) {
+ check(methodExactphrase);
+ uncheck(methodMultiword);
+ methodMode=METHODEXACTPHRASE;
+ } else if (id==resultsID) {
+ unsigned int pos= SendMessage (results, LB_GETCURSEL, 0, 0);
+ if ((pos!=LB_ERR)&&(pos<verses.size())) {
+ previewVerse(&verses[pos]);
+ }
+ } else if (id==goID) {
+ unsigned int pos= SendMessage (results, LB_GETCURSEL, 0, 0);
+ if ((pos!=LB_ERR)&&(pos<verses.size())) {
+ navigateToVerse(&verses[pos]);
+ }
+ }
+}
+
+void NavFind::previewVerse(Verse* verse) {
+ preview->clearText();
+ // next line was commented out
+ // preview->addText(SwordIndex::verseToString(verse));
+ // and the line below left in
+ preview->addText(navigator->position.verseText(verse));
+ preview->endOfText();
+}
+
+void NavFind::navigateToVerse(Verse* verse) {
+ navigator->position.setVerseKey(verse);
+ navigator->chapterCache=false;
+ navigator->setMode(MODE_TEXT);
+}
+
+
+void NavFind::clearResults() {
+ SendMessage (results, LB_RESETCONTENT,0,0);
+ preview->clearText();
+ preview->addText(L"preview");
+ preview->endOfText();
+ verses.clear();
+}
+
+void NavFind::setProgress(int percent) {
+ SendMessage(progressBar,PBM_SETPOS, percent, 0);
+}
+
+void NavFind::addResult(const WCString &verseStr) {
+ Verse* verse=new Verse(verseStr.c_str());
+ verses.push_back(*verse);
+ WCString verseString = SwordIndex::verseToString(verse);
+ SendMessage (results, LB_ADDSTRING, 0, (LPARAM)(LPCTSTR)verseString.w_str());
+ delete verse;
+}
+
+void NavFind::searchFor(const WCString &query) {
+ clearResults();
+ setProgress(5);
+ navigator->position.search(query,rangeMode,methodMode,this);
+}
+
+WCString NavFind::GetSearchText(HWND edit) {
+ TCHAR chars[MAX_LOADSTRING];
+ SendMessage(edit,WM_GETTEXT,(WPARAM)MAX_LOADSTRING,(LPARAM)chars);
+ chars[MAX_LOADSTRING-1]=0; // in case the buffer was exceeded
+ return WCString(chars);
+}
Added: trunk/src/SwordReader_GUI/NavFind.h
===================================================================
--- trunk/src/SwordReader_GUI/NavFind.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavFind.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,46 @@
+#ifndef NAVFIND_H
+#define NAVFIND_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+#include "NavPage.h"
+#include "TextControl.h"
+#include "SwordIndex.h"
+
+class SimpleNavigator;
+
+class NavFind: public NavPage, public Searcher {
+public:
+ NavFind(SimpleNavigator* navigator);
+ virtual ~NavFind();
+ void show();
+ void paint();
+ void hide();
+ void buttonClicked(int id);
+ void searchFor(const WCString &query);
+ virtual void setProgress(int percent);
+ virtual void addResult(const WCString &verseStr);
+ void placeWidgets();
+ WCString GetSearchText(HWND edit);
+private:
+ //Navigator* navigator;
+ std::vector<Verse> verses;
+ HWND queryEdit,search;
+ HWND rangeBible, rangeTestament, rangeBook;
+ HWND methodMultiword, methodExactphrase;
+ HWND progressBar, results, title, go;
+ TextControl* preview;
+ int searchID;
+ int rangeBibleID, rangeTestamentID, rangeBookID;
+ int methodMultiwordID, methodExactphraseID;
+ int goID, resultsID;
+ void clearResults();
+ void previewVerse(Verse* verse);
+ void navigateToVerse(Verse* verse);
+ int rangeMode;
+ int methodMode;
+};
+#endif
Added: trunk/src/SwordReader_GUI/NavNumbers.cpp
===================================================================
--- trunk/src/SwordReader_GUI/NavNumbers.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/NavNumbers.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,140 @@
+#include "ApplicationInterface.h"
+#include "NavNumbers.h"
+
+#include "SimpleNavigator.h"
+
+//RECT RECT_SCREEN = {0,0,240,294};
+
+
+#define MAXHORIZONTAL 10
+
+#define MAXNUMBERS (getMaxRows()*MAXHORIZONTAL)
+
+#define ROW0 5
+#define LASTROW ROW0+getMaxRows()*(BUTTON_HEIGHT+PADDING_HEIGHT)
+
+NavNumbers::NavNumbers(SimpleNavigator* navigator):NavPage(navigator) {
+}
+
+NavNumbers::~NavNumbers() {
+}
+
+void NavNumbers::show() {
+ start=1;
+}
+
+void NavNumbers::paint() {
+ RECT rt;
+ memset(&rt,0,sizeof(rt));
+
+ RECT_SCREEN.bottom = GetSystemMetrics(SM_CYSCREEN) - 2*MENU_HEIGHT;
+ RECT_SCREEN.right = GetSystemMetrics(SM_CXSCREEN);
+
+ rt.right=RECT_SCREEN.right;
+
+ // to see if the whole screen gets filled
+ //rt.bottom=RECT_SCREEN.bottom;
+ //setBackground(0x00000000);
+ //drawText(&rt,UString(L"test"));
+ //setBackground();
+
+ // below simply padded the top of the screen downwards and displayed the string
+
+ // rt.bottom=ROW0;
+ // clearRect(&rt);
+ // rt.bottom=ROW0;
+ // clearRect(&rt);
+
+ // rt.top=ROW0; rt.bottom=ROW1;
+ // drawText(&rt,command);
+
+ // rt.top=ROW1; rt.bottom=ROW2;
+ // clearRect(&rt);
+
+ TCHAR buttonText[4];
+ setBackground(BUTTON_BACKGROUND);
+ setFont(FONT_NAVIGATION);
+ int current=start;
+ // left of first buttons
+ rt.right=rt.left+PADDING_WIDTH;
+ rt.top=rt.bottom; rt.bottom=LASTROW;
+ clearRect(&rt);
+
+ while ((current<=maxNumber)&&(current<start+MAXNUMBERS)) {
+ int colStart=current;
+ rt.left=rt.right; rt.right=rt.left+BUTTON_WIDTH_NM; rt.bottom=ROW0;
+ while ((current<=maxNumber)&&(current-colStart<getMaxRows())) {
+ //padding above button
+ rt.top=rt.bottom;rt.bottom=rt.top+PADDING_HEIGHT;
+ clearRect(&rt);
+ //button
+ rt.top=rt.bottom;rt.bottom=rt.top+BUTTON_HEIGHT;
+ _itow(current,buttonText,10);
+ drawRText(&rt,buttonText,wcslen(buttonText));
+ current++;
+ }
+ //padding below buttons
+ rt.top=rt.bottom;rt.bottom=LASTROW;
+ clearRect(&rt);
+ //padding right of buttons
+ rt.top=ROW0; rt.left=rt.right; rt.right=rt.left+PADDING_WIDTH;
+ clearRect(&rt);
+ }
+ //area right of buttons
+ rt.left=rt.right; rt.right=RECT_SCREEN.right;
+ clearRect(&rt);
+ rt.left=RECT_SCREEN.left;rt.right=RECT_SCREEN.right; //rt.bottom is still LASTROW
+ //optional 'more' button
+ if ((start!=1)||(current<maxNumber)) {
+ rt.top=rt.bottom;rt.bottom=rt.top+PADDING_HEIGHT;
+ clearRect(&rt);
+ rt.top=rt.bottom; rt.bottom=rt.top+BUTTON_HEIGHT;
+ rt.right=(RECT_SCREEN.right/3);
+ clearRect(&rt);
+ rt.left=rt.right;rt.right=RECT_SCREEN.right-rt.left;
+ drawText(&rt,"More...");
+ rt.left=rt.right;rt.right=RECT_SCREEN.right;
+ clearRect(&rt);
+ rt.left=RECT_SCREEN.left;
+ }
+ //space below the buttons
+ rt.top=rt.bottom; rt.bottom=RECT_SCREEN.bottom;
+ clearRect(&rt);
+
+ setBackground();
+ setFont();
+}
+
+int NavNumbers::numberAt(int x, int y) {
+ // y=y-ROW2;
+ y=y-ROW0;
+ if (x>0) {
+ int horizontal=(x/(PADDING_WIDTH+BUTTON_WIDTH_NM));
+ if (horizontal<MAXHORIZONTAL) {
+ x=x-horizontal*(PADDING_HEIGHT+BUTTON_HEIGHT);
+ int vertical=(y/(PADDING_HEIGHT+BUTTON_HEIGHT));
+ if (vertical<getMaxRows()) {
+ y=y-vertical*(PADDING_HEIGHT+BUTTON_HEIGHT);
+ //button is in bottom right corner
+ if ((x>=PADDING_WIDTH)&&(y>=PADDING_HEIGHT)) {
+ int current=horizontal*getMaxRows()+vertical+start;
+ if (current<=maxNumber) return current;
+ }
+ }
+ else if (vertical==getMaxRows()) { // The 'more' button is here
+ y=y-vertical*(PADDING_HEIGHT+BUTTON_HEIGHT);
+ if (y>=PADDING_HEIGHT) {
+ x=x+horizontal*(PADDING_HEIGHT+BUTTON_HEIGHT); //undo
+ if (((2*x)>=(RECT_SCREEN.right-x))&&((2*(RECT_SCREEN.right-x))>=x)) {
+ if ((start+MAXNUMBERS)>maxNumber)
+ start=1;
+ else
+ start=start+MAXNUMBERS;
+ refreshScreen();
+ }
+ }
+ }
+ }
+ }
+ return -1;
+}
Added: trunk/src/SwordReader_GUI/NavNumbers.h
===================================================================
--- trunk/src/SwordReader_GUI/NavNumbers.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavNumbers.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,35 @@
+#ifndef NAVNUMBERS_H
+#define NAVNUMBERS_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+#include "NavPage.h"
+#include "ApplicationInterface.h"
+
+class SimpleNavigator;
+
+class NavNumbers: public NavPage {
+public:
+ NavNumbers(SimpleNavigator* navigator);
+ virtual ~NavNumbers();
+
+ // initialize with this maximum number
+ void show();
+ // redraw the screen. This should use methods in ApplicationInterface.h to do the drawing
+ void paint();
+ // signals that the user has tapped somewhere.
+ // returns: the number that the user has tapped. -1 if no number
+ int numberAt(int x, int y);
+ int getMaxRows() {
+ return (GetSystemMetrics(SM_CYSCREEN) - 2*MENU_HEIGHT) / (BUTTON_HEIGHT + PADDING_HEIGHT) - 1;
+ };
+protected:
+ int maxNumber;
+ WCString command;
+ int start;
+};
+
+#endif
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/NavPage.h
===================================================================
--- trunk/src/SwordReader_GUI/NavPage.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavPage.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,67 @@
+#ifndef NAVPAGE_H
+#define NAVPAGE_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+
+class SimpleNavigator;
+
+class NavPage
+{
+public:
+ // In a derived class, use this constructor to instantiate visual
+ // components using CreateWindow. For example:
+ //
+ // anEdit = CreateWindow(_T("edit"), NULL,
+ // WS_CHILD | WS_BORDER,
+ // RECT_SCREEN.left, RECT_SCREEN.top, 30, 20,
+ // g_hWnd, NULL, g_hInst, NULL);
+ //
+ // In order to listen to button clicks, they first need to be
+ // registered here in the navigator like this:
+ //
+ // aButtonID=navigator->getID();
+ //
+ // aButton = CreateWindow(_T("button"), L"Go",
+ // WS_CHILD | BS_PUSHBUTTON,
+ // RECT_SCREEN.right-30, RECT_SCREEN.top, 30, 20,
+ // g_hWnd, registerID(goButtonID), g_hInst, NULL);
+ NavPage(SimpleNavigator* navigator) {
+ portrait = inPortraitMode();
+ this->navigator=navigator;
+ };
+ // Destructor
+ virtual ~NavPage() {};
+ // In the derived class, show all visual components here using
+ // ShowWindow. For example:
+ //
+ // ShowWindow(anEdit,SW_SHOW);
+ virtual void show() {};
+ // In the derived class, hide all visual components here using
+ // ShowWindow. For example:
+ //
+ // ShowWindow(anEdit,SW_HIDE);
+ virtual void hide() {};
+ // In the derived class, use this method to do all custom
+ // painting, using methods from ApplicationInterface.cpp. Example:
+ //
+ // drawText(&RECT_SCREEN, L"Under construction");
+ virtual void paint() {};
+ // In the derived class, use this method to listen to buttons being
+ // clicked. See the comment in the constructor on how to obtain the id
+ virtual void buttonClicked(int id) {};
+ // In the derived class, use this method to listen to 'mouse clicks'
+ // that do not occur inside visual components.
+ virtual void userTap(int x, int y) {};
+ // In the derived class, use this method to listen to keys being pressed
+ virtual void keyDown(WPARAM id, LPARAM lparam) {};
+protected:
+ SimpleNavigator* navigator;
+ // Used to determine if the screen switched from portrait to landscape and visa versa.
+ bool portrait;
+};
+
+#endif
Added: trunk/src/SwordReader_GUI/NavRenderText.cpp
===================================================================
--- trunk/src/SwordReader_GUI/NavRenderText.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/NavRenderText.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,157 @@
+#include "ApplicationInterface.h"
+#include "NavRenderText.h"
+#include "SimpleNavigator.h"
+
+
+#include <swordce.h>
+#include <windows.h>
+#include <sipapi.h>
+#include <shlobj.h>
+#include <prsht.h>
+#include <aygshell.h>
+
+#include "utils.h"
+
+
+//#define getMenu(window) (HMENU)SendMessage(window, SHCMBM_GETMENU, (WPARAM)0, (LPARAM)0)
+
+NavRenderText::NavRenderText(SimpleNavigator* navigator):NavPage(navigator) {
+ textControl = new VerseTextControl(RECT_SCREEN.left, RECT_SCREEN.top, RECT_SCREEN.right, RECT_SCREEN.bottom);
+}
+
+NavRenderText::~NavRenderText() {
+ delete textControl;
+}
+
+void NavRenderText::show() {
+ textControl->show();
+ showText();
+}
+
+void NavRenderText::showText() {
+ int verse=navigator->getVerse();
+ if (!(navigator->chapterCache)) {
+ textControl->clearText();
+ textControl->hide();
+ load();
+ textControl->show();
+ if (verse!=1)
+ textControl->gotoAnchor(verse);
+ }
+ else
+ textControl->gotoAnchor(verse);
+ navigator->chapterCache=true;
+}
+
+void NavRenderText::load() {
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_BOOK, false);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_CHAP, false);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_VERSE, false);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_TEXT, false);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_FIND, false);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_MENU, false);
+
+
+ // Suspend user interaction until this page is fully loaded.
+ PostThreadMessage(g_tMain, WM_TXT_START, NULL, NULL);
+
+ navigator->position.setMark();
+ navigator->position.setVerse(1);
+ textControl->addText("<html><head><meta name=\"MobileOptimized\" content=\"240\"><title></title></head><body>"); // a <style> section presumably gets skipped
+ WCString s;
+ WCString heading;
+ char buf[10];
+ while (true) {
+ int pvHeading = 0;
+ do {
+ sprintf(buf, "%i", pvHeading++);
+ SWBuf preverseHeading = navigator->position.bible->getEntryAttributes()["Heading"]["Preverse"][buf].c_str();
+ if (preverseHeading.length()) {
+ textControl->addText(L"<br /><br /><b>");
+ textControl->addText((WCHAR *)navigator->position.bible->RenderText(preverseHeading)); // do any tag conversions for our requested markup
+ textControl->addText(L"</b><br /><br />");
+ }
+ else break;
+ } while (true);
+ s = navigator->position.verseText();
+ if (s.length() > 0) {
+ textControl->addAnchoredText(getVerseHeader(),navigator->position.getVerse());
+ textControl->addText(s);
+ }
+ if (navigator->position.getVerse()==navigator->position.verseCount())
+ break;
+ else
+ navigator->position.next();
+ }
+ textControl->addText("</body></html>");
+ navigator->position.jumpBack();
+
+ textControl->endOfText();
+
+ // Allow user interaction since this page is now fully loaded.
+ PostThreadMessage(g_tMain, WM_TXT_END, NULL, NULL);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_BOOK, true);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_CHAP, true);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_VERSE, true);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_TEXT, true);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_FIND, true);
+ SendMessage(g_hwndCB, TB_ENABLEBUTTON, MENU_MENU, true);
+
+
+ textControl->focus();
+ refreshScreen();
+ textControl->paint();
+}
+
+void NavRenderText::hide() {
+ textControl->hide();
+}
+
+void NavRenderText::paint() {
+ textControl->paint();
+}
+
+WCString NavRenderText::getVerseHeader() {
+ wchar_t wverse[16] = {0};
+ wchar_t wchap[16] = {0};
+ _itow(navigator->position.getVerse(), wverse, 10);
+ _itow(navigator->position.getChap(), wchap, 10);
+
+ WCString result = "\n<b><a name=\"";
+ result += wverse;
+ result += "\">";
+ if (navigator->position.getVerse() == 1) {
+ result += wchap;
+ result += ":";
+ }
+ result += wverse;
+ result += "</a></b> ";
+
+ return result;
+}
+
+void NavRenderText::keyDown(WPARAM id, LPARAM lparam) {
+ switch (id) {
+ case VK_UP:
+ navigator->position--;
+ if (navigator->position.getVerse()==navigator->position.verseCount())
+ navigator->chapterCache=false;
+ break;
+ case VK_DOWN:
+ navigator->position++;
+ if (navigator->position.getVerse()==1) navigator->chapterCache=false;
+ break;
+ case VK_LEFT:
+ navigator->position.setVerse(1);
+ navigator->position--;
+ navigator->chapterCache=false;
+ break;
+ case VK_RIGHT:
+ navigator->position.setVerse(navigator->position.verseCount());
+ navigator->position++;
+ navigator->chapterCache=false;
+ break;
+ }
+ showText();
+ navigator->updateTitle();
+}
Added: trunk/src/SwordReader_GUI/NavRenderText.h
===================================================================
--- trunk/src/SwordReader_GUI/NavRenderText.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavRenderText.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,33 @@
+#ifndef NAVRENDERTEXT_H
+#define NAVRENDERTEXT_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+#include "NavPage.h"
+#include "VerseTextControl.h"
+
+class SimpleNavigator;
+
+class NavRenderText: public NavPage {
+public:
+ int verseCount; //number of verses on screen
+
+ NavRenderText(SimpleNavigator* navigator);
+ virtual ~NavRenderText();
+
+ void show();
+ void paint();
+ void hide();
+ void keyDown(WPARAM id, LPARAM lparam);
+private:
+// HWND htmlControl;
+ VerseTextControl* textControl;
+ void load();
+ void showText();
+ WCString getVerseHeader();
+};
+
+#endif // !defined(NAVRENDERTEXT_H)
Added: trunk/src/SwordReader_GUI/NavVerse.cpp
===================================================================
--- trunk/src/SwordReader_GUI/NavVerse.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/NavVerse.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,24 @@
+#include "NavVerse.h"
+#include "ApplicationInterface.h"
+#include "NavFind.h"
+#include "SimpleNavigator.h"
+
+NavVerse::NavVerse(SimpleNavigator* navigator):NavNumbers(navigator){
+ command=L"Select a verse";
+}
+
+NavVerse::~NavVerse(){
+}
+
+void NavVerse::show() {
+ NavNumbers::show();
+ maxNumber=navigator->verseCount();
+}
+
+void NavVerse::userTap(int x, int y) {
+ int number=numberAt(x,y);
+ if (number>0) {
+ navigator->setVerse(number);
+ navigator->setMode(MODE_TEXT);
+ }
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/NavVerse.h
===================================================================
--- trunk/src/SwordReader_GUI/NavVerse.h (rev 0)
+++ trunk/src/SwordReader_GUI/NavVerse.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,25 @@
+#ifndef NAVVERSE_H
+#define NAVVERSE_H
+
+class Navigator;
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "utils.h"
+#include "NavPage.h"
+#include "NavNumbers.h"
+
+class SimpleNavigator;
+
+class NavVerse : public NavNumbers
+{
+public:
+ NavVerse(SimpleNavigator* navigator);
+ virtual ~NavVerse();
+ void show();
+ void userTap(int x, int y);
+};
+
+#endif
Added: trunk/src/SwordReader_GUI/Navigator.cpp
===================================================================
--- trunk/src/SwordReader_GUI/Navigator.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/Navigator.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,10 @@
+#include "Navigator.h"
+
+Navigator::Navigator(RECT* screen):SimpleNavigator(screen) {
+ text2=pages[MODE_TEXT2]=new ConstructionPage(this);
+ menus[MODE_TEXT2]=MENU_TEXT2;
+}
+
+Navigator::~Navigator() {
+ delete text2;
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/Navigator.h
===================================================================
--- trunk/src/SwordReader_GUI/Navigator.h (rev 0)
+++ trunk/src/SwordReader_GUI/Navigator.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,31 @@
+#ifndef NAVIGATOR_H
+#define NAVIGATOR_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "SimpleNavigator.h"
+#include "ApplicationInterface.h"
+
+#define MODE_TEXT2 5
+
+class NavPage;
+
+class ConstructionPage: public NavPage {
+ public:
+ ConstructionPage(SimpleNavigator* navigator):NavPage(navigator) {};
+ void paint() {
+ drawText(&RECT_SCREEN, L"Under construction");
+ };
+};
+
+class Navigator : public SimpleNavigator {
+ private:
+ NavPage* text2;
+ public:
+ Navigator(RECT* screen);
+ virtual ~Navigator();
+};
+
+#endif
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/SRWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRWidget.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/SRWidget.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,23 @@
+#include "SRWidget.h"
+
+SRWidget::SRWidget(void)
+{
+}
+
+SRWidget::~SRWidget(void)
+{
+}
+
+COLORREF SRWidget::setBackColor(HDC hdc, COLORREF color)
+{
+ m_backColor = color;
+ return SetBkColor(hdc, m_backColor);
+}
+
+COLORREF SRWidget::setForeColor(HDC hdc, COLORREF color)
+{
+ m_foreColor = color;
+ return SetTextColor(hdc, m_foreColor);
+}
+
+void SRWidget::SetFont(HFONT font) { /*TODO*/ }
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/SRWidget.h
===================================================================
--- trunk/src/SwordReader_GUI/SRWidget.h (rev 0)
+++ trunk/src/SwordReader_GUI/SRWidget.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,21 @@
+#pragma once
+#include <windows.h>
+
+class SRWidget
+{
+public:
+ SRWidget(void);
+ virtual ~SRWidget(void);
+protected:
+ // We may not want to cache the color.
+ // One reason we may is to track the preferred
+ // back color compared to say the color of a rectangle.
+ COLORREF m_backColor;
+ COLORREF m_foreColor;
+ HFONT m_curFont;
+ HFONT m_oldFont;
+public:
+ COLORREF setBackColor(HDC hdc, COLORREF color);
+ COLORREF setForeColor(HDC hdc, COLORREF color);
+ void SetFont(HFONT font);
+};
Added: trunk/src/SwordReader_GUI/SimpleNavigator.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SimpleNavigator.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/SimpleNavigator.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,371 @@
+#include "ApplicationInterface.h"
+#include "SimpleNavigator.h"
+#include "NavChap.h"
+#include "NavVerse.h"
+#include "NavBooks.h"
+#include "NavRenderText.h"
+
+#include "NavFind.h"
+#include <swordce.h>
+#include <swmgr.h>
+
+#include <url.h>
+
+using namespace sword;
+
+extern SWConfig *g_swordConf;
+
+#define WIDTH 240
+#define HEIGHT 294
+
+RECT RECT_SCREEN;// = {0,0,240,294};
+
+RECT RECT_SELECTLABEL = {4,4,120,20};
+
+RECT RECT_POSITION = {164,4,236,20};
+
+RECT RECT_FIELD = {6,24,240,250};
+
+
+SimpleNavigator::SimpleNavigator(RECT* screen) {
+ RECT_SCREEN=*screen;
+ mode=-1;
+ nextID = 1;
+ chapterCache=false;
+ books=pages[MODE_BOOK]=new NavBooks(this);
+ chapters=pages[MODE_CHAP]=new NavChap(this);
+ verses=pages[MODE_VERSE]=new NavVerse(this);
+ text=pages[MODE_TEXT]=new NavRenderText(this);
+ find=pages[MODE_FIND]=new NavFind(this);
+ menus[MODE_BOOK]=MENU_BOOK;
+ menus[MODE_CHAP]=MENU_CHAP;
+ menus[MODE_VERSE]=MENU_VERSE;
+ menus[MODE_TEXT]=MENU_TEXT;
+ menus[MODE_FIND]=MENU_FIND;
+ optStartID = 0;
+ optEndID = 0;
+ transStartID = 0;
+ transEndID = 0;
+ options = 0;
+ opCount = 0;
+
+ SWModule *mod = SwordIndex::manager->getModule((*g_swordConf)["History"].getWithDefault("LastVersion", "KJV"));
+ if (mod) {
+ position.setModule(SwordIndex::manager->getModule((*g_swordConf)["History"].getWithDefault("LastVersion", "KJV")));
+ }
+ else setModule(transStartID); // if defaults not present, start with first module found
+ sword::VerseKey key = sword::VerseKey((*g_swordConf)["History"].getWithDefault("LastPassage", "Gen 1:1"));
+ position.setVerseKey(&key);
+}
+
+SimpleNavigator::~SimpleNavigator() {
+ delete books;
+ delete chapters;
+ delete verses;
+ delete text;
+ delete find;
+ if (options){
+ delete [] options;
+ }
+ saveState();
+}
+
+void SimpleNavigator::saveState(){
+ (*g_swordConf)["History"]["LastPassage"] = position.verseToString().c_str();
+ (*g_swordConf)["History"]["LastVersion"] = position.getModName();
+}
+
+void SimpleNavigator::refresh() {
+ refreshScreen();
+}
+
+void SimpleNavigator::setModule(const char *module){
+ position.setModule(SwordIndex::manager->getModule(module));
+}
+
+void SimpleNavigator::setMode(int mode) {
+ if (this->mode>=0) pages[this->mode]->hide();
+ this->mode=mode;
+ selectMenu(menus, mode);
+ pages[this->mode]->show();
+ updateTitle();
+ refresh();
+}
+
+void SimpleNavigator::paint() {
+ pages[mode]->paint();
+}
+
+void SimpleNavigator::updateTitle() {
+ WCString title = position.toString() + " - SwRd";
+ setTitle(title);
+}
+
+/* a menu-item is selected (maybe one of the translations) */
+void SimpleNavigator::buttonClicked(int id) {
+ if ((id >= transStartID) && (id <= transEndID)) {
+ setModule(id);
+ checkModuleMenu(id);
+ chapterCache=false;
+ setMode(mode);
+ }
+ else if ((id >= optStartID) && (id <= optEndID)) {
+ toggleOptionMenu(id);
+ chapterCache=false;
+ setMode(mode);
+ }
+ else
+ pages[mode]->buttonClicked(id);
+}
+
+bool SimpleNavigator::menuClicked(int id) {
+ for (std::map<int,int>::iterator i=menus.begin();i!=menus.end();i++) {
+ if (i->second==id) {
+ setMode(i->first);
+ return true;
+ }
+ }
+ return false;
+}
+
+void SimpleNavigator::keyDown(WPARAM id, LPARAM lparam) {
+ pages[mode]->keyDown(id,lparam);
+}
+
+void SimpleNavigator::mouseDown(int x, int y) {
+ pages[mode]->userTap(x,y);
+}
+
+void SimpleNavigator::setBook(int number) {
+ position.setBook(number);
+ chapterCache=false;
+}
+
+void SimpleNavigator::setChap(int number) {
+ position.setChap(number);
+ chapterCache=false;
+}
+
+void SimpleNavigator::setVerse(int number) {
+ position.setVerse(number);
+}
+
+void SimpleNavigator::fillTranslationsMenu(HMENU menuTranslations) {
+ transStartID = nextID;
+ this->menuTranslations=menuTranslations;
+ if (menuTranslations) {
+ for (ModuleMap::iterator i=position.firstModule();i!=position.lastModule();i++) {
+ if(strcmp(i->first, position.getModName()) == 0)
+ addMenu(menuTranslations, MF_CHECKED, nextID++, i->first);
+ else
+ addMenu(menuTranslations, 0, nextID++, i->first);
+ }
+ }
+ // The following line is now handled above. -- dctrotz
+ //checkModuleMenu(transStartID);
+ transEndID = nextID - 1;
+}
+
+void SimpleNavigator::fillGlobalOptionsMenu(HMENU menuOptions) {
+ StringList::iterator i;
+
+ if (menuOptions) {
+ if (options)
+ delete [] options;
+ optStartID = nextID;
+ this->menuOptions=menuOptions;
+ StringList optionNames = position.manager->getGlobalOptions();
+
+ // count options
+ opCount = 0;
+ for (i = optionNames.begin(); i != optionNames.end(); i++) {
+ StringList values = position.manager->getGlobalOptionValues(*i);
+ bool supported = true;
+ for (StringList::iterator j = values.begin(); j != values.end(); j++) {
+ if ((*j != "On") && (*j != "Off"))
+ supported = false;
+ }
+ if (supported)
+ opCount++;
+ }
+
+ options = new SWBuf[opCount];
+
+ // add options;
+ for (i = optionNames.begin(); i != optionNames.end(); i++) {
+// HMENU menuOption = CreatePopupMenu();
+// InsertMenu(menuOptions,0,MF_POPUP,(UINT)menuOption, toUString(i->c_str()).c_str());
+ StringList values = position.manager->getGlobalOptionValues(*i);
+ bool supported = true;
+ for (StringList::iterator j = values.begin(); j != values.end(); j++) {
+// addMenu(menuOption, nextID++, toUString(j->c_str()));
+ if ((*j != "On") && (*j != "Off"))
+ supported = false;
+ }
+ if (supported) {
+ options[nextID - optStartID] = *i;
+ addMenu(menuOptions, 0, nextID++, i->c_str());
+ }
+ }
+ }
+ optEndID = nextID - 1;
+ // TODO: if no options, disable options menu
+}
+
+void SimpleNavigator::setModule(int id) {
+ int modulenr = transStartID;
+ ModuleMap::iterator i;
+ for (i=position.firstModule();
+ (i!=position.lastModule())&&(id!=modulenr);
+ i++) {
+ modulenr++;
+ };
+ if (i!=position.lastModule()) {
+ position.setModule(i->second);
+ // added - bd 06/01/08
+ (*g_swordConf)["History"]["LastModule"] = position.getModName();
+ SWModule *mod = SwordIndex::manager->getModule((*g_swordConf)["History"]["LastModule"]);
+ if (!strcmp(mod->Type(), "Biblical Texts")) {
+ (*g_swordConf)["History"]["LastBible"] = position.getModName();
+ }
+ else if (!strcmp(mod->Type(), "Commentaries")) {
+ (*g_swordConf)["History"]["LastComment"] = position.getModName();
+ }
+ // end added code - bd 06/01/08
+ }
+}
+
+
+void SimpleNavigator::checkModuleMenu(int id) {
+ int current=transStartID;
+ for (ModuleMap::iterator i=position.firstModule();i!=position.lastModule();i++) {
+ checkMenu(menuTranslations,current,(current==id));
+ current++;
+ }
+}
+
+
+void SimpleNavigator::toggleOptionMenu(int id) {
+ if (options) {
+ for (int i = optStartID; i <= optEndID; i++) {
+ SWBuf val = position.manager->getGlobalOption(options[i-optStartID]);
+ if (i == id) {
+ val = (val=="On")?"Off":"On";
+ position.manager->setGlobalOption(options[i-optStartID], val);
+ }
+ checkMenu(menuOptions, i, (val == "On"));
+ }
+ }
+}
+
+void SimpleNavigator::urlClicked(const WCHAR *target) {
+ const int BUF_SIZE = 2048;
+ char target_cstr[BUF_SIZE];
+ const char * t = wstrtostr(target_cstr, target, BUF_SIZE);
+ wchar_t buf[BUF_SIZE];
+
+ SWKey *modKey = 0;
+ // MessageBox(0, strtowstr(t), L"This is 't'", MB_OK);
+ // SWMgr swmanager; // don't create new manager - use SwordIndex::manager
+ // Footnote MessageBox
+ WCString oldPos = position.verseToString(); // information to restore the persistent key
+ if (strstr(t, "showNote")) {
+ URL footnote(t); // t is char* to URL string
+ SWBuf module = footnote.getParameterValue("module");
+ SWBuf key = footnote.getParameterValue("passage");
+ SWBuf footnoteNumber = footnote.getParameterValue("value");
+ // Now that you have extracted all the info you need from the URL,
+ // you can lookup the footnote...
+ // get the module it's in
+ SWModule *mod = SwordIndex::manager->getModule(module); // Thanks Troy for above ... Nov 2007
+ // set that module to the correct entry
+ // TODO - may need to re-set this afterwards - could save int SimpleNavigator::getID();
+ modKey = mod->getKey(); // get the persistent key
+ modKey->setText(key.c_str()); // set the key itself
+ // force a parse of the entry
+ mod->RenderText();
+ SWBuf body = mod->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
+ const char *Body = mod->RenderText(body.c_str()); // RenderText not StripText used
+ // MessageBox can't display html - need to strip out tagged stuff; but Greek works OK
+ // FIX ME
+ MessageBox(0, (LPCWSTR)Body, L"Footnote", MB_OK); //
+ }
+ // Strongs number MessageBox
+ else if (strstr(t, "showStrongs")) {
+ URL footnote(t); // t is char* to URL string
+ SWBuf type = footnote.getParameterValue("type");
+ SWBuf number = footnote.getParameterValue("value");
+ SWModule *mod = 0;
+ if(strstr(type.c_str(), "Greek"))
+ mod = SwordIndex::greekLex;
+ if(strstr(type.c_str(), "Hebrew"))
+ mod = SwordIndex::hebrewLex;
+ if (! mod) {
+ MessageBox(0, L"No Dictionary found - install Strong's modules",
+ L"Strong's", MB_OK);
+ return;
+ }
+ modKey = mod->getKey();
+ modKey->setText(number.c_str());
+ mod->RenderText();
+ MessageBox(0, strtowstr(buf, mod->StripText(), BUF_SIZE), L"Strong's", MB_OK);
+ }
+ // Morph MessageBox
+ else if (strstr(t, "showMorph")) {
+ URL footnote(t); // t is char* to URL string
+ SWBuf type = footnote.getParameterValue("type");
+ SWBuf number = footnote.getParameterValue("value");
+ SWModule *mod = 0;
+ if(strstr(type.c_str(), "robinson")) {
+ mod = SwordIndex::greekMorph;
+ if (! mod) {
+ MessageBox(0, L"No Greek parsing Dictionary found - install Morphological modules",
+ L"Greek Morphological tags", MB_ICONWARNING);
+ return;
+ }
+ }
+ if(strstr(type.c_str(), "strongMorph")) {
+ mod = SwordIndex::hebrewMorph;
+ if (! mod) {
+ MessageBox(0, L"No Hebrew parsing Dictionary found - install Morphological modules",
+ L"Hebrew Morphological tags", MB_ICONWARNING);
+ return;
+ }
+ }
+ modKey = mod->getKey();
+ modKey->setText(number.c_str());
+ mod->RenderText();
+ MessageBox(0, strtowstr(buf, mod->StripText(), BUF_SIZE), L"Morph tags", MB_OK);
+ }
+ // X-Ref MessageBox
+ else if (strstr(t, "scripRef")) {
+ URL footnote(t); // t is char* to URL string
+ SWBuf module = footnote.getParameterValue("module"); // very unlikely to have this
+ SWBuf key = footnote.getParameterValue("value");
+ // get the last bible module used and get xRefs from this version
+ SWModule *mod = SwordIndex::manager->getModule((*g_swordConf)["History"]["LastBible"]);
+ // will fail if user has never looked at a bible - possible??? so check ....
+ if (!mod) {
+ MessageBox(0, L"xRef bible not found",
+ L"Cross referencing", MB_ICONWARNING);
+ return;
+ }
+ modKey = mod->getKey(); // get the persistent key
+ modKey->setText(key.c_str()); // set the key itself
+ mod->RenderText();
+ // strip out html if present
+ SWBuf body = mod->StripText();
+ // not sure if MessageBox can display html - if it can, re-think this some day
+ MessageBox(0, strtowstr(buf, body, BUF_SIZE), L"Scripture reference", MB_OK);
+ }
+
+ else //comment next line out in release version
+ MessageBox(0, strtowstr(buf, t, BUF_SIZE), L"Raw entry unresolved", MB_OK); // catch all
+ modKey->setText((const char *)oldPos.c_str()); // restore the key before leaving
+}
+
+
+int SimpleNavigator::getID() {
+ return nextID++;
+}
+
Added: trunk/src/SwordReader_GUI/SimpleNavigator.h
===================================================================
--- trunk/src/SwordReader_GUI/SimpleNavigator.h (rev 0)
+++ trunk/src/SwordReader_GUI/SimpleNavigator.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,104 @@
+#ifndef SIMPLENAVIGATOR_H
+#define SIMPLENAVIGATOR_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+#include "utils.h"
+#include "SwordIndex.h"
+#include "NavPage.h"
+
+//using namespace sword;
+
+#define NUM_MENUS 5
+
+#define MODE_BOOK 0
+#define MODE_CHAP 1
+#define MODE_VERSE 2
+#define MODE_TEXT 3
+#define MODE_FIND 4
+
+#define BUTTON_BACKGROUND 0x00A0A0A0
+
+extern RECT RECT_SCREEN;
+
+class NavNumbers;
+class NavBooks;
+class NavRenderText;
+class NavFind;
+
+class SimpleNavigator
+{
+protected:
+ std::map<int,NavPage*> pages;
+ std::map<int,int> menus;
+ int mode;
+
+ HMENU menuTranslations;
+ HMENU menuOptions;
+
+ int nextID;
+ int transStartID;
+ int transEndID;
+ int optStartID;
+ int optEndID;
+ SWBuf *options;
+ int opCount;
+ WCString getVerseHeader();
+
+ void setModule(int id);
+ void checkModuleMenu(int id);
+
+public:
+ SwordIndex position;
+ NavPage* chapters;
+ NavPage* verses;
+ NavPage* books;
+ NavPage* text;
+ NavPage* find;
+
+ SimpleNavigator(RECT* screen);
+ virtual ~SimpleNavigator();
+
+ void saveState();
+
+ // Navigation
+ void setBook(int number);
+ void setChap(int number);
+ void setVerse(int number);
+ void setModule(const char *module);
+
+ int getBook() {return position.getBook();};
+ int getChap() {return position.verse->Chapter();};
+ int getVerse() {return position.verse->Verse();};
+
+ int chapCount() {return position.chapCount();}
+ int verseCount() {return position.verseCount();}
+
+ // Change user interface
+ void updateTitle();
+ void fillTranslationsMenu(HMENU menuTranslations);
+ void fillGlobalOptionsMenu(HMENU menuTranslations);
+ void toggleOptionMenu(int id);
+
+ // Interface with pages
+ int getID();
+ void setMode(int mode);
+ bool chapterCache; // to be set to false if 'text' should reload
+ // its chapter
+ void refresh();
+
+ // Interface with system
+ bool initialized() {return position.initialized();}
+ void buttonClicked(int id);
+ void keyDown(WPARAM id, LPARAM lparam);
+ void urlClicked(const WCHAR *target);
+ bool menuClicked(int id);
+ void mouseDown(int x, int y);
+ void paint();
+};
+
+#endif
+
Added: trunk/src/SwordReader_GUI/SwordIndex.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SwordIndex.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/SwordIndex.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,247 @@
+#include "ApplicationInterface.h"
+#include "SwordIndex.h"
+#include <markupfiltmgr.h>
+#include <swordce.h>
+#include "swwinlog.h"
+
+const CHAR* swordConfigDir="/Program Files/sword/books";
+
+TCHAR* defBookNames[66]={
+L"Gen",L"Exo",L"Lev",L"Num",L"Deu",L"Jos",L"Jud",L"Rut",L"1Sa",
+L"2Sa",L"1Ki",L"2Ki",L"1Ch",L"2Ch",L"Ezr",L"Neh",L"Est",L"Job",L"Psa",L"Pro",L"Ecc",L"Son",L"Isa",L"Jer",
+L"Lam",L"Eze",L"Dan",L"Hos",L"Joe",L"Amo",L"Oba",L"Jon",L"Mic",L"Nah",L"Hab",L"Zep",L"Hag",L"Zec",L"Mal",
+L"Mat",L"Mar",L"Luk",L"Joh",L"Act",L"Rom",L"1Co",L"2Co",L"Gal",L"Eph",L"Phi",L"Col",
+L"1Th",L"2Th",L"1Ti",L"2Ti",L"Tit",L"Phi",L"Heb",L"Jas",L"1Pe",L"2Pe",L"1Jo",L"2Jo",L"3Jo",L"Jud",L"Rev",
+};
+
+WCString SwordIndex::verseToString(Verse* verse) {
+ wchar_t wverse[16] = {0};
+ wchar_t wchapt[16] = {0};
+
+ return WCString(defBookNames[(verse->Book()-1)+otBookCount()*(verse->Testament()-1)]) + WCString(" ")
+ + WCString(_itow(verse->Chapter(),wchapt, 10)) + WCString(":")
+ + WCString(_itow(verse->Verse(), wverse, 10));
+}
+
+WCString SwordIndex::verseToString() {
+ wchar_t wverse[16] = {0};
+ wchar_t wchapt[16] = {0};
+
+ return WCString(defBookNames[(verse->Book()-1)+otBookCount()*(verse->Testament()-1)]) + WCString(" ")
+ + WCString(_itow(verse->Chapter(),wchapt, 10)) + WCString(":")
+ + WCString(_itow(verse->Verse(), wverse, 10));
+}
+
+SWMgr* SwordIndex::manager;
+SWModule *SwordIndex::greekLex = 0;
+SWModule *SwordIndex::hebrewLex = 0;
+SWModule *SwordIndex::greekMorph = 0;
+SWModule *SwordIndex::hebrewMorph = 0;
+
+int SwordIndex::indices=0;
+std::map<const char*, sword::SWModule*, ltstr>* SwordIndex::texts;
+
+SwordIndex::SwordIndex() {
+ initManager();
+ if (texts->begin()!=texts->end()) {
+ bookNames=defBookNames;
+ verse=new sword::VerseKey("Gen 1:1");
+ verse->Persist(1);
+ mark=new sword::VerseKey("Gen 1:1");
+ mark->Persist(1);
+ //book=1;
+ setModule(texts->begin()->second);
+ }
+ else
+ bible=0;
+}
+
+SwordIndex::~SwordIndex() {
+ leaveManager();
+ if (verse) delete verse;
+ if (mark) delete mark;
+}
+
+void SwordIndex::initManager() {
+ if (indices==0) { //We need a manager
+ texts=new ModuleMap();
+
+ manager=new sword::SWMgr(new sword::MarkupFilterMgr(sword::FMT_HTMLHREF, sword::ENC_UTF16));
+
+ sword::ModMap::iterator it;
+ sword::SWModule* curMod = 0;
+ for (it = manager->Modules.begin(); it != manager->Modules.end(); it++) {
+ curMod = (*it).second;
+ if (!strcmp(curMod->Type(), "Biblical Texts")) {
+ (*texts)[curMod->Name()]=curMod;
+ }
+ // next section added BD - Nov 07
+ if (!strcmp(curMod->Type(), "Commentaries")) {
+ (*texts)[curMod->Name()]=curMod;
+ } // end of added code
+ if (curMod->getConfig().has("Feature", "GreekDef")) {
+ greekLex = curMod;
+ }
+ if (curMod->getConfig().has("Feature", "GreekParse")) {
+ greekMorph = curMod;
+ }
+ if (curMod->getConfig().has("Feature", "HebrewDef")) {
+ hebrewLex = curMod;
+ }
+ if (curMod->getConfig().has("Feature", "HebrewParse")) {
+ hebrewMorph = curMod;
+ }
+ }
+ }
+ indices++;
+}
+
+void SwordIndex::leaveManager() {
+ indices--;
+ if (indices==0) {
+ if (manager!=0) delete manager;
+ delete texts;
+ }
+}
+
+WCString SwordIndex::toString() {
+ return verseToString(verse);
+}
+
+WCString SwordIndex::bookName(int book) {
+ return WCString(defBookNames[book-1]);
+}
+
+void SwordIndex::setBook(int book) {
+ //this->book=book;
+ if (book<=otBookCount()) {
+ verse->Testament(1);
+ verse->Book((char)book);
+ } else {
+ verse->Testament(2);
+ verse->Book((char)book-otBookCount());
+ }
+}
+
+sword::sbook SwordIndex::getBook(int book) {
+ book--; //we now need to start at 0
+ if (book<otBookCount())
+ return (verse->books[0][book]);
+ else if (book<bookCount())
+ return (verse->books[1][book-otBookCount()]);
+ else return (verse->books[1][bookCount()-otBookCount()-1]);
+
+}
+
+char *SwordIndex::getModName(){
+ return bible->Name();
+}
+
+int SwordIndex::chapCount() {
+ return getBook(verse->Testament() == 1 ? verse->Book() : otBookCount() + verse->Book() /*book*/).chapmax;
+}
+
+void SwordIndex::setChap(int chap) {
+ verse->Chapter(chap);
+}
+
+int SwordIndex::getChap() {
+ return verse->Chapter();
+}
+
+
+int SwordIndex::verseCount() {
+ return getBook(verse->Testament() == 1 ? verse->Book() : otBookCount() + verse->Book() /*book*/).versemax[verse->Chapter()-1];
+}
+
+void SwordIndex::setVerse(int verse) {
+ this->verse->Verse(verse);
+}
+
+int SwordIndex::getVerse() {
+ return verse->Verse();
+}
+
+WCString SwordIndex::verseText() {
+ WCString utf16 = (WCHAR *)bible->RenderText();
+ return utf16;
+}
+
+WCString SwordIndex::verseText(sword::VerseKey* anyVerse) {
+ setMark();
+ verse->copyFrom(anyVerse);
+ WCString temp = verseText();
+ jumpBack();
+ return temp;
+}
+
+void SwordIndex::setVerseKey(sword::VerseKey* anyVerse) {
+ verse->copyFrom(anyVerse);
+}
+
+void SwordIndex::setMark() {
+ mark->copyFrom(verse);
+}
+
+void SwordIndex::jumpBack() {
+ verse->copyFrom(mark);
+}
+
+void SwordIndex::next() {
+ verse->increment(1);
+}
+
+void SwordIndex::setModule(Module m) {
+ bible = m;
+ bible->setKey(verse);
+}
+
+
+void SwordIndex::search(const WCString &text, int range, int method, Searcher* searcher) {
+ //searcher->setProgress(10);
+ // Clone is a bit dangerous, it creates a new SWKey which has to be deleted
+ // thus you cannot simply pass the cloned object to the constructor of
+ // a VerseKey object.
+ SWKey *tmp = verse->clone();
+ Verse from(tmp);
+ Verse to(tmp);
+ delete tmp;
+
+ if (range == RANGEBIBLE)
+ from.Testament(1);
+ if ((range == RANGETESTAMENT)||(range == RANGEBIBLE))
+ from.Book(1);
+
+ from.Chapter(1);
+ from.Verse(1);
+ if (range == RANGEBIBLE)
+ to.Testament(2);
+ if ((range == RANGETESTAMENT)||(range == RANGEBIBLE))
+ to.Book((to.Testament()==2) ?
+ bookCount() - otBookCount() :
+ otBookCount());
+
+ to.Chapter(to.books[to.Testament()-1][to.Book()-1].chapmax);
+ to.Verse(to.books[to.Testament()-1][to.Book()-1].versemax[to.Chapter()-1]);
+
+ Verse verses(from,to);
+ sword::ListKey results;
+ //searcher->setProgress(20);
+
+ results=bible->search(text.c_str(), (method==METHODMULTIWORD)?-2:-1, 2, &verses, 0, setPercentCB, (void*)searcher);
+
+ //searcher->setProgress(90);
+
+ for (results = TOP; !results.Error(); results++) {
+ searcher->addResult(results.getText());
+ }
+
+ //searcher->setProgress(100);
+}
+
+void setPercentCB(char percent, void *userData)
+{
+ Searcher *caller = static_cast<Searcher*>(userData);
+ if(caller)
+ caller->setProgress((int)percent);
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/SwordIndex.h
===================================================================
--- trunk/src/SwordReader_GUI/SwordIndex.h (rev 0)
+++ trunk/src/SwordReader_GUI/SwordIndex.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,120 @@
+#ifndef SWORDINDEX_H
+#define SWORDINDEX_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h"
+#include "utils.h"
+#include "WCString.h"
+#include <versekey.h>
+#include <ztext.h>
+#include <swmgr.h>
+#include <swconfig.h>
+//#include <thmlplain.h>
+#include <thmlhtml.h>
+#include <thmlvariants.h>
+
+using namespace sword;
+
+struct ltstr
+{
+ bool operator()(const char* s1, const char* s2) const
+ {
+ return strcmp(s1, s2) < 0;
+ }
+};
+
+typedef sword::SWModule* Module;
+typedef std::map<const char*, sword::SWModule*, ltstr> ModuleMap;
+typedef sword::VerseKey Verse;
+
+class Searcher {
+public:
+ virtual void setProgress(int percent)=0;
+ virtual void addResult(const WCString &verse)=0;
+};
+
+#define RANGEBIBLE 0
+#define RANGETESTAMENT 1
+#define RANGEBOOK 2
+
+#define METHODMULTIWORD 0
+#define METHODEXACTPHRASE 1
+
+class SwordIndex {
+private:
+ static void initManager();
+ static void leaveManager();
+ static int indices;
+ static ModuleMap* texts;
+
+ sword::sbook getBook(int book);
+
+ sword::VerseKey* mark;
+
+ //int book;
+
+ TCHAR** bookNames;
+public:
+ SwordIndex();
+ virtual ~SwordIndex();
+ WCString toString();
+
+ WCString verseText();
+ WCString verseText(sword::VerseKey* anyVerse);
+ char *SwordIndex::getModName();
+ ModuleMap::iterator firstModule() {return texts->begin();};
+ ModuleMap::iterator lastModule() {return texts->end();};
+ void setModule(Module m);
+
+ void setMark();
+ void jumpBack();
+ void next();
+
+ void search(const WCString &text, int range, int method, Searcher* searcher);
+
+ static sword::SWMgr* manager;
+ static SWModule *greekLex;
+ static SWModule *hebrewLex;
+ static SWModule *greekMorph;
+ static SWModule *hebrewMorph;
+ SWModule* bible;
+ VerseKey* verse;
+ bool initialized() { return (bible!=0);};
+
+ WCString bookName(int book);
+
+ TCHAR** getBookNames() {return bookNames;};
+
+ static WCString verseToString(Verse* verse);
+ WCString verseToString();
+
+ static int otBookCount() {return 39;};
+ static int bookCount() {return 66;};
+
+ void setBook(int book);
+ int getBook() const {return (verse->Testament() == 1 ? verse->Book() : otBookCount() + verse->Book() /*book*/) - 1;};
+
+ int chapCount();
+ int maxChapCount() {return 150;};
+ void setChap(int chap);
+ int getChap();
+
+ int verseCount();
+ int maxVerseCount() {return 176;};
+ void setVerse(int verse);
+ int getVerse();
+
+ void setVerseKey(sword::VerseKey* anyVerse);
+
+ void operator++(int) {verse->increment(1);};
+ void operator--(int) {verse->decrement(1);};
+
+ void operator+=(int count) {verse->increment(count);};
+ void operator-=(int count) {verse->decrement(count);};
+};
+
+void setPercentCB(char percent, void *userData);
+#endif
Added: trunk/src/SwordReader_GUI/SwordReaderApp.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SwordReaderApp.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/SwordReaderApp.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,349 @@
+#include "SwordReaderApp.h"
+
+SHACTIVATEINFO SwordReaderApp::s_sai;
+
+SwordReaderApp::SwordReaderApp()
+: m_navigator(NULL)
+, m_swordConf(NULL)
+, m_dwAppThreadID(0)
+, m_hInst(0)
+, m_hWnd(0)
+{
+ memset(&s_sai, 0, sizeof(s_sai));
+ s_sai.cbSize = sizeof(s_sai);
+}
+
+SwordReaderApp::~SwordReaderApp()
+{
+}
+
+bool SwordReaderApp::InitApp(HINSTANCE hInstance, int nCmdShow)
+{
+ WNDCLASS wc;
+ TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
+ TCHAR szWindowClass[MAX_LOADSTRING]; // The window class name
+
+ m_dwAppThreadID = GetCurrentThreadId();
+ m_hInst = hInstance;
+
+ // Create a general options file for storing options
+ // and navigaiton history
+ const char *cwd = getWorkingDirectory();
+ char confFName[MAX_PATH];
+ _snprintf(confFName, MAX_PATH, "%s\\options.conf", cwd);
+
+ m_swordConf = new SWConfig(confFName);
+ m_swordConf->Load();
+
+ // Initialize global strings
+ LoadString(m_hInst, IDC_BIBLEREADER, szWindowClass, MAX_LOADSTRING);
+ LoadString(m_hInst, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+
+ //If it is already running, then focus on the window
+ m_hWnd = FindWindow(szWindowClass, NULL);
+ if (m_hWnd)
+ {
+ // set focus to foremost child window
+ // The "| 0x01" is used to bring any owned windows to the foreground and
+ // activate them.
+ SetForegroundWindow((HWND)((ULONG) m_hWnd | 0x00000001));
+ return FALSE;
+ }
+
+
+ // Register the main app window class...
+ wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = (WNDPROC) SwordReaderApp::MessageRoute;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = m_hInst;
+ wc.hIcon = LoadIcon(m_hInst, MAKEINTRESOURCE(IDI_BIBLEREADER));
+ wc.hCursor = 0;
+ wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
+ wc.lpszMenuName = 0;
+ wc.lpszClassName = szWindowClass;
+
+ if(!RegisterClass(&wc)){
+ return FALSE;
+ }
+
+ m_hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, m_hInst, NULL);
+
+ if (!m_hWnd){
+ return FALSE;
+ }
+ //When the main window is created using CW_USEDEFAULT the height of the menubar (if one
+ // is created is not taken into account). So we resize the window after creating it
+ // if a menubar is present
+ RECT rc;
+ GetWindowRect(m_hWnd, &rc);
+ rc.bottom -= MENU_HEIGHT;
+ if (m_hwndCB)
+ MoveWindow(m_hWnd, rc.left, rc.top, rc.right, rc.bottom, FALSE);
+
+ if (!m_navigator->initialized()) {
+ // I am not convinced that the statement (LPCTSTR)IDD_ERROR_NOBIBLES is correct. -- REVISIT
+ MessageBox(m_hWnd, L"Error: No bibles installed.", L"Error", MB_OK | MB_ICONEXCLAMATION);
+ return FALSE;
+ }
+
+ m_backColor = 0x00FFFFFF;
+ m_foreColor = 0x00000000;
+
+ m_navigator->updateTitle();
+
+ ShowWindow(m_hWnd, nCmdShow);
+ m_navigator->setMode(MODE_TEXT);
+ SetForegroundWindow((HWND)((ULONG) m_hWnd | 0x00000001));
+ UpdateWindow(m_hWnd);
+
+ return TRUE;
+
+}
+
+/* Routes the messages to the appropiate WindowProcedure by unwrapping the lParam
+* we associated with this window upon creation.
+*/
+LRESULT CALLBACK SwordReaderApp::MessageRoute(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ SwordReaderApp* wnd = NULL;
+
+ if (message == WM_CREATE) {
+ ::SetWindowLong (hwnd, GWL_USERDATA, long((LPCREATESTRUCT(lParam))->lpCreateParams));
+ }
+
+ wnd = (SwordReaderApp*) (::GetWindowLong (hwnd, GWL_USERDATA));
+
+ if (wnd)
+ return wnd->WndProc(hwnd, message, wParam, lParam);
+ return ::DefWindowProc(hwnd, message, wParam, lParam);
+}
+
+BOOL SwordReaderApp::OnNotify(WPARAM wParam, LPARAM lParam){
+ NMHDR *nm = (NMHDR *)lParam;
+
+ switch (nm->code) {
+ case NM_HOTSPOT:
+ m_navigator->urlClicked(((NM_HTMLVIEW *)lParam)->szTarget);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+BOOL SwordReaderApp::OnLButtonDown(WPARAM wParam, LPARAM lParam)
+{
+ m_navigator->mouseDown(LOWORD(lParam),HIWORD(lParam));
+ return TRUE;
+}
+
+BOOL SwordReaderApp::OnKeyDown(WPARAM wParam, LPARAM lParam)
+{
+ m_navigator->keyDown(wParam, lParam);
+ return TRUE;
+}
+
+BOOL SwordReaderApp::OnCommand(UINT message, WPARAM wParam, LPARAM lParam)
+{
+ BOOL handled = FALSE;
+ INT wmId = LOWORD(wParam);
+ INT wmEvent = HIWORD(wParam);
+
+ switch (wmId) {
+ case IDOK:
+ SendMessage(m_hWnd, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), (LPARAM)m_hWnd);
+ SendMessage(m_hWnd, WM_CLOSE, 0, 0);
+ handled = TRUE;
+ break;
+ case MENU_ABOUT:
+ MessageBox(0, L"Sword reader program for Pocket PC ver. 1.0.1\n\nsee: http://www.crosswire.org/sword/swordreader/\n\nGUI by Johan Gorter, 2004\nNow being maintained by B. Drake, Robin Randall and David Trotz\nProverbs 16:3", L"About", MB_OK);
+ handled = TRUE;
+ break;
+ case MENU_SHUTDOWN:
+ SendMessage(m_hWnd, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), (LPARAM)m_hWnd);
+ SendMessage (m_hWnd, WM_CLOSE, 0, 0);
+ handled = TRUE;
+ exit(0);
+ default:
+ if ((wmId>=USERBUTTONS)&&(wmId<USERBUTTONS+1000)) {
+ m_navigator->buttonClicked(wmId-USERBUTTONS);
+ handled = TRUE;
+ break;
+ }
+ else if (m_navigator->menuClicked(wmId)){
+ }else
+ return DefWindowProc(m_hWnd, message, wParam, lParam);
+ break;
+ }
+ return handled;
+}
+
+BOOL SwordReaderApp::OnCreate(WPARAM wParam, LPARAM lParam)
+{
+ RECT clientRect;
+ GetClientRect(m_hWnd,&clientRect);
+ clientRect.bottom -= MENU_HEIGHT;
+ m_navigator = new SimpleNavigator(&clientRect);
+
+ CreateCommandBar();
+ setMenuSelected(m_hwndCB,MENU_TEXT,1);
+
+ CreateTranslationsMenu();
+ CreateGlobalOptionsMenu();
+
+ return TRUE;
+}
+
+BOOL SwordReaderApp::CreateCommandBar()
+{
+ SHMENUBARINFO mbi;
+ memset(&mbi, 0, sizeof(SHMENUBARINFO));
+ mbi.cbSize = sizeof(SHMENUBARINFO);
+ mbi.hwndParent = m_hWnd;
+ mbi.nToolBarId = IDM_MENU;
+ mbi.hInstRes = m_hInst;
+ mbi.nBmpId = 0;
+ mbi.cBmpImages = 0;
+
+ if (!SHCreateMenuBar(&mbi))
+ return FALSE;
+
+ m_hwndCB = mbi.hwndMB;
+ return TRUE;
+}
+
+BOOL SwordReaderApp::OnPaint(WPARAM wParam, LPARAM lParam)
+{
+ PAINTSTRUCT ps;
+ HDC hdc = BeginPaint(m_hWnd, &ps);
+ SetBkMode(hdc,OPAQUE);
+ SetBkColor(hdc,(COLORREF)GetSysColor(COLOR_WINDOW));
+ m_navigator->paint();
+ EndPaint(m_hWnd, &ps);
+ return TRUE;
+}
+
+BOOL SwordReaderApp::OnDestroy(WPARAM wParam, LPARAM lParam)
+{
+ CommandBar_Destroy(m_hwndCB);
+ delete m_navigator;
+ m_swordConf->Save();
+ delete m_swordConf;
+ PostQuitMessage(0);
+ return TRUE;
+}
+
+BOOL SwordReaderApp::OnSize(WPARAM wParam, LPARAM lParam)
+{
+ return FALSE;
+}
+
+BOOL SwordReaderApp::OnActivate(WPARAM wParam, LPARAM lParam)
+{
+ SHHandleWMActivate(m_hWnd, wParam, lParam, &s_sai, FALSE);
+ return TRUE;
+}
+
+BOOL SwordReaderApp::OnSettingChange(WPARAM wParam, LPARAM lParam)
+{
+ SHHandleWMSettingChange(m_hWnd, wParam, lParam, &s_sai);
+ return TRUE;
+}
+
+LRESULT CALLBACK SwordReaderApp::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ BOOL handled = FALSE;
+
+ if(hWnd != m_hWnd)
+ return FALSE;
+
+ switch (message)
+ {
+ case WM_NOTIFY:
+ handled = OnNotify(wParam, lParam);
+ break;
+ case WM_LBUTTONDOWN:
+ handled = OnLButtonDown(wParam, lParam);
+ break;
+ case WM_KEYDOWN:
+ handled = OnKeyDown(wParam, lParam);
+ break;
+ case WM_COMMAND:
+ handled = OnCommand(message, wParam, lParam);
+ break;
+ case WM_CREATE:
+ handled = OnCreate(wParam, lParam);
+ break;
+ case WM_PAINT:
+ handled = OnPaint(wParam, lParam);
+ break;
+ case WM_DESTROY:
+ handled = OnDestroy(wParam, lParam);
+ break;
+ case WM_ACTIVATE:
+ handled = OnActivate(wParam, lParam);
+ break;
+ case WM_SETTINGCHANGE:
+ handled = OnSettingChange(wParam, lParam);
+ break;
+ case WM_SIZE:
+ handled = OnSize(wParam, lParam);
+ break;
+ default:
+ return DefWindowProc(m_hWnd, message, wParam, lParam);
+ }
+ return handled;
+}
+
+BOOL SwordReaderApp::CreateTranslationsMenu() {
+ if(!m_hwndCB)
+ return FALSE;
+ HMENU menuMenu = getSubMenu(m_hwndCB,MENU_MENU);
+ HMENU menuTranslations = CreatePopupMenu();
+
+ InsertMenu(menuMenu,0,MF_BYPOSITION | MF_POPUP,(UINT)menuTranslations,L"Translation");
+ m_navigator->fillTranslationsMenu(menuTranslations);
+
+ DrawMenuBar(m_hwndCB);
+ return TRUE;
+}
+
+BOOL SwordReaderApp::CreateGlobalOptionsMenu() {
+ if(!m_hwndCB)
+ return FALSE;
+
+ HMENU menuMenu = getSubMenu(m_hwndCB,MENU_MENU);
+ HMENU menuGlobalOptions = CreatePopupMenu();
+
+ InsertMenu(menuMenu,0,MF_BYPOSITION | MF_POPUP,(UINT)menuGlobalOptions,L"Options");
+ m_navigator->fillGlobalOptionsMenu(menuGlobalOptions);
+ m_navigator->toggleOptionMenu(-1); // get all checked menu choiced correct, but don't change anything
+
+ DrawMenuBar(m_hwndCB);
+ return TRUE;
+}
+
+void SwordReaderApp::SetTitle(const WCString &title) {
+ SetWindowText(m_hWnd,title.w_str());
+}
+
+void SwordReaderApp::RefreshScreen() {
+ InvalidateRect(m_hWnd, NULL, TRUE);
+ UpdateWindow(NULL);
+}
+
+void SwordReaderApp::SelectMenu(std::map<int,int>& menus, int mode) {
+ for (unsigned int i = 0;i < menus.size(); i++) {
+ setMenuSelected(m_hwndCB,menus[i],(mode==i));
+ }
+}
+
+void SwordReaderApp::AddMenu(HMENU menu,int flags, int id, const WCString &text) {
+ AppendMenu(menu,flags,USERBUTTONS+id,text.w_str());
+}
+
+
+
+void SwordReaderApp::SetMenu(HMENU menu, int id, bool checked) {
+ CheckMenuItem(menu,USERBUTTONS+id,checked?MF_CHECKED:MF_UNCHECKED);
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/SwordReaderApp.h
===================================================================
--- trunk/src/SwordReader_GUI/SwordReaderApp.h (rev 0)
+++ trunk/src/SwordReader_GUI/SwordReaderApp.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,70 @@
+#pragma once
+#include <swconfig.h>
+#include "SimpleNavigator.h"
+#include "SRWidget.h"
+#include "ApplicationInterface.h"
+
+//#include "swordce.h"
+
+class SwordReaderApp : SRWidget
+{
+public:
+ SwordReaderApp();
+ virtual ~SwordReaderApp();
+ bool InitApp(HINSTANCE hInstance, int nCmdShow);
+ //! The actual call back function for this window.
+ /*! This only acts as a mediator between the callback function we really
+ want and the call back the Win API is expecting.
+ @param hwnd Handle to the window.
+ @param message Specifies the message.
+ @param wParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ @param lParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ */
+ static LRESULT CALLBACK MessageRoute(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+ //! The expected WinProc callback function.
+ /*! Handles any messages sent to this window.
+ @param hwnd Handle to the window.
+ @param message Specifies the message.
+ @param wParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ @param lParam Specifies additional message information. The contents
+ of this parameter depend on the value of the message
+ parameter.
+ */
+ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+ void SetTitle(const WCString &title);
+ void RefreshScreen();
+private:
+ // Message Handlers...
+ BOOL OnNotify(WPARAM wParam, LPARAM lParam);
+ BOOL OnLButtonDown(WPARAM wParam, LPARAM lParam);
+ BOOL OnKeyDown(WPARAM wParam, LPARAM lParam);
+ BOOL OnCommand(UINT message, WPARAM wParam, LPARAM lParam);
+ BOOL OnPaint(WPARAM wParam, LPARAM lParam);
+ BOOL OnCreate(WPARAM wParam, LPARAM lParam);
+ BOOL OnDestroy(WPARAM wParam, LPARAM lParam);
+ BOOL OnActivate(WPARAM wParam, LPARAM lParam);
+ BOOL OnSettingChange(WPARAM wParam, LPARAM lParam);
+ BOOL OnSize(WPARAM wParam, LPARAM lParam);
+ // Helpers...
+ BOOL CreateCommandBar();
+ BOOL CreateTranslationsMenu();
+ BOOL CreateGlobalOptionsMenu();
+ void SelectMenu(std::map<int,int>& menus, int mode);
+ void AddMenu(HMENU menu,int flags, int id, const WCString &text);
+ void SetMenu(HMENU menu, int id, bool checked);
+
+ // I debate which of these should be cached...
+ SimpleNavigator *m_navigator;
+ SWConfig *m_swordConf;
+ DWORD m_dwAppThreadID;
+ HINSTANCE m_hInst;
+ HWND m_hWnd;
+ HWND m_hwndCB;
+ static SHACTIVATEINFO s_sai;
+};
Added: trunk/src/SwordReader_GUI/SwordReader_GUI.rc
===================================================================
--- trunk/src/SwordReader_GUI/SwordReader_GUI.rc (rev 0)
+++ trunk/src/SwordReader_GUI/SwordReader_GUI.rc 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,189 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "newres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_BIBLEREADER ICON DISCARDABLE "BibleReader.ICO"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""newres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Data
+//
+
+IDM_MENU SHMENUBAR MOVEABLE PURE
+BEGIN
+ IDM_MENU, 6,
+ I_IMAGENONE, MENU_BOOK, TBSTATE_ENABLED,
+ TBSTYLE_CHECK | TBSTYLE_AUTOSIZE, IDS_CAP_BOOK, 0, NOMENU,
+ I_IMAGENONE, MENU_CHAP, TBSTATE_ENABLED,
+ TBSTYLE_CHECK | TBSTYLE_AUTOSIZE, IDS_CAP_CHAP, 0, NOMENU,
+ I_IMAGENONE, MENU_VERSE, TBSTATE_ENABLED,
+ TBSTYLE_CHECK | TBSTYLE_AUTOSIZE, IDS_CAP_VERSE, 0, NOMENU,
+ I_IMAGENONE, MENU_TEXT, TBSTATE_ENABLED,
+ TBSTYLE_CHECK | TBSTYLE_AUTOSIZE, IDS_CAP_TEXT, MENU_TEXT, NOMENU,
+ I_IMAGENONE, MENU_FIND, TBSTATE_ENABLED,
+ TBSTYLE_CHECK | TBSTYLE_AUTOSIZE, IDS_CAP_FIND, 0, NOMENU,
+ I_IMAGENONE, MENU_MENU, TBSTATE_ENABLED,
+ TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_CAP_MENU, 0, 5,
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menubar
+//
+
+IDM_MENU MENU DISCARDABLE
+BEGIN
+ MENUITEM "Book", MENU_BOOK
+ MENUITEM "Chap", MENU_CHAP
+ MENUITEM "Verse", MENU_VERSE
+ MENUITEM "Text", MENU_TEXT
+ MENUITEM "Find", MENU_FIND
+ POPUP "Menu"
+ BEGIN
+ MENUITEM "Shutdown", MENU_SHUTDOWN
+ MENUITEM "About", MENU_ABOUT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDC_BIBLEREADER ACCELERATORS DISCARDABLE
+BEGIN
+ "A", IDM_HELP_ABOUT, VIRTKEY, CONTROL, NOINVERT
+ "Q", IDOK, VIRTKEY, CONTROL, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_ERROR_NOBIBLES, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 243
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 75
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ERROR_NOBIBLES DIALOG DISCARDABLE 0, 0, 250, 82
+STYLE WS_POPUP
+FONT 8, "MS Sans Serif"
+BEGIN
+ LTEXT "ERROR: No bibles were installed",IDC_STATIC,7,31,229,16
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_APP_TITLE "Sword Reader"
+ IDC_BIBLEREADER "BIBLEREADER"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_CAP_BOOK "Book"
+ IDS_CAP_CHAP "Chap"
+ IDS_CAP_TEXT "Text"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_CAP_VERSE "Verse"
+ IDS_CAP_BIBLE "Find"
+ IDS_SELECTBOOK "Select a book:"
+ IDS_SELECTCHAP "Select a chapter:"
+ IDS_SELECTBIBLE "Select a bible"
+ IDS_CAP_MENU "Menu"
+ IDS_CAP_FIND "Find"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
Added: trunk/src/SwordReader_GUI/SwordReader_GUI.vcp
===================================================================
--- trunk/src/SwordReader_GUI/SwordReader_GUI.vcp (rev 0)
+++ trunk/src/SwordReader_GUI/SwordReader_GUI.vcp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,1942 @@
+# Microsoft eMbedded Visual Tools Project File - Name="SwordReader_GUI" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Application" 0x8301
+# TARGTYPE "Win32 (WCE ARM) Application" 0x8501
+
+CFG=SwordReader_GUI - Win32 (WCE ARM) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "SwordReader_GUI.vcn".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "SwordReader_GUI.vcn" CFG="SwordReader_GUI - Win32 (WCE ARM) Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "SwordReader_GUI - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Application")
+!MESSAGE "SwordReader_GUI - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Application")
+!MESSAGE "SwordReader_GUI - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application")
+!MESSAGE "SwordReader_GUI - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ARMRel"
+# PROP BASE Intermediate_Dir "ARMRel"
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ARMRel"
+# PROP Intermediate_Dir "ARMRel"
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Oxs /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /O2 /I "..\STL_eVC" /I "..\..\..\sword\include" /I "..\dll1\wincesword\include" /I "winceSword\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "SIMPLE" /FR /Oxs /M$(CECrtMT) /c
+# SUBTRACT CPP /YX
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 ..\Dll1\ARMRel\sword.lib htmlview.lib oleaut32.lib commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /libpath:"..\STL_eVC" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "ARMDbg"
+# PROP BASE Intermediate_Dir "ARMDbg"
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "ARMDbg"
+# PROP Intermediate_Dir "ARMDbg"
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "..\Dll1\winceSword\include" /I "..\STL_eVC" /I "..\..\..\sword\include" /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "SIMPLE" /FR /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 ..\Dll1\ARMDbg\sword.lib htmlview.lib oleaut32.lib commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /libpath:"..\STL_eVC" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "X86Rel"
+# PROP BASE Intermediate_Dir "X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "X86Rel"
+# PROP Intermediate_Dir "X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /YX /Gs8192 /GF /Oxs /c
+# ADD CPP /nologo /W3 /I "..\Dll1\winceSword\include" /I "..\STL_eVC" /I "..\..\..\sword\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "SIMPLE" /Gs8192 /GF /Oxs /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) ..\Dll1\X86Rel\sword.lib htmlview.lib oleaut32.lib commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /map /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /nodefaultlib /libpath:"..\STL_eVC" /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "X86Dbg"
+# PROP BASE Intermediate_Dir "X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "X86Dbg"
+# PROP Intermediate_Dir "X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "..\Dll1\winceSword\include" /I "..\STL_eVC" /I "..\..\..\sword\include" /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "SIMPLE" /Gs8192 /GF /c
+# SUBTRACT CPP /YX
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) ..\Dll1\X86Dbg\sword.lib htmlview.lib oleaut32.lib commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /libpath:"..\STL_eVC" /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ENDIF
+
+# Begin Target
+
+# Name "SwordReader_GUI - Win32 (WCE ARM) Release"
+# Name "SwordReader_GUI - Win32 (WCE ARM) Debug"
+# Name "SwordReader_GUI - Win32 (WCE x86) Release"
+# Name "SwordReader_GUI - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\gui\ApplicationInterface.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_APPLI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+ {$(INCLUDE)}"aygshell.h"\
+ {$(INCLUDE)}"sipapi.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_APPLI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_APPLI=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_APPLI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_APPLI=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_APPLI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_APPLI=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\Main.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_MAIN_=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Main.h"\
+ "..\gui\Navigator.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+ {$(INCLUDE)}"aygshell.h"\
+ {$(INCLUDE)}"htmlctrl.h"\
+ {$(INCLUDE)}"sipapi.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_MAIN_=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Main.h"\
+ "..\gui\Navigator.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_MAIN_=\
+ ".\ipapi.h"\
+ ".\tmlctrl.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_MAIN_=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Main.h"\
+ "..\gui\Navigator.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_MAIN_=\
+ ".\ipapi.h"\
+ ".\tmlctrl.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_MAIN_=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Main.h"\
+ "..\gui\Navigator.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_MAIN_=\
+ ".\ipapi.h"\
+ ".\tmlctrl.h"\
+ ".\ygshell.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavBooks.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_NAVBO=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NAVBO=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_NAVBO=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_NAVBO=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavChap.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_NAVCH=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NAVCH=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_NAVCH=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_NAVCH=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavFind.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_NAVFI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+ {$(INCLUDE)}"aygshell.h"\
+ {$(INCLUDE)}"sipapi.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NAVFI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_NAVFI=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_NAVFI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_NAVFI=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_NAVFI=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_NAVFI=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavNumbers.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_NAVNU=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NAVNU=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_NAVNU=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_NAVNU=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavRenderText.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_NAVRE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+ "..\gui\WCString.h"\
+ {$(INCLUDE)}"aygshell.h"\
+ {$(INCLUDE)}"sipapi.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NAVRE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+NODEP_CPP_NAVRE=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_NAVRE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+NODEP_CPP_NAVRE=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_NAVRE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+NODEP_CPP_NAVRE=\
+ ".\ipapi.h"\
+ ".\ygshell.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavVerse.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_NAVVE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NAVVE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_NAVVE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_NAVVE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\SimpleNavigator.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_SIMPL=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\url.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_SIMPL=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\url.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_SIMPL=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\url.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIMPL=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\url.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\NavBooks.h"\
+ "..\gui\NavChap.h"\
+ "..\gui\NavFind.h"\
+ "..\gui\NavNumbers.h"\
+ "..\gui\NavPage.h"\
+ "..\gui\NavRenderText.h"\
+ "..\gui\NavVerse.h"\
+ "..\gui\SimpleNavigator.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\SwordIndex.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_SWORD=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\encfiltmgr.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\markupfiltmgr.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swfiltermgr.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swlog.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\Dll1\winceSword\include\swwinlog.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_SWORD=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\encfiltmgr.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\markupfiltmgr.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swfiltermgr.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swlog.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\Dll1\winceSword\include\swwinlog.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_SWORD=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\encfiltmgr.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\markupfiltmgr.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swfiltermgr.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swlog.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\Dll1\winceSword\include\swwinlog.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_SWORD=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\encfiltmgr.h"\
+ "..\..\..\sword\include\listkey.h"\
+ "..\..\..\sword\include\markupfiltmgr.h"\
+ "..\..\..\sword\include\multimapwdef.h"\
+ "..\..\..\sword\include\swbasicfilter.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\..\..\sword\include\swcacher.h"\
+ "..\..\..\sword\include\swconfig.h"\
+ "..\..\..\sword\include\swdisp.h"\
+ "..\..\..\sword\include\swfilter.h"\
+ "..\..\..\sword\include\swfiltermgr.h"\
+ "..\..\..\sword\include\swkey.h"\
+ "..\..\..\sword\include\swlog.h"\
+ "..\..\..\sword\include\swmacs.h"\
+ "..\..\..\sword\include\swmgr.h"\
+ "..\..\..\sword\include\swmodule.h"\
+ "..\..\..\sword\include\swobject.h"\
+ "..\..\..\sword\include\swoptfilter.h"\
+ "..\..\..\sword\include\swsearchable.h"\
+ "..\..\..\sword\include\swtext.h"\
+ "..\..\..\sword\include\thmlhtml.h"\
+ "..\..\..\sword\include\thmlvariants.h"\
+ "..\..\..\sword\include\versekey.h"\
+ "..\..\..\sword\include\ztext.h"\
+ "..\..\..\sword\include\zverse.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\Dll1\winceSword\include\swwinlog.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\SwordIndex.h"\
+ "..\gui\Utils.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\TextControl.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_TEXTC=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+ {$(INCLUDE)}"htmlctrl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_TEXTC=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_TEXTC=\
+ ".\tmlctrl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_TEXTC=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_TEXTC=\
+ ".\tmlctrl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_TEXTC=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+
+NODEP_CPP_TEXTC=\
+ ".\tmlctrl.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\Utils.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_UTILS=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_UTILS=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_UTILS=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_UTILS=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\Utils.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\VerseTextControl.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_VERSE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+ "..\gui\WCString.h"\
+ {$(INCLUDE)}"htmlctrl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_VERSE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+NODEP_CPP_VERSE=\
+ ".\tmlctrl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_VERSE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+NODEP_CPP_VERSE=\
+ ".\tmlctrl.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_VERSE=\
+ "..\..\..\sword\include\defs.h"\
+ "..\..\..\sword\include\swbuf.h"\
+ "..\Dll1\winceSword\include\swordce.h"\
+ "..\gui\ApplicationInterface.h"\
+ "..\gui\TextControl.h"\
+ "..\gui\Utils.h"\
+ "..\gui\VerseTextControl.h"\
+
+NODEP_CPP_VERSE=\
+ ".\tmlctrl.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\WCString.cpp
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+DEP_CPP_WCSTR=\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+DEP_CPP_WCSTR=\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+DEP_CPP_WCSTR=\
+ "..\gui\WCString.h"\
+
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+DEP_CPP_WCSTR=\
+ "..\gui\WCString.h"\
+
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\gui\ApplicationInterface.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\Main.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavBooks.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavChap.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavFind.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavNumbers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavPage.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavRenderText.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\NavVerse.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\SimpleNavigator.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\SwordIndex.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\TextControl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\Utils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\VerseTextControl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\WCString.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=..\gui\BibleReader.ICO
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\bitmap1.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\search.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=..\gui\search.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\SwordReader_GUI.rc
+
+!IF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Release"
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE ARM) Debug"
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Release"
+
+!ELSEIF "$(CFG)" == "SwordReader_GUI - Win32 (WCE x86) Debug"
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
Added: trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
===================================================================
--- trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj (rev 0)
+++ trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,818 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="SwordReader_GUI"
+ ProjectGUID="{697017EE-0728-4DD1-AFBB-ABDA11CE86D5}"
+ RootNamespace="SwordReader_GUI"
+ >
+ <Platforms>
+ <Platform
+ Name="Smartphone 2003 (ARMV4)"
+ />
+ <Platform
+ Name="Windows Mobile 6 Professional SDK (ARMV4I)"
+ />
+ <Platform
+ Name="Pocket PC 2003 (ARMV4)"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Smartphone 2003 (ARMV4)"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\STL_eVC,..\..\..\sword\include,..\dll1\wincesword\include,winceSword\include"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);$(CePlatform);ARM;_ARM_;UNDER_CE=$(CEVER);UNICODE;NDEBUG;SIMPLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)/"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalOptions="/r "
+ PreprocessorDefinitions="UNDER_CE=$(CEVER),_WIN32_WCE=$(CEVER),UNICODE,_UNICODE,NDEBUG,$(CePlatform),ARM,_ARM_"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/ALIGN:4096 /subsystem:$(CESubsystem) /MACHINE:ARM "
+ AdditionalDependencies="..\Dll1\ARMRel\sword.lib htmlview.lib commctrl.lib coredll.lib aygshell.lib secchk.lib ccrtrtti.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\STL_eVC"
+ IgnoreDefaultLibraryNames="$(CENoDefaultLib)"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pdb"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ BaseAddress="0x00010000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.bsc"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\Dll1\winceSword\include;..\..\..\sword\include"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);$(CePlatform);ARM;_ARM_;UNDER_CE=$(CEVER);UNICODE;NDEBUG;SIMPLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)/"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalOptions="/r "
+ PreprocessorDefinitions="UNDER_CE=$(CEVER),_WIN32_WCE=$(CEVER),UNICODE,_UNICODE,NDEBUG,$(CePlatform),ARM,_ARM_"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/ALIGN:4096 /subsystem:$(CESubsystem) "
+ AdditionalDependencies="..\Dll1\"$(PlatformName)\$(ConfigurationName)"\sword.lib htmlview.lib commctrl.lib coredll.lib aygshell.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\STL_eVC"
+ IgnoreDefaultLibraryNames="$(CENoDefaultLib)"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pdb"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ BaseAddress="0x00010000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.bsc"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Pocket PC 2003 (ARMV4)"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\sword\include;..\dll1\wincesword\include;winceSword\include"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);$(CePlatform);ARM;_ARM_;UNDER_CE=$(CEVER);UNICODE;NDEBUG;SIMPLE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)/"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalOptions="/r "
+ PreprocessorDefinitions="UNDER_CE=$(CEVER),_WIN32_WCE=$(CEVER),UNICODE,_UNICODE,NDEBUG,$(CePlatform),ARM,_ARM_"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/ALIGN:4096 /subsystem:$(CESubsystem) /MACHINE:ARM "
+ AdditionalDependencies="..\Dll1\"$(PlatformName)\$(ConfigurationName)"\sword.lib htmlview.lib commctrl.lib coredll.lib aygshell.lib secchk.lib ccrtrtti.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\STL_eVC"
+ IgnoreDefaultLibraryNames="$(CENoDefaultLib)"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pdb"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ BaseAddress="0x00010000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.bsc"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Smartphone 2003 (ARMV4)"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\Dll1\winceSword\include,..\STL_eVC,..\..\..\sword\include"
+ PreprocessorDefinitions="DEBUG;ARM;_ARM_;UNDER_CE=$(CEVER);_WIN32_WCE=$(CEVER);$(CePlatform);UNICODE;SIMPLE"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)/"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalOptions="/r "
+ PreprocessorDefinitions="UNDER_CE=$(CEVER),_WIN32_WCE=$(CEVER),UNICODE,_UNICODE,DEBUG,$(CePlatform),ARM,_ARM_"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/ALIGN:4096 /subsystem:$(CESubsystem) /MACHINE:ARM "
+ AdditionalDependencies="..\Dll1\ARMDbg\sword.lib htmlview.lib commctrl.lib coredll.lib aygshell.lib secchk.lib ccrtrtti.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\STL_eVC"
+ IgnoreDefaultLibraryNames="$(CENoDefaultLib)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pdb"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ BaseAddress="0x00010000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.bsc"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\Dll1\winceSword\include;..\..\..\sword\include"
+ PreprocessorDefinitions="DEBUG;ARM;_ARM_;UNDER_CE=$(CEVER);_WIN32_WCE=$(CEVER);$(CePlatform);UNICODE;SIMPLE"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)/"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalOptions="/r "
+ PreprocessorDefinitions="UNDER_CE=$(CEVER),_WIN32_WCE=$(CEVER),UNICODE,_UNICODE,DEBUG,$(CePlatform),ARM,_ARM_"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/ALIGN:4096 /subsystem:$(CESubsystem) "
+ AdditionalDependencies="..\Dll1\"$(PlatformName)\$(ConfigurationName)"\sword.lib htmlview.lib commctrl.lib coredll.lib aygshell.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\STL_eVC"
+ IgnoreDefaultLibraryNames="$(CENoDefaultLib)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pdb"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ BaseAddress="0x00010000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.bsc"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory="\Storage Card\Program Files\Sword\"
+ RegisterOutput="0"
+ AdditionalFiles="../../sword.dll"
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Pocket PC 2003 (ARMV4)"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\Dll1\winceSword\include;..\..\..\sword\include"
+ PreprocessorDefinitions="DEBUG;ARM;_ARM_;UNDER_CE=$(CEVER);_WIN32_WCE=$(CEVER);$(CePlatform);UNICODE;SIMPLE"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)/"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalOptions="/r "
+ PreprocessorDefinitions="UNDER_CE=$(CEVER),_WIN32_WCE=$(CEVER),UNICODE,_UNICODE,DEBUG,$(CePlatform),ARM,_ARM_"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/ALIGN:4096 /subsystem:$(CESubsystem) /MACHINE:ARM "
+ AdditionalDependencies="..\Dll1\"$(PlatformName)\$(ConfigurationName)"\sword.lib htmlview.lib commctrl.lib coredll.lib aygshell.lib secchk.lib ccrtrtti.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="..\STL_eVC"
+ IgnoreDefaultLibraryNames="$(CENoDefaultLib)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.pdb"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ BaseAddress="0x00010000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/SwordReader_GUI.bsc"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\ApplicationInterface.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\BTextViewer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\NavBooks.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\NavChap.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\NavFind.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Navigator.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\NavNumbers.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\NavRenderText.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\NavVerse.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleNavigator.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SRWidget.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SwordIndex.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SwordReaderApp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\TextControl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Utils.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\VerseTextControl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\WCString.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\ApplicationInterface.h"
+ >
+ </File>
+ <File
+ RelativePath=".\BTextViewer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavBooks.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavChap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavFind.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Navigator.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavNumbers.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavPage.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavRenderText.h"
+ >
+ </File>
+ <File
+ RelativePath=".\NavVerse.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SimpleNavigator.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SRWidget.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SwordIndex.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SwordReaderApp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TextControl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Utils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VerseTextControl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\WCString.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="..\gui\BibleReader.ICO"
+ >
+ </File>
+ <File
+ RelativePath="..\gui\bitmap1.bmp"
+ >
+ </File>
+ <File
+ RelativePath="..\gui\search.bmp"
+ >
+ </File>
+ <File
+ RelativePath="..\gui\search.ico"
+ >
+ </File>
+ <File
+ RelativePath="SwordReader_GUI.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/src/SwordReader_GUI/TextControl.cpp
===================================================================
--- trunk/src/SwordReader_GUI/TextControl.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/TextControl.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,181 @@
+#include "ApplicationInterface.h"
+#include "TextControl.h"
+
+#include <swordce.h>
+
+//#define NOHTML
+
+#ifndef NOHTML
+
+// The sophisticated graphical representation, using an HTML component
+
+#include <htmlctrl.h>
+
+//#define debugfile
+
+#ifdef debugfile
+ #include <stdio.h>
+ FILE* file;
+ #define addHtml(window,text) SendMessage(window, DTM_ADDTEXTW, FALSE, (LPARAM)text);fwprintf(file,text);
+#else
+ #define addHtml(window,text) SendMessage(window, DTM_ADDTEXTW, FALSE, (LPARAM)text)
+#endif
+
+#define setZoom(window,zoom) SendMessage(window, DTM_ZOOMLEVEL, 0, zoom);
+#define clearHtml(window) SendMessage(window, DTM_CLEAR, 0, 0);
+#define endHtml(window) SendMessage(window, DTM_ENDOFSOURCE, 0, 0);
+#define controlToVerse(window,versenr) SendMessage(window, DTM_ANCHORW, FALSE, (LPARAM)(toUString(versenr).c_str()))
+
+TextControl::TextControl(int x, int y, int width, int height, bool preview){
+ this->preview = preview;
+ primed = false;
+ if(width < height)
+ portrait = true;
+
+ VERIFY(InitHTMLControl(g_hInst));
+ htmlPrimed = CreateWindowEx(WS_EX_NOACTIVATE, WC_HTML, NULL,
+ WS_CHILD | HS_CLEARTYPE | HS_NOSCRIPTING |
+ HS_NOIMAGES | HS_NOACTIVEX | HS_NOSOUNDS ,
+ x, y, width, height,
+ g_hWnd, NULL, g_hInst, NULL);
+ htmlFull = CreateWindowEx(WS_EX_NOACTIVATE, WC_HTML, NULL,
+ WS_CHILD | HS_CLEARTYPE | HS_NOSCRIPTING |
+ HS_NOIMAGES | HS_NOACTIVEX | HS_NOSOUNDS ,
+ x, y, width, height,
+ g_hWnd, NULL, g_hInst, NULL);
+ setZoom(htmlPrimed, 1);
+ setZoom(htmlFull, 1);
+ i = 0;
+ ShowWindow(htmlFull,SW_HIDE);
+}
+
+TextControl::~TextControl(){
+}
+
+void TextControl::show() {
+ if(preview)
+ ShowWindow(htmlPrimed,SW_SHOW);
+ else if(primed){
+ ShowWindow(htmlFull,SW_SHOW);
+ ShowWindow(htmlPrimed,SW_HIDE);
+ }else{
+ ShowWindow(htmlPrimed,SW_SHOW);
+ ShowWindow(htmlFull,SW_HIDE);
+ }
+
+}
+
+void TextControl::focus() {
+ if(primed)
+ SetFocus(htmlFull);
+ else
+ SetFocus(htmlPrimed);
+}
+
+void TextControl::hide() {
+ ShowWindow(htmlPrimed,SW_HIDE);
+ ShowWindow(htmlFull,SW_HIDE);
+}
+
+void TextControl::paint() {
+ if(preview)
+ return;
+ // Detect if we switched from portrait to landscape. If so lets resize the window appropiately.
+ int width = GetSystemMetrics(SM_CXSCREEN);
+ int height = GetSystemMetrics(SM_CYSCREEN);
+ if(width < height && !portrait){
+ portrait = true;
+ MoveWindow(htmlPrimed,0,0,width,height - 2*MENU_HEIGHT, TRUE);
+ MoveWindow(htmlFull,0,0,width,height - 2*MENU_HEIGHT, TRUE);
+
+ }else if(width > height && portrait){
+ portrait = false;
+ MoveWindow(htmlPrimed,0,0,width,height - 2*MENU_HEIGHT, TRUE);
+ MoveWindow(htmlFull,0,0,width,height - 2*MENU_HEIGHT, TRUE);
+ }
+}
+
+void TextControl::moveTo(int x, int y, int width, int height){
+ MoveWindow(htmlPrimed, x, y, width, height, TRUE);
+ MoveWindow(htmlFull, x, y, width, height, TRUE);
+}
+
+void TextControl::clearText() {
+ clearHtml(htmlPrimed);
+ clearHtml(htmlFull);
+ primed = false;
+ i = 0;
+ buffer.clear();
+}
+
+void TextControl::addText(const WCString &text) {
+ buffer+=text;
+
+ if(!preview && !primed && buffer.length() > 1500){
+ clearHtml(htmlPrimed);
+ addHtml(htmlPrimed,buffer.w_str());
+ addHtml(htmlPrimed, L"</body></html>");
+ endHtml(htmlPrimed);
+ ShowWindow(htmlPrimed,SW_SHOW);
+ ShowWindow(htmlFull,SW_HIDE);
+ UpdateWindow(g_hWnd);
+ primed = true;
+ }
+}
+
+void TextControl::endOfText() {
+
+ if(preview){
+ addHtml(htmlPrimed,buffer.w_str());
+ endHtml(htmlPrimed);
+ }else{
+ addHtml(htmlFull,buffer.w_str());
+ endHtml(htmlFull);
+ ShowWindow(htmlPrimed,SW_HIDE);
+ ShowWindow(htmlFull,SW_SHOW);
+ // In some cases this is still false due to very short chapters
+ primed = true;
+ }
+#ifdef LOG_TEXT_TO_FILE
+ FILE *fp = fopen("\\Storage Card\\Program Files\\sword\\text.txt", "w");
+ fwrite(buffer.c_str(), buffer.length(), 2, fp);
+ fclose(fp);
+#endif
+}
+
+#else //ifndef NOHTML
+
+// A simpeler graphical representation not using the HTML component
+
+TextControl::TextControl(int x, int y, int width, int height){
+ area.left=x; area.top=y; area.right=x+width; area.bottom=y+height;
+}
+
+TextControl::~TextControl(){
+}
+
+void TextControl::show() {
+}
+
+void TextControl::hide() {
+}
+
+void TextControl::paint() {
+ RECT textArea=area;
+ textArea.top+=drawVerseText(&textArea,buffer);
+ clearRect(&textArea);
+}
+
+void TextControl::clearText() {
+ buffer=L"";
+}
+
+void TextControl::addText(UString text) {
+ buffer+=noMarkup(text);
+}
+
+void TextControl::endOfText() {
+ refreshScreen();
+}
+
+#endif
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/TextControl.h
===================================================================
--- trunk/src/SwordReader_GUI/TextControl.h (rev 0)
+++ trunk/src/SwordReader_GUI/TextControl.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,35 @@
+#ifndef TEXTCONTROL_H
+#define TEXTCONTROL_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include <map>
+
+class TextControl {
+public:
+ TextControl(int x, int y, int width, int height, bool preview = false);
+ void moveTo(int x, int y, int width, int height);
+ virtual ~TextControl();
+
+ void show();
+ void hide();
+ void focus();
+ virtual void paint();
+
+ virtual void clearText();
+ void addText(const WCString &text);
+ void endOfText();
+protected:
+ HWND htmlPrimed;
+ HWND htmlFull;
+ WCString buffer;
+ RECT area;
+ bool portrait;
+ bool preview;
+ bool primed;
+ int i;
+};
+
+#endif
Added: trunk/src/SwordReader_GUI/Utils.cpp
===================================================================
--- trunk/src/SwordReader_GUI/Utils.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/Utils.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,79 @@
+#include "Utils.h"
+#include "ApplicationInterface.h"
+
+/*
+WCHAR CharToUchar(const char in){
+ WCHAR result;
+ mbstowcs(&result,&in,1);
+ return result;
+}
+
+
+char UcharToChar(const WCHAR in){
+ char result;
+ wcstombs(&result,&in,1);
+ return result;
+}
+
+UString toUString(int i) {
+ TCHAR buffer[12];
+ return UString(_itow(i, buffer, 10));
+}
+
+String toCString(int i) {
+ char buffer[12];
+ return String(_itoa(i, buffer, 10));
+}
+
+UString *toUString(UString& dst,const std::string src) {
+ dst.resize(src.length());
+ for(unsigned int i = 0; i < dst.length(); i++){
+ dst[i] = CharToUchar(src[i]);
+ }
+ return &dst;
+}
+
+std::string toCString(UString s) {
+ std::string result(s.length(),' ');
+ for(int i = 0; i < result.length(); i++){
+ result[i] = UcharToChar(s[i]);
+ }
+ return result;
+}
+
+UString noMarkup(UString in) {
+ bool inTag=false;
+ bool inEntity=false;
+ UString::iterator pos;
+ UString result;
+ for(pos=in.begin();pos!=in.end();pos++) {
+ if ((inTag)&&(*pos==L'>')) inTag=false;
+ else if ((!inTag)&&(*pos==L'<')) inTag=true;
+ else if ((!inEntity)&&(*pos==L'&')) inEntity=true;
+ else if ((inEntity)&&(*pos==L';')) { inEntity=false; result+=L' '; } //probably
+ else if ((!inTag)&&(!inEntity)&&(*pos!=L'\n')) result+=*pos;
+ }
+ return result;
+}
+*/
+bool inPortraitMode(){
+ return GetSystemMetrics(SM_CXSCREEN) <= GetSystemMetrics(SM_CYSCREEN);
+}
+
+void LOGIT(const char *msg)
+{
+#ifdef __DEBUG__
+ FILE *fp2 = fopen("\\Storage Card\\Program Files\\sword\\init_log.txt", "a");
+ fprintf(fp2, msg);
+ fclose(fp2);
+#endif // __DEBUG__
+}
+
+void LOGIT(const char *msg, int i)
+{
+#ifdef __DEBUG__
+ FILE *fp2 = fopen("\\Storage Card\\Program Files\\sword\\init_log.txt", "a");
+ fprintf(fp2, msg, i);
+ fclose(fp2);
+#endif // __DEBUG__
+}
Added: trunk/src/SwordReader_GUI/Utils.h
===================================================================
--- trunk/src/SwordReader_GUI/Utils.h (rev 0)
+++ trunk/src/SwordReader_GUI/Utils.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,35 @@
+#ifndef UTILS_H
+#define UTILS_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include <swbuf.h>
+#include <string>
+#include <map>
+#include <vector>
+
+// This file is a library containing several utilities that can be used throughout the program
+
+/*
+
+typedef std::basic_string<WCHAR> UString;
+typedef std::string String;
+
+UString toUString(int i);
+
+String toCString(int i);
+
+UString *toUString(UString& dst,const std::string src);
+
+String toCString(UString s);
+
+UString noMarkup(UString in);
+*/
+bool inPortraitMode();
+
+void LOGIT(const char *msg, int i);
+void LOGIT(const char *msg);
+
+#endif
Added: trunk/src/SwordReader_GUI/VerseTextControl.cpp
===================================================================
--- trunk/src/SwordReader_GUI/VerseTextControl.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/VerseTextControl.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,89 @@
+#include "ApplicationInterface.h"
+#include "VerseTextControl.h"
+
+#include <swordce.h>
+
+//#define NOHTML
+
+#ifndef NOHTML
+
+#include <htmlctrl.h>
+
+#define controlToVerse(window,versenr) SendMessage(window, DTM_ANCHORW, FALSE, (LPARAM)(versenr))
+
+VerseTextControl::VerseTextControl(int x, int y, int width, int height)
+ : TextControl(x,y,width,height) {}
+
+void VerseTextControl::addAnchoredText(const WCString &text, int anchor) {
+ // anchor is assumed to be embedded in the text
+ addText(text);
+}
+
+void VerseTextControl::gotoAnchor(int anchor) {
+ wchar_t wanchor[16];
+ _itow(anchor, wanchor, 10);
+ if(!primed || preview)
+ controlToVerse(htmlPrimed,wanchor);
+ else
+ controlToVerse(htmlFull,wanchor);
+}
+
+void VerseTextControl::paint() {
+ TextControl::paint();
+}
+
+void VerseTextControl::clearText() {
+ TextControl::clearText();
+}
+
+#else //ifndef NOHTML
+
+VerseTextControl::VerseTextControl(int x, int y, int width, int height)
+ : TextControl(x,y,width,height) {
+ currentAnchor=-1;
+}
+
+void VerseTextControl::paint() {
+ AnchorIterator current=anchorPositions.find(currentAnchor);
+ if (current==(AnchorIterator)anchorPositions.end()) {
+ current=anchorPositions.begin();
+ // no or invalid anchor, start at the first anchor
+ }
+ RECT textArea=area;
+ int start, end;
+ if (current==(AnchorIterator)anchorPositions.end()) start=0;
+ else start=current->second;
+ while (textArea.top<textArea.bottom) {
+ if (current==(AnchorIterator)anchorPositions.end())
+ end=buffer.length();
+ else {
+ current++;
+ end=(current==(AnchorIterator)anchorPositions.end())?buffer.length():current->second;
+ }
+ if (end<=start) {
+ clearRect(&textArea);
+ break; // no more text left
+ }
+ textArea.top+=drawVerseText(&textArea,buffer.substr(start, end-start));
+ start=end;
+ }
+}
+
+void VerseTextControl::clearText() {
+ TextControl::clearText();
+ currentAnchor=-1;
+ anchorPositions.clear();
+}
+
+
+void VerseTextControl::addAnchoredText(UString text, int anchor) {
+ anchorPositions[anchor]=buffer.length();
+ addText(text);
+}
+
+void VerseTextControl::gotoAnchor(int anchor) {
+ currentAnchor=anchor;
+ refreshScreen();
+}
+
+#endif
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/VerseTextControl.h
===================================================================
--- trunk/src/SwordReader_GUI/VerseTextControl.h (rev 0)
+++ trunk/src/SwordReader_GUI/VerseTextControl.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,26 @@
+#ifndef VERSETEXTCONTROL_H
+#define VERSETEXTCONTROL_H
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "TextControl.h"
+
+class VerseTextControl: public TextControl {
+public:
+ VerseTextControl(int x, int y, int width, int height);
+ ~VerseTextControl() {}
+ void addAnchoredText(const WCString &text, int anchor);
+ // we are able to scroll back to this point using the anchor
+ void gotoAnchor(int anchor);
+
+ virtual void paint();
+ virtual void clearText();
+protected:
+ std::map<int,int> anchorPositions; // in case of plain text
+ typedef std::map<int,int>::const_iterator AnchorIterator;
+ int currentAnchor;
+};
+
+#endif
Added: trunk/src/SwordReader_GUI/WCString.cpp
===================================================================
--- trunk/src/SwordReader_GUI/WCString.cpp (rev 0)
+++ trunk/src/SwordReader_GUI/WCString.cpp 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,237 @@
+#include "WCString.h"
+#include <string.h>
+
+WCString::WCString(void)
+: char_copy(NULL)
+, data(L" ")
+{
+
+}
+
+WCString::~WCString(void)
+{
+ if(char_copy)
+ delete [] char_copy;
+}
+
+WCString::WCString(const char * rhs)
+: char_copy(NULL)
+{
+ unsigned int len = strlen(rhs);
+ unsigned int i = 0;
+ if(data.size() < len)
+ data.resize(len);
+
+ for(i = 0; i < len; i++){
+ data[i] = (wchar_t)rhs[i];
+ }
+}
+
+WCString::WCString(const WCString &rhs)
+: data(rhs.data)
+, char_copy(NULL)
+{
+
+}
+
+WCString::WCString(const wchar_t * rhs)
+: char_copy(NULL)
+{
+ unsigned int len = 0;
+ unsigned int i = 0;
+
+ // This is so dangerous...
+ while(rhs[len]) len++;
+
+ if(data.size() < len)
+ data.resize(len);
+
+ for(i = 0; i < len; i++){
+ data[i] = rhs[i];
+ }
+}
+
+WCString::WCString(const std::string &rhs)
+: char_copy(NULL)
+{
+ unsigned int len = rhs.length();
+ unsigned int i = 0;
+ if(data.size() < len)
+ data.resize(len);
+
+ for(i = 0; i < len; i++){
+ data[i] = (wchar_t)rhs[i];
+ }
+}
+
+std::string WCString::to_string()
+{
+ unsigned int i = 0;
+ std::string retval;
+ retval.resize(data.length());
+ for(i = 0; i < data.length(); i++)
+ retval[i] = (char)data[i];
+ retval[i] = 0;
+ return retval;
+}
+
+WCString &WCString::operator=(const WCString &rhs)
+{
+ if(this != &rhs)
+ data = rhs.data;
+
+ return *this;
+}
+
+const wchar_t *WCString::w_str() const
+{
+ return data.c_str();
+}
+
+const char *WCString::c_str() const
+{
+ unsigned int i = 0;
+ if(char_copy)
+ delete [] char_copy;
+ char_copy = new char[data.length() + 1];
+ for(i = 0; i < data.length(); i++)
+ char_copy[i] = (char)data[i];
+ char_copy[i] = 0;
+
+ return char_copy;
+}
+WCString &WCString::operator=(const std::string &rhs)
+{
+ unsigned int i = 0;
+ if(rhs.length() > data.size())
+ data.resize(rhs.length());
+ for(i = 0; i < rhs.length(); i++)
+ data[i] = (wchar_t)rhs[i];
+
+ return *this;
+}
+
+WCString &WCString::operator=(const wchar_t *rhs)
+{
+ unsigned int i = 0;
+ unsigned int len = 0;
+ // This is so dangerous...
+ while(rhs[len]) len++;
+
+ if(len > data.size())
+ data.resize(len);
+ for(i = 0; i < len; i++)
+ data[i] = rhs[i];
+
+ return *this;
+}
+
+WCString &WCString::operator=(const char *rhs)
+{
+ unsigned int i = 0;
+ unsigned int len = 0;
+ // This is so dangerous...
+ while(rhs[len]) len++;
+
+ if(len > data.size())
+ data.resize(len);
+ for(i = 0; i < len; i++)
+ data[i] = (wchar_t)rhs[i];
+
+ return *this;
+}
+
+WCString &WCString::operator+=(const WCString &rhs)
+{
+ unsigned int i = 0;
+ unsigned int di = data.length();
+ unsigned int ri = rhs.length();
+
+ if(this == &rhs)
+ return *this;
+ if(data.size() < rhs.length() + di)
+ data.resize(rhs.length() + di);
+
+ for(i = 0; i < rhs.length(); i++){
+ data[di + i] = rhs.data[i];
+ }
+
+ return *this;
+}
+
+WCString &WCString::operator+=(const std::string &rhs)
+{
+ unsigned int i = 0;
+ unsigned int di = data.length();
+ if(rhs.length() + di > data.size())
+ data.resize(rhs.length() + di);
+ for(i = 0; i < rhs.length(); i++)
+ data[di + i] = (wchar_t)rhs[i];
+ return *this;
+}
+
+WCString &WCString::operator+=(const wchar_t *rhs)
+{
+ unsigned int i = 0;
+ unsigned int len = 0;
+ unsigned int di = data.length();
+ // This is so dangerous...
+ while(rhs[len]) len++;
+
+ if(len + di > data.size())
+ data.resize(len + di);
+ for(i = 0; i < len; i++)
+ data[di + i] = rhs[i];
+ //data[di + i] = 0;
+ return *this;
+}
+
+WCString &WCString::operator+=(const char *rhs)
+{
+ unsigned int i = 0;
+ unsigned int len = 0;
+ unsigned int di = data.length();
+
+ // This is so dangerous...
+ while(rhs[len]) len++;
+
+ if(len + di > data.size())
+ data.resize(len + di);
+ for(i = 0; i < len; i++)
+ data[di + i] = (wchar_t)rhs[i];
+
+ return *this;
+}
+
+
+WCString WCString::operator+(const WCString &rhs)
+{
+ WCString retval = *this;
+ retval += rhs;
+
+ return retval;
+}
+
+WCString WCString::operator+(const std::string &rhs)
+{
+ WCString retval = *this;
+ retval += rhs;
+
+ return retval;
+}
+
+WCString WCString::operator+(const wchar_t *rhs)
+{
+ WCString retval = *this;
+ retval += rhs;
+
+ return retval;
+}
+
+WCString WCString::operator+(const char *rhs)
+{
+ WCString retval = *this;
+ retval += rhs;
+
+ return retval;
+}
\ No newline at end of file
Added: trunk/src/SwordReader_GUI/WCString.h
===================================================================
--- trunk/src/SwordReader_GUI/WCString.h (rev 0)
+++ trunk/src/SwordReader_GUI/WCString.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,42 @@
+#pragma once
+
+#include <string>
+
+class WCString
+{
+public:
+ WCString(void);
+ WCString(const char *rhs);
+ WCString(const wchar_t *rhs);
+ WCString(const std::string &rhs);
+ WCString(const WCString &rhs);
+
+ ~WCString(void);
+
+ std::string to_string();
+ const wchar_t *w_str() const;
+ const char *c_str() const;
+
+ unsigned int length() const
+ { return data.length(); }
+ void clear() { data.clear(); }
+
+ WCString &operator=(const WCString &rhs);
+ WCString &operator=(const std::string &rhs);
+ WCString &operator=(const wchar_t *rhs);
+ WCString &operator=(const char *rhs);
+
+ WCString &operator+=(const WCString &rhs);
+ WCString &operator+=(const std::string &rhs);
+ WCString &operator+=(const wchar_t *rhs);
+ WCString &operator+=(const char *rhs);
+
+ WCString operator+(const WCString &rhs);
+ WCString operator+(const std::string &rhs);
+ WCString operator+(const wchar_t *rhs);
+ WCString operator+(const char *rhs);
+
+protected:
+ std::basic_string<wchar_t> data;
+ mutable char *char_copy;
+};
Added: trunk/src/SwordReader_GUI/newres.h
===================================================================
--- trunk/src/SwordReader_GUI/newres.h (rev 0)
+++ trunk/src/SwordReader_GUI/newres.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,41 @@
+#ifndef __NEWRES_H__
+#define __NEWRES_H__
+
+#if !defined(UNDER_CE)
+#define UNDER_CE _WIN32_WCE
+#endif
+
+#if defined(_WIN32_WCE)
+ #if !defined(WCEOLE_ENABLE_DIALOGEX)
+ #define DIALOGEX DIALOG DISCARDABLE
+ #endif
+ #include <commctrl.h>
+ #define SHMENUBAR RCDATA
+ #if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300)
+ #include <aygshell.h>
+ #define AFXCE_IDR_SCRATCH_SHMENU 28700
+ #else
+ #define I_IMAGENONE (-2)
+ #define NOMENU 0xFFFF
+ #define IDS_SHNEW 1
+
+ #define IDM_SHAREDNEW 10
+ #define IDM_SHAREDNEWDEFAULT 11
+ #endif // _WIN32_WCE_PSPC
+ #define AFXCE_IDD_SAVEMODIFIEDDLG 28701
+#endif // _WIN32_WCE
+
+#ifdef RC_INVOKED
+#ifndef _INC_WINDOWS
+#define _INC_WINDOWS
+ #include "winuser.h" // extract from windows header
+ #include "winver.h"
+#endif
+#endif
+
+#ifdef IDC_STATIC
+#undef IDC_STATIC
+#endif
+#define IDC_STATIC (-1)
+
+#endif //__NEWRES_H__
Added: trunk/src/SwordReader_GUI/resource.h
===================================================================
--- trunk/src/SwordReader_GUI/resource.h (rev 0)
+++ trunk/src/SwordReader_GUI/resource.h 2008-03-26 04:18:44 UTC (rev 105)
@@ -0,0 +1,45 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by SwordReader_GUI.rc
+//
+#define IDS_APP_TITLE 1
+#define IDS_HELLO 2
+#define IDC_BIBLEREADER 3
+#define IDI_BIBLEREADER 101
+#define IDM_MENU 102
+#define IDD_ERROR_NOBIBLES 103
+#define IDS_HELP 104
+#define IDS_COMMAND1 301
+#define IDM_MAIN_COMMAND1 40001
+#define IDM_HELP_ABOUT 40003
+#define MENU_BOOK 40004
+#define IDS_CAP_BOOK 40006
+#define MENU_CHAP 40007
+#define IDS_CAP_CHAP 40009
+#define MENU_VERSE 40010
+#define IDS_CAP_TEXT 40013
+#define MENU_BIBLE 40014
+#define IDS_CAP_VERSE 40016
+#define IDS_CAP_BIBLE 40018
+#define MENU_TEXT 40019
+#define IDS_SELECTBOOK 40019
+#define IDS_SELECTCHAP 40020
+#define MENU_MENU 40021
+#define IDS_SELECTBIBLE 40022
+#define IDS_CAP_MENU 40023
+#define MENU_FIND 40029
+#define IDS_CAP_FIND 40030
+#define MENU_SHUTDOWN 40031
+#define MENU_ABOUT 40032
+#define USERBUTTONS 41000
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 109
+#define _APS_NEXT_COMMAND_VALUE 40033
+#define _APS_NEXT_CONTROL_VALUE 1002
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
More information about the sword-cvs
mailing list