當前位置: 首頁>>代碼示例>>C++>>正文


C++ EDITOR_IAM函數代碼示例

本文整理匯總了C++中EDITOR_IAM函數的典型用法代碼示例。如果您正苦於以下問題:C++ EDITOR_IAM函數的具體用法?C++ EDITOR_IAM怎麽用?C++ EDITOR_IAM使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了EDITOR_IAM函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: menu_cb_evaluate_noise_2_0

static void menu_cb_evaluate_noise_2_0 (EDITOR_ARGS) {
	EDITOR_IAM (OTMultiEditor);
	Editor_save (me, U"Evaluate (noise 2.0)");
	OTMulti_newDisharmonies ((OTMulti) my data, 2.0);
	Graphics_updateWs (my g);
	Editor_broadcastDataChanged (me);
}
開發者ID:psibre,項目名稱:praat,代碼行數:7,代碼來源:OTMultiEditor.cpp

示例2: menu_cb_evaluate_tinyNoise

static void menu_cb_evaluate_tinyNoise (EDITOR_ARGS) {
	EDITOR_IAM (OTGrammarEditor);
	Editor_save (me, L"Evaluate (tiny noise)");
	OTGrammar_newDisharmonies ((OTGrammar) my data, 1e-9);
	Graphics_updateWs (my g);
	my broadcastDataChanged ();
}
開發者ID:arizona-phonological-imaging-lab,項目名稱:ultrapraat,代碼行數:7,代碼來源:OTGrammarEditor.cpp

示例3: menu_cb_editRanking

static void menu_cb_editRanking (EDITOR_ARGS) {
	EDITOR_IAM (OTMultiEditor);
	EDITOR_FORM (U"Edit ranking", 0)
		LABEL (U"constraint", U"");
		REAL (U"Ranking value", U"100.0");
		REAL (U"Disharmony", U"100.0");
	EDITOR_OK
		OTMulti grammar = (OTMulti) my data;
		OTConstraint constraint;
		if (my selectedConstraint < 1 || my selectedConstraint > grammar -> numberOfConstraints)
			Melder_throw (U"Select a constraint first.");
		constraint = & grammar -> constraints [grammar -> index [my selectedConstraint]];
		SET_STRING (U"constraint", constraint -> name)
		SET_REAL (U"Ranking value", constraint -> ranking)
		SET_REAL (U"Disharmony", constraint -> disharmony)
	EDITOR_DO
		OTMulti grammar = (OTMulti) my data;
		OTConstraint constraint = & grammar -> constraints [grammar -> index [my selectedConstraint]];
		Editor_save (me, U"Edit ranking");
		constraint -> ranking = GET_REAL (U"Ranking value");
		constraint -> disharmony = GET_REAL (U"Disharmony");
		OTMulti_sort (grammar);
		Graphics_updateWs (my g);
		Editor_broadcastDataChanged (me);
	EDITOR_END
}
開發者ID:psibre,項目名稱:praat,代碼行數:26,代碼來源:OTMultiEditor.cpp

示例4: menu_cb_evaluate_zeroNoise

static void menu_cb_evaluate_zeroNoise (EDITOR_ARGS) {
	EDITOR_IAM (OTGrammarEditor);
	Editor_save (me, U"Evaluate (zero noise)");
	OTGrammar_newDisharmonies ((OTGrammar) my data, 0.0);
	Graphics_updateWs (my g);
	Editor_broadcastDataChanged (me);
}
開發者ID:psibre,項目名稱:praat,代碼行數:7,代碼來源:OTGrammarEditor.cpp

示例5: menu_cb_addToDynamicMenu

