NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
HelpViewer Class Reference

This class renders the contents of a single page on the DocumentationBrowser. It also governs the browsing history of the current tab. More...

#include <helpviewer.hpp>

Inheritance diagram for HelpViewer:
Collaboration diagram for HelpViewer:

Public Member Functions

 HelpViewer (wxWindow *parent, NumeReWindow *m_main, DocumentationBrowser *_browser)
 
virtual bool SetPage (const wxString &source)
 Set the contents to be displayed in this window. More...
 
bool ShowPageOnItem (wxString docID)
 Public member function to display a content in the viewer window. The type of the content is determined in this function and handled correspondingly. More...
 
bool HistoryGoBack ()
 Public member function to go one step back in the history. More...
 
bool HistoryGoForward ()
 Public member function to go one step forward in the history. More...
 
bool GoHome ()
 Public member function to return to the home page. More...
 
bool GoIndex ()
 Public member function to display the index page. More...
 
bool Print ()
 Public member function to open the print preview page. More...
 

Private Member Functions

void OnKeyDown (wxKeyEvent &event)
 Event handler, which gets fired when the user presses a key. More...
 
void OnEnter (wxMouseEvent &event)
 Event handler to automatically focus the window below the mouse pointer. More...
 
void OnLinkClick (wxHtmlLinkEvent &event)
 Event handler for the case that the user clicks on a link in the document. More...
 
 DECLARE_EVENT_TABLE ()
 

Private Attributes

NumeReWindowm_mainFrame
 
DocumentationBrowserm_browser
 
std::vector< wxString > vHistory
 
size_t m_nHistoryPointer
 

Detailed Description

This class renders the contents of a single page on the DocumentationBrowser. It also governs the browsing history of the current tab.

Definition at line 35 of file helpviewer.hpp.

Constructor & Destructor Documentation

◆ HelpViewer()

HelpViewer::HelpViewer ( wxWindow *  parent,
NumeReWindow m_main,
DocumentationBrowser _browser 
)
inline

Definition at line 38 of file helpviewer.hpp.

Member Function Documentation

◆ DECLARE_EVENT_TABLE()

HelpViewer::DECLARE_EVENT_TABLE ( )
private

◆ GoHome()

bool HelpViewer::GoHome ( )

Public member function to return to the home page.

Returns
bool

Definition at line 239 of file helpviewer.cpp.

References ShowPageOnItem().

Referenced by DocumentationBrowser::OnToolbarEvent().

Here is the call graph for this function:

◆ GoIndex()

bool HelpViewer::GoIndex ( )

Public member function to display the index page.

Returns
bool

Definition at line 252 of file helpviewer.cpp.

References ShowPageOnItem().

Referenced by DocumentationBrowser::OnToolbarEvent().

Here is the call graph for this function:

◆ HistoryGoBack()

bool HelpViewer::HistoryGoBack ( )

Public member function to go one step back in the history.

Returns
bool

Definition at line 177 of file helpviewer.cpp.

References NumeReWindow::GetDocContent(), m_mainFrame, m_nHistoryPointer, SetPage(), and vHistory.

Referenced by DocumentationBrowser::OnToolbarEvent(), and ShowPageOnItem().

Here is the call graph for this function:

◆ HistoryGoForward()

bool HelpViewer::HistoryGoForward ( )

Public member function to go one step forward in the history.

Returns
bool

Definition at line 208 of file helpviewer.cpp.

References NumeReWindow::GetDocContent(), m_mainFrame, m_nHistoryPointer, SetPage(), and vHistory.

Referenced by DocumentationBrowser::OnToolbarEvent(), and ShowPageOnItem().

Here is the call graph for this function:

◆ OnEnter()

void HelpViewer::OnEnter ( wxMouseEvent &  event)
private

Event handler to automatically focus the window below the mouse pointer.

Parameters
eventwxMouseEvent&
Returns
void

Definition at line 342 of file helpviewer.cpp.

◆ OnKeyDown()

void HelpViewer::OnKeyDown ( wxKeyEvent &  event)
private

Event handler, which gets fired when the user presses a key.

Parameters
eventwxKeyEvent&
Returns
void

Definition at line 326 of file helpviewer.cpp.

References m_browser.

◆ OnLinkClick()

void HelpViewer::OnLinkClick ( wxHtmlLinkEvent &  event)
private

Event handler for the case that the user clicks on a link in the document.

Parameters
eventwxHtmlLinkEvent&
Returns
void

Definition at line 357 of file helpviewer.cpp.

References ShowPageOnItem().

Here is the call graph for this function:

◆ Print()

bool HelpViewer::Print ( )

Public member function to open the print preview page.

Returns
bool

Definition at line 265 of file helpviewer.cpp.

References _guilang, NumeReWindow::DeterminePrintSize(), g_printData, Language::get(), NumeReWindow::GetDocContent(), m_mainFrame, m_nHistoryPointer, NumeReWindow::OnPrintSetup(), and vHistory.

Referenced by DocumentationBrowser::OnToolbarEvent().

Here is the call graph for this function:

◆ SetPage()

bool HelpViewer::SetPage ( const wxString &  source)
virtual

Set the contents to be displayed in this window.

Parameters
sourceconst wxString&
Returns
bool

Definition at line 45 of file helpviewer.cpp.

Referenced by HistoryGoBack(), HistoryGoForward(), and ShowPageOnItem().

◆ ShowPageOnItem()

bool HelpViewer::ShowPageOnItem ( wxString  docID)

Public member function to display a content in the viewer window. The type of the content is determined in this function and handled correspondingly.

Parameters
docIDwxString
Returns
bool

Definition at line 67 of file helpviewer.cpp.

References DocumentationBrowser::createNewPage(), NumeReWindow::GetDocContent(), HistoryGoBack(), HistoryGoForward(), m_browser, m_mainFrame, m_nHistoryPointer, SetPage(), and vHistory.

Referenced by DocumentationBrowser::createNewPage(), GoHome(), GoIndex(), OnLinkClick(), and DocumentationBrowser::OnTreeClick().

Here is the call graph for this function:

Member Data Documentation

◆ m_browser

DocumentationBrowser* HelpViewer::m_browser
private

Definition at line 54 of file helpviewer.hpp.

Referenced by OnKeyDown(), and ShowPageOnItem().

◆ m_mainFrame

NumeReWindow* HelpViewer::m_mainFrame
private

Definition at line 53 of file helpviewer.hpp.

Referenced by HistoryGoBack(), HistoryGoForward(), Print(), and ShowPageOnItem().

◆ m_nHistoryPointer

size_t HelpViewer::m_nHistoryPointer
private

Definition at line 56 of file helpviewer.hpp.

Referenced by HistoryGoBack(), HistoryGoForward(), Print(), and ShowPageOnItem().

◆ vHistory

std::vector<wxString> HelpViewer::vHistory
private

Definition at line 55 of file helpviewer.hpp.

Referenced by HistoryGoBack(), HistoryGoForward(), Print(), and ShowPageOnItem().


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