static void menu_cb_removePoints (RealTierEditor me, EDITOR_ARGS_DIRECT) { Editor_save (me, U"Remove point(s)"); if (my d_startSelection == my d_endSelection) AnyTier_removePointNear (my data, my d_startSelection); else AnyTier_removePointsBetween (my data, my d_startSelection, my d_endSelection); RealTierEditor_updateScaling (me); FunctionEditor_redraw (me); Editor_broadcastDataChanged (me); }
static void menu_cb_removePoints (FormantGridEditor me, EDITOR_ARGS_DIRECT) { Editor_save (me, U"Remove point(s)"); FormantGrid grid = (FormantGrid) my data; Ordered tiers = my editingBandwidths ? grid -> bandwidths.get() : grid -> formants.get(); RealTier tier = (RealTier) tiers -> item [my selectedFormant]; if (my d_startSelection == my d_endSelection) AnyTier_removePointNear (tier, my d_startSelection); else AnyTier_removePointsBetween (tier, my d_startSelection, my d_endSelection); FunctionEditor_redraw (me); Editor_broadcastDataChanged (me); }
void FormantGrid_removeBandwidthPointsBetween (FormantGrid me, long iformant, double tmin, double tmax) { if (iformant < 1 || iformant > my bandwidths -> size) return; AnyTier_removePointsBetween (my bandwidths -> item [iformant], tmin, tmax); }