// generic
InitBase();
- // MSW specific
- m_doubleClickAllowed = 0;
- m_winCaptured = FALSE;
-
m_isBeingDeleted = FALSE;
-
- m_useCtl3D = FALSE;
- m_mouseInWindow = FALSE;
-
- m_xThumbSize = 0;
- m_yThumbSize = 0;
m_backgroundTransparent = FALSE;
// as all windows are created with WS_VISIBLE style...
}
m_isBeingDeleted = TRUE;
-
+
#ifndef __WXUNIVERSAL__
// VS: make sure there's no wxFrame with last focus set to us:
for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
if ( !wxWindowBase::Show(show) )
return FALSE;
-/*
- WindowRef window = (WindowRef) MacGetRootWindow() ;
- wxWindowMac* win = wxFindWinFromMacWindow( window ) ;
- if ( win == NULL && win->m_isBeingDeleted )
- return FALSE ;
-*/
MacSuperShown( show ) ;
Refresh() ;
-/*
- if ( !show )
- {
- if ( win && !win->m_isBeingDeleted )
- Refresh() ;
- }
- else
- {
- Refresh() ;
- }
-*/
+
return TRUE;
}
wxWindowListNode *node = GetChildren().GetFirst();
while ( node )
{
- wxWindowMac *child = (wxWindowMac *)node->GetData();
+ wxWindowMac *child = node->GetData();
if ( child->m_isShown )
child->MacSuperShown( show ) ;
node = node->GetNext();
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
{
- wxWindowMac *child = (wxWindowMac*)node->GetData();
+ wxWindowMac *child = node->GetData();
if (child == m_vScrollBar) continue;
if (child == m_hScrollBar) continue;
if (child->IsTopLevel()) continue;
void wxWindowMac::OnIdle(wxIdleEvent& event)
{
-/*
- // Check if we need to send a LEAVE event
- if (m_mouseInWindow)
- {
- POINT pt;
- ::GetCursorPos(&pt);
- if (::WindowFromPoint(pt) != (HWND) GetHWND())
- {
- // Generate a LEAVE event
- m_mouseInWindow = FALSE;
- MSWOnMouseLeave(pt.x, pt.y, 0);
- }
- }
-*/
-
// This calls the UI-update mechanism (querying windows for
// menu/toolbar/control state information)
UpdateWindowUI();
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
{
- wxWindowMac *child = (wxWindowMac*)node->GetData();
+ wxWindowMac *child = node->GetData();
// added the m_isShown test --dmazzoni
if ( child->MacGetRootWindow() == window && child->m_isShown )
{
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
{
- wxWindowMac *child = (wxWindowMac*)node->GetData();
+ wxWindowMac *child = node->GetData();
if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
{
if (child->MacDispatchMouseEvent(event))
{
return m_tooltip->GetTip() ;
}
- return "" ;
+ return wxEmptyString ;
}
void wxWindowMac::Update()
{
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
{
- wxWindowMac *child = (wxWindowMac*)node->GetData();
+ wxWindowMac *child = node->GetData();
if ( !child->IsTopLevel() && child->IsShown() )
{
bool thisWindowThrough = false ;
for (wxWindowListNode *node = GetParent()->GetChildren().GetFirst(); node; node = node->GetNext())
{
- wxWindowMac *sibling = (wxWindowMac*)node->GetData();
+ wxWindowMac *sibling = node->GetData();
if ( sibling == this )
{
thisWindowThrough = true ;
{
// calculate the update region for the child windows by intersecting the window rectangle with our own
// passed in update region and then offset it to be client-wise window coordinates again
- wxWindowMac *child = (wxWindowMac*)node->GetData();
+ wxWindowMac *child = node->GetData();
SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
SectRgn( childupdate , updatergn , childupdate ) ;
OffsetRgn( childupdate , -child->m_x , -child->m_y ) ;
iter = iter->GetParent() ;
}
- wxASSERT_MSG( 1 , "No valid mac root window" ) ;
+ wxASSERT_MSG( 1 , wxT("No valid mac root window") ) ;
return NULL ;
}
void wxWindowMac::MacCreateScrollBars( long style )
{
- wxASSERT_MSG( m_vScrollBar == NULL && m_hScrollBar == NULL , "attempt to create window twice" ) ;
+ wxASSERT_MSG( m_vScrollBar == NULL && m_hScrollBar == NULL , wxT("attempt to create window twice") ) ;
bool hasBoth = ( style & wxVSCROLL ) && ( style & wxHSCROLL ) ;
int adjust = hasBoth ? MAC_SCROLLBAR_SIZE - 1: 0 ;
wxWindowListNode *node = GetChildren().GetFirst();
while ( node )
{
- wxWindowMac *child = (wxWindowMac *)node->GetData();
+ wxWindowMac *child = node->GetData();
child->MacSuperChangedPosition() ;
node = node->GetNext();
}
wxWindowListNode *node = GetChildren().GetFirst();
while ( node )
{
- wxWindowMac *child = (wxWindowMac *)node->GetData();
+ wxWindowMac *child = node->GetData();
child->MacTopLevelWindowChangedPosition() ;
node = node->GetNext();
}
if ( event.GetEventType() == wxEVT_RIGHT_DOWN )
{
// copied from wxGTK : CS
- // generate a "context menu" event: this is similar to wxEVT_RIGHT_UP
+ // generate a "context menu" event: this is similar to wxEVT_RIGHT_DOWN
// except that:
//
// (a) it's a command event and so is propagated to the parent
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU,
this->GetId(),
this->ClientToScreen(event.GetPosition()));
- this->GetEventHandler()->ProcessEvent(evtCtx);
+ if ( ! GetEventHandler()->ProcessEvent(evtCtx) )
+ event.Skip() ;
}
else
{