static void menu_cb_addToDynamicMenu (EDITOR_ARGS) {
	EDITOR_IAM (ScriptEditor);
	EDITOR_FORM (U"Add to dynamic menu", U"Add to dynamic menu...")
		WORD (U"Class 1", U"Sound")
		INTEGER (U"Number 1", U"0")
		WORD (U"Class 2", U"")
		INTEGER (U"Number 2", U"0")
		WORD (U"Class 3", U"")
		INTEGER (U"Number 3", U"0")
		SENTENCE (U"Command", U"Do it...")
		SENTENCE (U"After command", U"")
		INTEGER (U"Depth", U"0")
		LABEL (U"", U"Script file:")
		TEXTFIELD (U"Script", U"")
	EDITOR_OK
		if (my name [0])
			SET_STRING (U"Script", my name)
		else
			SET_STRING (U"Script", U"(please save your script first)")
	EDITOR_DO
		praat_addActionScript (GET_STRING (U"Class 1"), GET_INTEGER (U"Number 1"),
			GET_STRING (U"Class 2"), GET_INTEGER (U"Number 2"), GET_STRING (U"Class 3"),
			GET_INTEGER (U"Number 3"), GET_STRING (U"Command"), GET_STRING (U"After command"),
			GET_INTEGER (U"Depth"), GET_STRING (U"Script"));
		praat_show ();
	EDITOR_END
}
開發者ID:eginhard,項目名稱:praat,代碼行數:27,代碼來源:ScriptEditor.cpp

示例6: menu_cb_runSelection

static void menu_cb_runSelection (EDITOR_ARGS) {
	EDITOR_IAM (ScriptEditor);
	if (my interpreter -> running)
		Melder_throw (U"The script is already running (paused). Please close or continue the pause or demo window.");
	autostring32 text = GuiText_getSelection (my textWidget);
	if (text.peek() == NULL)
		Melder_throw (U"No text selected.");
	structMelderFile file = { 0 };
	if (my name [0]) {
		Melder_pathToFile (my name, & file);
		MelderFile_setDefaultDir (& file);
	}
	Melder_includeIncludeFiles (& text);
	int npar = Interpreter_readParameters (my interpreter, text.peek());
	if (npar) {
		/*
		 * Pop up a dialog box for querying the arguments.
		 */
		forget (my argsDialog);
		my argsDialog = Interpreter_createForm (my interpreter, my d_windowForm, NULL, args_ok_selectionOnly, me, true);
		UiForm_do (my argsDialog, false);
	} else {
		autoPraatBackground background;
		if (my name [0]) MelderFile_setDefaultDir (& file);
		Interpreter_run (my interpreter, text.peek());
	}
}
開發者ID:eginhard,項目名稱:praat,代碼行數:27,代碼來源:ScriptEditor.cpp

示例7: menu_cb_pitchSettings

static void menu_cb_pitchSettings (EDITOR_ARGS) {
	EDITOR_IAM (FormantGridEditor);
	EDITOR_FORM (L"Source pitch settings", 0)
		LABEL (L"", L"These settings apply to the pitch curve")
		LABEL (L"", L"that you hear when playing the FormantGrid.")
		REAL (L"Starting time", L"0.0%")
		POSITIVE (L"Starting pitch (Hz)", L"150.0")
		REAL (L"Mid time", L"25.0%")
		POSITIVE (L"Mid pitch (Hz)", L"180.0")
		REAL (L"End time", L"100.0%")
		POSITIVE (L"End pitch (Hz)", L"120")
	EDITOR_OK
		SET_REAL (L"Starting time", my source.pitch.tStart)
		SET_REAL (L"Starting pitch", my source.pitch.f0Start)
		SET_REAL (L"Mid time", my source.pitch.tMid)
		SET_REAL (L"Mid pitch", my source.pitch.f0Mid)
		SET_REAL (L"End time", my source.pitch.tEnd)
		SET_REAL (L"End pitch", my source.pitch.f0End)
	EDITOR_DO
		preferences.source.pitch.tStart = my source.pitch.tStart = GET_REAL (L"Starting time");
		preferences.source.pitch.f0Start = my source.pitch.f0Start = GET_REAL (L"Starting pitch");
		preferences.source.pitch.tMid = my source.pitch.tMid = GET_REAL (L"Mid time");
		preferences.source.pitch.f0Mid = my source.pitch.f0Mid = GET_REAL (L"Mid pitch");
		preferences.source.pitch.tEnd = my source.pitch.tEnd = GET_REAL (L"End time");
		preferences.source.pitch.f0End = my source.pitch.f0End = GET_REAL (L"End pitch");
	EDITOR_END
}
開發者ID:georgiee,項目名稱:lip-sync-lpc,代碼行數:27,代碼來源:FormantGridEditor.cpp

