using wxWidgets for plugin filter on mac os X

E
Posted By
ExxEnos
Oct 22, 2008
Views
298
Replies
1
Status
Closed
Hi.
I’m developing a photoshop filter plugin for Mac OS X with XCode. And i have a problem with dialogs. Dialogh creates correctly only first time, than dialogs creates without redrawing (it takes input, but main area of dialog is whiteness)

My source code here:

#include "Dissolve.h"

#include "Dialog.h"
#include "About.h"

#include "DissolveScripting.h"
#include "FilterBigDocument.h"

bool started = false;

FilterRecord *gFilterRecord = NULL;
int32 *gDataHandle = NULL;
int16 *gResult = NULL;
SPBasicSuite * sSPBasic = NULL;

Data *gData = NULL;
Parameters *gParams = NULL;

class wxDLLApp : public wxApp
{
public:
AboutDialog *dlgAbout;
public:
bool OnInit(){
wxMessageBox(_T("wxDLLApp::OnInit()"));
dlgAbout = new AboutDialog(NULL, wxID_ANY, _T("About"),wxPoint(200,200), wxSize(446,150), wxSTAY_ON_TOP|wxCLOSE_BOX);
dlgAbout->ShowModal();
return true;
}
int OnExit(){
wxMessageBox(_T("wxDLLApp::OnExit()"));
dlgAbout->Destroy();
delete dlgAbout;
return 0;
}
DECLARE_EVENT_TABLE()
};

//IMPLEMENT_APP_NO_MAIN(wxDLLApp)

BEGIN_EVENT_TABLE(wxDLLApp, wxApp)
END_EVENT_TABLE()

wxPoint offscreenPoint(-5000,-5000);

void DoAbout(void);
void DoParameters(void);
void DoPrepare(void);
void DoStart(void);
void DoContinue(void);
void DoFinish(void);

DLLExport MACPASCAL void PluginMain(const int16 selector, void * filterRecord,
int32 * data,
int16 * result)
{
gFilterRecord = (FilterRecordPtr)filterRecord;
gDataHandle = data;
gResult = result;

switch (selector)
{
case filterSelectorAbout:
DoAbout();
break;
case filterSelectorParameters:
DoParameters();
break;
case filterSelectorPrepare:
DoPrepare();
break;
case filterSelectorStart:
DoStart();
break;
case filterSelectorContinue:
DoContinue();
break;
case filterSelectorFinish:
DoFinish();
break;
default:
break;
}
}

void DoAbout(void){

wxDLLApp *pMyApp = new wxDLLApp;
wxApp::SetInstance(pMyApp);

int argc = 0;
char **argv = NULL;
wxEntryStart(argc, argv);
wxTheApp->CallOnInit();
pMyApp->OnExit();
wxEntryCleanup();
}

void DoParameters(void){

}

void DoPrepare(void){

}

void DoStart(void){

}

void DoContinue(void){

}

void DoFinish(void){

}

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

B
Buko
Oct 22, 2008
You need the Photoshop SDK forum.

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections