[sword-svn] r438 - in trunk: . stage

scribe at www.crosswire.org scribe at www.crosswire.org
Mon Aug 21 17:27:54 MST 2006


Author: scribe
Date: 2006-08-21 17:26:24 -0700 (Mon, 21 Aug 2006)
New Revision: 438

Added:
   trunk/entryprvfrm.cpp
   trunk/entryprvfrm.dfm
   trunk/entryprvfrm.h
   trunk/find.bmp
Modified:
   trunk/mainfrm.cpp
   trunk/mainfrm.h
   trunk/stage/layout.conf
   trunk/sword.bpr
   trunk/sword.cpp
   trunk/sword.res
Log:
Added support for "Note Popouts" to facilitate NET Bible large notes.

Added: trunk/entryprvfrm.cpp
===================================================================
--- trunk/entryprvfrm.cpp	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/entryprvfrm.cpp	2006-08-22 00:26:24 UTC (rev 438)
@@ -0,0 +1,31 @@
+//---------------------------------------------------------------------------
+
+#include <vcl.h>
+#pragma hdrstop
+
+#include "entryprvfrm.h"
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+TentryPreviewForm *entryPreviewForm;
+//---------------------------------------------------------------------------
+__fastcall TentryPreviewForm::TentryPreviewForm(TComponent* Owner)
+	: TForm(Owner)
+{
+	pvrtf = new TRxRichEditX(this);
+
+	pvrtf->Parent = previewPanel;
+	pvrtf->Align = alClient;
+	pvrtf->ScrollBars = ssVertical;
+	pvrtf->ReadOnly = true;
+}
+//---------------------------------------------------------------------------
+ 
+void TentryPreviewForm::setEntryText(const char *buf) {
+	pvrtf->fillWithRTFString(0, buf);
+ }
+void __fastcall TentryPreviewForm::BitBtn1Click(TObject *Sender)
+{
+	Form1->RestoreState(&modState);	
+}
+//---------------------------------------------------------------------------

Added: trunk/entryprvfrm.dfm
===================================================================
--- trunk/entryprvfrm.dfm	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/entryprvfrm.dfm	2006-08-22 00:26:24 UTC (rev 438)
@@ -0,0 +1,60 @@
+object entryPreviewForm: TentryPreviewForm
+  Left = 878
+  Top = 108
+  Width = 521
+  Height = 406
+  Caption = 'entryPreviewForm'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = False
+  Position = poScreenCenter
+  Scaled = False
+  ShowHint = True
+  PixelsPerInch = 96
+  TextHeight = 13
+  object previewPanel: TPanel
+    Left = 0
+    Top = 37
+    Width = 513
+    Height = 342
+    Align = alClient
+    TabOrder = 0
+  end
+  object Panel1: TPanel
+    Left = 0
+    Top = 0
+    Width = 513
+    Height = 37
+    Align = alTop
+    TabOrder = 1
+    object BitBtn1: TBitBtn
+      Left = 4
+      Top = 4
+      Width = 161
+      Height = 29
+      Caption = 'Focus Note Context'
+      TabOrder = 0
+      OnClick = BitBtn1Click
+      Glyph.Data = {
+        76010000424D7601000000000000760000002800000020000000100000000100
+        04000000000000010000130B0000130B00001000000000000000000000000000
+        800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
+        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+        333333333333333333FF33333333333330003FF3FFFFF3333777003000003333
+        300077F777773F333777E00BFBFB033333337773333F7F33333FE0BFBF000333
+        330077F3337773F33377E0FBFBFBF033330077F3333FF7FFF377E0BFBF000000
+        333377F3337777773F3FE0FBFBFBFBFB039977F33FFFFFFF7377E0BF00000000
+        339977FF777777773377000BFB03333333337773FF733333333F333000333333
+        3300333777333333337733333333333333003333333333333377333333333333
+        333333333333333333FF33333333333330003333333333333777333333333333
+        3000333333333333377733333333333333333333333333333333}
+      Layout = blGlyphRight
+      NumGlyphs = 2
+    end
+  end
+end

