Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsModImages2.cpp
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2006-Today Guy Deleeuw
3 *
4 * See the LICENSE file for terms of use.
5 */
6 
7 #include <dlfcn.h>
8 #include <stdio.h>
9 
10 #include <iostream>
11 #include <fstream>
12 
13 #include <Wt/WLogger>
14 #include <Wt/WTheme>
15 
16 #include <Logger/WsLogger.h>
17 #include <Main/WsApplication.h>
18 
19 #include "WsModImages2.h"
20 #include "WsImages2.h"
21 
22 extern "C" {
23  void WsModImages2Init(void)
24  {
25  void* hndl = dlopen("libwt.so", RTLD_NOW | RTLD_GLOBAL);
26  if ( hndl == NULL ) {
27  fprintf(stderr, "WsModImages2Init : cannot load libwt.so shared library! %s\n", dlerror());
28  return;
29  }
30  }
31 }
32 
34  : WsModule()
35 {
36  wApp->messageResourceBundle().use(wApp->docRoot() + wApp->resourcesUrl() + "WsModImages2/Transl/WsModImages2");
37 }
38 
40 {
41 }
42 
43 WWidget* WsModImages2::createContentsMenuBar(WContainerWidget* parent) const
44 {
45  return 0;
46 }
47 
48 WWidget* WsModImages2::createContents(WContainerWidget* parent) const
49 {
50  WsImages2* pImg = new WsImages2(parent);
51  pImg->setOptions(options());
52  return pImg;
53 }
54 
55 WsEditorWidget* WsModImages2::createEditor(WContainerWidget* parent) const
56 {
57  return 0;
58 }
59 
60 WWidget* WsModImages2::createAdmin(WContainerWidget* parent) const
61 {
62  return 0;
63 }
64 
65 std::string WsModImages2::description() const
66 {
67  return "WsModImages2 wittyShare module";
68 }
69 
WsEditorWidget * createEditor(Wt::WContainerWidget *parent=0) const
Create the contents for an editor (create a view of options).
Wt::WWidget * createAdmin(Wt::WContainerWidget *parent=0) const
Create the contents for an administrator.
void WsModImages2Init(void)
Wt::WWidget * createContentsMenuBar(Wt::WContainerWidget *parent=0) const
Create the functionalities.
std::string description() const
Return the description of the module.
const std::vector< WsOption > & options() const
Get all options.
Definition: WsOption.cpp:70
Wt::WWidget * createContents(Wt::WContainerWidget *parent=0) const
Create the contents.
void setOptions(const std::vector< WsOption > &vOptions)
Set all options.
Definition: WsOption.cpp:57
WsModImages2()
CTor.
a wittyShare class that render images randomly