Subversion Repositories filter_foundry

Rev

Rev 536 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 536 Rev 550
Line 1... Line 1...
1
/*
1
/*
2
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
2
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
3
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.net
3
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.net
4
    Copyright (C) 2018-2022 Daniel Marschall, ViaThinkSoft
4
    Copyright (C) 2018-2023 Daniel Marschall, ViaThinkSoft
5
 
5
 
6
    This program is free software; you can redistribute it and/or modify
6
    This program is free software; you can redistribute it and/or modify
7
    it under the terms of the GNU General Public License as published by
7
    it under the terms of the GNU General Public License as published by
8
    the Free Software Foundation; either version 2 of the License, or
8
    the Free Software Foundation; either version 2 of the License, or
9
    (at your option) any later version.
9
    (at your option) any later version.
Line 41... Line 41...
41
pascal Boolean sliderfilter(DialogRef dialog,EventRecord *event,short *item);
41
pascal Boolean sliderfilter(DialogRef dialog,EventRecord *event,short *item);
42
 
42
 
43
void DoAbout(AboutRecordPtr prec){
43
void DoAbout(AboutRecordPtr prec){
44
        ModalFilterUPP filterproc_UPP = NewModalFilterUPP(aboutfilter);
44
        ModalFilterUPP filterproc_UPP = NewModalFilterUPP(aboutfilter);
45
 
45
 
46
        if(gdata && gdata->standalone){
46
        if(gdata && gdata->parm.standalone){
47
                ParamText(myc2pstr(_strdup(gdata->parm.szTitle)), myc2pstr(_strdup(gdata->parm.szAuthor)), myc2pstr(_strdup(gdata->parm.szCopyright)), NULL);
47
                ParamText(myc2pstr(_strdup(gdata->parm.szTitle)), myc2pstr(_strdup(gdata->parm.szAuthor)), myc2pstr(_strdup(gdata->parm.szCopyright)), NULL);
48
                Alert(ID_ABOUTSTANDALONEDLG,filterproc_UPP);
48
                Alert(ID_ABOUTSTANDALONEDLG,filterproc_UPP);
49
        }else
49
        }else
50
                Alert(ID_ABOUTDLG,filterproc_UPP);
50
                Alert(ID_ABOUTDLG,filterproc_UPP);
51
 
51
 
Line 195... Line 195...
195
        UserItemUPP preview_image_UPP = NewUserItemUPP(preview_item);
195
        UserItemUPP preview_image_UPP = NewUserItemUPP(preview_item);
196
        ModalFilterUPP sliderfilter_UPP = NewModalFilterUPP(sliderfilter);
196
        ModalFilterUPP sliderfilter_UPP = NewModalFilterUPP(sliderfilter);
197
 
197
 
198
        action_UPP = NewControlActionUPP(slideraction);
198
        action_UPP = NewControlActionUPP(slideraction);
199
 
199
 
200
        dp = thedialog = GetNewDialog(gdata->standalone ? ID_PARAMDLG : ID_MAINDLG,nil,(WindowPtr)-1);
200
        dp = thedialog = GetNewDialog(gdata->parm.standalone ? ID_PARAMDLG : ID_MAINDLG,nil,(WindowPtr)-1);
201
 
201
 
202
        if(gdata->standalone)
202
        if(gdata->parm.standalone)
203
                SetWTitle(GetDialogWindow(dp), myc2pstr(_strdup(gdata->parm.szTitle)));
203
                SetWTitle(GetDialogWindow(dp), myc2pstr(_strdup(gdata->parm.szTitle)));
204
 
204
 
205
        GetDialogItem(dp,PREVIEWITEM,&itemType,&itemHdl,&preview_rect);
205
        GetDialogItem(dp,PREVIEWITEM,&itemType,&itemHdl,&preview_rect);
206
        SetDialogItem(dp,PREVIEWITEM,itemType,(Handle)preview_image_UPP,&preview_rect);
206
        SetDialogItem(dp,PREVIEWITEM,itemType,(Handle)preview_image_UPP,&preview_rect);
207
        handcursor = GetCursor(ID_HANDCURSOR);
207
        handcursor = GetCursor(ID_HANDCURSOR);
Line 209... Line 209...
209
 
209
 
210
        SetDialogDefaultItem(dp,ok);
210
        SetDialogDefaultItem(dp,ok);
211
        SetDialogCancelItem(dp,cancel);
211
        SetDialogCancelItem(dp,cancel);
212
        SetDialogTracksCursor(dp,true);
212
        SetDialogTracksCursor(dp,true);
213
 
213
 
214
        if(!gdata->standalone)
214
        if(!gdata->parm.standalone)
215
                for(i = 0; i < 4; ++i)
215
                for(i = 0; i < 4; ++i)
216
                        GetDialogItemAsControl(dp,FIRSTEXPRITEM+i,&exprctls[i]);
216
                        GetDialogItemAsControl(dp,FIRSTEXPRITEM+i,&exprctls[i]);
217
 
217
 
218
        maindlginit(dp);
218
        maindlginit(dp);
219
        do{
219
        do{