Hello Everyone
I am using wt-3.1.9 version of witty.
I am facing problem in internal path. I have two files one is hello.C it is
main file and one is h.C.

hello.C:-
#include <Wt/WMenu>
#include <Wt/WStackedWidget>
#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WText>
#include <Wt/WHBoxLayout>
#include <Wt/WAnchor>
#include <Wt/WImage>
using namespace Wt;
using namespace std;

class HelloApplication : public WApplication

{
public:
  HelloApplication(const WEnvironment& env);
 std::string store;
 WAnchor *a;
};
HelloApplication::HelloApplication(const WEnvironment& env)
  : WApplication(env)
{
  setTitle("Parvinder");
Wt::WImage *img = new Wt::WImage("/images/logo.png", root());
 img->setAlternateText("Parvinder");
Wt::WContainerWidget *l = new Wt::WContainerWidget(root());
  l->resize(WLength::Auto, 50);
 Wt::WHBoxLayout *layo = new Wt::WHBoxLayout();
 layo->addWidget(new Wt::WAnchor("http://gndec.ac.in/~tcc/";, "INTRODUCTION",
root()));
 layo->addWidget(new Wt::WAnchor("http://gndec.ac.in";, "GNDEC", root()));
layo->addWidget(new Wt::WAnchor("http://www.parvinder.co.in/";, "PARVINDER",
root()));
layo->addWidget(new Wt::WAnchor("http://www.parvinder.co.in/";, "About us",
root()));
 /*layo->addWidget(new Wt::WText(store));
 layo->addWidget(new Wt::WImage("/images/rai.jpeg ", root()));*/
 l->setLayout(layo, AlignTop | AlignJustify);
 root()->addWidget(new WText("<h1><center>TRANING AND CONSULTANCY
CELL</center></h1> "));

 // Create an anchor that references an internal path
 a = new WAnchor(root());
 a->setRefInternalPath("/h.C/" + parvinder);
 //   and listen to the corresponding change in internal path
 WApplication::instance()->internalPathChanged().connect(this,
&DocsListWidget::onInternalPathChange);


 }

WApplication *createApplication(const WEnvironment& env)
{

  return new HelloApplication(env);
}

int main(int argc, char **argv)
{

  return WRun(argc, argv, &createApplication);
}


h.C:-#include <Wt/WMenu>
#include <Wt/WStackedWidget>
#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WText>
#include <Wt/WHBoxLayout>
#include <Wt/WAnchor>
#include <Wt/WImage>
using namespace Wt;
using namespace std;

class HellApplication : public WApplication

{
public:
  HellApplication(const WEnvironment& env);
 std::string store;
};
HellApplication::HellApplication(const WEnvironment& env)
  : WApplication(env)
{
  setTitle("Parvinder");
Wt::WImage *img = new Wt::WImage("/images/logo.png", root());
 img->setAlternateText("Parvinder");
Wt::WContainerWidget *l = new Wt::WContainerWidget(root());
  l->resize(WLength::Auto, 50);
 Wt::WHBoxLayout *layo = new Wt::WHBoxLayout();
 layo->addWidget(new Wt::WAnchor("http://gndec.ac.in/~tcc/";, "INTRODUCTION",
root()));
 layo->addWidget(new Wt::WAnchor("http://gndec.ac.in";, "GNDEC", root()));
layo->addWidget(new Wt::WAnchor("http://www.parvinder.co.in/";, "PARVINDER",
root()));
layo->addWidget(new Wt::WAnchor("http://www.parvinder.co.in/";, "About us",
root()));
 /*layo->addWidget(new Wt::WText(store));
 layo->addWidget(new Wt::WImage("/images/rai.jpeg ", root()));*/
 l->setLayout(layo, AlignTop | AlignJustify);
 root()->addWidget(new WText("<h1><center>TRANING AND CONSULTANCY
CELL</center></h1> "));


 }

WApplication *createdApplication(const WEnvironment& env)
{

  return new HellApplication(env);
}

please see the internal path in hello.C. and please help me. how to link
with each other.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to