Doxygen
Loading...
Searching...
No Matches
HtmlHelp::Private Class Reference
Collaboration diagram for HtmlHelp::Private:

Public Member Functions

 Private ()
void createProjectFile ()

Public Attributes

std::ofstream cts
std::ofstream kts
QCString prevFile
QCString prevAnc
bool ctsItemPresent = false
int dc = 0
StringSet indexFiles
StringSet imageFiles
StringSet styleFiles
HtmlHelpRecoder recoder
HtmlHelpIndex index

Detailed Description

Definition at line 335 of file htmlhelp.cpp.

Constructor & Destructor Documentation

◆ Private()

HtmlHelp::Private::Private ( )
inline

Definition at line 338 of file htmlhelp.cpp.

338: index(recoder) {}
HtmlHelpRecoder recoder
Definition htmlhelp.cpp:348
HtmlHelpIndex index
Definition htmlhelp.cpp:349

References index, and recoder.

Member Function Documentation

◆ createProjectFile()

void HtmlHelp::Private::createProjectFile ( )

Definition at line 401 of file htmlhelp.cpp.

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

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

Member Data Documentation

◆ cts

std::ofstream HtmlHelp::Private::cts

Definition at line 340 of file htmlhelp.cpp.

◆ ctsItemPresent

bool HtmlHelp::Private::ctsItemPresent = false

Definition at line 343 of file htmlhelp.cpp.

Referenced by createProjectFile().

◆ dc

int HtmlHelp::Private::dc = 0

Definition at line 344 of file htmlhelp.cpp.

◆ imageFiles

StringSet HtmlHelp::Private::imageFiles

Definition at line 346 of file htmlhelp.cpp.

Referenced by createProjectFile().

◆ index

HtmlHelpIndex HtmlHelp::Private::index

Definition at line 349 of file htmlhelp.cpp.

Referenced by createProjectFile(), and Private().

◆ indexFiles

StringSet HtmlHelp::Private::indexFiles

Definition at line 345 of file htmlhelp.cpp.

Referenced by createProjectFile().

◆ kts

std::ofstream HtmlHelp::Private::kts

Definition at line 340 of file htmlhelp.cpp.

◆ prevAnc

QCString HtmlHelp::Private::prevAnc

Definition at line 342 of file htmlhelp.cpp.

◆ prevFile

QCString HtmlHelp::Private::prevFile

Definition at line 341 of file htmlhelp.cpp.

◆ recoder

HtmlHelpRecoder HtmlHelp::Private::recoder

Definition at line 348 of file htmlhelp.cpp.

Referenced by createProjectFile(), and Private().

◆ styleFiles

StringSet HtmlHelp::Private::styleFiles

Definition at line 347 of file htmlhelp.cpp.

Referenced by createProjectFile().


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