Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Question: Simple plugin implementation
Re: Question: Simple plugin implementation [message #30861 is a reply to message #30815] Tue, 25 January 2011 14:50 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3432
Registered: August 2008
Senior Veteran
Hello

This is other focus. It permits adding plugins just by adding files without touching base class. It is based on Painter example.

For example to add Excel support, it would be:

#include <Core/Core.h>

using namespace Upp;

#include "Spreadsheet.h"

class ExcelSpreadsheet : public SpreadsheetPlugin {
	Spreadsheet_METHOD_LIST
};

ExcelSpreadsheet excelSpreadsheet;

INITBLOCK {
	RegisterPlugin("Excel", dynamic_cast<SpreadsheetPlugin *>(&excelSpreadsheet));
}

bool ExcelSpreadsheet::Open(const char *filename) {
	puts("ExcelSpreadsheet::Open");
	return false; 
}

bool ExcelSpreadsheet::SetData(int row, int col, Value val) {
	puts("ExcelSpreadsheet::SetData");
	return false;
}





Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Q: howto incorporate a native console window in GUI
Next Topic: BackgroundTask
Goto Forum:
  


Current Time: Mon Apr 28 11:09:25 CEST 2025

Total time taken to generate the page: 0.00451 seconds