Subversion Repositories filter_foundry

Rev

Rev 503 | Rev 536 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 503 Rev 518
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.com.au
3
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
4
    Copyright (C) 2018-2022 Daniel Marschall, ViaThinkSoft
4
    Copyright (C) 2018-2022 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.
10
 
10
 
11
    This program is distributed in the hope that it will be useful,
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
14
    GNU General Public License for more details.
15
 
15
 
16
    You should have received a copy of the GNU General Public License
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
*/
19
*/
20
 
20
 
21
#ifndef UI_H_
21
#ifndef UI_H_
22
#define UI_H_
22
#define UI_H_
23
 
23
 
24
/* Main dialog */
24
/* Main dialog */
25
#define OPENITEM 3
25
#define OPENITEM 3
26
#define PARAMAUTHORITEM 3
26
#define PARAMAUTHORITEM 3
27
#define SAVEITEM 4
27
#define SAVEITEM 4
28
#define PARAMCOPYITEM 4
28
#define PARAMCOPYITEM 4
29
#define MAKEITEM 5
29
#define MAKEITEM 5
30
#define HELPITEM 6
30
#define HELPITEM 6
31
 
31
 
32
#define PREVIEWITEM 7
32
#define PREVIEWITEM 7
33
#define ZOOMINITEM 8
33
#define ZOOMINITEM 8
34
#define ZOOMOUTITEM 9
34
#define ZOOMOUTITEM 9
35
#define ZOOMLEVELITEM 10
35
#define ZOOMLEVELITEM 10
36
 
36
 
37
#define FIRSTCTLLABELITEM 11  /* 11-18 */
37
#define FIRSTCTLLABELITEM 11  /* 11-18 */
38
#define FIRSTCTLITEM 19       /* 19-26 */
38
#define FIRSTCTLITEM 19       /* 19-26 */
39
#define FIRSTCTLTEXTITEM 27   /* 27-34 */
39
#define FIRSTCTLTEXTITEM 27   /* 27-34 */
40
#define FIRSTLABELITEM 35     /* 35-38 */
40
#define FIRSTLABELITEM 35     /* 35-38 */
41
#define FIRSTICONITEM 39      /* 39-42 */
41
#define FIRSTICONITEM 39      /* 39-42 */
42
#define FIRSTEXPRITEM 43      /* 43-46 */
42
#define FIRSTEXPRITEM 43      /* 43-46 */
43
#define FIRSTMAPLABELITEM 47  /* 47-50 */
43
#define FIRSTMAPLABELITEM 47  /* 47-50 */
44
 
44
 
45
/* Build dialog */
45
/* Build dialog */
46
#define CATEGORYITEM 3
46
#define CATEGORYITEM 3
47
#define TITLEITEM 4
47
#define TITLEITEM 4
48
#define COPYRIGHTITEM 5
48
#define COPYRIGHTITEM 5
49
#define AUTHORITEM 6
49
#define AUTHORITEM 6
50
#define FIRSTMAPNAMEITEM 7
50
#define FIRSTMAPNAMEITEM 7
51
#define FIRSTCTLNAMEITEM 11
51
#define FIRSTCTLNAMEITEM 11
52
#define FIRSTMAPCHECKITEM 19
52
#define FIRSTMAPCHECKITEM 19
53
#define FIRSTCTLCHECKITEM 23
53
#define FIRSTCTLCHECKITEM 23
54
#define PROTECTITEM 31
54
#define PROTECTITEM 31
55
 
55
 
56
#define SLIDERPAGE 16
56
#define SLIDERPAGE 16
57
 
57
 
58
#define ID_ABOUTDLG 16000
58
#define ID_ABOUTDLG 16000
59
#define ID_ABOUTSTANDALONEDLG 16005
59
#define ID_ABOUTSTANDALONEDLG 16005
60
#define ID_MAINDLG 16001
60
#define ID_MAINDLG 16001
61
#define ID_SYNTAXALERT 16002
61
#define ID_SYNTAXALERT 16002
62
#define ID_BUILDDLG 16003
62
#define ID_BUILDDLG 16003
63
#define ID_PARAMDLG 16004
63
#define ID_PARAMDLG 16004
64
 
64
 
65
#define ID_SLIDERCTL 16000
65
#define ID_SLIDERCTL 16000
66
#define ID_TEXTCTL 16001
66
#define ID_TEXTCTL 16001
67
 
67
 
68
#define ID_CAUTIONPICT 16000
68
#define ID_CAUTIONPICT 16000
69
#define ID_HANDCURSOR 16000
69
#define ID_HANDCURSOR 16000
70
 
70
 
71
/* --- constants for terminology (scripting) resource */
71
/* --- constants for terminology (scripting) resource */
72
#define AETE_ID                 16000
72
#define AETE_ID                 16000
73
#define vendorName              "Telegraphics"
73
#define vendorName              "Telegraphics"
74
#define plugInSuiteID   'tELE'
74
#define plugInSuiteID   'tELE'
75
#define plugInClassID   'Fltr' //PITerminology.h:eventFilter
75
#define plugInClassID   'Fltr' //PITerminology.h:eventFilter
76
#define plugInEventID   'fiFo' //typeNull // must be this
76
#define plugInEventID   'fiFo' //typeNull // must be this
77
 
