diff --git a/.gitattributes b/.gitattributes index 1c1ad96d..d21ee299 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14,6 +14,7 @@ *.bat text eol=crlf *.cmd text eol=crlf +*.rc text eol=crlf *.dsp text eol=crlf *.dsw text eol=crlf *.sln text eol=crlf diff --git a/WDL/.gitattributes b/WDL/.gitattributes index 1c1ad96d..d21ee299 100644 --- a/WDL/.gitattributes +++ b/WDL/.gitattributes @@ -14,6 +14,7 @@ *.bat text eol=crlf *.cmd text eol=crlf +*.rc text eol=crlf *.dsp text eol=crlf *.dsw text eol=crlf *.sln text eol=crlf diff --git a/WDL/assocarray.h b/WDL/assocarray.h index ccba966b..b39a943b 100644 --- a/WDL/assocarray.h +++ b/WDL/assocarray.h @@ -174,13 +174,15 @@ template class WDL_AssocArrayImpl kv->val = val; } - void Resort() + void Resort(int (*new_keycmp)(KEY *k1, KEY *k2)=NULL) { + if (new_keycmp) m_keycmp = new_keycmp; if (m_data.GetSize() > 1 && m_keycmp) { qsort(m_data.Get(), m_data.GetSize(), sizeof(KeyVal), (int(*)(const void*, const void*))m_keycmp); - RemoveDuplicateKeys(); + if (!new_keycmp) + RemoveDuplicateKeys(); } } @@ -393,11 +395,11 @@ template class WDL_LogicalSortStringKeyedArray : public WDL_StringKe ~WDL_LogicalSortStringKeyedArray() { } -private: - static int cmpstr(const char **a, const char **b) { return _cmpstr(*a, *b, true); } static int cmpistr(const char **a, const char **b) { return _cmpstr(*a, *b, false); } +private: + static int _cmpstr(const char *s1, const char *s2, bool case_sensitive) { // this also exists as WDL_strcmp_logical in wdlcstring.h diff --git a/WDL/eel2/eel_lice.h b/WDL/eel2/eel_lice.h index 9f85c3bf..d68a5edc 100644 --- a/WDL/eel2/eel_lice.h +++ b/WDL/eel2/eel_lice.h @@ -2558,6 +2558,12 @@ LRESULT WINAPI eel_lice_wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar st[zp]=lowera; } } +#ifdef _WIN32 + if (!a && (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN) && ((GetAsyncKeyState(VK_CONTROL)&0x8000)||(GetAsyncKeyState(VK_MENU)&0x8000))) + { + a = (int)MapVirtualKey((UINT)wParam,2/*MAPVK_VK_TO_CHAR*/); + } +#endif if (a && uMsg != WM_KEYUP #ifdef _WIN32 diff --git a/WDL/filebrowse.cpp b/WDL/filebrowse.cpp index 04eef1fd..34d57323 100644 --- a/WDL/filebrowse.cpp +++ b/WDL/filebrowse.cpp @@ -117,7 +117,7 @@ bool WDL_ChooseDirectory(HWND parent, const char *text, const char *initialdir, #endif } -static const char *stristr(const char* a, const char* b) +static WDL_STATICFUNC_UNUSED const char *stristr(const char* a, const char* b) { const size_t n = strlen(a), len = strlen(b); for (size_t i = 0; i+len <= n; ++i) if (!strnicmp(a+i, b, len)) return a+i; @@ -185,6 +185,8 @@ bool WDL_ChooseFileForSave(HWND parent, char cwd[2048]; GetCurrentDirectory(sizeof(cwd),cwd); + while (defext && *defext == '.') defext++; // this function can be passed defext of either .wav or wav, we always want it to be the latter + #ifdef _WIN32 WDL_FileBrowse_Dis win32disfix(parent); char temp[4096]; @@ -213,7 +215,9 @@ bool WDL_ChooseFileForSave(HWND parent, { if(*p) p+=strlen(p)+1; if(!*p) break; - if(stristr(p, defext)) + const char *ext = WDL_get_fileext(p); + if (*ext == '.') ext++; + if(!stricmp(ext,defext)) { fd.setFileTypeIndex(i+1); break; @@ -279,7 +283,11 @@ bool WDL_ChooseFileForSave(HWND parent, } else { - if (defext && *defext == '.') initialfile = defext; // SWELL supports default extension in filename field + if (defext && *defext) + { + snprintf(if_temp,sizeof(if_temp),".%s",defext); // SWELL treats initialfile of ".ext" as default extension + initialfile = if_temp; + } } bool r = BrowseForSaveFile(text,initialdir,initialfile,extlist,fn,fnsize); diff --git a/WDL/lameencdec.cpp b/WDL/lameencdec.cpp index 76ce8259..6051cbfc 100644 --- a/WDL/lameencdec.cpp +++ b/WDL/lameencdec.cpp @@ -86,6 +86,7 @@ static struct { size_t (*get_lametag_frame)(lame_t, unsigned char *, size_t); const char *(*get_lame_version)(); int (*set_findReplayGain)(lame_t, int); + } lame; #if 1 @@ -138,6 +139,7 @@ static bool tryLoadDLL2(const char *name) GETITEM(get_lametag_frame) GETITEM(set_findReplayGain) GETITEM_NP(get_lame_version) + #undef GETITEM #undef GETITEM_NP if (errcnt2) @@ -240,7 +242,9 @@ int LameEncoder::CheckDLL() // returns 1 for lame API, 2 for Blade, 0 for none } -LameEncoder::LameEncoder(int srate, int nch, int bitrate, int stereomode, int quality, int vbrmethod, int vbrquality, int vbrmax, int abr, int rpgain) +LameEncoder::LameEncoder(int srate, int nch, int bitrate, int stereomode, int quality, + int vbrmethod, int vbrquality, int vbrmax, int abr, int rpgain, + WDL_StringKeyedArray *metadata) { m_lamestate=0; if (!CheckDLL()) @@ -252,7 +256,7 @@ LameEncoder::LameEncoder(int srate, int nch, int bitrate, int stereomode, int qu errorstat=0; m_nch=nch; m_encoder_nch = stereomode == 3 ? 1 : m_nch; - + m_id3_len=0; m_lamestate=lame.init(); if (!m_lamestate) @@ -298,7 +302,13 @@ LameEncoder::LameEncoder(int srate, int nch, int bitrate, int stereomode, int qu } if (rpgain>0 && lame.set_findReplayGain) lame.set_findReplayGain(m_lamestate,1); + if (metadata && metadata->GetSize()) + { + SetMetadata(metadata); + } + lame.init_params(m_lamestate); + in_size_samples=lame.get_framesize(m_lamestate); outtmp.Resize(65536); @@ -426,7 +436,7 @@ LameEncoder::~LameEncoder() if (!fp) fp = fopen(m_vbrfile.Get(),"r+b"); if (fp) { - fseek(fp,0,SEEK_SET); + fseek(fp, m_id3_len, SEEK_SET); fwrite(buf,1,a,fp); fclose(fp); } @@ -437,3 +447,314 @@ LameEncoder::~LameEncoder() } } + +#define _AddSyncSafeInt32(i) \ + *p++=(((i)>>21)&0x7F); \ + *p++=(((i)>>14)&0x7F); \ + *p++=(((i)>>7)&0x7F); \ + *p++=((i)&0x7F); + +#define _AddInt32(i) \ + *p++=(((i)>>24)&0xFF); \ + *p++=(((i)>>16)&0xFF); \ + *p++=(((i)>>8)&0xFF); \ + *p++=((i)&0xFF); + +#define CTOC_NAME "TOC" // arbitrary name of table of contents element + +unsigned char *PackID3Chunk(WDL_StringKeyedArray *metadata, int *buflen) +{ + if (!metadata || !buflen) return NULL; + + unsigned char *buf=NULL; + *buflen=0; + + int id3len=0; + int i; + for (i=0; i < metadata->GetSize(); ++i) + { + const char *id; + const char *val=metadata->Enumerate(i, &id); + if (strlen(id) < 8 || strncmp(id, "ID3:", 4) || !val) continue; + id += 4; + if (strlen(id) == 4 && id[0] == 'T') + { + id3len += 10+1+strlen(val); + if (!strcmp(id, "TXXX")) + { + // tag form is "desc=val", default to "USER" if desc is not supplied + const char *sep=strchr(val, '='); + if (!sep) id3len += 5; + else if (sep == val) id3len += 4; + } + } + else if (!strcmp(id, "COMM")) + { + id3len += 10+5+strlen(val); + } + } + + WDL_HeapBuf apic_hdr; + int apic_datalen=0; + const char *apic_fn=metadata->Get("ID3:APIC_FILE"); + if (apic_fn && apic_fn[0]) + { + const char *mime=NULL; + const char *ext=WDL_get_fileext(apic_fn); + if (ext && (!stricmp(ext, ".jpg") || !stricmp(ext, ".jpeg"))) mime="image/jpeg"; + else if (ext && !stricmp(ext, ".png")) mime="image/png"; + if (mime) + { + FILE *fp=fopen(apic_fn, "rb"); // could stat but let's make sure we can open the file + if (fp) + { + fseek(fp, 0, SEEK_END); + apic_datalen=ftell(fp); + fclose(fp); + } + } + if (apic_datalen) + { + const char *t=metadata->Get("ID3:APIC_TYPE"); + int type=-1; + if (t && t[0] >= '0' && t[0] <= '9') type=atoi(t); + if (type < 0 || type >= 16) type=3; // default "Cover (front)" + + const char *desc=metadata->Get("ID3:APIC_DESC"); + if (!desc) desc=""; + int desclen=wdl_min(strlen(desc), 63); + + int apic_hdrlen=1+strlen(mime)+1+1+desclen+1; + char *p=(char*)apic_hdr.Resize(apic_hdrlen); + if (p) + { + *p++=3; // UTF-8 + memcpy(p, mime, strlen(mime)+1); + p += strlen(mime)+1; + *p++=type; + memcpy(p, desc, desclen); + p += desclen; + *p++=0; + id3len += 10+apic_hdrlen+apic_datalen; + } + } + } + + int chapcnt=0, toclen=0; + char idbuf[512]; + snprintf(idbuf,sizeof(idbuf), "ID3:CHAP%d", chapcnt+1); + const char *val=metadata->Get(idbuf); + while (val) + { + const char *c1=strchr(val, ':'); + const char *c2=(c1 ? strchr(c1+1, ':') : NULL); + if (WDL_NOT_NORMALLY(!c1 || !c2)) break; + + const char *id=idbuf+4; + int idlen=strlen(id); + int namelen=strlen(c2+1); + toclen += idlen+1; + id3len += 10+idlen+1+4*4+10+1+namelen+1; + + if (++chapcnt == 255) break; + snprintf(idbuf,sizeof(idbuf), "ID3:CHAP%d", chapcnt+1); + val=metadata->Get(idbuf); + } + if (toclen) + { + toclen += strlen(CTOC_NAME)+1+2; + id3len += 10+toclen; + } + + if (id3len) + { + id3len += 10; + buf=(unsigned char*)malloc(id3len); + unsigned char *p=buf; + memcpy(p,"ID3\x04\x00\x00", 6); + p += 6; + _AddSyncSafeInt32(id3len-10); + for (i=0; i < metadata->GetSize(); ++i) + { + const char *id; + const char *val=metadata->Enumerate(i, &id); + if (strlen(id) < 8 || strncmp(id, "ID3:", 4) || !val) continue; + id += 4; + if (strlen(id) == 4 && !strcmp(id, "TXXX")) + { + memcpy(p, id, 4); + p += 4; + const char *sep=strchr(val, '='); + if (sep == val) + { + ++val; + sep=NULL; + } + int len=strlen(val); + int tlen=len+(!sep ? 5 : 0); + _AddSyncSafeInt32(1+tlen); + memcpy(p, "\x00\x00\x03", 3); // UTF-8 + p += 3; + if (sep) + { + memcpy(p, val, len); + p[sep-val]=0; + } + else + { + memcpy(p, "USER\x00", 5); + p += 5; + memcpy(p, val, len); + } + p += len; + } + else if (strlen(id) == 4 && id[0] == 'T') + { + memcpy(p, id, 4); + p += 4; + int len=strlen(val); + _AddSyncSafeInt32(1+len); + memcpy(p, "\x00\x00\x03", 3); // UTF-8 + p += 3; + memcpy(p, val, len); + p += len; + } + else if (!strcmp(id, "COMM")) + { + // http://www.loc.gov/standards/iso639-2/php/code_list.php + // most apps ignore this, itunes wants "eng" or something locale-specific + const char *lang=metadata->Get("ID3:COMM_LANG"); + + memcpy(p, id, 4); + p += 4; + int len=strlen(val); + _AddSyncSafeInt32(5+len); + memcpy(p, "\x00\x00\x03", 3); // UTF-8 + p += 3; + if (lang && strlen(lang) >= 3 && + tolower(*lang) >= 'a' && tolower(*lang) <= 'z') + { + *p++=tolower(*lang++); + *p++=tolower(*lang++); + *p++=tolower(*lang++); + *p++=0; + } + else + { + // some apps write "XXX" for "no particular language" + memcpy(p, "XXX\x00", 4); + p += 4; + } + memcpy(p, val, len); + p += len; + } + } + + if (toclen) + { + memcpy(p, "CTOC", 4); + p += 4; + _AddSyncSafeInt32(toclen); + memcpy(p, "\x00\x00", 2); + p += 2; + memcpy(p, CTOC_NAME, strlen(CTOC_NAME)+1); + p += strlen(CTOC_NAME)+1; + *p++=3; // CTOC flags: &1=top level, &2=ordered + *p++=(chapcnt&0xFF); + + for (i=0; i < chapcnt; ++i) + { + snprintf(idbuf,sizeof(idbuf), "ID3:CHAP%d", i+1); + const char *val=metadata->Get(idbuf); + if (WDL_NOT_NORMALLY(!val)) break; + const char *c1=strchr(val, ':'); + const char *c2=(c1 ? strchr(c1+1, ':') : NULL); + if (WDL_NOT_NORMALLY(!c1 || !c2)) break; + + const char *id=idbuf+4; + int idlen=strlen(id); + memcpy(p, id, idlen+1); + p += idlen+1; + } + + for (i=0; i < chapcnt; ++i) + { + snprintf(idbuf,sizeof(idbuf), "ID3:CHAP%d", i+1); + const char *val=metadata->Get(idbuf); + if (WDL_NOT_NORMALLY(!val)) break; + const char *c1=strchr(val, ':'); + const char *c2=(c1 ? strchr(c1+1, ':') : NULL); + if (WDL_NOT_NORMALLY(!c1 || !c2)) break; + + const char *id=idbuf+4; + int idlen=strlen(id); + int st=atoi(val); + int et=atoi(c1+1); + const char *name=c2+1; + int namelen=strlen(name); + + memcpy(p, "CHAP", 4); + p += 4; + _AddSyncSafeInt32(idlen+1+4*4+10+1+namelen+1); + memcpy(p, "\x00\x00", 2); + p += 2; + memcpy(p, id, idlen+1); + p += idlen+1; + _AddInt32(st); + _AddInt32(et); + p += 8; + memcpy(p, "TIT2", 4); + p += 4; + _AddSyncSafeInt32(1+namelen+1); + memcpy(p, "\x00\x00\x03", 3); // UTF-8 + p += 3; + memcpy(p, name, namelen+1); + p += namelen+1; + } + } + + if (apic_hdr.GetSize() && apic_datalen) + { + memcpy(p, "APIC", 4); + p += 4; + int len=apic_hdr.GetSize()+apic_datalen; + _AddSyncSafeInt32(len); + memcpy(p, "\x00\x00", 2); + p += 2; + memcpy(p, apic_hdr.Get(), apic_hdr.GetSize()); + p += apic_hdr.GetSize(); + FILE *fp=fopen(apic_fn, "rb"); + if (WDL_NORMALLY(fp)) + { + fread(p, 1, apic_datalen, fp); + fclose(fp); + } + else // uh oh + { + memset(p, 0, apic_datalen); + } + p += apic_datalen; + } + + if (WDL_NOT_NORMALLY(p-buf != id3len)) + { + free(buf); + buf=NULL; + } + } + + if (buf) *buflen=id3len; + return buf; +} + + +void LameEncoder::SetMetadata(WDL_StringKeyedArray *metadata) +{ + int buflen=0; + unsigned char *buf=PackID3Chunk(metadata, &buflen); + if (buf && buflen) + { + outqueue.Add(buf, buflen); + m_id3_len=buflen; + } +} diff --git a/WDL/lameencdec.h b/WDL/lameencdec.h index b1aa2666..dff0a11c 100644 --- a/WDL/lameencdec.h +++ b/WDL/lameencdec.h @@ -29,12 +29,15 @@ #include "queue.h" #include "wdlstring.h" +#include "assocarray.h" class LameEncoder { public: - LameEncoder(int srate, int nch, int bitrate, int stereomode = 1, int quality = 2, int vbrmethod = -1, int vbrquality = 2, int vbrmax = 320, int abr = 128, int rpgain=0); + LameEncoder(int srate, int nch, int bitrate, int stereomode=1, int quality=2, + int vbrmethod=-1, int vbrquality=2, int vbrmax=320, int abr=128, int rpgain=0, + WDL_StringKeyedArray *metadata=NULL); ~LameEncoder(); int Status() { return errorstat; } // 1=no dll, 2=error @@ -64,6 +67,10 @@ class LameEncoder int GetNumChannels() { return m_encoder_nch; } private: + + void SetMetadata(WDL_StringKeyedArray *metadata); + int m_id3_len; + void *m_lamestate; WDL_Queue spltmp[2]; WDL_HeapBuf outtmp; @@ -71,7 +78,6 @@ class LameEncoder int errorstat; int in_size_samples; int m_nch,m_encoder_nch; - }; #endif diff --git a/WDL/lice/lice.cpp b/WDL/lice/lice.cpp index 742a417a..2b89103d 100644 --- a/WDL/lice/lice.cpp +++ b/WDL/lice/lice.cpp @@ -969,6 +969,7 @@ static void LICE_BlitInt(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int ds if (dstx < 0) { sr.left -= dstx; dstx=0; } if (dsty < 0) { sr.top -= dsty; dsty=0; } + if (sr.left < 0 || sr.top < 0) return; // overflow check if (sr.right <= sr.left || sr.bottom <= sr.top || dstx >= destbm_w || dsty >= destbm_h) return; if (sr.right > sr.left + (destbm_w-dstx)) sr.right = sr.left + (destbm_w-dstx); @@ -1110,6 +1111,8 @@ void LICE_Blur(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int sr if (dstx < 0) { sr.left -= dstx; dstx=0; } if (dsty < 0) { sr.top -= dsty; dsty=0; } + if (sr.left < 0 || sr.top < 0) return; // overflow check + const int destbm_w = dest->getWidth(), destbm_h = dest->getHeight(); if (sr.right <= sr.left || sr.bottom <= sr.top || dstx >= destbm_w || dsty >= destbm_h) return; @@ -2700,11 +2703,13 @@ void LICE_DrawGlyphEx(LICE_IBitmap* dest, int x, int y, LICE_pixel color, const if (x < 0) { src_x -= x; + if (src_x < 0) return; // overflow src_w += x; x = 0; } if (y < 0) { src_y -= y; + if (src_y < 0) return; // overflow src_h += y; y = 0; } diff --git a/WDL/lice/test/test.rc b/WDL/lice/test/test.rc index f5371bcc..7c75d52f 100644 --- a/WDL/lice/test/test.rc +++ b/WDL/lice/test/test.rc @@ -1,107 +1,107 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 398, 270 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "LICE Test App" -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "",IDC_RECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE | - WS_DISABLED,7,23,384,239 - COMBOBOX IDC_COMBO1,7,7,181,170,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP -END - - -///////////////////////////////////////////////////////////////////////////// -// -// PNG -// - -IDC_PNG1 PNG DISCARDABLE "image.png" -IDI_MAIN ICON DISCARDABLE "main.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_DIALOG1, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 391 - TOPMARGIN, 7 - BOTTOMMARGIN, 263 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 398, 270 +STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +CAPTION "LICE Test App" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "",IDC_RECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE | + WS_DISABLED,7,23,384,239 + COMBOBOX IDC_COMBO1,7,7,181,170,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// PNG +// + +IDC_PNG1 PNG DISCARDABLE "image.png" +IDI_MAIN ICON DISCARDABLE "main.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DIALOG1, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 391 + TOPMARGIN, 7 + BOTTOMMARGIN, 263 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/WDL/rpool.h b/WDL/rpool.h index b4b3028f..e6ee0498 100644 --- a/WDL/rpool.h +++ b/WDL/rpool.h @@ -135,7 +135,7 @@ template class WDL_ResourcePool return ent; } - if (!bestnoown && (!ent->m_rpoolinfo.m_ownerptr || ent->m_rpoolinfo.m_owneduntil < now)) + if (!bestnoown && (!ent->m_rpoolinfo.m_ownerptr || (now - (ent->m_rpoolinfo.m_owneduntil+1)) <= 0x7FFFFFFF)) { bestent=ent; bestlastent=lastent; diff --git a/WDL/swell/sample_project/sample_project.rc b/WDL/swell/sample_project/sample_project.rc index fb1c6264..0503a0ca 100644 --- a/WDL/swell/sample_project/sample_project.rc +++ b/WDL/swell/sample_project/sample_project.rc @@ -1,118 +1,118 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 264, 117 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Sample app" -MENU IDR_MENU1 -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_EDIT1,59,50,145,14,ES_AUTOHSCROLL - LTEXT "Enter some text here:",IDC_STATIC,59,39,73,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_DIALOG1, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 257 - TOPMARGIN, 7 - BOTTOMMARGIN, 110 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MENU1 MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "MessageBox the string", ID_SOMETHING - MENUITEM SEPARATOR - MENUITEM "&Quit", ID_QUIT - END - POPUP "&Help" - BEGIN - MENUITEM "&About", ID_ABOUT - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 264, 117 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Sample app" +MENU IDR_MENU1 +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_EDIT1,59,50,145,14,ES_AUTOHSCROLL + LTEXT "Enter some text here:",IDC_STATIC,59,39,73,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DIALOG1, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 257 + TOPMARGIN, 7 + BOTTOMMARGIN, 110 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU1 MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "MessageBox the string", ID_SOMETHING + MENUITEM SEPARATOR + MENUITEM "&Quit", ID_QUIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About", ID_ABOUT + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/WDL/swell/swell-dlg.mm b/WDL/swell/swell-dlg.mm index 74c43a1b..f332f884 100644 --- a/WDL/swell/swell-dlg.mm +++ b/WDL/swell/swell-dlg.mm @@ -787,6 +787,21 @@ -(void) swellOnControlDoubleClick:(id)sender { SWELL_ListView* v = (SWELL_ListView*)sender; NMLISTVIEW nmlv={{(HWND)sender,(UINT_PTR)[(NSControl*)sender tag], NM_DBLCLK}, (int) [v clickedRow], (int) [sender clickedColumn], }; + + if (nmlv.iItem == -1) + { + // ignore doubleclicks in column headers + NSTableHeaderView *v = [sender headerView]; + if (v) + { + NSPoint pt=[NSEvent mouseLocation]; + NSWindow *w = [self window]; + pt = [w convertScreenToBase:pt]; + pt = [v convertPoint:pt fromView:nil]; + if (NSPointInRect(pt,[v bounds])) return; + } + } + SWELL_ListView_Row *row=v->m_items->Get(nmlv.iItem); if (row) nmlv.lParam = row->m_param; @@ -1398,6 +1413,7 @@ -(void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:( -(BOOL) swellWantsMetal { return m_use_metal > 0; } -(void) swellDrawMetal:(const RECT *)forRect { + SWELL_AutoReleaseHelper arparp; #define swell_metal_set_layer_gravity(layer, g) do { \ const int grav = (g); \ @@ -1418,7 +1434,7 @@ -(void) swellDrawMetal:(const RECT *)forRect // this seems to work correclty, *except* - if you're using the high-performance card, the system will never go back to integrated, // presumably because our metal devices are open. Maybe we can flag them as "non-essential" ? const DWORD now = GetTickCount(); - if (__CGDirectDisplayCopyCurrentMetalDevice && (!device || now > m_metal_device_lastchkt+1000 || now < m_metal_device_lastchkt-1000)) + if (__CGDirectDisplayCopyCurrentMetalDevice && (!device || (now-m_metal_device_lastchkt)>1000)) { m_metal_device_lastchkt = now; CGDirectDisplayID viewDisplayID = (CGDirectDisplayID) [self.window.screen.deviceDescription[@"NSScreenNumber"] unsignedIntegerValue]; @@ -2415,6 +2431,7 @@ - (id)initModelessForChild:(HWND)child owner:(HWND)owner styleMask:(unsigned int } } + [self setAutorecalculatesKeyViewLoop:YES]; [self display]; return self; } @@ -2473,6 +2490,7 @@ - (id)initModeless:(SWELL_DialogResourceIndex *)resstate Parent:(HWND)parent dlg [ch release]; + [self setAutorecalculatesKeyViewLoop:YES]; [self display]; [self release]; // matching retain above @@ -2552,6 +2570,7 @@ - (id)initDialogBox:(SWELL_DialogResourceIndex *)resstate Parent:(HWND)parent dl // DOWINDOWMINMAXSIZES(ch) [ch release]; + [self setAutorecalculatesKeyViewLoop:YES]; [self setHidesOnDeactivate:NO]; [self display]; diff --git a/WDL/swell/swell-dlggen.h b/WDL/swell/swell-dlggen.h index b91720a5..f49194b2 100644 --- a/WDL/swell/swell-dlggen.h +++ b/WDL/swell/swell-dlggen.h @@ -90,6 +90,7 @@ struct SWELL_DlgResourceEntry #define GROUPBOX }, { "__SWELL_GROUP", 0, #define CHECKBOX }, { "__SWELL_CHECKBOX", 0, #define LISTBOX }, { "__SWELL_LISTBOX", 0, "", +#define ICON }, { "__SWELL_ICON", 0, (const char*)(INT_PTR) #define NOT @@ -108,6 +109,9 @@ struct SWELL_DlgResourceEntry #define SS_BLACKRECT 0x4L #define SS_BLACKFRAME (SS_BLACKRECT) #define SS_LEFTNOWORDWRAP 0xCL +#define SS_ETCHEDHORZ 0x10L +#define SS_ETCHEDVERT 0x11L +#define SS_ETCHEDFRAME 0x12L #define SS_TYPEMASK 0x1FL #define SS_NOTIFY 0x0100L diff --git a/WDL/swell/swell-functions.h b/WDL/swell/swell-functions.h index 056fa69b..fefd9792 100644 --- a/WDL/swell/swell-functions.h +++ b/WDL/swell/swell-functions.h @@ -203,6 +203,7 @@ SWELL_API_DEFINE(BOOL, SetDlgItemText,(HWND, int idx, const char *text)) SWELL_API_DEFINE(BOOL, SetDlgItemInt,(HWND, int idx, int val, int issigned)) SWELL_API_DEFINE(int, GetDlgItemInt,(HWND, int idx, BOOL *translated, int issigned)) SWELL_API_DEFINE(BOOL, GetDlgItemText,(HWND, int idx, char *text, int textlen)) +SWELL_API_DEFINE(int, GetWindowTextLength,(HWND)) #ifndef GetWindowText #define GetWindowText(hwnd,text,textlen) GetDlgItemText(hwnd,0,text,textlen) @@ -421,13 +422,10 @@ SWELL_API_DEFINE(void, ListView_SetItemCount,(HWND h, int cnt)) #define ListView_SetItemCountEx(list,cnt,flags) ListView_SetItemCount(list,cnt) SWELL_API_DEFINE(void, ListView_EnsureVisible,(HWND h, int i, BOOL pok)) -SWELL_API_DEFINE(bool, ListView_GetSubItemRect,(HWND h, int item, int subitem, int code, RECT *r)) SWELL_API_DEFINE(void, ListView_SetImageList,(HWND h, HIMAGELIST imagelist, int which)) -SWELL_API_DEFINE(int, ListView_HitTest,(HWND h, LVHITTESTINFO *pinf)) SWELL_API_DEFINE(int, ListView_SubItemHitTest,(HWND h, LVHITTESTINFO *pinf)) SWELL_API_DEFINE(void, ListView_GetItemText,(HWND hwnd, int item, int subitem, char *text, int textmax)) SWELL_API_DEFINE(void, ListView_SortItems,(HWND hwnd, PFNLVCOMPARE compf, LPARAM parm)) -SWELL_API_DEFINE(bool, ListView_GetItemRect,(HWND h, int item, RECT *r, int code)) SWELL_API_DEFINE(bool, ListView_Scroll,(HWND h, int xscroll, int yscroll)) SWELL_API_DEFINE(int, ListView_GetTopIndex,(HWND h)) SWELL_API_DEFINE(int, ListView_GetCountPerPage,(HWND h)) @@ -438,6 +436,15 @@ SWELL_API_DEFINE(int, Header_GetItemCount,(HWND h)) SWELL_API_DEFINE(BOOL, Header_GetItem,(HWND h, int col, HDITEM* hi)) SWELL_API_DEFINE(BOOL, Header_SetItem,(HWND h, int col, HDITEM* hi)) + // NOTE: the Cocoa versions of these functions behave differently than swell-generic and Windows: + // they return the absolute (unscrolled) coordinates. In order to behave properly, the caller should + // use ClientToScreen in order to get to screen coordinates, and then convert those as desired. +SWELL_API_DEFINE(bool, ListView_GetItemRect,(HWND h, int item, RECT *r, int code)) +SWELL_API_DEFINE(bool, ListView_GetSubItemRect,(HWND h, int item, int subitem, int code, RECT *r)) + // NOTE: Cocoa version takes absolute (unscrolled) coordinates. ScreenToClient(listview) will convert screen + // coordinates to the correct coorindates +SWELL_API_DEFINE(int, ListView_HitTest,(HWND h, LVHITTESTINFO *pinf)) + SWELL_API_DEFINE(int, SWELL_GetListViewHeaderHeight, (HWND h)) #ifndef ImageList_Create @@ -1073,10 +1080,8 @@ SWELL_API_DEFINE(int,SWELL_GetOSXVersion,()) SWELL_API_DEFINE(void,SWELL_Register_Cursor_Resource,(const char *idx, const char *name, int hotspot_x, int hotspot_y)) -#ifndef SWELL_TARGET_OSX -SWELL_API_DEFINE(bool, SWELL_ChooseColor, (HWND, int *, int ncustom, int *custom)) +SWELL_API_DEFINE(bool, SWELL_ChooseColor, (HWND, COLORREF *, int ncustom, COLORREF *custom)) SWELL_API_DEFINE(bool, SWELL_ChooseFont, (HWND, LOGFONT*)) -#endif SWELL_API_DEFINE(bool, IsWindowEnabled, (HWND)) diff --git a/WDL/swell/swell-gdi.mm b/WDL/swell/swell-gdi.mm index 5fd5afdc..a673602f 100644 --- a/WDL/swell/swell-gdi.mm +++ b/WDL/swell/swell-gdi.mm @@ -29,6 +29,8 @@ #import #import #include "swell.h" +#define SWELL_GetOSXVersion SWELL_GDI_GetOSXVersion +#define SWELL_IMPLEMENT_GETOSXVERSION static #include "swell-internal.h" #include "../mutex.h" @@ -47,31 +49,6 @@ void SWELL_Metal_FillRect(void *_tex, int x, int y, int w, int h, int color); #endif -// reimplement here so that swell-gdi isn't dependent on swell-misc, and vice-versa -static int SWELL_GDI_GetOSXVersion() -{ - static SInt32 v; - if (!v) - { - if (NSAppKitVersionNumber >= 1266.0) - { - if (NSAppKitVersionNumber >= 1670.0) // unsure if this is correct (10.14.1 is 1671.1) - v = 0x10d0; - else if (NSAppKitVersionNumber >= 1404.0) - v = 0x10b0; - else - v=0x10a0; // 10.10+ Gestalt(gsv) return 0x109x, so we bump this to 0x10a0 - } - else - { - SInt32 a = 0x1040; - Gestalt(gestaltSystemVersion,&a); - v=a; - } - } - return v; -} - #ifdef __AVX__ #include #endif @@ -1767,7 +1744,7 @@ void SWELL_FillDialogBackground(HDC hdc, const RECT *r, int level) NSColor *c = [NSColor windowBackgroundColor]; if ([c respondsToSelector:@selector(CGColor)]) { - CGContextSetFillColorWithColor(ctx, [c CGColor]); + CGContextSetFillColorWithColor(ctx, (CGColorRef)[c CGColor]); ok = true; } } diff --git a/WDL/swell/swell-generic-gdk.cpp b/WDL/swell/swell-generic-gdk.cpp index 69f27a8e..d43db0fa 100644 --- a/WDL/swell/swell-generic-gdk.cpp +++ b/WDL/swell/swell-generic-gdk.cpp @@ -107,7 +107,7 @@ static GdkEvent *s_cur_evt; static GList *s_program_icon_list; static SWELL_OSWINDOW swell_dragsrc_osw; -static DWORD swell_dragsrc_timeout; +static DWORD swell_dragsrc_timeout_start; static HWND swell_dragsrc_hwnd; static DWORD swell_lastMessagePos; static int gdk_options; @@ -1095,11 +1095,10 @@ static void OnButtonEvent(GdkEventButton *b) if (b->type == GDK_BUTTON_PRESS) { - DWORD now = GetTickCount();; HWND oldFocus=GetFocus(); if (!oldFocus || oldFocus != hwnd2 || - (now >= s_last_focus_change_time && now < (s_last_focus_change_time+500))) + (GetTickCount()-s_last_focus_change_time) < 500) { if (IsWindowEnabled(hwnd2)) SendMessage(hwnd2,WM_MOUSEACTIVATE,0,0); @@ -1340,7 +1339,7 @@ static void swell_gdkEventHandler(GdkEvent *evt, gpointer data) s_last_focus_change_time = GetTickCount(); swell_on_toplevel_raise(fc->window); if (swell_ignore_focus_oswindow != fc->window || - GetTickCount() > swell_ignore_focus_oswindow_until) + (GetTickCount()-swell_ignore_focus_oswindow_until) < 0x10000000) { SWELL_focused_oswindow = fc->window; } @@ -1743,8 +1742,7 @@ static HANDLE req_clipboard(GdkAtom type) return NULL; } - DWORD now = GetTickCount(); - if (now < startt-1000 || now > startt+500) break; + if ((GetTickCount()-startt) > 500) break; Sleep(10); } } @@ -2192,7 +2190,7 @@ static LRESULT WINAPI dropSourceWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR sel = gdk_drag_get_selection(inf->dragctx); if (sel) gdk_selection_owner_set(swell_dragsrc_osw,sel,GDK_CURRENT_TIME,TRUE); } - swell_dragsrc_timeout = GetTickCount() + 500; + swell_dragsrc_timeout_start = GetTickCount(); return 0; } ReleaseCapture(); @@ -2252,7 +2250,7 @@ void SWELL_InitiateDragDrop(HWND hwnd, RECT* srcrect, const char* srcfn, void (* info.callback = callback; RECT r={0,}; HWND__ *h = new HWND__(NULL,0,&r,NULL,false,NULL,dropSourceWndProc, NULL); - swell_dragsrc_timeout = 0; + swell_dragsrc_timeout_start = 0; swell_dragsrc_hwnd=h; h->m_private_data = (INT_PTR) &info; dropSourceWndProc(h,WM_CREATE,0,0); @@ -2260,7 +2258,7 @@ void SWELL_InitiateDragDrop(HWND hwnd, RECT* srcrect, const char* srcfn, void (* { SWELL_RunEvents(); Sleep(10); - if (swell_dragsrc_timeout && GetTickCount()>swell_dragsrc_timeout) ReleaseCapture(); + if (swell_dragsrc_timeout_start && (GetTickCount()-swell_dragsrc_timeout_start) > 500) ReleaseCapture(); } swell_dragsrc_hwnd=NULL; @@ -2275,7 +2273,7 @@ void SWELL_InitiateDragDropOfFileList(HWND hwnd, RECT *srcrect, const char **src info.srccount = srccount; RECT r={0,}; HWND__ *h = new HWND__(NULL,0,&r,NULL,false,NULL,dropSourceWndProc, NULL); - swell_dragsrc_timeout = 0; + swell_dragsrc_timeout_start = 0; swell_dragsrc_hwnd=h; h->m_private_data = (INT_PTR) &info; dropSourceWndProc(h,WM_CREATE,0,0); @@ -2283,7 +2281,7 @@ void SWELL_InitiateDragDropOfFileList(HWND hwnd, RECT *srcrect, const char **src { SWELL_RunEvents(); Sleep(10); - if (swell_dragsrc_timeout && GetTickCount()>swell_dragsrc_timeout) ReleaseCapture(); + if (swell_dragsrc_timeout_start && (GetTickCount()-swell_dragsrc_timeout_start) > 500) ReleaseCapture(); } swell_dragsrc_hwnd=NULL; diff --git a/WDL/swell/swell-internal.h b/WDL/swell/swell-internal.h index cc2485e9..01ee8f20 100644 --- a/WDL/swell/swell-internal.h +++ b/WDL/swell/swell-internal.h @@ -260,9 +260,13 @@ typedef struct WindowPropRec @interface SWELL_BoxView : NSBox { NSInteger m_tag; +@public + int m_etch_mode; // if nonzero, SS_ETCHEDHORZ etc } -(NSInteger) tag; -(void) setTag:(NSInteger)tag; +-(void) drawRect:(NSRect)r; +-(int) swellIsEtchBox; @end @interface SWELL_FocusRectWnd : NSView @@ -650,6 +654,36 @@ static WDL_STATICFUNC_UNUSED void NSRECT_TO_RECT(RECT *r, const NSRect &tr) } #endif + +#ifdef SWELL_IMPLEMENT_GETOSXVERSION + +SWELL_IMPLEMENT_GETOSXVERSION int SWELL_GetOSXVersion() +{ + static SInt32 v; + if (!v) + { + if (NSAppKitVersionNumber >= 1266.0) + { + if (NSAppKitVersionNumber >= 1670.0) // unsure if this is correct (10.14.1 is 1671.1) + v = 0x10d0; + else if (NSAppKitVersionNumber >= 1404.0) + v = 0x10b0; + else + v = 0x10a0; // 10.10+ Gestalt(gsv) return 0x109x, so we bump this to 0x10a0 + } + else + { + SInt32 a = 0x1040; + Gestalt(gestaltSystemVersion,&a); + v=a; + } + } + return v; +} + +#endif + + #elif defined(SWELL_TARGET_GDK) diff --git a/WDL/swell/swell-misc.mm b/WDL/swell/swell-misc.mm index bc13867b..33f4cb6e 100644 --- a/WDL/swell/swell-misc.mm +++ b/WDL/swell/swell-misc.mm @@ -23,6 +23,7 @@ //#import #import #include "swell.h" +#define SWELL_IMPLEMENT_GETOSXVERSION #include "swell-internal.h" #include "../mutex.h" @@ -119,13 +120,13 @@ void SWELL_ReleaseNSTask(void *p) DWORD SWELL_WaitForNSTask(void *p, DWORD msTO) { NSTask *a =(NSTask*)p; - DWORD t = msTO ? GetTickCount()+msTO : 0; + const DWORD t = GetTickCount(); do { if (![a isRunning]) return WAIT_OBJECT_0; - if (t) Sleep(1); + if (msTO) Sleep(1); } - while (GetTickCount()= 1266.0) - { - if (NSAppKitVersionNumber >= 1670.0) // unsure if this is correct (10.14.1 is 1671.1) - v = 0x10d0; - else if (NSAppKitVersionNumber >= 1404.0) - v = 0x10b0; - else - v = 0x10a0; // 10.10+ Gestalt(gsv) return 0x109x, so we bump this to 0x10a0 - } - else - { - SInt32 a = 0x1040; - Gestalt(gestaltSystemVersion,&a); - v=a; - } - } - return v; -} #endif diff --git a/WDL/swell/swell-miscdlg-generic.cpp b/WDL/swell/swell-miscdlg-generic.cpp index f5360d1b..fef8b203 100644 --- a/WDL/swell/swell-miscdlg-generic.cpp +++ b/WDL/swell/swell-miscdlg-generic.cpp @@ -1218,7 +1218,7 @@ int MessageBox(HWND hwndParent, const char *text, const char *caption, int type) #ifdef SWELL_LICE_GDI struct ChooseColor_State { int ncustom; - int *custom; + COLORREF *custom; double h,s,v; @@ -1605,11 +1605,11 @@ static LRESULT WINAPI swellColorSelectProc(HWND hwnd, UINT uMsg, WPARAM wParam, } #endif //SWELL_LICE_GDI -bool SWELL_ChooseColor(HWND h, int *val, int ncustom, int *custom) +bool SWELL_ChooseColor(HWND h, COLORREF *val, int ncustom, COLORREF *custom) { #ifdef SWELL_LICE_GDI ChooseColor_State state = { ncustom, custom }; - int c = val ? *val : 0; + COLORREF c = val ? *val : 0; _RGB2HSV(GetRValue(c),GetGValue(c),GetBValue(c),&state.h,&state.s,&state.v); bool rv = DialogBoxParam(NULL,NULL,h,swellColorSelectProc,(LPARAM)&state)!=0; delete state.bm; diff --git a/WDL/swell/swell-miscdlg.mm b/WDL/swell/swell-miscdlg.mm index f4d972be..c3d2e712 100644 --- a/WDL/swell/swell-miscdlg.mm +++ b/WDL/swell/swell-miscdlg.mm @@ -28,6 +28,7 @@ #ifndef SWELL_PROVIDED_BY_APP #include "swell.h" +#include "swell-dlggen.h" #include "../wdlcstring.h" #import @@ -82,6 +83,7 @@ void BrowseFile_SetTemplate(const char *dlgid, DLGPROC dlgProc, struct SWELL_Dia BFSF_Templ_dlgid=dlgid; BFSF_Templ_dlgproc=dlgProc; } +static const char *s_browse_extsel; static LRESULT fileTypeChooseProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -126,6 +128,7 @@ static LRESULT fileTypeChooseProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP { if (!strnicmp(p,initial_file,initial_file_len) && (p[initial_file_len] == ';' || !p[initial_file_len])) { + s_browse_extsel = p; bestp = p; def_sel = a; break; @@ -165,7 +168,8 @@ static LRESULT fileTypeChooseProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP if (extlist) { NSArray *fileTypes = extensionsFromList(extlist, - (const char *)SendDlgItemMessage(hwnd,1000,CB_GETITEMDATA,a,0)); + s_browse_extsel = (const char *)SendDlgItemMessage(hwnd,1000,CB_GETITEMDATA,a,0) + ); if ([fileTypes count]>0) { NSSavePanel *par = (NSSavePanel*)[(NSView *)hwnd window]; @@ -195,6 +199,8 @@ bool BrowseForSaveFile(const char *text, const char *initialdir, const char *ini [panel setAccessoryView:nil]; HWND av_parent = (HWND)panel; + s_browse_extsel = NULL; + if ([fileTypes count]>1) { const char *ar[2]={extlist,initialfile}; @@ -267,21 +273,70 @@ bool BrowseForSaveFile(const char *text, const char *initialdir, const char *ini if (oh) SendMessage(oh,WM_DESTROY,0,0); [panel setAccessoryView:nil]; + bool rv = false; + + NSString *str; + if (result == NSOKButton && fn && fnsize > 0 && (str = [panel filename])) + { + SWELL_CFStringToCString(str,fn,fnsize); + if (fn[0]) + { + // this nonsense only seems to be necessary on 10.15 (and possibly future macOS versions?) + char tmp[256]; + + const int nft = [fileTypes count]; + int x = nft; + + const char *ext = WDL_get_fileext(fn); + if (*ext) + { + // see if extension is in list + ext++; + for (x = 0; x < nft; x ++) + { + NSString *s = [fileTypes objectAtIndex:x]; + if (s) + { + SWELL_CFStringToCString(s,tmp,sizeof(tmp)); + if (!stricmp(tmp,ext)) break; + } + } + } + + if (x == nft) + { + // not in list, apply default extension if specified, or first extension from list + if (initialfile && *initialfile == '.') + { + lstrcatn(fn,initialfile,fnsize); + } + else if (s_browse_extsel && *s_browse_extsel) + { + lstrcatn(fn,".",fnsize); + lstrcatn(fn,s_browse_extsel,fnsize); + } + else if (nft > 0) + { + NSString *s = [fileTypes objectAtIndex:0]; + if (s) + { + tmp[0] = '.'; + SWELL_CFStringToCString(s,tmp+1,sizeof(tmp)-1); + lstrcatn(fn,tmp,fnsize); + } + } + } + + rv = true; + } + } + [title release]; [fileTypes release]; [idir release]; [ifn release]; - if (result == NSOKButton) - { - NSString *str = [panel filename]; - if (str && fn && fnsize>0) - { - SWELL_CFStringToCString(str,fn,fnsize); - return fn[0] != 0; - } - } - return false; + return rv; } bool BrowseForDirectory(const char *text, const char *initialdir, char *fn, int fnsize) @@ -496,4 +551,158 @@ int MessageBox(HWND hwndParent, const char *text, const char *caption, int type) return (int)ret; } +static WDL_DLGRET color_okCancelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_INITDIALOG: + SetWindowLongPtr(hwndDlg,0,0); + return 0; + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDOK: + SetWindowLongPtr(hwndDlg,0,1); + break; + case IDCANCEL: + SetWindowLongPtr(hwndDlg,0,2); + break; + } + break; + } + return 0; +} +static void okcancel_create(HWND hwnd, int f) +{ + SWELL_MakeSetCurParms(1.7,1.7,0,0,hwnd,false,false); + SWELL_MakeButton(1,"OK",IDOK,48,2,44,14,0); + SWELL_MakeButton(1,"Cancel",IDCANCEL,2,2,44,14,0); + SWELL_MakeSetCurParms(1.7,1.7,0,0,NULL,false,false); +} +static HWND makeOKcancel(HWND par) +{ + const char *dlgid = ""; + SWELL_DialogResourceIndex tmph = { + dlgid, "", + SWELL_DLG_WS_FLIPPED|SWELL_DLG_WS_NOAUTOSIZE|SWELL_DLG_WS_CHILD, + okcancel_create, + (int)(98*1.7),(int)(18*1.7), + NULL + }; + return SWELL_CreateDialog(&tmph,dlgid,par,color_okCancelProc,0); +} + +static bool ColorFromNSColor(NSColor *color, COLORREF *colout) +{ + if (!color) return false; + + CGFloat r,g,b; + NSColor *color2=[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; + if (!color2) return false; + + [color2 getRed:&r green:&g blue:&b alpha:NULL]; + int rv=(int)(r*255.0 + 0.5); + int gv=(int)(g*255.0 + 0.5); + int bv=(int)(b*255.0 + 0.5); + if (rv<0)rv=0; else if (rv>255)rv=255; + if (gv<0)gv=0; else if (gv>255)gv=255; + if (bv<0)bv=0; else if (bv>255)bv=255; + + *colout = RGB(rv,gv,bv); + return true; +} + +bool SWELL_ChooseColor(HWND unused, COLORREF *a, int ncustom, COLORREF *custom) +{ + NSColorPanel *pan=[NSColorPanel sharedColorPanel]; + if (!pan||!a) return false; + + NSColor *bkcol=[NSColor colorWithCalibratedRed:GetRValue(*a)/255.0f green:GetGValue(*a)/255.0f blue:GetBValue(*a)/255.0f alpha:1.0f]; + [pan setColor:bkcol]; + [pan setShowsAlpha:NO]; + [pan setAccessoryView:nil]; + + HWND h = makeOKcancel((HWND)pan); + bool hadOK=!h; + + NSModalSession ctx=[NSApp beginModalSessionForWindow:pan]; + while ([NSApp runModalSession:ctx]==NSRunContinuesResponse && [pan isVisible]) + { + int a = h ? GetWindowLongPtr(h,0) : 0; + if (a) { hadOK=a==1; break; } + Sleep(3); + } + + [NSApp endModalSession:ctx]; + + if (h) + { + SendMessage(h,WM_DESTROY,0,0); + [pan setAccessoryView:nil]; // will destroy h anyway + [pan close]; + } + + return hadOK && ColorFromNSColor([pan color],a); +} + +bool SWELL_ChooseFont(HWND unused, LOGFONT *lf) +{ + if (!lf) return false; + + NSFontPanel *pan = [NSFontPanel sharedFontPanel]; + int sz=lf->lfHeight > 0 ? lf->lfHeight : lf->lfHeight < 0 ? -lf->lfHeight : lf->lfWidth; + + char buf[1024]; + lstrcpyn_safe(buf,lf->lfFaceName,sizeof(buf)); + if (lf->lfWeight >= FW_BOLD) lstrcatn(buf," Bold",sizeof(buf)); + if (lf->lfItalic) lstrcatn(buf," Italic",sizeof(buf)); + + NSString *lbl=(NSString *)SWELL_CStringToCFString(buf); + NSFont *tmpfont = [NSFont fontWithName:lbl size:sz]; + if (!tmpfont) tmpfont = [NSFont systemFontOfSize:sz]; + [lbl release]; + + [pan setPanelFont:tmpfont isMultiple:NO]; + + [pan setAccessoryView:nil]; + HWND h = makeOKcancel((HWND)pan); + + bool hadOK=!h; + NSModalSession ctx=[NSApp beginModalSessionForWindow:pan]; + while ([NSApp runModalSession:ctx]==NSRunContinuesResponse && [pan isVisible]) + { + int a = h ? GetWindowLongPtr(h,0) : 0; + if (a) { hadOK=a==1; break; } + Sleep(3); + } + + [NSApp endModalSession:ctx]; + + if (h) + { + SendMessage(h,WM_DESTROY,0,0); + [pan setAccessoryView:nil]; // will destroy h + [pan close]; + } + + if (!hadOK) return false; + + NSFont *newfont = [pan panelConvertFont:tmpfont]; + int newsz = (int) ([newfont pointSize]+0.5); + LOGFONT oldf=*lf; + if (newsz != sz) + { + lf->lfWidth=0; + lf->lfHeight = newsz; + } + + SWELL_CFStringToCString([newfont familyName],lf->lfFaceName, sizeof(lf->lfFaceName)); + SWELL_CFStringToCString([newfont displayName],buf,sizeof(buf)); + + lf->lfItalic = !! strstr(buf,"Italic"); + lf->lfWeight = strstr(buf,"Bold") ? FW_BOLD : FW_NORMAL; + + return memcmp(lf,&oldf,sizeof(LOGFONT)) != 0; +} + #endif diff --git a/WDL/swell/swell-modstub-generic.cpp b/WDL/swell/swell-modstub-generic.cpp index 4985e4be..c059cb71 100644 --- a/WDL/swell/swell-modstub-generic.cpp +++ b/WDL/swell/swell-modstub-generic.cpp @@ -53,7 +53,7 @@ static int dummyFunc() { return 0; } static int doinit(void *(*GetFunc)(const char *name)) { int errcnt=0; - for (int x = 0; x < sizeof(api_tab)/sizeof(api_tab[0]); x ++) + for (int x = 0; x < (int)(sizeof(api_tab)/sizeof(api_tab[0])); x ++) { *api_tab[x].func=GetFunc(api_tab[x].name); if (!*api_tab[x].func) diff --git a/WDL/swell/swell-types.h b/WDL/swell/swell-types.h index 1306e2d4..6e591e1e 100644 --- a/WDL/swell/swell-types.h +++ b/WDL/swell/swell-types.h @@ -642,6 +642,9 @@ __attribute__ ((visibility ("default"))) BOOL WINAPI DllMain(HINSTANCE hInstDLL, #define MB_ICONERROR 0 #define MB_ICONSTOP 0 #define MB_ICONINFORMATION 0 +#define MB_ICONQUESTION 0 +#define MB_TOPMOST 0 +#define MB_ICONEXCLAMATION 0 #define IDOK 1 #define IDCANCEL 2 @@ -719,6 +722,7 @@ __attribute__ ((visibility ("default"))) BOOL WINAPI DllMain(HINSTANCE hInstDLL, #define LB_GETSELCOUNT 0x0190 #define LB_GETITEMDATA 0x0199 #define LB_SETITEMDATA 0x019A +#define LB_FINDSTRINGEXACT 0x01A2 #define TBM_GETPOS (WM_USER) #define TBM_SETTIC (WM_USER+4) @@ -999,6 +1003,7 @@ __attribute__ ((visibility ("default"))) BOOL WINAPI DllMain(HINSTANCE hInstDLL, #define EM_GETSEL 0xF0B0 #define EM_SETSEL 0xF0B1 #define EM_SCROLL 0xF0B5 +#define EM_REPLACESEL 0xF0C2 #define EM_SETPASSWORDCHAR 0xF0CC #define SB_HORZ 0 diff --git a/WDL/swell/swell-wnd-generic.cpp b/WDL/swell/swell-wnd-generic.cpp index dfb9bd78..481b7323 100644 --- a/WDL/swell/swell-wnd-generic.cpp +++ b/WDL/swell/swell-wnd-generic.cpp @@ -758,7 +758,7 @@ typedef struct TimerInfoRec UINT_PTR timerid; HWND hwnd; UINT interval; - DWORD nextFire; + DWORD lastFire; TIMERPROC tProc; struct TimerInfoRec *_next; } TimerInfoRec; @@ -772,14 +772,14 @@ void SWELL_RunMessageLoop() SWELL_MessageQueue_Flush(); SWELL_RunEvents(); - DWORD now = GetTickCount(); + const DWORD now = GetTickCount(); WDL_MutexLock lock(&m_timermutex); TimerInfoRec *rec = m_timer_list; while (rec) { - if (now > rec->nextFire || now < rec->nextFire - rec->interval*4) + if ((now-rec->lastFire) >= rec->interval) { - rec->nextFire = now + rec->interval; + rec->lastFire = now; HWND h = rec->hwnd; TIMERPROC tProc = rec->tProc; @@ -835,7 +835,7 @@ UINT_PTR SetTimer(HWND hwnd, UINT_PTR timerid, UINT rate, TIMERPROC tProc) rec->timerid=timerid; rec->hwnd=hwnd; rec->interval = rate<1?1: rate; - rec->nextFire = GetTickCount() + rate; + rec->lastFire = GetTickCount(); if (!hwnd) timerid = rec->timerid = (UINT_PTR)rec; @@ -903,6 +903,11 @@ BOOL SetDlgItemText(HWND hwnd, int idx, const char *text) return true; } +int GetWindowTextLength(HWND hwnd) +{ + return hwnd ? hwnd->m_title.GetLength() : 0; +} + BOOL GetDlgItemText(HWND hwnd, int idx, char *text, int textlen) { *text=0; @@ -1111,116 +1116,6 @@ static RECT MakeCoords(int x, int y, int w, int h, bool wantauto) #define TRANSFORMFONTSIZE ((m_transform.right/65536.0+1.0)*3.7) - -#ifdef SWELL_LICE_GDI -//#define SWELL_ENABLE_VIRTWND_CONTROLS -#include "../wingui/virtwnd-controls.h" -#endif - -static LRESULT WINAPI virtwndWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ -#ifdef SWELL_ENABLE_VIRTWND_CONTROLS - WDL_VWnd *vwnd = (WDL_VWnd *) ( msg == WM_CREATE ? (void*)lParam : GetProp(hwnd,"WDL_control_vwnd") ); - if (vwnd) switch (msg) - { - case WM_CREATE: - { - SetProp(hwnd,"WDL_control_vwnd",vwnd); - RECT r; - GetClientRect(hwnd,&r); - vwnd->SetRealParent(hwnd); - vwnd->SetPosition(&r); - vwnd->SetID(0xf); - } - return 0; - case WM_SIZE: - { - RECT r; - GetClientRect(hwnd,&r); - vwnd->SetPosition(&r); - InvalidateRect(hwnd,NULL,FALSE); - } - break; - case WM_COMMAND: - if (LOWORD(wParam)==0xf) SendMessage(GetParent(hwnd),WM_COMMAND,(wParam&0xffff0000) | GetWindowLong(hwnd,GWL_ID),NULL); - break; - case WM_DESTROY: - RemoveProp(hwnd,"WDL_control_vwnd"); - delete vwnd; - vwnd=0; - return 0; - case WM_LBUTTONDOWN: - SetCapture(hwnd); - vwnd->OnMouseDown(GET_X_LPARAM(lParam),GET_Y_LPARAM(lParam)); - return 0; - case WM_MOUSEMOVE: - vwnd->OnMouseMove(GET_X_LPARAM(lParam),GET_Y_LPARAM(lParam)); - return 0; - case WM_LBUTTONUP: - ReleaseCapture(); - vwnd->OnMouseUp(GET_X_LPARAM(lParam),GET_Y_LPARAM(lParam)); - return 0; - case WM_PAINT: - { - PAINTSTRUCT ps; - if (BeginPaint(hwnd,&ps)) - { - RECT r; - GetClientRect(hwnd,&r); - - HDC hdc = ps.hdc; - if (hdc) - { - RECT tr = ps.rcPaint; // todo: offset by surface_offs.x/y - vwnd->OnPaint(hdc->surface,hdc->surface_offs.x,hdc->surface_offs.y,&tr); - vwnd->OnPaintOver(hdc->surface,hdc->surface_offs.x,hdc->surface_offs.y,&tr); - } - - EndPaint(hwnd,&ps); - } - } - return 0; - case WM_SETTEXT: - if (lParam) - { - if (!strcmp(vwnd->GetType(),"vwnd_iconbutton")) - { - WDL_VirtualIconButton *b = (WDL_VirtualIconButton *) vwnd; - b->SetTextLabel((const char *)lParam); - } - } - break; - case BM_SETCHECK: - case BM_GETCHECK: - if (!strcmp(vwnd->GetType(),"vwnd_iconbutton")) - { - WDL_VirtualIconButton *b = (WDL_VirtualIconButton *) vwnd; - if (msg == BM_GETCHECK) return b->GetCheckState(); - - b->SetCheckState(wParam); - } - return 0; - } -#endif - return DefWindowProc(hwnd,msg,wParam,lParam); -} - -#ifdef SWELL_ENABLE_VIRTWND_CONTROLS -static HWND swell_makeButton(HWND owner, int idx, RECT *tr, const char *label, bool vis, int style) -{ - WDL_VirtualIconButton *vwnd = new WDL_VirtualIconButton; - if (label) vwnd->SetTextLabel(label); - vwnd->SetForceBorder(true); - if (style & BS_AUTOCHECKBOX) vwnd->SetCheckState(0); - HWND hwnd = new HWND__(owner,idx,tr,label,vis,virtwndWindowProc); - hwnd->m_classname = "Button"; - hwnd->m_style = style|WS_CHILD; - hwnd->m_wndproc(hwnd,WM_CREATE,0,(LPARAM)vwnd); - return hwnd; -} - -#endif - static void paintDialogBackground(HWND hwnd, const RECT *r, HDC hdc) { HBRUSH hbrush = (HBRUSH) SendMessage(GetParent(hwnd),WM_CTLCOLORSTATIC,(WPARAM)hdc,(LPARAM)hwnd); @@ -1269,7 +1164,6 @@ static bool draw_focus_indicator(HWND hwnd, HDC hdc, const RECT *drawr) } -#ifndef SWELL_ENABLE_VIRTWND_CONTROLS struct buttonWindowState { buttonWindowState() { bitmap=0; bitmap_mode=0; state=0; } @@ -1584,7 +1478,6 @@ static HWND swell_makeButton(HWND owner, int idx, RECT *tr, const char *label, b hwnd->m_wndproc(hwnd,WM_CREATE,0,0); return hwnd; } -#endif static LRESULT WINAPI groupWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -1836,6 +1729,10 @@ struct __SWELL_editControlState }; +static int utf8fs_charpos_to_bytepos(const WDL_FastString *fs, int charpos) +{ + return charpos < fs->GetLength() ? WDL_utf8_charpos_to_bytepos(fs->Get(),charpos) : fs->GetLength(); +} @@ -1964,11 +1861,11 @@ bool __SWELL_editControlState::deleteSelection(WDL_FastString *fs) { if (sel1>=0 && sel2 > sel1) { - int pos1 = WDL_utf8_charpos_to_bytepos(fs->Get(),sel1); - int pos2 = WDL_utf8_charpos_to_bytepos(fs->Get(),sel2); + int pos1 = utf8fs_charpos_to_bytepos(fs,sel1); + int pos2 = utf8fs_charpos_to_bytepos(fs,sel2); if (pos2 == pos1) return false; - int cp = WDL_utf8_charpos_to_bytepos(fs->Get(),cursor_pos); + int cp = utf8fs_charpos_to_bytepos(fs,cursor_pos); fs->DeleteSub(pos1,pos2-pos1); if (cp >= pos2) cp -= pos2-pos1; else if (cp >= pos1) cp=pos1; @@ -1984,8 +1881,8 @@ int __SWELL_editControlState::getSelection(WDL_FastString *fs, const char **ptrO { if (sel1>=0 && sel2>sel1) { - int pos1 = WDL_utf8_charpos_to_bytepos(fs->Get(),sel1); - int pos2 = WDL_utf8_charpos_to_bytepos(fs->Get(),sel2); + int pos1 = utf8fs_charpos_to_bytepos(fs,sel1); + int pos2 = utf8fs_charpos_to_bytepos(fs,sel2); if (ptrOut) *ptrOut = fs->Get()+pos1; return pos2-pos1; } @@ -2106,6 +2003,8 @@ void __SWELL_editControlState::autoScrollToOffset(HWND hwnd, int charpos, bool i } if (is_multiline) { + if (charpos > hwnd->m_title.GetLength()) + tmp.bottom -= line_h; if (pt.y+line_h > scroll_y+tmp.bottom) scroll_y = pt.y - tmp.bottom + line_h; if (pt.y < scroll_y) scroll_y=pt.y; } @@ -2188,7 +2087,7 @@ static LRESULT OnEditKeyDown(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, if (s) { es->deleteSelection(&hwnd->m_title); - int bytepos = WDL_utf8_charpos_to_bytepos(hwnd->m_title.Get(),es->cursor_pos); + int bytepos = utf8fs_charpos_to_bytepos(&hwnd->m_title,es->cursor_pos); hwnd->m_title.Insert(s,bytepos); if (!(hwnd->m_style&ES_MULTILINE)) { @@ -2237,7 +2136,7 @@ static LRESULT OnEditKeyDown(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, char b[8]; WDL_MakeUTFChar(b,wParam,sizeof(b)); es->deleteSelection(&hwnd->m_title); - int bytepos = WDL_utf8_charpos_to_bytepos(hwnd->m_title.Get(),es->cursor_pos); + int bytepos = utf8fs_charpos_to_bytepos(&hwnd->m_title,es->cursor_pos); hwnd->m_title.Insert(b,bytepos); es->cursor_pos++; return 7; @@ -2360,7 +2259,7 @@ static LRESULT OnEditKeyDown(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, { if (es->deleteSelection(&hwnd->m_title)) return 7; - const int bytepos = WDL_utf8_charpos_to_bytepos(hwnd->m_title.Get(),es->cursor_pos); + const int bytepos = utf8fs_charpos_to_bytepos(&hwnd->m_title,es->cursor_pos); if (bytepos < hwnd->m_title.GetLength()) { const char *rd = hwnd->m_title.Get()+bytepos; @@ -2395,7 +2294,7 @@ static LRESULT OnEditKeyDown(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, { if (hwnd->m_style & ES_READONLY) return 1; if (es->deleteSelection(&hwnd->m_title)) return 7; - int bytepos = WDL_utf8_charpos_to_bytepos(hwnd->m_title.Get(),es->cursor_pos); + int bytepos = utf8fs_charpos_to_bytepos(&hwnd->m_title,es->cursor_pos); hwnd->m_title.Insert("\r\n",bytepos); es->cursor_pos+=2; // skip \r and \n return 7; @@ -2803,9 +2702,9 @@ static LRESULT WINAPI editWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM r.left+=2 - es->scroll_x; r.right-=2; const bool do_cursor = es->cursor_state!=0; - const int cursor_pos = focused ? WDL_utf8_charpos_to_bytepos(title->Get(),es->cursor_pos) : -1; - const int sel1 = es->sel1>=0 && focused ? WDL_utf8_charpos_to_bytepos(title->Get(),es->sel1) : -1; - const int sel2 = es->sel2>=0 && focused ? WDL_utf8_charpos_to_bytepos(title->Get(),es->sel2) : -1; + const int cursor_pos = focused ? utf8fs_charpos_to_bytepos(title,es->cursor_pos) : -1; + const int sel1 = es->sel1>=0 && focused ? utf8fs_charpos_to_bytepos(title,es->sel1) : -1; + const int sel2 = es->sel2>=0 && focused ? utf8fs_charpos_to_bytepos(title,es->sel2) : -1; const bool multiline = (hwnd->m_style & ES_MULTILINE) != 0; @@ -2920,6 +2819,31 @@ static LRESULT WINAPI editWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (hwnd->m_id && hwnd->m_parent) SendMessage(hwnd->m_parent,WM_COMMAND,(EN_CHANGE<<16)|hwnd->m_id,(LPARAM)hwnd); break; + case EM_REPLACESEL: + if (lParam && es) + { + const char *p = (const char *)lParam; + int pos = wdl_min(es->sel1,es->sel2); + es->deleteSelection(&hwnd->m_title); + if (*p) + { + if (pos < 0) pos = es->cursor_pos; + int bytepos = utf8fs_charpos_to_bytepos(&hwnd->m_title,pos); + hwnd->m_title.Insert(p,bytepos); + } + InvalidateRect(hwnd,NULL,FALSE); + } + return 0; + case EM_GETSEL: + if (es) + { + if (wParam) * (int *)wParam = es->sel1; + if (lParam) * (int *)lParam = es->sel2; + if (es->sel1 < 0 || es->sel1 > 65535 || + es->sel2 < 0 || es->sel2 > 65535) return -1; + return MAKELPARAM(es->sel1,es->sel2); + } + return 0; case EM_SETSEL: if (es) { @@ -2944,7 +2868,8 @@ static LRESULT WINAPI editWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM } else if (wParam == SB_BOTTOM) { - es->autoScrollToOffset(hwnd,hwnd->m_title.GetLength(), + es->autoScrollToOffset(hwnd, + hwnd->m_title.GetLength() + 1, // this should be charpos rather than bytepos, but anything longer than m_title.GetLength() ensures we go to the absolute bottom (hwnd->m_style & ES_MULTILINE) != 0, (hwnd->m_style & (ES_MULTILINE|ES_AUTOHSCROLL)) == ES_MULTILINE); InvalidateRect(hwnd,NULL,FALSE); @@ -3208,29 +3133,81 @@ static LRESULT WINAPI labelWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM paintDialogBackground(hwnd,&r,ps.hdc); - const char *buf = hwnd->m_title.Get(); - if (buf && buf[0]) + const char *text = hwnd->m_title.Get(); + switch (hwnd->m_style & SS_TYPEMASK) { - if ((hwnd->m_style & SS_TYPEMASK) == SS_LEFT) + case SS_ETCHEDHORZ: + case SS_ETCHEDVERT: + case SS_ETCHEDFRAME: { - RECT tmp={0,}; - const int line_h = DrawText(ps.hdc," ",1,&tmp,DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT); - if (r.bottom > line_h*5/3) + HPEN pen = CreatePen(PS_SOLID,0,g_swell_ctheme.group_hilight); + HPEN pen2 = CreatePen(PS_SOLID,0,g_swell_ctheme.group_shadow); + HGDIOBJ oldPen=SelectObject(ps.hdc,pen); + + switch (hwnd->m_style & SS_TYPEMASK) { - int loffs=0; - while (buf[loffs] && r.top < r.bottom) - { - int post=0, lb=swell_getLineLength(buf+loffs, &post, r.right, ps.hdc); - if (lb>0) - DrawText(ps.hdc,buf+loffs,lb,&r,DT_TOP|DT_SINGLELINE|DT_LEFT); - r.top += line_h; - loffs+=lb+post; - } - buf = NULL; + case SS_ETCHEDHORZ: + MoveToEx(ps.hdc,0,1,NULL); + LineTo(ps.hdc,r.right-1,1); + SelectObject(ps.hdc,pen2); + MoveToEx(ps.hdc,0,0,NULL); + LineTo(ps.hdc,r.right-1,0); + break; + case SS_ETCHEDVERT: + MoveToEx(ps.hdc,1,0,NULL); + LineTo(ps.hdc,1,r.bottom-1); + SelectObject(ps.hdc,pen2); + MoveToEx(ps.hdc,0,0,NULL); + LineTo(ps.hdc,0,r.bottom-1); + break; + case SS_ETCHEDFRAME: + MoveToEx(ps.hdc,1,1,NULL); + LineTo(ps.hdc,1,r.bottom-1); + LineTo(ps.hdc,r.right-1,r.bottom-1); + LineTo(ps.hdc,r.right-1,1); + LineTo(ps.hdc,1,1); + SelectObject(ps.hdc,pen2); + MoveToEx(ps.hdc,0,0,NULL); + LineTo(ps.hdc,0,r.bottom-2); + LineTo(ps.hdc,r.right-2,r.bottom-2); + LineTo(ps.hdc,r.right-2,0); + LineTo(ps.hdc,0,0); + break; } + + SelectObject(ps.hdc,oldPen); + DeleteObject(pen); + DeleteObject(pen2); + + text = ""; } - if (buf) DrawText(ps.hdc,buf,-1,&r, - ((hwnd->m_style & SS_CENTER) ? DT_CENTER : + break; + case SS_LEFT: + if (text[0]) + { + RECT tmp={0,}; + const int line_h = DrawText(ps.hdc," ",1,&tmp,DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT); + if (r.bottom > line_h*5/3) + { + int loffs=0; + while (text[loffs] && r.top < r.bottom) + { + int post=0, lb=swell_getLineLength(text+loffs, &post, r.right, ps.hdc); + if (lb>0) + DrawText(ps.hdc,text+loffs,lb,&r,DT_TOP|DT_SINGLELINE|DT_LEFT); + r.top += line_h; + loffs+=lb+post; + } + text = ""; + } + } + break; + } + + if (text[0]) + { + DrawText(ps.hdc,text,-1,&r, + ((hwnd->m_style & SS_CENTER) ? DT_CENTER : (hwnd->m_style & SS_RIGHT) ? DT_RIGHT : 0)| DT_VCENTER); } @@ -3571,7 +3548,7 @@ static LRESULT WINAPI comboWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (focused && s->editstate.cursor_state) { - cursor_pos = WDL_utf8_charpos_to_bytepos(hwnd->m_title.Get(),s->editstate.cursor_pos); + cursor_pos = utf8fs_charpos_to_bytepos(&hwnd->m_title,s->editstate.cursor_pos); } } @@ -3633,6 +3610,16 @@ static LRESULT WINAPI comboWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_CAPTURECHANGED: InvalidateRect(hwnd,NULL,FALSE); break; + case EM_GETSEL: + if (s && (hwnd->m_style & CBS_DROPDOWNLIST) != CBS_DROPDOWNLIST) + { + if (wParam) * (int *)wParam = s->editstate.sel1; + if (lParam) * (int *)lParam = s->editstate.sel2; + if (s->editstate.sel1 < 0 || s->editstate.sel1 > 65535 || + s->editstate.sel2 < 0 || s->editstate.sel2 > 65535) return -1; + return MAKELPARAM(s->editstate.sel1,s->editstate.sel2); + } + return 0; case EM_SETSEL: if (s && (hwnd->m_style & CBS_DROPDOWNLIST) != CBS_DROPDOWNLIST) { @@ -3701,10 +3688,22 @@ struct SWELL_ListView_Col char *name; int xwid; int sortindicator; + int col_index; }; enum { LISTVIEW_HDR_YMARGIN = 2 }; +enum ListViewCapMode +{ + LISTVIEW_CAP_NONE=0, + LISTVIEW_CAP_XSCROLL, // data1=xp + LISTVIEW_CAP_YSCROLL, // data1=yp + LISTVIEW_CAP_DRAG, // data1=row, data2=displaycolumnindex + LISTVIEW_CAP_COLRESIZE, // data1 = displaycolumnindex, data2=xoffset + LISTVIEW_CAP_COLCLICK, // data1 = displaycolumnindex, data2=original lparam, advances to COLREORDER with same parameters + LISTVIEW_CAP_COLREORDER, +}; + struct listViewState { listViewState(bool ownerData, bool isMultiSel, bool isListBox) @@ -3715,7 +3714,7 @@ struct listViewState m_owner_data_size = ownerData ? 0 : -1; m_last_row_height = 0; m_scroll_x=m_scroll_y=0; - m_capmode_state=0; + m_capmode_state=LISTVIEW_CAP_NONE; m_capmode_data1=0; m_capmode_data2=0; m_status_imagelist = NULL; @@ -3737,6 +3736,30 @@ struct listViewState } WDL_PtrList m_data; WDL_TypedBuf m_cols; + + + int GetColumnIndex(int dispindex) const + { + if (m_is_listbox) + { + WDL_ASSERT(dispindex==0); + return 0; + } + if (WDL_NORMALLY(dispindex>=0 && dispindex < m_cols.GetSize())) + { + WDL_ASSERT(m_cols.Get()[dispindex].col_index >= 0); + WDL_ASSERT(m_cols.Get()[dispindex].col_index < m_cols.GetSize()); + return m_cols.Get()[dispindex].col_index; + } + return 0; + } + SWELL_ListView_Col *GetColumnByIndex(int idx) const + { + SWELL_ListView_Col *c = m_cols.Get(); + const int n = m_cols.GetSize(); + for (int x = 0; x < n; x ++) if (c[x].col_index == idx) return c+x; + return NULL; + } int GetNumItems() const { return m_owner_data_size>=0 ? m_owner_data_size : m_data.GetSize(); } bool IsOwnerData() const { return m_owner_data_size>=0; } @@ -3751,7 +3774,8 @@ struct listViewState int m_last_row_height; int m_selitem; // for single sel, or used for focus for multisel - int m_scroll_x,m_scroll_y,m_capmode_state, m_capmode_data1,m_capmode_data2; + ListViewCapMode m_capmode_state; + int m_scroll_x,m_scroll_y, m_capmode_data1,m_capmode_data2; int m_extended_style; int m_color_bg, m_color_bg_sel, m_color_text, m_color_text_sel, m_color_grid; @@ -3899,13 +3923,13 @@ static const char *stateStringOnKey(UINT uMsg, WPARAM wParam, LPARAM lParam) static WDL_FastString str; static DWORD last_t; DWORD now = GetTickCount(); - if (now > last_t + 500 || now < last_t - 500) str.Set(""); + if ((now-last_t) > 500) str.Set(""); last_t = now; const bool is_numpad = wParam >= VK_NUMPAD0 && wParam <= VK_DIVIDE; if ((lParam & FVIRTKEY) && wParam == VK_BACK) { - str.SetLen(WDL_utf8_charpos_to_bytepos(str.Get(),WDL_utf8_get_charlen(str.Get())-1)); + str.SetLen(utf8fs_charpos_to_bytepos(&str,WDL_utf8_get_charlen(str.Get())-1)); } else if (wParam >= 32 && (!(lParam & FVIRTKEY) || swell_is_virtkey_char((int)wParam) || is_numpad)) { @@ -3968,7 +3992,11 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_RBUTTONDOWN: if (lvs && lvs->m_last_row_height>0 && !lvs->m_is_listbox) { + const int hdr_size = lvs->GetColumnHeaderHeight(hwnd); + if (hdr_size > 0 && GET_Y_LPARAM(lParam) < hdr_size) break; // let it get converted to WM_CONTEXTMENU + LVHITTESTINFO inf = { { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }, }; + const int row = ListView_SubItemHitTest(hwnd, &inf); const int n = ListView_GetItemCount(hwnd); if (row>=0 && row= minw-col_resize_sz && px < minw) { - lvs->m_capmode_state = 3; + lvs->m_capmode_state = LISTVIEW_CAP_COLRESIZE; lvs->m_capmode_data1 = x; lvs->m_capmode_data2 = minw-px; return 0; @@ -4048,13 +4076,12 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa if (px >= 0 && px m_parent; - if (par) + if (msg != WM_LBUTTONDBLCLK) { - NMLISTVIEW hdr={{hwnd,(UINT_PTR)hwnd->m_id,LVN_COLUMNCLICK},-1,x}; - if (par->m_wndproc&&!par->m_hashaddestroy) par->m_wndproc(par,WM_NOTIFY,hwnd->m_id, (LPARAM) &hdr); + lvs->m_capmode_state = LISTVIEW_CAP_COLCLICK; + lvs->m_capmode_data1 = x; + lvs->m_capmode_data2 = (int)lParam; } - ReleaseCapture(); return 0; } px -= col[x].xwid; @@ -4072,13 +4099,13 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa if (xpos < thumbpos) xp = thumbpos; // jump on first mouse move else if (xpos > thumbpos+thumbsz) xp = thumbpos + thumbsz; - lvs->m_capmode_state = 4; + lvs->m_capmode_state = LISTVIEW_CAP_XSCROLL; lvs->m_capmode_data1 = xp; if (xpos < thumbpos || xpos > thumbpos+thumbsz) goto forceMouseMove; return 0; } - lvs->m_capmode_state=0; + lvs->m_capmode_state=LISTVIEW_CAP_NONE; const int ypos = GET_Y_LPARAM(lParam) - hdr_size_nomargin; if (totalw > r.right) r.bottom -= g_swell_ctheme.scrollbar_width; @@ -4093,7 +4120,7 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa if (ypos < thumbpos) yp = thumbpos + hdr_size_nomargin; // jump on first mouse move else if (ypos > thumbpos+thumbsz) yp = thumbpos + hdr_size_nomargin + thumbsz; - lvs->m_capmode_state = 1; + lvs->m_capmode_state = LISTVIEW_CAP_YSCROLL; lvs->m_capmode_data1 = yp; if (ypos < thumbpos || ypos > thumbpos+thumbsz) goto forceMouseMove; return 0; @@ -4102,7 +4129,7 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa const int hit = ypos >= 0 ? ((ypos+lvs->m_scroll_y) / row_height) : -1; if (hit < 0) return 1; - int subitem = 0; + int subitem = 0; // display index { const int ncol=lvs->m_cols.GetSize(); @@ -4135,14 +4162,14 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa { if (hit >= 0) { - lvs->m_capmode_state = 2; + lvs->m_capmode_state = LISTVIEW_CAP_DRAG; lvs->m_capmode_data1 = hit; lvs->m_capmode_data2 = subitem; } if(hit < n) { - NMLISTVIEW nm={{hwnd,hwnd->m_id,msg == WM_LBUTTONDBLCLK ? NM_DBLCLK : NM_CLICK},hit,subitem,0,0,0, {s_clickpt.x, s_clickpt.y }}; + NMLISTVIEW nm={{hwnd,hwnd->m_id,msg == WM_LBUTTONDBLCLK ? NM_DBLCLK : NM_CLICK},hit,lvs->GetColumnIndex(subitem),0,0,0, {s_clickpt.x, s_clickpt.y }}; SendMessage(GetParent(hwnd),WM_NOTIFY,hwnd->m_id,(LPARAM)&nm); } if (oldsel != lvs->m_selitem) @@ -4193,10 +4220,10 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa { if (hit >=0 && hit < n) { - lvs->m_capmode_state = 2; + lvs->m_capmode_state = LISTVIEW_CAP_DRAG; lvs->m_capmode_data1 = hit; lvs->m_capmode_data2 = subitem; - NMLISTVIEW nm={{hwnd,hwnd->m_id,msg == WM_LBUTTONDBLCLK ? NM_DBLCLK : NM_CLICK},hit,subitem,LVIS_SELECTED,}; + NMLISTVIEW nm={{hwnd,hwnd->m_id,msg == WM_LBUTTONDBLCLK ? NM_DBLCLK : NM_CLICK},hit,lvs->GetColumnIndex(subitem),LVIS_SELECTED,}; SendMessage(GetParent(hwnd),WM_NOTIFY,hwnd->m_id,(LPARAM)&nm); } if (changed) @@ -4220,7 +4247,9 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa r.right -= g_swell_ctheme.scrollbar_width; switch (lvs->m_capmode_state) { - case 3: + case LISTVIEW_CAP_NONE: + break; + case LISTVIEW_CAP_COLRESIZE: { int x = lvs->m_capmode_data1; int xp = GET_X_LPARAM(lParam) + lvs->m_scroll_x + lvs->m_capmode_data2; @@ -4244,19 +4273,19 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa } } break; - case 2: + case LISTVIEW_CAP_DRAG: if (!lvs->m_is_listbox) { const int dx = GET_X_LPARAM(lParam) - s_clickpt.x, dy = GET_Y_LPARAM(lParam) - s_clickpt.y; if (dx*dx+dy*dy > 32) { - NMLISTVIEW nm={{hwnd,hwnd->m_id,LVN_BEGINDRAG},lvs->m_capmode_data1,lvs->m_capmode_data2}; - lvs->m_capmode_state=0; + NMLISTVIEW nm={{hwnd,hwnd->m_id,LVN_BEGINDRAG},lvs->m_capmode_data1,lvs->GetColumnIndex(lvs->m_capmode_data2)}; + lvs->m_capmode_state=LISTVIEW_CAP_NONE; SendMessage(GetParent(hwnd),WM_NOTIFY,hwnd->m_id,(LPARAM)&nm); } } break; - case 1: + case LISTVIEW_CAP_YSCROLL: { int yv = lvs->m_capmode_data1; int amt = GET_Y_LPARAM(lParam) - yv; @@ -4282,7 +4311,7 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa } } break; - case 4: + case LISTVIEW_CAP_XSCROLL: { int xv = lvs->m_capmode_data1; int amt = GET_X_LPARAM(lParam) - xv; @@ -4304,13 +4333,65 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa } } break; + case LISTVIEW_CAP_COLCLICK: + if (lvs->m_extended_style & LVS_EX_HEADERDRAGDROP) + { + const int xd = GET_X_LPARAM(lParam) - GET_X_LPARAM((LPARAM)lvs->m_capmode_data2), + yd = GET_Y_LPARAM(lParam) - GET_Y_LPARAM((LPARAM)lvs->m_capmode_data2); + if (xd*xd + yd*yd < 4*4) break; + lvs->m_capmode_state = LISTVIEW_CAP_COLREORDER; + } + case LISTVIEW_CAP_COLREORDER: + InvalidateRect(hwnd,NULL,FALSE); + break; } } return 1; case WM_LBUTTONUP: if (GetCapture()==hwnd) { - ReleaseCapture(); // WM_CAPTURECHANGED will take care of the invalidate + if (lvs->m_capmode_state == LISTVIEW_CAP_COLCLICK) + { + HWND par = hwnd->m_parent; + if (par) + { + NMLISTVIEW hdr={{hwnd,(UINT_PTR)hwnd->m_id,LVN_COLUMNCLICK},-1, lvs->GetColumnIndex(lvs->m_capmode_data1) }; + if (par->m_wndproc&&!par->m_hashaddestroy) par->m_wndproc(par,WM_NOTIFY,hwnd->m_id, (LPARAM) &hdr); + } + } + else if (lvs->m_capmode_state == LISTVIEW_CAP_COLREORDER) + { + const int oldidx = lvs->m_capmode_data1; + const int ncols=lvs->m_cols.GetSize(); + if (oldidx >= 0 && oldidx < ncols) + { + POINT p; + GetCursorPos(&p); + ScreenToClient(hwnd,&p); + int xpos=-lvs->m_scroll_x; + SWELL_ListView_Col *cols = lvs->m_cols.Get(); + int x; + for (x = 0; x < ncols; x ++) + { + int xwid = cols[x].xwid; + if (!x && lvs->hasStatusImage()) xwid += lvs->m_last_row_height; + if (p.x < xpos + xwid/2) break; + xpos += xwid; + } + + if (x != oldidx && x != oldidx+1) + { + SWELL_ListView_Col c = cols[oldidx]; + lvs->m_cols.Delete(oldidx); + + if (x > oldidx) x--; + lvs->m_cols.Insert(c,x); + + } + } + } + ReleaseCapture(); + InvalidateRect(hwnd,NULL,FALSE); } return 1; case WM_KEYDOWN: @@ -4319,14 +4400,14 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa const char *s = stateStringOnKey(msg,wParam,lParam); if (s) { - int col = 0; + int col = 0; // column index (not display) if (!lvs->m_is_listbox) { for (int x=0;xm_cols.GetSize();x++) { if (lvs->m_cols.Get()[x].sortindicator) { - col = x; + col = lvs->m_cols.Get()[x].col_index; break; } } @@ -4535,7 +4616,7 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa SetBkMode(ps.hdc,TRANSPARENT); const int ncols = lvs->m_cols.GetSize(); const int nc = wdl_max(ncols,1); - SWELL_ListView_Col *cols = lvs->m_cols.Get(); + const SWELL_ListView_Col *cols = lvs->m_cols.Get(); const bool has_image = lvs->hasAnyImage(); const bool has_status_image = lvs->hasStatusImage(); @@ -4589,9 +4670,10 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa for (int col = 0; col < nc && xpos < cr.right; col ++) { int image_idx = 0; + const int col_idx = lvs->GetColumnIndex(col); if (owner_data) { - NMLVDISPINFO nm={{hwnd,hwnd->m_id,LVN_GETDISPINFO},{LVIF_TEXT, rowidx,col, 0,0, buf, sizeof(buf), -1 }}; + NMLVDISPINFO nm={{hwnd,hwnd->m_id,LVN_GETDISPINFO},{LVIF_TEXT, rowidx,col_idx, 0,0, buf, sizeof(buf), -1 }}; if (!col && has_image) { if (lvs->m_status_imagelist_type == LVSIL_STATE) nm.item.mask |= LVIF_STATE; @@ -4610,7 +4692,7 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa else { if (!col && has_image) image_idx = row->m_imageidx; - if (row) str = row->m_vals.Get(col); + if (row) str = row->m_vals.Get(col_idx); } RECT ar = { xpos,ypos, cr.right, ypos + row_height }; @@ -4759,6 +4841,37 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa FillRect(ps.hdc,&tr,br); } DeleteObject(br); + if (lvs->m_capmode_state == LISTVIEW_CAP_COLREORDER && GetCapture()==hwnd) + { + const int oldidx = lvs->m_capmode_data1; + if (oldidx >= 0 && oldidx < ncols) + { + POINT p; + GetCursorPos(&p); + ScreenToClient(hwnd,&p); + xpos=-lvs->m_scroll_x; + int x; + for (x = 0; x < ncols; x ++) + { + int xwid = cols[x].xwid; + if (!x && lvs->hasStatusImage()) xwid += lvs->m_last_row_height; + if (p.x < xpos + xwid/2) break; + xpos += xwid; + } + + if (x != oldidx && x != oldidx+1) + { + const char *s = cols[lvs->m_capmode_data1].name; + int sz = cols[lvs->m_capmode_data1].xwid; + if (sz < hdr_size_nomargin) sz = hdr_size_nomargin; + br = CreateSolidBrushAlpha(g_swell_ctheme.focusrect,0.75f); + RECT r = {xpos, ypos, xpos + sz, ypos + hdr_size_nomargin }; + FillRect(ps.hdc, &r, br); + if (s) DrawText(ps.hdc,s,-1,&r,DT_SINGLELINE|DT_LEFT|DT_VCENTER|DT_NOPREFIX); + DeleteObject(br); + } + } + } } if (gridpen) { @@ -4845,6 +4958,24 @@ static LRESULT listViewWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa } } return LB_ERR; + case LB_FINDSTRINGEXACT: + if (lParam) + { + int x = (int) wParam + 1; + if (x < 0) x=0; + const int n = lvs->m_data.GetSize(); + for (int i = 0; i < n; i ++) + { + SWELL_ListView_Row *row=lvs->m_data.Get(x); + if (row) + { + const char *p = row->m_vals.Get(0); + if (p && !stricmp(p,(const char *)lParam)) return x; + } + if (++x >= n) x=0; + } + } + return LB_ERR; case LB_RESETCONTENT: if (lvs && !lvs->IsOwnerData()) { @@ -5877,9 +6008,8 @@ int ListView_GetColumnWidth(HWND h, int pos) { listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; if (!lvs) return 0; - if (pos < 0 || pos >= lvs->m_cols.GetSize()) return 0; - - return lvs->m_cols.Get()[pos].xwid; + SWELL_ListView_Col *c = lvs->GetColumnByIndex(pos); + return c ? c->xwid : 0; } void ListView_InsertColumn(HWND h, int pos, const LVCOLUMN *lvc) @@ -5889,8 +6019,15 @@ void ListView_InsertColumn(HWND h, int pos, const LVCOLUMN *lvc) SWELL_ListView_Col col = { 0, 100 }; if (lvc->mask & LVCF_WIDTH) col.xwid = lvc->cx; if (lvc->mask & LVCF_TEXT) col.name = lvc->pszText ? strdup(lvc->pszText) : NULL; + + for (int x = 0; x < lvs->m_cols.GetSize(); x++) + if (lvs->m_cols.Get()[x].col_index>=pos) + lvs->m_cols.Get()[x].col_index++; + if (pos<0)pos=0; else if (pos>lvs->m_cols.GetSize()) pos=lvs->m_cols.GetSize(); + col.col_index = pos; + lvs->m_cols.Insert(col,pos); } @@ -5898,7 +6035,7 @@ void ListView_SetColumn(HWND h, int pos, const LVCOLUMN *lvc) { listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; if (!lvs || !lvc) return; - SWELL_ListView_Col *col = pos>=0&&pos < lvs->m_cols.GetSize() ? lvs->m_cols.Get()+pos : NULL; + SWELL_ListView_Col *col = lvs->GetColumnByIndex(pos); if (!col) return; if (lvc->mask & LVCF_WIDTH) col->xwid = lvc->cx; if (lvc->mask & LVCF_TEXT) @@ -6171,7 +6308,7 @@ void ListView_SetColumnWidth(HWND h, int pos, int wid) { listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; if (!lvs) return; - SWELL_ListView_Col *col = pos>=0&&pos < lvs->m_cols.GetSize() ? lvs->m_cols.Get()+pos : NULL; + SWELL_ListView_Col *col = lvs->GetColumnByIndex(pos); if (col) { col->xwid = wid; @@ -6236,7 +6373,7 @@ int ListView_SubItemHitTest(HWND h, LVHITTESTINFO *pinf) for (x=0;xm_cols.Get()[x].xwid; - if (pinf->pt.x >= xpos && pinf->pt.x < xpos+xwid) { idx = x; break; } + if (pinf->pt.x >= xpos && pinf->pt.x < xpos+xwid) { idx = lvs->m_cols.Get()[x].col_index; break; } xpos += xwid; } pinf->iSubItem = idx; @@ -6296,7 +6433,7 @@ bool ListView_GetSubItemRect(HWND h, int item, int subitem, int code, RECT *r) { int xwid = lvs->m_cols.Get()[x].xwid; if (!x && lvs->hasStatusImage()) xwid += lvs->m_last_row_height; - if (x == subitem) + if (lvs->m_cols.Get()[x].col_index == subitem) { r->left=xpos; r->right=xpos+xwid; @@ -6350,10 +6487,20 @@ void ListView_SortItems(HWND hwnd, PFNLVCOMPARE compf, LPARAM parm) bool ListView_DeleteColumn(HWND h, int pos) { listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; - if (!lvs || pos < 0 || pos >= lvs->m_cols.GetSize()) return false; + if (!lvs) return false; + SWELL_ListView_Col *c = lvs->GetColumnByIndex(pos); + if (!c) return false; + + const int cidx = c->col_index; + free(c->name); + lvs->m_cols.Delete((int) (c - lvs->m_cols.Get())); - free(lvs->m_cols.Get()[pos].name); - lvs->m_cols.Delete(pos); + for (int x = 0; x < lvs->m_cols.GetSize(); x ++) + { + c = lvs->m_cols.Get()+x; + WDL_ASSERT(c->col_index != cidx); + if (c->col_index > cidx) c->col_index--; + } InvalidateRect(h,NULL,FALSE); return true; } @@ -7625,12 +7772,40 @@ int ListView_GetTopIndex(HWND h) } BOOL ListView_GetColumnOrderArray(HWND h, int cnt, int* arr) { - if (arr) for (int x=0;xm_private_data : NULL; + if (!lvs || !lvs->HasColumnHeaders(h)) return FALSE; + + for (int x=0;xm_cols.GetSize() ? lvs->m_cols.Get()[x].col_index : x; + return TRUE; } BOOL ListView_SetColumnOrderArray(HWND h, int cnt, int* arr) { - return FALSE; + if (!arr) return FALSE; + listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; + if (!lvs || !lvs->HasColumnHeaders(h)) return FALSE; + + WDL_TypedBuf tmp; + + int x; + // O(N^2) but even with 1000 columns who cares? + for (x = 0; x < cnt; x ++) + { + SWELL_ListView_Col *c = lvs->GetColumnByIndex(arr[x]); + if (WDL_NORMALLY(c != NULL)) + { + tmp.Add(*c); + lvs->m_cols.Delete((int) (c - lvs->m_cols.Get())); + } + } + WDL_ASSERT(lvs->m_cols.GetSize()==0); + for (x = 0; x < tmp.GetSize(); x ++) + { + lvs->m_cols.Add(tmp.Get()+x,1); + } + + return TRUE; } HWND ListView_GetHeader(HWND h) { @@ -7647,9 +7822,9 @@ BOOL Header_GetItem(HWND h, int col, HDITEM* hi) { listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; if (!lvs) return FALSE; - if (col < 0 || col >= lvs->m_cols.GetSize()) return FALSE; + const SWELL_ListView_Col *c = lvs->GetColumnByIndex(col); + if (!c) return FALSE; - const SWELL_ListView_Col *c = lvs->m_cols.Get() + col; if (hi->mask&HDI_FORMAT) { if (c->sortindicator<0) hi->fmt = HDF_SORTUP; @@ -7664,9 +7839,9 @@ BOOL Header_SetItem(HWND h, int col, HDITEM* hi) { listViewState *lvs = h ? (listViewState *)h->m_private_data : NULL; if (!lvs) return FALSE; - if (col < 0 || col >= lvs->m_cols.GetSize()) return FALSE; + SWELL_ListView_Col *c = lvs->GetColumnByIndex(col); + if (!c) return FALSE; - SWELL_ListView_Col *c = lvs->m_cols.Get() + col; if (hi->mask&HDI_FORMAT) { if (hi->fmt & HDF_SORTUP) c->sortindicator=-1; @@ -7913,6 +8088,10 @@ void SWELL_GenerateDialogFromList(const void *_list, int listsz) { SWELL_MakeLabel(list->flag1, list->str2, SIXFROMLIST); } + else if (!strcmp(list->str1,"__SWELL_ICON")) + { + // todo (str2 is likely a (const char *)(INT_PTR)resid + } else if (*list->str2) { SWELL_MakeControl(list->str1, list->flag1, list->str2, SIXFROMLIST); diff --git a/WDL/swell/swell-wnd.mm b/WDL/swell/swell-wnd.mm index 1feb0457..624e936c 100644 --- a/WDL/swell/swell-wnd.mm +++ b/WDL/swell/swell-wnd.mm @@ -892,6 +892,24 @@ -(LRESULT)onSwellMessage:(UINT)msg p1:(WPARAM)wParam p2:(LPARAM)lParam } } return LB_ERR; + case LB_FINDSTRINGEXACT: + if (lParam) + { + int x = (int) wParam + 1; + if (x < 0) x=0; + const int n = self->m_items ? self->m_items->GetSize() : 0; + for (int i = 0; i < n; i ++) + { + SWELL_ListView_Row *row=self->m_items->Get(x); + if (row) + { + const char *p = row->m_vals.Get(0); + if (p && !stricmp(p,(const char *)lParam)) return x; + } + if (++x >= n) x=0; + } + } + return LB_ERR; case LB_GETSEL: return !!(ListView_GetItemState(hwnd,(int)wParam,LVIS_SELECTED)&LVIS_SELECTED); case LB_GETCURSEL: @@ -2370,6 +2388,39 @@ BOOL SetDlgItemText(HWND hwnd, int idx, const char *text) return FALSE; } +int GetWindowTextLength(HWND hwnd) +{ + if (!hwnd) return 0; + + SWELL_BEGIN_TRY + + NSView *pvw = (NSView *)hwnd; + if ([(id)pvw isKindOfClass:[NSView class]] && [[(id)pvw window] contentView] == pvw) + { + pvw=(NSView *)[(id)pvw window]; + } + + if ([(id)pvw respondsToSelector:@selector(onSwellGetText)]) + { + const char *p=(const char *)[(SWELL_hwndChild*)pvw onSwellGetText]; + return p ? strlen(p) : 0; + } + + NSString *s; + + if ([pvw isKindOfClass:[NSButton class]]||[pvw isKindOfClass:[NSWindow class]]) s=[((NSButton *)pvw) title]; + else if ([pvw isKindOfClass:[NSControl class]]) s=[((NSControl *)pvw) stringValue]; + else if ([pvw isKindOfClass:[NSText class]]) s=[(NSText*)pvw string]; + else if ([pvw isKindOfClass:[NSBox class]]) s=[(NSBox *)pvw title]; + else return 0; + + const char *p = s ? [s UTF8String] : NULL; + return p ? strlen(p) : 0; + + SWELL_END_TRY(;) + return 0; +} + BOOL GetDlgItemText(HWND hwnd, int idx, char *text, int textlen) { *text=0; @@ -3074,6 +3125,25 @@ -(LRESULT)onSwellMessage:(UINT)msg p1:(WPARAM)wParam p2:(LPARAM)lParam if (lParam) *(int*)lParam = (int)(r.location+r.length); } return 0; + case EM_REPLACESEL: + if (lParam) + { + NSTextStorage *ts = [self textStorage]; + if (ts) + { + NSRange r = [self selectedRange]; + const char *s = (const char *)lParam; + NSString *str = *s ? (NSString*)SWELL_CStringToCFString(s) : NULL; + + if (r.length > 0 && !str) + [ts deleteCharactersInRange:r]; + else if (str) + [ts replaceCharactersInRange:r withString:str]; + + if (str) [str release]; + } + } + return 0; case WM_SETFONT: { @@ -3584,6 +3654,16 @@ HWND SWELL_MakeControl(const char *cname, int idx, const char *classname, int st } else if (!stricmp(classname, "static")) { + if ((style&SS_TYPEMASK) == SS_ETCHEDHORZ || (style&SS_TYPEMASK) == SS_ETCHEDVERT || (style&SS_TYPEMASK) == SS_ETCHEDFRAME) + { + SWELL_BoxView *obj=[[SWELL_BoxView alloc] init]; + obj->m_etch_mode = style & SS_TYPEMASK; + [obj setTag:idx]; + [obj setFrame:MakeCoords(x,y,w,h,false)]; + [m_make_owner addSubview:obj]; + [obj release]; + return (HWND)obj; + } NSTextField *obj=[[SWELL_TextField alloc] init]; [obj setEditable:NO]; [obj setSelectable:NO]; @@ -3793,11 +3873,23 @@ -(void) setTag:(NSInteger)tag { m_tag=tag; } + +-(void) drawRect:(NSRect) r +{ + // m_etch_mode override? + [super drawRect:r]; +} +-(int)swellIsEtchBox +{ + return m_etch_mode; +} + @end HWND SWELL_MakeGroupBox(const char *name, int idx, int x, int y, int w, int h, int style) { SWELL_BoxView *obj=[[SWELL_BoxView alloc] init]; + obj->m_etch_mode = 0; // this just doesn't work, you can't color the border unless it's NSBoxCustom, // and I can't get it to show the title text if it's NSBoxCustom @@ -5171,7 +5263,7 @@ LRESULT DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (!br) { br = CreateSolidBrush(RGB(0,0,0)); // todo hm - br->color = [[NSColor windowBackgroundColor] CGColor]; + br->color = (CGColorRef) [[NSColor windowBackgroundColor] CGColor]; CFRetain(br->color); } SetTextColor((HDC)wParam,RGB(255,255,255)); @@ -5876,7 +5968,7 @@ HTREEITEM TreeView_GetChild(HWND hwnd, HTREEITEM item) if (!hwnd || ![(id)hwnd isKindOfClass:[SWELL_TreeView class]]) return NULL; HTREEITEM__ *titem=(HTREEITEM__ *)item; - if (!titem) return TreeView_GetRoot(hwnd); + if (!titem || item == TVI_ROOT) return TreeView_GetRoot(hwnd); return (HTREEITEM) titem->m_children.Get(0); } @@ -6409,6 +6501,10 @@ void SWELL_GenerateDialogFromList(const void *_list, int listsz) { SWELL_MakeLabel(list->flag1, list->str2, SIXFROMLIST); } + else if (!strcmp(list->str1,"__SWELL_ICON")) + { + // todo (str2 is likely a (const char *)(INT_PTR)resid + } else if (*list->str2) { SWELL_MakeControl(list->str1, list->flag1, list->str2, SIXFROMLIST); @@ -6471,7 +6567,11 @@ void SWELL_GetDesiredControlSize(HWND hwnd, RECT *r) BOOL SWELL_IsGroupBox(HWND hwnd) { - if (hwnd && [(id)hwnd isKindOfClass:[SWELL_BoxView class]]) return TRUE; + if (hwnd && [(id)hwnd isKindOfClass:[SWELL_BoxView class]]) + { + if (![(id)hwnd respondsToSelector:@selector(swellIsEtchBox)] || [(SWELL_BoxView *)hwnd swellIsEtchBox]) + return TRUE; + } return FALSE; } BOOL SWELL_IsButton(HWND hwnd) diff --git a/WDL/swell/swell.cpp b/WDL/swell/swell.cpp index f2e42eaf..416802d5 100644 --- a/WDL/swell/swell.cpp +++ b/WDL/swell/swell.cpp @@ -311,14 +311,14 @@ DWORD WaitForSingleObject(HANDLE hand, DWORD msTO) } else { - DWORD until = GetTickCount() + msTO; + const DWORD start_t = GetTickCount(); for (;;) { pid_t v = waitpid(pb->pid,&wstatus,WNOHANG); if (v > 0) break; if (v < 0) return WAIT_FAILED; - if (GetTickCount() > until) return WAIT_TIMEOUT; + if ((GetTickCount()-start_t) > msTO) return WAIT_TIMEOUT; Sleep(1); } } @@ -341,8 +341,8 @@ DWORD WaitForSingleObject(HANDLE hand, DWORD msTO) if (!msTO) return WAIT_TIMEOUT; if (msTO != INFINITE) { - DWORD d=GetTickCount()+msTO; - while (GetTickCount()done) Sleep(1); + const DWORD d=GetTickCount(); + while ((GetTickCount()-d)done) Sleep(1); if (!thr->done) return WAIT_TIMEOUT; } } diff --git a/WDL/vorbisencdec.h b/WDL/vorbisencdec.h index c2514415..b18441fa 100644 --- a/WDL/vorbisencdec.h +++ b/WDL/vorbisencdec.h @@ -74,6 +74,7 @@ class VorbisEncoderInterface #ifndef WDL_VORBIS_INTERFACE_ONLY #include "../WDL/queue.h" +#include "../WDL/assocarray.h" class VorbisDecoder : public VorbisDecoderInterface @@ -240,7 +241,8 @@ class VorbisEncoder : public VorbisEncoderInterface { public: #ifdef VORBISENC_WANT_FULLCONFIG - VorbisEncoder(int srate, int nch, int serno, float qv, int cbr=-1, int minbr=-1, int maxbr=-1, const char *encname=NULL) + VorbisEncoder(int srate, int nch, int serno, float qv, int cbr=-1, int minbr=-1, int maxbr=-1, + const char *encname=NULL, WDL_StringKeyedArray *metadata=NULL) #elif defined(VORBISENC_WANT_QVAL) VorbisEncoder(int srate, int nch, float qv, int serno, const char *encname=NULL) #else @@ -267,7 +269,7 @@ class VorbisEncoder : public VorbisEncoderInterface else m_err=vorbis_encode_init_vbr(&vi,nch,srate,qv); -#else +#else // VORBISENC_WANT_FULLCONFIG #ifndef VORBISENC_WANT_QVAL float qv=0.0; @@ -296,13 +298,29 @@ class VorbisEncoder : public VorbisEncoderInterface if (qv<-0.10f)qv=-0.10f; if (qv>1.0f)qv=1.0f; - #endif + #endif // !VORBISENC_WANT_QVAL m_err=vorbis_encode_init_vbr(&vi,nch,srate>>m_ds,qv); -#endif +#endif // !VORBISENC_WANT_FULLCONFIG vorbis_comment_init(&vc); if (encname) vorbis_comment_add_tag(&vc,"ENCODER",(char *)encname); + +#ifdef VORBISENC_WANT_FULLCONFIG + if (metadata) + { + for (int i=0; i < metadata->GetSize(); ++i) + { + const char *key; + const char *val=metadata->Enumerate(i, &key); + if (key && val && key[0] && val[0]) + { + vorbis_comment_add_tag(&vc, key, val); + } + } + } +#endif // VORBISENC_WANT_FULLCONFIG + vorbis_analysis_init(&vd,&vi); vorbis_block_init(&vd,&vb); ogg_stream_init(&os,m_ser=serno); diff --git a/WDL/wdlcstring.h b/WDL/wdlcstring.h index 71a248e6..653eae1c 100644 --- a/WDL/wdlcstring.h +++ b/WDL/wdlcstring.h @@ -83,7 +83,7 @@ extern "C" { char WDL_remove_filepart(char *str); // returns dir character that was zeroed, or 0 if new string is empty int WDL_remove_trailing_dirchars(char *str); // returns trailing dirchar count removed, will not convert "/" into "" size_t WDL_remove_trailing_crlf(char *str); // returns new length - + const char *WDL_sanitize_ini_key_start(const char *p); // used for sanitizing the start of the "key" parameter to Write/GetPrivateProfile*. note does not fully santiize #if defined(_WIN32) && defined(_MSC_VER) void WDL_vsnprintf(char *o, size_t count, const char *format, va_list args); @@ -218,6 +218,12 @@ extern "C" { return p-str; } + _WDL_CSTRING_PREFIX const char *WDL_sanitize_ini_key_start(const char *p) // used for sanitizing the beginning of "key" parameter to Write/GetPrivateProfile*. does not fully sanitize + { + while (*p == ' ' || *p == '\t' || *p == '[') p++; + return p; + } + _WDL_CSTRING_PREFIX void WDL_VARARG_WARN(printf,3,4) snprintf_append(char *o, INT_PTR count, const char *format, ...) { if (count>0) diff --git a/WDL/wdltypes.h b/WDL/wdltypes.h index b839094d..6bad0542 100644 --- a/WDL/wdltypes.h +++ b/WDL/wdltypes.h @@ -157,4 +157,21 @@ typedef bool WDL_bool; #define WDL_NOT_NORMALLY(x) WDL_unlikely(x) #endif + +typedef unsigned int WDL_TICKTYPE; + +static WDL_bool WDL_STATICFUNC_UNUSED WDL_TICKS_IN_RANGE(WDL_TICKTYPE current, WDL_TICKTYPE refstart, int len) // current >= refstart && current < refstart+len +{ + WDL_ASSERT(len > 0); + return (current - refstart) < (WDL_TICKTYPE)len; +} + +static WDL_bool WDL_STATICFUNC_UNUSED WDL_TICKS_IN_RANGE_ENDING_AT(WDL_TICKTYPE current, WDL_TICKTYPE refend, int len) // current >= refend-len && current < refend +{ + const WDL_TICKTYPE refstart = refend - len; + WDL_ASSERT(len > 0); + return (current - refstart) < (WDL_TICKTYPE)len; + //return ((refend-1) - current) < (WDL_TICKTYPE)len; +} + #endif diff --git a/WDL/win32_curses/curses_editor.cpp b/WDL/win32_curses/curses_editor.cpp index b8486299..fa967c21 100644 --- a/WDL/win32_curses/curses_editor.cpp +++ b/WDL/win32_curses/curses_editor.cpp @@ -1299,6 +1299,12 @@ void WDL_CursesEditor::runSearch() } if (found) { + // make sure the end is on screen + m_offs_x = 0; + m_curs_x=wdl_max(m_select_x1,m_select_x2) + COLS/4; + setCursor(); + + m_curs_x = m_select_x1; draw(); setCursor(); char buf[512]; @@ -2245,7 +2251,11 @@ int WDL_CursesEditor::onChar(int c) { preSaveUndoState(); m_curs_x=WDL_utf8_get_charlen(fl->Get()); - fl->Append(tl->Get()); + + // if tl is all whitespace, don't bother appending to the previous line + const char *p = tl->Get(); + while (*p == ' ' || *p == '\t') p++; + if (*p) fl->Append(tl->Get()); m_text.Delete(m_curs_y--,true); draw(); @@ -2302,11 +2312,13 @@ int WDL_CursesEditor::onChar(int c) WDL_FastString *nl = new WDL_FastString(); int plen=0; const char *pb = s->Get(); - while (plen < bytepos && (pb[plen]== ' ' || pb[plen] == '\t')) plen++; + while (pb[plen]== ' ' || pb[plen] == '\t') plen++; if (plen>0) nl->Set(pb,plen); - nl->Append(pb+bytepos); + const char *insert = pb+bytepos; + while (*insert == ' ' || *insert == '\t') insert++; + nl->Append(insert); m_text.Insert(++m_curs_y,nl); s->SetLen(bytepos); m_curs_x=WDL_utf8_bytepos_to_charpos(nl->Get(),plen); diff --git a/WDL/win32_curses/eel_edit.cpp b/WDL/win32_curses/eel_edit.cpp index e25e75f0..ca938951 100644 --- a/WDL/win32_curses/eel_edit.cpp +++ b/WDL/win32_curses/eel_edit.cpp @@ -1402,6 +1402,8 @@ void EEL_Editor::onRightClick(HWND hwnd) if (flist.GetSize()) { flist.Resort(); + if (m_case_sensitive) flist.Resort(WDL_LogicalSortStringKeyedArray::cmpistr); + HMENU hm=CreatePopupMenu(); int pos=0; for (i=0; i < flist.GetSize(); ++i) diff --git a/WDL/wingui/virtwnd-controls.h b/WDL/wingui/virtwnd-controls.h index 85c35614..a950a103 100644 --- a/WDL/wingui/virtwnd-controls.h +++ b/WDL/wingui/virtwnd-controls.h @@ -90,7 +90,7 @@ class WDL_VirtualIconButton : public WDL_VWnd void SetGrayed(bool grayed) { m_grayed = grayed; SetEnabled(!grayed); } - void SetIcon(WDL_VirtualIconButton_SkinConfig *cfg, float alpha=1.0f, bool buttonownsicon=false); + virtual void SetIcon(WDL_VirtualIconButton_SkinConfig *cfg, float alpha=1.0f, bool buttonownsicon=false); void SetIsButton(bool isbutton) { m_is_button=isbutton; } bool GetIsButton() { return m_is_button; } diff --git a/WDL/wingui/virtwnd.cpp b/WDL/wingui/virtwnd.cpp index 6a6079b1..ddd4c8ea 100644 --- a/WDL/wingui/virtwnd.cpp +++ b/WDL/wingui/virtwnd.cpp @@ -626,6 +626,8 @@ WDL_VWnd::~WDL_VWnd() { if (m_children) { + WDL_VWnd *cap = m_children->Get(m_captureidx); + if (cap) cap->OnCaptureLost(); m_children->Empty(true); delete m_children; } @@ -735,8 +737,10 @@ void WDL_VWnd::SetChildPosition(WDL_VWnd *ch, int pos) if (pos>x) pos--; if (pos != x) { + WDL_VWnd * const cap = m_children->Get(m_captureidx); m_children->Delete(x); m_children->Insert(pos,ch); + if (cap) m_captureidx = m_children->Find(cap); } return; } @@ -750,8 +754,15 @@ void WDL_VWnd::AddChild(WDL_VWnd *wnd, int pos) wnd->SetParent(this); if (!m_children) m_children=new WDL_PtrList; - if (pos<0||pos>=m_children->GetSize()) m_children->Add(wnd); - else m_children->Insert(pos,wnd); + if (pos<0||pos>=m_children->GetSize()) + { + m_children->Add(wnd); + } + else + { + m_children->Insert(pos,wnd); + if (pos <= m_captureidx) m_captureidx++; + } if (m__iaccess) m__iaccess->ClearCaches(); } @@ -774,11 +785,17 @@ void WDL_VWnd::RemoveChild(WDL_VWnd *wnd, bool dodel) int idx=m_children ? m_children->Find(wnd) : -1; if (idx>=0) { - if (!dodel) + if (idx == m_captureidx) { - WDL_VWnd *ch = m_children->Get(idx); - if (ch) ch->SetParent(NULL); + wnd->OnCaptureLost(); + m_captureidx = -1; + } + else if (idx < m_captureidx) + { + m_captureidx--; } + + if (!dodel) wnd->SetParent(NULL); m_children->Delete(idx,dodel); } if (m__iaccess) m__iaccess->ClearCaches(); @@ -872,6 +889,9 @@ void WDL_VWnd::RemoveAllChildren(bool dodel) { if (m_children) { + WDL_VWnd *cap = m_children->Get(m_captureidx); + if (cap) cap->OnCaptureLost(); + m_captureidx = -1; if (!dodel) // update parent pointers { int x; @@ -1194,31 +1214,32 @@ LICE_IBitmap *WDL_VirtualWnd_BGCfgCache::SetCachedBG(int w, int h, int sinfo2, L // caller should ALWAYS call GetCachedBG() and use that if present WDL_VirtualWnd_BGCfgCache_img *img = NULL; - unsigned int now = GetTickCount(); + const DWORD now = GetTickCount(); bool cacheAtWantSize = cache->GetSize()>=m_want_size; if (cacheAtWantSize || owner_hint) { int x; int bestpos=-1; - unsigned int bestt=0xffffff00; + DWORD best_age=0; for(x=0;xGetSize();x++) { WDL_VirtualWnd_BGCfgCache_img *a = cache->Get(x); if (owner_hint && a->lastowner == owner_hint) { cacheAtWantSize=true; - bestt = now-5000; + best_age = 5000; bestpos=x; break; // FOUND exact match! } - if (a->lastused < bestt) + const DWORD age = now-a->lastused; + if (age > best_age) // find oldest entry { - bestt=a->lastused; - bestpos=x; + best_age = age; + bestpos = x; } } - if (cacheAtWantSize && (bestt < now-500 || cache->GetSize() >= m_max_size)) // use this slot if over 1000ms old, or if we're up against the max size + if (cacheAtWantSize && (best_age > 500 || cache->GetSize() >= m_max_size)) // use this slot if over 1000ms old, or if we're up against the max size { img = cache->Get(bestpos); cache->Delete(bestpos,false); diff --git a/jmde/fx/reaninjam/res.rc b/jmde/fx/reaninjam/res.rc index 0575ab4c..19ebfe74 100644 --- a/jmde/fx/reaninjam/res.rc +++ b/jmde/fx/reaninjam/res.rc @@ -1,463 +1,463 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_MAIN DIALOGEX 0, 0, 478, 276 -STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -EXSTYLE WS_EX_CONTROLPARENT -CAPTION "ReaNINJAM" -MENU IDR_MENU1 -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - RTEXT "Master:",IDC_MASTER_LBL,50,4,38,8 - CONTROL "Slider1",IDC_MASTERVOL,"REAPERhfader",WS_TABSTOP,92,2, - 118,12 - CONTROL "Slider1",IDC_MASTERPAN,"REAPERhfader",WS_TABSTOP,212,2, +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MAIN DIALOGEX 0, 0, 478, 276 +STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION | WS_SYSMENU | + WS_THICKFRAME +EXSTYLE WS_EX_CONTROLPARENT +CAPTION "ReaNINJAM" +MENU IDR_MENU1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + RTEXT "Master:",IDC_MASTER_LBL,50,4,38,8 + CONTROL "Slider1",IDC_MASTERVOL,"REAPERhfader",WS_TABSTOP,92,2, + 118,12 + CONTROL "Slider1",IDC_MASTERPAN,"REAPERhfader",WS_TABSTOP,212,2, 41,12 - RTEXT "+0.0 dB",IDC_MASTERVOLLBL,257,4,29,11,SS_NOTIFY - RTEXT "Metronome:",IDC_METRO_LBL,50,21,38,8 - CONTROL "Slider1",IDC_METROVOL,"REAPERhfader",WS_TABSTOP,92,18, - 118,12 - CONTROL "Slider1",IDC_METROPAN,"REAPERhfader",WS_TABSTOP,212,18, + RTEXT "+0.0 dB",IDC_MASTERVOLLBL,257,4,29,11,SS_NOTIFY + RTEXT "Metronome:",IDC_METRO_LBL,50,21,38,8 + CONTROL "Slider1",IDC_METROVOL,"REAPERhfader",WS_TABSTOP,92,18, + 118,12 + CONTROL "Slider1",IDC_METROPAN,"REAPERhfader",WS_TABSTOP,212,18, 41,12 - RTEXT "+0.0 dB",IDC_METROVOLLBL,257,22,29,11,SS_NOTIFY - CONTROL "",IDC_DIV1,"Static",SS_ETCHEDHORZ,48,16,428,1 - CONTROL "Progress2",IDC_INTERVALPOS,"ninjamstatus",0x0,2,196,474, - 78 - CONTROL "",IDC_CHATDISP,"RichEditChild",WS_BORDER | WS_VSCROLL | - WS_TABSTOP | 0x2804,4,110,213,66 - CONTROL "",IDC_CHATENT,"RichEditChild",WS_BORDER | WS_TABSTOP | - 0xc4,4,178,186,14 - CONTROL "",IDC_LOCRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,4, - 46,213,49 - CONTROL "",IDC_REMOTERECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE, - 225,46,251,148 - CONTROL "",IDC_DIV2,"Static",SS_ETCHEDHORZ,2,98,214,1 - CONTROL "",IDC_DIV3,"Static",SS_ETCHEDHORZ,2,33,474,1 - LTEXT "center",IDC_MASTERPANLBL,288,4,22,11,SS_NOTIFY - LTEXT "center",IDC_METROPANLBL,288,22,22,11,SS_NOTIFY - CONTROL "",IDC_MASTERVU,"REAPERhorzvu",WS_TABSTOP,329,2,147,12 - LTEXT "Local Channels:",IDC_LOCGRP,2,37,52,8 - LTEXT "Remote Channels:",IDC_REMGRP,225,37,59,8 - LTEXT "Cha&t:",IDC_CHATLBL,2,100,88,8 - CONTROL "mastermute",IDC_MASTERMUTE,"HotTrackButton",0x4b,315,2, - 12,11 - CONTROL "metromute",IDC_METROMUTE,"HotTrackButton",0x4b,315,20, - 12,11 - PUSHBUTTON "Send",IDC_CHATOK,192,178,25,14 + RTEXT "+0.0 dB",IDC_METROVOLLBL,257,22,29,11,SS_NOTIFY + CONTROL "",IDC_DIV1,"Static",SS_ETCHEDHORZ,48,16,428,1 + CONTROL "Progress2",IDC_INTERVALPOS,"ninjamstatus",0x0,2,196,474, + 78 + CONTROL "",IDC_CHATDISP,"RichEditChild",WS_BORDER | WS_VSCROLL | + WS_TABSTOP | 0x2804,4,110,213,66 + CONTROL "",IDC_CHATENT,"RichEditChild",WS_BORDER | WS_TABSTOP | + 0xc4,4,178,186,14 + CONTROL "",IDC_LOCRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,4, + 46,213,49 + CONTROL "",IDC_REMOTERECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE, + 225,46,251,148 + CONTROL "",IDC_DIV2,"Static",SS_ETCHEDHORZ,2,98,214,1 + CONTROL "",IDC_DIV3,"Static",SS_ETCHEDHORZ,2,33,474,1 + LTEXT "center",IDC_MASTERPANLBL,288,4,22,11,SS_NOTIFY + LTEXT "center",IDC_METROPANLBL,288,22,22,11,SS_NOTIFY + CONTROL "",IDC_MASTERVU,"REAPERhorzvu",WS_TABSTOP,329,2,147,12 + LTEXT "Local Channels:",IDC_LOCGRP,2,37,52,8 + LTEXT "Remote Channels:",IDC_REMGRP,225,37,59,8 + LTEXT "Cha&t:",IDC_CHATLBL,2,100,88,8 + CONTROL "mastermute",IDC_MASTERMUTE,"HotTrackButton",0x4b,315,2, + 12,11 + CONTROL "metromute",IDC_METROMUTE,"HotTrackButton",0x4b,315,20, + 12,11 + PUSHBUTTON "Send",IDC_CHATOK,192,178,25,14 PUSHBUTTON "Connect...",IDC_CONNECT,2,2,42,12 - PUSHBUTTON "Sync...",IDC_SYNC,2,18,42,12 + PUSHBUTTON "Sync...",IDC_SYNC,2,18,42,12 +END + +IDD_CONNECT DIALOG DISCARDABLE 0, 0, 361, 236 +STYLE DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +CAPTION "NINJAM Connection Configuration" +FONT 8, "MS Shell Dlg" +BEGIN + COMBOBOX IDC_HOST,65,141,155,186,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + EDITTEXT IDC_USER,65,160,155,12,ES_AUTOHSCROLL + CONTROL "Connect with p&assword",IDC_ANON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,68,176,100,10 + EDITTEXT IDC_PASS,65,189,155,12,ES_PASSWORD | ES_AUTOHSCROLL | + NOT WS_VISIBLE + CONTROL "&Remember password",IDC_PASSREMEMBER,"Button", + BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,68,205,82, + 10 + DEFPUSHBUTTON "Connect",IDOK,249,215,50,14 + PUSHBUTTON "Cancel",IDCANCEL,304,215,50,14 + LTEXT "Connect to host:",IDC_CONNECT_LBL,7,143,53,8 + LTEXT "Username:",IDC_USERLBL,7,162,35,8 + LTEXT "Password:",IDC_PASSLBL,7,191,34,8,NOT WS_VISIBLE + LTEXT "For information on setting up a server, visit http://www.ninjam.com", + IDC_INFOTEXT,7,220,220,10 + CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_NOSORTHEADER | WS_BORDER | + WS_TABSTOP,7,7,347,126 + PUSHBUTTON "Refresh list",IDC_BUTTON1,304,138,50,14 END - -IDD_CONNECT DIALOG DISCARDABLE 0, 0, 361, 236 -STYLE DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "NINJAM Connection Configuration" -FONT 8, "MS Shell Dlg" -BEGIN - COMBOBOX IDC_HOST,65,141,155,186,CBS_DROPDOWN | WS_VSCROLL | - WS_TABSTOP - EDITTEXT IDC_USER,65,160,155,12,ES_AUTOHSCROLL - CONTROL "Connect with p&assword",IDC_ANON,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,68,176,100,10 - EDITTEXT IDC_PASS,65,189,155,12,ES_PASSWORD | ES_AUTOHSCROLL | - NOT WS_VISIBLE - CONTROL "&Remember password",IDC_PASSREMEMBER,"Button", - BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,68,205,82, - 10 - DEFPUSHBUTTON "Connect",IDOK,249,215,50,14 - PUSHBUTTON "Cancel",IDCANCEL,304,215,50,14 - LTEXT "Connect to host:",IDC_CONNECT_LBL,7,143,53,8 - LTEXT "Username:",IDC_USERLBL,7,162,35,8 - LTEXT "Password:",IDC_PASSLBL,7,191,34,8,NOT WS_VISIBLE - LTEXT "For information on setting up a server, visit http://www.ninjam.com", - IDC_INFOTEXT,7,220,220,10 - CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,7,7,347,126 - PUSHBUTTON "Refresh list",IDC_BUTTON1,304,138,50,14 -END - -IDD_LICENSE DIALOG DISCARDABLE 0, 0, 316, 215 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM Server License Agreement" -FONT 8, "MS Shell Dlg" -BEGIN - CONTROL "I &agree to the above license terms",IDC_CHECK1,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,82,195,119,10 - PUSHBUTTON "Accept",IDOK,206,194,50,14,WS_DISABLED - PUSHBUTTON "Decline",IDCANCEL,259,194,50,14 - CONTROL "",IDC_LICENSETEXT,"RichEditChild",WS_BORDER | - WS_VSCROLL | WS_TABSTOP | 0x2804,7,7,302,183 -END - -IDD_PREFS DIALOG DISCARDABLE 0, 0, 241, 112 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM Preferences" -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,91,50,14 - PUSHBUTTON "Cancel",IDCANCEL,184,91,50,14 - CONTROL "Save multitrack recordings for remixing later", - IDC_SAVELOCAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7, - 152,10 - CONTROL "Save uncompressed .WAV recordings too",IDC_SAVELOCALWAV, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,19,148,10 - LTEXT "Save session files in:",IDC_STATIC,7,35,66,8 - EDITTEXT IDC_SESSIONDIR,7,45,182,12,ES_AUTOHSCROLL - PUSHBUTTON "Browse...",IDC_BROWSE,192,45,42,12 - LTEXT "Changes to the above settings will take effect on the next connection.", + +IDD_LICENSE DIALOG DISCARDABLE 0, 0, 316, 215 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM Server License Agreement" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "I &agree to the above license terms",IDC_CHECK1,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,82,195,119,10 + PUSHBUTTON "Accept",IDOK,206,194,50,14,WS_DISABLED + PUSHBUTTON "Decline",IDCANCEL,259,194,50,14 + CONTROL "",IDC_LICENSETEXT,"RichEditChild",WS_BORDER | + WS_VSCROLL | WS_TABSTOP | 0x2804,7,7,302,183 +END + +IDD_PREFS DIALOG DISCARDABLE 0, 0, 241, 112 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM Preferences" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,91,50,14 + PUSHBUTTON "Cancel",IDCANCEL,184,91,50,14 + CONTROL "Save multitrack recordings for remixing later", + IDC_SAVELOCAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7, + 152,10 + CONTROL "Save uncompressed .WAV recordings too",IDC_SAVELOCALWAV, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,19,148,10 + LTEXT "Save session files in:",IDC_STATIC,7,35,66,8 + EDITTEXT IDC_SESSIONDIR,7,45,182,12,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE,192,45,42,12 + LTEXT "Changes to the above settings will take effect on the next connection.", IDC_CHNOTE,7,63,227,8 CONTROL "Flash beat counter at start and every 16 beats",IDC_FLASH,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,77,200,10 -END - -IDD_LOCALCHANNEL DIALOG DISCARDABLE 0, 0, 202, 47 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Shell Dlg" -BEGIN - EDITTEXT IDC_NAME,2,1,46,12,ES_AUTOHSCROLL | ES_WANTRETURN - CONTROL "Xmit",IDC_TRANSMIT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,50,3,32,10 - COMBOBOX IDC_AUDIOIN,2,16,84,148,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "Slider1",IDC_VOL,"REAPERhfader",WS_TABSTOP,110,16,50,11 - CONTROL "Slider1",IDC_PAN,"REAPERhfader",WS_TABSTOP,163,16,36,11 - RTEXT "+0.0 dB",IDC_VOLLBL,110,33,28,8,SS_NOTIFY - PUSHBUTTON "Delete",IDC_REMOVE,166,32,33,9 - CONTROL "",IDC_EDGE,"Static",SS_ETCHEDHORZ,1,45,200,1 - CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | - SS_NOTIFY | WS_GROUP,140,33,23,8 - CONTROL "",IDC_VU,"REAPERvertvu",WS_TABSTOP,90,1,16,42 - CONTROL "mute",IDC_MUTE,"HotTrackButton",0x4b,174,2,12,11 - CONTROL "solo",IDC_SOLO,"HotTrackButton",0x4b,187,2,12,11 - COMBOBOX IDC_ASYNCXMIT,2,31,84,109,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "Monitoring mix:", IDC_STATIC, 109,4,64,11 -END - -IDD_EMPTY_SCROLL DIALOGEX 0, 0, 201, 35 -STYLE DS_CONTROL | WS_CHILD | WS_VSCROLL -EXSTYLE WS_EX_TRANSPARENT | WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN -END - -IDD_LOCALLIST DIALOG DISCARDABLE 0, 0, 133, 22 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Shell Dlg" -BEGIN - PUSHBUTTON "Add Local Channel",IDC_ADDCH,0,0,65,11 -END - -IDD_REMOTECHANNEL DIALOG DISCARDABLE 0, 0, 237, 27 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Shell Dlg" -BEGIN - EDITTEXT IDC_CHANNELNAME,21,0,87,12,ES_AUTOHSCROLL | ES_READONLY | - ES_WANTRETURN - CONTROL "Recv",IDC_RECV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 110,2,30,10 - CONTROL "",IDC_VU,"REAPERhorzvu",WS_TABSTOP,145,0,91,13 - CONTROL "Slider1",IDC_VOL,"REAPERhfader",WS_TABSTOP,21,14,87,12 - CONTROL "Slider1",IDC_PAN,"REAPERhfader",WS_TABSTOP,109,14,43,12 - RTEXT "+0.0 dB",IDC_VOLLBL,156,16,28,8,SS_NOTIFY - CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | - SS_NOTIFY | WS_GROUP,186,16,21,8 - CONTROL "mute",IDC_MUTE,"HotTrackButton",0x4b,210,15,13,11 - CONTROL "solo",IDC_SOLO,"HotTrackButton",0x4b,224,15,12,11 -END - -IDD_EMPTY DIALOGEX 0, 0, 127, 30 -STYLE DS_CONTROL | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN -END - -IDD_REMOTEUSER DIALOG DISCARDABLE 0, 0, 233, 16 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Shell Dlg" -BEGIN - EDITTEXT IDC_USERNAME,21,3,112,12,ES_AUTOHSCROLL | ES_READONLY | - ES_WANTRETURN - CONTROL "",IDC_DIV,"Static",SS_ETCHEDHORZ,0,0,232,1 - LTEXT "User:",IDC_STATIC,0,5,18,8 - CONTROL "mute",IDC_MUTE,"HotTrackButton",0x4b,219,3,12,11 - EDITTEXT IDC_SESSIONINFO,134,3,83,12,ES_AUTOHSCROLL | ES_READONLY | - ES_WANTRETURN -END - -IDD_VSTCFG DIALOG DISCARDABLE 0, 0, 199, 53 -STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN - PUSHBUTTON "Show ReaNINJAM Console",IDC_BUTTON1,7,7,144,14 -END - -IDD_CONNECT_OLD DIALOG DISCARDABLE 0, 0, 225, 146 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM Connection Configuration" -FONT 8, "MS Shell Dlg" -BEGIN - COMBOBOX IDC_HOST,63,14,155,186,CBS_DROPDOWN | WS_VSCROLL | - WS_TABSTOP - EDITTEXT IDC_USER,63,32,155,12,ES_AUTOHSCROLL - CONTROL "Connect &anonymously",IDC_ANON,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,64,49,85,10 - EDITTEXT IDC_PASS,63,61,155,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT - WS_VISIBLE - CONTROL "&Remember password",IDC_PASSREMEMBER,"Button", - BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,64,77,82, - 10 - DEFPUSHBUTTON "Connect",IDOK,112,92,50,14 - PUSHBUTTON "Cancel",IDCANCEL,168,92,50,14 - LTEXT "Connect to host:",IDC_STATIC,7,16,53,8 - LTEXT "Username:",IDC_STATIC,7,34,35,8 - LTEXT "Password:",IDC_PASSLBL,7,63,34,8,NOT WS_VISIBLE - LTEXT "To test, try using test.ninjam.com or test.ninjam.com:2050\r\nFor information on setting up your own server, visit http://www.ninjam.com/", - IDC_STATIC,7,112,211,27 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 2 - RIGHTMARGIN, 476 - TOPMARGIN, 2 - BOTTOMMARGIN, 214 + BS_AUTOCHECKBOX | WS_TABSTOP,7,77,200,10 +END + +IDD_LOCALCHANNEL DIALOG DISCARDABLE 0, 0, 202, 47 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_NAME,2,1,46,12,ES_AUTOHSCROLL | ES_WANTRETURN + CONTROL "Xmit",IDC_TRANSMIT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,50,3,32,10 + COMBOBOX IDC_AUDIOIN,2,16,84,148,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "Slider1",IDC_VOL,"REAPERhfader",WS_TABSTOP,110,16,50,11 + CONTROL "Slider1",IDC_PAN,"REAPERhfader",WS_TABSTOP,163,16,36,11 + RTEXT "+0.0 dB",IDC_VOLLBL,110,33,28,8,SS_NOTIFY + PUSHBUTTON "Delete",IDC_REMOVE,166,32,33,9 + CONTROL "",IDC_EDGE,"Static",SS_ETCHEDHORZ,1,45,200,1 + CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | + SS_NOTIFY | WS_GROUP,140,33,23,8 + CONTROL "",IDC_VU,"REAPERvertvu",WS_TABSTOP,90,1,16,42 + CONTROL "mute",IDC_MUTE,"HotTrackButton",0x4b,174,2,12,11 + CONTROL "solo",IDC_SOLO,"HotTrackButton",0x4b,187,2,12,11 + COMBOBOX IDC_ASYNCXMIT,2,31,84,109,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Monitoring mix:", IDC_STATIC, 109,4,64,11 +END + +IDD_EMPTY_SCROLL DIALOGEX 0, 0, 201, 35 +STYLE DS_CONTROL | WS_CHILD | WS_VSCROLL +EXSTYLE WS_EX_TRANSPARENT | WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN +END + +IDD_LOCALLIST DIALOG DISCARDABLE 0, 0, 133, 22 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Add Local Channel",IDC_ADDCH,0,0,65,11 +END + +IDD_REMOTECHANNEL DIALOG DISCARDABLE 0, 0, 237, 27 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_CHANNELNAME,21,0,87,12,ES_AUTOHSCROLL | ES_READONLY | + ES_WANTRETURN + CONTROL "Recv",IDC_RECV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 110,2,30,10 + CONTROL "",IDC_VU,"REAPERhorzvu",WS_TABSTOP,145,0,91,13 + CONTROL "Slider1",IDC_VOL,"REAPERhfader",WS_TABSTOP,21,14,87,12 + CONTROL "Slider1",IDC_PAN,"REAPERhfader",WS_TABSTOP,109,14,43,12 + RTEXT "+0.0 dB",IDC_VOLLBL,156,16,28,8,SS_NOTIFY + CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | + SS_NOTIFY | WS_GROUP,186,16,21,8 + CONTROL "mute",IDC_MUTE,"HotTrackButton",0x4b,210,15,13,11 + CONTROL "solo",IDC_SOLO,"HotTrackButton",0x4b,224,15,12,11 +END + +IDD_EMPTY DIALOGEX 0, 0, 127, 30 +STYLE DS_CONTROL | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN +END + +IDD_REMOTEUSER DIALOG DISCARDABLE 0, 0, 233, 16 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_USERNAME,21,3,112,12,ES_AUTOHSCROLL | ES_READONLY | + ES_WANTRETURN + CONTROL "",IDC_DIV,"Static",SS_ETCHEDHORZ,0,0,232,1 + LTEXT "User:",IDC_STATIC,0,5,18,8 + CONTROL "mute",IDC_MUTE,"HotTrackButton",0x4b,219,3,12,11 + EDITTEXT IDC_SESSIONINFO,134,3,83,12,ES_AUTOHSCROLL | ES_READONLY | + ES_WANTRETURN +END + +IDD_VSTCFG DIALOG DISCARDABLE 0, 0, 199, 53 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "Show ReaNINJAM Console",IDC_BUTTON1,7,7,144,14 +END + +IDD_CONNECT_OLD DIALOG DISCARDABLE 0, 0, 225, 146 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM Connection Configuration" +FONT 8, "MS Shell Dlg" +BEGIN + COMBOBOX IDC_HOST,63,14,155,186,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + EDITTEXT IDC_USER,63,32,155,12,ES_AUTOHSCROLL + CONTROL "Connect &anonymously",IDC_ANON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,64,49,85,10 + EDITTEXT IDC_PASS,63,61,155,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT + WS_VISIBLE + CONTROL "&Remember password",IDC_PASSREMEMBER,"Button", + BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,64,77,82, + 10 + DEFPUSHBUTTON "Connect",IDOK,112,92,50,14 + PUSHBUTTON "Cancel",IDCANCEL,168,92,50,14 + LTEXT "Connect to host:",IDC_STATIC,7,16,53,8 + LTEXT "Username:",IDC_STATIC,7,34,35,8 + LTEXT "Password:",IDC_PASSLBL,7,63,34,8,NOT WS_VISIBLE + LTEXT "To test, try using test.ninjam.com or test.ninjam.com:2050\r\nFor information on setting up your own server, visit http://www.ninjam.com/", + IDC_STATIC,7,112,211,27 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 2 + RIGHTMARGIN, 476 + TOPMARGIN, 2 + BOTTOMMARGIN, 214 + END + + IDD_CONNECT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 354 + TOPMARGIN, 7 + BOTTOMMARGIN, 229 END - - IDD_CONNECT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 354 - TOPMARGIN, 7 - BOTTOMMARGIN, 229 - END - - IDD_LICENSE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 309 - TOPMARGIN, 7 - BOTTOMMARGIN, 208 - END - - IDD_PREFS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 234 - TOPMARGIN, 7 - BOTTOMMARGIN, 105 - END - - IDD_LOCALCHANNEL, DIALOG - BEGIN - RIGHTMARGIN, 201 - BOTTOMMARGIN, 46 - END - - IDD_EMPTY_SCROLL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 184 - TOPMARGIN, 7 - BOTTOMMARGIN, 28 - END - - IDD_LOCALLIST, DIALOG - BEGIN - RIGHTMARGIN, 126 - BOTTOMMARGIN, 15 - END - - IDD_REMOTECHANNEL, DIALOG - BEGIN - BOTTOMMARGIN, 26 - END - - IDD_EMPTY, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 120 - TOPMARGIN, 7 - BOTTOMMARGIN, 23 - END - - IDD_REMOTEUSER, DIALOG - BEGIN - RIGHTMARGIN, 232 - BOTTOMMARGIN, 14 - END - - IDD_VSTCFG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 192 - TOPMARGIN, 7 - BOTTOMMARGIN, 46 - END - - IDD_CONNECT_OLD, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 218 - TOPMARGIN, 7 - BOTTOMMARGIN, 139 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MENU1 MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Connect...\tCtrl+O", ID_FILE_CONNECT - MENUITEM "&Disconnect\tCtrl+D", ID_FILE_DISCONNECT, GRAYED - MENUITEM SEPARATOR - MENUITEM "&Preferences...\tCtrl+P", ID_OPTIONS_PREFERENCES - END - POPUP "&Channels" - BEGIN - MENUITEM "Mute master\tCtrl+Shift+M", IDC_MASTERMUTE - MENUITEM "Mute metronome\tCtrl+M", IDC_METROMUTE - MENUITEM SEPARATOR - MENUITEM "Mute selected channel\tAlt+M", IDC_MUTE - MENUITEM "Solo selected channel\tAlt+S", IDC_SOLO - MENUITEM SEPARATOR - MENUITEM "Add local channel\tCtrl+Shift+N", IDC_ADDCH - MENUITEM "Delete selected local channel\tCtrl+Shift+D", IDC_REMOVE - MENUITEM SEPARATOR - POPUP "Select local channel" - BEGIN - MENUITEM "Channel 1\tF1", ID_LOCAL_CHANNEL_1 - MENUITEM "Channel 2\tF2", ID_LOCAL_CHANNEL_2 - MENUITEM "Channel 3\tF3", ID_LOCAL_CHANNEL_3 - MENUITEM "Channel 4\tF4", ID_LOCAL_CHANNEL_4 - MENUITEM "Channel 5\tF5", ID_LOCAL_CHANNEL_5 - MENUITEM "Channel 6\tF6", ID_LOCAL_CHANNEL_6 - MENUITEM "Channel 7\tF7", ID_LOCAL_CHANNEL_7 - MENUITEM "Channel 8\tF8", ID_LOCAL_CHANNEL_8 - MENUITEM "Channel 9\tF9", ID_LOCAL_CHANNEL_9 - MENUITEM "Channel 10\tF10", ID_LOCAL_CHANNEL_10 - END - POPUP "Select remote user" - BEGIN - MENUITEM "User 1\tShift+F1", ID_REMOTE_USER_1 - MENUITEM "User 2\tShift+F2", ID_REMOTE_USER_2 - MENUITEM "User 3\tShift+F3", ID_REMOTE_USER_3 - MENUITEM "User 4\tShift+F4", ID_REMOTE_USER_4 - MENUITEM "User 5\tShift+F5", ID_REMOTE_USER_5 - MENUITEM "User 6\tShift+F6", ID_REMOTE_USER_6 - MENUITEM "User 7\tShift+F7", ID_REMOTE_USER_7 - MENUITEM "User 8\tShift+F8", ID_REMOTE_USER_8 - MENUITEM "User 9\tShift+F9", ID_REMOTE_USER_9 - MENUITEM "User 10\tShift+F10", ID_REMOTE_USER_10 - END - POPUP "Select remote-user channel" - BEGIN - MENUITEM "Channel 1\tCtrl+Shift+F1", ID_REMOTE_USER_CHANNEL_1 - MENUITEM "Channel 2\tCtrl+Shift+F2", ID_REMOTE_USER_CHANNEL_2 - MENUITEM "Channel 3\tCtrl+Shift+F3", ID_REMOTE_USER_CHANNEL_3 - MENUITEM "Channel 4\tCtrl+Shift+F4", ID_REMOTE_USER_CHANNEL_4 - MENUITEM "Channel 5\tCtrl+Shift+F5", ID_REMOTE_USER_CHANNEL_5 - MENUITEM "Channel 6\tCtrl+Shift+F6", ID_REMOTE_USER_CHANNEL_6 - MENUITEM "Channel 7\tCtrl+Shift+F7", ID_REMOTE_USER_CHANNEL_7 - MENUITEM "Channel 8\tCtrl+Shift+F8", ID_REMOTE_USER_CHANNEL_8 - MENUITEM "Channel 9\tCtrl+Shift+F9", ID_REMOTE_USER_CHANNEL_9 - MENUITEM "Channel 10\tCtrl+Shift+F10", ID_REMOTE_USER_CHANNEL_10 - END - MENUITEM SEPARATOR - MENUITEM "Route local channels to VST output 3/4", ID_LOCAL_CH34 - MENUITEM "Route metronome to VST output 5", ID_METRONOME_CH5 - END - POPUP "S&ync" - BEGIN - MENUITEM "Start REAPER playback on next loop", IDC_SYNCATLOOP - MENUITEM SEPARATOR - MENUITEM "Set project tempo and loop at project start", IDC_MATCHBPM_SETLOOP - MENUITEM "Set project tempo", IDC_SETBPM - MENUITEM "Set loop at edit cursor", IDC_SETLOOP - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - + + IDD_LICENSE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 309 + TOPMARGIN, 7 + BOTTOMMARGIN, 208 + END + + IDD_PREFS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 234 + TOPMARGIN, 7 + BOTTOMMARGIN, 105 + END + + IDD_LOCALCHANNEL, DIALOG + BEGIN + RIGHTMARGIN, 201 + BOTTOMMARGIN, 46 + END + + IDD_EMPTY_SCROLL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 184 + TOPMARGIN, 7 + BOTTOMMARGIN, 28 + END + + IDD_LOCALLIST, DIALOG + BEGIN + RIGHTMARGIN, 126 + BOTTOMMARGIN, 15 + END + + IDD_REMOTECHANNEL, DIALOG + BEGIN + BOTTOMMARGIN, 26 + END + + IDD_EMPTY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 120 + TOPMARGIN, 7 + BOTTOMMARGIN, 23 + END + + IDD_REMOTEUSER, DIALOG + BEGIN + RIGHTMARGIN, 232 + BOTTOMMARGIN, 14 + END + + IDD_VSTCFG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 192 + TOPMARGIN, 7 + BOTTOMMARGIN, 46 + END + + IDD_CONNECT_OLD, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 218 + TOPMARGIN, 7 + BOTTOMMARGIN, 139 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU1 MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Connect...\tCtrl+O", ID_FILE_CONNECT + MENUITEM "&Disconnect\tCtrl+D", ID_FILE_DISCONNECT, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Preferences...\tCtrl+P", ID_OPTIONS_PREFERENCES + END + POPUP "&Channels" + BEGIN + MENUITEM "Mute master\tCtrl+Shift+M", IDC_MASTERMUTE + MENUITEM "Mute metronome\tCtrl+M", IDC_METROMUTE + MENUITEM SEPARATOR + MENUITEM "Mute selected channel\tAlt+M", IDC_MUTE + MENUITEM "Solo selected channel\tAlt+S", IDC_SOLO + MENUITEM SEPARATOR + MENUITEM "Add local channel\tCtrl+Shift+N", IDC_ADDCH + MENUITEM "Delete selected local channel\tCtrl+Shift+D", IDC_REMOVE + MENUITEM SEPARATOR + POPUP "Select local channel" + BEGIN + MENUITEM "Channel 1\tF1", ID_LOCAL_CHANNEL_1 + MENUITEM "Channel 2\tF2", ID_LOCAL_CHANNEL_2 + MENUITEM "Channel 3\tF3", ID_LOCAL_CHANNEL_3 + MENUITEM "Channel 4\tF4", ID_LOCAL_CHANNEL_4 + MENUITEM "Channel 5\tF5", ID_LOCAL_CHANNEL_5 + MENUITEM "Channel 6\tF6", ID_LOCAL_CHANNEL_6 + MENUITEM "Channel 7\tF7", ID_LOCAL_CHANNEL_7 + MENUITEM "Channel 8\tF8", ID_LOCAL_CHANNEL_8 + MENUITEM "Channel 9\tF9", ID_LOCAL_CHANNEL_9 + MENUITEM "Channel 10\tF10", ID_LOCAL_CHANNEL_10 + END + POPUP "Select remote user" + BEGIN + MENUITEM "User 1\tShift+F1", ID_REMOTE_USER_1 + MENUITEM "User 2\tShift+F2", ID_REMOTE_USER_2 + MENUITEM "User 3\tShift+F3", ID_REMOTE_USER_3 + MENUITEM "User 4\tShift+F4", ID_REMOTE_USER_4 + MENUITEM "User 5\tShift+F5", ID_REMOTE_USER_5 + MENUITEM "User 6\tShift+F6", ID_REMOTE_USER_6 + MENUITEM "User 7\tShift+F7", ID_REMOTE_USER_7 + MENUITEM "User 8\tShift+F8", ID_REMOTE_USER_8 + MENUITEM "User 9\tShift+F9", ID_REMOTE_USER_9 + MENUITEM "User 10\tShift+F10", ID_REMOTE_USER_10 + END + POPUP "Select remote-user channel" + BEGIN + MENUITEM "Channel 1\tCtrl+Shift+F1", ID_REMOTE_USER_CHANNEL_1 + MENUITEM "Channel 2\tCtrl+Shift+F2", ID_REMOTE_USER_CHANNEL_2 + MENUITEM "Channel 3\tCtrl+Shift+F3", ID_REMOTE_USER_CHANNEL_3 + MENUITEM "Channel 4\tCtrl+Shift+F4", ID_REMOTE_USER_CHANNEL_4 + MENUITEM "Channel 5\tCtrl+Shift+F5", ID_REMOTE_USER_CHANNEL_5 + MENUITEM "Channel 6\tCtrl+Shift+F6", ID_REMOTE_USER_CHANNEL_6 + MENUITEM "Channel 7\tCtrl+Shift+F7", ID_REMOTE_USER_CHANNEL_7 + MENUITEM "Channel 8\tCtrl+Shift+F8", ID_REMOTE_USER_CHANNEL_8 + MENUITEM "Channel 9\tCtrl+Shift+F9", ID_REMOTE_USER_CHANNEL_9 + MENUITEM "Channel 10\tCtrl+Shift+F10", ID_REMOTE_USER_CHANNEL_10 + END + MENUITEM SEPARATOR + MENUITEM "Route local channels to VST output 3/4", ID_LOCAL_CH34 + MENUITEM "Route metronome to VST output 5", ID_METRONOME_CH5 + END + POPUP "S&ync" + BEGIN + MENUITEM "Start REAPER playback on next loop", IDC_SYNCATLOOP + MENUITEM SEPARATOR + MENUITEM "Set project tempo and loop at project start", IDC_MATCHBPM_SETLOOP + MENUITEM "Set project tempo", IDC_SETBPM + MENUITEM "Set loop at edit cursor", IDC_SETLOOP + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ninjam/cmdclient--old/cmdclientres.rc b/ninjam/cmdclient--old/cmdclientres.rc index 6ae154ba..642c58ac 100644 --- a/ninjam/cmdclient--old/cmdclientres.rc +++ b/ninjam/cmdclient--old/cmdclientres.rc @@ -1,131 +1,131 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ninjam Commandline Client audio I/O configuration" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,159,50,14 - PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 - LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 - COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, - 238,129 -END - -IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 - RTEXT "Input ----====|",IDC_STATIC,0,31,50,8 - RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 - RTEXT "left",IDC_STATIC,30,23,26,8 - RTEXT "right",IDC_STATIC,30,42,26,8 - RTEXT "left",IDC_STATIC,30,63,26,8 - RTEXT "right",IDC_STATIC,30,82,26,8 - PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_CONFIG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 245 - TOPMARGIN, 7 - BOTTOMMARGIN, 173 - END - - IDD_CFG_ASIO, DIALOG - BEGIN - BOTTOMMARGIN, 128 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Ninjam Commandline Client audio I/O configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,7,159,50,14 + PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 + LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 + COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, + 238,129 +END + +IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 + RTEXT "Input ----====|",IDC_STATIC,0,31,50,8 + RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 + RTEXT "left",IDC_STATIC,30,23,26,8 + RTEXT "right",IDC_STATIC,30,42,26,8 + RTEXT "left",IDC_STATIC,30,63,26,8 + RTEXT "right",IDC_STATIC,30,82,26,8 + PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CONFIG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 245 + TOPMARGIN, 7 + BOTTOMMARGIN, 173 + END + + IDD_CFG_ASIO, DIALOG + BEGIN + BOTTOMMARGIN, 128 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ninjam/cursesclient/cursesclientres.rc b/ninjam/cursesclient/cursesclientres.rc index 0e578aed..10396c20 100644 --- a/ninjam/cursesclient/cursesclientres.rc +++ b/ninjam/cursesclient/cursesclientres.rc @@ -1,187 +1,187 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM audio I/O configuration" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,159,50,14 - PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 - LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 - COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, - 238,129 -END - -IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 - RTEXT "Input range",IDC_STATIC,0,31,50,8 - RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 - RTEXT "first",IDC_STATIC,30,23,26,8 - RTEXT "last",IDC_STATIC,30,42,26,8 - RTEXT "left",IDC_STATIC,30,63,26,8 - RTEXT "right",IDC_STATIC,30,82,26,8 - PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 -END - -IDD_CFG_KS DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,61,49,33,10 - CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,49, - 33,10 - CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,49, - 33,10 - EDITTEXT IDC_EDIT1,61,63,40,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT2,60,80,20,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT3,90,80,32,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "",IDC_LATENCYINFO,153,82,80,8 - RTEXT "Input Device:",-1,1,3,55,8 - RTEXT "Sample Format:",-1,1,49,55,8 - RTEXT "Samplerate:",-1,1,65,55,8 - LTEXT "hz",-1,104,66,8,8 - RTEXT "Buffers:",-1,1,82,55,8 - LTEXT "x",-1,82,83,8,8 - LTEXT "bytes",-1,123,83,18,8 - RTEXT "Output Device:",-1,1,19,55,8 -END - -IDD_CFG_WAVEOUT DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,61,34,33,10 - CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,34, - 33,10 - CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,34, - 33,10 - EDITTEXT IDC_EDIT1,61,48,40,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT2,60,65,20,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT3,90,65,32,12,ES_AUTOHSCROLL | ES_NUMBER - RTEXT "Input Device:",-1,1,3,55,8 - RTEXT "Sample Format:",-1,1,34,55,8 - RTEXT "Samplerate:",-1,1,50,55,8 - LTEXT "hz",-1,104,51,8,8 - RTEXT "Buffers:",-1,1,67,55,8 - LTEXT "x",-1,82,68,8,8 - LTEXT "bytes",-1,123,68,18,8 - LTEXT "",IDC_LATENCYINFO,153,68,80,8 - RTEXT "Output Device:",-1,1,19,55,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_CONFIG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 245 - TOPMARGIN, 7 - BOTTOMMARGIN, 173 - END - - IDD_CFG_ASIO, DIALOG - BEGIN - BOTTOMMARGIN, 128 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM audio I/O configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,7,159,50,14 + PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 + LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 + COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, + 238,129 +END + +IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 + RTEXT "Input range",IDC_STATIC,0,31,50,8 + RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 + RTEXT "first",IDC_STATIC,30,23,26,8 + RTEXT "last",IDC_STATIC,30,42,26,8 + RTEXT "left",IDC_STATIC,30,63,26,8 + RTEXT "right",IDC_STATIC,30,82,26,8 + PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 +END + +IDD_CFG_KS DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,61,49,33,10 + CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,49, + 33,10 + CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,49, + 33,10 + EDITTEXT IDC_EDIT1,61,63,40,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT2,60,80,20,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT3,90,80,32,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "",IDC_LATENCYINFO,153,82,80,8 + RTEXT "Input Device:",-1,1,3,55,8 + RTEXT "Sample Format:",-1,1,49,55,8 + RTEXT "Samplerate:",-1,1,65,55,8 + LTEXT "hz",-1,104,66,8,8 + RTEXT "Buffers:",-1,1,82,55,8 + LTEXT "x",-1,82,83,8,8 + LTEXT "bytes",-1,123,83,18,8 + RTEXT "Output Device:",-1,1,19,55,8 +END + +IDD_CFG_WAVEOUT DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,61,34,33,10 + CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,34, + 33,10 + CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,34, + 33,10 + EDITTEXT IDC_EDIT1,61,48,40,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT2,60,65,20,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT3,90,65,32,12,ES_AUTOHSCROLL | ES_NUMBER + RTEXT "Input Device:",-1,1,3,55,8 + RTEXT "Sample Format:",-1,1,34,55,8 + RTEXT "Samplerate:",-1,1,50,55,8 + LTEXT "hz",-1,104,51,8,8 + RTEXT "Buffers:",-1,1,67,55,8 + LTEXT "x",-1,82,68,8,8 + LTEXT "bytes",-1,123,68,18,8 + LTEXT "",IDC_LATENCYINFO,153,68,80,8 + RTEXT "Output Device:",-1,1,19,55,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CONFIG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 245 + TOPMARGIN, 7 + BOTTOMMARGIN, 173 + END + + IDD_CFG_ASIO, DIALOG + BEGIN + BOTTOMMARGIN, 128 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ninjam/guiclient/ninjam.rc b/ninjam/guiclient/ninjam.rc index 9e6fe847..966cb15a 100644 --- a/ninjam/guiclient/ninjam.rc +++ b/ninjam/guiclient/ninjam.rc @@ -1,655 +1,655 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_PANEL_CHANNEL DIALOGEX 0, 0, 420, 32 -STYLE WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE - CONTROL "Slider2",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE - EDITTEXT IDC_CHANNEL_USER,0,2,70,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_BORDER,WS_EX_STATICEDGE - CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,2,29,11 - CONTROL "solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,15,29,11 - EDITTEXT IDC_CHANNEL_NAME,88,2,83,12,ES_AUTOHSCROLL | ES_READONLY - RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY - CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | - SS_CENTERIMAGE - CONTROL "receive",IDC_SUBSCRIBE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,2,16,40,10 - CTEXT "00",IDC_CHANNEL_ID,72,2,13,12,SS_CENTERIMAGE, - WS_EX_STATICEDGE - CONTROL "Progress1",IDC_VUMETER,"msctls_progress32",PBS_SMOOTH, - 45,18,119,6 - CONTROL "Progress1",IDC_VUCLIP,"msctls_progress32",PBS_SMOOTH, - 165,18,6,6 - CTEXT "xx dB",IDC_VUTEXT,45,24,126,8,SS_CENTERIMAGE -END - -IDD_PANEL_GROUP DIALOG DISCARDABLE 0, 0, 312, 143 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - GROUPBOX "James R. Jamerson",IDC_GROUPBOX,0,0,311,142 - CTEXT "channel list here",IDC_STATIC,1,9,308,117, - SS_CENTERIMAGE | SS_SUNKEN - PUSHBUTTON "solo",IDC_PANEL_SOLO,267,126,17,14 - PUSHBUTTON "mute",IDC_PANEL_MUTE,286,126,23,14 - CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | - TBS_NOTICKS | WS_TABSTOP,23,127,56,14 - CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH | - TBS_NOTICKS | WS_TABSTOP,79,127,100,15 - PUSHBUTTON "+",IDC_BUTTON4,0,127,18,14 -END - -IDD_PANEL_LOCALCHANNEL DIALOGEX 0, 0, 516, 32 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_CHANNEL_NAME,0,1,51,12,ES_AUTOHSCROLL - CONTROL "transmit",IDC_BROADCAST,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,2,16,40,10 - CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE - CONTROL "Slider2",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE - CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | - SS_CENTERIMAGE - CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,2,29,11 - CONTROL "solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,15,29,11 - RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY - CONTROL "FX",IDC_FX,"Button",BS_AUTOCHECKBOX | BS_CENTER | - WS_TABSTOP,119,2,21,12 - PUSHBUTTON "edit fx...",IDC_EDIT_FX,142,2,30,12 - CTEXT "",IDC_LOCAL_SRCCHAN,346,2,8,8,SS_CENTERIMAGE | NOT - WS_VISIBLE - CTEXT "oo",IDC_LOCAL_CHID,105,1,13,12,SS_CENTERIMAGE, - WS_EX_STATICEDGE - CONTROL "Progress1",IDC_VUMETER,"msctls_progress32",PBS_SMOOTH, - 45,18,119,6 - CONTROL "Progress1",IDC_VUCLIP,"msctls_progress32",PBS_SMOOTH, - 165,18,6,6 - CTEXT "xx dB",IDC_VUTEXT,45,24,126,8,SS_CENTERIMAGE - LTEXT "src chan",IDC_SRCCHAN,52,1,51,12,SS_CENTERIMAGE, - WS_EX_STATICEDGE - CONTROL "Master MIDI Clock",IDC_MIDICLOCK_ENABLE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,423,3,87,10 - PUSHBUTTON "Start",IDC_MIDICLOCK_START,424,15,34,11 - PUSHBUTTON "Stop",IDC_MIDICLOCK_STOP,462,15,34,11 -END - -IDD_PANEL_MASTER DIALOGEX 0, 0, 420, 32 -STYLE WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "Slider1",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE - LTEXT "Master",IDC_STATIC,1,1,25,8 - CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE - RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY - CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | - SS_CENTERIMAGE - CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,2,29,11 - CONTROL "Progress1",IDC_VUMETER,"msctls_progress32",PBS_SMOOTH, - 45,18,119,6 - CONTROL "Progress1",IDC_VUCLIP,"msctls_progress32",PBS_SMOOTH, - 165,18,6,6 - CTEXT "xx dB",IDC_VUTEXT,45,24,126,8,SS_CENTERIMAGE - RTEXT "Static",IDC_SESSION_POS,1,16,42,10,SS_CENTERIMAGE, - WS_EX_STATICEDGE - CONTROL "Audio enabled",IDC_AUDIOENABLE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,46,3,61,11 - PUSHBUTTON "Configure audio",IDC_CONFIGUREAUDIO,117,3,54,11 -END - -IDD_SERVER DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE WS_POPUP -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "server",IDC_STATIC,15,11,20,8 - LTEXT "bpm",IDC_STATIC,17,30,14,8 - LTEXT "bpi",IDC_STATIC,19,42,10,8 -END - -IDD_USERPASS DIALOG DISCARDABLE 0, 0, 193, 137 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Log in to Ninjam server" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,136,116,50,14 - PUSHBUTTON "Cancel",IDCANCEL,77,116,50,14 - EDITTEXT IDC_USERNAME,50,37,67,14,ES_AUTOHSCROLL - EDITTEXT IDC_PASSWD,50,76,67,14,ES_PASSWORD | ES_AUTOHSCROLL - RTEXT "Username:",IDC_STATIC,7,37,39,14,SS_CENTERIMAGE - RTEXT "Password:",IDC_STATIC,7,76,39,14,SS_CENTERIMAGE - RTEXT "Server:",IDC_STATIC,7,7,39,14,SS_CENTERIMAGE - CONTROL "Remember my password",IDC_REMEMBER_PASSWD,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,50,93,93,10 - CONTROL "Connect anonymously",IDC_ANONYMOUS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,63,85,10 - COMBOBOX IDC_SERVER,50,7,136,123,CBS_DROPDOWN | WS_VSCROLL | - WS_TABSTOP -END - -IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM audio I/O configuration" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,159,50,14 - PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 - LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 - COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, - 238,129 - CONTROL "Show this dialog at program startup",IDC_SHOWATSTART, - "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP, - 120,162,126,10 -END - -IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE DS_NOFAILCREATE | DS_CENTER | WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 - RTEXT "Input range",IDC_STATIC,0,31,50,8 - RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 - RTEXT "first",IDC_STATIC,30,23,26,8 - RTEXT "last",IDC_STATIC,30,42,26,8 - RTEXT "left",IDC_STATIC,30,63,26,8 - RTEXT "right",IDC_STATIC,30,82,26,8 - PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 -END - -IDD_CFG_KS DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,61,49,33,10 - CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,49, - 33,10 - CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,49, - 33,10 - EDITTEXT IDC_EDIT1,61,63,40,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT2,60,80,20,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT3,90,80,32,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "",IDC_LATENCYINFO,153,82,80,8 - RTEXT "Input Device:",-1,1,3,55,8 - RTEXT "Sample Format:",-1,1,49,55,8 - RTEXT "Samplerate:",-1,1,65,55,8 - LTEXT "hz",-1,104,66,8,8 - RTEXT "Buffers:",-1,1,82,55,8 - LTEXT "x",-1,82,83,8,8 - LTEXT "bytes",-1,123,83,18,8 - RTEXT "Output Device:",-1,1,19,55,8 -END - -IDD_CFG_WAVEOUT DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,61,34,33,10 - CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,34, - 33,10 - CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,34, - 33,10 - EDITTEXT IDC_EDIT1,61,48,40,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT2,60,65,20,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT3,90,65,32,12,ES_AUTOHSCROLL | ES_NUMBER - RTEXT "Input Device:",-1,1,3,55,8 - RTEXT "Sample Format:",-1,1,34,55,8 - RTEXT "Samplerate:",-1,1,50,55,8 - LTEXT "hz",-1,104,51,8,8 - RTEXT "Buffers:",-1,1,67,55,8 - LTEXT "x",-1,82,68,8,8 - LTEXT "bytes",-1,123,68,18,8 - LTEXT "",IDC_LATENCYINFO,153,68,80,8 - RTEXT "Output Device:",-1,1,19,55,8 -END - -IDD_PANEL_METRONOME DIALOGEX 0, 0, 420, 27 -STYLE WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "Slider1",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE - CONTROL "Slider2",IDC_PAN,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE - LTEXT "Metronome",IDC_STATIC,1,1,36,8 - RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY - CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | - SS_CENTERIMAGE - CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,2,29,11 -END - -IDD_PANEL_SWEEP DIALOG DISCARDABLE 0, 0, 349, 6 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "Progress1",IDC_SWEEP,"msctls_progress32",WS_BORDER,0,0, - 349,6 -END - -IDD_CONFIG_MAIN DIALOG DISCARDABLE 0, 0, 383, 237 -STYLE DS_MODALFRAME | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "NINJAM settings" -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "Record multitrack interval files and log (for remixing)", - IDC_WRITE_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14, - 137,177,10 - CONTROL "Record continuous WAV file",IDC_WRITE_WAV,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,118,105,10 - GROUPBOX "Session recording",IDC_STATIC,7,7,369,148 - GROUPBOX "Jesusonic integration",IDC_STATIC,7,159,369,43 - EDITTEXT IDC_JESUSDIR,86,175,187,14,ES_AUTOHSCROLL - LTEXT "Path to Jesusonic dir\n(restart after changing)", - IDC_STATIC,13,176,72,23 - PUSHBUTTON "Browse...",IDC_JS_BROWSE,276,175,50,14 - EDITTEXT IDC_SESSIONDIR,91,18,190,14,ES_AUTOHSCROLL - LTEXT "Main session directory\n(blank for default)",IDC_STATIC, - 13,17,69,18 - LTEXT "Select one or more recording formats:",IDC_STATIC,14,78, - 118,8 - PUSHBUTTON "Browse...",IDC_SESSIONDIR_BROWSE,284,18,50,14 - CONTROL "Record continuous OGG file",IDC_WRITE_OGG,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,87,105,10 - LTEXT "OGG file bitrate (64-256)",IDC_STATIC,26,98,79,12, - SS_CENTERIMAGE - EDITTEXT IDC_OGG_BITRATE,107,98,28,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EXAMPLEDIR,91,58,190,14,ES_AUTOHSCROLL | ES_READONLY - EDITTEXT IDC_SESSION_FORMAT,91,37,190,14,ES_AUTOHSCROLL - LTEXT "Session directory naming format string",IDC_STATIC,14, - 39,74,16 - LTEXT "Example session dir name",IDC_STATIC,15,57,76,16 - DEFPUSHBUTTON "Close",IDOK,326,216,50,14 -END - -IDD_PANEL_JESUS DIALOGEX 0, 0, 420, 27 -STYLE WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE - CONTROL "Slider2",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | - WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE - CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,2,29,11 - CONTROL "solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 389,15,29,11 - RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY - CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | - SS_CENTERIMAGE - CONTROL "",IDC_BROADCAST,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | - WS_TABSTOP,0,4,8,18 - LTEXT "JesuSonic",IDC_STATIC,20,9,34,8 -END - -IDD_SERVER_LICENSE DIALOGEX 0, 0, 370, 191 -STYLE DS_MODALFRAME | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_CAPTION -CAPTION "Server license agreement" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "I agree to these terms for my contribution", - IDC_SERVER_LICENSE_AGREE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,199,158,164,10 - DEFPUSHBUTTON "Continue>>",IDOK,302,170,61,14,0,WS_EX_STATICEDGE - PUSHBUTTON "I disagree, disconnect me",IDCANCEL,200,170,97,14 - EDITTEXT IDC_SERVER_LICENSE_TEXT,7,20,356,135,ES_MULTILINE | - ES_READONLY | WS_VSCROLL - LTEXT "The server has requested that you agree to the following license for your contributed audio in order to connect.", - IDC_STATIC,7,7,350,8 -END - -IDD_CHAT DIALOG DISCARDABLE 0, 0, 336, 138 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_CHAT_ENTRY,0,124,335,14,ES_AUTOHSCROLL - EDITTEXT IDC_CHAT_DISP,0,13,335,109,ES_MULTILINE | ES_READONLY | - WS_VSCROLL - DEFPUSHBUTTON "Button1",IDC_CHAT_ENTER,19,123,10,6,NOT WS_VISIBLE - LTEXT "Chat",IDC_CHAT_TOPIC,2,2,331,8 -END - -IDD_CLOSESESSION DIALOGEX 0, 0, 337, 170 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION -CAPTION "End of session" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "Done",IDOK,280,148,50,14 - EDITTEXT IDC_SESSION_NAME,66,14,264,14,ES_AUTOHSCROLL - LTEXT "Rename session",IDC_STATIC,7,16,53,8 - LTEXT "Session length",IDC_STATIC,7,44,47,8 - EDITTEXT IDC_SESSION_LEN,66,44,58,12,ES_CENTER | ES_AUTOHSCROLL | - ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE - EDITTEXT IDC_EDIT1,66,68,197,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_BORDER,WS_EX_STATICEDGE - PUSHBUTTON "Delete WAV",IDC_DELWAV,273,68,57,12 - EDITTEXT IDC_EDIT4,66,87,197,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_BORDER,WS_EX_STATICEDGE - PUSHBUTTON "Delete multitrack",IDC_DELMULTI,273,87,57,12 - EDITTEXT IDC_EDIT5,66,105,197,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_BORDER,WS_EX_STATICEDGE - PUSHBUTTON "Delete OGG",IDC_DELOGG,273,105,57,12 - LTEXT "Recorded files",IDC_STATIC,7,68,46,8 - PUSHBUTTON "Open session folder",IDC_BUTTON4,248,28,82,14 -END - -IDD_PANEL_CHAN_SEPARATOR DIALOGEX 0, 0, 264, 12 -STYLE WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Remote channels",IDC_SEPTEXT,0,0,264,11,SS_CENTERIMAGE, - WS_EX_DLGMODALFRAME -END - -IDD_PANEL_LOCAL_SEPARATOR DIALOGEX 0, 0, 264, 12 -STYLE WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Local channels",IDC_SEPTEXT,0,0,264,11,0, - WS_EX_DLGMODALFRAME -END - -IDD_ABOUT DIALOG DISCARDABLE 0, 0, 252, 135 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About NINJAM advanced supaclient" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,195,114,50,14 - CTEXT "NINJAM is a program for making music across the Internet. Yay!", - IDC_STATIC,7,31,238,26 - ICON IDI_NINJAM,IDC_STATIC,7,7,20,20 - CTEXT "Copyright 2005 Brennan Underwood",IDC_STATIC,7,81,238, - 18 - CTEXT "Static",IDC_VERSION_TEXT,7,60,238,14 -END - -IDD_PANEL_AUDIO DIALOG DISCARDABLE 0, 0, 420, 32 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Session controls",IDC_STATIC,2,1,61,8 - CONTROL "Record WAV file",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,72,4,69,10 - CONTROL "Record OGG File",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,147,4,70,10 - CONTROL "Record multitrack",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,224,4,71,10 - DEFPUSHBUTTON "Save and open new session",IDC_BUTTON1,312,16,105,14 - LTEXT "Static",IDC_STATIC,161,17,57,8 -END - -IDD_MIDICLOCK_DEVICE DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Select MIDI Output" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,74,50,14 - PUSHBUTTON "Cancel",IDCANCEL,74,74,50,14 - LISTBOX IDC_MIDIOUT_LIST,7,7,172,61,LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_PANEL_CHANNEL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 402 - TOPMARGIN, 7 - BOTTOMMARGIN, 18 - END - - IDD_PANEL_GROUP, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 305 - TOPMARGIN, 7 - BOTTOMMARGIN, 136 - END - - IDD_PANEL_LOCALCHANNEL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 369 - TOPMARGIN, 7 - BOTTOMMARGIN, 12 - END - - IDD_PANEL_MASTER, DIALOG - BEGIN - LEFTMARGIN, 7 - TOPMARGIN, 7 - BOTTOMMARGIN, 13 - END - - IDD_SERVER, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 88 - END - - IDD_USERPASS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 186 - TOPMARGIN, 7 - BOTTOMMARGIN, 130 - END - - IDD_CFG_ASIO, DIALOG - BEGIN - BOTTOMMARGIN, 128 - END - - IDD_PANEL_METRONOME, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 326 - TOPMARGIN, 6 - BOTTOMMARGIN, 17 - END - - IDD_PANEL_SWEEP, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 342 - END - - IDD_CONFIG_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 376 - TOPMARGIN, 7 - BOTTOMMARGIN, 230 - END - - IDD_PANEL_JESUS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - END - - IDD_SERVER_LICENSE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 363 - TOPMARGIN, 7 - BOTTOMMARGIN, 184 - END - - IDD_CHAT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 329 - TOPMARGIN, 7 - BOTTOMMARGIN, 131 - END - - IDD_CLOSESESSION, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 330 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END - - IDD_PANEL_CHAN_SEPARATOR, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 257 - BOTTOMMARGIN, 7 - END - - IDD_PANEL_LOCAL_SEPARATOR, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 1 - END - - IDD_ABOUT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 245 - TOPMARGIN, 7 - BOTTOMMARGIN, 128 - END - - IDD_PANEL_AUDIO, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - END - - IDD_MIDICLOCK_DEVICE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 88 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_NINJAM ICON DISCARDABLE "icon1.ico" -IDI_ICON1 ICON DISCARDABLE "ninjam_gui_win.ico" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_PANEL_CHANNEL DIALOGEX 0, 0, 420, 32 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE + CONTROL "Slider2",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE + EDITTEXT IDC_CHANNEL_USER,0,2,70,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_BORDER,WS_EX_STATICEDGE + CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,2,29,11 + CONTROL "solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,15,29,11 + EDITTEXT IDC_CHANNEL_NAME,88,2,83,12,ES_AUTOHSCROLL | ES_READONLY + RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY + CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | + SS_CENTERIMAGE + CONTROL "receive",IDC_SUBSCRIBE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,2,16,40,10 + CTEXT "00",IDC_CHANNEL_ID,72,2,13,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + CONTROL "Progress1",IDC_VUMETER,"msctls_progress32",PBS_SMOOTH, + 45,18,119,6 + CONTROL "Progress1",IDC_VUCLIP,"msctls_progress32",PBS_SMOOTH, + 165,18,6,6 + CTEXT "xx dB",IDC_VUTEXT,45,24,126,8,SS_CENTERIMAGE +END + +IDD_PANEL_GROUP DIALOG DISCARDABLE 0, 0, 312, 143 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "James R. Jamerson",IDC_GROUPBOX,0,0,311,142 + CTEXT "channel list here",IDC_STATIC,1,9,308,117, + SS_CENTERIMAGE | SS_SUNKEN + PUSHBUTTON "solo",IDC_PANEL_SOLO,267,126,17,14 + PUSHBUTTON "mute",IDC_PANEL_MUTE,286,126,23,14 + CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,23,127,56,14 + CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,79,127,100,15 + PUSHBUTTON "+",IDC_BUTTON4,0,127,18,14 +END + +IDD_PANEL_LOCALCHANNEL DIALOGEX 0, 0, 516, 32 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_CHANNEL_NAME,0,1,51,12,ES_AUTOHSCROLL + CONTROL "transmit",IDC_BROADCAST,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,2,16,40,10 + CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE + CONTROL "Slider2",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE + CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | + SS_CENTERIMAGE + CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,2,29,11 + CONTROL "solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,15,29,11 + RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY + CONTROL "FX",IDC_FX,"Button",BS_AUTOCHECKBOX | BS_CENTER | + WS_TABSTOP,119,2,21,12 + PUSHBUTTON "edit fx...",IDC_EDIT_FX,142,2,30,12 + CTEXT "",IDC_LOCAL_SRCCHAN,346,2,8,8,SS_CENTERIMAGE | NOT + WS_VISIBLE + CTEXT "oo",IDC_LOCAL_CHID,105,1,13,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + CONTROL "Progress1",IDC_VUMETER,"msctls_progress32",PBS_SMOOTH, + 45,18,119,6 + CONTROL "Progress1",IDC_VUCLIP,"msctls_progress32",PBS_SMOOTH, + 165,18,6,6 + CTEXT "xx dB",IDC_VUTEXT,45,24,126,8,SS_CENTERIMAGE + LTEXT "src chan",IDC_SRCCHAN,52,1,51,12,SS_CENTERIMAGE, + WS_EX_STATICEDGE + CONTROL "Master MIDI Clock",IDC_MIDICLOCK_ENABLE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,423,3,87,10 + PUSHBUTTON "Start",IDC_MIDICLOCK_START,424,15,34,11 + PUSHBUTTON "Stop",IDC_MIDICLOCK_STOP,462,15,34,11 +END + +IDD_PANEL_MASTER DIALOGEX 0, 0, 420, 32 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Slider1",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE + LTEXT "Master",IDC_STATIC,1,1,25,8 + CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE + RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY + CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | + SS_CENTERIMAGE + CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,2,29,11 + CONTROL "Progress1",IDC_VUMETER,"msctls_progress32",PBS_SMOOTH, + 45,18,119,6 + CONTROL "Progress1",IDC_VUCLIP,"msctls_progress32",PBS_SMOOTH, + 165,18,6,6 + CTEXT "xx dB",IDC_VUTEXT,45,24,126,8,SS_CENTERIMAGE + RTEXT "Static",IDC_SESSION_POS,1,16,42,10,SS_CENTERIMAGE, + WS_EX_STATICEDGE + CONTROL "Audio enabled",IDC_AUDIOENABLE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,46,3,61,11 + PUSHBUTTON "Configure audio",IDC_CONFIGUREAUDIO,117,3,54,11 +END + +IDD_SERVER DIALOG DISCARDABLE 0, 0, 186, 95 +STYLE WS_POPUP +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "server",IDC_STATIC,15,11,20,8 + LTEXT "bpm",IDC_STATIC,17,30,14,8 + LTEXT "bpi",IDC_STATIC,19,42,10,8 +END + +IDD_USERPASS DIALOG DISCARDABLE 0, 0, 193, 137 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Log in to Ninjam server" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,136,116,50,14 + PUSHBUTTON "Cancel",IDCANCEL,77,116,50,14 + EDITTEXT IDC_USERNAME,50,37,67,14,ES_AUTOHSCROLL + EDITTEXT IDC_PASSWD,50,76,67,14,ES_PASSWORD | ES_AUTOHSCROLL + RTEXT "Username:",IDC_STATIC,7,37,39,14,SS_CENTERIMAGE + RTEXT "Password:",IDC_STATIC,7,76,39,14,SS_CENTERIMAGE + RTEXT "Server:",IDC_STATIC,7,7,39,14,SS_CENTERIMAGE + CONTROL "Remember my password",IDC_REMEMBER_PASSWD,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,50,93,93,10 + CONTROL "Connect anonymously",IDC_ANONYMOUS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,63,85,10 + COMBOBOX IDC_SERVER,50,7,136,123,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP +END + +IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM audio I/O configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,7,159,50,14 + PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 + LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 + COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, + 238,129 + CONTROL "Show this dialog at program startup",IDC_SHOWATSTART, + "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP, + 120,162,126,10 +END + +IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE DS_NOFAILCREATE | DS_CENTER | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 + RTEXT "Input range",IDC_STATIC,0,31,50,8 + RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 + RTEXT "first",IDC_STATIC,30,23,26,8 + RTEXT "last",IDC_STATIC,30,42,26,8 + RTEXT "left",IDC_STATIC,30,63,26,8 + RTEXT "right",IDC_STATIC,30,82,26,8 + PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 +END + +IDD_CFG_KS DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,61,49,33,10 + CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,49, + 33,10 + CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,49, + 33,10 + EDITTEXT IDC_EDIT1,61,63,40,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT2,60,80,20,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT3,90,80,32,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "",IDC_LATENCYINFO,153,82,80,8 + RTEXT "Input Device:",-1,1,3,55,8 + RTEXT "Sample Format:",-1,1,49,55,8 + RTEXT "Samplerate:",-1,1,65,55,8 + LTEXT "hz",-1,104,66,8,8 + RTEXT "Buffers:",-1,1,82,55,8 + LTEXT "x",-1,82,83,8,8 + LTEXT "bytes",-1,123,83,18,8 + RTEXT "Output Device:",-1,1,19,55,8 +END + +IDD_CFG_WAVEOUT DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,61,34,33,10 + CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,34, + 33,10 + CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,34, + 33,10 + EDITTEXT IDC_EDIT1,61,48,40,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT2,60,65,20,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT3,90,65,32,12,ES_AUTOHSCROLL | ES_NUMBER + RTEXT "Input Device:",-1,1,3,55,8 + RTEXT "Sample Format:",-1,1,34,55,8 + RTEXT "Samplerate:",-1,1,50,55,8 + LTEXT "hz",-1,104,51,8,8 + RTEXT "Buffers:",-1,1,67,55,8 + LTEXT "x",-1,82,68,8,8 + LTEXT "bytes",-1,123,68,18,8 + LTEXT "",IDC_LATENCYINFO,153,68,80,8 + RTEXT "Output Device:",-1,1,19,55,8 +END + +IDD_PANEL_METRONOME DIALOGEX 0, 0, 420, 27 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Slider1",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE + CONTROL "Slider2",IDC_PAN,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE + LTEXT "Metronome",IDC_STATIC,1,1,36,8 + RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY + CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | + SS_CENTERIMAGE + CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,2,29,11 +END + +IDD_PANEL_SWEEP DIALOG DISCARDABLE 0, 0, 349, 6 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Progress1",IDC_SWEEP,"msctls_progress32",WS_BORDER,0,0, + 349,6 +END + +IDD_CONFIG_MAIN DIALOG DISCARDABLE 0, 0, 383, 237 +STYLE DS_MODALFRAME | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_CAPTION | + WS_SYSMENU +CAPTION "NINJAM settings" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Record multitrack interval files and log (for remixing)", + IDC_WRITE_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14, + 137,177,10 + CONTROL "Record continuous WAV file",IDC_WRITE_WAV,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,14,118,105,10 + GROUPBOX "Session recording",IDC_STATIC,7,7,369,148 + GROUPBOX "Jesusonic integration",IDC_STATIC,7,159,369,43 + EDITTEXT IDC_JESUSDIR,86,175,187,14,ES_AUTOHSCROLL + LTEXT "Path to Jesusonic dir\n(restart after changing)", + IDC_STATIC,13,176,72,23 + PUSHBUTTON "Browse...",IDC_JS_BROWSE,276,175,50,14 + EDITTEXT IDC_SESSIONDIR,91,18,190,14,ES_AUTOHSCROLL + LTEXT "Main session directory\n(blank for default)",IDC_STATIC, + 13,17,69,18 + LTEXT "Select one or more recording formats:",IDC_STATIC,14,78, + 118,8 + PUSHBUTTON "Browse...",IDC_SESSIONDIR_BROWSE,284,18,50,14 + CONTROL "Record continuous OGG file",IDC_WRITE_OGG,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,14,87,105,10 + LTEXT "OGG file bitrate (64-256)",IDC_STATIC,26,98,79,12, + SS_CENTERIMAGE + EDITTEXT IDC_OGG_BITRATE,107,98,28,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EXAMPLEDIR,91,58,190,14,ES_AUTOHSCROLL | ES_READONLY + EDITTEXT IDC_SESSION_FORMAT,91,37,190,14,ES_AUTOHSCROLL + LTEXT "Session directory naming format string",IDC_STATIC,14, + 39,74,16 + LTEXT "Example session dir name",IDC_STATIC,15,57,76,16 + DEFPUSHBUTTON "Close",IDOK,326,216,50,14 +END + +IDD_PANEL_JESUS DIALOGEX 0, 0, 420, 27 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,174,1,56,25,WS_EX_STATICEDGE + CONTROL "Slider2",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | + WS_TABSTOP,256,1,95,25,WS_EX_STATICEDGE + CONTROL "mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,2,29,11 + CONTROL "solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 389,15,29,11 + RTEXT "+0.00 dB\nboost",IDC_VOLUME_TEXT,352,10,31,17,SS_NOTIFY + CTEXT "Center",IDC_PAN_TEXT,231,0,22,25,SS_NOTIFY | + SS_CENTERIMAGE + CONTROL "",IDC_BROADCAST,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | + WS_TABSTOP,0,4,8,18 + LTEXT "JesuSonic",IDC_STATIC,20,9,34,8 +END + +IDD_SERVER_LICENSE DIALOGEX 0, 0, 370, 191 +STYLE DS_MODALFRAME | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "Server license agreement" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "I agree to these terms for my contribution", + IDC_SERVER_LICENSE_AGREE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,199,158,164,10 + DEFPUSHBUTTON "Continue>>",IDOK,302,170,61,14,0,WS_EX_STATICEDGE + PUSHBUTTON "I disagree, disconnect me",IDCANCEL,200,170,97,14 + EDITTEXT IDC_SERVER_LICENSE_TEXT,7,20,356,135,ES_MULTILINE | + ES_READONLY | WS_VSCROLL + LTEXT "The server has requested that you agree to the following license for your contributed audio in order to connect.", + IDC_STATIC,7,7,350,8 +END + +IDD_CHAT DIALOG DISCARDABLE 0, 0, 336, 138 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_CHAT_ENTRY,0,124,335,14,ES_AUTOHSCROLL + EDITTEXT IDC_CHAT_DISP,0,13,335,109,ES_MULTILINE | ES_READONLY | + WS_VSCROLL + DEFPUSHBUTTON "Button1",IDC_CHAT_ENTER,19,123,10,6,NOT WS_VISIBLE + LTEXT "Chat",IDC_CHAT_TOPIC,2,2,331,8 +END + +IDD_CLOSESESSION DIALOGEX 0, 0, 337, 170 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "End of session" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Done",IDOK,280,148,50,14 + EDITTEXT IDC_SESSION_NAME,66,14,264,14,ES_AUTOHSCROLL + LTEXT "Rename session",IDC_STATIC,7,16,53,8 + LTEXT "Session length",IDC_STATIC,7,44,47,8 + EDITTEXT IDC_SESSION_LEN,66,44,58,12,ES_CENTER | ES_AUTOHSCROLL | + ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE + EDITTEXT IDC_EDIT1,66,68,197,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_BORDER,WS_EX_STATICEDGE + PUSHBUTTON "Delete WAV",IDC_DELWAV,273,68,57,12 + EDITTEXT IDC_EDIT4,66,87,197,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_BORDER,WS_EX_STATICEDGE + PUSHBUTTON "Delete multitrack",IDC_DELMULTI,273,87,57,12 + EDITTEXT IDC_EDIT5,66,105,197,12,ES_AUTOHSCROLL | ES_READONLY | + NOT WS_BORDER,WS_EX_STATICEDGE + PUSHBUTTON "Delete OGG",IDC_DELOGG,273,105,57,12 + LTEXT "Recorded files",IDC_STATIC,7,68,46,8 + PUSHBUTTON "Open session folder",IDC_BUTTON4,248,28,82,14 +END + +IDD_PANEL_CHAN_SEPARATOR DIALOGEX 0, 0, 264, 12 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Remote channels",IDC_SEPTEXT,0,0,264,11,SS_CENTERIMAGE, + WS_EX_DLGMODALFRAME +END + +IDD_PANEL_LOCAL_SEPARATOR DIALOGEX 0, 0, 264, 12 +STYLE WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Local channels",IDC_SEPTEXT,0,0,264,11,0, + WS_EX_DLGMODALFRAME +END + +IDD_ABOUT DIALOG DISCARDABLE 0, 0, 252, 135 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About NINJAM advanced supaclient" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,195,114,50,14 + CTEXT "NINJAM is a program for making music across the Internet. Yay!", + IDC_STATIC,7,31,238,26 + ICON IDI_NINJAM,IDC_STATIC,7,7,20,20 + CTEXT "Copyright 2005 Brennan Underwood",IDC_STATIC,7,81,238, + 18 + CTEXT "Static",IDC_VERSION_TEXT,7,60,238,14 +END + +IDD_PANEL_AUDIO DIALOG DISCARDABLE 0, 0, 420, 32 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Session controls",IDC_STATIC,2,1,61,8 + CONTROL "Record WAV file",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,72,4,69,10 + CONTROL "Record OGG File",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,147,4,70,10 + CONTROL "Record multitrack",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,224,4,71,10 + DEFPUSHBUTTON "Save and open new session",IDC_BUTTON1,312,16,105,14 + LTEXT "Static",IDC_STATIC,161,17,57,8 +END + +IDD_MIDICLOCK_DEVICE DIALOG DISCARDABLE 0, 0, 186, 95 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Select MIDI Output" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,74,50,14 + PUSHBUTTON "Cancel",IDCANCEL,74,74,50,14 + LISTBOX IDC_MIDIOUT_LIST,7,7,172,61,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_PANEL_CHANNEL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 402 + TOPMARGIN, 7 + BOTTOMMARGIN, 18 + END + + IDD_PANEL_GROUP, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 305 + TOPMARGIN, 7 + BOTTOMMARGIN, 136 + END + + IDD_PANEL_LOCALCHANNEL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 369 + TOPMARGIN, 7 + BOTTOMMARGIN, 12 + END + + IDD_PANEL_MASTER, DIALOG + BEGIN + LEFTMARGIN, 7 + TOPMARGIN, 7 + BOTTOMMARGIN, 13 + END + + IDD_SERVER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 88 + END + + IDD_USERPASS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 186 + TOPMARGIN, 7 + BOTTOMMARGIN, 130 + END + + IDD_CFG_ASIO, DIALOG + BEGIN + BOTTOMMARGIN, 128 + END + + IDD_PANEL_METRONOME, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 326 + TOPMARGIN, 6 + BOTTOMMARGIN, 17 + END + + IDD_PANEL_SWEEP, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 342 + END + + IDD_CONFIG_MAIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 376 + TOPMARGIN, 7 + BOTTOMMARGIN, 230 + END + + IDD_PANEL_JESUS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + END + + IDD_SERVER_LICENSE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 363 + TOPMARGIN, 7 + BOTTOMMARGIN, 184 + END + + IDD_CHAT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 329 + TOPMARGIN, 7 + BOTTOMMARGIN, 131 + END + + IDD_CLOSESESSION, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 330 + TOPMARGIN, 7 + BOTTOMMARGIN, 162 + END + + IDD_PANEL_CHAN_SEPARATOR, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 257 + BOTTOMMARGIN, 7 + END + + IDD_PANEL_LOCAL_SEPARATOR, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 1 + END + + IDD_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 245 + TOPMARGIN, 7 + BOTTOMMARGIN, 128 + END + + IDD_PANEL_AUDIO, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + END + + IDD_MIDICLOCK_DEVICE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 88 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_NINJAM ICON DISCARDABLE "icon1.ico" +IDI_ICON1 ICON DISCARDABLE "ninjam_gui_win.ico" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ninjam/njasiodrv/njasiodrvres.rc b/ninjam/njasiodrv/njasiodrvres.rc index 32dd2ca0..7c3ba2a0 100644 --- a/ninjam/njasiodrv/njasiodrvres.rc +++ b/ninjam/njasiodrv/njasiodrvres.rc @@ -1,109 +1,109 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_CFG_ASIO, DIALOG - BEGIN - BOTTOMMARGIN, 128 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 - RTEXT "Input range",IDC_STATIC,0,31,50,8 - RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 - RTEXT "first",IDC_STATIC,30,23,26,8 - RTEXT "last",IDC_STATIC,30,42,26,8 - RTEXT "left",IDC_STATIC,30,63,26,8 - RTEXT "right",IDC_STATIC,30,82,26,8 - PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CFG_ASIO, DIALOG + BEGIN + BOTTOMMARGIN, 128 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,50,0,180,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,60,20,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO4,60,40,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO3,60,60,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO5,60,80,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "ASIO Driver",IDC_STATIC,1,3,38,8 + RTEXT "Input range",IDC_STATIC,0,31,50,8 + RTEXT "Output ----====|",IDC_STATIC,0,72,50,8 + RTEXT "first",IDC_STATIC,30,23,26,8 + RTEXT "last",IDC_STATIC,30,42,26,8 + RTEXT "left",IDC_STATIC,30,63,26,8 + RTEXT "right",IDC_STATIC,30,82,26,8 + PUSHBUTTON "ASIO Configuration...",IDC_BUTTON1,0,100,88,14 +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/ninjam/server/usercon.cpp b/ninjam/server/usercon.cpp index 3ed3a882..839370c3 100644 --- a/ninjam/server/usercon.cpp +++ b/ninjam/server/usercon.cpp @@ -974,9 +974,10 @@ int User_Group::Run() // track bpm/bpi stuff #ifdef _WIN32 DWORD now=GetTickCount(); - if (now >= m_next_loop_time) + if (!m_next_loop_time || (now-m_next_loop_time) < 0x10000000) { m_next_loop_time = now + (60*1000*m_last_bpi) / (m_last_bpm?m_last_bpm:120); + if (!m_next_loop_time) m_next_loop_time++; #else struct timeval now; gettimeofday(&now,NULL); diff --git a/ninjam/winclient/winclientres.rc b/ninjam/winclient/winclientres.rc index 9ba764e1..d3f97cf3 100644 --- a/ninjam/winclient/winclientres.rc +++ b/ninjam/winclient/winclientres.rc @@ -1,547 +1,547 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM audio I/O configuration" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,159,50,14 - PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 - LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 - COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, - 238,129 -END - -IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "ASIO support is not installed, please make sure the file \r\nnjasiodrv.dll is in the same directory as the NINJAM software.", - IDC_STATIC,9,9,217,25 -END - -IDD_CFG_KS DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,61,49,33,10 - CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,49, - 33,10 - CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,49, - 33,10 - EDITTEXT IDC_EDIT1,61,63,40,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT2,60,80,20,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT3,90,80,32,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "",IDC_LATENCYINFO,153,82,80,8 - RTEXT "Input Device:",-1,1,3,55,8 - RTEXT "Sample Format:",-1,1,49,55,8 - RTEXT "Samplerate:",-1,1,65,55,8 - LTEXT "hz",-1,104,66,8,8 - RTEXT "Buffers:",-1,1,82,55,8 - LTEXT "x",-1,82,83,8,8 - LTEXT "bytes",-1,123,83,18,8 - RTEXT "Output Device:",-1,1,19,55,8 -END - -IDD_CFG_WAVEOUT DIALOG DISCARDABLE 0, 0, 238, 129 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,61,34,33,10 - CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,34, - 33,10 - CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,34, - 33,10 - EDITTEXT IDC_EDIT1,61,48,40,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT2,60,65,20,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT3,90,65,32,12,ES_AUTOHSCROLL | ES_NUMBER - RTEXT "Input Device:",-1,1,3,55,8 - RTEXT "Sample Format:",-1,1,34,55,8 - RTEXT "Samplerate:",-1,1,50,55,8 - LTEXT "hz",-1,104,51,8,8 - RTEXT "Buffers:",-1,1,67,55,8 - LTEXT "x",-1,82,68,8,8 - LTEXT "bytes",-1,123,68,18,8 - LTEXT "",IDC_LATENCYINFO,153,68,80,8 - RTEXT "Output Device:",-1,1,19,55,8 -END - -IDD_MAIN DIALOGEX 0, 0, 460, 238 -STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -CAPTION "NINJAM v0.666" -MENU IDR_MENU1 -CLASS "NINJAMwnd" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Master: ",IDC_STATIC,7,10,26,8 - CONTROL "Slider1",IDC_MASTERVOL,"msctls_trackbar32",WS_TABSTOP, - 49,6,162,17 - RTEXT "+0.0 dB",IDC_MASTERVOLLBL,213,9,29,11,SS_NOTIFY - CONTROL "Slider1",IDC_MASTERPAN,"msctls_trackbar32",WS_TABSTOP, - 270,6,45,17 - CONTROL "Mute",IDC_MASTERMUTE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,321,8,32,10 - CONTROL "Progress1",IDC_MASTERVU,"msctls_progress32",PBS_SMOOTH | - WS_BORDER,358,9,93,8 - LTEXT "Metronome:",IDC_STATIC,7,35,38,8 - CONTROL "Slider1",IDC_METROVOL,"msctls_trackbar32",WS_TABSTOP,49, - 31,162,17 - RTEXT "+0.0 dB",IDC_METROVOLLBL,213,34,29,11,SS_NOTIFY - CONTROL "Slider1",IDC_METROPAN,"msctls_trackbar32",WS_TABSTOP, - 270,31,45,17 - CONTROL "Mute",IDC_METROMUTE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,321,33,32,10 - CTEXT "-120.0 dB",IDC_MASTERVULBL,358,19,93,8 - CONTROL "",IDC_DIV1,"Static",SS_ETCHEDHORZ,7,28,446,1 - CONTROL "Status: No connection.",IDC_STATUS,"Static", - SS_LEFTNOWORDWRAP | WS_GROUP,7,224,356,8 - CONTROL "Progress2",IDC_INTERVALPOS,"msctls_progress32", - WS_BORDER,7,214,446,9 - CONTROL "",IDC_CHATDISP,"RichEdit20A",WS_BORDER | WS_VSCROLL | - WS_TABSTOP | 0x2804,351,66,96,123 - CONTROL "",IDC_CHATENT,"RichEdit20A",WS_BORDER | WS_TABSTOP | - 0xc4,351,193,96,14 - CONTROL "",IDC_LOCRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,13, - 66,327,56 - CONTROL "",IDC_REMOTERECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE, - 13,144,327,63 - RTEXT "",IDC_STATUS2,377,224,76,8 - GROUPBOX "Local Channels",IDC_LOCGRP,7,55,337,74,0, - WS_EX_TRANSPARENT - GROUPBOX "Remote Channels",IDC_REMGRP,7,133,337,79,0, - WS_EX_TRANSPARENT - CONTROL "",IDC_DIV2,"Static",SS_ETCHEDHORZ,7,131,336,1 - GROUPBOX "Chat",IDC_CHATGRP,348,55,105,157 - CONTROL "",IDC_DIV3,"Static",SS_ETCHEDHORZ,7,51,445,1 - LTEXT "center",IDC_MASTERPANLBL,244,9,23,11,SS_NOTIFY - LTEXT "center",IDC_METROPANLBL,244,34,23,11,SS_NOTIFY -END - -IDD_CONNECT DIALOG DISCARDABLE 0, 0, 225, 119 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM Connection Configuration" -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_HOST,63,14,155,186,CBS_DROPDOWN | WS_VSCROLL | - WS_TABSTOP - EDITTEXT IDC_USER,63,32,155,12,ES_AUTOHSCROLL - CONTROL "Connect &anonymously",IDC_ANON,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,64,49,85,10 - EDITTEXT IDC_PASS,63,61,155,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT - WS_VISIBLE - CONTROL "&Remember password",IDC_PASSREMEMBER,"Button", - BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,64,77,82, - 10 - DEFPUSHBUTTON "Connect",IDOK,112,98,50,14 - PUSHBUTTON "Cancel",IDCANCEL,168,98,50,14 - LTEXT "Connect to host:",IDC_STATIC,7,16,53,8 - LTEXT "Username:",IDC_STATIC,7,34,35,8 - LTEXT "Password:",IDC_PASSLBL,7,63,34,8,NOT WS_VISIBLE -END - -IDD_LICENSE DIALOG DISCARDABLE 0, 0, 316, 215 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM Server License Agreement" -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "I &agree to the above license terms",IDC_CHECK1,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,82,195,119,10 - PUSHBUTTON "Accept",IDOK,206,194,50,14,WS_DISABLED - PUSHBUTTON "Decline",IDCANCEL,259,194,50,14 - CONTROL "",IDC_LICENSETEXT,"RichEdit20A",WS_BORDER | WS_VSCROLL | - WS_TABSTOP | 0x2804,7,7,302,183 -END - -IDD_PREFS DIALOG DISCARDABLE 0, 0, 241, 142 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "NINJAM Preferences" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,121,50,14 - PUSHBUTTON "Cancel",IDCANCEL,184,121,50,14 - CONTROL "Save mixed down jam as .WAV",IDC_SAVEWAVE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,7,115,10 - CONTROL "Save mixed down jam as .OGG, bitrate:",IDC_SAVEOGG, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,136,10 - EDITTEXT IDC_SAVEOGGBR,145,18,23,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "kbps",IDC_STATIC,170,20,16,8 - CONTROL "Save multitrack recordings for remixing later", - IDC_SAVELOCAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,31, - 152,10 - CONTROL "Save uncompressed .WAV recordings too",IDC_SAVELOCALWAV, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,43,148,10 - LTEXT "Save session files in:",IDC_STATIC,7,59,66,8 - EDITTEXT IDC_SESSIONDIR,7,69,182,12,ES_AUTOHSCROLL - PUSHBUTTON "Browse...",IDC_BROWSE,192,69,42,12 - LTEXT "Changes to the above settings will take effect on the next connection.", - IDC_CHNOTE,7,99,227,8 -END - -IDD_LOCALCHANNEL DIALOG DISCARDABLE 0, 0, 316, 54 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_NAME,0,2,82,12,ES_AUTOHSCROLL | ES_WANTRETURN - CONTROL "Transmit",IDC_TRANSMIT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,85,3,43,10 - COMBOBOX IDC_AUDIOIN,130,1,112,148,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - CONTROL "Progress1",IDC_VU,"msctls_progress32",PBS_SMOOTH | - WS_BORDER,246,6,70,8 - LTEXT "-120.0 dB",IDC_VULBL,270,17,46,8 - CONTROL "Slider1",IDC_VOL,"msctls_trackbar32",WS_TABSTOP,0,18,81, - 18 - CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",WS_TABSTOP,83,18, - 39,18 - RTEXT "+0.0 dB",IDC_VOLLBL,123,20,30,8,SS_NOTIFY - CONTROL "Mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 181,20,30,8 - CONTROL "Solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 214,20,30,8 - PUSHBUTTON "Remove",IDC_REMOVE,264,35,50,13 - CONTROL "Effects processor",IDC_JS,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,6,38,68,10 - PUSHBUTTON "config...",IDC_JSCFG,78,38,38,11,WS_DISABLED - CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,51,316,1 - CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | - SS_NOTIFY | WS_GROUP,155,20,23,8 -END - -IDD_EMPTY_SCROLL DIALOG DISCARDABLE 0, 0, 201, 35 -STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL -FONT 8, "MS Sans Serif" -BEGIN -END - -IDD_LOCALLIST DIALOG DISCARDABLE 0, 0, 133, 22 -STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Add Local Channel",IDC_ADDCH,0,0,76,14 -END - -IDD_REMOTECHANNEL DIALOG DISCARDABLE 0, 0, 316, 40 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_CHANNELNAME,21,0,172,14,ES_AUTOHSCROLL | ES_READONLY | - ES_WANTRETURN - CONTROL "Receive",IDC_RECV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 199,3,43,10 - CONTROL "Progress1",IDC_VU,"msctls_progress32",PBS_SMOOTH | - WS_BORDER,246,6,70,8 - CONTROL "Slider1",IDC_VOL,"msctls_trackbar32",WS_TABSTOP,16,18, - 81,18 - CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",WS_TABSTOP,99,18, - 39,18 - LTEXT "-120.0 dB",IDC_VULBL,270,17,46,8 - RTEXT "+0.0 dB",IDC_VOLLBL,139,20,30,8,SS_NOTIFY - CONTROL "Mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 199,20,30,8 - CONTROL "Solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 232,20,30,8 - CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | - SS_NOTIFY | WS_GROUP,171,20,23,8 -END - -IDD_EMPTY DIALOG DISCARDABLE 0, 0, 127, 30 -STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Sans Serif" -BEGIN -END - -IDD_ABOUT DIALOG DISCARDABLE 0, 0, 248, 124 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About NINJAM" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Close",IDOK,98,101,50,14 - ICON IDI_ICON1,IDC_STATIC,7,7,20,20 - LTEXT "NINJAM",IDC_STATIC,31,11,28,8 - LTEXT "Novel Intervallic Network Jamming Architecture for Musicians", - IDC_STATIC,31,23,193,8 - LTEXT "Copyright (C) 2005 Cockos Incorporated",IDC_STATIC,31, - 47,127,8 - LTEXT "version",IDC_VER,31,35,195,8 - LTEXT "Portions Copyright (C) 2005 Brennan Underwood", - IDC_STATIC,31,59,154,8 - LTEXT "NINJAM is free software, and is licensed under the GNU General Public License. See the included license.txt for the full license terms.", - IDC_STATIC,31,71,195,26 -END - -IDD_MIXERDLG DIALOG DISCARDABLE 0, 0, 209, 145 -STYLE WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_HSCROLL | - WS_SYSMENU | WS_THICKFRAME -CAPTION "NINJAM Channel Mixer" -FONT 8, "MS Sans Serif" -BEGIN -END - -IDD_MIXERITEM DIALOG DISCARDABLE 0, 0, 67, 134 -STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN -FONT 8, "MS Sans Serif" -BEGIN - CTEXT "Channel Name",IDC_LABEL,0,126,67,8 - CONTROL "Slider1",IDC_VOL,"msctls_trackbar32",TBS_VERT | - WS_TABSTOP,7,4,19,104 - LTEXT "+24 dB",IDC_STATIC,31,9,24,8 - LTEXT "-120 dB",IDC_STATIC,31,95,26,8 - LTEXT "+0 dB",IDC_STATIC,31,40,20,8 - CTEXT "+0.0 dB",IDC_LABEL2,0,115,67,8 -END - -IDD_REMOTEUSER DIALOG DISCARDABLE 0, 0, 316, 22 -STYLE DS_CONTROL | WS_CHILD -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_USERNAME,21,6,236,14,ES_AUTOHSCROLL | ES_READONLY | - ES_WANTRETURN - CONTROL "",IDC_DIV,"Static",SS_ETCHEDHORZ,0,0,315,1 - LTEXT "User:",IDC_STATIC,0,8,18,8 - CONTROL "Mute user",IDC_MUTE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,263,8,47,10 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_CONFIG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 245 - TOPMARGIN, 7 - BOTTOMMARGIN, 173 - END - - IDD_CFG_ASIO, DIALOG - BEGIN - BOTTOMMARGIN, 128 - END - - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 453 - TOPMARGIN, 6 - BOTTOMMARGIN, 231 - END - - IDD_CONNECT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 218 - TOPMARGIN, 7 - BOTTOMMARGIN, 112 - END - - IDD_LICENSE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 309 - TOPMARGIN, 7 - BOTTOMMARGIN, 208 - END - - IDD_PREFS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 234 - TOPMARGIN, 7 - BOTTOMMARGIN, 135 - END - - IDD_LOCALCHANNEL, DIALOG - BEGIN - BOTTOMMARGIN, 52 - END - - IDD_EMPTY_SCROLL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 184 - TOPMARGIN, 7 - BOTTOMMARGIN, 18 - END - - IDD_LOCALLIST, DIALOG - BEGIN - RIGHTMARGIN, 126 - BOTTOMMARGIN, 15 - END - - IDD_REMOTECHANNEL, DIALOG - BEGIN - BOTTOMMARGIN, 38 - END - - IDD_EMPTY, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 120 - TOPMARGIN, 7 - BOTTOMMARGIN, 23 - END - - IDD_ABOUT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 241 - TOPMARGIN, 7 - BOTTOMMARGIN, 117 - END - - IDD_MIXERDLG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 202 - TOPMARGIN, 7 - BOTTOMMARGIN, 133 - END - - IDD_REMOTEUSER, DIALOG - BEGIN - BOTTOMMARGIN, 20 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MENU1 MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Connect...\tCtrl+K", ID_FILE_CONNECT - MENUITEM "&Disconnect\tCtrl+D", ID_FILE_DISCONNECT, GRAYED - MENUITEM SEPARATOR - MENUITEM "&Quit\tCtrl+Q", ID_FILE_QUIT - END - POPUP "&Options" - BEGIN - MENUITEM "&Preferences...\tCtrl+P", ID_OPTIONS_PREFERENCES - MENUITEM "&Audio configuration...\tCtrl+O", - ID_OPTIONS_AUDIOCONFIGURATION - - END - POPUP "&Help", HELP - BEGIN - MENUITEM "&About NINJAM...", ID_HELP_ABOUTNINJAM - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON DISCARDABLE "ninjam_gui_win.ico" -IDI_ICON2 ICON DISCARDABLE "jesusonic.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE -BEGIN - "D", ID_FILE_DISCONNECT, VIRTKEY, CONTROL, NOINVERT - "K", ID_FILE_CONNECT, VIRTKEY, CONTROL, NOINVERT - "O", ID_OPTIONS_AUDIOCONFIGURATION, VIRTKEY, CONTROL, - NOINVERT - "P", ID_OPTIONS_PREFERENCES, VIRTKEY, CONTROL, NOINVERT - "Q", ID_FILE_QUIT, VIRTKEY, CONTROL, NOINVERT -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CONFIG DIALOG DISCARDABLE 0, 0, 252, 180 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM audio I/O configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,7,159,50,14 + PUSHBUTTON "Cancel",IDCANCEL,63,159,50,14 + LTEXT "Input/output system:",IDC_STATIC,5,9,66,8 + COMBOBOX IDC_COMBO1,75,7,170,107,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "",IDC_CRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,7,25, + 238,129 +END + +IDD_CFG_ASIO DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "ASIO support is not installed, please make sure the file \r\nnjasiodrv.dll is in the same directory as the NINJAM software.", + IDC_STATIC,9,9,217,25 +END + +IDD_CFG_KS DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,61,49,33,10 + CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,49, + 33,10 + CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,49, + 33,10 + EDITTEXT IDC_EDIT1,61,63,40,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT2,60,80,20,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT3,90,80,32,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "",IDC_LATENCYINFO,153,82,80,8 + RTEXT "Input Device:",-1,1,3,55,8 + RTEXT "Sample Format:",-1,1,49,55,8 + RTEXT "Samplerate:",-1,1,65,55,8 + LTEXT "hz",-1,104,66,8,8 + RTEXT "Buffers:",-1,1,82,55,8 + LTEXT "x",-1,82,83,8,8 + LTEXT "bytes",-1,123,83,18,8 + RTEXT "Output Device:",-1,1,19,55,8 +END + +IDD_CFG_WAVEOUT DIALOG DISCARDABLE 0, 0, 238, 129 +STYLE WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_COMBO1,61,0,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + COMBOBOX IDC_COMBO2,61,16,176,126,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "16 bit",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | + WS_GROUP | WS_TABSTOP,61,34,33,10 + CONTROL "24 bit",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,101,34, + 33,10 + CONTROL "32 bit",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,139,34, + 33,10 + EDITTEXT IDC_EDIT1,61,48,40,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT2,60,65,20,12,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_EDIT3,90,65,32,12,ES_AUTOHSCROLL | ES_NUMBER + RTEXT "Input Device:",-1,1,3,55,8 + RTEXT "Sample Format:",-1,1,34,55,8 + RTEXT "Samplerate:",-1,1,50,55,8 + LTEXT "hz",-1,104,51,8,8 + RTEXT "Buffers:",-1,1,67,55,8 + LTEXT "x",-1,82,68,8,8 + LTEXT "bytes",-1,123,68,18,8 + LTEXT "",IDC_LATENCYINFO,153,68,80,8 + RTEXT "Output Device:",-1,1,19,55,8 +END + +IDD_MAIN DIALOGEX 0, 0, 460, 238 +STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION | WS_SYSMENU | + WS_THICKFRAME +CAPTION "NINJAM v0.666" +MENU IDR_MENU1 +CLASS "NINJAMwnd" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Master: ",IDC_STATIC,7,10,26,8 + CONTROL "Slider1",IDC_MASTERVOL,"msctls_trackbar32",WS_TABSTOP, + 49,6,162,17 + RTEXT "+0.0 dB",IDC_MASTERVOLLBL,213,9,29,11,SS_NOTIFY + CONTROL "Slider1",IDC_MASTERPAN,"msctls_trackbar32",WS_TABSTOP, + 270,6,45,17 + CONTROL "Mute",IDC_MASTERMUTE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,321,8,32,10 + CONTROL "Progress1",IDC_MASTERVU,"msctls_progress32",PBS_SMOOTH | + WS_BORDER,358,9,93,8 + LTEXT "Metronome:",IDC_STATIC,7,35,38,8 + CONTROL "Slider1",IDC_METROVOL,"msctls_trackbar32",WS_TABSTOP,49, + 31,162,17 + RTEXT "+0.0 dB",IDC_METROVOLLBL,213,34,29,11,SS_NOTIFY + CONTROL "Slider1",IDC_METROPAN,"msctls_trackbar32",WS_TABSTOP, + 270,31,45,17 + CONTROL "Mute",IDC_METROMUTE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,321,33,32,10 + CTEXT "-120.0 dB",IDC_MASTERVULBL,358,19,93,8 + CONTROL "",IDC_DIV1,"Static",SS_ETCHEDHORZ,7,28,446,1 + CONTROL "Status: No connection.",IDC_STATUS,"Static", + SS_LEFTNOWORDWRAP | WS_GROUP,7,224,356,8 + CONTROL "Progress2",IDC_INTERVALPOS,"msctls_progress32", + WS_BORDER,7,214,446,9 + CONTROL "",IDC_CHATDISP,"RichEdit20A",WS_BORDER | WS_VSCROLL | + WS_TABSTOP | 0x2804,351,66,96,123 + CONTROL "",IDC_CHATENT,"RichEdit20A",WS_BORDER | WS_TABSTOP | + 0xc4,351,193,96,14 + CONTROL "",IDC_LOCRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE,13, + 66,327,56 + CONTROL "",IDC_REMOTERECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE, + 13,144,327,63 + RTEXT "",IDC_STATUS2,377,224,76,8 + GROUPBOX "Local Channels",IDC_LOCGRP,7,55,337,74,0, + WS_EX_TRANSPARENT + GROUPBOX "Remote Channels",IDC_REMGRP,7,133,337,79,0, + WS_EX_TRANSPARENT + CONTROL "",IDC_DIV2,"Static",SS_ETCHEDHORZ,7,131,336,1 + GROUPBOX "Chat",IDC_CHATGRP,348,55,105,157 + CONTROL "",IDC_DIV3,"Static",SS_ETCHEDHORZ,7,51,445,1 + LTEXT "center",IDC_MASTERPANLBL,244,9,23,11,SS_NOTIFY + LTEXT "center",IDC_METROPANLBL,244,34,23,11,SS_NOTIFY +END + +IDD_CONNECT DIALOG DISCARDABLE 0, 0, 225, 119 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM Connection Configuration" +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_HOST,63,14,155,186,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + EDITTEXT IDC_USER,63,32,155,12,ES_AUTOHSCROLL + CONTROL "Connect &anonymously",IDC_ANON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,64,49,85,10 + EDITTEXT IDC_PASS,63,61,155,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT + WS_VISIBLE + CONTROL "&Remember password",IDC_PASSREMEMBER,"Button", + BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,64,77,82, + 10 + DEFPUSHBUTTON "Connect",IDOK,112,98,50,14 + PUSHBUTTON "Cancel",IDCANCEL,168,98,50,14 + LTEXT "Connect to host:",IDC_STATIC,7,16,53,8 + LTEXT "Username:",IDC_STATIC,7,34,35,8 + LTEXT "Password:",IDC_PASSLBL,7,63,34,8,NOT WS_VISIBLE +END + +IDD_LICENSE DIALOG DISCARDABLE 0, 0, 316, 215 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM Server License Agreement" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "I &agree to the above license terms",IDC_CHECK1,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,82,195,119,10 + PUSHBUTTON "Accept",IDOK,206,194,50,14,WS_DISABLED + PUSHBUTTON "Decline",IDCANCEL,259,194,50,14 + CONTROL "",IDC_LICENSETEXT,"RichEdit20A",WS_BORDER | WS_VSCROLL | + WS_TABSTOP | 0x2804,7,7,302,183 +END + +IDD_PREFS DIALOG DISCARDABLE 0, 0, 241, 142 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NINJAM Preferences" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,121,50,14 + PUSHBUTTON "Cancel",IDCANCEL,184,121,50,14 + CONTROL "Save mixed down jam as .WAV",IDC_SAVEWAVE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,7,115,10 + CONTROL "Save mixed down jam as .OGG, bitrate:",IDC_SAVEOGG, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,136,10 + EDITTEXT IDC_SAVEOGGBR,145,18,23,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "kbps",IDC_STATIC,170,20,16,8 + CONTROL "Save multitrack recordings for remixing later", + IDC_SAVELOCAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,31, + 152,10 + CONTROL "Save uncompressed .WAV recordings too",IDC_SAVELOCALWAV, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,43,148,10 + LTEXT "Save session files in:",IDC_STATIC,7,59,66,8 + EDITTEXT IDC_SESSIONDIR,7,69,182,12,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE,192,69,42,12 + LTEXT "Changes to the above settings will take effect on the next connection.", + IDC_CHNOTE,7,99,227,8 +END + +IDD_LOCALCHANNEL DIALOG DISCARDABLE 0, 0, 316, 54 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_NAME,0,2,82,12,ES_AUTOHSCROLL | ES_WANTRETURN + CONTROL "Transmit",IDC_TRANSMIT,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,85,3,43,10 + COMBOBOX IDC_AUDIOIN,130,1,112,148,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + CONTROL "Progress1",IDC_VU,"msctls_progress32",PBS_SMOOTH | + WS_BORDER,246,6,70,8 + LTEXT "-120.0 dB",IDC_VULBL,270,17,46,8 + CONTROL "Slider1",IDC_VOL,"msctls_trackbar32",WS_TABSTOP,0,18,81, + 18 + CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",WS_TABSTOP,83,18, + 39,18 + RTEXT "+0.0 dB",IDC_VOLLBL,123,20,30,8,SS_NOTIFY + CONTROL "Mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 181,20,30,8 + CONTROL "Solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 214,20,30,8 + PUSHBUTTON "Remove",IDC_REMOVE,264,35,50,13 + CONTROL "Effects processor",IDC_JS,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,6,38,68,10 + PUSHBUTTON "config...",IDC_JSCFG,78,38,38,11,WS_DISABLED + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,51,316,1 + CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | + SS_NOTIFY | WS_GROUP,155,20,23,8 +END + +IDD_EMPTY_SCROLL DIALOG DISCARDABLE 0, 0, 201, 35 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL +FONT 8, "MS Sans Serif" +BEGIN +END + +IDD_LOCALLIST DIALOG DISCARDABLE 0, 0, 133, 22 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Add Local Channel",IDC_ADDCH,0,0,76,14 +END + +IDD_REMOTECHANNEL DIALOG DISCARDABLE 0, 0, 316, 40 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_CHANNELNAME,21,0,172,14,ES_AUTOHSCROLL | ES_READONLY | + ES_WANTRETURN + CONTROL "Receive",IDC_RECV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 199,3,43,10 + CONTROL "Progress1",IDC_VU,"msctls_progress32",PBS_SMOOTH | + WS_BORDER,246,6,70,8 + CONTROL "Slider1",IDC_VOL,"msctls_trackbar32",WS_TABSTOP,16,18, + 81,18 + CONTROL "Slider1",IDC_PAN,"msctls_trackbar32",WS_TABSTOP,99,18, + 39,18 + LTEXT "-120.0 dB",IDC_VULBL,270,17,46,8 + RTEXT "+0.0 dB",IDC_VOLLBL,139,20,30,8,SS_NOTIFY + CONTROL "Mute",IDC_MUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 199,20,30,8 + CONTROL "Solo",IDC_SOLO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 232,20,30,8 + CONTROL "center",IDC_PANLBL,"Static",SS_LEFTNOWORDWRAP | + SS_NOTIFY | WS_GROUP,171,20,23,8 +END + +IDD_EMPTY DIALOG DISCARDABLE 0, 0, 127, 30 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Sans Serif" +BEGIN +END + +IDD_ABOUT DIALOG DISCARDABLE 0, 0, 248, 124 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About NINJAM" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Close",IDOK,98,101,50,14 + ICON IDI_ICON1,IDC_STATIC,7,7,20,20 + LTEXT "NINJAM",IDC_STATIC,31,11,28,8 + LTEXT "Novel Intervallic Network Jamming Architecture for Musicians", + IDC_STATIC,31,23,193,8 + LTEXT "Copyright (C) 2005 Cockos Incorporated",IDC_STATIC,31, + 47,127,8 + LTEXT "version",IDC_VER,31,35,195,8 + LTEXT "Portions Copyright (C) 2005 Brennan Underwood", + IDC_STATIC,31,59,154,8 + LTEXT "NINJAM is free software, and is licensed under the GNU General Public License. See the included license.txt for the full license terms.", + IDC_STATIC,31,71,195,26 +END + +IDD_MIXERDLG DIALOG DISCARDABLE 0, 0, 209, 145 +STYLE WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_HSCROLL | + WS_SYSMENU | WS_THICKFRAME +CAPTION "NINJAM Channel Mixer" +FONT 8, "MS Sans Serif" +BEGIN +END + +IDD_MIXERITEM DIALOG DISCARDABLE 0, 0, 67, 134 +STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN +FONT 8, "MS Sans Serif" +BEGIN + CTEXT "Channel Name",IDC_LABEL,0,126,67,8 + CONTROL "Slider1",IDC_VOL,"msctls_trackbar32",TBS_VERT | + WS_TABSTOP,7,4,19,104 + LTEXT "+24 dB",IDC_STATIC,31,9,24,8 + LTEXT "-120 dB",IDC_STATIC,31,95,26,8 + LTEXT "+0 dB",IDC_STATIC,31,40,20,8 + CTEXT "+0.0 dB",IDC_LABEL2,0,115,67,8 +END + +IDD_REMOTEUSER DIALOG DISCARDABLE 0, 0, 316, 22 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_USERNAME,21,6,236,14,ES_AUTOHSCROLL | ES_READONLY | + ES_WANTRETURN + CONTROL "",IDC_DIV,"Static",SS_ETCHEDHORZ,0,0,315,1 + LTEXT "User:",IDC_STATIC,0,8,18,8 + CONTROL "Mute user",IDC_MUTE,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,263,8,47,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CONFIG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 245 + TOPMARGIN, 7 + BOTTOMMARGIN, 173 + END + + IDD_CFG_ASIO, DIALOG + BEGIN + BOTTOMMARGIN, 128 + END + + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 453 + TOPMARGIN, 6 + BOTTOMMARGIN, 231 + END + + IDD_CONNECT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 218 + TOPMARGIN, 7 + BOTTOMMARGIN, 112 + END + + IDD_LICENSE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 309 + TOPMARGIN, 7 + BOTTOMMARGIN, 208 + END + + IDD_PREFS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 234 + TOPMARGIN, 7 + BOTTOMMARGIN, 135 + END + + IDD_LOCALCHANNEL, DIALOG + BEGIN + BOTTOMMARGIN, 52 + END + + IDD_EMPTY_SCROLL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 184 + TOPMARGIN, 7 + BOTTOMMARGIN, 18 + END + + IDD_LOCALLIST, DIALOG + BEGIN + RIGHTMARGIN, 126 + BOTTOMMARGIN, 15 + END + + IDD_REMOTECHANNEL, DIALOG + BEGIN + BOTTOMMARGIN, 38 + END + + IDD_EMPTY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 120 + TOPMARGIN, 7 + BOTTOMMARGIN, 23 + END + + IDD_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 241 + TOPMARGIN, 7 + BOTTOMMARGIN, 117 + END + + IDD_MIXERDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 202 + TOPMARGIN, 7 + BOTTOMMARGIN, 133 + END + + IDD_REMOTEUSER, DIALOG + BEGIN + BOTTOMMARGIN, 20 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU1 MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Connect...\tCtrl+K", ID_FILE_CONNECT + MENUITEM "&Disconnect\tCtrl+D", ID_FILE_DISCONNECT, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Quit\tCtrl+Q", ID_FILE_QUIT + END + POPUP "&Options" + BEGIN + MENUITEM "&Preferences...\tCtrl+P", ID_OPTIONS_PREFERENCES + MENUITEM "&Audio configuration...\tCtrl+O", + ID_OPTIONS_AUDIOCONFIGURATION + + END + POPUP "&Help", HELP + BEGIN + MENUITEM "&About NINJAM...", ID_HELP_ABOUTNINJAM + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON DISCARDABLE "ninjam_gui_win.ico" +IDI_ICON2 ICON DISCARDABLE "jesusonic.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +BEGIN + "D", ID_FILE_DISCONNECT, VIRTKEY, CONTROL, NOINVERT + "K", ID_FILE_CONNECT, VIRTKEY, CONTROL, NOINVERT + "O", ID_OPTIONS_AUDIOCONFIGURATION, VIRTKEY, CONTROL, + NOINVERT + "P", ID_OPTIONS_PREFERENCES, VIRTKEY, CONTROL, NOINVERT + "Q", ID_FILE_QUIT, VIRTKEY, CONTROL, NOINVERT +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED +