CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HTMLLink Class Reference

#include <HTMLLink.h>

Inheritance diagram for HTMLLink:
WebElement

Public Member Functions

 HTMLLink (std::string the_url, std::string top, std::string left, std::string the_text, std::string the_link_url)
 
void printHTML (xgi::Output *out)
 
 ~HTMLLink ()
 
- Public Member Functions inherited from WebElement
std::string get_pix_left ()
 
std::string get_pix_top ()
 
std::string get_url ()
 
 WebElement (std::string the_url, std::string top, std::string left)
 
virtual ~WebElement ()
 

Private Attributes

std::string link_url
 
std::string text
 the text of the link More...
 

Detailed Description

Definition at line 9 of file HTMLLink.h.

Constructor & Destructor Documentation

HTMLLink::HTMLLink ( std::string  the_url,
std::string  top,
std::string  left,
std::string  the_text,
std::string  the_link_url 
)
inline

Definition at line 18 of file HTMLLink.h.

References link_url, and text.

19  : WebElement(the_url, top, left)
20  {
21  text = the_text;
22  link_url = the_link_url;
23  }
WebElement(std::string the_url, std::string top, std::string left)
Definition: WebElement.h:21
HTMLLink::~HTMLLink ( )
inline

Definition at line 25 of file HTMLLink.h.

26  {
27  }

Member Function Documentation

void HTMLLink::printHTML ( xgi::Output out)
virtual

Implements WebElement.

Definition at line 4 of file HTMLLink.cc.

References a, WebElement::get_pix_left(), WebElement::get_pix_top(), link_url, position, and text.

5 {
6  std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top();
7  *out << cgicc::div().set("style", position.c_str()) << std::endl;
8 
9  *out << cgicc::a().set("href", link_url.c_str()) << text.c_str() << cgicc::a() << std::endl;
10 
11  *out << cgicc::div() << std::endl;
12 }
std::string get_pix_left()
Definition: WebElement.h:38
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
tuple out
Definition: dbtoconf.py:99
std::string get_pix_top()
Definition: WebElement.h:37
double a
Definition: hdecay.h:121

Member Data Documentation

std::string HTMLLink::link_url
private

Definition at line 14 of file HTMLLink.h.

Referenced by HTMLLink(), and printHTML().

std::string HTMLLink::text
private

the text of the link

Definition at line 13 of file HTMLLink.h.

Referenced by Vispa.Views.TableView.TableWidgetItem::__lt__(), HTMLLink(), and printHTML().