Subversion Repositories filter_foundry

Rev

Rev 92 | Rev 101 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 92 Rev 94
Line 26... Line 26...
26
#include "y.tab.h"
26
#include "y.tab.h"
27
#include "choosefile.h"
27
#include "choosefile.h"
28
#include "sprintf_tiny.h"
28
#include "sprintf_tiny.h"
29
 
29
 
30
#ifdef MAC_ENV
30
#ifdef MAC_ENV
31
        #include <files.h>
-
 
32
        #include <plstringfuncs.h>
31
        #include <plstringfuncs.h>
33
       
-
 
34
        #define GETSLIDERVALUE GetDlgControlValue
-
 
35
        #define SETSLIDERVALUE SetDlgControlValue
-
 
36
        #define GETCTLTEXT getctltext
-
 
37
        #define SETCTLTEXT setctltext
-
 
38
        #define GETCTLTEXTINT getctltextint
-
 
39
        #define SETCTLTEXTINT setctltextint
-
 
40
        #define SELECTCTLTEXT selectctltext
-
 
41
#else
-
 
42
        #include <commctrl.h>
-
 
43
        #include "compat_string.h"
-
 
44
       
-
 
45
        #define GETSLIDERVALUE(d,i) SendDlgItemMessage(d,i,TBM_GETPOS,0,0)
-
 
46
        #define SETSLIDERVALUE(d,i,v) SendDlgItemMessage(d,i,TBM_SETPOS,TRUE,v)
-
 
47
        #define GETCTLTEXT GetDlgItemText
-
 
48
        #define SETCTLTEXT SetDlgItemText
-
 
49
        #define SELECTCTLTEXT SELECTDLGITEMTEXT
-
 
50
        #define GETCTLTEXTINT GetDlgItemInt
-
 
51
        #define SETCTLTEXTINT SetDlgItemInt
-
 
52
#endif
32
#endif
53
 
33
 
54
Boolean doupdates = true;
34
Boolean doupdates = true;
55
double zoomfactor,fitzoom;
-
 
56
 
35
 
57
void updateglobals(DIALOGREF dp);
36
void updateglobals(DIALOGREF dp);
58
struct node *updateexpr(DIALOGREF dp,int i);
37
struct node *updateexpr(DIALOGREF dp,int i);
59
void updatedialog(DIALOGREF dp);
38
void updatedialog(DIALOGREF dp);
60
void slidertextchanged(DIALOGREF dp,int item);
39
void slidertextchanged(DIALOGREF dp,int item);
Line 301... Line 280...
301
                        s[0] = channelsuffixes[gpb->imageMode][i];
280
                        s[0] = channelsuffixes[gpb->imageMode][i];
302
                        SetDlgItemText(dp,FIRSTLABELITEM+i,s);
281
                        SetDlgItemText(dp,FIRSTLABELITEM+i,s);
303
                }
282
                }
304
        }
283
        }
305
 
284
 
306
        if(setup_preview(gpb)){
285
        if(setup_preview(gpb,nplanes)){
307
                extern int preview_w,preview_h;
-
 
308
                double zh = (gpb->filterRect.right - gpb->filterRect.left)/(double)preview_w,
-
 
309
                       zv = (gpb->filterRect.bottom - gpb->filterRect.top)/(double)preview_h;
-
 
310
                fitzoom = zh > zv ? zh : zv;
-
 
311
               
-
 
312
                // On very large images, processing a fully zoomed out preview (the initial default)
286
                // On very large images, processing a fully zoomed out preview (the initial default)
313
                // can cause out of memory errors, because Photoshop can't page in all data
287
                // can cause out of memory errors, because Photoshop can't page in all data
314
                // during advanceState. To prevent this problem, zoom in until we aren't
288
                // during advanceState. To prevent this problem, zoom in until we aren't
315
                // previewing more than say 10% of Photoshop's indicated maxSpace.
289
                // previewing more than say 10% of Photoshop's indicated maxSpace.
316
                // (e.g., on a 1GB WinXP system, PS CS2 reports 520MB maxSpace, so this will let us
290
                // (e.g., on a 1GB WinXP system, PS CS2 reports 520MB maxSpace, so this will let us