aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-08-28 13:02:00 +0000
committerdanglassey <danglassey>2002-08-28 13:02:00 +0000
commit1e057d67306569fcd9896dfcea1f5353810f0a48 (patch)
treefa0e30a5552e043e167d762300579cb96f113696 /apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp
parent6178a13bb73d000bbe49587d0ecb67ea689b043f (diff)
downloadsword-sf-cvs-1e057d67306569fcd9896dfcea1f5353810f0a48.tar.gz
sync with crosswire 20020828-1300
Diffstat (limited to 'apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp')
-rw-r--r--apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp50
1 files changed, 28 insertions, 22 deletions
diff --git a/apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp b/apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp
index 4c2252f..dbc991f 100644
--- a/apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/PrintFrm.cpp
@@ -35,14 +35,18 @@ __fastcall TPrintForm::TPrintForm(TComponent* Owner)
}
//---------------------------------------------------------------------------
-void __fastcall TPrintForm::FormShow(TObject *Sender)
-{
-
+
+void __fastcall TPrintForm::FormShow(TObject *Sender) {
if(Form1->optionsconf->Sections["Printing"]["Notice"] != "1"){
Application->MessageBox("This release of The Sword Printer is preliminary and is not yet fully functional, therefore some of the features here have been disabled. Please be sure to take a look at the formatting options to be able to fully take control of how your page will look. Also be sure to use the \"Print Preview\" feature to preview how your page(s) will look on paper before printing. Enjoy! From, The Sword Project Development Team!", "The Sword Printer", MB_ICONINFORMATION | MB_OK);
Form1->optionsconf->Sections["Printing"]["Notice"] = "1";
Form1->optionsconf->Save();
}
+}
+
+//TODO: fix! :) I added wishlist functionality with parameters that isn't implemented! :) Sorry.
+void TPrintForm::print(ListKey *keys, SWModule *module) {
+
ConfigEntMap::iterator eit;
AnsiString fontName;
BibleCSMGR *manager = Form1->mainmgr;
@@ -53,34 +57,36 @@ void __fastcall TPrintForm::FormShow(TObject *Sender)
pc = Form1->CommentaryPageControl;
radComm->Checked = true;
staticRange->Caption = "Verse Range or List";
- editStart->Text = Form1->DefaultVSKey->getText();
+ editStart->Text = (keys) ? keys->getRangeText() : Form1->DefaultVSKey->getText();
}
else if ((Form1->ActiveControl == Form1->LexDictPageControl) || (IsChild(Form1->LexDictPageControl->Handle, Form1->ActiveControl->Handle))){
pc = Form1->LexDictPageControl;
- radLD->Checked = true;
- staticRange->Caption = "Lookup Range";
- editStart->Text = Form1->DictKeyEdit->Text;
- }
- else{
- pc = Form1->TextPageControl;
+ radLD->Checked = true;
+ staticRange->Caption = "Lookup Range";
+ editStart->Text = (keys) ? WideString(keys->getRangeText()) : Form1->DictKeyEdit->Text;
+ }
+ else {
+ pc = Form1->TextPageControl;
radText->Checked = true;
staticRange->Caption = "Verse Range or List";
- editStart->Text = Form1->DefaultVSKey->getText();
- }
- FillModuleCombo();
+ editStart->Text = (keys) ? keys->getRangeText() : Form1->DefaultVSKey->getText();
+ }
- AnsiString temp;
- for(int count = 0; count < cmbModule->Items->Count; count++){
- temp = cmbModule->Items->Strings[count].SubString(2, cmbModule->Items->Strings[count].Pos("]") - 2);
- if(temp == pc->ActivePage->Caption)
- cmbModule->ItemIndex = count;
- }
- SetHint();
+ FillModuleCombo();
+
+ AnsiString temp;
+ for (int count = 0; count < cmbModule->Items->Count; count++) {
+ temp = cmbModule->Items->Strings[count].SubString(2, cmbModule->Items->Strings[count].Pos("]") - 2);
+ if (temp == pc->ActivePage->Caption)
+ cmbModule->ItemIndex = count;
+ }
+ SetHint();
fontName = ((eit = Form1->optionsconf->Sections["PrintPrefs"].find("PrintFontName")) != Form1->optionsconf->Sections["PrintPrefs"].end())? (*eit).second.c_str() : "Times New Roman";
- cmbFont->ItemIndex = cmbFont->Items->IndexOf(fontName);
- PageControl1->ActivePage = shtSelection;
+ cmbFont->ItemIndex = cmbFont->Items->IndexOf(fontName);
+ PageControl1->ActivePage = shtSelection;
SetDefaultOps();
+ ShowModal();
}
//---------------------------------------------------------------------------