Logo Search packages:      
Sourcecode: xchm version File versions

CHMHtmlWindow Class Reference

#include <chmhtmlwindow.h>

Inheritance diagram for CHMHtmlWindow:


List of all members.

Detailed Description

Custom HTML widget class. Needed for sychnronization between the topics tree control and the currently displayed page.

Definition at line 58 of file chmhtmlwindow.h.

Public Member Functions

void AbsoluteFollows ()
 Let the htmlWindow know the next param to LoadPage() will be an absolute path.
 CHMHtmlWindow (wxWindow *parent, wxTreeCtrl *tc, CHMFrame *frame)
 Initializes the widget.
bool IsCaller () const
bool LoadPage (const wxString &location)
 Override. Looks up the wanted page in the tree and selects it.
void OnBack (wxCommandEvent &event)
 Called when the user selects 'Back' from the popup menu.
void OnForward (wxCommandEvent &event)
 Called when the user selects 'Forward' from the popup menu.
void SetSync (bool value)
 Dictates the behaviour of LoadPage(). If SetSync() has been called with a true parameter, the tree control will be updated by LoadPage(). Otherwise, it will not be updated.
 ~CHMHtmlWindow ()
 Destructor. Deletes heap objects allocated in the constructor.

Protected Member Functions

void OnLinkClicked (const wxHtmlLinkInfo &link)
 Overridden. Called when the user clicks on a link.
wxHtmlOpeningStatus OnOpeningURL (wxHtmlURLType type, const wxString &url, wxString *redirect) const
 Overridden to correct relative images paths.
void OnRightClick (wxMouseEvent &event)
 Called when the user right clicks the HTML window.

Private Member Functions

bool FixRelativePath (wxString &location, const wxString &prefix) const
 Helper. Fixes ../dir/file locations.
wxString GetPrefix (const wxString &location) const
 Helper. Returns the prefix of the currently loaded page.
void Sync (wxTreeItemId root, const wxString &page)
 Helper. Recursively looks for the opened page in the tree.

Private Attributes

bool _absolute
bool _found
wxMenu * _menu
wxString _prefix
bool _syncTree
wxTreeCtrl * _tcl

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

Generated by  Doxygen 1.6.0   Back to index