diff --git a/WINGs/WINGs/WINGs.h b/WINGs/WINGs/WINGs.h index 037f2762..e460ef43 100644 --- a/WINGs/WINGs/WINGs.h +++ b/WINGs/WINGs/WINGs.h @@ -1069,6 +1069,9 @@ void WMSetButtonTextAlignment(WMButton *bPtr, WMAlignment alignment); void WMSetButtonText(WMButton *bPtr, const char *text); +/* Returns direct pointer to internal data, do not modify! */ +const char *WMGetButtonText(WMButton *bPtr); + void WMSetButtonAltText(WMButton *bPtr, const char *text); void WMSetButtonTextColor(WMButton *bPtr, WMColor *color); diff --git a/WINGs/wbutton.c b/WINGs/wbutton.c index 341bdc8f..c217edd4 100644 --- a/WINGs/wbutton.c +++ b/WINGs/wbutton.c @@ -325,6 +325,11 @@ void WMSetButtonText(WMButton * bPtr, const char *text) } } +const char *WMGetButtonText(WMButton *bPtr) +{ + return bPtr->caption; +} + void WMSetButtonAltText(WMButton * bPtr, const char *text) { if (bPtr->altCaption)