Example #1
0
//=================================================================================
/*virtual*/ wxString PluginManager::PluginAssistant::GetFileFromPage( wxWindow* page )
{
	wxString filePath = wxEmptyString;

	Panel* panel = wxDynamicCast( page, Panel );
	if( panel )
	{
		Tree* tree = panel->GetTree();
		filePath = tree->GetFilePath();
	}

	return filePath;
}
Example #2
0
//=================================================================================
/*virtual*/ wxString PluginManager::PluginAssistant::GetCurrentFile( void )
{
	wxString filePath;

	wxWindow* page = GetCurrentPage();
	Panel* panel = wxDynamicCast( page, Panel );
	if( panel )
	{
		Tree* tree = panel->GetTree();
		filePath = tree->GetFilePath();
	}

	return filePath;
}
Example #3
0
//=================================================================================
/*virtual*/ bool PluginManager::PluginAssistant::RequestPageReload( wxWindow* page, const wxString& reason )
{
	Panel* panel = wxDynamicCast( page, Panel );
	if( !panel )
		return false;

	Tree* tree = panel->GetTree();
	wxString filePath = tree->GetFilePath();

	wxString prompt = "A plugin wishes to reload the file \"" + filePath + "\" for the following reason.\n\n";
	prompt += reason + "\n\n";
	prompt += "Would you like to reload the file?";

	return wxGetApp().GetFrame()->ReopenTree( panel, prompt );
}