1 #ifndef _NavigationContext_h_ 2 #define _NavigationContext_h_ 3 /* NavigationContext.h 4 * 5 * Copyright (C) 2020-2021 David Weenink 6 * 7 * This code 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 2 of the License, or (at 10 * your option) any later version. 11 * 12 * This code is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 * See the 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 work. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #include "Strings_.h" 22 #include "TextGrid.h" 23 #include "melder.h" 24 25 #include "NavigationContext_enums.h" 26 27 #include "NavigationContext_def.h" 28 29 autoNavigationContext NavigationContext_createTopicOnly ( 30 constSTRVEC const& topicLabels, kMelder_string topicCriterion, kMatchBoolean topicMatchBoolean 31 ); 32 33 autoNavigationContext NavigationContext_createBeforeAndTopic ( 34 constSTRVEC const& topicLabels, kMelder_string topicCriterion, kMatchBoolean topicMatchBoolean, 35 constSTRVEC const& beforeLabels, kMelder_string beforeCriterion, kMatchBoolean beforeMatchBoolean 36 ); 37 38 autoNavigationContext NavigationContext_create ( 39 constSTRVEC const& topicLabels, kMelder_string topicCriterion, kMatchBoolean topicMatchBoolean, 40 constSTRVEC const& beforeLabels, kMelder_string beforeCriterion, kMatchBoolean beforeMatchBoolean, 41 constSTRVEC const& afterLabels, kMelder_string afterCriterion, kMatchBoolean afterMatchBoolean, 42 kContext_combination combinationCriterion, bool contextOnly 43 ); 44 45 void NavigationContext_replaceTopicLabels (NavigationContext me, Strings labels); 46 void NavigationContext_replaceBeforeLabels (NavigationContext me, Strings labels); 47 void NavigationContext_replaceAfterLabels (NavigationContext me, Strings labels); 48 49 void NavigationContext_modifyTopicCriterion (NavigationContext me, kMelder_string newCriterion, kMatchBoolean matchBoolean); 50 void NavigationContext_modifyBeforeCriterion (NavigationContext me, kMelder_string newCriterion, kMatchBoolean matchBoolean); 51 void NavigationContext_modifyAfterCriterion (NavigationContext me, kMelder_string newCriterion, kMatchBoolean matchBoolean); 52 53 bool NavigationContext_isTopicLabel (NavigationContext me, conststring32 label); 54 bool NavigationContext_isBeforeLabel (NavigationContext me, conststring32 label); 55 bool NavigationContext_isAfterLabel (NavigationContext me, conststring32 label); 56 57 void NavigationContext_modifyUseCriterion (NavigationContext me, kContext_combination combinationCriterion, bool excludeTopicMatch); 58 59 #endif /* _NavigationContext_h_ */ 60