NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
helpviewer.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19#ifndef HELPVIEWER_HPP
20#define HELPVIEWER_HPP
21
22#include <wx/wxhtml.h>
23#include <wx/wx.h>
24#include <vector>
25
26class NumeReWindow;
28
35class HelpViewer : public wxHtmlWindow
36{
37 public:
38 HelpViewer(wxWindow* parent, NumeReWindow* m_main, DocumentationBrowser* _browser) : wxHtmlWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME | wxHW_SCROLLBAR_AUTO), m_mainFrame(m_main), m_browser(_browser), m_nHistoryPointer(0) {SetFonts(wxEmptyString, "Consolas");};
39 virtual bool SetPage(const wxString& source);
40 bool ShowPageOnItem(wxString docID);
41
42 bool HistoryGoBack();
43 bool HistoryGoForward();
44 bool GoHome();
45 bool GoIndex();
46 bool Print();
47
48 private:
49 void OnKeyDown(wxKeyEvent& event);
50 void OnEnter(wxMouseEvent& event);
51 void OnLinkClick(wxHtmlLinkEvent& event);
52
55 std::vector<wxString> vHistory;
57
59};
60
61#endif
This represents the main frame of the documentation browser, which contains the tabbed layout,...
This class renders the contents of a single page on the DocumentationBrowser. It also governs the bro...
Definition: helpviewer.hpp:36
bool GoIndex()
Public member function to display the index page.
Definition: helpviewer.cpp:252
std::vector< wxString > vHistory
Definition: helpviewer.hpp:55
bool Print()
Public member function to open the print preview page.
Definition: helpviewer.cpp:265
bool ShowPageOnItem(wxString docID)
Public member function to display a content in the viewer window. The type of the content is determin...
Definition: helpviewer.cpp:67
NumeReWindow * m_mainFrame
Definition: helpviewer.hpp:53
bool HistoryGoForward()
Public member function to go one step forward in the history.
Definition: helpviewer.cpp:208
virtual bool SetPage(const wxString &source)
Set the contents to be displayed in this window.
Definition: helpviewer.cpp:45
bool GoHome()
Public member function to return to the home page.
Definition: helpviewer.cpp:239
bool HistoryGoBack()
Public member function to go one step back in the history.
Definition: helpviewer.cpp:177
void OnKeyDown(wxKeyEvent &event)
Event handler, which gets fired when the user presses a key.
Definition: helpviewer.cpp:326
void OnLinkClick(wxHtmlLinkEvent &event)
Event handler for the case that the user clicks on a link in the document.
Definition: helpviewer.cpp:357
size_t m_nHistoryPointer
Definition: helpviewer.hpp:56
DocumentationBrowser * m_browser
Definition: helpviewer.hpp:54
HelpViewer(wxWindow *parent, NumeReWindow *m_main, DocumentationBrowser *_browser)
Definition: helpviewer.hpp:38
DECLARE_EVENT_TABLE()
void OnEnter(wxMouseEvent &event)
Event handler to automatically focus the window below the mouse pointer.
Definition: helpviewer.cpp:342
This class is the actual NumeRe main frame. The application's logic is implemented here.
Definition: NumeReWindow.h:177