CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Navigator.cc
Go to the documentation of this file.
2 
3 
5 {
6  // std::string js_command = "makeNavigatorRequest('" + get_url() + "')";
7  std::string js_command = "makeNavigatorRequest()";
8  std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top();
9 
10  *out << cgicc::div().set("style", position.c_str()) << std::endl;
11  *out << cgicc::form().set("name", "NavigatorForm").set("id", "NavigatorForm") << std::endl;
12  *out << cgicc::table() << std::endl;
13 
14  printSelectHTML(out, "Open", js_command);
15  printSelectHTML(out, "Subscribe", js_command);
16  printSelectHTML(out, "Unsubscribe", js_command);
17 
18  *out << cgicc::table() << std::endl;
19  *out << cgicc::form() << std::endl;
20  *out << cgicc::div() << std::endl;
21 }
22 
24 {
25  *out << cgicc::tr() << std::endl
26  << cgicc::td() << std::endl
27  << name << ":" << std::endl
28  << cgicc::td() << std::endl;
29 
30  *out << cgicc::td() << std::endl;
31 
32  // if this is the "Open" menu, it should contain a "top" option
33  if (name == "Open")
34  {
35  *out << cgicc::select().set("name", name).set("id", name).set("onchange", onchange) << std::endl;
36  *out << cgicc::option().set("value", "").set("selected") << cgicc::option() << std::endl;
37  *out << cgicc::option().set("value", "top") << "top" << cgicc::option() << std::endl;
38  *out << cgicc::select() << std::endl;
39  }
40  else if (name != "Open")
41  {
42  *out << cgicc::select().set("name", name).set("id", name).set("onchange", onchange) << std::endl;
43  *out << cgicc::option().set("value", "").set("selected") << cgicc::option() << std::endl;
44  *out << cgicc::select() << std::endl;
45  }
46 
47  *out << cgicc::td() << std::endl;
48 
49  *out << cgicc::tr() << std::endl;
50 }
std::string get_pix_left()
Definition: WebElement.h:38
list table
Definition: asciidump.py:386
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
tuple out
Definition: dbtoconf.py:99
void printHTML(xgi::Output *out)
Definition: Navigator.cc:4
std::string get_pix_top()
Definition: WebElement.h:37
#define Output(cl)
Definition: vmac.h:193
void printSelectHTML(xgi::Output *out, std::string name, std::string onchange)
Definition: Navigator.cc:23