示例8: menu_cb_pitchSettings

static void menu_cb_pitchSettings (EDITOR_ARGS) {
	EDITOR_IAM (FormantGridEditor);
	EDITOR_FORM (U"Source pitch settings", 0)
		LABEL (U"", U"These settings apply to the pitch curve")
		LABEL (U"", U"that you hear when playing the FormantGrid.")
		REAL     (U"Starting time",       my default_source_pitch_tStart  ())
		POSITIVE (U"Starting pitch (Hz)", my default_source_pitch_f0Start ())
		REAL     (U"Mid time",            my default_source_pitch_tMid    ())
		POSITIVE (U"Mid pitch (Hz)",      my default_source_pitch_f0Mid   ())
		REAL     (U"End time",            my default_source_pitch_tEnd    ())
		POSITIVE (U"End pitch (Hz)",      my default_source_pitch_f0End   ())
	EDITOR_OK
		SET_REAL (U"Starting time",  my p_source_pitch_tStart)
		SET_REAL (U"Starting pitch", my p_source_pitch_f0Start)
		SET_REAL (U"Mid time",       my p_source_pitch_tMid)
		SET_REAL (U"Mid pitch",      my p_source_pitch_f0Mid)
		SET_REAL (U"End time",       my p_source_pitch_tEnd)
		SET_REAL (U"End pitch",      my p_source_pitch_f0End)
	EDITOR_DO
		my pref_source_pitch_tStart  () = my p_source_pitch_tStart  = GET_REAL (U"Starting time");
		my pref_source_pitch_f0Start () = my p_source_pitch_f0Start = GET_REAL (U"Starting pitch");
		my pref_source_pitch_tMid    () = my p_source_pitch_tMid    = GET_REAL (U"Mid time");
		my pref_source_pitch_f0Mid   () = my p_source_pitch_f0Mid   = GET_REAL (U"Mid pitch");
		my pref_source_pitch_tEnd    () = my p_source_pitch_tEnd    = GET_REAL (U"End time");
		my pref_source_pitch_f0End   () = my p_source_pitch_f0End   = GET_REAL (U"End pitch");
	EDITOR_END
}
開發者ID:ffostertw,項目名稱:praat,代碼行數:27,代碼來源:FormantGridEditor.cpp

示例9: menu_cb_editConstraint

static void menu_cb_editConstraint (EDITOR_ARGS) {
	EDITOR_IAM (OTGrammarEditor);
	EDITOR_FORM (U"Edit constraint", 0)
		LABEL (U"constraint", U"");
		REAL (U"Ranking value", U"100.0");
		REAL (U"Disharmony", U"100.0");
		REAL (U"Plasticity", U"1.0");
	EDITOR_OK
		OTGrammar ot = (OTGrammar) my data;
		OTGrammarConstraint constraint;
		if (my selected < 1 || my selected > ot -> numberOfConstraints)
			Melder_throw (U"Select a constraint first.");
		constraint = & ot -> constraints [ot -> index [my selected]];
		SET_STRING (U"constraint", constraint -> name)
		SET_REAL (U"Ranking value", constraint -> ranking)
		SET_REAL (U"Disharmony", constraint -> disharmony)
		SET_REAL (U"Plasticity", constraint -> plasticity)
	EDITOR_DO
		OTGrammar ot = (OTGrammar) my data;
		OTGrammarConstraint constraint = & ot -> constraints [ot -> index [my selected]];
		Editor_save (me, U"Edit constraint");
		constraint -> ranking = GET_REAL (U"Ranking value");
		constraint -> disharmony = GET_REAL (U"Disharmony");
		constraint -> plasticity = GET_REAL (U"Plasticity");
		OTGrammar_sort (ot);
		Graphics_updateWs (my g);
		Editor_broadcastDataChanged (me);
	EDITOR_END
}
開發者ID:psibre,項目名稱:praat,代碼行數:29,代碼來源:OTGrammarEditor.cpp

