Skip to content

Commit

Permalink
Update to v3.31
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Oct 16, 2023
1 parent 8b037fe commit a3b3bba
Show file tree
Hide file tree
Showing 81 changed files with 861 additions and 499 deletions.
2 changes: 1 addition & 1 deletion iup/external/COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and commercial purposes at absolutely no cost.

===============================================================================

Copyright (C) 1994-2020 Tecgraf/PUC-Rio.
Copyright (C) 1994-2023 Tecgraf/PUC-Rio.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion iup/external/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.30
3.31
8 changes: 4 additions & 4 deletions iup/external/include/iup.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ extern "C" {

#define IUP_NAME "IUP - Portable User Interface"
#define IUP_DESCRIPTION "Multi-platform Toolkit for Building Graphical User Interfaces"
#define IUP_COPYRIGHT "Copyright (C) 1994-2020 Tecgraf/PUC-Rio"
#define IUP_VERSION "3.30" /* bug fixes are reported only by IupVersion functions */
#define IUP_VERSION_NUMBER 330000
#define IUP_VERSION_DATE "2020/07/30" /* does not include bug fix releases */
#define IUP_COPYRIGHT "Copyright (C) 1994-2023 Tecgraf/PUC-Rio"
#define IUP_VERSION "3.31" /* bug fixes are reported only by IupVersion functions */
#define IUP_VERSION_NUMBER 331000
#define IUP_VERSION_DATE "2023/10/13" /* does not include bug fix releases */

typedef struct Ihandle_ Ihandle;
typedef int (*Icallback)(Ihandle*);
Expand Down
4 changes: 2 additions & 2 deletions iup/external/src/gtk/iupgtk_clipboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ Iclass* iupClipboardNewClass(void)
iupClassRegisterAttribute(ic, "IMAGEAVAILABLE", gtkClipboardGetImageAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);

iupClassRegisterAttribute(ic, "ADDFORMAT", NULL, gtkClipboardSetAddFormatAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMAT", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMAT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMATAVAILABLE", gtkClipboardGetFormatAvailableAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMATDATA", gtkClipboardGetFormatDataAttrib, gtkClipboardSetFormatDataAttrib, NULL, NULL, IUPAF_NO_STRING | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMATDATASTRING", gtkClipboardGetFormatDataStringAttrib, gtkClipboardSetFormatDataStringAttrib, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMATDATASIZE", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FORMATDATASIZE", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);

return ic;
}
4 changes: 2 additions & 2 deletions iup/external/src/gtk/iupgtk_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ IUP_SDK_API void iupdrvBaseRegisterCommonAttrib(Iclass* ic)

IUP_SDK_API void iupdrvBaseRegisterVisualAttrib(Iclass* ic)
{
iupClassRegisterAttribute(ic, "TIPMARKUP", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "TIPICON", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "TIPMARKUP", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_DEFAULT);
iupClassRegisterAttribute(ic, "TIPICON", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_DEFAULT);
}

gboolean iupgtkMotionNotifyEvent(GtkWidget *widget, GdkEventMotion *evt, Ihandle *ih)
Expand Down
2 changes: 1 addition & 1 deletion iup/external/src/gtk/iupgtk_dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ void iupdrvDialogInitClass(Iclass* ic)
iupClassRegisterAttribute(ic, "TRAYTIP", NULL, gtkDialogSetTrayTipAttrib, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "TRAYTIPMARKUP", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_NO_INHERIT);
#endif
iupClassRegisterAttribute(ic, "CUSTOMFRAME", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "CUSTOMFRAME", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_DEFAULT);

#if GTK_CHECK_VERSION(3, 4, 0)
iupClassRegisterAttribute(ic, "HIDETITLEBAR", NULL, gtkDialogSetHideTitleBarAttrib, NULL, NULL, IUPAF_NO_INHERIT);
Expand Down
4 changes: 2 additions & 2 deletions iup/external/src/gtk/iupgtk_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void iupdrvMenuInitClass(Iclass* ic)
ic->UnMap = gtkMenuUnMapMethod;

