Exemplo n.º 1
0
FormantGridEditor FormantGridEditor_create (GuiObject parent, const wchar *title, FormantGrid data) {
	try {
		autoFormantGridEditor me = Thing_new (FormantGridEditor);
		FormantGridEditor_init (me.peek(), parent, title, data);
		return me.transfer();
	} catch (MelderError) {
		Melder_throw ("FormantGrid window not created.");
	}
}
Exemplo n.º 2
0
autoFormantGridEditor FormantGridEditor_create (const char32 *title, FormantGrid data) {
	try {
		autoFormantGridEditor me = Thing_new (FormantGridEditor);
		FormantGridEditor_init (me.peek(), title, data);
		return me;
	} catch (MelderError) {
		Melder_throw (U"FormantGrid window not created.");
	}
}
Exemplo n.º 3
0
autoKlattGrid_FormantGridEditor KlattGrid_FormantGridEditor_create (const char32 *title, KlattGrid data, int formantType) {
	try {
		Melder_assert (data);
		autoFormantGrid* fg = KlattGrid_getAddressOfFormantGrid (data, formantType);
		if (! fg) {
			Melder_throw (U"Formant type unknown.");
		}
		if (FormantGrid_isEmpty (fg -> get())) {
			Melder_throw (U"Cannot edit an empty formant grid.");
		}
		autoKlattGrid_FormantGridEditor me = Thing_new (KlattGrid_FormantGridEditor);
		my klattgrid = data;
		FormantGridEditor_init (me.peek(), title, fg->get());
		return me;
	} catch (MelderError) {
		Melder_throw (U"KlattGrid formant window not created.");
	}
}