CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ContentViewer.cc
Go to the documentation of this file.
2 
3 
5 {
6  std::string open_command = "makeContentViewerRequest()";
7  std::string view_or_unview_command = "updateContentViewerNoRequest()";
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", "ContentViewerForm").set("id", "ContentViewerForm") << std::endl;
12  *out << cgicc::table() << std::endl;
13 
14  printSelectHTML(out, "Open", open_command);
15  printSelectHTML(out, "View", view_or_unview_command);
16  printSelectHTML(out, "Unview", view_or_unview_command);
17 
18  *out << cgicc::table() << std::endl;
19  *out << cgicc::form() << std::endl;
20  *out << cgicc::div() << std::endl;
21 }
22 
23 void ContentViewer::printSelectHTML(xgi::Output * out, std::string name, std::string onchange)
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
void printSelectHTML(xgi::Output *out, std::string name, std::string onchange)
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
void printHTML(xgi::Output *out)
Definition: ContentViewer.cc:4
tuple out
Definition: dbtoconf.py:99
std::string get_pix_top()
Definition: WebElement.h:37
#define Output(cl)
Definition: vmac.h:193