CMS 3D CMS Logo

Navigator Class Reference

This is the class that should be instantiated in case the user wants to have a select menu, the elements of which, submit a request when clicked on. More...

#include <DQM/TrackerCommon/interface/Navigator.h>

Inheritance diagram for Navigator:

WebElement WebElement

List of all members.

Public Member Functions

 Navigator (std::string the_url, std::string top, std::string left)
 position
 Navigator (std::string the_url, std::string top, std::string left)
 position
void printHTML (xgi::Output *out)
void printHTML (xgi::Output *out)
void printSelectHTML (xgi::Output *out, std::string name, std::string onchange)
void printSelectHTML (xgi::Output *out, std::string name, std::string onchange)
 ~Navigator ()
 ~Navigator ()


Detailed Description

This is the class that should be instantiated in case the user wants to have a select menu, the elements of which, submit a request when clicked on.

Definition at line 14 of file Navigator.h.


Constructor & Destructor Documentation

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

position

Parameters:
top  url of the application

Definition at line 20 of file Navigator.h.

00022     : WebElement(the_url, top, left)
00023     {
00024     }

Navigator::~Navigator (  )  [inline]

Definition at line 25 of file Navigator.h.

00026     {
00027     }

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

position

Parameters:
top  url of the application

Definition at line 20 of file Navigator.h.

00022     : WebElement(the_url, top, left)
00023     {
00024     }

Navigator::~Navigator (  )  [inline]

Definition at line 25 of file Navigator.h.

00026     {
00027     }


Member Function Documentation

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

Implements WebElement.

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

Implements WebElement.

Definition at line 4 of file Navigator.cc.

References lat::endl(), WebElement::get_pix_left(), WebElement::get_pix_top(), printSelectHTML(), and edm::table.

00005 {
00006   // std::string js_command = "makeNavigatorRequest('" + get_url() + "')"; 
00007   std::string js_command = "makeNavigatorRequest()"; 
00008   std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top();
00009 
00010   *out << cgicc::div().set("style", position.c_str()) << std::endl;
00011   *out << cgicc::form().set("name", "NavigatorForm").set("id", "NavigatorForm") << std::endl;
00012   *out << cgicc::table() << std::endl;
00013 
00014   printSelectHTML(out, "Open",        js_command);
00015   printSelectHTML(out, "Subscribe",   js_command);
00016   printSelectHTML(out, "Unsubscribe", js_command);
00017 
00018   *out << cgicc::table() << std::endl; 
00019   *out << cgicc::form()  << std::endl;
00020   *out << cgicc::div()   << std::endl;
00021 }

void Navigator::printSelectHTML ( xgi::Output *  out,
std::string  name,
std::string  onchange 
)

void Navigator::printSelectHTML ( xgi::Output *  out,
std::string  name,
std::string  onchange 
)

Definition at line 23 of file Navigator.cc.

References lat::endl(), btag::LeptonSelector::option(), dummy::select(), and getDQMSummary::td.

Referenced by printHTML().

00024 {
00025   *out << cgicc::tr() << std::endl
00026        << cgicc::td() << std::endl
00027        << name << ":" << std::endl
00028        << cgicc::td() << std::endl;
00029 
00030   *out << cgicc::td() << std::endl;
00031 
00032   // if this is the "Open" menu, it should contain a "top" option
00033   if (name == "Open") 
00034     {
00035       *out << cgicc::select().set("name", name).set("id", name).set("onchange", onchange) << std::endl; 
00036       *out << cgicc::option().set("value", "").set("selected") << cgicc::option() << std::endl;
00037       *out << cgicc::option().set("value", "top") << "top" << cgicc::option() << std::endl;
00038       *out << cgicc::select() << std::endl;
00039     }
00040   else if (name != "Open")
00041     {
00042       *out << cgicc::select().set("name", name).set("id", name).set("onchange", onchange) << std::endl; 
00043       *out << cgicc::option().set("value", "").set("selected") << cgicc::option() << std::endl;
00044       *out << cgicc::select() << std::endl;
00045    }
00046 
00047   *out << cgicc::td() << std::endl;
00048   
00049   *out << cgicc::tr() << std::endl;
00050 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:58 2009 for CMSSW by  doxygen 1.5.4