static void spinSelectCB(Widget w, SpaceWindow *window, SpinCallbackStruct *cb)
{
    int particleIndex;
    particleIndex = FindTrack((StdHepWindow *)window,
                        cb->event->xbutton.x,cb->event->xbutton.y);
    SelectTrack((StdHepWindow *) window, particleIndex);
}
Exemple #2
0
void StudioFrame::OnSfxListActivated(wxListEvent& event) {
	int index = event.GetIndex();
	if (index == -1) {
		wxMessageBox(_("You must choose a track!"));
		return;
	}

	wxString str = sfxList->GetItemText(index);
	SelectTrack(str.ToStdString());
}
/**
 * FCurveEdNotifyInterface: Called by the Curve Editor when a Curve Label is clicked on
 *
 * @param	CurveObject	The curve object whose label was clicked on
 */
void FMatinee::OnCurveLabelClicked( UObject* CurveObject )
{
	check( CurveObject != NULL );

	// Is this curve an interp track?
	UInterpTrack* Track = Cast<UInterpTrack>( CurveObject );
	if( Track != NULL )
	{
		// Select the track!
		SelectTrack( Track->GetOwningGroup(), Track );
		ClearKeySelection();
	}
}
Exemple #4
0
void StudioFrame::OnAddSfxTrack(wxCommandEvent& WXUNUSED(event)) {
	oamlTracksInfo *info = oaml->GetTracksInfo();
	int index = info ? info->tracks.size() : 0;

	char name[1024];
	snprintf(name, 1024, "Track%d", index);
	studioApi->TrackNew(std::string(name), true);

	sfxList->InsertItem(index, wxString(name));
	SelectTrack(name);

	sfxList->EditLabel(index);
}
Exemple #5
0
void StudioFrame::OnRemoveSfxTrack(wxCommandEvent& WXUNUSED(event)) {
	wxString str = sfxList->GetItemText(sfxList->GetFirstSelected());
	std::string name = str.ToStdString();

	// If the track is currently selected deselect it
	if (trackControl && trackControl->GetTrackName() == name) {
		SelectTrack("");
	}

	// Remove the track from the list
	sfxList->DeleteItem(sfxList->GetFirstSelected());

	// Remove the track from oaml
	studioApi->TrackRemove(name);

	// Mark the project dirty
	SetProjectDirty();
}
Exemple #6
0
void					SeqTrack::Load(SaveElementArray data)
{
  int					i;

  for (i = 0; i < data.GetCount(); i++)
  {
	if (data[i]->getKey() == wxT("TrackName")) SetName(data[i]->getValue());
	else if (data[i]->getKey() == wxT("VuValue")) SetVuValue(data[i]->getValueInt());
	else if (data[i]->getKey() == wxT("Record")) SetRecording(data[i]->getValueInt());
	else if (data[i]->getKey() == wxT("Mute")) SetMute(data[i]->getValueInt());
	else if (data[i]->getKey() == wxT("Selected"))
	{
	  if (data[i]->getValueInt() == true)
		SelectTrack();
	}
	else if (data[i]->getKey() == wxT("PluginsNameConnected"))
	  ConnectTo(RackPanel->FindPlugin(data[i]->getValue()));
  }
}
Exemple #7
0
void StudioFrame::OnRemoveMusicTrack(wxCommandEvent& WXUNUSED(event)) {
	wxString str = musicList->GetItemText(musicList->GetFirstSelected());
	std::string name = str.ToStdString();

	wxString msg = "Are you sure you want to remove track '" + str + "'?";
	int ret = wxMessageBox(msg, "Confirm", wxYES_NO, this);
	if (ret == wxNO) {
		return;
	}

	// If the track is currently selected deselect it
	if (trackControl && trackControl->GetTrackName() == name) {
		SelectTrack("");
	}

	// Remove the track from the list
	musicList->DeleteItem(musicList->GetFirstSelected());

	// Remove the track from oaml
	studioApi->TrackRemove(name);

	// Mark the project dirty
	SetProjectDirty();
}
Exemple #8
0
void					SeqTrack::OnMouseClick(wxMouseEvent &e)
{
  m_click.x = e.m_x;
  m_click.y = e.m_y;
  SelectTrack();
}