Wt examples 3.3.12
SourceView.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#ifndef SOURCEVIEW_H
9#define SOURCEVIEW_H
10
11#include <Wt/WViewWidget>
12#include <Wt/WModelIndex>
13#include <Wt/WMemoryResource>
14
19
27{
28public:
35 SourceView(int fileNameRole, int contentRole, int filePathRole);
36
39 virtual ~SourceView();
40
46 bool setIndex(const Wt::WModelIndex& index);
47
53 virtual Wt::WWidget *renderView();
54
55private:
58
63
65
66private:
67 std::string imageExtension(const std::string& fileName);
68};
69
72#endif //SOURCEVIEW_H
View class for source code.
Definition SourceView.h:27
bool setIndex(const Wt::WModelIndex &index)
Sets the model index.
Definition SourceView.C:30
std::string imageExtension(const std::string &fileName)
Definition SourceView.C:204
int fileNameRole_
The role that is currently displayed.
Definition SourceView.h:60
Wt::WModelIndex index_
The index that is currently displayed.
Definition SourceView.h:57
virtual Wt::WWidget * renderView()
Returns the widget that renders the view.
Definition SourceView.C:95
int contentRole_
Definition SourceView.h:61
int filePathRole_
Definition SourceView.h:62
Wt::WMemoryResource * imageResource_
Definition SourceView.h:64
virtual ~SourceView()
Destructor.
Definition SourceView.C:27

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