Ejemplo n.º 1
0
void Editor::drawNew(){

	if(newActive){
		if(activateEvent("c",false,"new")){
			addCubeAction();
			forceGui("new",false);
			newActive=false;
		}
		
		if(activateEvent("s",false,"new")){
			addSpotlightAction();
			forceGui("new",false);
			newActive=false;
		}

		if(activateEvent("l",false,"new")){
			addPointLightAction();
			forceGui("new",false);
			newActive=false;
		}

		if(activateEvent("g",false,"new")){
			addGridAction();
			forceGui("new",false);
			newActive=false;
		}

		if(activateEvent("x",true,"new")){
			forceGui("new",false);
			newActive=false;
		}
	}

	if(deactivateGui("new")){
		newActive=false;
	}else if(activateGui("new")){
		newActive=true;
	}

	if(newActive){

		newFade.panel->visible=true;
		newTypes.textpanel->visible=true;
		newTypesBkg.panel->visible=true;
	}else{

		newFade.panel->visible=false;
		newTypes.textpanel->visible=false;
		newTypesBkg.panel->visible=false;

	}

}
Ejemplo n.º 2
0
void SpectrogramComponent::outputPsd()
{
  if(isProbe_x)
    activateEvent("psdevent", psd_);
  else
    if(!isSink_x)
    {
      DataSet< float >* writeDataSet = NULL;
      getOutputDataSet("output1", writeDataSet, nFft_x);
      writeDataSet->data = psd_;
      releaseOutputDataSet("output1", writeDataSet);
    }
}
void OpenResourceDialog::OpenSelection(const OpenResourceDialogItemData& selection, IManager* manager)
{
    // send event to the plugins to see if they want
    // to open this file
    wxString file_path = selection.m_file;
    clCommandEvent activateEvent(wxEVT_TREE_ITEM_FILE_ACTIVATED);
    activateEvent.SetFileName(file_path);
    if(EventNotifier::Get()->ProcessEvent(activateEvent)) return;

    if(manager && manager->OpenFile(selection.m_file, wxEmptyString, selection.m_line - 1)) {
        IEditor* editor = manager->GetActiveEditor();
        if(editor && !selection.m_name.IsEmpty() && !selection.m_pattern.IsEmpty()) {
            editor->FindAndSelectV(selection.m_pattern, selection.m_name);
        }
    }
}