]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxSHOW_EFFECT_NONE.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 5 Oct 2009 22:53:57 +0000 (22:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 5 Oct 2009 22:53:57 +0000 (22:53 +0000)
Calling Show/HideWithEffect() with this effect is the same as calling just the normal Show/Hide().

This is convenient as it allows to use the same API, whether with effects or without them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/window.h
interface/wx/window.h
samples/shaped/shaped.cpp
src/msw/window.cpp

index d85c077433d0db2842cd4e48535f3ebbdab7daf4..42a300ef827f992d30c33283e627d932751dec14 100644 (file)
@@ -118,6 +118,7 @@ enum wxWindowVariant
 // valid values for Show/HideWithEffect()
 enum wxShowEffect
 {
+    wxSHOW_EFFECT_NONE,
     wxSHOW_EFFECT_ROLL_TO_LEFT,
     wxSHOW_EFFECT_ROLL_TO_RIGHT,
     wxSHOW_EFFECT_ROLL_TO_TOP,
index f14f24f050161a53b2b9bd3a5016bb2c59d54aea..c3a1924e3c8458b68458a3846fead2152c861fb8 100644 (file)
 */
 enum wxShowEffect
 {
+    /**
+        No effect, equivalent to normal wxWindow::Show() or Hide() call.
+
+        @since 2.9.1
+     */
+    wxSHOW_EFFECT_NONE,
+
     /// Roll window to the left
     wxSHOW_EFFECT_ROLL_TO_LEFT,
 
index 6f93d5c8c11b14bcee4ade3b5e3eafdc64c741d1..6e9a0d955c60f22fe617811fb033c0d0fc144957 100644 (file)
@@ -181,6 +181,7 @@ private:
     {
         static const char *names[] =
         {
+            "none",
             "roll to left",
             "roll to right",
             "roll to top",
@@ -346,7 +347,7 @@ void MainFrame::OnShowEffect(wxCommandEvent& event)
             return;
     }
 
-    new EffectFrame(this, eff,1000);
+    new EffectFrame(this,  eff, 1000);
 }
 
 // ----------------------------------------------------------------------------
index 4316f77e8b93f28a2c7c64834fe884807684a8ea..72d9fe96c124bf1eb60a44eab89912da9a31c43a 100644 (file)
@@ -724,6 +724,9 @@ wxWindowMSW::MSWShowWithEffect(bool show,
                                wxShowEffect effect,
                                unsigned timeout)
 {
+    if ( effect == wxSHOW_EFFECT_NONE )
+        return Show(show);
+
     if ( !wxWindowBase::Show(show) )
         return false;