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

This represents the main frame of the documentation browser, which contains the tabbed layout, the index tree and the documentation viewers themselves. More...

#include <documentationbrowser.hpp>

Inheritance diagram for DocumentationBrowser:
Collaboration diagram for DocumentationBrowser:

Public Member Functions

 DocumentationBrowser (wxWindow *parent, const wxString &titletemplate, NumeReWindow *mainwindow)
 Documentation browser constructor. More...
 
 ~DocumentationBrowser ()
 Documentation browser destructor. Removes the created IconManager object. More...
 
bool SetStartPage (const wxString &docId)
 Public interface to set the start page. More...
 
void OnTreeClick (wxTreeEvent &event)
 Event handler function to load the documentation article describing the clicked item. More...
 
void OnToolbarEvent (wxCommandEvent &event)
 Event handler function for clicks on the toolbar of the current window. Redirects all clicks to the HelpViewer class of the currently opened page. More...
 
bool createNewPage (const wxString &docId)
 Create a new viewer in a new page. More...
 
void setCurrentTabText (const wxString &text)
 Change the text displayed on the current tab. More...
 
void onPageChange (wxAuiNotebookEvent &event)
 Event handler function called, when the user switches the tabs. More...
 
void onPageClose (wxAuiNotebookEvent &event)
 Event handler called, when the user closes the tab in some way. More...
 
 DECLARE_EVENT_TABLE ()
 
- Public Member Functions inherited from ViewerFrame
 ViewerFrame (wxWindow *parent, const wxString &title)
 
void OnKeyDown (wxKeyEvent &event)
 This event handler closes the frame, if the user presses ESC. More...
 
void OnFocus (wxFocusEvent &event)
 This event handler passes the keyboard focus down to the first child in the window list, if the frame gets keyboard focus. More...
 
void OnEnter (wxMouseEvent &event)
 This event handler get the keyboard focus, if the user enters with the mouse. More...
 
void OnClose (wxCloseEvent &event)
 This event handler informs all child windows that this frame will now close. It furthermore automatically unregisters itself in the opened window list. More...
 
 DECLARE_EVENT_TABLE ()
 

Private Member Functions

void prepareToolbar ()
 Private member function to prepare the toolbar of the main frame. More...
 
void fillDocTree (NumeReWindow *mainwindow)
 This private member function prepares the index tree of the documentation browser. More...
 
bool findAndSelectPage (const wxString &title)
 Finds and selects the page with the passed title or returns false. More...
 

Private Attributes

wxTreeCtrl * m_doctree
 
IconManagerm_manager
 
ViewerBookm_docTabs
 
wxString m_titleTemplate
 

Detailed Description

This represents the main frame of the documentation browser, which contains the tabbed layout, the index tree and the documentation viewers themselves.

Definition at line 37 of file documentationbrowser.hpp.

Constructor & Destructor Documentation

◆ DocumentationBrowser()

DocumentationBrowser::DocumentationBrowser ( wxWindow *  parent,
const wxString &  titletemplate,
NumeReWindow mainwindow 
)

Documentation browser constructor.

Parameters
parentwxWindow*
titletemplateconst wxString&
mainwindowNumeReWindow*

Definition at line 50 of file documentationbrowser.cpp.

References _guilang, TreePanel::AddWindows(), Language::get(), and onPageClose().

Here is the call graph for this function:

◆ ~DocumentationBrowser()

DocumentationBrowser::~DocumentationBrowser ( )

Documentation browser destructor. Removes the created IconManager object.

Definition at line 105 of file documentationbrowser.cpp.

References m_manager.

Member Function Documentation

◆ createNewPage()

bool DocumentationBrowser::createNewPage ( const wxString &  docId)

Create a new viewer in a new page.

Parameters
docIdconst wxString&
Returns
bool

Definition at line 271 of file documentationbrowser.cpp.

References findAndSelectPage(), NumeReWindow::GetDocContent(), m_docTabs, m_titleTemplate, and HelpViewer::ShowPageOnItem().

Referenced by SetStartPage(), and HelpViewer::ShowPageOnItem().

Here is the call graph for this function:

◆ DECLARE_EVENT_TABLE()

DocumentationBrowser::DECLARE_EVENT_TABLE ( )

◆ fillDocTree()

void DocumentationBrowser::fillDocTree ( NumeReWindow mainwindow)
private

