ultimatepp/bazaar/HelpViewer/HelpViewer.h
micio 262d11617b HelpViewer : Help Window class with TOC (Table of Contents) handling
git-svn-id: svn://ultimatepp.org/upp/trunk@2649 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2010-09-01 15:43:10 +00:00

57 lines
1,016 B
C++

#ifndef _HelpViewer_HelpViewer_h
#define _HelpViewer_HelpViewer_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
/*
#define IMAGEFILE <HelpViewer/HelpViewer.iml>
#include <Draw/iml_header.h>
*/
class HelpViewer : public TopWindow
{
private:
Splitter splitter;
ParentCtrl tocPane;
RichTextView contentsPane;
TreeCtrl mainTocTree;
// reacts on TOC link selection
void tocLinkCb();
// reacts on link selection inside content pane
void contentLinkCb(String const &link);
ToolBar toolbar;
Zoom zoom;
struct Pos : Moveable<Pos>
{
String link;
int scy;
};
Vector<Pos> back;
Vector<Pos> forward;
String current_link;
// appends a treeCtrl to main tocCtrl
void AppendTOC(TreeCtrl const &t, int curId = 0, int destId = 0);
public:
typedef HelpViewer CLASSNAME;
HelpViewer();
// loads TOC contents
bool LoadTOC(String const &toc);
// clears contents
void Clear() { mainTocTree.Clear(); }
};
#endif