1 #ifndef __WsSiteMapView__
2 #define __WsSiteMapView__
4 #include <Wt/WContainerWidget>
5 #include <Wt/WStandardItemModel>
6 #include <Wt/WStandardItem>
7 #include <Wt/WTreeView>
9 #include <Wt/WMessageBox>
11 #include "gdwtcore/gdToolbar.h"
12 #include "gdwtcore/gdWFileView.h"
49 WsSiteMapView(gdwtcore::viewType dlgType, gdWFileView::tbFlags flags = gdWFileView::tbDefault, Wt::WContainerWidget* parent = 0);
57 bool treeTraverse(Wt::WStandardItem* rootItem,
const std::vector<std::string>& vPath,
int nLevel);
59 bool loadTree(Wt::WStandardItem* currentItem,
NodePtr pNode, gdWFileView::skipMode skipParentDir = gdWFileView::noSkipParent);
60 bool loadFolder(Wt::WStandardItem* currentItem,
const std::string& newPath,
NodePtr curNode,
bool bEdit =
false);
61 bool loadFile(Wt::WStandardItem* currentItem,
const std::string& currentPath,
NodePtr curNode);
75 Wt::Signal<gdWFileView::signalType, std::string>
fileSelected_;
78 void onViewDblClick(Wt::WModelIndex idx, Wt::WMouseEvent mouseEvent);
85 void doDelete(Wt::StandardButton button);
115 #endif // __WsSiteMapView__
void onViewSelectionChanged()
void onViewDblClick(Wt::WModelIndex idx, Wt::WMouseEvent mouseEvent)
std::string m_selectedFile
void setCurrentPath(const std::string ¤tPath)
boost::shared_ptr< WsAbstractNode > NodePtr
bool treeTraverse(Wt::WStandardItem *rootItem, const std::vector< std::string > &vPath, int nLevel)
void onViewExpanded(Wt::WModelIndex idx)
void setRelativePath(const std::string &relativePath)
std::string m_sRootSiteMap
Wt::Signal< gdWFileView::signalType, std::string > & fileSelected()
void layoutSizeChanged(int width, int height)
std::string SiteMapPath2path(const std::string &siteMapPath)
Wt::WStandardItemModel * m_pModelTree
Wt::WTreeView * m_pTVTree
std::string selectedPath()
Wt::WTreeView * m_pTVView
std::string currentFolderPath()
WsSiteMapView(gdwtcore::viewType dlgType, gdWFileView::tbFlags flags=gdWFileView::tbDefault, Wt::WContainerWidget *parent=0)
std::string m_selectedDirectory
void onTreeExpanded(Wt::WModelIndex idx)
gdWFileView::tbFlags m_tbFlags
Wt::WStandardItemModel * m_pModelView
void doDelete(Wt::StandardButton button)
bool loadTree(Wt::WStandardItem *currentItem, NodePtr pNode, gdWFileView::skipMode skipParentDir=gdWFileView::noSkipParent)
void onTreeSelectionChanged()
Wt::Signal< gdWFileView::signalType, std::string > fileSelected_
gdToolbarItem * m_tbiNewFolder
std::string selectedDirectory()
bool loadFile(Wt::WStandardItem *currentItem, const std::string ¤tPath, NodePtr curNode)
std::string path2SiteMapPath(const std::string &path)
void treeMatchPath(NodePtr pNode)
gdToolbarItem * m_tbiDelete
bool loadFolder(Wt::WStandardItem *currentItem, const std::string &newPath, NodePtr curNode, bool bEdit=false)
void onDirectoryNameChanged(Wt::WStandardItem *pItem)
gdwtcore::viewType m_viewType
std::string selectedFile()
void setNode(NodePtr pNode)
gdToolbarItem * m_tbiRename