#include <HTMLLink.h>
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 () | |
Private Attributes | |
std::string | link_url |
std::string | text |
the text of the link |
Definition at line 9 of file HTMLLink.h.
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.
: WebElement(the_url, top, left) { text = the_text; link_url = the_link_url; }
HTMLLink::~HTMLLink | ( | ) | [inline] |
Definition at line 25 of file HTMLLink.h.
{ }
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.
{ std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top(); *out << cgicc::div().set("style", position.c_str()) << std::endl; *out << cgicc::a().set("href", link_url.c_str()) << text.c_str() << cgicc::a() << std::endl; *out << cgicc::div() << std::endl; }
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 HTMLLink(), and printHTML().