+ wxDirection dir = wxALL;
+
+ int horiz_dist = abs(win_rect.x - m_last3_rect.x);
+ int vert_dist = abs(win_rect.y - m_last3_rect.y);
+
+ if (vert_dist >= horiz_dist)
+ {
+ if (win_rect.y < m_last3_rect.y)
+ dir = wxNORTH;
+ else
+ dir = wxSOUTH;
+ }
+ else
+ {
+ if (win_rect.x < m_last3_rect.x)
+ dir = wxWEST;
+ else
+ dir = wxEAST;
+ }
+
+ m_last3_rect = m_last2_rect;
+ m_last2_rect = m_last_rect;