1 /*
2  *  "GEDKeeper", the personal genealogical database editor.
3  *  Copyright (C) 2009-2017 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 GKCore.Types;
22 
23 namespace GKCore.Interfaces
24 {
25     public interface IHost
26     {
GetCurrentFile(bool extMode = false)27         IBaseWindow GetCurrentFile(bool extMode = false);
GetWorkWindow()28         IWorkWindow GetWorkWindow();
29 
GetAppDataPath()30         string GetAppDataPath();
GetUserFilesPath(string filePath)31         string GetUserFilesPath(string filePath);
32 
CreateBase(string fileName)33         IBaseWindow CreateBase(string fileName);
LoadBase(IBaseWindow baseWin, string fileName)34         void LoadBase(IBaseWindow baseWin, string fileName);
FindBase(string fileName)35         IBaseWindow FindBase(string fileName);
BaseChanged(IBaseWindow baseWin)36         void BaseChanged(IBaseWindow baseWin);
BaseClosed(IBaseWindow baseWin)37         void BaseClosed(IBaseWindow baseWin);
BaseRenamed(IBaseWindow baseWin, string oldName, string newName)38         void BaseRenamed(IBaseWindow baseWin, string oldName, string newName);
NotifyRecord(IBaseWindow baseWin, object record, RecordAction action)39         void NotifyRecord(IBaseWindow baseWin, object record, RecordAction action);
SelectedIndexChanged(IBaseWindow baseWin)40         void SelectedIndexChanged(IBaseWindow baseWin);
TabChanged(IBaseWindow baseWin)41         void TabChanged(IBaseWindow baseWin);
42 
ApplyOptions()43         void ApplyOptions();
44 
IsWidgetActive(IWidget widget)45         bool IsWidgetActive(IWidget widget);
WidgetShow(IWidget widget)46         void WidgetShow(IWidget widget);
WidgetClose(IWidget widget)47         void WidgetClose(IWidget widget);
48 
EnableWindow(IWidgetForm form, bool value)49         void EnableWindow(IWidgetForm form, bool value);
ShowModalX(ICommonDialog form, bool keepModeless = false)50         bool ShowModalX(ICommonDialog form, bool keepModeless = false);
ShowWindow(IWindow window)51         void ShowWindow(IWindow window);
52 
CreateLangMan(object sender)53         ILangMan CreateLangMan(object sender);
UpdateControls(bool forceDeactivate, bool blockDependent = false)54         void UpdateControls(bool forceDeactivate, bool blockDependent = false);
ShowHelpTopic(string topic)55         void ShowHelpTopic(string topic);
56     }
57 }
58