NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
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>
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 |
IconManager * | m_manager |
ViewerBook * | m_docTabs |
wxString | m_titleTemplate |
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.
DocumentationBrowser::DocumentationBrowser | ( | wxWindow * | parent, |
const wxString & | titletemplate, | ||
NumeReWindow * | mainwindow | ||
) |
Documentation browser constructor.
parent | wxWindow* |
titletemplate | const wxString& |
mainwindow | NumeReWindow* |
Definition at line 50 of file documentationbrowser.cpp.
References _guilang, TreePanel::AddWindows(), Language::get(), and onPageClose().
DocumentationBrowser::~DocumentationBrowser | ( | ) |
Documentation browser destructor. Removes the created IconManager object.
Definition at line 105 of file documentationbrowser.cpp.
References m_manager.
bool DocumentationBrowser::createNewPage | ( | const wxString & | docId | ) |
Create a new viewer in a new page.
docId | const wxString& |
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().
DocumentationBrowser::DECLARE_EVENT_TABLE | ( | ) |
|
private |
This private member function prepares the index tree of the documentation browser.
mainwindow | NumeReWindow* |
Definition at line 159 of file documentationbrowser.cpp.
References NumeReWindow::GetDocIndex(), IconManager::GetIconIndex(), m_doctree, and m_manager.
|
private |
Finds and selects the page with the passed title or returns false.
title | const wxString& |
Definition at line 188 of file documentationbrowser.cpp.
References m_docTabs.
Referenced by createNewPage().
void DocumentationBrowser::onPageChange | ( | wxAuiNotebookEvent & | event | ) |
Event handler function called, when the user switches the tabs.
event | wxAuiNotebookEvent& |
Definition at line 323 of file documentationbrowser.cpp.
References m_docTabs, and m_titleTemplate.
void DocumentationBrowser::onPageClose | ( | wxAuiNotebookEvent & | event | ) |
Event handler called, when the user closes the tab in some way.
event | wxAuiNotebookEvent& |
Definition at line 337 of file documentationbrowser.cpp.
References m_docTabs.
Referenced by DocumentationBrowser().
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.
event | wxCommandEvent& |
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().
void DocumentationBrowser::OnTreeClick | ( | wxTreeEvent & | event | ) |
Event handler function to load the documentation article describing the clicked item.
event | wxTreeEvent& |
Definition at line 212 of file documentationbrowser.cpp.
References m_docTabs, m_doctree, setCurrentTabText(), and HelpViewer::ShowPageOnItem().
|
private |
Private member function to prepare the toolbar of the main frame.
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.
void DocumentationBrowser::setCurrentTabText | ( | const wxString & | text | ) |
Change the text displayed on the current tab.
text | const wxString& |
Definition at line 308 of file documentationbrowser.cpp.
References m_docTabs.
Referenced by OnToolbarEvent(), and OnTreeClick().
bool DocumentationBrowser::SetStartPage | ( | const wxString & | docId | ) |
Public interface to set the start page.
docId | const wxString& |
Definition at line 118 of file documentationbrowser.cpp.
References createNewPage().
Referenced by NumeReWindow::ShowHelp().
|
private |
Definition at line 42 of file documentationbrowser.hpp.
Referenced by createNewPage(), findAndSelectPage(), onPageChange(), onPageClose(), OnToolbarEvent(), OnTreeClick(), and setCurrentTabText().
|
private |
Definition at line 40 of file documentationbrowser.hpp.
Referenced by fillDocTree(), and OnTreeClick().
|
private |
Definition at line 41 of file documentationbrowser.hpp.
Referenced by fillDocTree(), and ~DocumentationBrowser().
|
private |
Definition at line 43 of file documentationbrowser.hpp.
Referenced by createNewPage(), and onPageChange().