53#ifndef _SWELL_DLGGEN_H_
54#define _SWELL_DLGGEN_H_
82#define PUSHBUTTON }, { "__SWELL_BUTTON", 0,
83#define DEFPUSHBUTTON }, { "__SWELL_BUTTON", 1,
84#define EDITTEXT }, { "__SWELL_EDIT", 0, "",
85#define CTEXT }, { "__SWELL_LABEL", 0,
86#define LTEXT }, { "__SWELL_LABEL", -1,
87#define RTEXT }, { "__SWELL_LABEL", 1,
89#define COMBOBOX }, { "__SWELL_COMBO", 0, "",
90#define GROUPBOX }, { "__SWELL_GROUP", 0,
91#define CHECKBOX }, { "__SWELL_CHECKBOX", 0,
92#define LISTBOX }, { "__SWELL_LISTBOX", 0, "",
93#define ICON }, { "__SWELL_ICON", 0, (const char*)(INT_PTR)
98#define CBS_DROPDOWNLIST 0x0003L
99#define CBS_DROPDOWN 0x0002L
100#define CBS_SORT 0x0100L
101#define ES_PASSWORD 0x0020L
102#define ES_READONLY 0x0800L
103#define ES_WANTRETURN 0x1000L
104#define ES_NUMBER 0x2000L
107#define SS_CENTER 0x1L
109#define SS_BLACKRECT 0x4L
110#define SS_BLACKFRAME (SS_BLACKRECT)
111#define SS_LEFTNOWORDWRAP 0xCL
112#define SS_ETCHEDHORZ 0x10L
113#define SS_ETCHEDVERT 0x11L
114#define SS_ETCHEDFRAME 0x12L
115#define SS_TYPEMASK 0x1FL
116#define SS_NOTIFY 0x0100L
118#define BS_LEFTTEXT 0x0020L
120#define BS_LEFT 0x100L
121#define BS_CENTER 0x300L
122#define BS_XPOSITION_MASK BS_CENTER
124#define BS_GROUPBOX 0x20000000
125#define BS_DEFPUSHBUTTON 0x10000000
126#define BS_PUSHBUTTON 0x8000000
129#define LVS_NOCOLUMNHEADER 0x4000
130#define LVS_NOSORTHEADER 0x8000
131#define LVS_REPORT 0x0001
132#define LVS_TYPEMASK 0x0003
133#define LVS_SINGLESEL 0x0004
134#define LVS_OWNERDATA 0x1000
135#define LVS_SORTASCENDING 0x0010
136#define LVS_SORTDESCENDING 0x0020
138#define LBS_SORT 0x0002L
139#define LBS_OWNERDRAWFIXED 0x0010L
140#define LBS_EXTENDEDSEL 0x0800L
145#define ES_MULTILINE 4
146#define ES_AUTOHSCROLL 0x80
149#define LVS_SHOWSELALWAYS 0
150#define LVS_SHAREIMAGELISTS 0
151#define ES_AUTOVSCROLL 0
154#define CBS_AUTOHSCROLL 0
158#define LBS_NOINTEGRALHEIGHT 0
159#define TVS_HASLINES 0
160#define TVS_LINESATROOT 0
161#define TVS_SHOWSELALWAYS 0
162#define TVS_HASBUTTONS 0
163#define TVS_TRACKSELECT 0
164#define TVS_NONEVENHEIGHT 0
165#define TVS_NOTOOLTIPS 0
169#define WS_EX_STATICEDGE 0
171#define SS_CENTERIMAGE 0
173#define WS_CLIPCHILDREN 0
176#define LVS_ALIGNLEFT 0
185#define SWELL_DLG_WS_CHILD 1
186#define SWELL_DLG_WS_RESIZABLE 2
187#define SWELL_DLG_WS_FLIPPED 4
188#define SWELL_DLG_WS_NOAUTOSIZE 8
189#define SWELL_DLG_WS_OPAQUE 16
190#define SWELL_DLG_WS_DROPTARGET 32
220 m_rec.title=titlestr;
221 m_rec.windowTypeFlags=flags;
233 class SWELL_DialogRegValidator
236 SWELL_DialogRegValidator(
const SWELL_DlgResourceEntry *recs,
size_t recs_sz)
241 WDL_IntKeyedArray<bool> tmp;
242 for (
size_t x = 0;
x < recs_sz;
x ++)
244 const SWELL_DlgResourceEntry *
list = recs +
x;
245 const int idx = strncmp(
list->str1,
"__SWELL_",8) ?
list->flag1 :
list->p1;
246 if (idx != 0 && idx != -1)
255 #define SWELL_VALIDATE_DIALOG_RESOURCE(v,r) static SWELL_DialogRegValidator v(r+1, sizeof(r)/sizeof(r[0])-1);
257 #define SWELL_VALIDATE_DIALOG_RESOURCE(v,r)
261#define SWELL_DEFINE_DIALOG_RESOURCE_BEGIN(recid, flags, titlestr, wid, hei, scale) \
262 static void SWELL__dlg_cf__##recid(HWND view, int wflags); \
263 const float __swell_dlg_scale__##recid = (float) (scale); \
264 static SWELL_DialogRegHelper __swell_dlg_helper_##recid(&SWELL_curmodule_dialogresource_head, SWELL__dlg_cf__##recid, recid,flags,titlestr,wid,hei,scale); \
265 static const SWELL_DlgResourceEntry __swell_dlg_list__##recid[]={
268#define SWELL_DEFINE_DIALOG_RESOURCE_END(recid ) }; \
269 SWELL_VALIDATE_DIALOG_RESOURCE( __swell_dlg_validator__##recid, __swell_dlg_list__##recid) \
270 static void SWELL__dlg_cf__##recid(HWND view, int wflags) { \
271 SWELL_MakeSetCurParms(__swell_dlg_scale__##recid,__swell_dlg_scale__##recid,0,0,view,false,!(wflags&SWELL_DLG_WS_NOAUTOSIZE)); \
272 SWELL_GenerateDialogFromList(__swell_dlg_list__##recid+1,sizeof(__swell_dlg_list__##recid)/sizeof(__swell_dlg_list__##recid[0])-1); \
SWELL_DialogRegHelper(SWELL_DialogResourceIndex **h, void(*cf)(HWND, int), int recid, int flags, const char *titlestr, int wid, int hei, double scale)
Definition swell-dlggen.h:215
SWELL_DialogResourceIndex m_rec
Definition swell-dlggen.h:214
VAL Get(KEY key, VAL notfound=0) const
Definition assocarray.h:328
int Insert(KEY key, VAL val)
Definition assocarray.h:53
unsigned x[BMAX+1]
Definition inflate.c:1586
@ list
Definition juce_AccessibilityRole.h:56
Definition swell-types.h:218
Definition swell-dlggen.h:203
POINT hotspot
Definition swell-dlggen.h:206
const char * resname
Definition swell-dlggen.h:205
const char * resid
Definition swell-dlggen.h:204
HCURSOR cachedCursor
Definition swell-dlggen.h:207
struct SWELL_CursorResourceIndex * _next
Definition swell-dlggen.h:208
Definition swell-dlggen.h:193
int height
Definition swell-dlggen.h:198
const char * resid
Definition swell-dlggen.h:194
struct SWELL_DialogResourceIndex * _next
Definition swell-dlggen.h:199
int windowTypeFlags
Definition swell-dlggen.h:196
const char * title
Definition swell-dlggen.h:195
void(* createFunc)(HWND, int)
Definition swell-dlggen.h:197
int width
Definition swell-dlggen.h:198
Definition swell-dlggen.h:66
int p4
Definition swell-dlggen.h:75
int flag1
Definition swell-dlggen.h:68
int p6
Definition swell-dlggen.h:75
const char * str2
Definition swell-dlggen.h:69
int p5
Definition swell-dlggen.h:75
int p1
Definition swell-dlggen.h:71
int p3
Definition swell-dlggen.h:75
int p2
Definition swell-dlggen.h:75
const char * str1
Definition swell-dlggen.h:67
void DWORD DWORD LPVOID DWORD cf
Definition swell-functions.h:807
struct HCURSOR__ * HCURSOR
Definition swell-types.h:264
struct HWND__ * HWND
Definition swell-types.h:210
#define MAKEINTRESOURCE(x)
Definition swell-types.h:1157
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
typedef int(UZ_EXP MsgFn)()
#define void
Definition unzip.h:396
#define WDL_ASSERT(x)
Definition wdltypes.h:164