Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsModAnchor.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 
12 #include <boost/filesystem.hpp>
13 
14 #include <Wt/WLogger>
15 #include <Wt/WText>
16 #include <Wt/WAnchor>
17 #include <Wt/WImage>
18 #include <Wt/WLink>
19 #include <Wt/WString>
20 
21 #include <gdcore/gdCore.h>
22 
23 #include <Logger/WsLogger.h>
24 
25 #include <Main/WsApplication.h>
26 
27 #include "WsModAnchor.h"
28 #include "WsAnchor.h"
29 
30 extern "C" {
31  void WsModAnchorInit(void)
32  {
33  void* hndl = dlopen("libwt.so", RTLD_NOW | RTLD_GLOBAL);
34  if ( hndl == NULL ) {
35  fprintf(stderr, "cannot load libwt.so shared library! %s\n", dlerror());
36  return;
37  }
38  }
39 }
40 
41 using namespace Wt;
42 
43 // Class WsModAnchor
44 // =====================
46  : WsModule()
47 {
48 }
49 
51 {
52 }
53 
54 WWidget* WsModAnchor::createContentsMenuBar(WContainerWidget* parent) const
55 {
56  return 0;
57 }
58 
59 WWidget* WsModAnchor::createContents(WContainerWidget* parent) const
60 {
61  WsAnchor* pAnchor = new WsAnchor(parent);
62  pAnchor->setOptions(options());
63  return pAnchor;
64 }
65 
66 WsEditorWidget* WsModAnchor::createEditor(WContainerWidget* parent) const
67 {
68  return 0;
69 }
70 
71 WWidget* WsModAnchor::createAdmin(WContainerWidget* parent) const
72 {
73  return 0;
74 }
75 
76 std::string WsModAnchor::description() const
77 {
78  return "WsModAnchor wittyShare module";
79 }
80 
Wt::WWidget * createContents(Wt::WContainerWidget *parent=0) const
Create the contents.
Definition: WsModAnchor.cpp:59
WsModAnchor()
CTor.
Definition: WsModAnchor.cpp:45
std::string description() const
Return the description of the module.
Definition: WsModAnchor.cpp:76
Wt::WWidget * createAdmin(Wt::WContainerWidget *parent=0) const
Create the contents for an administrator.
Definition: WsModAnchor.cpp:71
WsEditorWidget * createEditor(Wt::WContainerWidget *parent=0) const
Create the contents for an editor (create a view of options).
Definition: WsModAnchor.cpp:66
const std::vector< WsOption > & options() const
Get all options.
Definition: WsOption.cpp:70
a wittyShare widget
Wt::WWidget * createContentsMenuBar(Wt::WContainerWidget *parent=0) const
Create the functionalities.
Definition: WsModAnchor.cpp:54
void setOptions(const std::vector< WsOption > &vOptions)
Set all options.
Definition: WsOption.cpp:57
a wittyShare module
void WsModAnchorInit(void)
Definition: WsModAnchor.cpp:31