From 375a6d9b157aab42c0a4e866ff5933494a2ea081 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 25 Feb 2016 09:22:31 +0100 Subject: wx: Add wxWindow SetDoubleBuffered and IsDoubleBuffered from wxWidgets 3.0 This is really needed on windows to get rid of flickering when updating some widgets. These functions are only available if 3.0 and not on mac where everything is double buffered already. --- lib/wx/src/gen/wxWindow.erl | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) (limited to 'lib/wx/src/gen/wxWindow.erl') diff --git a/lib/wx/src/gen/wxWindow.erl b/lib/wx/src/gen/wxWindow.erl index 09928de09a..0d1a2d9994 100644 --- a/lib/wx/src/gen/wxWindow.erl +++ b/lib/wx/src/gen/wxWindow.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2013. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -45,18 +45,18 @@ getSize/1,getSizer/1,getTextExtent/2,getTextExtent/3,getToolTip/1, getUpdateRegion/1,getVirtualSize/1,getWindowStyleFlag/1,getWindowVariant/1, hasCapture/1,hasScrollbar/2,hasTransparentBackground/1,hide/1,inheritAttributes/1, - initDialog/1,invalidateBestSize/1,isEnabled/1,isExposed/2,isExposed/3, - isExposed/5,isRetained/1,isShown/1,isTopLevel/1,layout/1,lineDown/1, - lineUp/1,lower/1,makeModal/1,makeModal/2,move/2,move/3,move/4,moveAfterInTabOrder/2, - moveBeforeInTabOrder/2,navigate/1,navigate/2,new/0,new/2,new/3,pageDown/1, - pageUp/1,popEventHandler/1,popEventHandler/2,popupMenu/2,popupMenu/3, - popupMenu/4,raise/1,refresh/1,refresh/2,refreshRect/2,refreshRect/3, - releaseMouse/1,removeChild/2,reparent/2,screenToClient/1,screenToClient/2, - scrollLines/2,scrollPages/2,scrollWindow/3,scrollWindow/4,setAcceleratorTable/2, - setAutoLayout/2,setBackgroundColour/2,setBackgroundStyle/2,setCaret/2, - setClientSize/2,setClientSize/3,setContainingSizer/2,setCursor/2, - setDropTarget/2,setExtraStyle/2,setFocus/1,setFocusFromKbd/1,setFont/2, - setForegroundColour/2,setHelpText/2,setId/2,setLabel/2,setMaxSize/2, + initDialog/1,invalidateBestSize/1,isDoubleBuffered/1,isEnabled/1, + isExposed/2,isExposed/3,isExposed/5,isRetained/1,isShown/1,isTopLevel/1, + layout/1,lineDown/1,lineUp/1,lower/1,makeModal/1,makeModal/2,move/2, + move/3,move/4,moveAfterInTabOrder/2,moveBeforeInTabOrder/2,navigate/1, + navigate/2,new/0,new/2,new/3,pageDown/1,pageUp/1,popEventHandler/1,popEventHandler/2, + popupMenu/2,popupMenu/3,popupMenu/4,raise/1,refresh/1,refresh/2,refreshRect/2, + refreshRect/3,releaseMouse/1,removeChild/2,reparent/2,screenToClient/1, + screenToClient/2,scrollLines/2,scrollPages/2,scrollWindow/3,scrollWindow/4, + setAcceleratorTable/2,setAutoLayout/2,setBackgroundColour/2,setBackgroundStyle/2, + setCaret/2,setClientSize/2,setClientSize/3,setContainingSizer/2,setCursor/2, + setDoubleBuffered/2,setDropTarget/2,setExtraStyle/2,setFocus/1,setFocusFromKbd/1, + setFont/2,setForegroundColour/2,setHelpText/2,setId/2,setLabel/2,setMaxSize/2, setMinSize/2,setName/2,setOwnBackgroundColour/2,setOwnFont/2,setOwnForegroundColour/2, setPalette/2,setScrollPos/3,setScrollPos/4,setScrollbar/5,setScrollbar/6, setSize/2,setSize/3,setSize/5,setSize/6,setSizeHints/2,setSizeHints/3, @@ -1910,6 +1910,23 @@ warpPointer(#wx_ref{type=ThisT,ref=ThisRef},X,Y) wxe_util:cast(?wxWindow_WarpPointer, <>). +%% @doc See external documentation. +-spec isDoubleBuffered(This) -> boolean() when + This::wxWindow(). +isDoubleBuffered(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxWindow), + wxe_util:call(?wxWindow_IsDoubleBuffered, + <>). + +%% @doc See external documentation. +-spec setDoubleBuffered(This, On) -> ok when + This::wxWindow(), On::boolean(). +setDoubleBuffered(#wx_ref{type=ThisT,ref=ThisRef},On) + when is_boolean(On) -> + ?CLASS(ThisT,wxWindow), + wxe_util:cast(?wxWindow_SetDoubleBuffered, + <>). + %% @doc Destroys this object, do not use object again -spec destroy(This::wxWindow()) -> ok. destroy(Obj=#wx_ref{type=Type}) -> -- cgit v1.2.3 From 125016706cdfb30f6462076d5bf7c0144a3d2373 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 29 Feb 2016 09:17:37 +0100 Subject: wx: Add wxWindow:SetTransparent and CanSetTransperant Available in at least 2.8.12 and later. --- lib/wx/src/gen/wxWindow.erl | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'lib/wx/src/gen/wxWindow.erl') diff --git a/lib/wx/src/gen/wxWindow.erl b/lib/wx/src/gen/wxWindow.erl index 0d1a2d9994..a8a61d547b 100644 --- a/lib/wx/src/gen/wxWindow.erl +++ b/lib/wx/src/gen/wxWindow.erl @@ -28,13 +28,13 @@ -module(wxWindow). -include("wxe.hrl"). --export(['Destroy'/1,cacheBestSize/2,captureMouse/1,center/1,center/2,centerOnParent/1, - centerOnParent/2,centre/1,centre/2,centreOnParent/1,centreOnParent/2, - clearBackground/1,clientToScreen/2,clientToScreen/3,close/1,close/2, - convertDialogToPixels/2,convertPixelsToDialog/2,destroy/1,destroyChildren/1, - disable/1,enable/1,enable/2,findFocus/0,findWindow/2,findWindowById/1, - findWindowById/2,findWindowByLabel/1,findWindowByLabel/2,findWindowByName/1, - findWindowByName/2,fit/1,fitInside/1,freeze/1,getAcceleratorTable/1, +-export(['Destroy'/1,cacheBestSize/2,canSetTransparent/1,captureMouse/1,center/1, + center/2,centerOnParent/1,centerOnParent/2,centre/1,centre/2,centreOnParent/1, + centreOnParent/2,clearBackground/1,clientToScreen/2,clientToScreen/3, + close/1,close/2,convertDialogToPixels/2,convertPixelsToDialog/2,destroy/1, + destroyChildren/1,disable/1,enable/1,enable/2,findFocus/0,findWindow/2, + findWindowById/1,findWindowById/2,findWindowByLabel/1,findWindowByLabel/2, + findWindowByName/1,findWindowByName/2,fit/1,fitInside/1,freeze/1,getAcceleratorTable/1, getBackgroundColour/1,getBackgroundStyle/1,getBestSize/1,getCapture/0, getCaret/1,getCharHeight/1,getCharWidth/1,getChildren/1,getClientSize/1, getContainingSizer/1,getCursor/1,getDropTarget/1,getEventHandler/1, @@ -61,8 +61,8 @@ setPalette/2,setScrollPos/3,setScrollPos/4,setScrollbar/5,setScrollbar/6, setSize/2,setSize/3,setSize/5,setSize/6,setSizeHints/2,setSizeHints/3, setSizeHints/4,setSizer/2,setSizer/3,setSizerAndFit/2,setSizerAndFit/3, - setThemeEnabled/2,setToolTip/2,setVirtualSize/2,setVirtualSize/3, - setVirtualSizeHints/2,setVirtualSizeHints/3,setVirtualSizeHints/4, + setThemeEnabled/2,setToolTip/2,setTransparent/2,setVirtualSize/2, + setVirtualSize/3,setVirtualSizeHints/2,setVirtualSizeHints/3,setVirtualSizeHints/4, setWindowStyle/2,setWindowStyleFlag/2,setWindowVariant/2,shouldInheritColours/1, show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1, update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]). @@ -1910,6 +1910,23 @@ warpPointer(#wx_ref{type=ThisT,ref=ThisRef},X,Y) wxe_util:cast(?wxWindow_WarpPointer, <>). +%% @doc See external documentation. +-spec setTransparent(This, Alpha) -> boolean() when + This::wxWindow(), Alpha::integer(). +setTransparent(#wx_ref{type=ThisT,ref=ThisRef},Alpha) + when is_integer(Alpha) -> + ?CLASS(ThisT,wxWindow), + wxe_util:call(?wxWindow_SetTransparent, + <>). + +%% @doc See external documentation. +-spec canSetTransparent(This) -> boolean() when + This::wxWindow(). +canSetTransparent(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxWindow), + wxe_util:call(?wxWindow_CanSetTransparent, + <>). + %% @doc See external documentation. -spec isDoubleBuffered(This) -> boolean() when This::wxWindow(). -- cgit v1.2.3