changed ShowWithEffects() to use directional wxSHOW_EFFECT_XXX flags instead of additional wxDirection argument that doesn't always make sense; this also means the direction is never implicit

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-05-08 21:56:26 +00:00
parent f992f2ae26
commit eed04c9999
5 changed files with 165 additions and 110 deletions

View File

@@ -61,16 +61,14 @@ public:
virtual bool Show(bool show = true);
virtual bool ShowWithEffect(wxShowEffect effect,
unsigned timeout = 0,
wxDirection dir = wxBOTTOM)
unsigned timeout = 0)
{
return MSWShowWithEffect(true, effect, timeout, dir);
return MSWShowWithEffect(true, effect, timeout);
}
virtual bool HideWithEffect(wxShowEffect effect,
unsigned timeout = 0,
wxDirection dir = wxBOTTOM)
unsigned timeout = 0)
{
return MSWShowWithEffect(false, effect, timeout, dir);
return MSWShowWithEffect(false, effect, timeout);
}
virtual void SetFocus();
@@ -431,8 +429,7 @@ public:
// common part of Show/HideWithEffect()
bool MSWShowWithEffect(bool show,
wxShowEffect effect,
unsigned timeout,
wxDirection dir);
unsigned timeout);
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);

View File

@@ -118,8 +118,14 @@ enum wxWindowVariant
// valid values for Show/HideWithEffect()
enum wxShowEffect
{
wxSHOW_EFFECT_ROLL,
wxSHOW_EFFECT_SLIDE,
wxSHOW_EFFECT_ROLL_TO_LEFT,
wxSHOW_EFFECT_ROLL_TO_RIGHT,
wxSHOW_EFFECT_ROLL_TO_TOP,
wxSHOW_EFFECT_ROLL_TO_BOTTOM,
wxSHOW_EFFECT_SLIDE_TO_LEFT,
wxSHOW_EFFECT_SLIDE_TO_RIGHT,
wxSHOW_EFFECT_SLIDE_TO_TOP,
wxSHOW_EFFECT_SLIDE_TO_BOTTOM,
wxSHOW_EFFECT_BLEND,
wxSHOW_EFFECT_EXPAND,
wxSHOW_EFFECT_MAX
@@ -538,27 +544,15 @@ public:
//
// timeout specifies how long the animation should take, in ms, the
// default value of 0 means to use the default (system-dependent) value
//
// direction is only used with wxSHOW_EFFECT_ROLL and SLIDE values
virtual bool ShowWithEffect(wxShowEffect effect,
unsigned timeout = 0,
wxDirection dir = wxBOTTOM)
virtual bool ShowWithEffect(wxShowEffect WXUNUSED(effect),
unsigned WXUNUSED(timeout) = 0)
{
wxUnusedVar(effect);
wxUnusedVar(timeout);
wxUnusedVar(dir);
return Show();
}
virtual bool HideWithEffect(wxShowEffect effect,
unsigned timeout = 0,
wxDirection dir = wxBOTTOM)
virtual bool HideWithEffect(wxShowEffect WXUNUSED(effect),
unsigned WXUNUSED(timeout) = 0)
{
wxUnusedVar(effect);
wxUnusedVar(timeout);
wxUnusedVar(dir);
return Hide();
}