diff --git a/include/Mw/Core.h b/include/Mw/Core.h
index a1fe00e..226d5ad 100644
--- a/include/Mw/Core.h
+++ b/include/Mw/Core.h
@@ -293,6 +293,13 @@ MWDECL void MwToggleDarkTheme(MwWidget handle, int toggle);
*/
MWDECL MwWidget MwGetParent(MwWidget handle);
+/*!
+ * @brief Show widget
+ * @param handle Widget
+ * @param toggle Toggle
+ */
+MWDECL void MwShow(MwWidget handle, int toggle);
+
#ifdef __cplusplus
}
#endif
diff --git a/milsko.xml b/milsko.xml
index a9ddae4..e8be727 100644
--- a/milsko.xml
+++ b/milsko.xml
@@ -334,6 +334,13 @@
+
+
+
+
+
+
+
diff --git a/src/backend/call.c b/src/backend/call.c
index 117f5f9..fc3dc9b 100644
--- a/src/backend/call.c
+++ b/src/backend/call.c
@@ -43,7 +43,7 @@
MwLLMakePopup = MwLLMakePopupImpl; \
\
MwLLBeginStateChange = MwLLBeginStateChangeImpl; \
- MwLLEndStateChange = MwLLEndStateChangeImpl; \
+ MwLLEndStateChange = MwLLEndStateChangeImpl; \
\
MwLLSetBackground = MwLLSetBackgroundImpl; \
\
diff --git a/src/backend/gdi.c b/src/backend/gdi.c
index b5251fd..c1d53a9 100644
--- a/src/backend/gdi.c
+++ b/src/backend/gdi.c
@@ -570,7 +570,7 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
static void MwLLDetachImpl(MwLL handle, MwPoint* point) {
RECT rc, rc2;
- LPARAM lp = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE);
+ LPARAM lp = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE);
LPARAM lp2 = GetWindowLongPtr(handle->gdi.hWnd, GWL_EXSTYLE);
lp &= WS_VISIBLE;
@@ -579,9 +579,9 @@ static void MwLLDetachImpl(MwLL handle, MwPoint* point) {
GetClientRect(handle->gdi.hWnd, &rc2);
- if(lp2 & WS_EX_TOOLWINDOW){
+ if(lp2 & WS_EX_TOOLWINDOW) {
SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, (LPARAM)lp);
- }else{
+ } else {
SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, (LPARAM)WS_OVERLAPPEDWINDOW | lp);
}
SetParent(handle->gdi.hWnd, NULL);
@@ -702,7 +702,7 @@ static char* MwLLGetClipboardImpl(MwLL handle) {
static void MwLLMakeToolWindowImpl(MwLL handle) {
LPARAM lp = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE) & (WS_VISIBLE | WS_CHILD);
RECT rc;
- int w, h;
+ int w, h;
SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, (LPARAM)lp);
SetWindowLongPtr(handle->gdi.hWnd, GWL_EXSTYLE, (LPARAM)WS_EX_TOOLWINDOW);
@@ -715,12 +715,13 @@ static void MwLLMakeToolWindowImpl(MwLL handle) {
SetWindowPos(handle->gdi.hWnd, NULL, 0, 0, w, h, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
}
-static void MwLLBeginStateChangeImpl(MwLL handle){
+static void MwLLBeginStateChangeImpl(MwLL handle) {
(void)handle;
}
-static void MwLLEndStateChangeImpl(MwLL handle){
- (void)handle;;
+static void MwLLEndStateChangeImpl(MwLL handle) {
+ (void)handle;
+ ;
}
static int MwLLGDICallInitImpl(void) {
diff --git a/src/backend/x11.c b/src/backend/x11.c
index afc5e73..b48e1e5 100644
--- a/src/backend/x11.c
+++ b/src/backend/x11.c
@@ -971,11 +971,11 @@ static void MwLLMakeToolWindowImpl(MwLL handle) {
XChangeProperty(handle->x11.display, handle->x11.window, wndtype, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wndmenu, 1);
}
-static void MwLLBeginStateChangeImpl(MwLL handle){
+static void MwLLBeginStateChangeImpl(MwLL handle) {
MwLLShow(handle, 0);
}
-static void MwLLEndStateChangeImpl(MwLL handle){
+static void MwLLEndStateChangeImpl(MwLL handle) {
MwLLShow(handle, 1);
}
diff --git a/src/core.c b/src/core.c
index 0bd3d02..81a8d33 100644
--- a/src/core.c
+++ b/src/core.c
@@ -629,3 +629,7 @@ int MwLibraryInit(void) {
return 1;
}
+
+void MwShow(MwWidget handle, int toggle) {
+ MwLLShow(handle->lowlevel, toggle);
+}
diff --git a/src/widget/frame.c b/src/widget/frame.c
index 084dba9..e313a7e 100644
--- a/src/widget/frame.c
+++ b/src/widget/frame.c
@@ -14,7 +14,7 @@ static void draw(MwWidget handle) {
MwRect fr;
MwRect rr;
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
- int inverted;
+ int inverted;
if(MwGetInteger(handle, MwNhasBorder)) {
inverted = MwGetInteger(handle, MwNinverted);