2 #include "view_btree_data.h"
4 ViewBTreeData::ViewBTreeData (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2):
5 Canvas::Rect (*parent, x1, y1, x2, y2)
8 property_fill_color () = "red";
9 property_outline_color () = "black";
14 ViewBTreeData::Create (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2)
16 if (dynamic_cast<BTreeChildData *>(data))
17 return new ViewBTreeChildData (data, parent, x1, y1, x2, y2);
19 return new ViewBTreeData (data, parent, x1, y1, x2, y2);
22 ViewBTreeChildData::ViewBTreeChildData (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2):
23 ViewBTreeData (data, parent, x1, y1, x2, y2)
25 property_fill_color () = "yellow";
26 property_outline_color () = "black";
31 std::string s = *data;
32 Canvas::Text *text = new Canvas::Text (*parent, x1 + w/2, y1 + h/2, s);