/* Used by iupdrvMenuGetMenuBarSize */
iupClassRegisterAttribute(ic, "FONT", NULL, NULL, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_NOT_MAPPED); /* inherited */
iupClassRegisterAttribute(ic, "FONT", NULL, NULL, IUPAF_SAMEASSYSTEM, "DEFAULTFONT", IUPAF_DEFAULT); /* inherited */

iupClassRegisterAttribute(ic, "BGCOLOR", NULL, iupdrvBaseSetBgColorAttrib, NULL, NULL, IUPAF_DEFAULT);
}
Expand Down Expand Up @@ -492,7 +492,7 @@ void iupdrvItemInitClass(Iclass* ic)
iupClassRegisterAttribute(ic, "IMPRESS", NULL, gtkItemSetImpressAttrib, NULL, NULL, IUPAF_IHANDLENAME|IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT);

/* IupItem GTK and Motif only */
iupClassRegisterAttribute(ic, "HIDEMARK", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "HIDEMARK", NULL, NULL, NULL, NULL, IUPAF_DEFAULT);
}


Expand Down
2 changes: 1 addition & 1 deletion iup/external/src/gtk/iupgtk_tabs.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,6 @@ void iupdrvTabsInitClass(Iclass* ic)
iupClassRegisterAttribute(ic, "TABPADDING", iupTabsGetTabPaddingAttrib, gtkTabsSetTabPaddingAttrib, IUPAF_SAMEASSYSTEM, "0x0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);

/* NOT supported */
iupClassRegisterAttribute(ic, "MULTILINE", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED|IUPAF_DEFAULT);
iupClassRegisterAttribute(ic, "MULTILINE", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED);
}

2 changes: 1 addition & 1 deletion iup/external/src/gtk/iupgtk_toggle.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,5 +605,5 @@ void iupdrvToggleInitClass(Iclass* ic)
iupClassRegisterAttribute(ic, "MARKUP", NULL, NULL, NULL, NULL, IUPAF_DEFAULT);

/* NOT supported */
iupClassRegisterAttribute(ic, "RIGHTBUTTON", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED|IUPAF_DEFAULT);
iupClassRegisterAttribute(ic, "RIGHTBUTTON", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED);
}
2 changes: 1 addition & 1 deletion iup/external/src/gtk/iupgtk_val.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,6 @@ void iupdrvValInitClass(Iclass* ic)
iupClassRegisterAttribute(ic, "STEP", iupValGetStepAttrib, gtkValSetStepAttrib, NULL, NULL, IUPAF_NO_INHERIT);

/* NOT supported */
iupClassRegisterAttribute(ic, "TICKSPOS", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED|IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "TICKSPOS", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED);
iupClassRegisterAttribute(ic, "SHOWTICKS", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED);
}
4 changes: 2 additions & 2 deletions iup/external/src/iup_animatedlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ Iclass* iupAnimatedLabelNewClass(void)
iupClassRegisterAttribute(ic, "FRAMECOUNT", iAnimatedLabelGetFrameCountAttrib, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "ANIMATION", iAnimatedLabelGetAnimationAttrib, iAnimatedLabelSetAnimationAttrib, NULL, NULL, IUPAF_IHANDLENAME | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "ANIMATION_HANDLE", iAnimatedLabelGetAnimationHandleAttrib, iAnimatedLabelSetAnimationHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT | IUPAF_IHANDLE | IUPAF_NO_STRING);
iupClassRegisterAttribute(ic, "STOPWHENHIDDEN", NULL, NULL, IUPAF_SAMEASSYSTEM, "Yes", IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "STOPWHENHIDDEN", NULL, NULL, IUPAF_SAMEASSYSTEM, "Yes", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "FIRST_CONTROL_HANDLE", iAnimatedLabelGetAnimationHandleAttrib, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT | IUPAF_IHANDLE | IUPAF_NO_STRING);
iupClassRegisterAttribute(ic, "NEXT_CONTROL_HANDLE", NULL, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT | IUPAF_IHANDLE | IUPAF_NO_STRING);
iupClassRegisterAttribute(ic, "NEXT_CONTROL_HANDLE", NULL, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NO_INHERIT | IUPAF_IHANDLE | IUPAF_NO_STRING);

