public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { AreaRegion region = child.GetRegion (x, y, pointX, pointY); if(region != null && region.Element == null) { region = new AreaRegion(this, element, x, y); } return region; }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, Area area, int index) { AreaRegion region = child.GetRegion(context, x, y, area, index); if (region != null && region.Element == null) { region.Element = element; } return(region); }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { AreaRegion region = child.GetRegion(x, y, pointX, pointY); if (region != null && region.Element == null) { region = new AreaRegion(this, element, x, y); } return(region); }
public override AreaRegion GetEditRegion(IFormattingContext context, float x, float y, int index) { foreach (Area a in content) { AreaRegion r = a.GetEditRegion(context, x, y, index); if (r != null) { return(r); } } return(null); }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { if (box.Contains(x + cellShift.X, y + cellShift.Y, pointX, pointY)) { AreaRegion region = child.GetRegion(x + areaShift.X, y + areaShift.Y, pointX, pointY); if (region == null || (region != null && region.Element == null)) { region = new AreaRegion(this, element, x + cellShift.X, y + cellShift.Y); } return(region); } return(null); }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, MathMLElement element, int index) { foreach (Area a in content) { AreaRegion r = a.GetRegion(context, x, y, element, index); if (r != null) { return(r); } x += a.BoundingBox.HorizontalExtent; } return(null); }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { if (!BoundingBox.Contains(x, y, pointX, pointY)) { return(null); } AreaRegion r = null; for (int i = 0; i < content.Length; i++) { if ((r = content[i].GetRegion(x, y, pointX, pointY)) != null) { return(r); } } return(new AreaRegion(this, x, y)); }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, MathMLElement element, int index) { float yy = y + BoundingBox.Depth; foreach (Area a in content) { BoundingBox box = a.BoundingBox; yy -= box.Depth; AreaRegion r = a.GetRegion(context, x, yy, element, index); if (r != null) { return(r); } yy -= box.Height; } return(null); }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, Area area, int index) { if (area == this || area == source) { return(new AreaRegion(this, x, y)); } else { foreach (Area a in content) { AreaRegion r = a.GetRegion(context, x, y, area, index); if (r != null) { return(r); } x += a.BoundingBox.HorizontalExtent; } } return(null); }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, MathMLElement element, int index) { if (element == this.element) { AreaRegion region = child.GetEditRegion(context, x, y, index); if (region != null) { region.Element = element; } else { Debug.WriteLine("MathMLWrapperArea: child.GetEditRegion returned null, returning new AreaRegion for this area"); region = new AreaRegion(this, element, x, y); } return(region); } else { return(child.GetRegion(context, x, y, element, index)); } }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, MathMLElement element, int index) { if(element == this.element) { AreaRegion region = child.GetEditRegion(context, x, y, index); if(region != null) { region.Element = element; } else { Debug.WriteLine("MathMLWrapperArea: child.GetEditRegion returned null, returning new AreaRegion for this area"); region = new AreaRegion(this, element, x, y); } return region; } else { return child.GetRegion(context, x, y, element, index); } }
public override AreaRegion GetRegion(IFormattingContext context, float x, float y, MathMLElement element, int index) { AreaRegion result = null; if (this.element == element) { return(new AreaRegion(this, element, x, y)); } else { foreach (Area a in content) { result = a.GetRegion(context, x, y - box.Height, element, index); if (result != null) { Debug.Assert(result.Element != null, "Invalid element type for TableArea cell area"); Debug.Assert(result.Area != null, "Invalid area type for TableArea cell area"); return(result); } } } return(null); }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { if (!BoundingBox.Contains(x, y, pointX, pointY)) { return(null); } float yy = y + BoundingBox.Depth; foreach (Area a in content) { BoundingBox box = a.BoundingBox; yy -= box.Depth; AreaRegion r = a.GetRegion(x, yy, pointX, pointY); if (r != null) { return(r); } yy -= box.Height; } return(new AreaRegion(this, x, y)); }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { AreaRegion result = null; if (BoundingBox.Contains(x, y, pointX, pointY)) { foreach (Area a in content) { // if we find a region, it will allready have a element from // the table cell area result = a.GetRegion(x, y - box.Height, pointX, pointY); if (result != null) { Debug.Assert(result.Element != null, "Invalid element type for TableArea cell area"); Debug.Assert(result.Area != null, "Invalid area type for TableArea cell area"); return(result); } } // we should only get here if a user clicks in either the frame or // spacing areas result = new AreaRegion(this, element, x, y); } return(result); }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { if(box.Contains(x + cellShift.X, y + cellShift.Y, pointX, pointY)) { AreaRegion region = child.GetRegion(x + areaShift.X, y + areaShift.Y, pointX, pointY); if(region == null || (region != null && region.Element == null)) { region = new AreaRegion(this, element, x + cellShift.X, y + cellShift.Y); } return region; } return null; }
public override AreaRegion GetRegion(float x, float y, float pointX, float pointY) { AreaRegion result = null; if(BoundingBox.Contains(x, y, pointX, pointY)) { foreach(Area a in content) { // if we find a region, it will allready have a element from // the table cell area result = a.GetRegion(x, y - box.Height, pointX, pointY); if(result != null) { Debug.Assert(result.Element != null, "Invalid element type for TableArea cell area"); Debug.Assert(result.Area != null, "Invalid area type for TableArea cell area"); return result; } } // we should only get here if a user clicks in either the frame or // spacing areas result = new AreaRegion(this, element, x, y); } return result; }