/trunk/CHANGELOG.md |
---|
1,9 → 1,14 |
# Changelog |
## 1.7.0.14 [Work-In-Progress] |
- Made a Unicode variant of Filter Foundry which is able to read and write files with Unicode directory names. Note that the Plugin and Parameter structure of Photoshop/FilterFactory is not Unicode ready, so please use ANSI or better ASCII for them. |
- 32 bit: Increased performance (OpenWatcom build). |
- 64 bit: Made a Unicode variant of Filter Foundry which is able to read and write files with Unicode directory names. Note that the Plugin and Parameter structure of Photoshop/FilterFactory is not Unicode ready, so please use ANSI or better ASCII for them. |
- Windows NT 3.x: Preview is now showing instantly when the dialog is opened. |
- Control text edit: The "up" and "down" keys can now be used to increase and decrease the value by 1. (*) |
- Control text edit: Internal overflow check fixed. Inputs like "500" will now be evaluated as "255" (max value) rather than "244" (modulo 256). |
(*) This bug/solution was tested on Windows but needs to be verified and/or implemented on Mac. |
## 1.7.0.13 [04-Dec-2021] |
- Internal change: PARM resource inside memory works now with C-Strings instead of Pascal-Strings. |
- The released 32-bit version is now optimized by the compiler. |
/trunk/TODO.md |
---|
104,6 → 104,8 |
Design/UI Tweaks |
---------------- |
* ctl(i) edit controls: Use a spinedit control so you can +1 and -1 with the mouse. Maybe `ControlTextWndProc` isn't neccessary anymore? |
* Should it be possible to zoom more than 100%? |
* The vertical scrollbar should auto-hide when the expression formula is short. (Also for Mac). Unfortunately, this task is very hard in WIN32 API. |
/trunk/read.c |
---|
75,7 → 75,11 |
break; |
} |
}else if(linecnt<=8){ |
slider[linecnt-1] = atoi(linebuf); |
int v; |
v = atoi(linebuf); |
if (v < 0) v = 0; |
if (v > 255) v = 255; |
slider[linecnt-1] = v; |
}else{ |
if(lineptr){ |
/* it's not an empty line; append it to current expr string */ |
280,6 → 284,7 |
// Sliders |
for (i = 0; i < 8; i++) { |
char* sliderName; |
int v; |
val = _ffx_read_str(&q); |
sliderName = val; |
if (format_version >= 12) { |
292,7 → 297,10 |
gdata->parm.ctl_used[i] = (bool32_t)*((byte*)q); |
q += sizeof(byte); |
gdata->parm.val[i] = *((uint32_t*)q); |
slider[i] = *((uint32_t*)q); |
v = *((uint32_t*)q); |
if (v < 0) v = 0; |
if (v > 255) v = 255; |
slider[i] = v; |
q += sizeof(uint32_t); |
} |
742,6 → 750,7 |
// Slider values |
for (i = 0; i < 8; i++) { |
char keyname[7], tmp[5]; |
int v; |
sprintf(keyname, "val[%d]", i); |
if (!_picoReadProperty(q, count, keyname, tmp, sizeof(tmp), false)) { |
sprintf(keyname, "def[%d]", i); |
749,7 → 758,10 |
strcpy(tmp,"0"); |
} |
} |
gdata->parm.val[i] = slider[i] = atoi(tmp); |
v = atoi(tmp); |
if (v < 0) v = 0; |
if (v > 255) v = 255; |
gdata->parm.val[i] = slider[i] = v; |
} |
// Map names |
/trunk/scripting.c |
---|
144,6 → 144,8 |
for (i = 0; i <= 7; ++i) { |
if (key == getAeteKey('0' + i, gdata->standalone ? &gdata->parm : NULL)) { |
PIGetInt(token, &v); |
if (v < 0) v = 0; |
if (v > 255) v = 255; |
slider[i] = v; |
} |
} |
/trunk/ui.c |
---|
190,6 → 190,8 |
void slidermoved(DIALOGREF dp,int i){ |
int v = GETSLIDERVALUE(dp,i); |
if (v < 0) v = 0; |
if (v > 255) v = 255; |
i -= FIRSTCTLITEM; |
slider[i] = v; |
SETCTLTEXTINT(dp,i+FIRSTCTLTEXTITEM,v,false); |
197,6 → 199,8 |
void slidertextchanged(DIALOGREF dp,int i){ |
int v = GETCTLTEXTINT(dp,i,NULL,false); |
if (v < 0) v = 0; |
if (v > 255) v = 255; |
i -= FIRSTCTLTEXTITEM; |
SETSLIDERVALUE(dp,i+FIRSTCTLITEM,v); |
slider[i] = v; |
/trunk/ui_win.c |
---|
181,6 → 181,43 |
#define IDT_TIMER_INITPREVIEW_DRAW 1111 |
WNDPROC lpControlEditWndProc[8]; |
LRESULT CALLBACK ControlTextWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { |
extern Boolean doupdates; |
int sliderNum; |
for (sliderNum = 0; sliderNum < 8; sliderNum++) { |
if (hWnd == GetDlgItem(gdata->hWndMainDlg, FIRSTCTLTEXTITEM + sliderNum)) { |
if ((uMsg == WM_KEYDOWN) && (wParam == VK_UP) && doupdates) |
{ |
uint8_t sliderVal = slider[sliderNum] < 255 ? slider[sliderNum] + 1 : slider[sliderNum]; |
slider[sliderNum] = sliderVal; |
SETCTLTEXTINT(gdata->hWndMainDlg, FIRSTCTLTEXTITEM + sliderNum, sliderVal, false); |
REPAINTCTL(gdata->hWndMainDlg, FIRSTCTLTEXTITEM + sliderNum); |
recalc_preview(gpb, gdata->hWndMainDlg); |
return 0; |
} |
if ((uMsg == WM_KEYDOWN) && (wParam == VK_DOWN) && doupdates) |
{ |
uint8_t sliderVal = slider[sliderNum] > 0 ? slider[sliderNum] - 1 : slider[sliderNum]; |
slider[sliderNum] = sliderVal; |
SETCTLTEXTINT(gdata->hWndMainDlg, FIRSTCTLTEXTITEM + sliderNum, sliderVal, false); |
REPAINTCTL(gdata->hWndMainDlg, FIRSTCTLTEXTITEM + sliderNum); |
recalc_preview(gpb, gdata->hWndMainDlg); |
return 0; |
} |
return CallWindowProc(lpControlEditWndProc[sliderNum], hWnd, uMsg, wParam, lParam); |
} |
} |
return 0; // should not happen |
} |
INT_PTR CALLBACK maindlgproc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam){ |
static POINT origpos; |
static Point origscroll; |
200,6 → 237,8 |
if (doupdates) { |
int sliderNum = (int)wParam - FIRSTCTLITEM; |
uint8_t sliderVal = (uint8_t)(lParam & 0xFFFF); |
if (sliderVal < 0) sliderVal = 0; |
if (sliderVal > 255) sliderVal = 255; |
slider[sliderNum] = sliderVal; |
SETCTLTEXTINT(hDlg, FIRSTCTLTEXTITEM + sliderNum, sliderVal, false); |
279,6 → 318,12 |
//recalc_preview(gpb, hDlg); |
SetTimer(hDlg, IDT_TIMER_INITPREVIEW_DRAW, 1, (TIMERPROC)NULL); |
// Implement "up" and "down" keys for the edit controls |
// TODO: Better use a spin-edit? |
for (i = 0; i < 8; ++i) { |
lpControlEditWndProc[i] = (WNDPROC)SetWindowLongPtr(GetDlgItem(hDlg, FIRSTCTLTEXTITEM + i), GWL_WNDPROC, (LONG_PTR)&ControlTextWndProc); |
} |
break; |
case WM_DESTROY: |
gdata->hWndMainDlg = 0; |