| 1 | /* NoulliGridEditor.cpp |
| 2 | * |
| 3 | * Copyright (C) 2018-2023 Paul Boersma |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This code is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | * See the GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #include "NoulliGridEditor.h"cxx . . $ `<file>/gram/NoulliGridEditor.h`/ |
| 20 | #include "EditorM.h"cxx . . $ `<file>/sys/EditorM.h`/ |
| 21 | |
| 22 | #include "enums_getText.h"cxx . . $ `<file>/melder/enums_getText.h`/ |
| 23 | #include "NoulliGridEditor_enums.h"cxx . . $ `<file>/gram/NoulliGridEditor_enums.h`/ |
| 24 | #include "enums_getValue.h"cxx . . $ `<file>/melder/enums_getValue.h`/ |
| 25 | #include "NoulliGridEditor_enums.h"cxx . . $ `<file>/gram/NoulliGridEditor_enums.h`/ |
| 26 | |
| 27 | Thing_implementcxx . . $ `sys/Thing.h:65:9`! (NoulliGridEditor, FunctionEditor, 0); |
| 28 | |
| 29 | #include "Prefs_define.h"cxx . . $ `<file>/sys/Prefs_define.h`/ |
| 30 | #include "NoulliGridEditor_prefs.h"cxx . . $ `<file>/gram/NoulliGridEditor_prefs.h`/ |
| 31 | #include "Prefs_install.h"cxx . . $ `<file>/sys/Prefs_install.h`/ |
| 32 | #include "NoulliGridEditor_prefs.h"cxx . . $ `<file>/gram/NoulliGridEditor_prefs.h`/ |
| 33 | #include "Prefs_copyToInstance.h"cxx . . $ `<file>/sys/Prefs_copyToInstance.h`/ |
| 34 | #include "NoulliGridEditor_prefs.h"cxx . . $ `<file>/gram/NoulliGridEditor_prefs.h`/ |
| 35 | |
| 36 | static void drawSelectionOrWindowcxx . . $ drawSelectionOrWindow(2ce8beb6a51adeea). (NoulliGridEditorcxx . . $ NoulliGridEditor# me, double tmin, double tmax, conststring32cxx . . $ conststring32# header) { |
| 37 | for (integercxx . . $ integer# itier = 1; itier <= mycxx . . $ `melder/melder.h:44:9`! noulliGridcxx . . $ structNoulliGridEditor#noulliGrid(5ed5fe233a85eea).() -> tierscxx . . $ structNoulliGrid#tiers..sizecxx . . $ CollectionOf#size.; itier ++) { |
| 38 | if (itier == 1) { |
| 39 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_BLACKcxx . . $ Melder_BLACK.); |
| 40 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::CENTREcxx . . $ kGraphics_horizontalAlignment#CENTRE., Graphics_BOTTOMcxx . . $ `sys/Graphics.h:252:9`!); |
| 41 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0.0, 1.0, header); |
| 42 | } |
| 43 | autoNoulliPointcxx . . $ autoNoulliPoint# average = NoulliGrid_averagecxx . . $ NoulliGrid_average(e93752e781671d06). (mycxx . . $ `melder/melder.h:44:9`! noulliGridcxx . . $ structNoulliGridEditor#noulliGrid(5ed5fe233a85eea).(), itier, tmin, tmax); |
| 44 | integercxx . . $ integer# winningCategory = NoulliPoint_getWinningCategorycxx . . $ NoulliPoint_getWinningCategory(836ef92ee70b59b). (average.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 45 | conststring32cxx . . $ conststring32# winningCategoryName = mycxx . . $ `melder/melder.h:44:9`! noulliGridcxx . . $ structNoulliGridEditor#noulliGrid(5ed5fe233a85eea).() -> categoryNamescxx . . $ structNoulliGrid#categoryNames. [cxx . . $ _autostringautovector#`operator[]`(f191be2b65019068).winningCategory].getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); |
| 46 | if (winningCategory != 0 && average ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). probabilitiescxx . . $ structNoulliPoint#probabilities. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).winningCategory] > 1.0/3.0) { |
| 47 | const bool shouldDrawPicture = |
| 48 | (mycxx . . $ `melder/melder.h:44:9`! instancePref_showCategoryInSelectionViewerAscxx . . $ structNoulliGridEditor#instancePref_showCategoryInSelectionViewerAs(e1f2bcd79db66bcd).() == kNoulliGridEditor_showCategoryInSelectionViewerAs::PICTURE || |
| 49 | mycxx . . $ `melder/melder.h:44:9`! instancePref_showCategoryInSelectionViewerAscxx . . $ structNoulliGridEditor#instancePref_showCategoryInSelectionViewerAs(e1f2bcd79db66bcd).() == kNoulliGridEditor_showCategoryInSelectionViewerAs::PICTURE_AND_TEXT) |
| 50 | && |
| 51 | (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"happy") || |
| 52 | Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"neutral") || |
| 53 | Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"sad") || |
| 54 | Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"scared") || |
| 55 | Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"angry")); |
| 56 | if (shouldDrawPicture) { |
| 57 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_cyclingBackgroundColourcxx . . $ Melder_cyclingBackgroundColour(919a6c82b92b763e). (winningCategory)); |
| 58 | Graphics_fillEllipsecxx . . $ Graphics_fillEllipse(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), -0.985, +0.985, -0.985, +0.985); |
| 59 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_cyclingTextColourcxx . . $ Melder_cyclingTextColour(919a6c82b92b763e). (winningCategory)); |
| 60 | /* |
| 61 | Draw the eyes. |
| 62 | */ |
| 63 | if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"happy")) { |
| 64 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 15.0); |
| 65 | const double dx = 0.375, y = 0.10, radius = 0.18, angle = 85.0; |
| 66 | Graphics_arccxx . . $ Graphics_arc(9d9e8b5bd1d9d21f). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx, y, radius, 90.0 - angle, 90.0 + angle); // left eye |
| 67 | Graphics_arccxx . . $ Graphics_arc(9d9e8b5bd1d9d21f). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), + dx, y, radius, 90.0 - angle, 90.0 + angle); // right eye |
| 68 | } else { |
| 69 | const double dx = 0.375, y = 0.1875, radius = 0.125; |
| 70 | Graphics_fillCirclecxx . . $ Graphics_fillCircle(8752bb7a78272ca7). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx, y, radius); // left eye |
| 71 | Graphics_fillCirclecxx . . $ Graphics_fillCircle(8752bb7a78272ca7). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), + dx, y, radius); // right eye |
| 72 | } |
| 73 | /* |
| 74 | Draw the mouth. |
| 75 | */ |
| 76 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 8.0); |
| 77 | if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"happy")) { |
| 78 | const double y = -0.20, radius = 0.35, angle = 55.0; |
| 79 | Graphics_arccxx . . $ Graphics_arc(9d9e8b5bd1d9d21f). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0.0, y, radius, 270.0 - angle, 270.0 + angle); |
| 80 | } else if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"neutral")) { |
| 81 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 13.0); |
| 82 | const double dx = 0.20, y = -0.50; |
| 83 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx, y, + dx, y); |
| 84 | } else if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"sad")) { |
| 85 | const double y = -0.80, radius = 0.35, angle = 55.0; |
| 86 | Graphics_arccxx . . $ Graphics_arc(9d9e8b5bd1d9d21f). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0.0, y, radius, 90.0 - angle, 90.0 + angle); |
| 87 | } else if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"scared")) { |
| 88 | const double y = -0.50, dx = 0.10, dy = 0.25; |
| 89 | Graphics_fillEllipsecxx . . $ Graphics_fillEllipse(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx, + dx, y - dy, y + dy); |
| 90 | } else if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"angry")) { |
| 91 | const double y = -0.80, radius = 0.35, angle = 55.0; |
| 92 | Graphics_arccxx . . $ Graphics_arc(9d9e8b5bd1d9d21f). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0.0, y, radius, 90.0 - angle, 90.0 + angle); |
| 93 | } |
| 94 | /* |
| 95 | Draw the eyebrows. |
| 96 | */ |
| 97 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 12.0); |
| 98 | if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"sad")) { |
| 99 | const double dx1 = 0.60, dx2 = 0.30, y1 = 0.40, y2 = 0.60; |
| 100 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx2, y2, - dx1, y1); // left eyebrow |
| 101 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), + dx1, y1, + dx2, y2); // right eyebrow |
| 102 | } else if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"scared")) { |
| 103 | const double dx1 = 0.60, dx2 = 0.30, y1 = 0.45, y2 = 0.60; |
| 104 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx2, y2, - dx1, y1); // left eyebrow |
| 105 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), + dx1, y1, + dx2, y2); // right eyebrow |
| 106 | } else if (Melder_equ_firstCharacterCaseInsensitivecxx . . $ Melder_equ_firstCharacterCaseInsensitive(6eccf49f7b301074). (winningCategoryName, U"angry")) { |
| 107 | const double dx1 = 0.25, dx2 = 0.55, y1 = 0.40, y2 = 0.60; |
| 108 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), - dx2, y2, - dx1, y1); // left eyebrow |
| 109 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), + dx1, y1, + dx2, y2); // right eyebrow |
| 110 | } |
| 111 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 1.0); |
| 112 | } else { |
| 113 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_cyclingBackgroundColourcxx . . $ Melder_cyclingBackgroundColour(919a6c82b92b763e). (winningCategory)); |
| 114 | Graphics_fillEllipsecxx . . $ Graphics_fillEllipse(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), -0.985, +0.985, -0.985, +0.985); |
| 115 | } |
| 116 | if (mycxx . . $ `melder/melder.h:44:9`! instancePref_showCategoryInSelectionViewerAscxx . . $ structNoulliGridEditor#instancePref_showCategoryInSelectionViewerAs(e1f2bcd79db66bcd).() == kNoulliGridEditor_showCategoryInSelectionViewerAs::COLOUR_AND_TEXT || |
| 117 | mycxx . . $ `melder/melder.h:44:9`! instancePref_showCategoryInSelectionViewerAscxx . . $ structNoulliGridEditor#instancePref_showCategoryInSelectionViewerAs(e1f2bcd79db66bcd).() == kNoulliGridEditor_showCategoryInSelectionViewerAs::PICTURE_AND_TEXT || |
| 118 | mycxx . . $ `melder/melder.h:44:9`! instancePref_showCategoryInSelectionViewerAscxx . . $ structNoulliGridEditor#instancePref_showCategoryInSelectionViewerAs(e1f2bcd79db66bcd).() == kNoulliGridEditor_showCategoryInSelectionViewerAs::PICTURE && ! shouldDrawPicture) |
| 119 | { |
| 120 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_cyclingTextColourcxx . . $ Melder_cyclingTextColour(919a6c82b92b763e). (winningCategory)); |
| 121 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::CENTREcxx . . $ kGraphics_horizontalAlignment#CENTRE., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 122 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0.0, 0.0, winningCategoryName); |
| 123 | } |
| 124 | } else { |
| 125 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_WHITEcxx . . $ Melder_WHITE.); |
| 126 | Graphics_fillEllipsecxx . . $ Graphics_fillEllipse(72bdb7937dbb13da). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), -0.985, +0.985, -0.985, +0.985); |
| 127 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_BLACKcxx . . $ Melder_BLACK.); |
| 128 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::CENTREcxx . . $ kGraphics_horizontalAlignment#CENTRE., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 129 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0.0, 0.0, U"?"); |
| 130 | } |
| 131 | } |
| 132 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (mycxx . . $ `melder/melder.h:44:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_BLACKcxx . . $ Melder_BLACK.); |
| 133 | } |
| 134 | |
| 135 | void structNoulliGridEditorcxx . . $ structNoulliGridEditor# :: v_drawSelectionViewercxx . . $ structNoulliGridEditor#v_drawSelectionViewer(49f6e7a06ebc5aa8). () { |
| 136 | Graphics_setWindowcxx . . $ Graphics_setWindow(72bdb7937dbb13da). (ourcxx . . $ `melder/melder.h:42:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), -1.0, +1.0, -1.0, +1.0); |
| 137 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (ourcxx . . $ `melder/melder.h:42:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), DataGuiColour_WINDOW_BACKGROUNDcxx . . $ DataGuiColour_WINDOW_BACKGROUND.); |
| 138 | Graphics_fillRectanglecxx . . $ Graphics_fillRectangle(72bdb7937dbb13da). (ourcxx . . $ `melder/melder.h:42:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), -1.0, +1.0, -1.0, +1.0); |
| 139 | drawSelectionOrWindowcxx . . $ drawSelectionOrWindow(2ce8beb6a51adeea). (this, ourcxx . . $ `melder/melder.h:42:9`! startSelectioncxx . . $ structFunctionEditor#startSelection., ourcxx . . $ `melder/melder.h:42:9`! endSelectioncxx . . $ structFunctionEditor#endSelection., U""); |
| 140 | } |
| 141 | |
| 142 | void structNoulliGridEditorcxx . . $ structNoulliGridEditor# :: v_drawRealTimeSelectionViewercxx . . $ structNoulliGridEditor#v_drawRealTimeSelectionViewer(ba8836b59fb42830). (double time) { |
| 143 | Graphics_setWindowcxx . . $ Graphics_setWindow(72bdb7937dbb13da). (ourcxx . . $ `melder/melder.h:42:9`! graphicscxx . . $ structFunctionEditor#graphics..getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), -1.0, +1.0, -1.0, +1.0); |
| 144 | drawSelectionOrWindowcxx . . $ drawSelectionOrWindow(2ce8beb6a51adeea). (this, time - 1.0, time + 1.0, U""); |
| 145 | } |
| 146 | |
| 147 | OPTIONMENU_ENUM_VARIABLEcxx . . $ `sys/EditorM.h:411:9`! (kNoulliGridEditor_showCategoryInSelectionViewerAs, v_prefs_addFields__showCategoryInSelectionViewerAs) |
| 148 | void structNoulliGridEditorcxx . . $ structNoulliGridEditor# :: v_prefs_addFieldscxx . . $ structNoulliGridEditor#v_prefs_addFields(2b98fae8e13abb61). (EditorCommandcxx . . $ EditorCommand# cmd) { |
| 149 | OPTIONMENU_ENUM_FIELDcxx . . $ `sys/EditorM.h:414:9`! (kNoulliGridEditor_showCategoryInSelectionViewerAs, v_prefs_addFields__showCategoryInSelectionViewerAs, |
| 150 | U"Show category in selection viewer as", kNoulliGridEditor_showCategoryInSelectionViewerAs::DEFAULT) |
| 151 | } |
| 152 | void structNoulliGridEditorcxx . . $ structNoulliGridEditor# :: v_prefs_setValuescxx . . $ structNoulliGridEditor#v_prefs_setValues(2b98fae8e13abb61). (EditorCommandcxx . . $ EditorCommand# cmd) { |
| 153 | SET_ENUMcxx . . $ `sys/EditorM.h:480:9`! (v_prefs_addFields__showCategoryInSelectionViewerAs, kNoulliGridEditor_showCategoryInSelectionViewerAs, ourcxx . . $ `melder/melder.h:42:9`! instancePref_showCategoryInSelectionViewerAs()) |
| 154 | } |
| 155 | void structNoulliGridEditorcxx . . $ structNoulliGridEditor# :: v_prefs_getValuescxx . . $ structNoulliGridEditor#v_prefs_getValues(2b98fae8e13abb61). (EditorCommandcxx . . $ EditorCommand# /* cmd */) { |
| 156 | ourcxx . . $ `melder/melder.h:42:9`! setInstancePref_showCategoryInSelectionViewerAscxx . . $ structNoulliGridEditor#setInstancePref_showCategoryInSelectionViewerAs(c4cef848ba8a6002). (v_prefs_addFields__showCategoryInSelectionViewerAscxx . . $ v_prefs_addFields__showCategoryInSelectionViewerAs.); |
| 157 | } |
| 158 | |
| 159 | autoNoulliGridEditorcxx . . $ autoNoulliGridEditor# NoulliGridEditor_createcxx . . $ NoulliGridEditor_create(c25aafa314ca770b). (conststring32cxx . . $ conststring32# title, NoulliGridcxx . . $ NoulliGrid# noulliGrid, Soundcxx . . $ Sound# optionalSoundToCopy) { |
| 160 | try { |
| 161 | autoNoulliGridEditorcxx . . $ autoNoulliGridEditor# me = Thing_newcxx . . $ `sys/Thing.h:514:9`! (NoulliGridEditor); |
| 162 | mycxx . . $ `melder/melder.h:44:9`! noulliGridAreacxx . . $ structNoulliGridEditor#noulliGridArea(681f391b6380bac9).() =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). NoulliGridArea_createcxx . . $ NoulliGridArea_create(703c42dd7a398061). (true, nullptr, me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 163 | if (optionalSoundToCopy) |
| 164 | mycxx . . $ `melder/melder.h:44:9`! soundAreacxx . . $ structNoulliGridEditor#soundArea(f75ec617f241a3e6).() =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). SoundArea_createcxx . . $ SoundArea_create(4b60938fec9a8242). (false, optionalSoundToCopy, me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).()); |
| 165 | FunctionEditor_initcxx . . $ FunctionEditor_init(719bc58b4917372e). (me.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), title, noulliGrid); |
| 166 | return mecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 167 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 168 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"NoulliGrid window not created."); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | /* End of file NoulliGridEditor.cpp */ |
| 173 |