Skip to main content

The Private Class Reference

Declaration

class HtmlHelp::Private { ... }

Public Constructors Index

Private ()

Public Member Functions Index

voidcreateProjectFile ()

Public Member Attributes Index

std::ofstreamcts
std::ofstreamkts
QCStringprevFile
QCStringprevAnc
boolctsItemPresent = false
intdc = 0
StringSetindexFiles
StringSetimageFiles
StringSetstyleFiles
HtmlHelpRecoderrecoder
HtmlHelpIndexindex

Definition at line 339 of file htmlhelp.cpp.

Public Constructors

Private()

HtmlHelp::Private::Private ()
inline

Definition at line 342 of file htmlhelp.cpp.

References index and recoder.

Public Member Functions

createProjectFile()

void HtmlHelp::Private::createProjectFile ()

Definition at line 343 of file htmlhelp.cpp.

406{
407 /* Write the project file */
408 QCString fName = Config_getString(HTML_OUTPUT) + "/" + hhpFileName;
409 std::ofstream t = Portable::openOutputStream(fName);
410 if (t.is_open())
411 {
412 QCString hhcFile = "\"" + hhcFileName + "\"";
413 QCString hhkFile = "\"" + hhkFileName + "\"";
414 bool hhkPresent = index.size()>0;
415 if (!ctsItemPresent) hhcFile = "";
416 if (!hhkPresent) hhkFile = "";
417
418 QCString indexName="index"+Doxygen::htmlFileExtension;
419 t << "[OPTIONS]\n";
420 if (!Config_getString(CHM_FILE).isEmpty())
421 {
422 t << "Compiled file=" << Config_getString(CHM_FILE) << "\n";
423 }
424 else
425 {
426 t << "Compiled file=index.chm\n";
427 }
428 t << "Compatibility=1.1\n"
429 "Full-text search=Yes\n";
430 if (ctsItemPresent) t << "Contents file=" + hhcFileName + "\n";
431 t << "Default Window=main\n"
432 "Default topic=" << indexName << "\n";
433 if (hhkPresent) t << "Index file=" + hhkFileName + "\n";
434 t << "Language=" << theTranslator->getLanguageString() << "\n";
435 if (Config_getBool(BINARY_TOC)) t << "Binary TOC=YES\n";
436 if (Config_getBool(GENERATE_CHI)) t << "Create CHI file=YES\n";
437 t << "Title=" << recoder.recode(Config_getString(PROJECT_NAME)) << "\n\n";
438
439 t << "[WINDOWS]\n";
440
441 // NOTE: the 1063038 number is a set of bits specifying the buttons
442 // which should appear in the CHM viewer; that specific value
443 // means "show all buttons including the font-size one";
444 // the font-size one is not normally settable by the HTML Help Workshop
445 // utility but the way to set it is described here:
446 // http://support.microsoft.com/?scid=kb%3Ben-us%3B240062&x=17&y=18
447 // NOTE: the 7354494 number in addition to the above the Next and Prev button
448 // are shown. They can only be shown in case of a binary toc.
449 // dee http://www.mif2go.com/xhtml/htmlhelp_0016_943addingtabsandtoolbarbuttonstohtmlhelp.htm#Rz108x95873
450 // Value has been taken from htmlhelp.h file of the HTML Help Workshop
451 if (Config_getBool(BINARY_TOC))
452 {
453 t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
454 << hhkFile << ",\"" << indexName << "\",\"" <<
455 indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0\n\n";
456 }
457 else
458 {
459 t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
460 << hhkFile << ",\"" << indexName << "\",\"" <<
461 indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0\n\n";
462 }
463
464 t << "[FILES]\n";
465 for (auto &s : indexFiles)
466 {
467 t << s.c_str() << "\n";
468 }
469 for (auto &s : imageFiles)
470 {
471 t << s.c_str() << "\n";
472 }
473 for (auto &s : styleFiles)
474 {
475 t << s.c_str() << "\n";
476 }
477 t.close();
478 }
479 else
480 {
481 err("Could not open file {} for writing\n",fName);
482 }
483}

References Config_getBool, Config_getString, ctsItemPresent, err, HtmlHelp::hhcFileName, HtmlHelp::hhkFileName, HtmlHelp::hhpFileName, Doxygen::htmlFileExtension, imageFiles, index, indexFiles, Portable::openOutputStream, recoder, styleFiles and theTranslator.

Public Member Attributes

cts

std::ofstream HtmlHelp::Private::cts

Definition at line 344 of file htmlhelp.cpp.

344 std::ofstream cts,kts;

ctsItemPresent

bool HtmlHelp::Private::ctsItemPresent = false

Definition at line 347 of file htmlhelp.cpp.

347 bool ctsItemPresent = false;

Referenced by createProjectFile.

dc

int HtmlHelp::Private::dc = 0

Definition at line 348 of file htmlhelp.cpp.

348 int dc = 0;

imageFiles

StringSet HtmlHelp::Private::imageFiles

Definition at line 350 of file htmlhelp.cpp.

Referenced by createProjectFile.

index

HtmlHelpIndex HtmlHelp::Private::index

Definition at line 353 of file htmlhelp.cpp.

Referenced by createProjectFile and Private.

indexFiles

StringSet HtmlHelp::Private::indexFiles

Definition at line 349 of file htmlhelp.cpp.

Referenced by createProjectFile.

kts

std::ofstream HtmlHelp::Private::kts

Definition at line 344 of file htmlhelp.cpp.

344 std::ofstream cts,kts;

prevAnc

QCString HtmlHelp::Private::prevAnc

Definition at line 346 of file htmlhelp.cpp.

prevFile

QCString HtmlHelp::Private::prevFile

Definition at line 345 of file htmlhelp.cpp.

recoder

HtmlHelpRecoder HtmlHelp::Private::recoder

Definition at line 352 of file htmlhelp.cpp.

Referenced by createProjectFile and Private.

styleFiles

StringSet HtmlHelp::Private::styleFiles

Definition at line 351 of file htmlhelp.cpp.

Referenced by createProjectFile.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus by Doxygen 1.14.0.