Added: trunk/entryprvfrm.h
===================================================================
--- trunk/entryprvfrm.h	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/entryprvfrm.h	2006-08-22 00:26:24 UTC (rev 438)
@@ -0,0 +1,34 @@
+//---------------------------------------------------------------------------
+
+#ifndef entryprvfrmH
+#define entryprvfrmH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+#include "RxRichEditX.h"
+#include <Buttons.hpp>
+#include "mainfrm.h"
+//---------------------------------------------------------------------------
+class TentryPreviewForm : public TForm
+{
+__published:	// IDE-managed Components
+	TPanel *previewPanel;
+	TPanel *Panel1;
+	TBitBtn *BitBtn1;
+	void __fastcall BitBtn1Click(TObject *Sender);
+private:	// User declarations
+	TRxRichEditX *pvrtf;
+	ModState modState;
+public:		// User declarations
+	__fastcall TentryPreviewForm(TComponent* Owner);
+	void setEntryText(const char *buf);
+	void setModState(const ModState &modState) { this->modState = modState; }
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TentryPreviewForm *entryPreviewForm;
+//---------------------------------------------------------------------------
+#endif
+ 
\ No newline at end of file

Added: trunk/find.bmp
===================================================================
(Binary files differ)


Property changes on: trunk/find.bmp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/mainfrm.cpp
===================================================================
--- trunk/mainfrm.cpp	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/mainfrm.cpp	2006-08-22 00:26:24 UTC (rev 438)
@@ -15,6 +15,7 @@
 #include "bookmarkfrm.h"
 #include "optionfrm.h"
 #include "vrslstfrm.h"
+#include "entryprvfrm.h"
 #include <utilstr.h>
 #include <filemgr.h>
 #include <localemgr.h>
@@ -1704,7 +1705,43 @@
 	   Application->Title = "The SWORD Project";
 }
 
