CMS 3D CMS Logo

Public Member Functions | Private Attributes

ConfigBox Class Reference

#include <ConfigBox.h>

Inheritance diagram for ConfigBox:
WebElement

List of all members.

Public Member Functions

 ConfigBox (std::string the_url, std::string top, std::string left)
void printHTML (xgi::Output *out)
 ~ConfigBox ()

Private Attributes

std::string callback

Detailed Description

This is the class that should be instantiated in case the user wants to have a box that resets the configuration of the DQM client. Submitting the information of this box should result in an attempt to connect to a new collector according to the information submitted.

Definition at line 16 of file ConfigBox.h.


Constructor & Destructor Documentation

ConfigBox::ConfigBox ( std::string  the_url,
std::string  top,
std::string  left 
) [inline]

Definition at line 24 of file ConfigBox.h.

References callback.

                                                              : WebElement(the_url, top, left)
    {
      callback = "Configure";
    }
ConfigBox::~ConfigBox ( ) [inline]

Definition at line 28 of file ConfigBox.h.

    {
    }

Member Function Documentation

void ConfigBox::printHTML ( xgi::Output *  out) [virtual]

Implements WebElement.

Definition at line 3 of file ConfigBox.cc.

References WebElement::get_pix_left(), WebElement::get_pix_top(), WebElement::get_url(), LaserDQM_cfg::input, position, AlCaHLTBitMon_QueryRunRegistry::string, and asciidump::table.

{
  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::form().set("name", "ConfigurationForm") << std::endl;
  *out << cgicc::table().set("border", "0") << std::endl;
  *out << cgicc::tr() 
       << cgicc::td() << "Hostname:" << cgicc::td() 
       << cgicc::td() << cgicc::input().set("type", "text").set("name", "Hostname") << cgicc::td()
       << cgicc::tr() << std::endl;
  *out << cgicc::tr() 
       << cgicc::td() << "Port:" << cgicc::td()
       << cgicc::td() << cgicc::input().set("type", "text").set("name", "Port") << cgicc::td()
       << cgicc::tr() << std::endl;
  *out << cgicc::tr()
       << cgicc::td() << "Client Name:" << cgicc::td()
       << cgicc::td() << cgicc::input().set("type", "text").set("name", "Name") << cgicc::td()
       << cgicc::tr() << std::endl;

  std::string js_command = "submitConfigure('" + get_url() + "', form)";
  *out << cgicc::tr() 
       << cgicc::td() << cgicc::input().set("type", "button").set("value", "(Re)configure!").set("onClick", js_command) << cgicc::td()
       << cgicc::tr() << std::endl;
  *out << cgicc::table() << std::endl;
  *out << cgicc::form()  << std::endl;
  *out << cgicc::div()   << std::endl;
}

Member Data Documentation

std::string ConfigBox::callback [private]

Definition at line 20 of file ConfigBox.h.

Referenced by ConfigBox().