#include <DQM/TrackerCommon/interface/Button.h>
Public Member Functions | |
Button (std::string the_url, std::string top, std::string left, std::string the_requestID, std::string the_name) | |
Button (std::string the_url, std::string top, std::string left, std::string the_requestID, std::string the_name) | |
void | printHTML (xgi::Output *out) |
void | printHTML (xgi::Output *out) |
~Button () | |
~Button () | |
Private Attributes | |
std::string | name |
the name that will appear on the button | |
std::string | requestID |
the string connected to the callback, eg "Default" |
Pressing this button will result in the javascript function makeRequest being called and the request "/Request?RequestID=[Your request name]" being submitted to the server.
Definition at line 18 of file Button.h.
Button::Button | ( | std::string | the_url, | |
std::string | top, | |||
std::string | left, | |||
std::string | the_requestID, | |||
std::string | the_name | |||
) | [inline] |
Button::Button | ( | std::string | the_url, | |
std::string | top, | |||
std::string | left, | |||
std::string | the_requestID, | |||
std::string | the_name | |||
) | [inline] |
void Button::printHTML | ( | xgi::Output * | out | ) | [virtual] |
Implements WebElement.
void Button::printHTML | ( | xgi::Output * | out | ) | [virtual] |
Implements WebElement.
Definition at line 4 of file Button.cc.
References lat::endl(), WebElement::get_pix_left(), WebElement::get_pix_top(), WebElement::get_url(), iggi_31X_cfg::input, name, and requestID.
00005 { 00006 std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top(); 00007 *out << cgicc::div().set("style", position.c_str()) << std::endl; 00008 00009 std::string js_command = "makeRequest('" + get_url() + "/" + "Request?RequestID=" + requestID + "', dummy)"; 00010 *out << cgicc::input().set("type", "button") 00011 .set("value", name.c_str()) 00012 .set("onclick", js_command.c_str()) << std::endl; 00013 00014 *out << cgicc::div() << std::endl; 00015 }
std::string Button::name [private] |
the name that will appear on the button
Definition at line 22 of file Button.h.
Referenced by Button(), and printHTML().
std::string Button::requestID [private] |
the string connected to the callback, eg "Default"
Definition at line 24 of file Button.h.
Referenced by Button(), and printHTML().