/// <summary> /// constructor /// </summary> /// <param name="control">The control of PathwayView.</param> public DefaultMouseHandler(PathwayControl control) : base(control) { m_selectedPath = new PPathwayNode(); }
/// <summary> /// Constructor /// </summary> public PPathwayGraph() { // Allow Drag event. this.AddInputEventListener(new PDragEventHandler()); // Draw Rect this.Brush = Brushes.LightBlue; this.Pen = new Pen(Brushes.Black); this.Width = GRAPH_SIZE + 20; this.Height = GRAPH_SIZE + 30; GraphicsPath path = new GraphicsPath(); path.AddRectangle(new RectangleF(0, 0, GRAPH_SIZE + 20, GRAPH_SIZE + 30)); this.AddPath(path, false); // Draw Graph Panel this.m_panel = new PPathwayNode(); this.m_panel.Pickable = false; this.m_panel.Brush = Brushes.White; this.m_panel.Pen = new Pen(Brushes.Black); path = new GraphicsPath(); path.AddRectangle(new RectangleF(20, 10, GRAPH_SIZE, GRAPH_SIZE)); this.m_panel.AddPath(path, false); this.AddChild(m_panel); // Draw Graph this.m_graph = new PPathwayNode(); this.m_graph.Pickable = false; this.m_graph.Pen = new Pen(Brushes.Red); this.AddChild(m_graph); // Draw Title m_pText = new PText(); m_pText.Text = "Title"; m_pText.Pickable = false; this.AddChild(m_pText); Refresh(); }