Logo Search packages:      
Sourcecode: xchm version File versions

CHMFile Class Reference

#include <chmfile.h>

List of all members.


Detailed Description

Mostly a C++ wrapper around the CHMLIB facilities. Concrete class.

Definition at line 63 of file chmfile.h.


Public Member Functions

wxString ArchiveName () const
 Gets the filename of the currently opened .chm file.
bool AreContextIDsLoaded () const
 Have the context-IDs been loaded into memory or not.
 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 ()
 Default constructor.
void CloseCHM ()
 Closes the currently opened .chm, or does nothing if none opened.
wxString DefaultFont () const
 Gets the name of the default font.
wxFontEncoding DesiredEncoding () const
 Determines the encoding that the CHM creator would like me to use. To be used in combination with DefaultFont().
bool GetIndex (CHMListCtrl *toBuild)
 Attempts to fill a CHMListCtrl by parsing the index file.
wxString GetPageByCID (const int contextID)
 Looks up the page referred to by the context-ID.
bool GetTopicsTree (wxTreeCtrl *toBuild)
 Attempts to fill a wxTreeCtrl by parsing the topics file.
bool HasChanged ()
 Checks if a 'ms-its' link has been clicked and the chm changed.
wxString HomePage () const
 Gets the name of the default page in the archive.
wxString IndexFile () const
 Gets name of the .hhk file in the archive that could potentially be used to generate content information from.
bool IndexSearch (const wxString &text, bool wholeWords, bool titlesOnly, CHMSearchResults *results)
 Fast search using the $FIftiMain file in the .chm.
bool IsOk () const
 Checks if the last attempt to load a .chm file was succesful.
bool IsValidCID (const int contextID)
 Checks whether or not the context ID is valid for the loaded file.
bool LoadCHM (const wxString &archiveName)
 Attempts to load a .chm file from disk.
bool LoadContextIDs ()
 Attempts to build an index of context-ID/page pairs from the file.
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.
wxString Title () const
 Gets the name of the opened .chm.
wxString TopicsFile () const
 Gets name of the .hhc file in the archive that could potentially be used to generate content information from.
 ~CHMFile ()
 Destructor. If a file has been succesfully opened, it closes it.

Private Member Functions

 CHMFile (const CHMFile &)
 No copy construction allowed.
bool GetArchiveInfo ()
 Helper. Initializes most of the private data members.
void GetFileAsString (wxString &str, chmUnitInfo *ui)
 Puts in the str parameter the contents of the file referred by ui.
wxFontEncoding GetFontEncFromCharSet (int cs)
 Helper. Translates from Win32 encodings to generic wxWidgets ones.
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 InfoFromSystem ()
 Looks up as much information as possible from SYSTEM.
bool InfoFromWindows ()
 Looks up as much information as possible from WINDOWS/STRINGS.
CHMFileoperator= (const CHMFile &)
 No assignments.
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.

Private Attributes

chmFile * _chmFile
CHMIDMap _cidMap
wxFontEncoding _enc
wxString _filename
wxString _font
wxString _home
wxString _indexFile
wxString _title
wxString _topicsFile

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

Generated by  Doxygen 1.6.0   Back to index