This private member function prepares the index tree of the documentation browser.

Parameters
mainwindowNumeReWindow*
Returns
void

Definition at line 159 of file documentationbrowser.cpp.

References NumeReWindow::GetDocIndex(), IconManager::GetIconIndex(), m_doctree, and m_manager.

Here is the call graph for this function:

◆ findAndSelectPage()

bool DocumentationBrowser::findAndSelectPage ( const wxString &  title)
private

Finds and selects the page with the passed title or returns false.

Parameters
titleconst wxString&
Returns
bool

Definition at line 188 of file documentationbrowser.cpp.

References m_docTabs.

Referenced by createNewPage().

◆ onPageChange()

void DocumentationBrowser::onPageChange ( wxAuiNotebookEvent &  event)

Event handler function called, when the user switches the tabs.

Parameters
eventwxAuiNotebookEvent&
Returns
void

Definition at line 323 of file documentationbrowser.cpp.

References m_docTabs, and m_titleTemplate.

◆ onPageClose()

void DocumentationBrowser::onPageClose ( wxAuiNotebookEvent &  event)

Event handler called, when the user closes the tab in some way.

Parameters
eventwxAuiNotebookEvent&
Returns
void

Definition at line 337 of file documentationbrowser.cpp.

References m_docTabs.

Referenced by DocumentationBrowser().

◆ OnToolbarEvent()

void DocumentationBrowser::OnToolbarEvent ( wxCommandEvent &  event)

Event handler function for clicks on the toolbar of the current window. Redirects all clicks to the HelpViewer class of the currently opened page.

Parameters
eventwxCommandEvent&
Returns
void

Definition at line 234 of file documentationbrowser.cpp.

References HelpViewer::GoHome(), HelpViewer::GoIndex(), HelpViewer::HistoryGoBack(), HelpViewer::HistoryGoForward(), ID_HELP_GO_BACK, ID_HELP_GO_FORWARD, ID_HELP_HOME, ID_HELP_INDEX, ID_HELP_PRINT, m_docTabs, HelpViewer::Print(), and setCurrentTabText().

Here is the call graph for this function:

◆ OnTreeClick()

void DocumentationBrowser::OnTreeClick ( wxTreeEvent &  event)

Event handler function to load the documentation article describing the clicked item.

Parameters
eventwxTreeEvent&
Returns
void

Definition at line 212 of file documentationbrowser.cpp.

References m_docTabs, m_doctree, setCurrentTabText(), and HelpViewer::ShowPageOnItem().

Here is the call graph for this function:

◆ prepareToolbar()

void DocumentationBrowser::prepareToolbar ( )
private

Private member function to prepare the toolbar of the main frame.

Returns
void

Definition at line 131 of file documentationbrowser.cpp.

References _guilang, Language::get(), ID_HELP_GO_BACK, ID_HELP_GO_FORWARD, ID_HELP_HOME, ID_HELP_INDEX, and ID_HELP_PRINT.

Here is the call graph for this function:

◆ setCurrentTabText()

void DocumentationBrowser::setCurrentTabText ( const wxString &  text)

Change the text displayed on the current tab.

Parameters
textconst wxString&
Returns
void

Definition at line 308 of file documentationbrowser.cpp.

References m_docTabs.

Referenced by OnToolbarEvent(), and OnTreeClick().

◆ SetStartPage()

bool DocumentationBrowser::SetStartPage ( const wxString &  docId)

Public interface to set the start page.

Parameters
docIdconst wxString&
Returns
bool

Definition at line 118 of file documentationbrowser.cpp.

References createNewPage().

Referenced by NumeReWindow::ShowHelp().

Here is the call graph for this function:

Member Data Documentation

◆ m_docTabs

ViewerBook* DocumentationBrowser::m_docTabs
private

◆ m_doctree

wxTreeCtrl* DocumentationBrowser::m_doctree
private

Definition at line 40 of file documentationbrowser.hpp.

Referenced by fillDocTree(), and OnTreeClick().

◆ m_manager

IconManager* DocumentationBrowser::m_manager
private

Definition at line 41 of file documentationbrowser.hpp.

Referenced by fillDocTree(), and ~DocumentationBrowser().

◆ m_titleTemplate

wxString DocumentationBrowser::m_titleTemplate
private

Definition at line 43 of file documentationbrowser.hpp.

Referenced by createNewPage(), and onPageChange().


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