8 #define WS_MODULE_H__ 1
12 #include <boost/any.hpp>
14 #include <Wt/WContainerWidget>
43 virtual Wt::WWidget*
createContents(Wt::WContainerWidget* parent = 0)
const = 0;
47 virtual Wt::WWidget*
createAdmin(Wt::WContainerWidget* parent = 0)
const = 0;
53 virtual std::string
checkPath(
const std::string& currentPath);
61 const std::string&
soName()
const;
74 const std::string&
prefix()
const;
89 const std::string&
sysPath()
const ;
94 const std::string&
diffPath()
const ;
128 #endif // ifndef WsModule_H__
virtual bool processPrefix(const std::string &path)
proccess the prefix, return true if processed
const std::string & diffPath() const
virtual Wt::WWidget * createAdmin(Wt::WContainerWidget *parent=0) const =0
Create the contents for an administrator.
const std::string & sysPath() const
std::string pathWithPrefix(const std::string &path)
return the relative path with the prefix : example pathWithPrefix("/Test") return "/SiteMap/Test" ...
std::vector< std::string > m_extensions
virtual std::string description() const =0
Return the description of the module.
void setLoaded()
Some modules can be loaded on startup, no more actions is required by the content widget...
std::string pathWithoutPrefix(const std::string &path)
return the relative path without the prefix : example pathWithoutPrefix("/SiteMap/Test") return "/Tes...
void setDiffPath(const std::string &diffPath)
Set/Get the difference between the web server (example Apache /var/www) root path and the wittishare ...
WsContentButtonsBar * contentButtonsBar()
WittyShare provide a container to add some buttons like export page in pdf, ..., This function allow ...
virtual WsEditorWidget * createEditor(Wt::WContainerWidget *parent=0) const =0
Create the contents for an editor (create a view of options).
void setFileName(const std::string &fileName)
Set/Get the file name that trigger the module : exemple "Staff List".
void setHideImages(const bool bHide)
Set/Get the flag to specified if the images is hided.
const std::string & soName() const
virtual std::string checkPath(const std::string ¤tPath)
Return the currentPath, or another path when some action is required for the currentPath example /New...
virtual Wt::WWidget * createContents(Wt::WContainerWidget *parent=0) const =0
Create the contents.
const std::string & moduleName() const
void setPrefix(const std::string &prefix)
Set/Get prefix for a virtual path, like "/SiteMap".
void setModuleName(const std::string &name)
Set/Get the module name.
const std::string & prefix() const
virtual void destroyContentsMenuBar()
virtual Wt::WWidget * createContentsMenuBar(Wt::WContainerWidget *parent=0) const =0
Create the functionalities.
const std::string & fileName() const
void setSoName(const std::string &soName)
Set/Get the module so name or path ex. libgd.so or /usr/lib/libgd.so.
void setExtensions(const std::string &extensions)
Set/Get the file extension managed by the module : exemple .ods|.odp.
const std::string & extension(const std::string &extension="") const
void setSysPath(const std::string &sysPath)
Set/Get the system path (example the selected file /var/www/mysite/about/me.fhtml).