return ic;
}
Expand Down
10 changes: 5 additions & 5 deletions iup/external/src/iup_backgroundbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ IUP_SDK_API Iclass* iupBackgroundBoxNewBaseClass(Iclass* ic_base) /* Used by B
iupClassRegisterAttribute(ic, "CLIENTSIZE", iBackgroundBoxGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);

/* Native Container */
iupClassRegisterAttribute(ic, "CHILDOFFSET", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "CHILDOFFSET", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);

/* replace IupCanvas behavior */
iupClassRegisterReplaceAttribFunc(ic, "BGCOLOR", iBackgroundBoxGetBgColorAttrib, NULL);
Expand All @@ -251,10 +251,10 @@ IUP_SDK_API Iclass* iupBackgroundBoxNewBaseClass(Iclass* ic_base) /* Used by B
iupClassRegisterAttribute(ic, "CANFOCUS", NULL, NULL, IUPAF_SAMEASSYSTEM, "NO", IUPAF_NO_INHERIT);

/* New */
iupClassRegisterAttribute(ic, "CANVASBOX", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "DECORATION", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "DECORSIZE", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "DECOROFFSET", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "CANVASBOX", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "DECORATION", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "DECORSIZE", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "DECOROFFSET", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);

iupClassRegisterAttribute(ic, "BACKIMAGE", NULL, iBackgroundBoxSetBackImageAttrib, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_IHANDLENAME | IUPAF_NO_DEFAULTVALUE | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "BACKIMAGEZOOM", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
Expand Down
16 changes: 8 additions & 8 deletions iup/external/src/iup_canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ Iclass* iupCanvasNewClass(void)
/* IupCanvas only */
iupClassRegisterAttribute(ic, "CURSOR", NULL, iupdrvBaseSetCursorAttrib, IUPAF_SAMEASSYSTEM, "ARROW", IUPAF_IHANDLENAME|IUPAF_NO_INHERIT);

iupClassRegisterAttribute(ic, "XMIN", NULL, NULL, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "XMAX", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YMIN", NULL, NULL, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YMAX", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "LINEX", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "LINEY", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "XMIN", NULL, NULL, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "XMAX", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YMIN", NULL, NULL, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YMAX", NULL, NULL, IUPAF_SAMEASSYSTEM, "1", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "LINEX", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "LINEY", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);

iupClassRegisterAttribute(ic, "SCROLLBAR", iCanvasGetScrollbarAttrib, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YAUTOHIDE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "XAUTOHIDE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YAUTOHIDE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "XAUTOHIDE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "XHIDDEN", NULL, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "YHIDDEN", NULL, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "SB_RESIZE", NULL, NULL, NULL, NULL, IUPAF_READONLY | IUPAF_NO_INHERIT);
Expand Down
6 changes: 3 additions & 3 deletions iup/external/src/iup_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,14 @@ typedef int (*IattribSetId2Func)(Ihandle* ih, int id1, int id2, const char* valu
* Used by \ref iupClassRegisterAttribute.
* \ingroup iclass */
typedef enum _IattribFlags{
IUPAF_DEFAULT=0, /**< inheritable, can has a default value, is a string, can call the set/get functions only if mapped, no ID */
IUPAF_DEFAULT=0, /**< inheritable, can has a default value, is a string, can call the set/get functions only if mapped, no ID (to be used alone when there are no other flags) */
IUPAF_NO_INHERIT=1, /**< is not inheritable */
IUPAF_NO_DEFAULTVALUE=2, /**< can not has a default value */
IUPAF_NO_STRING=4, /**< is not a string */
IUPAF_NOT_MAPPED=8, /**< will call the set/get functions also when not mapped */
IUPAF_HAS_ID=16, /**< can has an ID at the end of the name, automatically set by \ref iupClassRegisterAttributeId */
IUPAF_READONLY=32, /**< is read-only, can not be changed */
IUPAF_WRITEONLY=64, /**< is write-only, usually an action */
IUPAF_READONLY=32, /**< is read-only, can not be changed (except when using internal functions), get is optional, set will never be used */
IUPAF_WRITEONLY=64, /**< is write-only, usually an action, set must exist, get will never be used */
IUPAF_HAS_ID2=128, /**< can has two IDs at the end of the name, automatically set by \ref iupClassRegisterAttributeId2 */
IUPAF_CALLBACK=256, /**< is a callback, not an attribute */
IUPAF_NO_SAVE=512, /**< can NOT be directly saved, should have at least manual processing */
Expand Down
29 changes: 28 additions & 1 deletion iup/external/src/iup_classattrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,21 @@ int iupClassAttribIsRegistered(Iclass* ic, const char* name)
return 0;
}

static void iClassCheckAttrib(Iclass* ic, const char* name, IattribGetFunc get, IattribSetFunc set, int flags)
{
if (flags & IUPAF_NOT_MAPPED && !get && !set)
fprintf(stderr, "iupClassRegisterAttribute(%s, [%s]) - NOT_MAPPED used but no get or set!\n", ic->name, name);

if (flags & IUPAF_READONLY && set)
fprintf(stderr, "iupClassRegisterAttribute(%s, [%s]) - READONLY used and set defined, set will never be called!\n", ic->name, name);

if (flags & IUPAF_WRITEONLY && !set)
fprintf(stderr, "iupClassRegisterAttribute(%s, [%s]) - WRITEONLY used but set not defined!\n", ic->name, name);

if (flags & IUPAF_WRITEONLY && get)
fprintf(stderr, "iupClassRegisterAttribute(%s, [%s]) - WRITEONLY used and get defined, get will never be called!\n", ic->name, name);
}

IUP_SDK_API void iupClassRegisterAttribute(Iclass* ic, const char* name,
IattribGetFunc _get, IattribSetFunc _set,
const char* _default_value, const char* _system_default, int _flags)
Expand All @@ -546,6 +561,10 @@ IUP_SDK_API void iupClassRegisterAttribute(Iclass* ic, const char* name,
if (afunc)
free(afunc); /* overwrite a previous registration */

#ifdef IUP_ASSERT
iClassCheckAttrib(ic, name, _get, _set, _flags);
#endif

afunc = (IattribFunc*)malloc(sizeof(IattribFunc));
afunc->get = _get;
afunc->set = _set;
Expand All @@ -572,6 +591,10 @@ IUP_SDK_API void iupClassRegisterAttributeId(Iclass* ic, const char* name,
if (afunc)
free(afunc); /* overwrite a previous registration */

#ifdef IUP_ASSERT
iClassCheckAttrib(ic, name, (IattribGetFunc)_get, (IattribSetFunc)_set, _flags);
#endif

afunc = (IattribFunc*)malloc(sizeof(IattribFunc));
afunc->get = (IattribGetFunc)_get;
afunc->set = (IattribSetFunc)_set;
Expand All @@ -591,6 +614,10 @@ IUP_SDK_API void iupClassRegisterAttributeId2(Iclass* ic, const char* name,
if (afunc)
free(afunc); /* overwrite a previous registration */

#ifdef IUP_ASSERT
iClassCheckAttrib(ic, name, (IattribGetFunc)_get, (IattribSetFunc)_set, _flags);
#endif

afunc = (IattribFunc*)malloc(sizeof(IattribFunc));
afunc->get = (IattribGetFunc)_get;
afunc->set = (IattribSetFunc)_set;
Expand Down Expand Up @@ -754,7 +781,7 @@ IUP_API void IupSetClassDefaultAttribute(const char* classname, const char *name
if (!name)
return;

ic = iupRegisterFindClass(name);
ic = iupRegisterFindClass(classname);
if (!ic)
return;

Expand Down
16 changes: 8 additions & 8 deletions iup/external/src/iup_classbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ IUP_SDK_API void iupBaseRegisterCommonAttrib(Iclass* ic)
iupClassRegisterAttribute(ic, "FLOATING", iBaseGetFloatingAttrib, iBaseSetFloatingAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "EXPAND", iupBaseGetExpandAttrib, iupBaseSetExpandAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "NORMALIZERGROUP", iBaseGetNormalizerGroupAttrib, iBaseSetNormalizerGroupAttrib, NULL, NULL, IUPAF_IHANDLENAME|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "EXPANDWEIGHT", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "HANDLENAME", NULL, NULL, NULL, NULL, IUPAF_NO_SAVE | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "EXPANDWEIGHT", NULL, NULL, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "HANDLENAME", NULL, NULL, NULL, NULL, IUPAF_NO_SAVE | IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "THEME", NULL, iBaseSetThemeAttrib, NULL, NULL, IUPAF_IHANDLENAME | IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "NTHEME", NULL, iBaseSetThemeAttrib, NULL, NULL, IUPAF_IHANDLENAME | IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT);

Expand All @@ -664,7 +664,7 @@ IUP_SDK_API void iupBaseRegisterCommonAttrib(Iclass* ic)

/* if not native container, must set at children,
native container will automatically hide its children. */
iupClassRegisterAttribute(ic, "VISIBLE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_SAVE|IUPAF_DEFAULT); /* inherited */
iupClassRegisterAttribute(ic, "VISIBLE", NULL, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NO_SAVE); /* inherited */

iupClassRegisterAttribute(ic, "SIZE", iupBaseGetSizeAttrib, iupBaseSetSizeAttrib, NULL, NULL, IUPAF_NO_SAVE|IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "RASTERSIZE", iupBaseGetRasterSizeAttrib, iupBaseSetRasterSizeAttrib, NULL, NULL, IUPAF_NO_SAVE|IUPAF_NO_DEFAULTVALUE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT);
Expand All @@ -687,7 +687,7 @@ IUP_SDK_API void iupBaseRegisterCommonAttrib(Iclass* ic)

IUP_SDK_API void iupBaseRegisterVisualAttrib(Iclass* ic)
{
iupClassRegisterAttribute(ic, "VISIBLE", iupBaseGetVisibleAttrib, iupBaseSetVisibleAttrib, "YES", "NO", IUPAF_NO_SAVE | IUPAF_DEFAULT); /* must be inheritable to propagate visual state to children and from parent */
iupClassRegisterAttribute(ic, "VISIBLE", iupBaseGetVisibleAttrib, iupBaseSetVisibleAttrib, "YES", "NO", IUPAF_NO_SAVE); /* must be inheritable to propagate visual state to children and from parent */
iupClassRegisterAttribute(ic, "ACTIVE", iupBaseGetActiveAttrib, iupBaseSetActiveAttrib, IUPAF_SAMEASSYSTEM, "YES", IUPAF_DEFAULT); /* must be inheritable to propagate visual state to children and from parent */

iupClassRegisterAttribute(ic, "ZORDER", NULL, iupdrvBaseSetZorderAttrib, NULL, NULL, IUPAF_WRITEONLY|IUPAF_NO_INHERIT);
Expand All @@ -697,10 +697,10 @@ IUP_SDK_API void iupBaseRegisterVisualAttrib(Iclass* ic)

iupClassRegisterAttribute(ic, "TIP", NULL, iupdrvBaseSetTipAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "TIPVISIBLE", iupdrvBaseGetTipVisibleAttrib, iupdrvBaseSetTipVisibleAttrib, NULL, NULL, IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "TIPDELAY", NULL, NULL, IUPAF_SAMEASSYSTEM, "5000", IUPAF_NOT_MAPPED); /* 5 seconds */
iupClassRegisterAttribute(ic, "TIPBGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "255 255 225", IUPAF_NOT_MAPPED); /* Light Yellow */
iupClassRegisterAttribute(ic, "TIPFGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "0 0 0", IUPAF_NOT_MAPPED); /* black */
iupClassRegisterAttribute(ic, "TIPRECT", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "TIPDELAY", NULL, NULL, IUPAF_SAMEASSYSTEM, "5000", IUPAF_DEFAULT); /* 5 seconds */
iupClassRegisterAttribute(ic, "TIPBGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "255 255 225", IUPAF_DEFAULT); /* Light Yellow */
iupClassRegisterAttribute(ic, "TIPFGCOLOR", NULL, NULL, IUPAF_SAMEASSYSTEM, "0 0 0", IUPAF_DEFAULT); /* black */
iupClassRegisterAttribute(ic, "TIPRECT", NULL, NULL, IUPAF_SAMEASSYSTEM, NULL, IUPAF_DEFAULT);

iupdrvBaseRegisterVisualAttrib(ic);
}
Expand Down
Loading

0 comments on commit a3b3bba

Please sign in to comment.