#include <chmfile.h>
Public Member Functions | |
CHMFile () | |
Default constructor. Doesn't do anthing except some initializations. | |
CHMFile (const wxString &archiveName) | |
This constructor attempts to open the .chm file passed as it's argument. If it fails, IsOk() will return false. | |
~CHMFile () | |
Destructor. If a file has been succesfully opened, it closes it. | |
wxString | HomePage () const |
Gets the name of the default page in the archive. | |
wxString | TopicsFile () const |
Gets name of the .hhc file in the archive that could potentially be used to generate content information from. | |
wxString | ArchiveName () const |
Gets the filename of the currently opened .chm file. | |
wxString | IndexFile () const |
Gets name of the .hhk file in the archive that could potentially be used to generate content information from. | |
wxString | Title () const |
Gets the name of the opened .chm. | |
wxString | DefaultFont () const |
Gets the name of the default font. | |
bool | IsOk () const |
Checks if the last attempt to load a .chm file was succesful. | |
bool | LoadCHM (const wxString &archiveName) |
Attempts to load a .chm file from disk. | |
void | CloseCHM () |
Closes the currently opened .chm, or does nothing if none opened. | |
bool | GetTopicsTree (wxTreeCtrl *toBuild) |
Attempts to create a wxTreeCtrl by parsing the topics file, or if that's not available, the index file. | |
bool | IndexSearch (const wxString &text, bool wholeWords, bool titlesOnly, CHMSearchResults *results) |
Fast search using the $FIftiMain file in the .chm. | |
bool | ResolveObject (const wxString &fileName, chmUnitInfo *ui) |
Looks up fileName in the archive. | |
size_t | RetrieveObject (chmUnitInfo *ui, unsigned char *buffer, off_t fileOffset, size_t bufferSize) |
Retrieves an uncompressed chunk of a file in the .chm. | |
Private Member Functions | |
bool | GetArchiveInfo () |
Helper. Initializes most of the private data members. | |
u_int32_t | GetLeafNodeOffset (const wxString &text, u_int32_t initalOffset, u_int32_t buffSize, u_int16_t treeDepth, chmUnitInfo *ui) |
Helper. Returns the $FIftiMain offset of leaf node or 0. | |
bool | ProcessWLC (u_int64_t wlc_count, u_int64_t wlc_size, u_int32_t wlc_offset, unsigned char ds, unsigned char dr, unsigned char cs, unsigned char cr, unsigned char ls, unsigned char lr, chmUnitInfo *uifmain, chmUnitInfo *uitbl, chmUnitInfo *uistrings, chmUnitInfo *topics, chmUnitInfo *urlstr, CHMSearchResults *results) |
Helper. Processes the word location code entries while searching. | |
CHMFile (const CHMFile &) | |
No copy construction allowed. | |
CHMFile & | operator= (const CHMFile &) |
No assignments. | |
Private Attributes | |
chmFile * | _chmFile |
wxString | _filename |
wxString | _home |
wxString | _topicsFile |
wxString | _indexFile |
wxString | _title |
wxString | _font |
|
This constructor attempts to open the .chm file passed as it's argument. If it fails, IsOk() will return false.
|
|
Gets the filename of the currently opened .chm file.
|
|
Gets the name of the default font.
|
|
Attempts to create a wxTreeCtrl by parsing the topics file, or if that's not available, the index file.
|
|
Gets the name of the default page in the archive.
|
|
Gets name of the .hhk file in the archive that could potentially be used to generate content information from.
|
|
Fast search using the $FIftiMain file in the .chm.
|
|
Checks if the last attempt to load a .chm file was succesful.
|
|
Attempts to load a .chm file from disk.
|
|
Looks up fileName in the archive.
|
|
Retrieves an uncompressed chunk of a file in the .chm.
|
|
Gets the name of the opened .chm.
|
|
Gets name of the .hhc file in the archive that could potentially be used to generate content information from.
|