Wt examples  3.7.1
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 bv, Herent, Belgium
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 {
23 public:
26  ExampleSourceViewer(const std::string& deployPath,
27  const std::string& examplesRoot,
28  const std::string& examplesType);
29 
30 private:
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 };
Wt::WStandardItemModel * model_
A simple widget to visualise a set of example source files.
void showFile()
Displayed the currently selected file.
void setExample(const std::string &exampleDir, const std::string &example)
Wt::WTreeView * exampleView_
ExampleSourceViewer(const std::string &deployPath, const std::string &examplesRoot, const std::string &examplesType)
Constructor.
void javaTraverseDir(Wt::WStandardItem *parent, const boost::filesystem::path &path)
WWidget * parent() const
void javaTraversePackages(Wt::WStandardItem *parent, const boost::filesystem::path &srcPath, const std::string packageName)
View class for source code.
Definition: SourceView.h:26
void cppTraverseDir(Wt::WStandardItem *parent, const boost::filesystem::path &path)

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13