Wt examples 3.3.12
ExampleSourceViewer.h
Go to the documentation of this file.
1// This may look like C code, but it's really -*- C++ -*-
2/*
3 * Copyright (C) 2009 Emweb bvba
4 *
5 * See the LICENSE file for terms of use.
6 */
7
8#include <iostream>
9#include <stdlib.h>
10
11#include <Wt/WContainerWidget>
12#include <Wt/WTreeView>
13#include <Wt/WStandardItemModel>
14
15#include "FileItem.h"
16#include "SourceView.h"
17
22{
23public:
26 ExampleSourceViewer(const std::string& deployPath,
27 const std::string& examplesRoot,
28 const std::string& examplesType);
29
30private:
33
34 std::string deployPath_;
35 std::string examplesRoot_;
36 std::string examplesType_;
37
39
41 const boost::filesystem::path& path);
43 const boost::filesystem::path& path);
45 const boost::filesystem::path& srcPath,
46 const std::string packageName);
47
50 void showFile();
51
52 void handlePathChange();
53
54 void setExample(const std::string& exampleDir,
55 const std::string& example);
56};
A simple widget to visualise a set of example source files.
void setExample(const std::string &exampleDir, const std::string &example)
Wt::WStandardItemModel * model_
void javaTraversePackages(Wt::WStandardItem *parent, const boost::filesystem::path &srcPath, const std::string packageName)
Wt::WTreeView * exampleView_
void showFile()
Displayed the currently selected file.
void javaTraverseDir(Wt::WStandardItem *parent, const boost::filesystem::path &path)
void cppTraverseDir(Wt::WStandardItem *parent, const boost::filesystem::path &path)
View class for source code.
Definition SourceView.h:27
WWidget * parent() const

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8