示例10: menu_cb_evaluate_tinyNoise

static void menu_cb_evaluate_tinyNoise (EDITOR_ARGS) {
	EDITOR_IAM (OTMultiEditor);
	Editor_save (me, U"Evaluate (tiny noise)");
	OTMulti_newDisharmonies ((OTMulti) my data, 1e-9);
	Graphics_updateWs (my g);
	Editor_broadcastDataChanged (me);
}
開發者ID:psibre,項目名稱:praat,代碼行數:7,代碼來源:OTMultiEditor.cpp

示例11: menu_cb_MoveCursorToZero

static void menu_cb_MoveCursorToZero (EDITOR_ARGS) {
	EDITOR_IAM (SoundEditor);
	double zero = Sound_getNearestZeroCrossing ((Sound) my data, 0.5 * (my d_startSelection + my d_endSelection), 1);   // STEREO BUG
	if (NUMdefined (zero)) {
		my d_startSelection = my d_endSelection = zero;
		FunctionEditor_marksChanged (me, true);
	}
}
開發者ID:Crisil,項目名稱:praat,代碼行數:8,代碼來源:SoundEditor.cpp

示例12: menu_cb_ReverseSelection

static void menu_cb_ReverseSelection (EDITOR_ARGS) {
	EDITOR_IAM (SoundEditor);
	Editor_save (me, L"Reverse selection");
	Sound_reverse ((Sound) my data, my d_startSelection, my d_endSelection);
	my v_destroy_analysis ();
	FunctionEditor_redraw (me);
	Editor_broadcastDataChanged (me);
}
開發者ID:Crisil,項目名稱:praat,代碼行數:8,代碼來源:SoundEditor.cpp

示例13: menu_cb_moveCursorToPeak

static void menu_cb_moveCursorToPeak (EDITOR_ARGS) {
	EDITOR_IAM (SpectrumEditor);
	double frequencyOfMaximum, heightOfMaximum;
	Spectrum_getNearestMaximum ((Spectrum) my data, 0.5 * (my d_startSelection + my d_endSelection), & frequencyOfMaximum, & heightOfMaximum);
	my d_startSelection = my d_endSelection = frequencyOfMaximum;
	my cursorHeight = heightOfMaximum;
	FunctionEditor_marksChanged (me, true);
}
開發者ID:arizona-phonological-imaging-lab,項目名稱:ultrapraat,代碼行數:8,代碼來源:SpectrumEditor.cpp

示例14: menu_cb_octaveDown

static void menu_cb_octaveDown (EDITOR_ARGS) {
	EDITOR_IAM (PitchEditor);
	Pitch pitch = (Pitch) my data;
	Editor_save (me, U"Octave down");
	Pitch_step (pitch, 0.5, 0.1, my d_startSelection, my d_endSelection);
	FunctionEditor_redraw (me);
	Editor_broadcastDataChanged (me);
}
開發者ID:psibre,項目名稱:praat,代碼行數:8,代碼來源:PitchEditor.cpp

示例15: menu_cb_addPointAtCursor

static void menu_cb_addPointAtCursor (EDITOR_ARGS) {
	EDITOR_IAM (FormantGridEditor);
	Editor_save (me, U"Add point");
	FormantGrid grid = (FormantGrid) my data;
	Ordered tiers = my editingBandwidths ? grid -> bandwidths : grid -> formants;
	RealTier tier = (RealTier) tiers -> item [my selectedFormant];
	RealTier_addPoint (tier, 0.5 * (my d_startSelection + my d_endSelection), my ycursor);
	FunctionEditor_redraw (me);
	Editor_broadcastDataChanged (me);
}
開發者ID:ffostertw,項目名稱:praat,代碼行數:10,代碼來源:FormantGridEditor.cpp


注:本文中的EDITOR_IAM函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。