src/viewer/svpaint.cpp
SVMenuNode *SVPaint::BuildMenuBar() {
  auto *root = new SVMenuNode(); // Empty root node

  // Create some submenus and add them to the root.
  SVMenuNode *click = root->AddChild("Clicking");
  SVMenuNode *drag = root->AddChild("Dragging");

  // Put some nodes into the submenus.
  click->AddChild("Point to Point Drawing", // Caption.
                  1);                       // command_id.
  click->AddChild("Point Drawing", 2);
  click->AddChild("Text Drawing", 3);
  drag->AddChild("Line Drawing", 4);
  drag->AddChild("Rectangle Drawing", 5);
  drag->AddChild("Ellipse Drawing", 6);
  return root;
}
// Build a sample menu bar.
Build a sample menu bar.
Build a sample menu bar .
SVMenuNode *SVPaint::BuildMenuBar() {
  auto *root = new SVMenuNode(); 
  SVMenuNode *click = root->AddChild("Clicking");
  SVMenuNode *drag = root->AddChild("Dragging");
  click->AddChild("Point to Point Drawing", 
                  1);                       
  click->AddChild("Point Drawing", 2);
  click->AddChild("Text Drawing", 3);
  drag->AddChild("Line Drawing", 4);
  drag->AddChild("Rectangle Drawing", 5);
  drag->AddChild("Ellipse Drawing", 6);
  return root;
}
SVMenuNode * SVPaint :: BuildMenuBar ( ) { auto * root = new SVMenuNode ( ) ; SVMenuNode * click = root -> AddChild ( " " ) ; SVMenuNode * drag = root -> AddChild ( " " ) ; click -> AddChild ( " " , 1 ) ; click -> AddChild ( " " , 2 ) ; click -> AddChild ( " " , 3 ) ; drag -> AddChild ( " " , 4 ) ; drag -> AddChild ( " " , 5 ) ; drag -> AddChild ( " " , 6 ) ; return root ; }
Build a sample menu bar.
Build a sample menu bar .
// Empty root node // Create some submenus and add them to the root. // Put some nodes into the submenus. // Caption. // command_id.