summaryrefslogtreecommitdiff
path: root/apps/windoze/CBuilder4/prototype
diff options
context:
space:
mode:
Diffstat (limited to 'apps/windoze/CBuilder4/prototype')
-rw-r--r--apps/windoze/CBuilder4/prototype/AboutBoxfrm.cpp85
-rw-r--r--apps/windoze/CBuilder4/prototype/AboutBoxfrm.dfmbin0 -> 2778 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/AboutBoxfrm.h36
-rw-r--r--apps/windoze/CBuilder4/prototype/AppBar.cpp108
-rw-r--r--apps/windoze/CBuilder4/prototype/AppBar.dfmbin0 -> 10204 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/AppBar.h84
-rw-r--r--apps/windoze/CBuilder4/prototype/Bitmap1.bmpbin0 -> 5318 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/BookMarkPanel.cpp344
-rw-r--r--apps/windoze/CBuilder4/prototype/BookMarkPanel.h39
-rw-r--r--apps/windoze/CBuilder4/prototype/CommentPanel.cpp222
-rw-r--r--apps/windoze/CBuilder4/prototype/CommentPanel.h39
-rw-r--r--apps/windoze/CBuilder4/prototype/DeskTopNameForm.cpp15
-rw-r--r--apps/windoze/CBuilder4/prototype/DeskTopNameForm.dfmbin0 -> 868 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/DeskTopNameForm.h27
-rw-r--r--apps/windoze/CBuilder4/prototype/LDPanel.cpp174
-rw-r--r--apps/windoze/CBuilder4/prototype/LDPanel.h39
-rw-r--r--apps/windoze/CBuilder4/prototype/ModInstForm.cpp14
-rw-r--r--apps/windoze/CBuilder4/prototype/ModInstForm.dfmbin0 -> 1457 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/ModInstForm.h27
-rw-r--r--apps/windoze/CBuilder4/prototype/ModTabPanel.cpp114
-rw-r--r--apps/windoze/CBuilder4/prototype/ModTabPanel.h30
-rw-r--r--apps/windoze/CBuilder4/prototype/TextPanel.cpp183
-rw-r--r--apps/windoze/CBuilder4/prototype/TextPanel.h34
-rw-r--r--apps/windoze/CBuilder4/prototype/back.bmpbin0 -> 780 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/biblecsmgr.cpp41
-rw-r--r--apps/windoze/CBuilder4/prototype/biblecsmgr.h18
-rw-r--r--apps/windoze/CBuilder4/prototype/bookmark.bmpbin0 -> 758 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/bookmarkfrm.cpp222
-rw-r--r--apps/windoze/CBuilder4/prototype/bookmarkfrm.dfmbin0 -> 1594 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/bookmarkfrm.h48
-rw-r--r--apps/windoze/CBuilder4/prototype/bookmarks/personal.conf4
-rw-r--r--apps/windoze/CBuilder4/prototype/desktop.bmpbin0 -> 374 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/desktop2.bmpbin0 -> 246 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/editentryfrm.cpp332
-rw-r--r--apps/windoze/CBuilder4/prototype/editentryfrm.dfmbin0 -> 22859 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/editentryfrm.h108
-rw-r--r--apps/windoze/CBuilder4/prototype/mainfrm.cpp824
-rw-r--r--apps/windoze/CBuilder4/prototype/mainfrm.dfmbin0 -> 10646 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/mainfrm.h238
-rw-r--r--apps/windoze/CBuilder4/prototype/mods.conf465
-rw-r--r--apps/windoze/CBuilder4/prototype/newbmfilefrm.cpp14
-rw-r--r--apps/windoze/CBuilder4/prototype/newbmfilefrm.dfmbin0 -> 1638 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/newbmfilefrm.h27
-rw-r--r--apps/windoze/CBuilder4/prototype/optionfrm.cpp20
-rw-r--r--apps/windoze/CBuilder4/prototype/optionfrm.dfmbin0 -> 2521 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/optionfrm.h39
-rw-r--r--apps/windoze/CBuilder4/prototype/options.conf15
-rw-r--r--apps/windoze/CBuilder4/prototype/search.bmpbin0 -> 780 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/searchfrm.cpp95
-rw-r--r--apps/windoze/CBuilder4/prototype/searchfrm.dfmbin0 -> 2304 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/searchfrm.h44
-rw-r--r--apps/windoze/CBuilder4/prototype/sword.bpr223
-rw-r--r--apps/windoze/CBuilder4/prototype/sword.cpp46
-rw-r--r--apps/windoze/CBuilder4/prototype/sword.resbin0 -> 876 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/swordlib.bpr214
-rw-r--r--apps/windoze/CBuilder4/prototype/swordlib.cpp36
-rw-r--r--apps/windoze/CBuilder4/prototype/swordprj.bpg23
-rw-r--r--apps/windoze/CBuilder4/prototype/versesel.cpp22
-rw-r--r--apps/windoze/CBuilder4/prototype/versesel.dfmbin0 -> 677 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/versesel.h27
-rw-r--r--apps/windoze/CBuilder4/prototype/vrslstfrm.cpp50
-rw-r--r--apps/windoze/CBuilder4/prototype/vrslstfrm.dfmbin0 -> 561 bytes
-rw-r--r--apps/windoze/CBuilder4/prototype/vrslstfrm.h29
63 files changed, 4838 insertions, 0 deletions
diff --git a/apps/windoze/CBuilder4/prototype/AboutBoxfrm.cpp b/apps/windoze/CBuilder4/prototype/AboutBoxfrm.cpp
new file mode 100644
index 0000000..39ca670
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/AboutBoxfrm.cpp
@@ -0,0 +1,85 @@
+//---------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "AboutBoxfrm.h"
+#include "mainfrm.h"
+//---------------------------------------------------------------------
+#pragma resource "*.dfm"
+TAboutBox *AboutBox;
+//---------------------------------------------------------------------
+__fastcall TAboutBox::TAboutBox(TComponent* AOwner)
+ : TForm(AOwner)
+{
+}
+//---------------------------------------------------------------------
+void __fastcall TAboutBox::FormShow(TObject *Sender)
+{
+ int i;
+ static char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries"};
+
+ AnsiString newtext, tmptext;
+ ModMap::iterator it;
+ SectionMap::iterator it2;
+ TMemoryStream *RTFStream = new TMemoryStream();
+
+ newtext = "{\\rtf1\\ansi{\\fonttbl{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;}";
+ newtext += "\\pard\\qc\\cf2\\nowidctlpar{\\fs30\\b Installed Modules } \\par \\pard \\nowidctlpar \\cf0 ";
+
+ for (i = 0; i < 3; i++) {
+ newtext += "\\par {\\fs28\\b ";
+ newtext += modtypes[i];
+ newtext += " }\\par \\par ";
+ for (it = Form1->mainmgr->Modules.begin(); it != Form1->mainmgr->Modules.end(); it++) {
+ if (!strcmp((*it).second->Type(), modtypes[i])) {
+ it2 = Form1->mainmgr->config->Sections.find((*it).second->Name());
+ if (it2 != Form1->mainmgr->config->Sections.end()) {
+ newtext = newtext + "{\\fs24\\cf1\\b " + (*it).second->Name() + " }\t";
+ newtext = newtext + "{\\fs24\\i " + (*it).second->Description() + " } \\par ";
+ newtext = newtext + "{\\fs20\\cf0 " + (*it2).second["About"].c_str() + " }\\par \\par";
+ }
+ }
+ }
+ }
+ newtext += "{\\fs24 \\par }}";
+ RTFStream->Clear();
+ RTFStream->WriteBuffer(newtext.c_str(), newtext.Length());
+ RTFStream->Position = 0;
+ ModulesAbout->Lines->LoadFromStream(RTFStream);
+
+ newtext = "{\\rtf1\\ansi{\\fonttbl{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;}";
+ newtext += "\\fs20 Thanx to God for His GREAT MERCY and LOVE: Never did anyone have so much, give it up so completely, to humble Himself and die such a death, all for such an ENEMY as me. -Philippians 2:6-8; Romans 5:6-10 \\par\\par ";
+ newtext += "For the latest updates and info, visit us on the net at: \\par ";
+ newtext += "http://www.crosswire.org \\par\\par ";
+ newtext += "Send us feedback, bug reports, or patches/additions: \\par ";
+ newtext += "sword-feedback@crosswire.org \\par ";
+ newtext += "sword-bugs@crosswire.org \\par ";
+ newtext += "sword-patches@crosswire.org (please include unified diffs if possible (diff -u)) \\par\\par ";
+ newtext += "To be on our mailing list: \\par ";
+ newtext += "sword-list-info@crosswire.org \\par\\par ";
+ newtext += "This software is provided free for the study of God and His Word. You DO NOT NEED TO license or pay for this software. Please: copy it freely and distribute it to athiests in Russia :), post it on your favorite FTP site, write your own modules and features for it, include it on your lastest freeware CDROM, incorporate all the cool utility classes into a product of your own, write a tract module for the program and sneak it onto all of your co-workers' computers and blame it on a virus, make fun of your pastor for spending $400 dollars on a similar package, give it to your pastor who can't figure out how to use his $400 dollar package :) \\par\\par ";
+ newtext += "OK, if you still feel the need, you can help our organization out at: \\par\\par ";
+ newtext += "CrossWire Software & Bible Society \\par ";
+ newtext += "P. O. Box 2528 \\par ";
+ newtext += "Tempe, AZ 85280-2528 \\par\\par ";
+ newtext += "... but I must warn you, your contributions will probably just go toward paying my way through college, or to give me a little more time to spend on the project :) \\par\\par ";
+ newtext += "\tMay the peace of GOD consume your heart, \\par ";
+ newtext += "\t\tThe SWORD Project Development Team \\par ";
+ newtext += "_________________________________________ \\par ";
+ newtext += "Thanks be to God for all the wonderful people who have contributed in so many ways to make this project possible. These are just a few (I could not possibly name them all) who have directly contributed an abundance of their time and talents: \\par\\par ";
+ newtext += "All the people at The Outpost in Scottsdale for testing and suggestions; The Bible Foundation: Jerry Kingery, Jerry Hastings; Geoffrey W. Hastings; William Dicks; Everyone on b-greek@virginia.edu; Michael Paul Johnson; Roland Nygren; Bill Kincaid; Mark Fuller; Larry Pierce; Franklin Bratcher; Gregory Hall; Luis Cortes\\par \\par ";
+ newtext += "{\\i And the list goes on...} \\par \\par ";
+ newtext += "{\\fs24 \\par }}";
+ RTFStream->Clear();
+ RTFStream->WriteBuffer(newtext.c_str(), newtext.Length());
+ RTFStream->Position = 0;
+ CreditAbout->Lines->LoadFromStream(RTFStream);
+ delete RTFStream;
+
+
+}
+//---------------------------------------------------------------------------
+
+
+
+
diff --git a/apps/windoze/CBuilder4/prototype/AboutBoxfrm.dfm b/apps/windoze/CBuilder4/prototype/AboutBoxfrm.dfm
new file mode 100644
index 0000000..4911690
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/AboutBoxfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/AboutBoxfrm.h b/apps/windoze/CBuilder4/prototype/AboutBoxfrm.h
new file mode 100644
index 0000000..77da4f8
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/AboutBoxfrm.h
@@ -0,0 +1,36 @@
+//----------------------------------------------------------------------------
+#ifndef AboutBoxfrmH
+#define AboutBoxfrmH
+//----------------------------------------------------------------------------
+#include <vcl\System.hpp>
+#include <vcl\Windows.hpp>
+#include <vcl\SysUtils.hpp>
+#include <vcl\Classes.hpp>
+#include <vcl\Graphics.hpp>
+#include <vcl\Forms.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Buttons.hpp>
+#include <vcl\ExtCtrls.hpp>
+#include <vcl\ComCtrls.hpp>
+//----------------------------------------------------------------------------
+class TAboutBox : public TForm
+{
+__published:
+ TPanel *Panel1;
+ TImage *ProgramIcon;
+ TLabel *ProductName;
+ TLabel *Version;
+ TLabel *Copyright;
+ TButton *OKButton;
+ TRichEdit *CreditAbout;
+ TRichEdit *ModulesAbout;
+ void __fastcall FormShow(TObject *Sender);
+private:
+public:
+ virtual __fastcall TAboutBox(TComponent* AOwner);
+};
+//----------------------------------------------------------------------------
+extern TAboutBox *AboutBox;
+//----------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/AppBar.cpp b/apps/windoze/CBuilder4/prototype/AppBar.cpp
new file mode 100644
index 0000000..081364f
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/AppBar.cpp
@@ -0,0 +1,108 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "AppBar.h"
+#include "DockCanvas.h"
+#include "ModTabPanel.h"
+#include "biblecsmgr.h"
+#include "BookMarkPanel.h"
+#include "DeskTopNameForm.h"
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma link "MenuBar"
+#pragma resource "*.dfm"
+TAppBarFrm *AppBarFrm;
+//---------------------------------------------------------------------------
+__fastcall TAppBarFrm::TAppBarFrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::FormCreate(TObject *Sender)
+{
+ ImageList1->Add(BackBtnImage->Picture->Bitmap, NULL);
+ ImageList1->Add(SearchBtnImage->Picture->Bitmap, NULL);
+ mainmgr = new BibleCSMGR(ModInstFrm);
+ activeDesktop = 0;
+}
+//---------------------------------------------------------------------------
+void __fastcall TAppBarFrm::SpeedButton2Click(TObject *Sender)
+{
+ if (activeDesktop) {
+ TModTabPanel *textTabs = new TModTabPanel(activeDesktop, mainmgr, "Biblical Texts");
+ textTabs->ManualDock(activeDesktop, NULL, alLeft);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TAppBarFrm::SpeedButton5Click(TObject *Sender)
+{
+ if (activeDesktop) {
+ TBookMarkPanel *bookmarks = new TBookMarkPanel(activeDesktop);
+ bookmarks->ManualDock(activeDesktop, NULL, alLeft);
+ }
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::SpeedButton3Click(TObject *Sender)
+{
+ if (activeDesktop) {
+ TModTabPanel *textTabs = new TModTabPanel(activeDesktop, mainmgr, "Commentaries");
+ textTabs->ManualDock(activeDesktop, NULL, alLeft);
+ }
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::SpeedButton4Click(TObject *Sender)
+{
+ if (activeDesktop) {
+ TModTabPanel *textTabs = new TModTabPanel(activeDesktop, mainmgr, "Lexicons / Dictionaries");
+ textTabs->ManualDock(activeDesktop, NULL, alLeft);
+ }
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::TabControl1Change(TObject *Sender)
+{
+ int index = TabControl1->TabIndex;
+ if (index > -1) {
+ activeDesktop = ((TForm *)(TabControl1->Tabs->Objects[index]));
+ activeDesktop->Show();
+ }
+ else activeDesktop = 0;
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::SpeedButton1Click(TObject *Sender)
+{
+ DeskTopNameFrm->ShowModal();
+ activeDesktop = new TDockCanvasFrm(this);
+ activeDesktop->OnClose = FormClose;
+ activeDesktop->OnActivate = FormActivate;
+ activeDesktop->Caption = DeskTopNameFrm->desktopName->Text;
+ TabControl1->Tabs->AddObject(activeDesktop->Caption, activeDesktop);
+ if (activeDesktop->Top < (this->Top + this->Height))
+ activeDesktop->Top = this->Top + this->Height + 1;
+ activeDesktop->Show();
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::FormClose(TObject *Sender,
+ TCloseAction &Action)
+{
+ int index = TabControl1->Tabs->IndexOfObject(Sender);
+ TabControl1->Tabs->Delete(index);
+ TabControl1->TabIndex = 0;
+ TabControl1Change(Sender);
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TAppBarFrm::FormActivate(TObject *Sender)
+{
+ int index = TabControl1->Tabs->IndexOfObject(Sender);
+ TabControl1->TabIndex = index;
+ TabControl1Change(Sender);
+}
+//---------------------------------------------------------------------------
+
diff --git a/apps/windoze/CBuilder4/prototype/AppBar.dfm b/apps/windoze/CBuilder4/prototype/AppBar.dfm
new file mode 100644
index 0000000..de0ee59
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/AppBar.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/AppBar.h b/apps/windoze/CBuilder4/prototype/AppBar.h
new file mode 100644
index 0000000..d3a9072
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/AppBar.h
@@ -0,0 +1,84 @@
+//---------------------------------------------------------------------------
+#ifndef AppBarH
+#define AppBarH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+#include <Buttons.hpp>
+#include <ComCtrls.hpp>
+#include <ExtCtrls.hpp>
+#include <Graphics.hpp>
+#include <ToolWin.hpp>
+#include <Menus.hpp>
+#include <MenuBar.hpp>
+#include <ImgList.hpp>
+#include <DockCanvas.h>
+class SWMgr;
+//---------------------------------------------------------------------------
+class TAppBarFrm : public TForm
+{
+__published: // IDE-managed Components
+ TPanel *Panel1;
+ TPanel *Panel2;
+ TTabControl *TabControl1;
+ TCoolBar *CoolBar1;
+ TImage *BackBtnImage;
+ TImage *SearchBtnImage;
+ TToolBar *ToolBar2;
+ TToolButton *ToolButton3;
+ TToolButton *ToolButton4;
+ TPanel *Panel3;
+ TSpeedButton *btnLookup;
+ TComboBox *cbBook;
+ TEdit *CHBox;
+ TUpDown *UpDown1;
+ TEdit *VSBox;
+ TUpDown *UpDown2;
+ TEdit *freeHandLookup;
+ TToolBar *ToolBar1;
+ TSpeedButton *Bookmarkbtn;
+ TPanel *pnlSpeed;
+ TCoolBar *CoolBar2;
+ TMainMenu *MainMenu2;
+ TMenuItem *File1;
+ TMenuItem *Options1;
+ TMenuItem *SaveLayout1;
+ TMenuItem *N1;
+ TMenuItem *Exit1;
+ TMenuItem *Edit2;
+ TMenuItem *Copy3;
+ TMenuItem *Search3;
+ TMenuItem *NewSearchWindow1;
+ TMenuItem *Help4;
+ TMenuItem *About1;
+ TMenuBar *MenuBar1;
+ TImageList *ImageList1;
+ TImage *Image2;
+ TImage *Image1;
+ TPanel *Panel4;
+ TSpeedButton *SpeedButton1;
+ TSpeedButton *SpeedButton2;
+ TSpeedButton *SpeedButton3;
+ TSpeedButton *SpeedButton4;
+ TSpeedButton *SpeedButton5;
+ void __fastcall FormCreate(TObject *Sender);
+ void __fastcall SpeedButton2Click(TObject *Sender);
+ void __fastcall SpeedButton5Click(TObject *Sender);
+ void __fastcall SpeedButton3Click(TObject *Sender);
+ void __fastcall SpeedButton4Click(TObject *Sender);
+ void __fastcall TabControl1Change(TObject *Sender);
+ void __fastcall SpeedButton1Click(TObject *Sender);
+ void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
+ void __fastcall FormActivate(TObject *Sender);
+private: // User declarations
+public: // User declarations
+ __fastcall TAppBarFrm(TComponent* Owner);
+ SWMgr *mainmgr;
+ TForm *activeDesktop;
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TAppBarFrm *AppBarFrm;
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/Bitmap1.bmp b/apps/windoze/CBuilder4/prototype/Bitmap1.bmp
new file mode 100644
index 0000000..cab8e28
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/Bitmap1.bmp
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/BookMarkPanel.cpp b/apps/windoze/CBuilder4/prototype/BookMarkPanel.cpp
new file mode 100644
index 0000000..2974d44
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/BookMarkPanel.cpp
@@ -0,0 +1,344 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "BookMarkPanel.h"
+#pragma package(smart_init)
+#include "newbmfilefrm.h"
+//#include <dir.h>
+#include <io.h>
+#include <dirent.h>
+#include <swconfig.h>
+//---------------------------------------------------------------------------
+// ValidCtrCheck is used to assure that the components created do not have
+// any pure virtual functions.
+//
+
+static inline void ValidCtrCheck(TBookMarkPanel *)
+{
+ new TBookMarkPanel(NULL);
+}
+//---------------------------------------------------------------------------
+__fastcall TBookMarkPanel::TBookMarkPanel(TComponent* Owner)
+ : TPanel(Owner)
+{
+ BMPopup = new TPopupMenu(this);
+ TMenuItem * newitem;
+ newitem = new TMenuItem(BMPopup);
+ newitem->Caption = "&Add Child";
+ newitem->OnClick = AddChild1Click;
+ BMPopup->Items->Add(newitem);
+ newitem = new TMenuItem(BMPopup);
+ newitem->Caption = "&Delete";
+ newitem->OnClick = Delete1Click;
+ BMPopup->Items->Add(newitem);
+ newitem = new TMenuItem(BMPopup);
+ newitem->Caption = "&Rename";
+ newitem->OnClick = Rename1Click;
+ BMPopup->Items->Add(newitem);
+ newitem = new TMenuItem(BMPopup);
+ newitem->Caption = "-";
+ BMPopup->Items->Add(newitem);
+ newitem = new TMenuItem(BMPopup);
+ newitem->Caption = "&New Bookmark File";
+ newitem->OnClick = NewBookmarkFile1Click;
+ BMPopup->Items->Add(newitem);
+}
+
+
+__fastcall TBookMarkPanel::~TBookMarkPanel()
+{
+ list <String *>::iterator it;
+
+ SaveBookmarks();
+
+ for (it = bmfiles.begin(); it != bmfiles.end(); it++)
+ delete *it;
+}
+
+
+void __fastcall TBookMarkPanel::CreateWnd() {
+
+ TPanel::CreateWnd();
+
+ SWConfig *bookmarks;
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ TTreeNode *node;
+
+ DIR *dir;
+ struct dirent *ent;
+ string conffile;
+ bmdir = "";
+ SWConfig optionsconf("./options.conf");
+
+ bmtree->Items->Clear();
+
+ if ((sit = optionsconf.Sections.find("Bookmarks")) != optionsconf.Sections.end())
+ bmdir = ((eit = (*sit).second.find("Directory")) != (*sit).second.end()) ? (*eit).second : (string)"";
+
+// Add Personal Bookmarks first, or if they don't exist, ADD A BLANK BRANCH first in the tree
+// --------------------------------------------------------------------------
+
+ if (bmdir == "")
+ bmdir = "./bookmarks/";
+
+ if (access(bmdir.c_str(), 0)) { // directory does not exist
+ _mkdir(bmdir.c_str());
+ }
+
+ conffile = bmdir + "personal.conf";
+ bookmarks = new SWConfig(conffile.c_str());
+ if ((sit = bookmarks->Sections.find("ROOT")) != bookmarks->Sections.end()) {
+ if ((eit = (*sit).second.begin()) != (*sit).second.end()) {
+ node = bmtree->Items->AddObject(bmtree->Selected, (*eit).second.c_str(), *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ AddSection(bookmarks, bmtree, node, (*eit).first.c_str());
+ }
+ }
+ else bmtree->Items->AddObject(bmtree->Selected, "Personal Bookmarks", *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ delete bookmarks;
+// --------------------------------------------------------------------------
+
+// Add all other bookmark files ---------------------------------------------
+ if (dir = opendir(bmdir.c_str())) {
+ rewinddir(dir);
+ while ((ent = readdir(dir))) {
+ if ((strcmp(ent->d_name, "personal.conf")) && (strcmp(ent->d_name, "."))&& (strcmp(ent->d_name, ".."))) {
+ conffile = bmdir;
+ conffile += ent->d_name;
+ bookmarks = new SWConfig(conffile.c_str());
+ if ((sit = bookmarks->Sections.find("ROOT")) != bookmarks->Sections.end()) {
+ if ((eit = (*sit).second.begin()) != (*sit).second.end()) { // Currently supports only ONE topsection per file because on save, each topsection designates which file to rewrite
+ node = bmtree->Items->AddObject(bmtree->Selected, (*eit).second.c_str(), *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ AddSection(bookmarks, bmtree, node, (*eit).first.c_str());
+ }
+ }
+ delete bookmarks;
+ }
+ }
+ closedir(dir);
+ }
+/*
+ SWConfig *bookmarks;
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ TTreeNode *node;
+
+ DIR *dir;
+ struct dirent *ent;
+ string conffile;
+ bmdir = "";
+ SWConfig optionsconf("./options.conf");
+
+ this->DragMode = dmAutomatic;
+ this->DragKind = dkDock;
+ this->UseDockManager = true;
+
+ bmtree = new TTreeView(this);
+ bmtree->Parent = this;
+ bmtree->Align = alClient;
+ bmtree->DragMode = dmAutomatic;
+ bmtree->Indent = 19;
+ bmtree->PopupMenu = BMPopup;
+ bmtree->TabOrder = 0;
+ bmtree->OnDblClick = bmtreeDblClick;
+ bmtree->OnDragDrop = bmtreeDragDrop;
+ bmtree->OnDragOver = bmtreeDragOver;
+
+
+
+ bmtree->Items->Clear();
+
+ if ((sit = optionsconf.Sections.find("Bookmarks")) != optionsconf.Sections.end())
+ bmdir = (*sit).second["Directory"];
+
+// Add Personal Bookmarks first, or if they don't exist, ADD A BLANK BRANCH first in the tree
+// --------------------------------------------------------------------------
+
+ if (bmdir == "")
+ bmdir = "./bookmarks/";
+
+ if (access(bmdir.c_str(), 0)) { // directory does not exist
+ _mkdir(bmdir.c_str());
+ }
+
+ conffile = bmdir + "personal.conf";
+ bookmarks = new SWConfig(conffile);
+ if ((sit = bookmarks->Sections.find("ROOT")) != bookmarks->Sections.end()) {
+ if ((eit = (*sit).second.begin()) != (*sit).second.end()) {
+ node = bmtree->Items->AddObject(bmtree->Selected, (*eit).second.c_str(), *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ AddSection(bookmarks, bmtree, node, (*eit).first.c_str());
+ }
+ }
+ else bmtree->Items->AddObject(bmtree->Selected, "Personal Bookmarks", *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ delete bookmarks;
+// --------------------------------------------------------------------------
+
+// Add all other bookmark files ---------------------------------------------
+ if (dir = opendir(bmdir.c_str())) {
+ rewinddir(dir);
+ while ((ent = readdir(dir))) {
+ if ((strcmp(ent->d_name, "personal.conf")) && (strcmp(ent->d_name, "."))&& (strcmp(ent->d_name, ".."))) {
+ conffile = bmdir;
+ conffile += ent->d_name;
+ bookmarks = new SWConfig(conffile);
+ if ((sit = bookmarks->Sections.find("ROOT")) != bookmarks->Sections.end()) {
+ if ((eit = (*sit).second.begin()) != (*sit).second.end()) { // Currently supports only ONE topsection per file because on save, each topsection designates which file to rewrite
+ node = bmtree->Items->AddObject(bmtree->Selected, (*eit).second.c_str(), *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ AddSection(bookmarks, bmtree, node, (*eit).first.c_str());
+ }
+ }
+ delete bookmarks;
+ }
+ }
+ closedir(dir);
+ }
+*/
+}
+
+
+void TBookMarkPanel::AddSection(SWConfig *config, TTreeView *tree, TTreeNode *parent, String section)
+{
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ TTreeNode *node;
+
+ if ((sit = config->Sections.find(section.c_str())) != config->Sections.end()) {
+ for (eit = (*sit).second.begin(); eit != (*sit).second.end(); eit++) {
+ node = tree->Items->AddChild(parent, (*eit).second.c_str());
+ AddSection(config, tree, node, (*eit).first.c_str());
+ }
+ }
+}
+
+
+void __fastcall TBookMarkPanel::bmtreeDragDrop(TObject *Sender, TObject *Source,
+ int X, int Y)
+{
+ bmtree->Selected->MoveTo(bmtree->DropTarget, naAddChildFirst);
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookMarkPanel::bmtreeDragOver(TObject *Sender, TObject *Source,
+ int X, int Y, TDragState State, bool &Accept)
+{
+ Accept = false;
+
+ if (String(Source->ClassName()) == "TTreeView") {
+ if (Source == bmtree) {
+ if (bmtree->Selected->Data) {
+ if (strcmp((*(String*)(bmtree->Selected->Data)).c_str(),(bmdir + "personal.conf").c_str())) {
+ Accept = true;
+ }
+ }
+ else Accept = true;
+ }
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookMarkPanel::bmtreeDblClick(TObject *Sender)
+{
+ if (!bmtree->Selected->getFirstChild()) {
+// Form1->DefaultVSKey = bmtree->Selected->Text.c_str();
+// Form1->TextKeyChanged();
+ }
+
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookMarkPanel::AddChild1Click(TObject *Sender)
+{
+ bmtree->Selected->Expand(false);
+ bmtree->Items->AddChildFirst(bmtree->Selected, "New Topic")->EditText();
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookMarkPanel::Delete1Click(TObject *Sender)
+{
+ if (bmtree->Selected->Data) {
+ if (strcmp((*(String*)(bmtree->Selected->Data)).c_str(),(bmdir + "personal.conf").c_str())) {
+ bmtree->Selected->Delete();
+ }
+ }
+ else bmtree->Selected->Delete();
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookMarkPanel::Rename1Click(TObject *Sender)
+{
+ bmtree->Selected->EditText();
+}
+//---------------------------------------------------------------------------
+
+void TBookMarkPanel::SaveBookmarks()
+{
+ TTreeNode *tree = 0;
+ SWConfig *bmconf;
+ ConfigEntMap emap;
+ SectionMap::iterator sit;
+ char buf[15];
+ bool personal, other;
+ list <String *>::iterator it;
+ string persfile;
+ SWConfig optionsconf("./options.conf");
+
+ if (bmtree->Items->Count)
+ tree = bmtree->Items->Item[0];
+
+ if ((sit = optionsconf.Sections.find("Bookmarks")) != optionsconf.Sections.end()) {
+ personal = (atoi((*(*sit).second.find("AutoSavePersonal")).second.c_str())) ? true:false;
+ other = (atoi((*(*sit).second.find("AutoSaveOther")).second.c_str())) ? true:false;
+ }
+
+ persfile = bmdir + "personal.conf";
+ for (it = bmfiles.begin(); it != bmfiles.end(); it++) { // delete all bookmark files before saving in case a top level was deleted
+ if (((!strcmp((*it)->c_str(), persfile.c_str())) && personal) || ((strcmp((*it)->c_str(), persfile.c_str())) && other))
+ unlink((*it)->c_str());
+ }
+
+ for (;tree;tree = tree->getNextSibling()) {
+ if (((*((String *)tree->Data) == persfile.c_str()) && personal) || ((*((String *)tree->Data) != persfile.c_str()) && other)) {
+ bmconf = new SWConfig(((String *)tree->Data)->c_str());
+ emap = bmconf->Sections["ROOT"];
+ sprintf(buf, "branch%d", tree->AbsoluteIndex);
+ emap.erase(buf); emap.insert(ConfigEntMap::value_type(buf, tree->Text.c_str()));
+ AddSectionToConf(bmconf, buf, tree);
+ bmconf->Sections["ROOT"] = emap;
+ bmconf->Save();
+ delete bmconf;
+ }
+ }
+}
+
+
+void TBookMarkPanel::AddSectionToConf(SWConfig *config, String section, TTreeNode *tree) {
+ ConfigEntMap sit;
+ char buf[15];
+
+ if (tree = tree->getFirstChild()) {
+ sit = config->Sections[section.c_str()];
+ for (; tree; tree = tree->getNextSibling()) {
+ sprintf(buf, "branch%d", tree->AbsoluteIndex);
+ sit.erase(buf); sit.insert(ConfigEntMap::value_type(buf, tree->Text.c_str()));
+ AddSectionToConf(config, buf, tree);
+ }
+ config->Sections[section.c_str()] = sit;
+ }
+}
+
+void __fastcall TBookMarkPanel::NewBookmarkFile1Click(TObject *Sender)
+{
+ if (NewBMfrm->ShowModal() == mrOk) {
+ bmtree->Items->AddObject(bmtree->Items->Item[0], NewBMfrm->bmtitle->Text, *bmfiles.insert(bmfiles.begin(), new String(String(bmdir.c_str()) + NewBMfrm->bmfile->Text + String(".conf"))));
+ }
+}
+
+
+
+//---------------------------------------------------------------------------
+namespace Bookmarkpanel
+{
+ void __fastcall PACKAGE Register()
+ {
+ TComponentClass classes[1] = {__classid(TBookMarkPanel)};
+ RegisterComponents("Samples", classes, 0);
+ }
+}
+//---------------------------------------------------------------------------
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/BookMarkPanel.h b/apps/windoze/CBuilder4/prototype/BookMarkPanel.h
new file mode 100644
index 0000000..c998b76
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/BookMarkPanel.h
@@ -0,0 +1,39 @@
+//---------------------------------------------------------------------------
+#ifndef BookMarkPanelH
+#define BookMarkPanelH
+//---------------------------------------------------------------------------
+#include <SysUtils.hpp>
+#include <Controls.hpp>
+#include <Classes.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+#include <swconfig.h>
+#include <list>
+//---------------------------------------------------------------------------
+class PACKAGE TBookMarkPanel : public TPanel
+{
+private:
+ void AddSection(SWConfig *config, TTreeView *tree, TTreeNode *parent, String section);
+ list <String *> bmfiles; // so we can delete each display we create
+protected:
+public:
+ __fastcall TBookMarkPanel(TComponent* Owner);
+ virtual __fastcall ~TBookMarkPanel();
+ virtual void __fastcall CreateWnd();
+ string bmdir;
+ void SaveBookmarks();
+ void AddSectionToConf(SWConfig *config, String section, TTreeNode *tree);
+__published:
+ TTreeView *bmtree;
+ TPopupMenu *BMPopup;
+ void __fastcall bmtreeDragDrop(TObject *Sender, TObject *Source, int X, int Y);
+ void __fastcall bmtreeDragOver(TObject *Sender, TObject *Source, int X, int Y,
+ TDragState State, bool &Accept);
+ void __fastcall bmtreeDblClick(TObject *Sender);
+ void __fastcall AddChild1Click(TObject *Sender);
+ void __fastcall Delete1Click(TObject *Sender);
+ void __fastcall Rename1Click(TObject *Sender);
+ void __fastcall NewBookmarkFile1Click(TObject *Sender);
+};
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/CommentPanel.cpp b/apps/windoze/CBuilder4/prototype/CommentPanel.cpp
new file mode 100644
index 0000000..dbf8adf
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/CommentPanel.cpp
@@ -0,0 +1,222 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#include <vcl/clipbrd.hpp>
+#pragma hdrstop
+
+#include "CommentPanel.h"
+#pragma package(smart_init)
+#include "swdisprtfchap.h"
+#include <swconfig.h>
+#include <swmodule.h>
+#include "Greek2Greek.h"
+#include <utilfuns.h>
+#include <swmgr.h>
+#include <shellapi.h>
+
+class RTFDisp : public SWDisplay {
+ SWDispRTF *edit;
+public:
+ RTFDisp(SWDispRTF *iedit) { edit = iedit; }
+ RTFDisp() {}
+ char Display(SWModule &imodule) {
+ edit->Display(imodule);
+ }
+};
+
+class DispExternal : public SWDisplay {
+public:
+ DispExternal() {}
+ char Display(SWModule &imodule) {
+ SHELLEXECUTEINFO info;
+ info.cbSize = sizeof(SHELLEXECUTEINFO);
+ info.fMask = SEE_MASK_NOCLOSEPROCESS; //SEE_MASK_CLASSNAME;
+ info.hwnd = GetFocus();
+ info.lpVerb = "open";
+ info.lpFile = (char *)imodule;
+ info.lpParameters = NULL;
+ info.lpDirectory = NULL;
+ info.nShow = 0;
+// info.lpClass = ".html";
+ ShellExecuteEx(&info);
+// ShellExecute(edit->Handle, "open", (char *)imodule, NULL, NULL, SW_SHOWNORMAL);
+ }
+};
+
+//---------------------------------------------------------------------------
+// ValidCtrCheck is used to assure that the components created do not have
+// any pure virtual functions.
+//
+
+static inline void ValidCtrCheck(TCommentPanel *)
+{
+ new TCommentPanel(NULL);
+}
+//---------------------------------------------------------------------------
+__fastcall TCommentPanel::TCommentPanel(TComponent* Owner, SWModule *mod, SWMgr *imgr)
+ : TPanel(Owner)
+{
+ module = mod;
+ mgr = imgr;
+ this->font = 0;
+ stdstr(&(this->font), font);
+ menu = new TPopupMenu(this);
+ menu->OnPopup = PopupMenuPopup;
+
+ TMenuItem * newitem;
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "&Copy";
+ newitem->Hint = "Copy text to clipboard";
+ newitem->Default = false;
+ newitem->OnClick = Copy1Click;
+ menu->Items->Add(newitem);
+ if (!strcmp(mod->Name(), "N27U4")) {
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Copy as &B-Greek Transliteration";
+ newitem->Hint = "Copy text to clipboard as B-Greek Transliteration";
+ newitem->Default = false;
+ newitem->OnClick = CopyasBGreekTransliteration1Click;
+ menu->Items->Add(newitem);
+ }
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Dictionary Lookup";
+ newitem->Hint = "Send text to dictionary key for lookup";
+ newitem->Default = false;
+ newitem->OnClick = DictionaryLookup1Click;
+ menu->Items->Add(newitem);
+}
+
+
+void __fastcall TCommentPanel::CreateWnd() {
+ TPanel::CreateWnd();
+
+ TWinControl *newrtf;
+
+ if (mgr->config->Sections[module->Name()]["ModDrv"] == "HREFCom") {
+// if (mainmgr->config->Sections[mod->Name()]["External"] == "1") {
+ newrtf = new TPanel(this);
+ ((TPanel *)newrtf)->Caption = "Syncronizing to External Viewer";
+ display = new DispExternal();
+ module->Disp(display);
+/*
+ }
+ else {
+ // newrtf = new THTML(this->Handle);
+ // newrtf = new SWDispRTF(this);
+ newrtf = HTML1;
+ newrtf->Visible = true;
+ mod->Disp(*displays.insert(displays.begin(), new HREFDisp((THTML *)newrtf)));
+ // mod->Disp(*displays.insert(displays.begin(), new RTFDisp((SWDispRTF *)newrtf)));
+ }
+*/
+ }
+ else {
+ newrtf = new SWDispRTF(this);
+ display = new RTFDisp((SWDispRTF *)newrtf);
+ module->Disp(display);
+ ((SWDispRTF *)newrtf)->ScrollBars = ssVertical;
+ ((SWDispRTF *)newrtf)->ReadOnly = true;
+ if (mgr->config->Sections[module->Name()]["ModDrv"] == "RawFiles") {
+// ((SWDispRTF *)newrtf)->PopupMenu = PopupMenu3;
+ ((SWDispRTF *)newrtf)->ExpandNewLine = false;
+ }
+// else ((SWDispRTF *)newrtf)->PopupMenu = PopupMenu2;
+ ((SWDispRTF *)newrtf)->OnMouseDown = RTFMouseDown;
+ }
+
+ newrtf->Parent = this;
+ newrtf->Align = alClient;
+
+// mod->SetKey(DefaultVSKey);
+// return 0;
+
+
+}
+__fastcall TCommentPanel::~TCommentPanel() {
+ delete display;
+ if (font)
+ delete font;
+}
+//---------------------------------------------------------------------------
+namespace Commentpanel
+{
+ void __fastcall PACKAGE Register()
+ {
+ TComponentClass classes[1] = {__classid(TCommentPanel)};
+ RegisterComponents("Samples", classes, 0);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TCommentPanel::PopupMenuPopup(TObject *Sender)
+{
+}
+void TCommentPanel::BuildRTFHeader(char *buf, char *font, int max)
+{
+ char buf1[1024], buf2[1024];
+ SectionMap::iterator sit;
+
+ sprintf(buf1, "{\\rtf1\\ansi");
+ if (font)
+ sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 %s;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f2\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f3\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}", font);
+ else sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 Times New Roman;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}");
+ strcat(buf1, buf2);
+
+// if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+// sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red%d\\green%d\\blue%d;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}",
+// atoi((*sit).second["CurrentVSColorRed"].c_str()),
+// atoi((*sit).second["CurrentVSColorGreen"].c_str()),
+// atoi((*sit).second["CurrentVSColorBlue"].c_str()));
+// }
+// else
+ sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}");
+ strcat(buf1, buf2);
+ memset(buf, 0, max);
+ strncpy(buf, buf1, max);
+}
+
+
+void __fastcall TCommentPanel::CopyasBGreekTransliteration1Click(TObject *Sender)
+{
+ char *retbuf;
+ int len;
+ TClipboard *clip = new TClipboard();
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ len = rtf->SelText.Length() * 2;
+ retbuf = new char [ len ];
+ if (!Greek2bGreek(retbuf, rtf->SelText.c_str(), len)) {
+ clip->SetTextBuf(retbuf);
+ }
+ delete clip;
+}
+
+void __fastcall TCommentPanel::Copy1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+ rtf->CopyToClipboard();
+}
+void __fastcall TCommentPanel::DictionaryLookup1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+// DictKeyEdit->Text = Trim(rtf->SelText);
+}
+void __fastcall TCommentPanel::RTFMouseDown(TObject *Sender, TMouseButton Button,
+ TShiftState Shift, int X, int Y)
+{
+ ((TWinControl *)Sender)->SetFocus();
+}
diff --git a/apps/windoze/CBuilder4/prototype/CommentPanel.h b/apps/windoze/CBuilder4/prototype/CommentPanel.h
new file mode 100644
index 0000000..6fa9145
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/CommentPanel.h
@@ -0,0 +1,39 @@
+//---------------------------------------------------------------------------
+#ifndef CommentPanelH
+#define CommentPanelH
+//---------------------------------------------------------------------------
+#include <SysUtils.hpp>
+#include <Controls.hpp>
+#include <Classes.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+class SWDisplay;
+class SWModule;
+class SWMgr;
+
+
+
+//---------------------------------------------------------------------------
+class PACKAGE TCommentPanel : public TPanel
+{
+private:
+protected:
+public:
+ __fastcall TCommentPanel(TComponent* Owner, SWModule *mod = 0, SWMgr *mgr = 0);
+ __fastcall virtual ~TCommentPanel();
+ SWDisplay *display;
+ SWModule *module;
+ SWMgr *mgr;
+ char *font;
+__published:
+ TPopupMenu *menu;
+ virtual void __fastcall CreateWnd();
+ void __fastcall PopupMenuPopup(TObject *Sender);
+ void __fastcall CopyasBGreekTransliteration1Click(TObject *Sender);
+ void __fastcall Copy1Click(TObject *Sender);
+ void __fastcall DictionaryLookup1Click(TObject *Sender);
+ void __fastcall RTFMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void BuildRTFHeader(char *buf, char *font, int max);
+};
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/DeskTopNameForm.cpp b/apps/windoze/CBuilder4/prototype/DeskTopNameForm.cpp
new file mode 100644
index 0000000..c3308b4
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/DeskTopNameForm.cpp
@@ -0,0 +1,15 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "DeskTopNameForm.h"
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+TDeskTopNameFrm *DeskTopNameFrm;
+//---------------------------------------------------------------------------
+__fastcall TDeskTopNameFrm::TDeskTopNameFrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/DeskTopNameForm.dfm b/apps/windoze/CBuilder4/prototype/DeskTopNameForm.dfm
new file mode 100644
index 0000000..e64f7bd
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/DeskTopNameForm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/DeskTopNameForm.h b/apps/windoze/CBuilder4/prototype/DeskTopNameForm.h
new file mode 100644
index 0000000..3ef1549
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/DeskTopNameForm.h
@@ -0,0 +1,27 @@
+//---------------------------------------------------------------------------
+#ifndef DeskTopNameFormH
+#define DeskTopNameFormH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+#include <ComCtrls.hpp>
+#include <ExtCtrls.hpp>
+//---------------------------------------------------------------------------
+class TDeskTopNameFrm : public TForm
+{
+__published: // IDE-managed Components
+ TLabel *Label1;
+ TPanel *Panel1;
+ TButton *Button1;
+ TPanel *Panel2;
+ TEdit *desktopName;
+private: // User declarations
+public: // User declarations
+ __fastcall TDeskTopNameFrm(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TDeskTopNameFrm *DeskTopNameFrm;
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/LDPanel.cpp b/apps/windoze/CBuilder4/prototype/LDPanel.cpp
new file mode 100644
index 0000000..b93af95
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/LDPanel.cpp
@@ -0,0 +1,174 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#include <vcl/clipbrd.hpp>
+#pragma hdrstop
+
+#include "LDPanel.h"
+#pragma package(smart_init)
+#include "swdisprtfchap.h"
+#include <swconfig.h>
+#include <swmodule.h>
+#include "Greek2Greek.h"
+#include <utilfuns.h>
+#include <swmgr.h>
+
+class RTFDisp : public SWDisplay {
+ SWDispRTF *edit;
+public:
+ RTFDisp(SWDispRTF *iedit) { edit = iedit; }
+ RTFDisp() {}
+ char Display(SWModule &imodule) {
+ edit->Display(imodule);
+ }
+};
+
+//---------------------------------------------------------------------------
+// ValidCtrCheck is used to assure that the components created do not have
+// any pure virtual functions.
+//
+
+static inline void ValidCtrCheck(TLDPanel *)
+{
+ new TLDPanel(NULL);
+}
+//---------------------------------------------------------------------------
+__fastcall TLDPanel::TLDPanel(TComponent* Owner, SWModule *mod, SWMgr *imgr)
+ : TPanel(Owner)
+{
+ module = mod;
+ mgr = imgr;
+ this->font = 0;
+ stdstr(&(this->font), font);
+ menu = new TPopupMenu(this);
+ menu->OnPopup = PopupMenuPopup;
+
+ TMenuItem * newitem;
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "&Copy";
+ newitem->Hint = "Copy text to clipboard";
+ newitem->Default = false;
+ newitem->OnClick = Copy1Click;
+ menu->Items->Add(newitem);
+ if (!strcmp(mod->Name(), "N27U4")) {
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Copy as &B-Greek Transliteration";
+ newitem->Hint = "Copy text to clipboard as B-Greek Transliteration";
+ newitem->Default = false;
+ newitem->OnClick = CopyasBGreekTransliteration1Click;
+ menu->Items->Add(newitem);
+ }
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Dictionary Lookup";
+ newitem->Hint = "Send text to dictionary key for lookup";
+ newitem->Default = false;
+ newitem->OnClick = DictionaryLookup1Click;
+ menu->Items->Add(newitem);
+}
+
+
+void __fastcall TLDPanel::CreateWnd() {
+ TPanel::CreateWnd();
+
+ SWDispRTF *newrtf = new SWDispRTF(this);
+
+ newrtf->Parent = this;
+ newrtf->Align = alClient;
+ newrtf->ScrollBars = ssVertical;
+ newrtf->ReadOnly = true;
+// newrtf->PopupMenu = PopupMenu2;
+// newrtf->OnMouseDown = RTFMouseDown;
+ display = new RTFDisp(newrtf);
+ module->Disp(display);
+// mod->SetKey(DefaultStrKey);
+
+
+}
+__fastcall TLDPanel::~TLDPanel() {
+ delete display;
+ if (font)
+ delete font;
+}
+//---------------------------------------------------------------------------
+namespace Ldpanel
+{
+ void __fastcall PACKAGE Register()
+ {
+ TComponentClass classes[1] = {__classid(TLDPanel)};
+ RegisterComponents("Samples", classes, 0);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TLDPanel::PopupMenuPopup(TObject *Sender)
+{
+}
+void TLDPanel::BuildRTFHeader(char *buf, char *font, int max)
+{
+ char buf1[1024], buf2[1024];
+ SectionMap::iterator sit;
+
+ sprintf(buf1, "{\\rtf1\\ansi");
+ if (font)
+ sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 %s;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f2\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f3\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}", font);
+ else sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 Times New Roman;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}");
+ strcat(buf1, buf2);
+
+// if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+// sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red%d\\green%d\\blue%d;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}",
+// atoi((*sit).second["CurrentVSColorRed"].c_str()),
+// atoi((*sit).second["CurrentVSColorGreen"].c_str()),
+// atoi((*sit).second["CurrentVSColorBlue"].c_str()));
+// }
+// else
+ sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}");
+ strcat(buf1, buf2);
+ memset(buf, 0, max);
+ strncpy(buf, buf1, max);
+}
+
+
+void __fastcall TLDPanel::CopyasBGreekTransliteration1Click(TObject *Sender)
+{
+ char *retbuf;
+ int len;
+ TClipboard *clip = new TClipboard();
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ len = rtf->SelText.Length() * 2;
+ retbuf = new char [ len ];
+ if (!Greek2bGreek(retbuf, rtf->SelText.c_str(), len)) {
+ clip->SetTextBuf(retbuf);
+ }
+ delete clip;
+}
+
+void __fastcall TLDPanel::Copy1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+ rtf->CopyToClipboard();
+}
+void __fastcall TLDPanel::DictionaryLookup1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+// DictKeyEdit->Text = Trim(rtf->SelText);
+}
+void __fastcall TLDPanel::RTFMouseDown(TObject *Sender, TMouseButton Button,
+ TShiftState Shift, int X, int Y)
+{
+ ((TWinControl *)Sender)->SetFocus();
+}
diff --git a/apps/windoze/CBuilder4/prototype/LDPanel.h b/apps/windoze/CBuilder4/prototype/LDPanel.h
new file mode 100644
index 0000000..80dcdff
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/LDPanel.h
@@ -0,0 +1,39 @@
+//---------------------------------------------------------------------------
+#ifndef LDPanelH
+#define LDPanelH
+//---------------------------------------------------------------------------
+#include <SysUtils.hpp>
+#include <Controls.hpp>
+#include <Classes.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+class SWDisplay;
+class SWModule;
+class SWMgr;
+
+
+
+//---------------------------------------------------------------------------
+class PACKAGE TLDPanel : public TPanel
+{
+private:
+protected:
+public:
+ __fastcall TLDPanel(TComponent* Owner, SWModule *mod = 0, SWMgr *mgr = 0);
+ __fastcall virtual ~TLDPanel();
+ SWDisplay *display;
+ SWModule *module;
+ SWMgr *mgr;
+ char *font;
+__published:
+ TPopupMenu *menu;
+ virtual void __fastcall CreateWnd();
+ void __fastcall PopupMenuPopup(TObject *Sender);
+ void __fastcall CopyasBGreekTransliteration1Click(TObject *Sender);
+ void __fastcall Copy1Click(TObject *Sender);
+ void __fastcall DictionaryLookup1Click(TObject *Sender);
+ void __fastcall RTFMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void BuildRTFHeader(char *buf, char *font, int max);
+};
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/ModInstForm.cpp b/apps/windoze/CBuilder4/prototype/ModInstForm.cpp
new file mode 100644
index 0000000..1763817
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/ModInstForm.cpp
@@ -0,0 +1,14 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#pragma hdrstop
+
+#include "ModInstForm.h"
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TModInstFrm *ModInstFrm;
+//---------------------------------------------------------------------------
+__fastcall TModInstFrm::TModInstFrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//--------------------------------------------------------------------------- \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/ModInstForm.dfm b/apps/windoze/CBuilder4/prototype/ModInstForm.dfm
new file mode 100644
index 0000000..41ce498
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/ModInstForm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/ModInstForm.h b/apps/windoze/CBuilder4/prototype/ModInstForm.h
new file mode 100644
index 0000000..f0cb90a
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/ModInstForm.h
@@ -0,0 +1,27 @@
+//---------------------------------------------------------------------------
+#ifndef ModInstFormH
+#define ModInstFormH
+//---------------------------------------------------------------------------
+#include <vcl\Classes.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Forms.hpp>
+#include <vcl\ComCtrls.hpp>
+#include <vcl\ExtCtrls.hpp>
+//---------------------------------------------------------------------------
+class TModInstFrm : public TForm
+{
+__published: // IDE-managed Components
+ TRichEdit *AboutText;
+ TPanel *Panel1;
+ TButton *Button1;
+ TLabel *ModText;
+private: // User declarations
+public: // User declarations
+ __fastcall TModInstFrm(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern TModInstFrm *ModInstFrm;
+//---------------------------------------------------------------------------
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/ModTabPanel.cpp b/apps/windoze/CBuilder4/prototype/ModTabPanel.cpp
new file mode 100644
index 0000000..0d39acf
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/ModTabPanel.cpp
@@ -0,0 +1,114 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "ModTabPanel.h"
+#pragma package(smart_init)
+#include <swmgr.h>
+#include "TextPanel.h"
+#include "CommentPanel.h"
+#include "LDPanel.h"
+//---------------------------------------------------------------------------
+// ValidCtrCheck is used to assure that the components created do not have
+// any pure virtual functions.
+//
+
+static inline void ValidCtrCheck(TModTabPanel *)
+{
+ new TModTabPanel(NULL);
+}
+//---------------------------------------------------------------------------
+__fastcall TModTabPanel::TModTabPanel(TComponent* Owner, SWMgr *mgr, char *modType)
+ : TPanel(Owner)
+{
+ this->mgr = mgr;
+ this->modType = modType;
+}
+
+void __fastcall TModTabPanel::CreateWnd() {
+ TPanel::CreateWnd();
+ ModMap::iterator it;
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ char *font;
+ this->DragMode = dmAutomatic;
+ this->DragKind = dkDock;
+ this->UseDockManager = true;
+ pageControl = new TPageControl(this);
+ pageControl->Parent = this;
+ pageControl->Align = alClient;
+ pageControl->MultiLine = True;
+ pageControl->ParentFont = False;
+ pageControl->ParentShowHint = False;
+ pageControl->ShowHint = True;
+ pageControl->TabHeight = 14;
+ pageControl->TabOrder = 0;
+ pageControl->OnChange = PageControl1Change;
+ for (it = mgr->Modules.begin(); it != mgr->Modules.end(); it++) {
+ if ((!strcmp((*it).second->Type(), "Biblical Texts")) && (!strcmp(modType.c_str(), "Biblical Texts"))) {
+ font = 0;
+ if ((sit = mgr->config->Sections.find((*it).second->Name())) != mgr->config->Sections.end()) {
+ if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) {
+ font = (char *)(*eit).second.c_str();
+ }
+ }
+ TTabSheet *newtab = new TTabSheet(this);
+ newtab->Caption = (*it).second->Name();
+ newtab->Hint = (*it).second->Description();
+ newtab->PageControl = pageControl;
+ TTextPanel *panel = new TTextPanel(this, (*it).second, font);
+ panel->Parent = newtab;
+ panel->Align = alClient;
+// CreateTextPane((*it).second, font);
+ }
+ if ((!strcmp((*it).second->Type(), "Commentaries")) && (!strcmp(modType.c_str(), "Commentaries"))) {
+ TTabSheet *newtab = new TTabSheet(this);
+ newtab->Caption = (*it).second->Name();
+ newtab->Hint = (*it).second->Description();
+ newtab->PageControl = pageControl;
+ TCommentPanel *panel = new TCommentPanel(this, (*it).second, mgr);
+ panel->Parent = newtab;
+ panel->Align = alClient;
+// CreateCommentPane((*it).second);
+ }
+ if ((!strcmp((*it).second->Type(), "Lexicons / Dictionaries")) && (!strcmp(modType.c_str(), "Lexicons / Dictionaries"))) {
+ TTabSheet *newtab = new TTabSheet(this);
+ newtab->Caption = (*it).second->Name();
+ newtab->Hint = (*it).second->Description();
+ newtab->PageControl = pageControl;
+ TLDPanel *panel = new TLDPanel(this, (*it).second, mgr);
+ panel->Parent = newtab;
+ panel->Align = alClient;
+// CreateLDPane((*it).second);
+ }
+ }
+}
+//---------------------------------------------------------------------------
+namespace Modtabpanel
+{
+ void __fastcall PACKAGE Register()
+ {
+ TComponentClass classes[1] = {__classid(TModTabPanel)};
+ RegisterComponents("Samples", classes, 0);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TModTabPanel::PageControl1Change(TObject *Sender)
+{
+ RefreshActiveSheet();
+// Form1->ActiveControl = PageControl1;
+}
+
+
+void TModTabPanel::RefreshActiveSheet()
+{
+ ModMap::iterator it;
+
+ it = mgr->Modules.find(pageControl->ActivePage->Caption.c_str());
+ if (it != mgr->Modules.end()) {
+ (*it).second->Display();
+// if (logmodstate)
+// modstates.insert(modstates.begin(), new ModState(pc, pc->ActivePage, (*it).second->KeyText()));
+ }
+}
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/ModTabPanel.h b/apps/windoze/CBuilder4/prototype/ModTabPanel.h
new file mode 100644
index 0000000..9da8db2
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/ModTabPanel.h
@@ -0,0 +1,30 @@
+//---------------------------------------------------------------------------
+#ifndef ModTabPanelH
+#define ModTabPanelH
+//---------------------------------------------------------------------------
+#include <SysUtils.hpp>
+#include <Controls.hpp>
+#include <Classes.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+#include <string>
+
+class SWMgr;
+//---------------------------------------------------------------------------
+class PACKAGE TModTabPanel : public TPanel
+{
+private:
+protected:
+public:
+ SWMgr *mgr;
+ std::string modType;
+ __fastcall TModTabPanel(TComponent* Owner, SWMgr *mgr = 0, char *modtype = 0);
+ void RefreshActiveSheet();
+ virtual void __fastcall CreateWnd();
+
+__published:
+ TPageControl *pageControl;
+ void __fastcall PageControl1Change(TObject *Sender);
+};
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/TextPanel.cpp b/apps/windoze/CBuilder4/prototype/TextPanel.cpp
new file mode 100644
index 0000000..a534e12
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/TextPanel.cpp
@@ -0,0 +1,183 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#include <vcl/clipbrd.hpp>
+#pragma hdrstop
+
+#include "TextPanel.h"
+#pragma package(smart_init)
+#include "swdisprtfchap.h"
+#include <swconfig.h>
+#include <swmodule.h>
+#include "Greek2Greek.h"
+#include <utilfuns.h>
+
+class RTFDisp : public SWDisplay {
+ SWDispRTF *edit;
+public:
+ RTFDisp(SWDispRTF *iedit) { edit = iedit; }
+ RTFDisp() {}
+ char Display(SWModule &imodule) {
+ edit->Display(imodule);
+ }
+};
+
+
+//---------------------------------------------------------------------------
+// ValidCtrCheck is used to assure that the components created do not have
+// any pure virtual functions.
+//
+
+static inline void ValidCtrCheck(TTextPanel *)
+{
+ new TTextPanel(NULL);
+}
+//---------------------------------------------------------------------------
+__fastcall TTextPanel::TTextPanel(TComponent* Owner, SWModule *mod, char *font)
+ : TPanel(Owner)
+{
+ module = mod;
+ this->font = 0;
+ stdstr(&(this->font), font);
+ menu = new TPopupMenu(this);
+ menu->OnPopup = PopupMenuPopup;
+
+ TMenuItem * newitem;
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "&Copy";
+ newitem->Hint = "Copy text to clipboard";
+ newitem->Default = false;
+ newitem->OnClick = Copy1Click;
+ menu->Items->Add(newitem);
+ if (!strcmp(mod->Name(), "N27U4")) {
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Copy as &B-Greek Transliteration";
+ newitem->Hint = "Copy text to clipboard as B-Greek Transliteration";
+ newitem->Default = false;
+ newitem->OnClick = CopyasBGreekTransliteration1Click;
+ menu->Items->Add(newitem);
+ }
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Dictionary Lookup";
+ newitem->Hint = "Send text to dictionary key for lookup";
+ newitem->Default = false;
+ newitem->OnClick = DictionaryLookup1Click;
+ menu->Items->Add(newitem);
+}
+
+
+void __fastcall TTextPanel::CreateWnd() {
+ TPanel::CreateWnd();
+ SWDispRTFChap *newrtf = new SWDispRTFChap(this);
+ char buf[512];
+ SectionMap::iterator sit;
+
+// newtab->Caption = mod->Name();
+// newtab->Hint = mod->Description();
+// newtab->PageControl = PageControl1;
+ newrtf->Parent = this;
+ newrtf->Align = alClient;
+ newrtf->ScrollBars = ssVertical;
+ newrtf->ReadOnly = true;
+ newrtf->PopupMenu = menu;
+ newrtf->OnMouseDown = RTFMouseDown;
+
+ BuildRTFHeader(buf, font, 512);
+ newrtf->RTFHeader = buf;
+
+// if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+// newrtf->MarkCurrentVerse = (atoi((*sit).second["AutoVSColor"].c_str())) ? true:false;
+// }
+ display = new RTFDisp(newrtf);
+ module->Disp(display);
+// mod->SetKey(DefaultVSKey);
+
+}
+__fastcall TTextPanel::~TTextPanel() {
+ delete display;
+ if (font)
+ delete font;
+}
+//---------------------------------------------------------------------------
+namespace Textpanel
+{
+ void __fastcall PACKAGE Register()
+ {
+ TComponentClass classes[1] = {__classid(TTextPanel)};
+ RegisterComponents("Samples", classes, 0);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TTextPanel::PopupMenuPopup(TObject *Sender)
+{
+}
+void TTextPanel::BuildRTFHeader(char *buf, char *font, int max)
+{
+ char buf1[1024], buf2[1024];
+ SectionMap::iterator sit;
+
+ sprintf(buf1, "{\\rtf1\\ansi");
+ if (font)
+ sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 %s;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f2\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f3\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}", font);
+ else sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 Times New Roman;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}");
+ strcat(buf1, buf2);
+
+// if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+// sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red%d\\green%d\\blue%d;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}",
+// atoi((*sit).second["CurrentVSColorRed"].c_str()),
+// atoi((*sit).second["CurrentVSColorGreen"].c_str()),
+// atoi((*sit).second["CurrentVSColorBlue"].c_str()));
+// }
+// else
+ sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}");
+ strcat(buf1, buf2);
+ memset(buf, 0, max);
+ strncpy(buf, buf1, max);
+}
+
+
+void __fastcall TTextPanel::CopyasBGreekTransliteration1Click(TObject *Sender)
+{
+ char *retbuf;
+ int len;
+ TClipboard *clip = new TClipboard();
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ len = rtf->SelText.Length() * 2;
+ retbuf = new char [ len ];
+ if (!Greek2bGreek(retbuf, rtf->SelText.c_str(), len)) {
+ clip->SetTextBuf(retbuf);
+ }
+ delete clip;
+}
+
+void __fastcall TTextPanel::Copy1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+ rtf->CopyToClipboard();
+}
+void __fastcall TTextPanel::DictionaryLookup1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+// DictKeyEdit->Text = Trim(rtf->SelText);
+}
+void __fastcall TTextPanel::RTFMouseDown(TObject *Sender, TMouseButton Button,
+ TShiftState Shift, int X, int Y)
+{
+ ((TWinControl *)Sender)->SetFocus();
+}
diff --git a/apps/windoze/CBuilder4/prototype/TextPanel.h b/apps/windoze/CBuilder4/prototype/TextPanel.h
new file mode 100644
index 0000000..6103088
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/TextPanel.h
@@ -0,0 +1,34 @@
+//---------------------------------------------------------------------------
+#ifndef TextPanelH
+#define TextPanelH
+//---------------------------------------------------------------------------
+#include <SysUtils.hpp>
+#include <Controls.hpp>
+#include <Classes.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+class SWDisplay;
+class SWModule;
+//---------------------------------------------------------------------------
+class PACKAGE TTextPanel : public TPanel
+{
+private:
+protected:
+public:
+ __fastcall TTextPanel(TComponent* Owner, SWModule *mod = 0, char *font = 0);
+ __fastcall virtual ~TTextPanel();
+ SWDisplay *display;
+ SWModule *module;
+ char *font;
+__published:
+ TPopupMenu *menu;
+ virtual void __fastcall CreateWnd();
+ void __fastcall PopupMenuPopup(TObject *Sender);
+ void __fastcall CopyasBGreekTransliteration1Click(TObject *Sender);
+ void __fastcall Copy1Click(TObject *Sender);
+ void __fastcall DictionaryLookup1Click(TObject *Sender);
+ void __fastcall RTFMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void BuildRTFHeader(char *buf, char *font, int max);
+};
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/back.bmp b/apps/windoze/CBuilder4/prototype/back.bmp
new file mode 100644
index 0000000..5284295
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/back.bmp
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/biblecsmgr.cpp b/apps/windoze/CBuilder4/prototype/biblecsmgr.cpp
new file mode 100644
index 0000000..502cb09
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/biblecsmgr.cpp
@@ -0,0 +1,41 @@
+//---------------------------------------------------------------------------
+#include "BibleCSMGR.h"
+#include <swconfig.h>
+//---------------------------------------------------------------------------
+BibleCSMGR::BibleCSMGR(TModInstFrm *iModInstFrm) : SWMgr(0, false)
+{
+ ModInstFrm = iModInstFrm;
+ Load();
+}
+
+
+char BibleCSMGR::AddModToConfig(int conffd, const char *fname)
+{
+ SWConfig modconf(fname);
+ SectionMap::iterator section;
+ AnsiString abouttext = "";
+ bool logflag;
+ TMemoryStream *RTFStream = new TMemoryStream();
+ char retval;
+
+ section = modconf.Sections.begin();
+
+ ModInstFrm->ModText->Caption = "";
+ ModInstFrm->ModText->Caption = ModInstFrm->ModText->Caption + "Found new module [ " + (*section).second["Description"].c_str() + " ]. Installing...";
+
+ abouttext = abouttext + "{\\fs20\\cf0 " + (*section).second["About"].c_str() + " }";
+ RTFStream->Clear();
+ RTFStream->WriteBuffer(abouttext.c_str(), abouttext.Length());
+ RTFStream->Position = 0;
+ ModInstFrm->AboutText->Lines->LoadFromStream(RTFStream);
+ delete RTFStream;
+
+ ModInstFrm->ShowModal();
+
+ logflag = SWLog::systemlog->log;
+ SWLog::systemlog->log = false;
+ retval = SWMgr::AddModToConfig(conffd, fname);
+ SWLog::systemlog->log = logflag;
+
+ return retval;
+}
diff --git a/apps/windoze/CBuilder4/prototype/biblecsmgr.h b/apps/windoze/CBuilder4/prototype/biblecsmgr.h
new file mode 100644
index 0000000..d94bbd6
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/biblecsmgr.h
@@ -0,0 +1,18 @@
+//---------------------------------------------------------------------------
+#ifndef biblecsmgrH
+#define biblecsmgrH
+#include <swmgr.h>
+#include "ModInstForm.h"
+//---------------------------------------------------------------------------
+class BibleCSMGR : public SWMgr {
+ TModInstFrm *ModInstFrm;
+
+protected:
+ virtual char AddModToConfig(int conffd, const char *fname);
+
+public:
+ BibleCSMGR(TModInstFrm *iModInstFrm);
+};
+
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/bookmark.bmp b/apps/windoze/CBuilder4/prototype/bookmark.bmp
new file mode 100644
index 0000000..4b6df0c
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/bookmark.bmp
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/bookmarkfrm.cpp b/apps/windoze/CBuilder4/prototype/bookmarkfrm.cpp
new file mode 100644
index 0000000..8ef63cc
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/bookmarkfrm.cpp
@@ -0,0 +1,222 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#pragma hdrstop
+
+#include "bookmarkfrm.h"
+#include <swconfig.h>
+#include <dirent.h>
+#include "mainfrm.h"
+#include "newbmfilefrm.h"
+#include <io.h>
+#include <dir.h>
+
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TBookmarksfrm *Bookmarksfrm;
+//---------------------------------------------------------------------------
+__fastcall TBookmarksfrm::TBookmarksfrm(TComponent* Owner)
+ : TForm(Owner)
+{
+ SWConfig *bookmarks;
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ TTreeNode *node;
+
+ DIR *dir;
+ struct dirent *ent;
+ string conffile;
+ bmdir = "";
+
+ bmtree->Items->Clear();
+
+ if ((sit = Form1->optionsconf->Sections.find("Bookmarks")) != Form1->optionsconf->Sections.end())
+ bmdir = (*sit).second["Directory"];
+
+// Add Personal Bookmarks first, or if they don't exist, ADD A BLANK BRANCH first in the tree
+// --------------------------------------------------------------------------
+
+ if (bmdir == "")
+ bmdir = "./bookmarks/";
+
+ if (access(bmdir.c_str(), 0)) { // directory does not exist
+ _mkdir(bmdir.c_str());
+ }
+
+ conffile = bmdir + "personal.conf";
+ bookmarks = new SWConfig(conffile);
+ if ((sit = bookmarks->Sections.find("ROOT")) != bookmarks->Sections.end()) {
+ if ((eit = (*sit).second.begin()) != (*sit).second.end()) {
+ node = bmtree->Items->AddObject(bmtree->Selected, (*eit).second.c_str(), *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ AddSection(bookmarks, bmtree, node, (*eit).first.c_str());
+ }
+ }
+ else bmtree->Items->AddObject(bmtree->Selected, "Personal Bookmarks", *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ delete bookmarks;
+// --------------------------------------------------------------------------
+
+// Add all other bookmark files ---------------------------------------------
+ if (dir = opendir(bmdir.c_str())) {
+ rewinddir(dir);
+ while ((ent = readdir(dir))) {
+ if ((strcmp(ent->d_name, "personal.conf")) && (strcmp(ent->d_name, "."))&& (strcmp(ent->d_name, ".."))) {
+ conffile = bmdir;
+ conffile += ent->d_name;
+ bookmarks = new SWConfig(conffile);
+ if ((sit = bookmarks->Sections.find("ROOT")) != bookmarks->Sections.end()) {
+ if ((eit = (*sit).second.begin()) != (*sit).second.end()) { // Currently supports only ONE topsection per file because on save, each topsection designates which file to rewrite
+ node = bmtree->Items->AddObject(bmtree->Selected, (*eit).second.c_str(), *bmfiles.insert(bmfiles.begin(), new String(conffile.c_str())));
+ AddSection(bookmarks, bmtree, node, (*eit).first.c_str());
+ }
+ }
+ delete bookmarks;
+ }
+ }
+ closedir(dir);
+ }
+}
+
+
+__fastcall TBookmarksfrm::~TBookmarksfrm()
+{
+ list <String *>::iterator it;
+
+ SaveBookmarks();
+
+ for (it = bmfiles.begin(); it != bmfiles.end(); it++)
+ delete *it;
+}
+
+
+//---------------------------------------------------------------------------
+
+void TBookmarksfrm::AddSection(SWConfig *config, TTreeView *tree, TTreeNode *parent, String section)
+{
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ TTreeNode *node;
+
+ if ((sit = config->Sections.find(section.c_str())) != config->Sections.end()) {
+ for (eit = (*sit).second.begin(); eit != (*sit).second.end(); eit++) {
+ node = tree->Items->AddChild(parent, (*eit).second.c_str());
+ AddSection(config, tree, node, (*eit).first.c_str());
+ }
+ }
+}
+
+
+void __fastcall TBookmarksfrm::bmtreeDragDrop(TObject *Sender, TObject *Source,
+ int X, int Y)
+{
+ bmtree->Selected->MoveTo(bmtree->DropTarget, naAddChildFirst);
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookmarksfrm::bmtreeDragOver(TObject *Sender, TObject *Source,
+ int X, int Y, TDragState State, bool &Accept)
+{
+ Accept = false;
+
+ if (String(Source->ClassName()) == "TTreeView") {
+ if (Source == bmtree) {
+ if (bmtree->Selected->Data) {
+ if (strcmp((*(String*)(bmtree->Selected->Data)).c_str(),(bmdir + "personal.conf").c_str())) {
+ Accept = true;
+ }
+ }
+ else Accept = true;
+ }
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookmarksfrm::bmtreeDblClick(TObject *Sender)
+{
+ if (!bmtree->Selected->getFirstChild()) {
+ Form1->DefaultVSKey = bmtree->Selected->Text.c_str();
+ Form1->TextKeyChanged();
+ }
+
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookmarksfrm::AddChild1Click(TObject *Sender)
+{
+ bmtree->Selected->Expand(false);
+ bmtree->Items->AddChildFirst(bmtree->Selected, "New Topic")->EditText();
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookmarksfrm::Delete1Click(TObject *Sender)
+{
+ if (bmtree->Selected->Data) {
+ if (strcmp((*(String*)(bmtree->Selected->Data)).c_str(),(bmdir + "personal.conf").c_str())) {
+ bmtree->Selected->Delete();
+ }
+ }
+ else bmtree->Selected->Delete();
+}
+//---------------------------------------------------------------------------
+void __fastcall TBookmarksfrm::Rename1Click(TObject *Sender)
+{
+ bmtree->Selected->EditText();
+}
+//---------------------------------------------------------------------------
+
+void TBookmarksfrm::SaveBookmarks()
+{
+ TTreeNode *tree = 0;
+ SWConfig *bmconf;
+ ConfigEntMap emap;
+ SectionMap::iterator sit;
+ char buf[15];
+ bool personal, other;
+ list <String *>::iterator it;
+ string persfile;
+
+ if (bmtree->Items->Count)
+ tree = bmtree->Items->Item[0];
+
+ if ((sit = Form1->optionsconf->Sections.find("Bookmarks")) != Form1->optionsconf->Sections.end()) {
+ personal = (atoi((*sit).second["AutoSavePersonal"].c_str())) ? true:false;
+ other = (atoi((*sit).second["AutoSaveOther"].c_str())) ? true:false;
+ }
+
+ persfile = bmdir + "personal.conf";
+ for (it = bmfiles.begin(); it != bmfiles.end(); it++) { // delete all bookmark files before saving in case a top level was deleted
+ if (((!strcmp((*it)->c_str(), persfile.c_str())) && personal) || ((strcmp((*it)->c_str(), persfile.c_str())) && other))
+ unlink((*it)->c_str());
+ }
+
+ for (;tree;tree = tree->getNextSibling()) {
+ if (((*((String *)tree->Data) == persfile.c_str()) && personal) || ((*((String *)tree->Data) != persfile.c_str()) && other)) {
+ bmconf = new SWConfig(((String *)tree->Data)->c_str());
+ emap = bmconf->Sections["ROOT"];
+ sprintf(buf, "branch%d", tree->AbsoluteIndex);
+ emap[buf] = tree->Text.c_str();
+ AddSectionToConf(bmconf, buf, tree);
+ bmconf->Sections["ROOT"] = emap;
+ bmconf->Save();
+ }
+ }
+}
+
+
+void TBookmarksfrm::AddSectionToConf(SWConfig *config, String section, TTreeNode *tree)
+{
+ ConfigEntMap sit;
+ char buf[15];
+
+ if (tree = tree->getFirstChild()) {
+ sit = config->Sections[section.c_str()];
+ for (; tree; tree = tree->getNextSibling()) {
+ sprintf(buf, "branch%d", tree->AbsoluteIndex);
+ sit[buf] = tree->Text.c_str();
+ AddSectionToConf(config, buf, tree);
+ }
+ config->Sections[section.c_str()] = sit;
+ }
+}
+
+void __fastcall TBookmarksfrm::NewBookmarkFile1Click(TObject *Sender)
+{
+ if (NewBMfrm->ShowModal() == mrOk) {
+ bmtree->Items->AddObject(bmtree->Items->Item[0], NewBMfrm->bmtitle->Text, *bmfiles.insert(bmfiles.begin(), new String(String(bmdir.c_str()) + NewBMfrm->bmfile->Text + String(".conf"))));
+ }
+}
+//--------------------------------------------------------------------------- \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/bookmarkfrm.dfm b/apps/windoze/CBuilder4/prototype/bookmarkfrm.dfm
new file mode 100644
index 0000000..45152a3
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/bookmarkfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/bookmarkfrm.h b/apps/windoze/CBuilder4/prototype/bookmarkfrm.h
new file mode 100644
index 0000000..4c37796
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/bookmarkfrm.h
@@ -0,0 +1,48 @@
+//---------------------------------------------------------------------------
+#ifndef bookmarkfrmH
+#define bookmarkfrmH
+//---------------------------------------------------------------------------
+#include <vcl\Classes.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Forms.hpp>
+#include <vcl\ComCtrls.hpp>
+#include <swconfig.h>
+#include <vcl\Menus.hpp>
+#include <list>
+//---------------------------------------------------------------------------
+class TBookmarksfrm : public TForm
+{
+__published: // IDE-managed Components
+ TTreeView *bmtree;
+ TPopupMenu *BMPopup;
+ TMenuItem *Delete1;
+ TMenuItem *AddChild1;
+ TMenuItem *Rename1;
+ TMenuItem *N1;
+ TMenuItem *NewBookmarkFile1;
+ void __fastcall bmtreeDragDrop(TObject *Sender, TObject *Source, int X, int Y);
+ void __fastcall bmtreeDragOver(TObject *Sender, TObject *Source, int X, int Y,
+ TDragState State, bool &Accept);
+ void __fastcall bmtreeDblClick(TObject *Sender);
+ void __fastcall AddChild1Click(TObject *Sender);
+ void __fastcall Delete1Click(TObject *Sender);
+ void __fastcall Rename1Click(TObject *Sender);
+ void __fastcall NewBookmarkFile1Click(TObject *Sender);
+private: // User declarations
+ void AddSection(SWConfig *config, TTreeView *tree, TTreeNode *parent, String section);
+ list <String *> bmfiles; // so we can delete each display we create
+
+
+public: // User declarations
+ string bmdir;
+ __fastcall TBookmarksfrm(TComponent* Owner);
+ __fastcall ~TBookmarksfrm();
+ void SaveBookmarks();
+ void AddSectionToConf(SWConfig *config, String section, TTreeNode *tree);
+};
+//---------------------------------------------------------------------------
+extern TBookmarksfrm *Bookmarksfrm;
+//---------------------------------------------------------------------------
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/bookmarks/personal.conf b/apps/windoze/CBuilder4/prototype/bookmarks/personal.conf
new file mode 100644
index 0000000..e5317f6
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/bookmarks/personal.conf
@@ -0,0 +1,4 @@
+
+[ROOT]
+branch0=Personal Bookmarks
+
diff --git a/apps/windoze/CBuilder4/prototype/desktop.bmp b/apps/windoze/CBuilder4/prototype/desktop.bmp
new file mode 100644
index 0000000..5692668
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/desktop.bmp
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/desktop2.bmp b/apps/windoze/CBuilder4/prototype/desktop2.bmp
new file mode 100644
index 0000000..fa1bf08
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/desktop2.bmp
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/editentryfrm.cpp b/apps/windoze/CBuilder4/prototype/editentryfrm.cpp
new file mode 100644
index 0000000..e9404f8
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/editentryfrm.cpp
@@ -0,0 +1,332 @@
+#include <vcl.h>
+#pragma hdrstop
+#include <windows.hpp>
+#include <stdlib.h>
+#include <stdio.h>
+#include "editentryfrm.h"
+#include <swdisprtf.h>
+
+const float RulerAdj = 4.0/3.0;
+const int GutterWid = 6;
+//----------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TEditEntry *EditEntry;
+//----------------------------------------------------------------------------
+__fastcall TEditEntry::TEditEntry(TComponent *Owner)
+ : TForm(Owner)
+{
+ ResultBuf = 0;
+}
+
+
+__fastcall TEditEntry::~TEditEntry()
+{
+ if (ResultBuf)
+ delete [] ResultBuf;
+}
+
+
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::SelectionChange(TObject */*Sender*/)
+{
+ char sizebuf[6];
+
+ try {
+ FUpdating = True;
+ FirstInd->Left = int(RichEdit1->Paragraph->FirstIndent*RulerAdj)-
+ 4+GutterWid;
+ LeftInd->Left = int((RichEdit1->Paragraph->LeftIndent+
+ RichEdit1->Paragraph->FirstIndent)*RulerAdj)-
+ 4+GutterWid;
+ RightInd->Left = Ruler->ClientWidth-6-int(
+ (RichEdit1->Paragraph->RightIndent+GutterWid)*RulerAdj);
+
+ BoldButton->Down = RichEdit1->SelAttributes->Style.Contains(fsBold);
+ ItalicButton->Down = RichEdit1->SelAttributes->Style.Contains(fsItalic);
+ UnderlineButton->Down = RichEdit1->SelAttributes->Style.Contains(fsUnderline);
+
+ BulletsButton->Down = bool(RichEdit1->Paragraph->Numbering);
+
+ FontSize->Text = itoa(RichEdit1->SelAttributes->Size, sizebuf, 10);
+
+ switch((int)RichEdit1->Paragraph->Alignment)
+ { case 0: LeftAlign->Down = True; break;
+ case 1: RightAlign->Down = True; break;
+ case 2: CenterAlign->Down = True; break;
+ }
+ }
+ catch (...) {
+ FUpdating = False;
+ }
+ FUpdating = False;
+}
+//----------------------------------------------------------------------------
+TTextAttributes *__fastcall TEditEntry::CurrText(void)
+{
+ return RichEdit1->SelAttributes;
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::CheckFileSave(void)
+{
+ if ( RichEdit1->Modified ) {
+ switch(MessageBox(Handle, "Save Changes?","Modify Comment",MB_YESNOCANCEL | MB_ICONQUESTION)) {
+ case ID_YES : ExtractRTF(); break;
+ case ID_CANCEL : Abort(); break;
+ default:
+ if (ResultBuf)
+ delete [] ResultBuf;
+ ResultBuf = 0;
+ break;
+ };
+ }
+}
+
+
+void __fastcall TEditEntry::SetupRuler(void)
+{ int iCtr = 1;
+ char sTmp[201];
+ while (iCtr < 200) {
+ sTmp[iCtr] = 9;
+ iCtr++;
+ sTmp[iCtr] = '|';
+ iCtr++;
+ }
+ Ruler->Caption = (AnsiString)sTmp;
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::SetEditRect(void)
+{ TRect Rct = Rect(GutterWid, 0, RichEdit1->ClientWidth-GutterWid,
+ ClientHeight);
+ SendMessage(RichEdit1->Handle, EM_SETRECT, 0, long(&Rct));
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::FormCreate(TObject* /*Sender*/)
+{ Application->OnHint = &ShowHint;
+ SetupRuler();
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::ShowHint(TObject* /*Sender*/)
+{ StatusBar->SimpleText = Application->Hint;
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::EditUndoClick(TObject* /*Sender*/)
+{ if ( RichEdit1->HandleAllocated() )
+ SendMessage(RichEdit1->Handle, EM_UNDO, 0, 0);
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::EditCutClick(TObject* /*Sender*/)
+{ RichEdit1->CutToClipboard();
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::EditCopyClick(TObject* /*Sender*/)
+{ RichEdit1->CopyToClipboard();
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::EditPasteClick(TObject* /*Sender*/)
+{ RichEdit1->PasteFromClipboard();
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::RulerResize(TObject* /*Sender*/)
+{ RulerLine->Width = (int)Ruler->ClientWidth - (RulerLine->Left*2);
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::FormResize(TObject* Sender)
+{ SetEditRect();
+ SelectionChange(Sender);
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::FormPaint(TObject* /*Sender*/)
+{ SetEditRect();
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::BoldButtonClick(TObject* /*Sender*/)
+{ if ( !FUpdating )
+ { if ( BoldButton->Down )
+ CurrText()->Style = CurrText()->Style << fsBold;
+ else
+ CurrText()->Style = CurrText()->Style >> fsBold;
+ }
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::ItalicButtonClick(TObject* /*Sender*/)
+{ if ( !FUpdating )
+ {
+ if ( ItalicButton->Down )
+ CurrText()->Style = CurrText()->Style << fsItalic;
+ else
+ CurrText()->Style = CurrText()->Style >> fsItalic;
+ }
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::UnderlineButtonClick(TObject* /*Sender*/)
+{
+ if ( !FUpdating ) {
+ if ( UnderlineButton->Down )
+ CurrText()->Style = CurrText()->Style << fsUnderline;
+ else CurrText()->Style = CurrText()->Style >> fsUnderline;
+ }
+}
+
+
+void __fastcall TEditEntry::FontSizeChange(TObject* /*Sender*/)
+{
+ int fontsize = atoi(FontSize->Text.c_str());
+
+ if ((!FUpdating) && (fontsize)) {
+ if (fontsize < 1) {
+ ShowMessage("Please Enter a Number betweek 1 and 1638");
+ FontSize->Text = 1;
+ }
+ else if (fontsize > 1638) {
+ ShowMessage("Please Enter a Number betweek 1 and 1638");
+ FontSize->Text = 1638;
+ }
+ CurrText()->Size = atoi(FontSize->Text.c_str());
+ }
+}
+
+
+void __fastcall TEditEntry::AlignClick(TObject* Sender)
+{
+ if ( !FUpdating ) {
+ TControl *oAliBtn = (TControl*)(Sender);
+ RichEdit1->Paragraph->Alignment = (TAlignment)oAliBtn->Tag;
+ }
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::BulletsButtonClick(TObject* /*Sender*/)
+{ if ( !FUpdating )
+ RichEdit1->Paragraph->Numbering = (TNumberingStyle)BulletsButton->Down;
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::FormCloseQuery(TObject* /*Sender*/,
+ bool & CanClose)
+{ try {
+ CheckFileSave();
+ }
+ catch (...) {
+ CanClose = False;
+ }
+}
+//----------------------------------------------------------------------------
+
+//***************************
+//***Ruler Indent Dragging***
+//***************************
+
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::RulerItemMouseDown(TObject * Sender,
+ TMouseButton Button, TShiftState Shift, int X, int Y)
+{ TLabel * oTmpLabel = (TLabel *)Sender;
+ FDragOfs = oTmpLabel->Width / 2;
+ oTmpLabel->Left = oTmpLabel->Left+X-FDragOfs;
+ FDragging = True;
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::RulerItemMouseMove(TObject *Sender, TShiftState Shift, int X, int /*Y*/) {
+ if (FDragging) {
+ TLabel *oTmpLabel = (TLabel *)Sender;
+ oTmpLabel->Left = oTmpLabel->Left+X-FDragOfs;
+ oTmpLabel->Left -= oTmpLabel->Left % 10;
+ }
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::FirstIndMouseUp(TObject *Sender, TMouseButton
+ Button, TShiftState Shift, int X, int Y)
+{ FDragging = False;
+ RichEdit1->Paragraph->FirstIndent = int((FirstInd->Left+FDragOfs-GutterWid) / RulerAdj);
+ LeftIndMouseUp(Sender, Button, Shift, X, Y);
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::LeftIndMouseUp(TObject *Sender, TMouseButton
+ /*Button*/, TShiftState /*Shift*/, int /*X*/, int /*Y*/)
+{ FDragging = False;
+ RichEdit1->Paragraph->LeftIndent = int((LeftInd->Left+FDragOfs-GutterWid)/
+ RulerAdj)-RichEdit1->Paragraph->FirstIndent;
+ SelectionChange(Sender);
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::RightIndMouseUp(TObject *Sender, TMouseButton
+ /*Button*/, TShiftState /*Shift*/, int /*X*/, int /*Y*/)
+{ FDragging = False;
+ RichEdit1->Paragraph->RightIndent =
+ int((Ruler->ClientWidth-RightInd->Left+FDragOfs-2) /
+ RulerAdj)-2*GutterWid;
+ SelectionChange(Sender);
+}
+//----------------------------------------------------------------------------
+void __fastcall TEditEntry::FormActivate(TObject *Sender)
+{
+ System::AnsiString newtext, tmptext;
+
+ if (Module) {
+ TMemoryStream *RTFStream = new TMemoryStream();
+ newtext = RTFDisplay->RTFHeader;
+ Module->Error(); // clear error;
+ newtext = newtext + "\\pard \\nowidctlpar \\cf0 ";
+ (char *)*Module; // force key to snap to entry before pulling out the text of the key
+ tmptext = (char *)*Module;
+
+ newtext = newtext + RTFDisplay->RTFVersePre + " " + tmptext + RTFDisplay->RTFVersePost;
+ newtext = newtext + RTFDisplay->RTFTrailer;
+ RTFStream->Clear();
+ RTFStream->WriteBuffer(newtext.c_str(), newtext.Length());
+ RTFStream->Position = 0;
+ RichEdit1->Lines->LoadFromStream(RTFStream);
+ delete RTFStream;
+ }
+ SelectionChange(this);
+ RichEdit1->SetFocus();
+ if (ResultBuf)
+ delete [] ResultBuf;
+ ResultBuf = 0;
+}
+//---------------------------------------------------------------------
+
+void TEditEntry::ExtractRTF()
+{
+ System::AnsiString newtext, tmptext;
+ TMemoryStream *RTFStream = new TMemoryStream();
+ char *tmpbuf, *datastart;
+
+ RTFStream->Clear();
+ RichEdit1->Lines->SaveToStream(RTFStream);
+ RTFStream->Position = 0;
+ if (ResultBuf)
+ delete [] ResultBuf;
+ tmpbuf = new char [ RTFStream->Size + 1];
+ RTFStream->ReadBuffer(tmpbuf, RTFStream->Size);
+ tmpbuf[RTFStream->Size] = 0;
+ strtok(strstr(tmpbuf, "colortbl"), "}");
+ datastart = strtok(NULL, "");
+ ResultBuf = new char [ strlen(datastart) + 2 ];
+ ResultBuf[0] = '{';
+ strcpy(ResultBuf+1, datastart);
+ delete [] tmpbuf;
+ delete RTFStream;
+ //-------- Change all fonts to \f1
+ for (int i = 0; i < strlen(ResultBuf)-4; i++) {
+ if (ResultBuf[i] == '\\') {
+ if (ResultBuf[i+1] == '\\') { // skip a real '\' character
+ i += 1;
+ continue;
+ }
+ if (ResultBuf[i+1] == 'f') {
+ if (isdigit(ResultBuf[i+2])) {
+ ResultBuf[i+2] = '1';
+ if (isdigit(ResultBuf[i+3])) {
+ memmove(&ResultBuf[i+3], &ResultBuf[i+4], strlen(&ResultBuf[i+3]));
+ }
+ }
+ }
+ }
+ }
+}
+
+
+__fastcall TCharsetObject::TCharsetObject(int FCharset)
+ : TObject()
+{
+ Charset = FCharset;
+}
+//---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/editentryfrm.dfm b/apps/windoze/CBuilder4/prototype/editentryfrm.dfm
new file mode 100644
index 0000000..3b40fc4
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/editentryfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/editentryfrm.h b/apps/windoze/CBuilder4/prototype/editentryfrm.h
new file mode 100644
index 0000000..058c385
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/editentryfrm.h
@@ -0,0 +1,108 @@
+//----------------------------------------------------------------------------
+//Borland C++Builder
+//Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+#ifndef editentryfrmH
+#define editentryfrmH
+//----------------------------------------------------------------------------
+#include <Outline.hpp>
+#include <Grids.hpp>
+#include <Buttons.hpp>
+#include <ExtCtrls.hpp>
+#include <StdCtrls.hpp>
+#include <ComCtrls.hpp>
+#include <Menus.hpp>
+#include <Dialogs.hpp>
+#include <Forms.hpp>
+#include <Controls.hpp>
+#include <Graphics.hpp>
+#include <Classes.hpp>
+#include <SysUtils.hpp>
+#include <Messages.hpp>
+#include <Windows.hpp>
+#include <System.hpp>
+#include <swmodule.h>
+#include <swdisprtf.h>
+//----------------------------------------------------------------------------
+class TEditEntry : public TForm
+{
+__published:
+ TPanel *SpeedBar;
+ TSpeedButton *UndoButton;
+ TSpeedButton *CutButton;
+ TSpeedButton *CopyButton;
+ TSpeedButton *PasteButton;
+ TBevel *Bevel1;
+ TSpeedButton *BoldButton;
+ TSpeedButton *ItalicButton;
+ TSpeedButton *LeftAlign;
+ TSpeedButton *CenterAlign;
+ TSpeedButton *RightAlign;
+ TSpeedButton *UnderlineButton;
+ TSpeedButton *BulletsButton;
+ TEdit *FontSize;
+ TUpDown *UpDown1;
+ TPanel *Ruler;
+ TLabel *FirstInd;
+ TLabel *LeftInd;
+ TBevel *RulerLine;
+ TLabel *RightInd;
+ TStatusBar *StatusBar;
+ TRichEdit *RichEdit1;
+ TLabel *Label1;
+ void __fastcall SelectionChange(TObject *Sender);
+ void __fastcall AlignClick(TObject *Sender);
+ void __fastcall EditUndoClick(TObject *Sender);
+ void __fastcall EditCutClick(TObject *Sender);
+ void __fastcall EditCopyClick(TObject *Sender);
+ void __fastcall EditPasteClick(TObject *Sender);
+ void __fastcall RulerResize(TObject *Sender);
+ void __fastcall FormCreate(TObject *Sender);
+ void __fastcall FormResize(TObject *Sender);
+ void __fastcall FormPaint(TObject *Sender);
+ void __fastcall BoldButtonClick(TObject *Sender);
+ void __fastcall FontSizeChange(TObject *Sender);
+ void __fastcall UnderlineButtonClick(TObject *Sender);
+ void __fastcall ItalicButtonClick(TObject *Sender);
+ void __fastcall BulletsButtonClick(TObject *Sender);
+ void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
+ void __fastcall RulerItemMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void __fastcall RulerItemMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
+ void __fastcall FirstIndMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void __fastcall LeftIndMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void __fastcall RightIndMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void __fastcall FormActivate(TObject *Sender);
+
+private:
+ AnsiString FFileName;
+ bool FUpdating;
+ int FDragOfs;
+ bool FDragging;
+ TTextAttributes *__fastcall CurrText(void);
+ void __fastcall CheckFileSave(void);
+ void __fastcall SetupRuler(void);
+ void __fastcall SetEditRect(void);
+ void __fastcall ShowHint(TObject *Sender);
+
+public:
+ SWModule *Module;
+ SWDispRTF *RTFDisplay;
+
+ virtual __fastcall TEditEntry(TComponent *Owner);
+ __fastcall ~TEditEntry();
+ char *ResultBuf;
+ void ExtractRTF();
+};
+//----------------------------------------------------------------------------
+class TCharsetObject : public TObject
+{
+public:
+ int Charset;
+ __fastcall TCharsetObject(int FCharset);
+};
+//----------------------------------------------------------------------------
+extern TEditEntry *EditEntry;
+//----------------------------------------------------------------------------
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/mainfrm.cpp b/apps/windoze/CBuilder4/prototype/mainfrm.cpp
new file mode 100644
index 0000000..bb89b40
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/mainfrm.cpp
@@ -0,0 +1,824 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#include <vcl/clipbrd.hpp>
+#pragma hdrstop
+
+#include "mainfrm.h"
+#include "swdisprtfchap.h"
+#include "searchfrm.h"
+#include "swwinlog.h"
+#include "AboutBoxfrm.h"
+#include "ModInstForm.h"
+#include "biblecsmgr.h"
+#include "Greek2Greek.h"
+#include "bookmarkfrm.h"
+#include "optionfrm.h"
+#include "vrslstfrm.h"
+#include <utilstr.h>
+#include <filemgr.h>
+#include "editentryfrm.h"
+#include "versesel.h"
+#include "ModTabPanel.h"
+
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TForm1 *Form1;
+//---------------------------------------------------------------------------
+
+
+__fastcall TForm1::TForm1(TComponent* Owner)
+ : TForm(Owner)
+{
+ optionsconf = new SWConfig("./options.conf");
+
+ Lookup->Text = "[ SWORD DDE Lookup ]";
+ Search->Text = "[ SWORD DDE Search ]";
+ Application->OnHint = DisplayHint;
+}
+
+void __fastcall TForm1::DisplayHint(TObject* Sender)
+{
+ StatusBar1->SimpleText = Application->Hint;
+}
+
+//---------------------------------------------------------------------------
+__fastcall TForm1::~TForm1()
+{
+ list <SWDisplay *>::iterator it;
+ int loop;
+
+ if (mainmgr)
+ delete mainmgr;
+ for (it = displays.begin(); it != displays.end(); it++)
+ delete *it;
+ if (layoutconf)
+ delete layoutconf;
+
+ if (optionsconf)
+ delete optionsconf;
+
+// for (loop = 0; loop < 10; loop++) {
+// if (ctrlstates[loop]);
+// delete ctrlstates[loop];
+// }
+}
+//---------------------------------------------------------------------------
+void TForm1::BuildRTFHeader(char *buf, char *font, int max)
+{
+ char buf1[1024], buf2[1024];
+ SectionMap::iterator sit;
+
+ sprintf(buf1, "{\\rtf1\\ansi");
+ if (font)
+ sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 %s;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f2\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f3\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}", font);
+ else sprintf(buf2, "{\\fonttbl{\\f0\\fdecor\\fprq2 Times New Roman;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}");
+ strcat(buf1, buf2);
+
+ if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+ sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red%d\\green%d\\blue%d;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}",
+ atoi((*sit).second["CurrentVSColorRed"].c_str()),
+ atoi((*sit).second["CurrentVSColorGreen"].c_str()),
+ atoi((*sit).second["CurrentVSColorBlue"].c_str()));
+ }
+ else sprintf(buf2, "{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;}");
+ strcat(buf1, buf2);
+ memset(buf, 0, max);
+ strncpy(buf, buf1, max);
+}
+
+char TForm1::CreateTextPane(SWModule *mod, char *font) {
+ TTabSheet *newtab = new TTabSheet(this);
+ SWDispRTFChap *newrtf = new SWDispRTFChap(this);
+ TTextPanel *panel = new TTextPanel(this, mod, font);
+ char buf[512];
+ SectionMap::iterator sit;
+
+ newtab->Caption = mod->Name();
+ newtab->Hint = mod->Description();
+// newtab->PageControl = PageControl1;
+ panel->Parent = newtab;
+/*
+ newrtf->Align = alClient;
+ newrtf->ScrollBars = ssVertical;
+ newrtf->ReadOnly = true;
+ newrtf->PopupMenu = (strcmp(mod->Name(), "N27U4")) ? PopupMenu2 : PopupMenu1;
+ newrtf->OnMouseDown = RTFMouseDown;
+
+ BuildRTFHeader(buf, font, 512);
+ newrtf->RTFHeader = buf;
+
+ if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+ newrtf->MarkCurrentVerse = (atoi((*sit).second["AutoVSColor"].c_str())) ? true:false;
+ }
+
+ mod->Disp(*displays.insert(displays.begin(), new RTFDisp(newrtf)));
+ mod->SetKey(DefaultVSKey);
+*/
+ return 0;
+}
+//---------------------------------------------------------------------------
+char TForm1::CreateCommentPane(SWModule *mod) {
+ TTabSheet *newtab = new TTabSheet(this);
+ TWinControl *newrtf;
+
+ if (mainmgr->config->Sections[mod->Name()]["ModDrv"] == "HREFCom") {
+// if (mainmgr->config->Sections[mod->Name()]["External"] == "1") {
+ newrtf = new TPanel(this);
+ ((TPanel *)newrtf)->Caption = "Syncronizing to External Viewer";
+ mod->Disp(*displays.insert(displays.begin(), new DispExternal()));
+/*
+ }
+ else {
+ // newrtf = new THTML(this->Handle);
+ // newrtf = new SWDispRTF(this);
+ newrtf = HTML1;
+ newrtf->Visible = true;
+ mod->Disp(*displays.insert(displays.begin(), new HREFDisp((THTML *)newrtf)));
+ // mod->Disp(*displays.insert(displays.begin(), new RTFDisp((SWDispRTF *)newrtf)));
+ }
+*/
+ }
+ else {
+ newrtf = new SWDispRTF(this);
+ mod->Disp(*displays.insert(displays.begin(), new RTFDisp((SWDispRTF *)newrtf)));
+ ((SWDispRTF *)newrtf)->ScrollBars = ssVertical;
+ ((SWDispRTF *)newrtf)->ReadOnly = true;
+ if (mainmgr->config->Sections[mod->Name()]["ModDrv"] == "RawFiles") {
+ ((SWDispRTF *)newrtf)->PopupMenu = PopupMenu3;
+ ((SWDispRTF *)newrtf)->ExpandNewLine = false;
+ }
+ else ((SWDispRTF *)newrtf)->PopupMenu = PopupMenu2;
+ ((SWDispRTF *)newrtf)->OnMouseDown = RTFMouseDown;
+ }
+
+ newtab->Caption = mod->Name();
+ newtab->Hint = mod->Description();
+ newtab->PageControl = PageControl2;
+ newrtf->Parent = newtab;
+ newrtf->Align = alClient;
+
+ mod->SetKey(DefaultVSKey);
+ return 0;
+}
+//---------------------------------------------------------------------------
+char TForm1::CreateLDPane(SWModule *mod) {
+ TTabSheet *newtab = new TTabSheet(this);
+ SWDispRTF *newrtf = new SWDispRTF(this);
+
+ newtab->Caption = mod->Name();
+ newtab->Hint = mod->Description();
+ newtab->PageControl = PageControl3;
+ newrtf->Parent = newtab;
+ newrtf->Align = alClient;
+ newrtf->ScrollBars = ssVertical;
+ newrtf->ReadOnly = true;
+ newrtf->PopupMenu = PopupMenu2;
+ newrtf->OnMouseDown = RTFMouseDown;
+
+ mod->Disp(*displays.insert(displays.begin(), new RTFDisp(newrtf)));
+ mod->SetKey(DefaultStrKey);
+ return 0;
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TForm1::PageControl1Change(TObject *Sender)
+{
+// RefreshActiveSheet(PageControl1);
+// Form1->ActiveControl = PageControl1;
+}
+//---------------------------------------------------------------------------
+void TForm1::RefreshActiveSheet(TPageControl *pc)
+{
+ ModMap::iterator it;
+
+ it = mainmgr->Modules.find(pc->ActivePage->Caption.c_str());
+ if (it != mainmgr->Modules.end()) {
+ (*it).second->Display();
+ if (logmodstate)
+ modstates.insert(modstates.begin(), new ModState(pc, pc->ActivePage, (*it).second->KeyText()));
+ }
+}
+
+
+void TForm1::TextKeyChanged()
+{
+ cbBook->ItemIndex = cbBook->Items->IndexOf(DefaultVSKey.books[DefaultVSKey.Testament()-1][DefaultVSKey.Book()-1].name);
+ CHBox->Text = DefaultVSKey.Chapter();
+ VSBox->Text = DefaultVSKey.Verse();
+ freeHandLookup->Text = (const char *)DefaultVSKey;
+ textTabs->RefreshActiveSheet();
+ logmodstate = false; // only log state once
+ RefreshActiveSheet(PageControl2);
+ logmodstate = true;
+}
+
+
+void __fastcall TForm1::btnLookupClick(TObject *Sender)
+{
+ if (!(StrToInt(CHBox->Text)) || (!StrToInt(VSBox->Text)))
+ DefaultVSKey.AutoNormalize(0);
+
+ if (StrToInt(CHBox->Text) < 0)
+ CHBox->Text = StrToInt(CHBox->Text) + 1;
+ if (StrToInt(VSBox->Text) < 0)
+ VSBox->Text = StrToInt(VSBox->Text) + 1;
+
+ DefaultVSKey = (cbBook->Text + " " + CHBox->Text + ":" + VSBox->Text).c_str();
+ TextKeyChanged();
+ DefaultVSKey.AutoNormalize(1);
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::PageControl2Change(TObject *Sender)
+{
+ RefreshActiveSheet(PageControl2);
+ Form1->ActiveControl = PageControl2;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::DictKeyEditChange(TObject *Sender)
+{
+ if (DictKeyEdit->Modified) {
+ DefaultStrKey = DictKeyEdit->Text.c_str();
+ RefreshActiveSheet(PageControl3);
+ DictKeyEdit->Modified = false;
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::PageControl3Change(TObject *Sender)
+{
+ RefreshActiveSheet(PageControl3);
+ Form1->ActiveControl = PageControl3;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::NewSearchWindow1Click(TObject *Sender)
+{
+ Form2->Show();
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Exit1Click(TObject *Sender)
+{
+ Close();
+}
+
+void __fastcall TForm1::About1Click(TObject *Sender)
+{
+ AboutBox->ShowModal();
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+ DictKeyEdit->Text = Trim(rtf->SelText);
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::SaveLayout1Click(TObject *Sender)
+{
+ ConfigEntMap sit;
+
+ sit = layoutconf->Sections["Screen"];
+ sit["MainTop"] = IntToStr(Form1->Top).c_str();
+ sit["MainLeft"] = IntToStr(Form1->Left).c_str();
+ sit["MainHeight"] = IntToStr(Form1->Height).c_str();
+ sit["MainWidth"] = IntToStr(Form1->Width).c_str();
+ sit["TextComHeight"] = IntToStr(pnlTextCom->Height).c_str();
+ sit["TextWidth"] = IntToStr(pnlText->Width).c_str();
+ layoutconf->Sections["Screen"] = sit;
+ layoutconf->Save();
+}
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+void __fastcall TForm1::FormCreate(TObject *Sender)
+{
+ ModMap::iterator it;
+ SectionMap::iterator sit;
+ ConfigEntMap::iterator eit;
+ AnsiString s1;
+ char *font;
+ int val;
+ int loop;
+ int maxFiles;
+
+ mainmgr = new BibleCSMGR(ModInstFrm);
+// textTabs = new TModTabPanel(this, mainmgr, "Biblical Texts");
+// textTabs->Align = alClient;
+// textTabs->Parent = pnlText;
+// logmodstate = true;
+// freshdict = true;
+// if ((maxFiles = atoi(optionsconf->Sections["System"]["MaxFiles"].c_str()))) {
+// FileMgr::systemFileMgr.maxFiles = maxFiles;
+// }
+
+// DefaultVSKey = TOP;
+// DefaultVSKey = "Genesis 1:1";
+// cbBook->Clear();
+/*
+ while (!DefaultVSKey.Error()) {
+ s1 = (const char *)DefaultVSKey;
+ s1.SetLength(s1.Length() - 4);
+ cbBook->Items->Add(s1);
+ DefaultVSKey.Book(DefaultVSKey.Book() + 1);
+ }
+ cbBook->ItemIndex = cbBook->Items->IndexOf("James");
+
+ DefaultVSKey.Persist(1); // when set to a module, make the module hold on to this actual key and not a copy
+ DefaultVSKey = "James 1:19"; // set to our standard starting verse
+ DefaultStrKey.Persist(1);
+ DefaultStrKey = "";
+ Hint = "";
+ ShowHint = true;
+ Application->ShowHint = true;
+ if (SWLog::systemlog)
+ delete SWLog::systemlog;
+ SWLog::systemlog = new SWWinLog(this->Handle); // set the system logger to our MSWindows specific SWLog class
+ layoutconf = new SWConfig("./layout.conf");
+
+ if ((sit = layoutconf->Sections.find("Screen")) != layoutconf->Sections.end()) {
+ if (val = atoi((*sit).second["MainTop"].c_str()))
+ Form1->Top = val;
+ if (val = atoi((*sit).second["MainLeft"].c_str()))
+ Form1->Left = val;
+ if (val = atoi((*sit).second["MainHeight"].c_str()))
+ Form1->Height = val;
+ if (val = atoi((*sit).second["MainWidth"].c_str()))
+ Form1->Width = val;
+ if (val = atoi((*sit).second["TextComHeight"].c_str()))
+ pnlTextCom->Height = val;
+ if (val = atoi((*sit).second["TextWidth"].c_str()))
+ pnlText->Width = val;
+ }
+
+ for (loop = 0; loop < 10; loop++)
+ ctrlstates.insert(ctrlstates.begin(), 0);
+
+ ImageList1->Add(BackBtnImage->Picture->Bitmap, NULL);
+ ImageList1->Add(SearchBtnImage->Picture->Bitmap, NULL);
+ ImageList2->Add(BookmarkBtnImage->Picture->Bitmap, NULL);
+*/
+}
+
+
+//void __fastcall TForm1::CreateWnd() {
+// TForm::CreateWnd();
+
+/*
+ for (it = mainmgr->Modules.begin(); it != mainmgr->Modules.end(); it++) {
+ if (!strcmp((*it).second->Type(), "Biblical Texts")) {
+ font = 0;
+ if ((sit = mainmgr->config->Sections.find((*it).second->Name())) != mainmgr->config->Sections.end()) {
+ if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) {
+ font = (char *)(*eit).second.c_str();
+ }
+ }
+ CreateTextPane((*it).second, font);
+ }
+ if (!strcmp((*it).second->Type(), "Commentaries"))
+ CreateCommentPane((*it).second);
+ if (!strcmp((*it).second->Type(), "Lexicons / Dictionaries"))
+ CreateLDPane((*it).second);
+ }
+*/
+//}
+
+//---------------------------------------------------------------------------
+void __fastcall TForm1::LookupPokeData(TObject *Sender)
+{
+ char buf[255];
+ char *token;
+ ModMap::iterator it;
+
+ strncpy(buf, Lookup->Text.c_str(), 254);
+ buf[254] = 0;
+ token = strtok(buf, " ");
+ if ((it = mainmgr->Modules.find(token)) != mainmgr->Modules.end()) {
+ token = strtok(NULL, "");
+ (*it).second->SetKey(token);
+ Lookup->Text = (const char *)(*(*it).second);
+ }
+ else Lookup->Text = "";
+
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::SearchPokeData(TObject *Sender)
+{
+ char buf[255];
+ char *token;
+ ModMap::iterator it;
+ AnsiString retval = "";
+
+ strncpy(buf, Search->Text.c_str(), 254);
+ buf[254] = 0;
+ token = strtok(buf, " ");
+ if ((it = mainmgr->Modules.find(token)) != mainmgr->Modules.end()) {
+ token = strtok(NULL, "");
+ ListKey &results = (*it).second->Search(token, REG_ICASE);
+ while (!results.Error()) {
+ retval = retval + (const char *)results + "; ";
+ results++;
+ }
+ Search->Text = retval;
+ }
+ else Search->Text = "";
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::UpDown3Click(TObject *Sender, TUDBtnType Button)
+{
+ ModMap::iterator it;
+
+ it = mainmgr->Modules.find(PageControl3->ActivePage->Caption.c_str());
+ if (it != mainmgr->Modules.end()) {
+ if (Button == btNext)
+ (*((*it).second))++;
+ else (*((*it).second))--;
+ DictKeyEdit->Text = ((*it).second)->KeyText();
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::UpDown1Click(TObject *Sender, TUDBtnType Button)
+{
+ btnLookupClick(Sender);
+}
+//---------------------------------------------------------------------------
+
+void TForm1::RestoreState(ModState *state)
+{
+ if (state) {
+ state->pc->ActivePage = state->ap;
+// if ((state->pc == PageControl1) || (state->pc == PageControl2)) {
+// DefaultVSKey = state->key;
+// TextKeyChanged();
+// }
+ if (state->pc == PageControl3) {
+ DictKeyEdit->Text = (const char *)state->key;
+ }
+ if (state->pc->ActivePage->ControlCount)
+ Form1->ActiveControl = (TWinControl *)state->pc->ActivePage->Controls[0];
+ }
+}
+
+
+void __fastcall TForm1::BackbtnClick(TObject *Sender)
+{
+ list <ModState *>::iterator it;
+
+ logmodstate = false;
+ it = modstates.begin();
+ if (it != modstates.end()) {
+ it++;
+
+ if (it != modstates.end()) {
+ RestoreState(*it);
+ delete *modstates.begin();
+ modstates.erase(modstates.begin(), it);
+ }
+ }
+ logmodstate = true;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Button1Click(TObject *Sender)
+{
+/*
+ list <ModState *>::iterator it;
+ ListBox1->Clear();
+ for (it = modstates.begin(); it != modstates.end(); it++) {
+ ListBox1->Items->Add((*it)->ap->Caption.c_str());
+ }
+*/
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::CopyasBGreekTransliteration1Click(TObject *Sender)
+{
+ char *retbuf;
+ int len;
+ TClipboard *clip = new TClipboard();
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ len = rtf->SelText.Length() * 2;
+ retbuf = new char [ len ];
+ if (!Greek2bGreek(retbuf, rtf->SelText.c_str(), len)) {
+ clip->SetTextBuf(retbuf);
+ }
+ delete clip;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Copy1Click(TObject *Sender)
+{
+ int wordstart;
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (wordstart = rtf->SelStart; (wordstart > -1)&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart--);
+ rtf->SelStart = (wordstart > -1) ? wordstart: 0;
+ for (wordstart = rtf->SelStart + 1; (wordstart < rtf->Text.Length())&&(isdigit(rtf->Text[wordstart])||isalpha(rtf->Text[wordstart])); wordstart++);
+ rtf->SelLength = ((wordstart < rtf->Text.Length()) ? wordstart : rtf->Text.Length() - 1) - rtf->SelStart - 1;
+ }
+ rtf->CopyToClipboard();
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::BookmarkItemClick(TObject *Sender)
+{
+ TMenuItem *menuchoice = (TMenuItem *)Sender;
+ DefaultVSKey = menuchoice->Caption.c_str();
+ TextKeyChanged();
+}
+
+void __fastcall TForm1::AddBookmark1Click(TObject *Sender)
+{
+// TMenuItem *newitem;
+
+ Bookmarksfrm->bmtree->Items->AddChild(Bookmarksfrm->bmtree->Items->Item[0], (const char *)DefaultVSKey);
+}
+
+void TForm1::AddSectionToMenu(TMenu *menu, TMenuItem *item, TTreeNode *tree)
+{
+ TMenuItem *newitem;
+
+ for (tree = tree->getFirstChild(); tree; tree = tree->getNextSibling()) {
+ newitem = new TMenuItem(menu);
+ newitem->Caption = tree->Text;
+ if (!tree->getFirstChild())
+ newitem->OnClick = BookmarkItemClick;
+ item->Add(newitem);
+ AddSectionToMenu(menu, newitem, tree);
+ }
+}
+
+void TForm1::RefreshBookmarksMenu(TMenu *menu, TTreeView *treeview)
+{
+ TMenuItem *newitem;
+ TTreeNode *tree = 0;
+
+ if (treeview->Items->Count)
+ tree = treeview->Items->Item[0];
+
+ while (menu->Items->Count > 3)
+ menu->Items->Delete(3);
+
+ for (;tree;tree = tree->getNextSibling()) {
+ newitem = new TMenuItem(menu);
+ newitem->Caption = tree->Text;
+ menu->Items->Add(newitem);
+ AddSectionToMenu(menu, newitem, tree);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::BookmarkbtnClick(TObject *Sender)
+{
+ TPoint menup;
+ TPoint point;
+ point.x = 0;
+ point.y = Bookmarkbtn->Height;
+ menup = Bookmarkbtn->ClientToScreen(point);
+ RefreshBookmarksMenu(BookmarkPopup, Bookmarksfrm->bmtree);
+ BookmarkPopup->Popup(menup.x, menup.y);
+}
+//---------------------------------------------------------------------------
+
+
+void __fastcall TForm1::EditBookmarks1Click(TObject *Sender)
+{
+ Bookmarksfrm->Show();
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
+ TShiftState Shift)
+{
+ char buf[5];
+ int val;
+ ModMap::iterator it;
+ TPageControl *pc = textTabs->pageControl;
+
+ if ((Shift.Contains(ssCtrl)) && (!Shift.Contains(ssAlt))) {
+ if ((Key >= '0') && (Key <= '9')) {
+ sprintf(buf, "%c", Key);
+ val = atoi(buf);
+
+ if (!Shift.Contains(ssShift)) {
+ if ((Screen->ActiveControl == PageControl2) || (IsChild(PageControl2->Handle, Screen->ActiveControl->Handle)))
+ pc = PageControl2;
+ if ((Screen->ActiveControl == PageControl3) || (IsChild(PageControl3->Handle, Screen->ActiveControl->Handle)))
+ pc = PageControl3;
+
+ it = mainmgr->Modules.find(pc->ActivePage->Caption.c_str());
+ if (it != mainmgr->Modules.end()) {
+ if (ctrlstates[val])
+ delete ctrlstates[val];
+
+ ctrlstates[val] = new ModState(pc, pc->ActivePage, (*it).second->KeyText());
+ }
+ }
+ else RestoreState(ctrlstates[val]);
+ }
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Options1Click(TObject *Sender)
+{
+ ModMap::iterator it;
+ SectionMap::iterator sit;
+ ConfigEntMap emap;
+ int color;
+
+ if ((sit = optionsconf->Sections.find("Appearance")) != optionsconf->Sections.end()) {
+ Optionsfrm->CurrentVSColor->Brush->Color = atoi((*sit).second["CurrentVSColorRed"].c_str())
+ | (atoi((*sit).second["CurrentVSColorGreen"].c_str()) << 8)
+ | (atoi((*sit).second["CurrentVSColorBlue"].c_str()) << 16);
+ Optionsfrm->AutoVSColor->Checked = ((atoi((*sit).second["AutoVSColor"].c_str()))?true:false);
+ }
+
+ if ((sit = optionsconf->Sections.find("Bookmarks")) != optionsconf->Sections.end()) {
+ Optionsfrm->AutoBMPersonal->Checked = ((atoi((*sit).second["AutoSavePersonal"].c_str()))?true:false);
+ Optionsfrm->AutoBMOther->Checked = ((atoi((*sit).second["AutoSaveOther"].c_str()))?true:false);
+ }
+
+ if (Optionsfrm->ShowModal() == mrOk) {
+ emap = optionsconf->Sections["Appearance"];
+ color = Optionsfrm->CurrentVSColor->Brush->Color;
+ emap["CurrentVSColorRed"] = IntToStr(color & 0xFF).c_str();
+ emap["CurrentVSColorGreen"] = IntToStr((color >> 8) & 0xFF).c_str();
+ emap["CurrentVSColorBlue"] = IntToStr((color >> 16) & 0xFF).c_str();
+ emap["AutoVSColor"] = IntToStr((Optionsfrm->AutoVSColor->Checked)?1:0).c_str();
+ optionsconf->Sections["Appearance"] = emap;
+
+ emap = optionsconf->Sections["Bookmarks"];
+ emap["AutoSavePersonal"] = IntToStr((Optionsfrm->AutoBMPersonal->Checked)?1:0).c_str();
+ emap["AutoSaveOther"] = IntToStr((Optionsfrm->AutoBMOther->Checked)?1:0).c_str();
+ optionsconf->Sections["Bookmarks"] = emap;
+
+ optionsconf->Save();
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::cbBookChange(TObject *Sender)
+{
+ CHBox->Text = "1";
+ VSBox->Text = "1";
+ if (Screen->ActiveControl == cbBook)
+ btnLookupClick(Sender);
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::PopupMenuPopup(TObject *Sender)
+{
+
+ int versestart, verseend;
+ TMenuItem * newitem;
+ TPopupMenu *menu = (TPopupMenu *)Sender;
+ int staticMenuItemsCount = 0;
+
+ if (menu == PopupMenu1)
+ staticMenuItemsCount = 3;
+ else if (menu == PopupMenu2)
+ staticMenuItemsCount = 2;
+ else if (menu == PopupMenu3)
+ staticMenuItemsCount = 6;
+
+ while (menu->Items->Count > staticMenuItemsCount)
+ menu->Items->Delete(staticMenuItemsCount);
+
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ if (!rtf->SelLength) {
+ for (versestart = rtf->SelStart; ((versestart)&&(rtf->Text[versestart] != '#')); versestart--);
+ if (versestart) {
+ for (verseend = versestart; ((verseend < rtf->Text.Length())&&(rtf->Text[verseend] != '|')); verseend++);
+ if ((verseend < rtf->Text.Length()) && (verseend > rtf->SelStart)) {
+ int len = (verseend - versestart) + 1;
+ char *buf = new char [ len + 1 ];
+ memset(buf, 0 , len + 1);
+ strncpy(buf, &rtf->Text.c_str()[versestart], len - 2); // strip the # and | from the string
+ tmpVerseList = VerseKey::ParseVerseList(buf, DefaultVSKey);
+
+ 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;
+
+ tmpVerseListCaption = String("VerseList from- ") + (*target).first.c_str() + ": " + keytext;
+ delete [] keytext; // ---------------------------------
+ }
+ delete [] buf;
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "-";
+ menu->Items->Add(newitem);
+ newitem = new TMenuItem(menu);
+ newitem->Caption = "Create Verse List";
+ newitem->Hint = "Create a New Verse List Window";
+ newitem->Default = true;
+ newitem->OnClick = createVerseList;
+ menu->Items->Add(newitem);
+ versestart = 3;
+ while (!tmpVerseList.Error()) {
+ versestart++;
+ newitem = new TMenuItem(menu);
+ newitem->Caption = (const char *)tmpVerseList;
+ newitem->OnClick = BookmarkItemClick;
+ if (!(versestart%15))
+ newitem->Break = mbBreak;
+ menu->Items->Add(newitem);
+ tmpVerseList++;
+ }
+ }
+ }
+ }
+
+}
+//---------------------------------------------------------------------------
+
+
+void __fastcall TForm1::createVerseList(TObject *Sender)
+{
+ TVerseListFrm *tmpForm = new TVerseListFrm(this, tmpVerseList);
+ tmpForm->Caption = tmpVerseListCaption;
+ tmpForm->Show();
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TForm1::freeHandLookupKeyPress(TObject *Sender, char &Key)
+{
+ if (Key == '\r') {
+ ListKey tmpVerseList = VerseKey::ParseVerseList(freeHandLookup->Text.c_str(), DefaultVSKey);
+ if (tmpVerseList.Count() > 1) {
+ TVerseListFrm *tmpForm = new TVerseListFrm(this, tmpVerseList);
+ tmpForm->Caption = "User Verse List";
+ tmpForm->Show();
+ }
+ if (tmpVerseList.Count()) {
+ tmpVerseList = TOP;
+ DefaultVSKey = tmpVerseList;
+ TextKeyChanged();
+ }
+ }
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TForm1::RTFMouseDown(TObject *Sender, TMouseButton Button,
+ TShiftState Shift, int X, int Y)
+{
+ ((TWinControl *)Sender)->SetFocus();
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TForm1::EditEntry1Click(TObject *Sender)
+{
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ SWModule *module = 0;
+// EditEntry->RichEdit1->Text = rtf->Text;
+ ModMap::iterator target;
+ target = mainmgr->Modules.find(((TPageControl*)rtf->Parent->Parent)->ActivePage->Caption.c_str());
+ if (target != Form1->mainmgr->Modules.end()) {
+ EditEntry->Module = module = (*target).second;
+ EditEntry->RTFDisplay = rtf;
+ }
+ else EditEntry->Module = module = 0;
+ EditEntry->ShowModal();
+ if (EditEntry->ResultBuf) {
+ if (module)
+// DictKeyEdit->Text = EditEntry->ResultBuf; // for testing purposes
+ *module << EditEntry->ResultBuf;
+ }
+ RefreshActiveSheet(PageControl2);
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TForm1::DeleteEntry1Click(TObject *Sender)
+{
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ SWModule *module = 0;
+ ModMap::iterator target;
+
+ target = mainmgr->Modules.find(((TPageControl*)rtf->Parent->Parent)->ActivePage->Caption.c_str());
+ if (target != Form1->mainmgr->Modules.end()) {
+ module = (*target).second;
+ module->Delete();
+ }
+ RefreshActiveSheet(PageControl2);
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TForm1::LinktoVerse1Click(TObject *Sender)
+{
+ if (VerseSelFrm->ShowModal() == mrOk) {
+ SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
+ SWModule *module = 0;
+ ModMap::iterator target;
+ SWKey *linkkey = new VerseKey(VerseSelFrm->Panel2->Caption.c_str());
+
+ target = mainmgr->Modules.find(((TPageControl*)rtf->Parent->Parent)->ActivePage->Caption.c_str());
+ if (target != Form1->mainmgr->Modules.end()) {
+ module = (*target).second;
+ *module << linkkey;
+ }
+ RefreshActiveSheet(PageControl2);
+ }
+}
+//---------------------------------------------------------------------------
+
+
diff --git a/apps/windoze/CBuilder4/prototype/mainfrm.dfm b/apps/windoze/CBuilder4/prototype/mainfrm.dfm
new file mode 100644
index 0000000..2b4f1e8
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/mainfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/mainfrm.h b/apps/windoze/CBuilder4/prototype/mainfrm.h
new file mode 100644
index 0000000..b8e7433
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/mainfrm.h
@@ -0,0 +1,238 @@
+//---------------------------------------------------------------------------
+#ifndef mainfrmH
+#define mainfrmH
+//---------------------------------------------------------------------------
+#include <vcl\Classes.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Forms.hpp>
+#include <vcl\ExtCtrls.hpp>
+#include <vcl\ComCtrls.hpp>
+#include <swmgr.h>
+#include <swtext.h>
+#include <strkey.h>
+#include <regex.h>
+#include <listkey.h>
+#include "swdisprtfchap.h"
+#include <vcl\Buttons.hpp>
+#include <vcl\Menus.hpp>
+#include <vcl\DdeMan.hpp>
+//#include <NMHTML.hpp>
+#include <OleCtrls.hpp>
+#include <ToolWin.hpp>
+//#include <vcl\isp.hpp>
+#include <shellapi.h>
+#include <Graphics.hpp>
+#include <ImgList.hpp>
+#include <list>
+#include <vector>
+#include "TextPanel.h"
+#include "ModTabPanel.h"
+
+class RTFDisp : public SWDisplay {
+ SWDispRTF *edit;
+public:
+ RTFDisp(SWDispRTF *iedit) { edit = iedit; }
+ RTFDisp() {}
+ char Display(SWModule &imodule) {
+ edit->Display(imodule);
+ }
+};
+
+/*
+class HREFDisp : public SWDisplay {
+ THTML *edit;
+public:
+ HREFDisp(THTML *iedit) { edit = iedit; }
+ HREFDisp() {}
+ char Display(SWModule &imodule) {
+ edit->RequestDoc((char *)imodule);
+ }
+};
+*/
+
+class DispExternal : public SWDisplay {
+public:
+ DispExternal() {}
+ char Display(SWModule &imodule) {
+ SHELLEXECUTEINFO info;
+ info.cbSize = sizeof(SHELLEXECUTEINFO);
+ info.fMask = SEE_MASK_NOCLOSEPROCESS; //SEE_MASK_CLASSNAME;
+ info.hwnd = GetFocus();
+ info.lpVerb = "open";
+ info.lpFile = (char *)imodule;
+ info.lpParameters = NULL;
+ info.lpDirectory = NULL;
+ info.nShow = 0;
+// info.lpClass = ".html";
+ ShellExecuteEx(&info);
+// ShellExecute(edit->Handle, "open", (char *)imodule, NULL, NULL, SW_SHOWNORMAL);
+ }
+};
+
+
+class ModState {
+public:
+ ModState(TPageControl *ipc, TTabSheet *iap, SWKey ikey) { pc = ipc; ap = iap; key = ikey; }
+ ModState();
+ TPageControl *pc;
+ TTabSheet* ap;
+ SWKey key;
+};
+
+//---------------------------------------------------------------------------
+class TForm1 : public TForm
+{
+__published: // IDE-managed Components
+ TPanel *pnlTextCom;
+ TSplitter *Splitter2;
+ TPanel *pnlText;
+ TPanel *pnlComment;
+ TSplitter *Splitter1;
+ TPanel *pnlDict;
+ TPageControl *PageControl2;
+ TStatusBar *StatusBar1;
+ TPageControl *PageControl3;
+
+ TPanel *pnlDictHeader;
+ TLabel *Label1;
+ TRichEdit *DictKeyEdit;
+ 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;
+ TCoolBar *CoolBar1;
+ TImageList *ImageList1;
+ TImage *BackBtnImage;
+ TImage *SearchBtnImage;
+ TToolBar *ToolBar2;
+ TToolButton *ToolButton3;
+ TToolButton *ToolButton4;
+ TPanel *pnlSpeed;
+ TPanel *Panel1;
+ TComboBox *cbBook;
+ TEdit *CHBox;
+ TUpDown *UpDown1;
+ TEdit *VSBox;
+ TUpDown *UpDown2;
+ TSpeedButton *btnLookup;
+ TToolBar *ToolBar1;
+ TImageList *ImageList2;
+ TImage *BookmarkBtnImage;
+ TSpeedButton *Bookmarkbtn;
+ TEdit *freeHandLookup;
+ TPopupMenu *PopupMenu3;
+ TMenuItem *MenuItem2;
+ TMenuItem *MenuItem3;
+ TMenuItem *N3;
+ TMenuItem *EditEntry1;
+ TMenuItem *DeleteEntry1;
+ TMenuItem *LinktoVerse1;
+ TUpDown *UpDown3;
+ void __fastcall PageControl1Change(TObject *Sender);
+ void __fastcall btnLookupClick(TObject *Sender);
+ void __fastcall PageControl2Change(TObject *Sender);
+
+
+
+ void __fastcall DictKeyEditChange(TObject *Sender);
+ void __fastcall PageControl3Change(TObject *Sender);
+ void __fastcall NewSearchWindow1Click(TObject *Sender);
+
+ void __fastcall Exit1Click(TObject *Sender);
+ void __fastcall About1Click(TObject *Sender);
+ void __fastcall DictionaryLookup1Click(TObject *Sender);
+ void __fastcall SaveLayout1Click(TObject *Sender);
+
+ void __fastcall LookupPokeData(TObject *Sender);
+
+ void __fastcall SearchPokeData(TObject *Sender);
+ void __fastcall UpDown3Click(TObject *Sender, TUDBtnType Button);
+ void __fastcall UpDown1Click(TObject *Sender, TUDBtnType Button);
+
+
+ void __fastcall BackbtnClick(TObject *Sender);
+ void __fastcall Button1Click(TObject *Sender);
+ void __fastcall CopyasBGreekTransliteration1Click(TObject *Sender);
+ void __fastcall Copy1Click(TObject *Sender);
+
+
+
+ void __fastcall AddBookmark1Click(TObject *Sender);
+ void __fastcall BookmarkItemClick(TObject *Sender);
+ void __fastcall BookmarkbtnClick(TObject *Sender);
+ void __fastcall EditBookmarks1Click(TObject *Sender);
+
+ void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
+ void __fastcall Options1Click(TObject *Sender);
+ void __fastcall cbBookChange(TObject *Sender);
+
+ void __fastcall FormCreate(TObject *Sender);
+ void __fastcall DisplayHint(TObject* Sender) ;
+ void __fastcall PopupMenuPopup(TObject *Sender);
+ void __fastcall createVerseList(TObject *Sender);
+ void __fastcall freeHandLookupKeyPress(TObject *Sender, char &Key);
+ void __fastcall RTFMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
+ void __fastcall EditEntry1Click(TObject *Sender);
+ void __fastcall DeleteEntry1Click(TObject *Sender);
+ void __fastcall LinktoVerse1Click(TObject *Sender);
+
+private: // User declarations
+ list <SWDisplay *> displays; // so we can delete each display we create
+ list <ModState *> modstates;
+ vector <ModState *> ctrlstates;
+ bool logmodstate;
+ bool freshdict;
+
+ char CreateTextPane(SWModule *mod, char *font = 0);
+ char CreateCommentPane(SWModule *mod);
+ char CreateLDPane(SWModule *mod);
+ void PushState();
+ void BackState();
+ void ForwardState();
+ void BuildRTFHeader(char *buf, char *font, int max);
+ void AddSectionToMenu(TMenu *menu, TMenuItem *item, TTreeNode *tree);
+
+public: // User declarations
+ TModTabPanel *textTabs;
+ VerseKey DefaultVSKey;
+ SWKey DefaultStrKey;
+ SWMgr *mainmgr;
+ SWConfig *layoutconf;
+ SWConfig *optionsconf;
+ __fastcall TForm1(TComponent* Owner);
+ __fastcall ~TForm1();
+// virtual void __fastcall CreateWnd();
+ void RefreshActiveSheet(TPageControl *ts);
+ void TextKeyChanged(); // updates dependents on TextKeyChanged
+ void RefreshBookmarksMenu(TMenu *menu, TTreeView *tree);
+ void RestoreState(ModState *state);
+ ListKey tmpVerseList;
+ String tmpVerseListCaption;
+};
+//---------------------------------------------------------------------------
+extern TForm1 *Form1;
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/mods.conf b/apps/windoze/CBuilder4/prototype/mods.conf
new file mode 100644
index 0000000..aaf29df
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/mods.conf
@@ -0,0 +1,465 @@
+[Globals]
+;AutoInstall=./newmods/
+
+[-+*Personal*+-]
+DataPath=../../../../modules/comments/rawfiles/personal/
+ModDrv=RawFiles
+Description=Personal Commentary
+About=This module allows you to store your own commentary.
+
+[SpanishRVA]
+DataPath=../../../../modules/texts/rawgbf/spanishrva/
+ModDrv=RawGBF
+Description=The New International Version
+About=\qc El texto b¡blico designado RVA es de LA SANTA BIBLIA, \par \
+VERSION REINA-VALERA ACTUALIZADA. Copyright 1982, 1986, \par \
+1987, 1989 de la Casa Bautista de Publicaciones. \par\par \
+Todos los derechos reservados. \par\par \
+El texto computarizado de la RVA para LA BIBLIA COM- \par \
+PUTARIZADA no puede ser modificado ni copiado sin per- \par \
+miso por escrito por la Casa Bautista de Publicaciones. \par\pard \
+
+
+[NASB]
+DataPath=../../../../modules/texts/rawgbf/nasb/
+ModDrv=RawGBF
+Description=The New American Standard Bible
+About=\qc -=+* see the file errata.doc for important verse descrepencies *+=- \par\par \
+The New American Standard Bible \par \
+Copyright THE LOCKMAN FOUNDATION, 1960, 1962, 1963 \par \
+La Habra, Calif. \par \
+All rights in this book are reserved. \par \
+No part may be reproduced in any manner without \par \
+permission in writing from The Lockman Foundation, \par \
+except brief quotations used in connection with \par \
+a review in a magazine or newspaper. \par\pard
+
+
+
+
+[NIV]
+DataPath=../../../../modules/texts/rawgbf/niv/
+ModDrv=RawGBF
+Description=The New International Version
+About=\qc -=+* see the file errata.doc for important verse descrepencies *+=- \par\par\pard \
+Quotations designated (NIV) are from \par\par \
+THE HOLY BIBLE: NEW INTERNATIONAL VERSION®. \par \
+Copyright © 1973, 1978, 1984 by International Bible Society; \
+Zondervan Publishing House. All rights reserved. \par\par \
+The "NIV" and "New International Version" trademarks are registered in \
+the United States Patent and Trademark Office by International Bible \
+Society. \par\par \
+The NIV text may be quoted in any form (written, visual, electronic, or \
+audio), up to and inclusive of five hundred (500) verses or less without \
+written permission, providing the verses quoted do not amount to a \
+complete book of the Bible, do not comprise 25% or more of the total \
+text of the work in which they are quoted, and the verses are not being \
+quoted in a commentary or other Biblical reference work. This \
+permission is contingent upon an appropriate copyright acknowledgment. \par\par \
+The NIV database is not a shareware program and may not be \
+duplicated. \par\par\pard
+
+
+[JFB]
+DataPath=../../../../modules/comments/hrefcom/jfb/
+ModDrv=HREFCom
+Prefix=http://ccel.wheaton.edu/j/jfb/jfb/
+;External=0
+;Prefix=file:///../../../../modules/comments/hrefcom/jfb/
+External=1
+Description=Jamison Faucett Brown Bible Commentary
+About=\qc Jamison Faucett Brown Commentary
+
+
+[Naves]
+DataPath=../../../../modules/lexdict/rawld/naves/naves
+ModDrv=RawLD
+Description=Nave's Topical Bible
+About= -=+* see the file 'naves.doc' for more details *+=-\par\par \
+\qc Nave's Topical Bible \par\par \
+Public Domain -- Copy Freely \par\par\pard \
+ Nave's Topics were originaly produced by Orville J. Nave, A.M., D.D., \
+LL.D. while serving as a Chaplin in the United States Army. He referred \
+to this work as "the result of fourteen years of delightful and untiring \
+study of the Word of God." Nave's topics were originally published in \
+the early 1900's, and a photo-offset reproduction is currently published \
+by Hendrickson, ISBN 0-917006-02-X. The title page states that this \
+work consists of 20,000+ topics and subtopics, and 100,000 references to \
+the Scriptures. \par\par \
+ The most current and correct copies of these files can be obtained from the \
+following. If any errors are located, please ensure you have the latest files, and if so, \
+we would appreciate being informed of the error. \par\par \
+ The Bible Foundation \par \
+ http://www.bf.org \par\par \
+ Or by contacting: \par\par \
+ Mark Fuller \par \
+ 1129 East Loyola Drive \par \
+ Tempe, Arizona, 85282 \par \
+ 602-829-8542 (voice)
+
+[BBE]
+DataPath=../../../../modules/texts/rawtext/bbe/
+ModDrv=RawText
+Description=The Bible in Basic English
+About= \qc -=+* see the file 'bbe.doc' for more details *+=-\par\par \
+1949/1964 Bible In Basic English \par \
+Public Domain -- Copy Freely \par\par\pard \
+The Bible In Basic English was printed in 1965 by Cambridge Press in \
+England. Published without any copyright notice and distributed in \
+America, this work fell immediatly and irretrievably into the Public \
+Domain in the United States according to the UCC convention of that \
+time. A call to Cambridge prior to placing this work in etext resulted \
+in an admission of this fact. \par\par \
+For more information about the text, see the file INTRO.BBE which \
+contains the printed introduction page. \par\par \
+The most current and correct copies of these files can be obtained from \
+the following. If any errors are located, please ensure you have the \
+latest files, and if so, we would appreciate being informed of the \
+error. \par\par \
+ The Bible Foundation \par \
+ http://www.bf.org \par\par \
+Or by contacting: \par \
+ Mark Fuller\par \
+ 1129 East Loyola Drive \par \
+ Tempe, Arizona, 85282 \par \
+ 602-829-8542 (voice)
+
+[IndTB]
+DataPath=../../../../modules/texts/rawtext/indtb/
+ModDrv=RawText
+Description=Indonesian Terjemahan Baru
+About=\qc Terjemahan Baru (TB) \par\par \
+Copyright Lembaga Alkitab Indonesia \par \
+(Indonesian Bible Society), 1994. \par \
+Released for non-profit scholarly and personal use. \par \
+Not to be sold for profit. \par \
+When making formal public reference to the materials, \par \
+please acknowlege The Indonesian Bible Society \par \
+(Lembaga Alkitab Indonesia) as the copyright holder. \par \pard
+
+
+
+[IndBIS]
+DataPath=../../../../modules/texts/rawtext/indbis/
+ModDrv=RawText
+Description=Indonesian Bahasa Indonesia Sehari-hari (BIS)
+About=\qc Bahasa Indonesia Sehari-hari (BIS) \par\par \
+Copyright Lembaga Alkitab Indonesia \par \
+(Indonesian Bible Society), 1994. \par \
+Released for non-profit scholarly and personal use. \par \
+Not to be sold for profit. \par \
+When making formal public reference to the materials, \par \
+please acknowlege The Indonesian Bible Society \par \
+(Lembaga Alkitab Indonesia) as the copyright holder. \par \pard
+
+
+
+[Websters]
+DataPath=../../../../modules/texts/rawtext/websters/
+ModDrv=RawText
+Description=The Webster Bible
+About= -=+* see the files 'intro.txt' and 'revision.txt' for more details *+=-\par\par \
+\qc THE \par HOLY BIBLE, \par CONTAINING THE \par OLD AND NEW TESTAMENTS, \par IN THE \par \
+COMMON VERSION. \par WITH \par AMENDMENTS OF THE LANGUAGE, \par \
+BY NOAH WEBSTER, LL. D. \par\par ------------- \par NEW HAVEN: \par \
+PUBLISHED BY DURRIE & PECK. \par \
+Sold by HEZEKIAH HOWE & CO., and A. H. MALTBY, New Haven; \par \
+and by N.&J. WHITE, New York. \par\par ------ \par 1833 \par\par \
+Webster Bible Electronic Format.\par \
+PUBLIC DOMAIN\par\par \
+February 1992\par\par\pard \
+Webster Biography:\par \
+Noah Webster: America's first grammarian and founding father of American education.\par\par \
+ In 1828 Noah Webster published the 'American Dictionary of the English Language'. This \
+dictionary demonstrates the Christian values which were found in America's educational \
+and scholarly systems. It is from this early dictionary that we have todays popular \
+'Webster Dictionary'. In 1833 Noah Webster, who had mastered 20 languages including \
+Hebrew and Greek, published the King James Authorized Version 'with amendments to the \
+language'. In stating his reasons for producing this version of the Bible, Webster said:\par\par \
+ 'In the present version, the language is, in general, correct and perspicuous; \
+... in many passages uniting sublimity with beautiful simplicity. In my view, the general \
+style of the version ought not to be altered. But, in the lapse of two or three centuries, \
+changes have taken place, which, in particular passages, impair the beauty; in others, \
+obscure the sense, of the original languages. ... they do not present to the reader \
+the Word of God. ... My principal aim is to remedy this evil.'\par\par \
+It was with cautious reverence that Webster corrected misused grammar, removed offensive \
+terms and expressions, and substituted commonly understood words for words that had fallen \
+into disuse, or no longer carried the same meaning.\par\par\
+ In 1834, the year after completing the Webster Bible, Noah Webster wrote a \
+companion piece titled 'Value of the Bible and Excellence of the Christian Religion - For \
+the Use of Families and Schools'.\par\par\
+ Webster, who was considered 'The schoolmaster to a nation' and produced the \
+earliest spellers and textbooks for America's school children, believed Christian religious \
+values and American public education to be inseparable. He believed the Webster Bible to \
+be 'the most important enterprise' of his life, and referred to the Bible as:\par\par \
+ '... the chief moral cause of all that is good, and the best corrector of all that \
+is evil, in human society; the best book for regulating the temporal concerns of men, and \
+the only book that can serve as an infallible guide to future felicity.'\par\par \
+Introduction to the Electronic Format:\par \
+ Beginning in July of 1991 the task of placing the Webster Bible text in electronic \
+format began. The original purpose was to provide Larry Pierce, who produces the \
+On-Line Bible program, with a more modern *public domain* text, similar in content and \
+style to the AV but with a grammar that would provide better comprehension in todays \
+English.\par\par\
+ I plan on maintaining an accurate copy of the Webster text. Anyone finding an \
+error should contact me; Anyone desiring to obtain the latest, most correct text, can find \
+it on the Bible Foundation BBS, or can contact me in the following methods:\par \
+ Internet acus10@waccvm.corp.mot.com\par \
+ Home phone 602-829-8542\par \
+ Address Mark Fuller\par \
+ 1129 East Loyola Drive\par \
+ Tempe Arizona, 85282\par \
+ Bible Foundation http://www.bf.org\par\par \
+ I would like to thank the Bible Foundation not only for scanning nearly the entire \
+Webster Bible but for encouraging me to undertake this monumental work; particularly around \
+page 20 when I realized what I had gotten myself into. Special thanks to Jerry Kingery of \
+the Bible Foundation for scanning, and Jerry Hastings for doing some preliminary scan \
+cleaning and making the texts available on the BBS.
+
+
+[Sve]
+DataPath=../../../../modules/texts/rawtext/sve/
+ModDrv=RawText
+Description=Swedish Bible 1917 New Testament
+About=\qc BIBELN eller DEN HELIGA SKRIFT \par innehållande \par \
+NYA TESTAMENTETS KANONISKA BÖCKER \par i överensstämmelse med den av \par \
+KONUNGEN ÅR 1917 \par gillade och stadfästa översättningen \par\par \
+THE BIBLE or THE HOLY SCRIPT \par containing \par CANONICAL BOOKS OF NEW TESTAMENT \par \
+in conformity with that of \par THE KING YEAR 1917 \par \
+liked and confirmed translation \par\par\pard \
+ Thank you to Roland Nygren for making this work available. For the latest \
+information, to report corrections, or for other correspondence: \par\par \
+ Roland Nygren \par \
+ qtxrony@aom.ericsson.se
+
+[VNT]
+DataPath=../../../../modules/texts/rawtext/vnt/
+ModDrv=RawText
+Description=Valera 1858 Spanish New Testament Text
+About=\qc-=+* see the file 'intro.rtf' for more details *+=- \par\par \
+El \par NUEVO TESTAMENTO \par DE \par NUESTRO SEÑOR JESU-CRISTO \par \
+QUE CONTIENE \par LOS ESCRITOS EVANGÉLICOS Y APOSTÓLICOS \par \
+ANTIGUA VERSION DE CIPRIANO DE VALERA \par REVISADA \par \
+Con arreglo al original griego. \par MADRID \par \
+SE HALLA EN EL DEPÓSITO CENTRAL DE LA SOCIEDAD BÍBLICA B. Y E. \par \
+Calle de Preciados, número 46. \par 1884 \par EL SANTO EVANGELIO \par DE \par \
+NUESTRO SEÑOR JESU-CRISTO \par SEGUN \par SAN MATEO. \par\par \pard \
+ Thank you to Bill Kincaid for making this work available. \
+This New Testament text (Valera 1858) was downloaded from The Word of God in \
+Spanish: Valera 1909 web site. (http://www.west.ga.net/~ForHim/word.html) This text is not \
+copyrighted, you are free to distribute it as you wish. We only ask out of respect for the \
+work we invested in bringing you this text (Finding, scanning, and proofing.), that you \
+leave this notice and the following introduction ([see the file intro.rtf]) in any copies \
+that you might make publish on the Internet. If you have any questions or comments please \
+contact: mnj@acnet.net \par\par \
+ Este texto del Nuevo Testamento (Valera 1858) fue bajado del la pagina de \
+web: La Palabra de Dios en Español: Valera 1909. (http://www.west.ga.net/~ForHim/word.html) \
+ Este texto no tiene derechos reservados, puedes distribuirlo como quieres. Solamente \
+pedimos que por respeto del trabajo que invertimos en dándote este texto (Encontrando, \
+escaneando, y corrigiendo.), que dejes esta noticia y la siguiente introducción \
+(FILE: intro.rtf) en cualquier copia que publicas sobre el Internet. Si tienes cualquier \
+pregunta o comentario por favor escribe a: mnj@acnet.net.
+
+
+[MHC]
+DataPath=../../../../modules/comments/rawcom/mhc/
+ModDrv=RawCom
+Description=Matthew Henry's Commentary on the Whole Bible
+About=\qc Matthew Henry's \par Concise Commentary on the Whole Bible \par\par \
+Public Domain--Copy Freely. \par\par\pard \
+ This text matches the printed edition as published by Moody Press, 28th printing, \
+no Copyright displayed. ISBN: 0-8024-5190-X. This text was created from an existing \
+electronic copy, with roughly 1200 errors corrected. The current files can be \
+found at: \par\par \
+ The Bible Foundation, \par \
+ http://www.bf.org \par\par \
+ If any errors are located, please notify me at the above BBS, or at: \par\par \
+ Mark Fuller \par \
+ 1129 E. Loyola Dr. \par \
+ Tempe, Az. 85282 \par \
+ (602) 829-8542
+
+
+
+[RWP]
+DataPath=../../../../modules/comments/rawcom/rwp/
+ModDrv=RawCom
+Description=Robertson's Word Pictures
+About=\qc -=+* see the files 'about.txt', 'title.pg', 'rwp.int', 'read.me', and \
+'correct.txt' for more details *+=- \par\par \
+ Robertson's \par Word Pictures in the \par New Testament \par\par \
+A.T. Robertson, A.M., D.D., LL. D., Litt.D. \par\par\pard \
+Vol 1,2,3,4 Public Domain -- Copy Freely \par\par Volume 5 (c) 1932. \par \
+Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \
+[Copyright expires Dec. 31, 2006.] \par\par Volume 6 (c) 1933. \par \
+Renewal 1960 Broadman Press. All rights reserved. \par Used by permission. \par \
+[Copyright expires Dec. 31, 2007.] \par\par \
++--------------- Copy Freely --------------+ \par\par \
+ The current files can be found at: \par\par \
+ The Bible Foundation, \par \
+ http://www.bf.org \par\par \
+ If any errors are located, please notify me at the above location, or at: \par\par \
+ Mark Fuller \par \
+ 1129 E. Loyola Dr. \par \
+ Tempe, Az. 85282 \par \
+ (602) 829-8542
+
+
+[Eastons]
+DataPath=../../../../modules/lexdict/rawld/eastons/eastons
+ModDrv=RawLD
+Description=Easton's Bible Dictionary
+About=\qc Easton's 1897 Bible Dictionary \par\par \
+Public Domain -- Copy Freely \par\par\pard \
+ These Dictionary topics are from M.G. Easton M.A., D.D., Illustrated Bible \
+Dictionary, Third Edition, published by Thomas Nelson, 1897. Due to the nature of etext, \
+the illustrated portions of the Dictionary have not been included. \par\par \
+ The most current and correct copies of these files can be obtained from the \
+following. If any errors are located, please ensure you have the latest files, and if so, \
+we would appreciate being informed of the error. \par\par \
+ The Bible Foundation \par \
+ http://www.bf.org \par\par \
+ Or by contacting: \par\par \
+ Mark Fuller \par \
+ 1129 East Loyola Drive \par \
+ Tempe, Arizona, 85282 \par \
+ 602-829-8542 (voice)
+
+[Vines]
+DataPath=../../../../modules/lexdict/rawld/vines/vines
+ModDrv=RawLD
+Description=Vines Bible Dictionary
+About=\qc Vine's Expository Dictionary \par of New Testament Words \par\par \
+Public Domain -- Copy Freely \par\par\pard \
+ These Dictionary topics are from W.E. Vine's M.A., Expository Dictionary of New Testament \
+Words published in 1940 and without copyright. \par\par \
+ The most current and correct copies of these files can be obtained from the \
+following. If any errors are located, please ensure you have the latest files, and if so, \
+we would appreciate being informed of the error. \par\par \
+ The Bible Foundation \par \
+ http://www.bf.org \par\par \
+ Or by contacting: \par\par \
+ Mark Fuller \par \
+ 1129 East Loyola Drive \par \
+ Tempe, Arizona, 85282 \par \
+ 602-829-8542 (voice)
+
+
+[Strongs Hebrew (OT)]
+DataPath=../../../../modules/lexdict/rawld/strongs/hebrew
+ModDrv=RawLD
+Description=Strong's / Englishman's Hebrew Bible Dictionary
+About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \
+This is a lexicon of Hebrew words keyed off of Strong's numbers.
+
+[Strongs Greek (NT)]
+DataPath=../../../../modules/lexdict/rawld/strongs/greek
+ModDrv=RawLD
+Description=Strong's / Englishman's Greek Bible Dictionary
+About=\qc Strong's / Englishman's Bible Dictionary \par\par \pard \
+This is a lexicon of Greek words keyed off of Strong's numbers.
+
+
+
+[WEB]
+DataPath=../../../../modules/texts/rawgbf/web/
+ModDrv=RawGBF
+Description=The World English Bible
+About= -=+* see the file 'info.txt' for more details *+=-\par\par \
+\qc The World English Bible (WEB) \par\par Public Domain \par\par \pard \
+ The World English Bible is a 1997 revision of the American Standard Version of the \
+Holy Bible, first published in 1901. It is in the Public Domain. Please feel free to copy \
+and distribute it freely. \par\par \
+ Thank you to Michael Paul Johnson for making this work available. For the latest \
+information, to report corrections, or for other correspondence: \par\par \
+ Michael Paul Johnson \par \
+ http://www.ebible.org/bible \par \
+ mpj@ebible.org
+
+
+[ORTHJBC]
+DataPath=../../../../modules/texts/rawtext/orthjbc/
+ModDrv=RawText
+Description=The Orthodox Jewish Brit Chadasha
+About= \qc THE ORTHODOX JEWISH BRIT CHADASHA \par\par \pard \
+ A translation from the original language without goyishe and non-frum \
+terminology. \par\par \
+(C)COPYRIGHT, 1996, ARTISTS FOR ISRAEL INTERNATIONAL \par \
+ALL RIGHTS RESERVED \par \
+USED BY PERMISSION \par\par \
+ Thank you to Dr. Phil Goble for making this work available. This work is NOT in \
+the public domain. Please honor all applicable copyright laws. Permission to distribute \
+this text in its present electronic format for personal use has been granted by the \
+copyright holder. \par\par \
+ Please direct all correspondence to: \par\par \
+ Artists for Israel International \par \
+ http://www.afii.org \par \
+ P. O. Box 2056 \par \
+ New York, NY 10163
+
+
+
+[N27U4]
+DataPath=../../../../modules/texts/rawtext/nu/
+ModDrv=RawText
+Font=Greek
+Description=Nestle Aland 27th Ed./ UBS 4th Ed. Greek Text
+About= \qc Thank you to Barbara Aland, Kurt Aland, Johannes Karavidopoulos, Carlo M. \
+Martini, and Bruce M. Metzger for bringing this work to us. \par\par \pard \
+GREEK.TTF Greek Regular Font (C) Peter J. Gentry & Andrew M. Fountain, 1993. All Rights \
+Reserved. Special thanks to the copyright holders for permission to use these fonts with \
+The SWORD Project for personal use. For a complete list of Greek / Hebrew Utilities or \
+inquiries for other use may be directed to: \par\par \
+ Peter J. Gentry \par \
+ 55 Ambercroft Blvd. \par \
+ Scarborough \par \
+ Ontario, Canada \par \
+ M1W 2Z6
+
+
+[KJV]
+DataPath=../../../../modules/texts/rawtext/kjv/
+ModDrv=RawText
+Description=King James Version of 1611
+About= -=+* see the file 'kjvpref.rtf' for more details *+=-\par\par \
+ This is the King James Version of the Holy Bible (also known as the Authorized \
+Version) in Rich Text Format (among others, italics and red included). The preface from \
+the translators is in KJVPREF.RTF. These files are in the Public Domain. \par\par \
+ May God bless you as you study His Word. \par \
+ Michael Paul Johnson \par \
+ Sysop, Colorado Catacombs BBS (303-772-1062) \par \
+ email: mpj@csn.net \par \
+ http://www.csn.net/~mpj
+
+
+
+
+[KJVSTR]
+DataPath=../../../../modules/texts/rawtext/kjvstr/
+ModDrv=RawText
+Description=King James Version of 1611 w/ Strongs Numbers
+About= This is the King James Version of the Holy Bible (also known as the Authorized \
+Version) with embedded Strong's Numbers. This makes useful for looking up the exact \
+original language word in a lexicon that is keyed off of Strong's numbers. \par\par \
+Special thanks to Larry Pierce for extensive work encorporating the embedded \
+Strong's numbers in this module. This feature is not in the public domain. \
+Permission to use this feature for personal use has been granted by the author. \par \
+Inquiries and comments may be directed to: \par\par \
+ Larry Pierce \par \
+ 103526.2724@compuserve.com \par \
+ http://www.online-bible.com
+
+[FrenchLSG]
+DataPath=../../../../modules/texts/rawgbf/frenchlsg/
+ModDrv=RawGBF
+Description=French 1910 Louis Segond Version
+About=The 1910 edition of the Louis Segond Bible is keyed to Strong's numbers. \
+All this material may be freely copied and shared with your friends. \
+If you wish to use this material for other purposes, please contact: \par\par \
+ Stg. Publishare \par \
+ c/o Transvaalstraat 5 \par \
+ 3312 EX DORDRECHT \par \
+ The Netherlands \par\par \
+to obtain the latest accurate copy. The Englishman Strong's numbers are \
+not in the public domain and any commercial use requires a licence.
+
diff --git a/apps/windoze/CBuilder4/prototype/newbmfilefrm.cpp b/apps/windoze/CBuilder4/prototype/newbmfilefrm.cpp
new file mode 100644
index 0000000..c611804
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/newbmfilefrm.cpp
@@ -0,0 +1,14 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#pragma hdrstop
+
+#include "newbmfilefrm.h"
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TNewBMfrm *NewBMfrm;
+//---------------------------------------------------------------------------
+__fastcall TNewBMfrm::TNewBMfrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//--------------------------------------------------------------------------- \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/newbmfilefrm.dfm b/apps/windoze/CBuilder4/prototype/newbmfilefrm.dfm
new file mode 100644
index 0000000..1e88bcd
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/newbmfilefrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/newbmfilefrm.h b/apps/windoze/CBuilder4/prototype/newbmfilefrm.h
new file mode 100644
index 0000000..9b4c017
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/newbmfilefrm.h
@@ -0,0 +1,27 @@
+//---------------------------------------------------------------------------
+#ifndef newbmfilefrmH
+#define newbmfilefrmH
+//---------------------------------------------------------------------------
+#include <vcl\Classes.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Forms.hpp>
+//---------------------------------------------------------------------------
+class TNewBMfrm : public TForm
+{
+__published: // IDE-managed Components
+ TLabel *Label1;
+ TEdit *bmfile;
+ TEdit *bmtitle;
+ TLabel *Label2;
+ TButton *Button1;
+ TButton *Button2;
+private: // User declarations
+public: // User declarations
+ __fastcall TNewBMfrm(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern TNewBMfrm *NewBMfrm;
+//---------------------------------------------------------------------------
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/optionfrm.cpp b/apps/windoze/CBuilder4/prototype/optionfrm.cpp
new file mode 100644
index 0000000..8af047a
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/optionfrm.cpp
@@ -0,0 +1,20 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#pragma hdrstop
+
+#include "optionfrm.h"
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TOptionsfrm *Optionsfrm;
+//---------------------------------------------------------------------------
+__fastcall TOptionsfrm::TOptionsfrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
+void __fastcall TOptionsfrm::ChooseColorbtnClick(TObject *Sender)
+{
+ ColorDialog1->Execute();
+ CurrentVSColor->Brush->Color = ColorDialog1->Color;
+}
+//---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/optionfrm.dfm b/apps/windoze/CBuilder4/prototype/optionfrm.dfm
new file mode 100644
index 0000000..0b20318
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/optionfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/optionfrm.h b/apps/windoze/CBuilder4/prototype/optionfrm.h
new file mode 100644
index 0000000..1ea8f08
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/optionfrm.h
@@ -0,0 +1,39 @@
+//---------------------------------------------------------------------------
+#ifndef optionfrmH
+#define optionfrmH
+//---------------------------------------------------------------------------
+#include <vcl\Classes.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Forms.hpp>
+#include <vcl\ExtCtrls.hpp>
+#include <vcl\Dialogs.hpp>
+//---------------------------------------------------------------------------
+class TOptionsfrm : public TForm
+{
+__published: // IDE-managed Components
+ TPanel *Panel1;
+ TGroupBox *GroupBox1;
+ TCheckBox *AutoBMPersonal;
+ TCheckBox *AutoBMOther;
+ TGroupBox *GroupBox2;
+ TCheckBox *AutoVSColor;
+ TShape *CurrentVSColor;
+ TColorDialog *ColorDialog1;
+ TButton *ChooseColorbtn;
+ TPanel *Panel2;
+ TButton *Button1;
+ TPanel *Panel3;
+ TButton *Button2;
+ TLabel *Label1;
+ void __fastcall ChooseColorbtnClick(TObject *Sender);
+
+private: // User declarations
+public: // User declarations
+ __fastcall TOptionsfrm(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern TOptionsfrm *Optionsfrm;
+//---------------------------------------------------------------------------
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/options.conf b/apps/windoze/CBuilder4/prototype/options.conf
new file mode 100644
index 0000000..db0e4ce
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/options.conf
@@ -0,0 +1,15 @@
+
+[Appearance]
+AutoVSColor=1
+CurrentVSColorBlue=255
+CurrentVSColorGreen=128
+CurrentVSColorRed=0
+
+[Bookmarks]
+AutoSaveOther=1
+AutoSavePersonal=1
+Directory=
+
+[System]
+MaxFiles=40
+
diff --git a/apps/windoze/CBuilder4/prototype/search.bmp b/apps/windoze/CBuilder4/prototype/search.bmp
new file mode 100644
index 0000000..ee693be
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/search.bmp
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/searchfrm.cpp b/apps/windoze/CBuilder4/prototype/searchfrm.cpp
new file mode 100644
index 0000000..c5b29b2
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/searchfrm.cpp
@@ -0,0 +1,95 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#pragma hdrstop
+
+#include "searchfrm.h"
+#include <listkey.h>
+#include "mainfrm.h"
+#include <regex.h>
+
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TForm2 *Form2;
+//---------------------------------------------------------------------------
+__fastcall TForm2::TForm2(TComponent* Owner)
+ : TForm(Owner)
+{
+ pvrtf = new SWDispRTF(this);
+
+ pvrtf->Parent = plPreview;
+ pvrtf->Align = alClient;
+ pvrtf->ScrollBars = ssVertical;
+ pvrtf->ReadOnly = true;
+// pvrtf->PopupMenu = PopupMenu2;
+
+// mod->Disp(*displays.insert(displays.begin(), new RTFDisp(newrtf)));
+// mod->SetKey(DefaultVSKey);
+// return 0;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm2::Button1Click(TObject *Sender)
+{
+// ModMap::iterator target;
+ class TWaitCursor {
+ public:
+ TWaitCursor() : oldc(Screen->Cursor) { Screen->Cursor = crHourGlass; }
+ ~TWaitCursor() { Screen->Cursor = oldc; }
+ private:
+ TCursor oldc;
+ } wait; // show hourglass
+
+ Caption = "";
+
+
+ targetpc = Form1->textTabs->pageControl;
+
+ if ((Form1->ActiveControl == Form1->PageControl2) || (IsChild(Form1->PageControl2->Handle, Form1->ActiveControl->Handle)))
+ targetpc = Form1->PageControl2;
+ if ((Form1->ActiveControl == Form1->PageControl3) || (IsChild(Form1->PageControl3->Handle, Form1->ActiveControl->Handle)))
+ targetpc = Form1->PageControl3;
+
+
+ target = Form1->mainmgr->Modules.find(targetpc->ActivePage->Caption.c_str());
+ if (target != Form1->mainmgr->Modules.end()) {
+ Caption = Caption + "Searching [" + (*target).first.c_str() + "]...";
+ ListBox1->Clear();
+ int searchType;
+ switch (searchTypeGroup->ItemIndex) {
+ case 0: searchType = -2; break;
+ case 1: searchType = -1; break;
+ case 2: searchType = 0; break;
+ }
+ int searchOptions = (CheckBox2->Checked) ? 0 : REG_ICASE;
+ ListKey &results = (*target).second->Search(SearchText->Text.c_str(), searchType, searchOptions);
+ while (!results.Error()) {
+ ListBox1->Items->Add((const char *)results);
+ results++;
+ }
+// ListBox1->Items->Pack(); // so Count is set correctly (per helpfile)
+ Caption = "";
+ Caption = Caption + "Results from [" + (*target).first.c_str() + "] (" + ListBox1->Items->Count + ((ListBox1->Items->Count == 1) ? " match)" : " matches)");
+ }
+ else Caption = "Error finding target module";
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm2::ListBox1DblClick(TObject *Sender)
+{
+ if (targetpc == Form1->PageControl3) {
+ Form1->DictKeyEdit->Text = ListBox1->Items->Strings[ListBox1->ItemIndex].c_str();
+ }
+ else {
+ Form1->DefaultVSKey = ListBox1->Items->Strings[ListBox1->ItemIndex].c_str();
+ Form1->TextKeyChanged();
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm2::ListBox1Click(TObject *Sender)
+{
+ if (target != Form1->mainmgr->Modules.end()) {
+ SWKey *savekey = *(*target).second;
+ (*target).second->SetKey(ListBox1->Items->Strings[ListBox1->ItemIndex].c_str());
+ pvrtf->Display(*(*target).second);
+ (*target).second->SetKey(*savekey);
+ }
+}
+//---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/searchfrm.dfm b/apps/windoze/CBuilder4/prototype/searchfrm.dfm
new file mode 100644
index 0000000..9c366d8
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/searchfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/searchfrm.h b/apps/windoze/CBuilder4/prototype/searchfrm.h
new file mode 100644
index 0000000..a50ee44
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/searchfrm.h
@@ -0,0 +1,44 @@
+//---------------------------------------------------------------------------
+#ifndef searchH
+#define searchH
+//---------------------------------------------------------------------------
+#include <vcl\Classes.hpp>
+#include <vcl\Controls.hpp>
+#include <vcl\StdCtrls.hpp>
+#include <vcl\Forms.hpp>
+#include <vcl\ExtCtrls.hpp>
+#include "mainfrm.h"
+#include <swmgr.h>
+//---------------------------------------------------------------------------
+class TForm2 : public TForm
+{
+__published: // IDE-managed Components
+ TPanel *Panel1;
+ TPanel *Panel2;
+ TListBox *ListBox1;
+ TPanel *Panel3;
+ TMemo *SearchText;
+ TPanel *plPreview;
+ TRadioGroup *searchTypeGroup;
+ TGroupBox *GroupBox1;
+ TCheckBox *CheckBox2;
+ TPanel *Panel4;
+ TButton *Button1;
+ TSplitter *Splitter1;
+ void __fastcall Button1Click(TObject *Sender);
+ void __fastcall ListBox1DblClick(TObject *Sender);
+ void __fastcall ListBox1Click(TObject *Sender);
+private: // User declarations
+ SWDispRTF *pvrtf;
+public: // User declarations
+ ModMap::iterator target;
+ TPageControl *targetpc;
+// AnsiString CapText;
+
+ __fastcall TForm2(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern TForm2 *Form2;
+//---------------------------------------------------------------------------
+#endif
+ \ No newline at end of file
diff --git a/apps/windoze/CBuilder4/prototype/sword.bpr b/apps/windoze/CBuilder4/prototype/sword.bpr
new file mode 100644
index 0000000..b913721
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/sword.bpr
@@ -0,0 +1,223 @@
+# ---------------------------------------------------------------------------
+!if !$d(BCB)
+BCB = $(MAKEDIR)\..
+!endif
+
+# ---------------------------------------------------------------------------
+# IDE SECTION
+# ---------------------------------------------------------------------------
+# The following section of the project makefile is managed by the BCB IDE.
+# It is recommended to use the IDE to change any of the values in this
+# section.
+# ---------------------------------------------------------------------------
+
+VERSION = BCB.04.04
+# ---------------------------------------------------------------------------
+PROJECT = sword.exe
+OBJFILES = sword.obj mainfrm.obj ModInstForm.obj ..\..\swdisprtf.obj \
+ ..\..\swdisprtfchap.obj ..\..\swwinlog.obj ..\..\tbdisp.obj searchfrm.obj \
+ editentryfrm.obj biblecsmgr.obj bookmarkfrm.obj AboutBoxfrm.obj optionfrm.obj \
+ vrslstfrm.obj versesel.obj newbmfilefrm.obj CommentPanel.obj ModTabPanel.obj \
+ AppBar.obj \
+ "..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons\DockCanvas.obj" \
+ BookMarkPanel.obj TextPanel.obj LDPanel.obj DeskTopNameForm.obj
+RESFILES = sword.res
+RESDEPEN = $(RESFILES) mainfrm.dfm ModInstForm.dfm searchfrm.dfm editentryfrm.dfm \
+ bookmarkfrm.dfm AboutBoxfrm.dfm optionfrm.dfm vrslstfrm.dfm versesel.dfm \
+ newbmfilefrm.dfm AppBar.dfm \
+ "..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons\DockCanvas.dfm" \
+ DeskTopNameForm.dfm
+LIBFILES = swordlib.lib
+IDLGENFILES =
+IDLFILES =
+LIBRARIES = dclusr40.lib Vclx40.lib Vcl40.lib
+SPARELIBS = Vcl40.lib Vclx40.lib dclusr40.lib
+PACKAGES = Vcl40.bpi Vclx40.bpi vcljpg40.bpi Vclmid40.bpi Vcldb40.bpi bcbsmp40.bpi \
+ vcldbx40.bpi Qrpt40.bpi TeeUI40.bpi teedb40.bpi tee40.bpi Dss40.bpi ibsmp40.bpi \
+ NMFast40.bpi Inetdb40.bpi Inet40.bpi dclocx40.bpi
+DEFFILE =
+# ---------------------------------------------------------------------------
+PATHCPP = .;..\..;..\..\..\..\..\..\..\Program Files\Common Files\Borland \
+ Shared\Images\Buttons
+PATHASM = .;
+PATHPAS = .;
+PATHRC = .;
+DEBUGLIBPATH = $(BCB)\lib\debug
+RELEASELIBPATH = $(BCB)\lib\release
+USERDEFINES =
+SYSDEFINES = NO_STRICT
+# ---------------------------------------------------------------------------
+CFLAG1 = -I"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons";..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include \
+ -O2 -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -a8 -k- -vi- -c -b- -w-par -w-inl -Vx \
+ -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)
+IDLCFLAGS = -I"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons" \
+ -I..\.. -I$(BCB)\include -I$(BCB)\include\vcl -I..\..\..\..\include \
+ -src_suffixcpp
+PFLAGS = -U"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons";$(BCB)\Projects\Lib;"..\..\..\..\..\..\..\program files\borland\cbuilder4\Lib";..\..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \
+ -I"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons";..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include \
+ -$Y- -$L- -$D- -v -JPHNE -M
+RFLAGS = -i"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons";..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
+AFLAGS = /i"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons" \
+ /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\..\..\include /mx /w2 /zn
+LFLAGS = -L"..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons";$(BCB)\Projects\Lib;"..\..\..\..\..\..\..\program files\borland\cbuilder4\Lib";..\..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \
+ -aa -Tpe -x -Gn
+# ---------------------------------------------------------------------------
+ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
+ALLRES = $(RESFILES)
+ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
+# ---------------------------------------------------------------------------
+!ifdef IDEOPTIONS
+
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=3
+Item0=..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons;..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
+Item1=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
+Item2=$(BCB)\include;$(BCB)\include\vcl;../../../../include
+
+[HistoryLists\hlLibraryPath]
+Count=3
+Item0=..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons;$(BCB)\Projects\Lib;..\..\..\..\..\..\..\program files\borland\cbuilder4\Lib;..\..;$(BCB)\lib\obj;$(BCB)\lib
+Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
+Item2=$(BCB)\lib\obj;$(BCB)\lib
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+InMemoryExe=0
+ShowInfoMsgs=0
+
+[CORBA]
+AddServerUnit=1
+AddClientUnit=1
+PrecompiledHeaders=1
+
+!endif
+
+# ---------------------------------------------------------------------------
+# MAKE SECTION
+# ---------------------------------------------------------------------------
+# This section of the project file is not used by the BCB IDE. It is for
+# the benefit of building from the command-line using the MAKE utility.
+# ---------------------------------------------------------------------------
+
+.autodepend
+# ---------------------------------------------------------------------------
+!if !$d(BCC32)
+BCC32 = bcc32
+!endif
+
+!if !$d(CPP32)
+CPP32 = cpp32
+!endif
+
+!if !$d(DCC32)
+DCC32 = dcc32
+!endif
+
+!if !$d(TASM32)
+TASM32 = tasm32
+!endif
+
+!if !$d(LINKER)
+LINKER = ilink32
+!endif
+
+!if !$d(BRCC32)
+BRCC32 = brcc32
+!endif
+
+!if !$d(IDL2CPP)
+IDL2CPP = idl2cpp
+!endif
+
+# ---------------------------------------------------------------------------
+!if $d(PATHCPP)
+.PATH.CPP = $(PATHCPP)
+.PATH.C = $(PATHCPP)
+!endif
+
+!if $d(PATHPAS)
+.PATH.PAS = $(PATHPAS)
+!endif
+
+!if $d(PATHASM)
+.PATH.ASM = $(PATHASM)
+!endif
+
+!if $d(PATHRC)
+.PATH.RC = $(PATHRC)
+!endif
+# ---------------------------------------------------------------------------
+$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
+ $(BCB)\BIN\$(LINKER) @&&!
+ $(LFLAGS) +
+ $(ALLOBJ), +
+ $(PROJECT),, +
+ $(ALLLIB), +
+ $(DEFFILE), +
+ $(ALLRES)
+!
+# ---------------------------------------------------------------------------
+.pas.hpp:
+ $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
+
+.pas.obj:
+ $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
+
+.cpp.obj:
+ $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< }
+
+.c.obj:
+ $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< }
+
+.c.i:
+ $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< }
+
+.cpp.i:
+ $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< }
+
+.asm.obj:
+ $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
+
+.rc.res:
+ $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
+# ---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/sword.cpp b/apps/windoze/CBuilder4/prototype/sword.cpp
new file mode 100644
index 0000000..e6faae7
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/sword.cpp
@@ -0,0 +1,46 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+USERES("sword.res");
+USEFORM("mainfrm.cpp", Form1);
+USELIB("swordlib.lib");
+USEFORM("ModInstForm.cpp", ModInstFrm);
+USEUNIT("..\..\swdisprtf.cpp");
+USEUNIT("..\..\swdisprtfchap.cpp");
+USEUNIT("..\..\swwinlog.cpp");
+USEUNIT("..\..\tbdisp.cpp");
+USEFORM("searchfrm.cpp", Form2);
+USEFORM("editentryfrm.cpp", EditEntry);
+USEUNIT("biblecsmgr.cpp");
+USEFORM("bookmarkfrm.cpp", Bookmarksfrm);
+USEFORM("AboutBoxfrm.cpp", AboutBox);
+USEFORM("optionfrm.cpp", Optionsfrm);
+USEFORM("vrslstfrm.cpp", VerseListFrm);
+USEFORM("versesel.cpp", VerseSelFrm);
+USEFORM("newbmfilefrm.cpp", NewBMfrm);
+USEUNIT("CommentPanel.cpp");
+USEUNIT("ModTabPanel.cpp");
+USEFORM("AppBar.cpp", AppBarFrm);
+USEFORM("..\..\..\..\..\..\..\Program Files\Common Files\Borland Shared\Images\Buttons\DockCanvas.cpp", DockCanvasFrm);
+USEUNIT("BookMarkPanel.cpp");
+USEUNIT("TextPanel.cpp");
+USEUNIT("LDPanel.cpp");
+USEFORM("DeskTopNameForm.cpp", DeskTopNameFrm);
+//---------------------------------------------------------------------------
+WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
+{
+ try
+ {
+ Application->Initialize();
+ Application->CreateForm(__classid(TAppBarFrm), &AppBarFrm);
+ Application->CreateForm(__classid(TDeskTopNameFrm), &DeskTopNameFrm);
+ Application->Run();
+ }
+ catch (Exception &exception)
+ {
+ Application->ShowException(&exception);
+ }
+ return 0;
+}
+//---------------------------------------------------------------------------
+
diff --git a/apps/windoze/CBuilder4/prototype/sword.res b/apps/windoze/CBuilder4/prototype/sword.res
new file mode 100644
index 0000000..32b522d
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/sword.res
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/swordlib.bpr b/apps/windoze/CBuilder4/prototype/swordlib.bpr
new file mode 100644
index 0000000..55d34f7
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/swordlib.bpr
@@ -0,0 +1,214 @@
+# ---------------------------------------------------------------------------
+!if !$d(BCB)
+BCB = $(MAKEDIR)\..
+!endif
+
+# ---------------------------------------------------------------------------
+# IDE SECTION
+# ---------------------------------------------------------------------------
+# The following section of the project makefile is managed by the BCB IDE.
+# It is recommended to use the IDE to change any of the values in this
+# section.
+# ---------------------------------------------------------------------------
+
+VERSION = BCB.04.04
+# ---------------------------------------------------------------------------
+PROJECT = swordlib.lib
+OBJFILES = swordlib.obj ..\..\..\..\src\mgr\swmgr.obj ..\..\..\..\src\mgr\swconfig.obj \
+ ..\..\..\..\src\mgr\filemgr.obj ..\..\..\..\src\keys\versekey.obj \
+ ..\..\..\..\src\keys\swkey.obj ..\..\..\..\src\keys\listkey.obj \
+ ..\..\..\..\src\keys\strkey.obj ..\..\..\..\src\utilfuns\utilstr.obj \
+ ..\..\..\..\src\utilfuns\utilconf.obj ..\..\..\..\src\utilfuns\Greek2Greek.obj \
+ ..\..\..\..\src\frontend\swlog.obj ..\..\..\..\src\frontend\swdisp.obj \
+ ..\..\..\..\src\modules\common\rawstr.obj \
+ ..\..\..\..\src\modules\common\rawverse.obj \
+ ..\..\..\..\src\modules\common\swcomprs.obj \
+ ..\..\..\..\src\modules\comments\swcom.obj \
+ ..\..\..\..\src\modules\comments\hrefcom\hrefcom.obj \
+ ..\..\..\..\src\modules\comments\rawcom\rawcom.obj \
+ ..\..\..\..\src\modules\comments\rawfiles\rawfiles.obj \
+ ..\..\..\..\src\modules\filters\rwprtf.obj \
+ ..\..\..\..\src\modules\filters\gbfrtf.obj \
+ ..\..\..\..\src\modules\filters\gbfplain.obj \
+ ..\..\..\..\src\modules\lexdict\swld.obj \
+ ..\..\..\..\src\modules\lexdict\rawld\rawld.obj \
+ ..\..\..\..\src\modules\texts\swtext.obj \
+ ..\..\..\..\src\modules\texts\rawgbf\rawgbf.obj \
+ ..\..\..\..\src\modules\texts\rawtext\rawtext.obj \
+ ..\..\..\..\src\modules\swmodule.obj
+DEFFILE =
+LIBFILES =
+RESDEPEN = $(RESFILES)
+RESFILES =
+IDLGENFILES =
+IDLFILES =
+LIBRARIES = Vcl40.lib
+SPARELIBS = Vcl40.lib
+PACKAGES =
+# ---------------------------------------------------------------------------
+PATHCPP = .;..\..\..\..\src\mgr;..\..\..\..\src\keys;..\..\..\..\src\utilfuns;..\..\..\..\src\frontend;..\..\..\..\src\modules\common;..\..\..\..\src\modules\comments;..\..\..\..\src\modules\comments\hrefcom;..\..\..\..\src\modules\comments\rawcom;..\..\..\..\src\modules\comments\rawfiles;..\..\..\..\src\modules\filters;..\..\..\..\src\modules\lexdict;..\..\..\..\src\modules\lexdict\rawld;..\..\..\..\src\modules\texts;..\..\..\..\src\modules\texts\rawgbf;..\..\..\..\src\modules\texts\rawtext;..\..\..\..\src\modules
+PATHASM = .;
+PATHPAS = .;
+PATHRC = .;
+USERDEFINES =
+SYSDEFINES =NO_STRICT
+# ---------------------------------------------------------------------------
+CFLAG1 = -I..\..\..\..\src\modules\texts\rawtext;..\..\..\..\src\modules\texts\rawgbf;..\..\..\..\src\modules\texts;..\..\..\..\src\modules\lexdict\rawld;..\..\..\..\src\modules\lexdict;..\..\..\..\src\modules\filters;..\..\..\..\src\modules\comments\rawfiles;..\..\..\..\src\modules\comments\rawcom;..\..\..\..\src\modules\comments\hrefcom;..\..\..\..\src\modules\comments;..\..\..\..\src\modules\common;..\..\..\..\src\modules;..\..\..\..\src\frontend;..\..\..\..\src\utilfuns;..\..\..\..\src\keys;..\..\..\..\src\mgr;..\..\..\..\include;$(BCB)\include;$(BCB)\include\vcl \
+ -O2 -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -a8 -k- -vi- -c -b- -w-par -w-inl -Vx \
+ -tWM -D$(SYSDEFINES);$(USERDEFINES)
+IDLCFLAGS = -I..\..\..\..\src\modules\texts\rawtext -I..\..\..\..\src\modules\texts\rawgbf \
+ -I..\..\..\..\src\modules\texts -I..\..\..\..\src\modules\lexdict\rawld \
+ -I..\..\..\..\src\modules\lexdict -I..\..\..\..\src\modules\filters \
+ -I..\..\..\..\src\modules\comments\rawfiles \
+ -I..\..\..\..\src\modules\comments\rawcom \
+ -I..\..\..\..\src\modules\comments\hrefcom -I..\..\..\..\src\modules\comments \
+ -I..\..\..\..\src\modules\common -I..\..\..\..\src\modules \
+ -I..\..\..\..\src\frontend -I..\..\..\..\src\utilfuns -I..\..\..\..\src\keys \
+ -I..\..\..\..\src\mgr -I..\..\..\..\include -I$(BCB)\include \
+ -I$(BCB)\include\vcl -src_suffixcpp
+PFLAGS = -U..\..\..\..\src\modules;$(DEBUGLIBPATH) \
+ -I..\..\..\..\src\modules\texts\rawtext;..\..\..\..\src\modules\texts\rawgbf;..\..\..\..\src\modules\texts;..\..\..\..\src\modules\lexdict\rawld;..\..\..\..\src\modules\lexdict;..\..\..\..\src\modules\filters;..\..\..\..\src\modules\comments\rawfiles;..\..\..\..\src\modules\comments\rawcom;..\..\..\..\src\modules\comments\hrefcom;..\..\..\..\src\modules\comments;..\..\..\..\src\modules\common;..\..\..\..\src\modules;..\..\..\..\src\frontend;..\..\..\..\src\utilfuns;..\..\..\..\src\keys;..\..\..\..\src\mgr;..\..\..\..\include;$(BCB)\include;$(BCB)\include\vcl \
+ -$Y- -$L- -$D- -v -JPHN -M
+AFLAGS = /i..\..\..\..\src\modules\texts\rawtext /i..\..\..\..\src\modules\texts\rawgbf \
+ /i..\..\..\..\src\modules\texts /i..\..\..\..\src\modules\lexdict\rawld \
+ /i..\..\..\..\src\modules\lexdict /i..\..\..\..\src\modules\filters \
+ /i..\..\..\..\src\modules\comments\rawfiles \
+ /i..\..\..\..\src\modules\comments\rawcom \
+ /i..\..\..\..\src\modules\comments\hrefcom /i..\..\..\..\src\modules\comments \
+ /i..\..\..\..\src\modules\common /i..\..\..\..\src\modules \
+ /i..\..\..\..\src\frontend /i..\..\..\..\src\utilfuns /i..\..\..\..\src\keys \
+ /i..\..\..\..\src\mgr /i..\..\..\..\include /i$(BCB)\include \
+ /i$(BCB)\include\vcl /mx /w2 /zn
+RFLAGS = -i..\..\..\..\src\modules\texts\rawtext;..\..\..\..\src\modules\texts\rawgbf;..\..\..\..\src\modules\texts;..\..\..\..\src\modules\lexdict\rawld;..\..\..\..\src\modules\lexdict;..\..\..\..\src\modules\filters;..\..\..\..\src\modules\comments\rawfiles;..\..\..\..\src\modules\comments\rawcom;..\..\..\..\src\modules\comments\hrefcom;..\..\..\..\src\modules\comments;..\..\..\..\src\modules\common;..\..\..\..\src\modules;..\..\..\..\src\frontend;..\..\..\..\src\utilfuns;..\..\..\..\src\keys;..\..\..\..\src\mgr;..\..\..\..\include;$(BCB)\include;$(BCB)\include\vcl
+LFLAGS = /P64
+# ---------------------------------------------------------------------------
+ALLOBJ = $(OBJFILES)
+# ---------------------------------------------------------------------------
+!ifdef IDEOPTIONS
+
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=3
+Item0=..\..\..\..\src\modules\texts\rawtext;..\..\..\..\src\modules\texts\rawgbf;..\..\..\..\src\modules\texts;..\..\..\..\src\modules\lexdict\rawld;..\..\..\..\src\modules\lexdict;..\..\..\..\src\modules\filters;..\..\..\..\src\modules\comments\rawfiles;..\..\..\..\src\modules\comments\rawcom;..\..\..\..\src\modules\comments\hrefcom;..\..\..\..\src\modules\comments;..\..\..\..\src\modules\common;..\..\..\..\src\modules;..\..\..\..\src\frontend;..\..\..\..\src\utilfuns;..\..\..\..\src\keys;..\..\..\..\src\mgr;..\..\..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item1=..\..\..\..\src\keys;..\..\..\..\src\mgr;..\..\..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item2=..\..\..\..\include;$(BCB)\include;$(BCB)\include\vcl
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+InMemoryExe=0
+ShowInfoMsgs=0
+
+[CORBA]
+AddServerUnit=1
+AddClientUnit=1
+PrecompiledHeaders=1
+
+!endif
+
+# ---------------------------------------------------------------------------
+# MAKE SECTION
+# ---------------------------------------------------------------------------
+# This section of the project makefile is not used by the BCB IDE. It is for
+# the benefit of building from the command-line using the MAKE utility.
+# ---------------------------------------------------------------------------
+
+.autodepend
+# ---------------------------------------------------------------------------
+!if !$d(BCC32)
+BCC32 = bcc32
+!endif
+
+!if !$d(CPP32)
+CPP32 = cpp32
+!endif
+
+!if !$d(DCC32)
+DCC32 = dcc32
+!endif
+
+!if !$d(TASM32)
+TASM32 = tasm32
+!endif
+
+!if !$d(LINKER)
+LINKER = TLib
+!endif
+# ---------------------------------------------------------------------------
+!if $d(PATHCPP)
+.PATH.CPP = $(PATHCPP)
+.PATH.C = $(PATHCPP)
+!endif
+
+!if $d(PATHPAS)
+.PATH.PAS = $(PATHPAS)
+!endif
+
+!if $d(PATHASM)
+.PATH.ASM = $(PATHASM)
+!endif
+# ---------------------------------------------------------------------------
+$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(LIBFILES)
+ $(BCB)\BIN\$(LINKER) /u $@ @&&!
+ $(LFLAGS) $?
+!
+# ---------------------------------------------------------------------------
+.pas.hpp:
+ $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
+
+.pas.obj:
+ $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
+
+.cpp.obj:
+ $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< }
+
+.c.obj:
+ $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< }
+
+.c.i:
+ $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< }
+
+.cpp.i:
+ $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< }
+
+.asm.obj:
+ $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
+# ---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/swordlib.cpp b/apps/windoze/CBuilder4/prototype/swordlib.cpp
new file mode 100644
index 0000000..258a253
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/swordlib.cpp
@@ -0,0 +1,36 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+USEUNIT("..\..\..\..\src\mgr\swmgr.cpp");
+USEUNIT("..\..\..\..\src\mgr\swconfig.cpp");
+USEUNIT("..\..\..\..\src\mgr\filemgr.cpp");
+USEUNIT("..\..\..\..\src\keys\versekey.cpp");
+USEUNIT("..\..\..\..\src\keys\swkey.cpp");
+USEUNIT("..\..\..\..\src\keys\listkey.cpp");
+USEUNIT("..\..\..\..\src\keys\strkey.cpp");
+USEUNIT("..\..\..\..\src\utilfuns\utilstr.cpp");
+USEUNIT("..\..\..\..\src\utilfuns\utilconf.cpp");
+USEUNIT("..\..\..\..\src\utilfuns\Greek2Greek.cpp");
+USEUNIT("..\..\..\..\src\frontend\swlog.cpp");
+USEUNIT("..\..\..\..\src\frontend\swdisp.cpp");
+USEUNIT("..\..\..\..\src\modules\common\rawstr.cpp");
+USEUNIT("..\..\..\..\src\modules\common\rawverse.cpp");
+USEUNIT("..\..\..\..\src\modules\common\swcomprs.cpp");
+USEUNIT("..\..\..\..\src\modules\comments\swcom.cpp");
+USEUNIT("..\..\..\..\src\modules\comments\hrefcom\hrefcom.cpp");
+USEUNIT("..\..\..\..\src\modules\comments\rawcom\rawcom.cpp");
+USEUNIT("..\..\..\..\src\modules\comments\rawfiles\rawfiles.cpp");
+USEUNIT("..\..\..\..\src\modules\filters\rwprtf.cpp");
+USEUNIT("..\..\..\..\src\modules\filters\gbfrtf.cpp");
+USEUNIT("..\..\..\..\src\modules\filters\gbfplain.cpp");
+USEUNIT("..\..\..\..\src\modules\lexdict\swld.cpp");
+USEUNIT("..\..\..\..\src\modules\lexdict\rawld\rawld.cpp");
+USEUNIT("..\..\..\..\src\modules\texts\swtext.cpp");
+USEUNIT("..\..\..\..\src\modules\texts\rawgbf\rawgbf.cpp");
+USEUNIT("..\..\..\..\src\modules\texts\rawtext\rawtext.cpp");
+USEUNIT("..\..\..\..\src\modules\swmodule.cpp");
+//---------------------------------------------------------------------------
+#define Library
+
+// To add a file to the library use the Project menu 'Add to Project'.
+
diff --git a/apps/windoze/CBuilder4/prototype/swordprj.bpg b/apps/windoze/CBuilder4/prototype/swordprj.bpg
new file mode 100644
index 0000000..0333c75
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/swordprj.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = swordlib.lib sword.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+swordlib.lib: swordlib.bpr
+ $(MAKE)
+
+sword.exe: sword.bpr
+ $(MAKE)
+
+
diff --git a/apps/windoze/CBuilder4/prototype/versesel.cpp b/apps/windoze/CBuilder4/prototype/versesel.cpp
new file mode 100644
index 0000000..8788580
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/versesel.cpp
@@ -0,0 +1,22 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "versesel.h"
+#include <versekey.h>
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+TVerseSelFrm *VerseSelFrm;
+//---------------------------------------------------------------------------
+__fastcall TVerseSelFrm::TVerseSelFrm(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
+void __fastcall TVerseSelFrm::Edit1Change(TObject *Sender)
+{
+ VerseKey trykey = Edit1->Text.c_str();
+ Panel2->Caption = (const char *)trykey;
+}
+//---------------------------------------------------------------------------
diff --git a/apps/windoze/CBuilder4/prototype/versesel.dfm b/apps/windoze/CBuilder4/prototype/versesel.dfm
new file mode 100644
index 0000000..4502433
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/versesel.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/versesel.h b/apps/windoze/CBuilder4/prototype/versesel.h
new file mode 100644
index 0000000..b4c1981
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/versesel.h
@@ -0,0 +1,27 @@
+//---------------------------------------------------------------------------
+#ifndef verseselH
+#define verseselH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+//---------------------------------------------------------------------------
+class TVerseSelFrm : public TForm
+{
+__published: // IDE-managed Components
+ TEdit *Edit1;
+ TPanel *Panel2;
+ TPanel *Panel1;
+ TButton *Button1;
+ TButton *Button2;
+ void __fastcall Edit1Change(TObject *Sender);
+private: // User declarations
+public: // User declarations
+ __fastcall TVerseSelFrm(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TVerseSelFrm *VerseSelFrm;
+//---------------------------------------------------------------------------
+#endif
diff --git a/apps/windoze/CBuilder4/prototype/vrslstfrm.cpp b/apps/windoze/CBuilder4/prototype/vrslstfrm.cpp
new file mode 100644
index 0000000..f20e6a8
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/vrslstfrm.cpp
@@ -0,0 +1,50 @@
+//---------------------------------------------------------------------------
+#include <vcl.h>
+#pragma hdrstop
+
+#include "vrslstfrm.h"
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+TVerseListFrm *VerseListFrm;
+//---------------------------------------------------------------------------
+__fastcall TVerseListFrm::TVerseListFrm(TComponent* Owner, ListKey &iVerseList)
+ : TForm(Owner), verseList(iVerseList)
+{
+ pvrtf = new SWDispRTF(this);
+
+ pvrtf->Parent = plPreview;
+ pvrtf->Align = alClient;
+ pvrtf->ScrollBars = ssVertical;
+ pvrtf->ReadOnly = true;
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TVerseListFrm::ListBox1Click(TObject *Sender)
+{
+ ModMap::iterator target;
+ target = Form1->mainmgr->Modules.find(Form1->textTabs->pageControl->ActivePage->Caption.c_str());
+ if (target != Form1->mainmgr->Modules.end()) {
+ SWKey *savekey = *(*target).second;
+ (*target).second->SetKey(ListBox1->Items->Strings[ListBox1->ItemIndex].c_str());
+ pvrtf->Display(*(*target).second);
+ (*target).second->SetKey(*savekey);
+ }
+}
+//---------------------------------------------------------------------------
+
+void __fastcall TVerseListFrm::ListBox1DblClick(TObject *Sender)
+{
+ Form1->DefaultVSKey = ListBox1->Items->Strings[ListBox1->ItemIndex].c_str();
+ Form1->TextKeyChanged();
+}
+//---------------------------------------------------------------------------
+void __fastcall TVerseListFrm::FormShow(TObject *Sender)
+{
+ for (verseList = TOP; (!verseList.Error()); verseList++)
+ ListBox1->Items->Add((const char *)verseList);
+}
+//---------------------------------------------------------------------------
+
+
+
diff --git a/apps/windoze/CBuilder4/prototype/vrslstfrm.dfm b/apps/windoze/CBuilder4/prototype/vrslstfrm.dfm
new file mode 100644
index 0000000..2b2af74
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/vrslstfrm.dfm
Binary files differ
diff --git a/apps/windoze/CBuilder4/prototype/vrslstfrm.h b/apps/windoze/CBuilder4/prototype/vrslstfrm.h
new file mode 100644
index 0000000..7af64b9
--- /dev/null
+++ b/apps/windoze/CBuilder4/prototype/vrslstfrm.h
@@ -0,0 +1,29 @@
+//---------------------------------------------------------------------------
+#ifndef vrslstfrmH
+#define vrslstfrmH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+#include "mainfrm.h"
+//---------------------------------------------------------------------------
+class TVerseListFrm : public TForm
+{
+__published: // IDE-managed Components
+ TPanel *plPreview;
+ TListBox *ListBox1;
+ void __fastcall ListBox1Click(TObject *Sender);
+ void __fastcall ListBox1DblClick(TObject *Sender);
+ void __fastcall FormShow(TObject *Sender);
+private: // User declarations
+ SWDispRTF *pvrtf;
+ ListKey &verseList;
+public: // User declarations
+ __fastcall TVerseListFrm(TComponent* Owner, ListKey &iVerseList);
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TVerseListFrm *VerseListFrm;
+//---------------------------------------------------------------------------
+#endif