[sword-svn] r199 - in trunk/src/SwordReader_GUI: . SRFramework
dtrotzjr at crosswire.org
dtrotzjr at crosswire.org
Fri Jan 30 18:50:25 MST 2009
Author: dtrotzjr
Date: 2009-01-30 18:50:25 -0700 (Fri, 30 Jan 2009)
New Revision: 199
Added:
trunk/src/SwordReader_GUI/SRWidgetView.h
Modified:
trunk/src/SwordReader_GUI/SRBibleWidget.cpp
trunk/src/SwordReader_GUI/SRBibleWidget.h
trunk/src/SwordReader_GUI/SRFind.cpp
trunk/src/SwordReader_GUI/SRFramework/SRWnd.cpp
trunk/src/SwordReader_GUI/SRFramework/SRWnd.h
trunk/src/SwordReader_GUI/SRFramework/WCString.h
trunk/src/SwordReader_GUI/SRMainFrame.cpp
trunk/src/SwordReader_GUI/SRModuleView.cpp
trunk/src/SwordReader_GUI/SRSubWindow.cpp
trunk/src/SwordReader_GUI/SRSubWindow.h
trunk/src/SwordReader_GUI/SRTabbedViews.cpp
trunk/src/SwordReader_GUI/SRTextView.cpp
trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
Log:
More pop-up stuff. Popups for notes, cross-refs and strongs numbers work nicely now.
Modified: trunk/src/SwordReader_GUI/SRBibleWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRBibleWidget.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRBibleWidget.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -234,39 +234,30 @@
VOID SRBibleWidget::ShowLexiSubWindow()
{
- RECT clientRect;
- RECT mainRect, subRect, nullRect = {0,0,0,0};
- int i,j,tmp;
- if(!m_viewLexi || !m_viewBible)
+ if(m_fLexiVisible)
return;
-
- GetClientRect(m_hWnd, &clientRect);
- mainRect = clientRect;
- subRect = clientRect;
-
- if(m_fNoteVisible){
- m_subWndNote->Hide();
+ else if(m_fNoteVisible){
+ HideSubWindow(m_subWndNote);
m_fNoteVisible = FALSE;
}
-
- m_subWndLexi->MoveWindow(&nullRect);
- m_subWndLexi->Show();
- for(i = 0, j = 1; i < 80;){
- Sleep(5);
- tmp = 20 - j++;
- i += tmp;
- mainRect.bottom -= tmp;
- subRect.top = mainRect.bottom;
- m_viewBible->MoveWindow(&mainRect);
- m_subWndLexi->MoveWindow(&subRect);
- m_viewBible->RefreshWindow();
- m_subWndLexi->RefreshWindow();
- }
+ ShowSubWindow(m_subWndLexi);
m_fLexiVisible = TRUE;
}
VOID SRBibleWidget::ShowNoteSubWindow()
{
+ if(m_fNoteVisible)
+ return;
+ else if(m_fLexiVisible){
+ HideSubWindow(m_subWndLexi);
+ m_fLexiVisible = FALSE;
+ }
+ ShowSubWindow(m_subWndNote);
+ m_fNoteVisible = TRUE;
+}
+
+VOID SRBibleWidget::ShowSubWindow(SRSubWindow *pSubWnd)
+{
RECT clientRect;
RECT mainRect, subRect, nullRect = {0,0,0,0};
int i,j,tmp;
@@ -277,25 +268,19 @@
mainRect = clientRect;
subRect = clientRect;
- if(m_fLexiVisible){
- m_subWndLexi->Hide();
- m_fLexiVisible = FALSE;
- }
-
- m_subWndNote->MoveWindow(&nullRect);
- m_subWndNote->Show();
+ pSubWnd->MoveWindow(&nullRect);
+ pSubWnd->Show();
for(i = 0, j = 1; i < 80;){
- Sleep(5);
+ //Sleep(5);
tmp = 20 - j++;
i += tmp;
mainRect.bottom -= tmp;
subRect.top = mainRect.bottom;
m_viewBible->MoveWindow(&mainRect);
- m_subWndNote->MoveWindow(&subRect);
+ pSubWnd->MoveWindow(&subRect);
m_viewBible->RefreshWindow();
- m_subWndNote->RefreshWindow();
+ pSubWnd->RefreshWindow();
}
- m_fNoteVisible = TRUE;
}
VOID SRBibleWidget::ShowGreekDef(const WCString &key)
@@ -352,4 +337,36 @@
if(!m_fNoteVisible){
ShowNoteSubWindow();
}
+}
+
+VOID SRBibleWidget::HideSubWindow(SRSubWindow *pSubWnd)
+{
+ RECT mainRect, subRect, nullRect = {0,0,0,0};
+ int i,j,tmp;
+ if(!pSubWnd || !m_viewBible)
+ return;
+
+ mainRect = m_viewBible->GetBounds();
+ subRect = pSubWnd->GetBounds();
+ subRect.top += mainRect.bottom;
+ subRect.bottom += mainRect.bottom;
+
+ //pSubWnd->MoveWindow(&nullRect);
+ for(i = 0, j = 1; i < 80;){
+ //Sleep(5);
+ tmp = 20 - j++;
+ i += tmp;
+ mainRect.bottom += tmp;
+ subRect.top = mainRect.bottom;
+ m_viewBible->MoveWindow(&mainRect);
+ m_viewBible->RefreshWindow();
+ pSubWnd->MoveWindow(&subRect);
+ pSubWnd->RefreshWindow();
+ }
+ pSubWnd->Hide();
+
+ if(pSubWnd == m_subWndLexi)
+ m_fLexiVisible = FALSE;
+ else if(pSubWnd == m_subWndNote)
+ m_fNoteVisible = FALSE;
}
\ No newline at end of file
Modified: trunk/src/SwordReader_GUI/SRBibleWidget.h
===================================================================
--- trunk/src/SwordReader_GUI/SRBibleWidget.h 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRBibleWidget.h 2009-01-31 01:50:25 UTC (rev 199)
@@ -1,12 +1,13 @@
#pragma once
#include "SRModuleView.h"
#include "SRModuleHolder.h"
+#include "SRWidgetView.h"
#include "SRSubWindow.h"
#include "SRLexiView.h"
#include "swmodule.h"
#include "versekey.h"
-class SRBibleWidget : public SRWnd, public SRModuleHolder
+class SRBibleWidget : public SRWnd, public SRModuleHolder, public SRWidgetView
{
public:
SRBibleWidget();
@@ -41,6 +42,8 @@
VOID ShowHebrewMorph(const WCString &key);
VOID ShowBibleNote(const WCString ¬e);
+ VOID ShowSubWindow(SRSubWindow *pSubWnd);
+ VOID HideSubWindow(SRSubWindow *pSubWnd);
VOID ShowLexiSubWindow();
VOID ShowNoteSubWindow();
Modified: trunk/src/SwordReader_GUI/SRFind.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRFind.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRFind.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -227,8 +227,9 @@
VOID SRFind::PlaceWidgets()
{
- int width = m_rect.right - m_rect.left;
- int height = m_rect.bottom - m_rect.top;
+ RECT clientRect = GetBounds();
+ int width = clientRect.right - clientRect.left;
+ int height = clientRect.bottom - clientRect.top;
int searchBtnW = 60;
int pad = 2;
int btnH = 24;
Modified: trunk/src/SwordReader_GUI/SRFramework/SRWnd.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRFramework/SRWnd.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRFramework/SRWnd.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -27,19 +27,18 @@
HWND hParent = m_pParentWnd ? m_pParentWnd->m_hWnd : NULL;
m_hMenu = hMenu;
m_hInstance = hInstance;
- m_rect = rect;
m_hWnd = CreateWindow(wcsClassName.w_str(),
wcsWindowName.w_str(),
dwStyle,
- m_rect.left,
- m_rect.top,
- m_rect.right == CW_USEDEFAULT ?
+ rect.left,
+ rect.top,
+ rect.right == CW_USEDEFAULT ?
CW_USEDEFAULT :
- m_rect.right - m_rect.left,
- m_rect.right == CW_USEDEFAULT ?
+ rect.right - rect.left,
+ rect.right == CW_USEDEFAULT ?
CW_USEDEFAULT :
- m_rect.bottom - m_rect.top,
+ rect.bottom - rect.top,
hParent,
m_hMenu,
m_hInstance,
@@ -91,11 +90,7 @@
void SRWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint)
{
- m_rect.top = y;
- m_rect.left = x;
- m_rect.right = x + nWidth;
- m_rect.bottom = y + nHeight;
- ::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint);
+ ::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint);
}
void SRWnd::MoveWindow(LPCRECT lpRect,BOOL bRepaint)
@@ -218,3 +213,11 @@
}
return FALSE; // Never happens.
}
+
+
+RECT SRWnd::GetBounds()
+{
+ RECT clientRect;
+ GetClientRect(m_hWnd, &clientRect);
+ return clientRect;
+}
\ No newline at end of file
Modified: trunk/src/SwordReader_GUI/SRFramework/SRWnd.h
===================================================================
--- trunk/src/SwordReader_GUI/SRFramework/SRWnd.h 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRFramework/SRWnd.h 2009-01-31 01:50:25 UTC (rev 199)
@@ -190,6 +190,9 @@
virtual BOOL OnQuit(INT nExitCode) { return FALSE; }
virtual const SRWnd *GetParentWindow() const { return m_pParentWnd; }
+
+ RECT GetBounds();
+
protected:
virtual BOOL Register() = 0;
@@ -198,7 +201,6 @@
WCString m_wcsClassName;
WCString m_wcsWindowName;
DWORD m_dwStyle;
- RECT m_rect;
SRWnd* m_pParentWnd;
HMENU m_hMenu;
HINSTANCE m_hInstance;
Modified: trunk/src/SwordReader_GUI/SRFramework/WCString.h
===================================================================
--- trunk/src/SwordReader_GUI/SRFramework/WCString.h 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRFramework/WCString.h 2009-01-31 01:50:25 UTC (rev 199)
@@ -31,6 +31,7 @@
WCString &operator+=(const std::string &rhs);
WCString &operator+=(const wchar_t *rhs);
WCString &operator+=(const char *rhs);
+ BOOL operator==(const WCString &rhs) const { return data == rhs.data; }
WCString operator+(const WCString &rhs);
WCString operator+(const std::string &rhs);
Modified: trunk/src/SwordReader_GUI/SRMainFrame.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRMainFrame.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRMainFrame.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -135,8 +135,6 @@
if(!SRFrame::Create(m_wcsClassName,m_wcsWindowName,WS_VISIBLE, bounds, NULL, NULL, m_hInstance))
return FALSE;
- // Since we used default we need to get the rect value.
- GetClientRect(m_hWnd, &m_rect);
return TRUE;
}
@@ -386,12 +384,16 @@
WCString wcsModule = url.getParameterValue("module");
WCString wcsKey = url.getParameterValue("passage");
WCString wcsValue = url.getParameterValue("value");
+ WCString wcsType = url.getParameterValue("type");
mod = m_swmgr->getModule(wcsModule.c_str());
mod->setKey(wcsKey.c_str());
mod->RenderText();
SWBuf bufNote = mod->getEntryAttributes()["Footnote"][wcsValue.c_str()]["body"];
WCString wcsNote = "<html><body>";
- wcsNote += (const TCHAR*)mod->RenderText(bufNote.c_str());
+ if(wcsType == WCString("n"))
+ wcsNote += (const TCHAR*)mod->RenderText(bufNote.c_str());
+ else if(wcsType == WCString("x"))
+ wcsNote += bufNote.c_str();
wcsNote += "</body></html>";
m_tabViews->ShowBibleNote(wcsNote);
// Send this somewhere and show it...
Modified: trunk/src/SwordReader_GUI/SRModuleView.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRModuleView.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRModuleView.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -50,13 +50,11 @@
VOID SRModuleView::SetModule(SWModule *pModule)
{
- //EnterCriticalSection(EnterCriticalSection(&m_csLoadText);m_csLoadText);
if(m_pModule == pModule)
return;
AbortThread();
m_pModule = pModule;
m_fChapterChanged = TRUE;
- //LeaveCriticalSection(LeaveCriticalSection(&m_csLoadText);m_csLoadText);
LoadTextView();
}
@@ -175,7 +173,6 @@
AbortThread();
}
- //EnterCriticalSection(EnterCriticalSection(&m_csLoadText);m_csLoadText);
VerseKey keyCur(m_verse);
if(!fInThread){ // This text should still be valid...
@@ -257,8 +254,6 @@
if(!fInThread || !m_fAbortThread)
RefreshWindow();
- //LeaveCriticalSection(LeaveCriticalSection(&m_csLoadText);m_csLoadText);
-
if(done){
ScrollToVerse(m_verse.Verse());
}else if(!fInThread){ // Overkill but, I am a paranoid guy.
@@ -273,6 +268,7 @@
TCHAR szStat[BUFSIZE] = {0};
RECT r = {0};
float fpPercent;
+ RECT clientRect = GetBounds();
HBRUSH brushBG, brushPBAR;
HGDIOBJ oldBrush, oldFont;
LOGFONT lfFont;
@@ -282,9 +278,9 @@
COLORREF oldColor;
r.left = 0;
- r.right = m_rect.right;
- r.top = m_rect.bottom - 12;
- r.bottom = m_rect.bottom;
+ r.right = clientRect.right;
+ r.top = clientRect.bottom - 12;
+ r.bottom = clientRect.bottom;
hdc = GetDC(m_hWnd);
PreRenderBuff(hdc); // Allows the text to show as soon as it is loaded in.
@@ -370,19 +366,18 @@
BOOL SRModuleView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
INT a = 0;
+ RECT clientRect = GetBounds();
switch(nChar)
{
case VK_UP:
ScrollFullPage(1);
if(GetVerseNum() > -1)
m_verse.Verse(GetVerseNum());
- //UpdateWindowTitle();
break;
case VK_DOWN:
ScrollFullPage(-1);
if(GetVerseNum() > -1)
m_verse.Verse(GetVerseNum());
- //UpdateWindowTitle();
break;
case VK_LEFT:
if(m_viewType == BibleView){
@@ -396,7 +391,7 @@
LoadTextView();
}
}else if(m_viewType == CommView){
- if(-m_nTop > (m_rect.bottom - m_rect.top)){
+ if(-m_nTop > (clientRect.bottom - clientRect.top)){
ScrollToPosition(0,FALSE);
}else{
m_verse.decrement(1);
@@ -404,7 +399,6 @@
LoadTextView();
}
}
- //UpdateWindowTitle();
break;
case VK_RIGHT:
@@ -431,16 +425,12 @@
wchar_t wchapt[16] = {0};
if(!m_fSwordInit)
return "";
- //EnterCriticalSection(EnterCriticalSection(&m_csLoadText);m_csLoadText);
-
WCString title =
WCString(m_pModule->Name()) + " " +
SRMainFrame::GetBookNames()[(m_verse.Book() - 1) + BIBLE_OT_BOOKS*(m_verse.Testament() - 1)] + WCString(" ") +
WCString(_itow(m_verse.Chapter(),wchapt, 10)) + WCString(":") +
WCString(_itow(m_verse.Verse(), wverse, 10));
- //LeaveCriticalSection(LeaveCriticalSection(&m_csLoadText);m_csLoadText);
-
return title;
}
Modified: trunk/src/SwordReader_GUI/SRSubWindow.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRSubWindow.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRSubWindow.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -1,5 +1,7 @@
#include "SRFramework\SRApp.h"
#include "SRSubWindow.h"
+#include "SRWidgetView.h"
+
#include "resource.h"
using namespace SRFramework;
@@ -104,4 +106,19 @@
rectSub.right = 0;
SRWnd::MoveWindow(lpRect,bRepaint);
m_wndSub->MoveWindow(&rectSub,bRepaint);
+}
+
+BOOL SRSubWindow::OnLButtonUp(WORD fwKeys, INT xPos, INT yPos)
+{
+ RECT clientRect;
+ GetClientRect(m_hWnd, &clientRect);
+
+ if(xPos > clientRect.right - 20 && yPos < clientRect.bottom){
+ SRWidgetView *parent = dynamic_cast<SRWidgetView*>(m_pParentWnd);
+ if(parent)
+ parent->HideSubWindow(this);
+ return TRUE;
+ }
+ return FALSE;
+
}
\ No newline at end of file
Modified: trunk/src/SwordReader_GUI/SRSubWindow.h
===================================================================
--- trunk/src/SwordReader_GUI/SRSubWindow.h 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRSubWindow.h 2009-01-31 01:50:25 UTC (rev 199)
@@ -12,7 +12,8 @@
BOOL Create(SRFramework::SRWnd *pParentWnd, RECT bounds);
BOOL OnPaint();
- void MoveWindow(LPCRECT lpRect,BOOL bRepaint = TRUE);
+ VOID MoveWindow(LPCRECT lpRect,BOOL bRepaint = TRUE);
+ BOOL OnLButtonUp(WORD fwKeys, INT xPos, INT yPos);
SRFramework::SRWnd *GetSubWnd() { return m_wndSub; }
Modified: trunk/src/SwordReader_GUI/SRTabbedViews.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRTabbedViews.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRTabbedViews.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -86,27 +86,28 @@
BOOL SRTabbedViews::InitViews()
{
RECT tab_rect;
- RECT views_rect = m_rect;
+ RECT views_rect = GetBounds();
+ RECT clientRect = GetBounds();
m_viewBible = new SRBibleWidget();
- if(!m_viewBible || !m_viewBible->Create(this, m_rect))
+ if(!m_viewBible || !m_viewBible->Create(this, clientRect))
return FALSE;
m_viewBible->Show();
m_viewBible->Init();
m_viewComm = new SRModuleView(CommView);
- if(!m_viewComm || !m_viewComm->Create(this, m_rect))
+ if(!m_viewComm || !m_viewComm->Create(this, clientRect))
return FALSE;
m_viewComm->Hide();
m_viewDict = new SRLexiWidget();
- if(!m_viewDict || !m_viewDict->Create(this, m_rect))
+ if(!m_viewDict || !m_viewDict->Create(this, clientRect))
return FALSE;
m_viewDict->Init();
m_viewDict->Hide();
// Create the tab control
- if(!m_tabs.Create(this, m_rect, WS_CHILD | WS_VISIBLE | TCS_BOTTOM | TCS_FOCUSNEVER))
+ if(!m_tabs.Create(this, clientRect, WS_CHILD | WS_VISIBLE | TCS_BOTTOM | TCS_FOCUSNEVER))
return FALSE;
if(!InitTabs())
return FALSE;
@@ -115,9 +116,9 @@
m_tabs.GetItemRect(0, &tab_rect);
tab_rect.bottom += 2;
if(0){ // Tabs on top... soon to be an option...
- m_tabs.MoveWindow(m_rect.left,m_rect.top,m_rect.right - m_rect.left, tab_rect.bottom - tab_rect.top, TRUE);
+ m_tabs.MoveWindow(clientRect.left,clientRect.top,clientRect.right - clientRect.left, tab_rect.bottom - tab_rect.top, TRUE);
}else{
- m_tabs.MoveWindow(m_rect.left,m_rect.bottom - (tab_rect.bottom - tab_rect.top),m_rect.right - m_rect.left, tab_rect.bottom - tab_rect.top, TRUE);
+ m_tabs.MoveWindow(clientRect.left,clientRect.bottom - (tab_rect.bottom - tab_rect.top),clientRect.right - clientRect.left, tab_rect.bottom - tab_rect.top, TRUE);
}
if(0){ // Same as above
Modified: trunk/src/SwordReader_GUI/SRTextView.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRTextView.cpp 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SRTextView.cpp 2009-01-31 01:50:25 UTC (rev 199)
@@ -467,6 +467,7 @@
{
SRTextWord thisWord;
RECT rectDims;
+ RECT clientRect = GetBounds();
rectDims.top = 0;
rectDims.left = 0;
rectDims.right = 0;
@@ -474,7 +475,7 @@
INT nLineH = (INT)(BTEXT_LINE_SPACING*(FLOAT)DrawText(hdc, L" ", 1, &rectDims, DT_CALCRECT | DT_LEFT | DT_BOTTOM | DT_SINGLELINE));
DWORD dwWordEnd = 0;
INT nSpaceWidth = rectDims.right - rectDims.left;
- INT nScreenWidth= (m_rect.right - m_rect.left) - BTEXT_MARGIN;
+ INT nScreenWidth= (clientRect.right - clientRect.left) - BTEXT_MARGIN;
DWORD dwResult = 0;
INT nAddLines = 0;
DWORDLONG dwlFontState= 0;
@@ -737,7 +738,7 @@
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){
+ while(pTWord){
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);
@@ -845,6 +846,7 @@
if(pbtWord->m_lpszWord){
if((pbtWord->m_dwlfFontState & BTEXT_HTML_A_BEG) && pbtWord->m_lpszHref){
wcsncpy(szWordFound, pbtWord->m_lpszHref, pbtWord->m_dwHrefLen);
+ szWordFound[pbtWord->m_dwHrefLen] = 0;
::SendMessage(m_pParentWnd->GetWindowHandle(), WM_COMMAND, (SR_MSRC_TEXT << 16) | SR_HYPERLINK_CLICKED, (LPARAM)szWordFound);
}/*else{
wcsncpy(szWordFound, (TCHAR*)((DWORD)pbtWord->m_lpszWord + (DWORD)(pbtWord->m_fOwner ? 0 : &m_lpszBuff[0])), pbtWord->m_dwWordLen);
@@ -1114,12 +1116,13 @@
BOOL SRTextView::CurrentPageFilled()
{
BOOL fPageFull = FALSE;
+ RECT clientRect = GetBounds();
HDC hdc = GetDC(m_hWnd);
PreRenderBuff(hdc);
ReleaseDC(m_hWnd, hdc);
if(m_BTLines.m_lppLinesLastWord && m_BTLines.m_lppLinesLastWord[m_BTLines.m_dwLastLine]->m_lpPrevWord)
- fPageFull = (m_BTLines.m_lppLinesLastWord[m_BTLines.m_dwLastLine]->m_lpPrevWord->m_rect.bottom - m_nTop) > (m_rect.bottom - m_rect.top);
+ fPageFull = (m_BTLines.m_lppLinesLastWord[m_BTLines.m_dwLastLine]->m_lpPrevWord->m_rect.bottom - m_nTop) > (clientRect.bottom - clientRect.top);
return fPageFull;
}
/*****************************************************************************
Added: trunk/src/SwordReader_GUI/SRWidgetView.h
===================================================================
--- trunk/src/SwordReader_GUI/SRWidgetView.h (rev 0)
+++ trunk/src/SwordReader_GUI/SRWidgetView.h 2009-01-31 01:50:25 UTC (rev 199)
@@ -0,0 +1,8 @@
+#pragma once
+class SRSubWindow;
+
+class SRWidgetView
+{
+public:
+ virtual VOID HideSubWindow(SRSubWindow *pSubWnd) = 0;
+};
\ No newline at end of file
Modified: trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj
===================================================================
--- trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj 2009-01-30 21:37:51 UTC (rev 198)
+++ trunk/src/SwordReader_GUI/SwordReader_GUI.vcproj 2009-01-31 01:50:25 UTC (rev 199)
@@ -1047,6 +1047,10 @@
>
</File>
<File
+ RelativePath=".\SRWidgetView.h"
+ >
+ </File>
+ <File
RelativePath=".\SwordReaderResource.h"
>
</File>
@@ -1120,11 +1124,11 @@
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
- RelativePath="..\gui\BibleReader.ICO"
+ RelativePath=".\BibleReader.ICO"
>
</File>
<File
- RelativePath=".\BibleReader.ICO"
+ RelativePath="..\gui\BibleReader.ICO"
>
</File>
<File
More information about the sword-cvs
mailing list