77
 
78
// Return value of checksliders() is a bitmask
78
// Return value of checksliders() is a bitmask
79
// If the CHECKSLIDERS_CTL_AMBIGUOUS bit is set, the function ctl() was called with a non-constant argument.
79
// If the CHECKSLIDERS_CTL_AMBIGUOUS bit is set, the function ctl() was called with a non-constant argument.
80
// In this case, the ctlflags[] array is NOT populated correctly. The caller might want to handle this
80
// In this case, the ctlflags[] array is NOT populated correctly. The caller might want to handle this
81
// case differently (e.g. by enabling all sliders).
81
// case differently (e.g. by enabling all sliders).
82
// If the CHECKSLIDERS_MAP_AMBIGUOUS bit is set, the function map() was called with a non-constant argument.
82
// If the CHECKSLIDERS_MAP_AMBIGUOUS bit is set, the function map() was called with a non-constant argument.
83
// In this case, the mapflags[] array is NOT populated correctly.
83
// In this case, the mapflags[] array is NOT populated correctly.
84
// If the return value is zero, ctlflags[] and mapflags[] are populated correctly.
84
// If the return value is zero, ctlflags[] and mapflags[] are populated correctly.
85
#define CHECKSLIDERS_CTL_AMBIGUOUS 1
85
#define CHECKSLIDERS_CTL_AMBIGUOUS 1
86
#define CHECKSLIDERS_MAP_AMBIGUOUS 2
86
#define CHECKSLIDERS_MAP_AMBIGUOUS 2
87
 
87
 
88
/* --- */
88
/* --- */
89
 
89
 
90
#ifndef RC_INVOKED
90
#ifndef RC_INVOKED
91
#ifndef Rez
91
#ifndef Rez
92
 
92
 
93
        #include "world.h" // TCHAR definition
93
        #include "world.h" // TCHAR definition
94
 
94
 
95
        #include "PIAbout.h"
95
        #include "PIAbout.h"
96
        #include "PIFilter.h"
96
        #include "PIFilter.h"
97
 
97
 
98
        #include "ui_compat.h"
98
        #include "ui_compat.h"
99
 
99
 
100
        enum{
-
 
101
                MAXEXPR = 1024,
100
        #define MAXEXPR 1024
102
        };
-
 
103
 
101
 
104
        void DoAbout(AboutRecordPtr prec);
102
        void DoAbout(AboutRecordPtr prec);
105
        Boolean maindialog(FilterRecordPtr pb);
103
        Boolean maindialog(FilterRecordPtr pb);
106
        Boolean builddialog(FilterRecordPtr pb);
104
        Boolean builddialog(FilterRecordPtr pb);
107
 
105
 
108
        Boolean simplealert(TCHAR* s);
106
        Boolean simplealert(TCHAR* s);
109
        Boolean simplealert_id(int MsgId);
107
        Boolean simplealert_id(int MsgId);
110
        Boolean simplewarning(TCHAR* s);
108
        Boolean simplewarning(TCHAR* s);
111
        Boolean simplewarning_id(int MsgId);
109
        Boolean simplewarning_id(int MsgId);
112
        Boolean showmessage(TCHAR *s);
110
        Boolean showmessage(TCHAR *s);
113
        Boolean showmessage_id(int MsgId);
111
        Boolean showmessage_id(int MsgId);
114
        Boolean alertuser(TCHAR *err, TCHAR* more);
112
        Boolean alertuser(TCHAR *err, TCHAR* more);
115
        Boolean alertuser_id(int MsgId, TCHAR* more);
113
        Boolean alertuser_id(int MsgId, TCHAR* more);
116
 
114
 
117
        void maindlginit(DIALOGREF dp);
115
        void maindlginit(DIALOGREF dp);
118
        Boolean maindlgitem(DIALOGREF dp,int item);
116
        Boolean maindlgitem(DIALOGREF dp,int item);
119
        void maindlgupdate(DIALOGREF dp);
117
        void maindlgupdate(DIALOGREF dp);
120
        void slidermoved(DIALOGREF dp,int item);
118
        void slidermoved(DIALOGREF dp,int item);
121
        int checksliders(int exprs,int ctlflags[],int mapflags[]);
119
        int checksliders(int exprs,int ctlflags[],int mapflags[]);
122
 
120
 
123
        void builddlginit(DIALOGREF dp);
121
        void builddlginit(DIALOGREF dp);
124
        Boolean builddlgitem(DIALOGREF dp,int item);
122
        Boolean builddlgitem(DIALOGREF dp,int item);
125
 
123
 
126
#endif
124
#endif
127
#endif
125
#endif
128
 
126
 
129
#endif
127
#endif
130
 
128