Last change
on this file since 10561 was
10561,
checked in by bburlacu, 11 years ago
|
#2076: Updated the way the layout is used in the SymbolicExpressionTreeChart; updated simplifier view accordingly.
|
File size:
953 bytes
|
Rev | Line | |
---|
[10520] | 1 |
|
---|
| 2 | using System;
|
---|
| 3 | using System.Collections.Generic;
|
---|
| 4 | using System.Drawing;
|
---|
| 5 |
|
---|
| 6 | namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
|
---|
| 7 | interface ILayoutEngine<T> where T : class {
|
---|
| 8 | int NodeWidth { get; set; }
|
---|
| 9 | int NodeHeight { get; set; }
|
---|
| 10 | int HorizontalSpacing { get; set; }
|
---|
| 11 | int VerticalSpacing { get; set; }
|
---|
| 12 |
|
---|
| 13 | void CalculateLayout();
|
---|
| 14 | void CalculateLayout(float width, float height);
|
---|
| 15 | void Initialize(T root, Func<T, IEnumerable<T>> getChildren, Func<T, int> getLength = null, Func<T, int> getDepth = null);
|
---|
| 16 | void Clear();
|
---|
| 17 | void Reset();
|
---|
| 18 |
|
---|
| 19 | // function members necessary to navigate the tree structure
|
---|
| 20 | Func<T, IEnumerable<T>> GetChildren { get; set; }
|
---|
| 21 | Func<T, int> GetLength { get; set; }
|
---|
| 22 | Func<T, int> GetDepth { get; set; }
|
---|
| 23 |
|
---|
[10561] | 24 | IEnumerable<T> GetContentNodes();
|
---|
[10520] | 25 | IEnumerable<VisualTreeNode<T>> GetVisualNodes();
|
---|
| 26 | Dictionary<T, PointF> GetCoordinates();
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.