+SWBuf TForm1::getNoteText(const char *noteText, SWModule *module) {
 
+	SWBuf retVal = "";
+	
+	if (!module) {
+		module = getActiveModule();
+	}
+	if (module) {
+		SWBuf verseNum = noteText+2;
+		int offset = (strchr(verseNum.c_str(), '.') - verseNum.c_str());
+		verseNum.setSize(offset);
+		SWBuf fnNum = noteText+3+offset;
+		int oldVerse = DefaultVSKey->Verse();
+		DefaultVSKey->Verse(atoi(verseNum));
+		tmpVerseList.clear();
+		tmpVerseList << *DefaultVSKey;
+		module->RenderText();	// force entry attributes to get set
+		SWBuf type = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["type"].c_str();
+		SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
+		DefaultVSKey->Verse(oldVerse);
+		if ((type == "crossReference") || (clickText.c_str()[1] == 'x')) {
+			retVal = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["refList"].c_str();
+		}
+		else retVal = module->RenderText(body);
+	}   
+	return retVal;
+}
+
+
+SWModule *TForm1::getActiveModule(TRxRichEdit *rtf) {
+	ModMap::iterator target;
+	SWBuf name = (rtf) ? ((TPageControl*)rtf->Parent->Parent)->ActivePage->Caption.c_str() : TextPageControl->ActivePage->Caption.c_str();
+	target = mainmgr->Modules.find(name.c_str());
+	return (target != Form1->mainmgr->Modules.end()) ? target->second : 0;
+}
+
+
 void TForm1::AddVerseChoices(TPopupMenu *menu, const char *buf, TRxRichEdit *rtf) {
 	TMenuItem *newitem;
 
@@ -1718,26 +1755,10 @@
 		
 	SWBuf clickText = buf;
 	SWBuf origText  = Trim(AnsiString(clickText.c_str())).c_str();
+	SWModule *target = getActiveModule(rtf);
 
 	if (clickText.c_str()[0] == '*') {	// '*' = NOTE
-		ModMap::iterator it;
-		it = mainmgr->Modules.find(TextPageControl->ActivePage->Caption.c_str());
-		if (it != mainmgr->Modules.end()) {
-			SWModule *module = it->second;
-			SWBuf verseNum = clickText.c_str()+2;
-			int offset = (strchr(verseNum.c_str(), '.') - verseNum.c_str());
-			verseNum.setSize(offset);
-			SWBuf fnNum = clickText.c_str()+3+offset;
-			int oldVerse = DefaultVSKey->Verse();
-			DefaultVSKey->Verse(atoi(verseNum));
-			module->RenderText();	// force entry attributes to get set
-			SWBuf type = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["type"].c_str();
-			SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
-			DefaultVSKey->Verse(oldVerse);
-			if ((type == "crossReference") || (clickText.c_str()[1] == 'x')) {
-				clickText = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["refList"].c_str();
-			}
-		}   
+		clickText = getNoteText(clickText.c_str(), target);
 	}
 	else {
 		clickText = origText;
@@ -1749,17 +1770,13 @@
 	if (!tmpVerseList.Count())
 		return;
 
-	ModMap::iterator target;
-	target = mainmgr->Modules.find(((TPageControl*)rtf->Parent->Parent)->ActivePage->Caption.c_str());
-	if (target != Form1->mainmgr->Modules.end()) {
-		char *keytext = 0;		// check for and remove return at end of keytext
-		stdstr(&keytext, (*(*target).second).KeyText());
-		if (keytext[strlen(keytext)-1] == '\r')
-			keytext[strlen(keytext)-1] = 0;
+	if (target) {
+		SWBuf keytext = target->KeyText();		// check for and remove return at end of keytext
+		if (keytext.endsWith("\r"))
+			keytext.setSize(keytext.size()-1);
 					
-		String cap = String(WideStringToUTF8(_tr("VerseList from- "))) + (*target).first.c_str() + ": " + keytext;
-		tmpVerseListCaption = cap;
-		delete [] keytext;		// ---------------------------------
+		String cap = String(WideStringToUTF8(_tr("VerseList from- "))) + target->Name() + ": " + keytext.c_str();
+		tmpCaption = cap;
 	}
 	newitem = new TMenuItem(menu);
 	newitem->Caption = "-";
@@ -1786,7 +1803,15 @@
 
 }
 
+void __fastcall TForm1::notePopoutClick(TObject *Sender) {
+	TentryPreviewForm *tmpForm = new TentryPreviewForm(this);
+	tmpForm->setEntryText(tmpPreviewText.c_str());
+	tmpForm->setModState(tmpModState);
+	tmpForm->Caption = UTF8ToWideString(tmpCaption);
+	tmpForm->Show();	
+}
 
+
 void __fastcall TForm1::PopupMenuPopup(TObject *Sender) {
 
 	int versestart, verseend;
@@ -1807,79 +1832,95 @@
 		menu->Items->Delete(staticMenuItemsCount);
 
 	SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
-	if (clickText.Length()) {
-		AddVerseChoices(menu, clickText.c_str(), rtf);
-	}
-	else	if (!rtf->SelLength) {
-		int entrylen = strlen(rtf->Text.c_str());
-		char *entrytext = new char [ entrylen + 1 ];
-		int selstart = rtf->SelStart;
-		strcpy(entrytext, rtf->Text.c_str());
-//		for (versestart = rtf->SelStart; ((versestart)&&(rtf->Text[versestart] != '#')); versestart--);
+	if (!clickText.Length()) {
+	
+		if (!rtf->SelLength) {
+			int entrylen = strlen(rtf->Text.c_str());
+			char *entrytext = new char [ entrylen + 1 ];
+			int selstart = rtf->SelStart;
+			strcpy(entrytext, rtf->Text.c_str());
+	//		for (versestart = rtf->SelStart; ((versestart)&&(rtf->Text[versestart] != '#')); versestart--);
 
-		String verseList = "";
-		rtf->SelLength = 1;
-		if (rtf->SelAttributes->Link) {
-			int saveStart = rtf->SelStart;
-			int last = -1;
-			while ((rtf->SelStart != last) && (rtf->SelAttributes->Link)) {
-				last = rtf->SelStart;
-				rtf->SelStart -= 1;
-				rtf->SelLength = 1;
-			}
-			int start = rtf->SelStart + 1;
-			rtf->SelStart++;
 			rtf->SelLength = 1;
-			last = -1;
-			while ((rtf->SelStart != last) && (rtf->SelAttributes->Link)) {
-				last = rtf->SelStart;
-				rtf->SelStart += 1;
+			if (rtf->SelAttributes->Link) {
+				int saveStart = rtf->SelStart;
+				int last = -1;
+				while ((rtf->SelStart != last) && (rtf->SelAttributes->Link)) {
+					last = rtf->SelStart;
+					rtf->SelStart -= 1;
+					rtf->SelLength = 1;
+				}
+				int start = rtf->SelStart + 1;
+				rtf->SelStart++;
 				rtf->SelLength = 1;
+				last = -1;
+				while ((rtf->SelStart != last) && (rtf->SelAttributes->Link)) {
+					last = rtf->SelStart;
+					rtf->SelStart += 1;
+					rtf->SelLength = 1;
+				}
+				int len = (rtf->SelStart - start);
+				rtf->SelStart = saveStart;
+				clickText = rtf->GetTextRange(start, start+len);
 			}
-			int len = (rtf->SelStart - start);
-			rtf->SelStart = saveStart;
-			verseList = rtf->GetTextRange(start, start+len);
-			AddVerseChoices(menu, verseList.c_str(), rtf);
-		}
-		rtf->SelLength = 0;
+			rtf->SelLength = 0;
 
-		if (!verseList.Length()) {
-			versestart = selstart;
-			for (int i = 0; ((i < versestart) && (i < entrylen)); i++) {
-				if (entrytext[i] == '\r')
-					versestart++;
-			}
-			for (; ((versestart)&&(entrytext[versestart] != '#')); versestart--);
-			if (versestart) {
-				for (verseend = versestart; ((verseend < entrylen) && (entrytext[verseend] != '|')); verseend++);
-				if ((verseend < entrylen) && (verseend > selstart)) {
-					int len = (verseend - versestart) + 1;
-					char *buf = new char [ len + 1 ];
-					memset(buf, 0 , len + 1);
-					strncpy(buf, &entrytext[versestart+1], len - 2);	// strip the # and | from the string
-					int buflen = strlen(buf);
-					for (int i = 0; i < buflen; i++) {
-						if ((buf[i] == 10) || (buf[i] == 13))
-							buf[i] = ' ';
+			if (!clickText.Length()) {
+				versestart = selstart;
+				for (int i = 0; ((i < versestart) && (i < entrylen)); i++) {
+					if (entrytext[i] == '\r')
+						versestart++;
+				}
+				for (; ((versestart)&&(entrytext[versestart] != '#')); versestart--);
+				if (versestart) {
+					for (verseend = versestart; ((verseend < entrylen) && (entrytext[verseend] != '|')); verseend++);
+					if ((verseend < entrylen) && (verseend > selstart)) {
+						int len = (verseend - versestart) + 1;
+						char *buf = new char [ len + 1 ];
+						memset(buf, 0 , len + 1);
+						strncpy(buf, &entrytext[versestart+1], len - 2);	// strip the # and | from the string
+						int buflen = strlen(buf);
+						for (int i = 0; i < buflen; i++) {
+							if ((buf[i] == 10) || (buf[i] == 13))
+								buf[i] = ' ';
+						}
+						clickText = buf;
+						delete [] buf;
 					}
-					AddVerseChoices(menu, buf, rtf);
-					delete [] buf;
 				}
 			}
+			delete [] entrytext;
 		}
-		delete [] entrytext;
+		else {
+			clickText = Trim(rtf->SelText).c_str();
+		}
 	}
+	if ((clickText.Length() > 1) && (clickText[1] == '*') && (clickText[2] == 'n')) {
+		newitem = new TMenuItem(menu);
+		newitem->Caption = "-";
+		menu->Items->Add(newitem);
+		newitem = new TMenuItem(menu);
+		newitem->Caption = _tr("Popout Note");
+		newitem->Hint = _tr("Open a new window for viewing this note text.");
+		newitem->OnClick = notePopoutClick;
+		newitem->Default = true;
+		menu->Items->Add(newitem);
+
+
+		SWModule *target = getActiveModule(rtf);
+		tmpPreviewText = getNoteText(clickText.c_str(), target).c_str();
+		if (target) {
+			SWBuf keytext = target->KeyText();		// check for and remove return at end of keytext
+			if (keytext.endsWith("\r"))
+				keytext.setSize(keytext.size()-1);
+					
+			String cap = String(WideStringToUTF8(_tr("Note from"))) + " " + target->Name() + ": " + tmpVerseList.getText() + ": " + clickText;
+			tmpCaption = cap;
+			tmpModState = ModState((TPageControl*)rtf->Parent->Parent, ((TPageControl*)rtf->Parent->Parent)->ActivePage, tmpVerseList);
+		}
+	}
 	else {
-		SWBuf highlight = Trim(rtf->SelText).c_str();
-		tmpVerseList = DefaultVSKey->ParseVerseList((char *)highlight.c_str(), *DefaultVSKey);
-		if (tmpVerseList.Count())
-			AddVerseChoices(menu, highlight.c_str(), rtf);
-			
-//		newitem = new TMenuItem(menu);
-//		newitem->Caption = "Verse Lookup";
-//		newitem->Hint = "Attempt to lookup highlighted text as a verse";
-//		newitem->OnClick = verseLookupClick;
-//		menu->Items->Add(newitem);
+		AddVerseChoices(menu, clickText.c_str(), rtf);
 	}
 	clickText = "";
 	
@@ -1890,7 +1931,7 @@
 void __fastcall TForm1::createVerseList(TObject *Sender)
 {
 	TVerseListForm *tmpForm = new TVerseListForm(this, tmpVerseList);
-	tmpForm->Caption = UTF8ToWideString(tmpVerseListCaption);
+	tmpForm->Caption = UTF8ToWideString(tmpCaption);
 	tmpForm->Show();	
 }
 //---------------------------------------------------------------------------

Modified: trunk/mainfrm.h
===================================================================
--- trunk/mainfrm.h	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/mainfrm.h	2006-08-22 00:26:24 UTC (rev 438)
@@ -183,7 +183,8 @@
 class ModState {
 public:
 	ModState(TPageControl *ipc, TTabSheet *iap, SWKey ikey) { pc = ipc; ap = iap; key = ikey; }
-	ModState();
+	ModState() : pc(0), ap(0) {}
+	ModState(const ModState &other) { pc = other.pc; ap = other.ap; key = other.key; }
 	TPageControl *pc;
 	TTabSheet* ap;
 	SWKey key;
@@ -193,42 +194,42 @@
 class TForm1 : public TForm
 {
 __published:	// IDE-managed Components
-        TPanel *pnlTextCom;
+	   TPanel *pnlTextCom;
 	TSplitter *Splitter2;
-        TPanel *pnlText;
-        TPanel *pnlComment;
+	   TPanel *pnlText;
+	   TPanel *pnlComment;
 	TSplitter *Splitter1;
-        TPanel *pnlDict;
-        TPageControl *TextPageControl;
-        TPageControl *CommentaryPageControl;
+	   TPanel *pnlDict;
+	   TPageControl *TextPageControl;
+	   TPageControl *CommentaryPageControl;
 	TStatusBar *StatusBar1;
-        TPageControl *LexDictPageControl;
-        TMainMenu *MainMenu1;
-        TMenuItem *Search1;
-        TMenuItem *NewSearchWindow1;
-        TMenuItem *Help1;
-        TMenuItem *About1;
-        TPopupMenu *PopupMenu2;
-        TMenuItem *DictionaryLookup1;
-        TMenuItem *File1;
-        TMenuItem *SaveLayout1;
-        TMenuItem *Exit1;
-        TMenuItem *N1;
+	   TPageControl *LexDictPageControl;
+	   TMainMenu *MainMenu1;
+	   TMenuItem *Search1;
+	   TMenuItem *NewSearchWindow1;
+	   TMenuItem *Help1;
+	   TMenuItem *About1;
+	   TPopupMenu *PopupMenu2;
+	   TMenuItem *DictionaryLookup1;
+	   TMenuItem *File1;
+	   TMenuItem *SaveLayout1;
+	   TMenuItem *Exit1;
+	   TMenuItem *N1;
 	TDdeServerItem *Search;
 	TDdeServerItem *Lookup;
 	TDdeServerConv *Bible;
-        TPopupMenu *PopupMenu1;
-        TMenuItem *MenuItem1;
-        TMenuItem *Copy1;
-        TMenuItem *CopyasBGreekTransliteration1;
-        TMenuItem *Copy2;
-        TMenuItem *Edit1;
-        TMenuItem *Copy3;
-        TPopupMenu *BookmarkPopup;
-        TMenuItem *AddBookmark1;
-        TMenuItem *N2;
-        TMenuItem *EditBookmarks1;
-        TMenuItem *Options1;
+	   TPopupMenu *PopupMenu1;
+	   TMenuItem *MenuItem1;
+	   TMenuItem *Copy1;
+	   TMenuItem *CopyasBGreekTransliteration1;
+	   TMenuItem *Copy2;
+	   TMenuItem *Edit1;
+	   TMenuItem *Copy3;
+	   TPopupMenu *BookmarkPopup;
+	   TMenuItem *AddBookmark1;
+	   TMenuItem *N2;
+	   TMenuItem *EditBookmarks1;
+	   TMenuItem *Options1;
 	TCoolBar *CoolBar1;
 	TImageList *ImageList1;
 	TImage *BackBtnImage;
@@ -236,45 +237,45 @@
 	TToolBar *ToolBar2;
 	TToolButton *ToolButton3;
 	TToolButton *ToolButton4;
-        TPanel *pnlSpeed;
-        TPanel *Panel1;
-        TComboBox *cbBookOrig;
+	   TPanel *pnlSpeed;
+	   TPanel *Panel1;
+	   TComboBox *cbBookOrig;
 	TEdit *CHBox;
 	TUpDown *UpDown1;
 	TEdit *VSBox;
 	TUpDown *UpDown2;
-        TSpeedButton *btnLookup;
+	   TSpeedButton *btnLookup;
 	TToolBar *ToolBar1;
 	TImageList *ImageList2;
-        TSpeedButton *Bookmarkbtn;
-        TPopupMenu *PopupMenu3;
-        TMenuItem *Copy4;
-        TMenuItem *DictionaryLookup2;
-        TMenuItem *N3;
-        TMenuItem *EditEntry1;
-        TMenuItem *DeleteEntry1;
-        TMenuItem *LinktoVerse1;
-        TMenuItem *Options2;
-        TMenuItem *Contents1;
+	   TSpeedButton *Bookmarkbtn;
+	   TPopupMenu *PopupMenu3;
+	   TMenuItem *Copy4;
+	   TMenuItem *DictionaryLookup2;
+	   TMenuItem *N3;
+	   TMenuItem *EditEntry1;
+	   TMenuItem *DeleteEntry1;
+	   TMenuItem *LinktoVerse1;
+	   TMenuItem *Options2;
+	   TMenuItem *Contents1;
 	   TPanel *Panel2;
 	TSplitter *Splitter3;
-        TRichEdit *DictKeyEditOld;
-        TListBox *lbDictKeysOld;
-        TPopupMenu *PopupMenu4;
-        TMenuItem *HideShowModules1;
-        TMenuItem *DevotionaloftheDay1;
-        TMenuItem *Tools1;
-        TMenuItem *InstallManager1;
-        TMenuItem *SEPERATOR;
+	   TRichEdit *DictKeyEditOld;
+	   TListBox *lbDictKeysOld;
+	   TPopupMenu *PopupMenu4;
+	   TMenuItem *HideShowModules1;
+	   TMenuItem *DevotionaloftheDay1;
+	   TMenuItem *Tools1;
+	   TMenuItem *InstallManager1;
+	   TMenuItem *SEPERATOR;
 	TApplicationEvents *ApplicationEvents1;
-        TMenuItem *Print1;
-        TMenuItem *N5;
-        TMenuItem *SearchForWord1;
-        TMenuItem *SearchForWord2;
-        TMenuItem *SearchForWord3;
+	   TMenuItem *Print1;
+	   TMenuItem *N5;
+	   TMenuItem *SearchForWord1;
+	   TMenuItem *SearchForWord2;
+	   TMenuItem *SearchForWord3;
 	TActionList *ActionList1;
 	TAction *Action1;
-        TMenuItem *NewVer1;
+	   TMenuItem *NewVer1;
 	TComboBox *cbBookOld;
 	TComboBox *freeHandLookupOld;
 	TPopupMenu *PopupMenu5;
@@ -282,17 +283,17 @@
 	TMenuItem *MenuItem3;
 	TMenuItem *MenuItem4;
 	TMenuItem *N4;
-        TImage *BookmarkBtnImage;
-        TToolBar *ToolBar3;
-        TToolButton *LemmaBtn;
-        TToolButton *MorphBtn;
-        TToolButton *NotesBtn;
-        TToolButton *XRefBtn;
-        TImageList *ImageList3;
-        TImage *LemmaBtnImage;
-        TImage *MorphBtnImage;
-        TImage *FootnoteBtnImage;
-        TImage *XRefBtnImage;
+	   TImage *BookmarkBtnImage;
+	   TToolBar *ToolBar3;
+	   TToolButton *LemmaBtn;
+	   TToolButton *MorphBtn;
+	   TToolButton *NotesBtn;
+	   TToolButton *XRefBtn;
+	   TImageList *ImageList3;
+	   TImage *LemmaBtnImage;
+	   TImage *MorphBtnImage;
+	   TImage *FootnoteBtnImage;
+	   TImage *XRefBtnImage;
 	void __fastcall TextPageControlChange(TObject *Sender);
 	void __fastcall btnLookupClick(TObject *Sender);
 	void __fastcall CommentaryPageControlChange(TObject *Sender);
@@ -369,6 +370,7 @@
 	void __fastcall Action1Execute(TObject *Sender);
 	void __fastcall NewVer1Click(TObject *Sender);
 	void __fastcall PopupMenu5Popup(TObject *Sender);
+	void __fastcall notePopoutClick(TObject *Sender);
 private:	// User declarations
 	list <SWDisplay *> displays;	// so we can delete each display we create
 	list <ModState *> modstates;
@@ -377,7 +379,7 @@
 	bool freshdict;
 	String clickText;
 
-        void syncSpeedButtons();
+	   void syncSpeedButtons();
 	char CreateTextPane(SWModule *mod);
 	char CreateParallelPane(SWMgr **mgr);
 	char CreateCommentPane(SWModule *mod);
@@ -417,11 +419,17 @@
 	void __fastcall AppMessage(tagMSG &Msg, bool &Handled);     
 	static void ClipOrCenterRectToMonitor(LPRECT prc, UINT flags);
 	static void ClipOrCenterWindowToMonitor(HWND hwnd, UINT flags);
+	// set when parsing for a popup menu, and used when popout choice is picked
 	ListKey tmpVerseList;
-	String tmpVerseListCaption;
+	String tmpCaption;
+	String tmpPreviewText;
+	ModState tmpModState;
+	//---------------------------
 	bool renderingHint;
 	bool closing;
 	ParallelDisp *parallelDisp;
+	SWBuf getNoteText(const char *noteText, SWModule *module = 0);
+	SWModule *getActiveModule(TRxRichEdit *rtf = 0);
 };
 
 class TRTFHintWindow : public THintWindow {
@@ -439,7 +447,6 @@
 	virtual void __fastcall ActivateHintData(const /*Windows::*/TRect& Rect, const AnsiString AHint, void* AData);
 	virtual /*Windows::*/TRect __fastcall CalcHintRect(int MaxWidth, const AnsiString AHint, void* AData);
 	virtual bool __fastcall IsHintMsg(tagMSG& Msg);
-
 	__property BiDiMode ;
 	__property Caption ;
 	__property Color ;

Modified: trunk/stage/layout.conf
===================================================================
--- trunk/stage/layout.conf	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/stage/layout.conf	2006-08-22 00:26:24 UTC (rev 438)
@@ -6,20 +6,20 @@
 RWP=
 
 [History]
-LastComModule=JFB
-LastLDKey=마태복음 19:5
-LastLDModule=CBC
+LastComModule=
+LastLDKey=n17.4
+LastLDModule=
 LastParaMod01=
 LastParaMod02=
 LastParaMod03=
-LastTextModule=NASB
-LastVerse=마태복음 19:25
+LastTextModule=ESV
+LastVerse=James 1:2
 LookupSaveCount=5
+LookupText=James 1:2
+LookupText=James 1:19
+LookupText=마태복음 19:25
 LookupText=마태복음 19:11
 LookupText=마태복음 19:9
-LookupText=마태복음 19:5
-LookupText=Matthäus 19:3
-LookupText=Matthew 19:1
 SearchSaveCount=5
 SearchText=God love +world
 SearchText=God love world
@@ -37,8 +37,8 @@
 StrongsHebrew=
 
 [ModuleOptions]
-Cross-references=Off
-Footnotes=Off
+Cross-references=On
+Footnotes=On
 Headings=On
 Hebrew Cantillation=Off
 Hebrew Vowel Points=On
@@ -50,8 +50,8 @@
 
 [Screen]
 MainHeight=776
-MainLeft=295
-MainTop=177
+MainLeft=69
+MainTop=247
 MainWidth=1029
 Maximized=false
 SearchHeight=566

Modified: trunk/sword.bpr
===================================================================
--- trunk/sword.bpr	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/sword.bpr	2006-08-22 00:26:24 UTC (rev 438)
@@ -15,7 +15,8 @@
       obj\PreviewForm.obj obj\PrintFrm.obj TntUnicodeControls\Unicode.obj 
       TntUnicodeControls\TntControls.obj TntUnicodeControls\TntForms.obj 
       TntUnicodeControls\TntStdCtrls.obj TntUnicodeControls\TntClasses.obj 
-      obj\paraldisp.obj obj\swdisprtfchap.obj obj\swdisprtf.obj obj\swwinlog.obj"/>
+      obj\paraldisp.obj obj\swdisprtfchap.obj obj\swdisprtf.obj obj\swwinlog.obj 
+      obj\entryprvfrm.obj"/>
     <RESFILES value="sword.res"/>
     <IDLFILES value=""/>
     <IDLGENFILES value=""/>
@@ -24,7 +25,7 @@
       optionfrm.dfm searchfrm.dfm ModInstForm.dfm vrslstfrm.dfm editentryfrm.dfm 
       versesel.dfm RangeMaintFrm.dfm ModVisFrm.dfm DevOfTheDay.dfm 
       SplashPage.dfm FontSel.dfm StudyProfessor.dfm rtfhintfrm.dfm 
-      PreviewForm.dfm PrintFrm.dfm"/>
+      PreviewForm.dfm PrintFrm.dfm entryprvfrm.dfm"/>
     <LIBFILES value="..\icu-sword\as_is\borland\icudatab.lib 
       ..\icu-sword\as_is\borland\icuuc.lib ..\icu-sword\as_is\borland\icuin.lib 
       ..\sword\lib\libsword.lib clucene\clucene.lib"/>
@@ -43,7 +44,7 @@
     <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
     <RELEASELIBPATH value="$(BCB)\lib\release"/>
     <LINKER value="ilink32"/>
-    <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING"/>
+    <USERDEFINES value="_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING;_DEBUG"/>
     <SYSDEFINES value="NO_STRICT"/>
     <MAINSOURCE value="sword.cpp"/>
     <INCLUDEPATH value="..\sword\src\modules\filters;D:\;TntUnicodeControls;..\icu-sword\source\common;..\icu-sword\source\i18n;..\sword\include;$(BCB)\include;$(BCB)\include\vcl;rxlib"/>
@@ -57,11 +58,11 @@
       -I$(BCB)\include -I$(BCB)\include\vcl -Irxlib -src_suffix cpp -D_ICU_ 
       -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0 -DUSELUCENE 
       -D_CL_DISABLE_MULTITHREADING"/>
-    <CFLAG1 value="-O2 -Vx -X- -a8 -4 -b- -k- -vi -c -tW -tWM"/>
-    <PFLAGS value="-N2obj -N0obj -$Y- -$L- -$D- -v -M -JPHNE"/>
+    <CFLAG1 value="-Od -Vx -X- -r- -a8 -4 -b- -k -y -v -vi- -c -tW -tWM"/>
+    <PFLAGS value="-N2obj -N0obj -$Y+ -$W -$O- -v -M -JPHNE"/>
     <RFLAGS value=""/>
-    <AFLAGS value="/mx /w2 /zn"/>
-    <LFLAGS value="-Iobj -D&quot;&quot; -aa -Tpe -GD -s -Gn"/>
+    <AFLAGS value="/mx /w2 /zi"/>
+    <LFLAGS value="-Iobj -D&quot;&quot; -aa -Tpe -GD -s -Gn -v"/>
   </OPTIONS>
   <LINKER>
     <ALLOBJ value="c0w32.obj $(OBJFILES)"/>
@@ -75,7 +76,7 @@
 MajorVer=1
 MinorVer=5
 Release=8
-Build=12
+Build=13
 Debug=0
 PreRelease=0
 Special=0
@@ -87,7 +88,7 @@
 [Version Info Keys]
 CompanyName=CrossWire Software &amp; Bible Society
 FileDescription=Windows 32bit User Interface to The SWORD Project
-FileVersion=1.5.8.12
+FileVersion=1.5.8.13
 InternalName=biblecs
 LegalCopyright=(c) 1990-2005 CrossWire Bible Society under the terms of the GNU General Public License
 LegalTrademarks=
@@ -141,8 +142,8 @@
 
 [HistoryLists\hlConditionals]
 Count=16
-Item0=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING
-Item1=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING;_DEBUG
+Item0=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING;_DEBUG
+Item1=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_CL_DISABLE_MULTITHREADING
 Item2=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE
 Item3=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_DEBUG
 Item4=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;_DEBUG;USELUCENE

Modified: trunk/sword.cpp
===================================================================
--- trunk/sword.cpp	2006-08-16 12:39:13 UTC (rev 437)
+++ trunk/sword.cpp	2006-08-22 00:26:24 UTC (rev 438)
@@ -52,6 +52,7 @@
 USEUNIT("swdisprtf.cpp");
 USEUNIT("swwinlog.cpp");
 USELIB("clucene\clucene.lib");
+USEFORM("entryprvfrm.cpp", entryPreviewForm);
 //---------------------------------------------------------------------------
 AnsiString startVerse = "";
 
@@ -185,6 +186,7 @@
 		Application->CreateForm(__classid(TRTFHintForm), &RTFHintForm);
 		Application->CreateForm(__classid(TPreviewForm), &PreviewForm);
 		Application->CreateForm(__classid(TPrintForm), &PrintForm);
+		Application->CreateForm(__classid(TentryPreviewForm), &entryPreviewForm);
 		Application->Run();
 	}
 	catch (Exception &exception) {

Modified: trunk/sword.res
===================================================================
(Binary files differ)




More information about the sword-cvs mailing list