1 /* 2 * "GEDKeeper", the personal genealogical database editor. 3 * Copyright (C) 2009-2021 by Sergey V. Zhdanovskih. 4 * 5 * This file is part of "GEDKeeper". 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 using BSLib; 22 using GDModel; 23 using GKCore.Options; 24 25 namespace GKCore.Charts 26 { 27 public enum ChartControlMode 28 { 29 Default, 30 DragImage, 31 ControlsVisible 32 } 33 34 public enum MouseAction 35 { 36 None, 37 Select, 38 Expand, 39 Drag, 40 Properties, 41 Highlight, 42 PersonExpand, 43 Info, 44 } 45 46 public enum MouseEvent 47 { 48 meDown, 49 meMove, 50 meUp 51 } 52 53 public interface ITreeChart : IChart 54 { 55 int DepthLimitAncestors { get; set; } 56 int DepthLimitDescendants { get; set; } 57 int Height { get; set; } 58 TreeChartKind Kind { get; set; } 59 ITreeLayout Layout { get; set; } 60 TreeChartModel Model { get; } 61 TreeChartOptions Options { get; set; } 62 float Scale { get; } 63 TreeChartPerson Selected { get; set; } 64 int Width { get; set; } 65 GenChart(bool rootCenter)66 void GenChart(bool rootCenter); GenChart(GDMIndividualRecord iRec, TreeChartKind kind, bool rootCenter)67 void GenChart(GDMIndividualRecord iRec, TreeChartKind kind, bool rootCenter); GetClientRect()68 ExtRect GetClientRect(); GetImageSize()69 ExtSize GetImageSize(); GetOffsets()70 ExtPoint GetOffsets(); Invalidate()71 void Invalidate(); RefreshTree()72 void RefreshTree(); RenderImage(RenderTarget target, bool forciblyCentered = false)73 void RenderImage(RenderTarget target, bool forciblyCentered = false); SetLayout(ITreeLayout layout)74 void SetLayout(ITreeLayout layout); SetRenderer(ChartRenderer renderer)75 void SetRenderer(ChartRenderer renderer); SetScale(float value)76 void SetScale(float value); 77 } 78 } 79