#include "wx/setup.h"
#include "wx/menu.h"
+#include "wx/window.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/utils.h"
#include "wx/tabctrl.h"
#include "wx/tooltip.h"
#include "wx/statusbr.h"
-// TODO remove the line below, just for lookup-up convenience CS
-#include "wx/window.h"
-
#include "wx/menuitem.h"
#include "wx/log.h"
bool wxWindow::MacIsReallyShown() const
{
+ if ( m_isShown && (m_parent != NULL) ) {
+ return m_parent->MacIsReallyShown();
+ }
+ return m_isShown;
+/*
bool status = m_isShown ;
wxWindow * win = this ;
while ( status && win->m_parent != NULL )
status = win->m_isShown ;
}
return status ;
+*/
}
int wxWindow::GetCharHeight() const
wxClientDC dc( (wxWindow*) this ) ;
long lx,ly,ld,le ;
- dc.GetTextExtent( string , &lx , &ly , &ld, &le, fontToUse ) ;
+ dc.GetTextExtent( string , &lx , &ly , &ld, &le, (wxFont *)fontToUse ) ;
if ( externalLeading )
*externalLeading = le ;
if ( descent )
{
wclass = kMovableModalWindowClass ;
}
- else if ( HasFlag( wxDIALOG_MODELESS ) )
+ else
{
wclass = kDocumentWindowClass ;
}
- /*
- else
- {
- if ( HasFlag( wxCAPTION ) )
- {
- wclass = kDocumentWindowClass ;
- }
- else
- {
- wclass = kModalWindowClass ;
- }
- }
- */
}
else
{
}
void wxWindow::MacActivate( EventRecord *ev , bool inIsActivating )
{
- wxActivateEvent event(wxEVT_ACTIVATE, inIsActivating);
+ wxActivateEvent event(wxEVT_ACTIVATE, inIsActivating , m_windowId);
event.m_timeStamp = ev->when ;
event.SetEventObject(this);
{
return style & ~( wxDOUBLE_BORDER | wxSUNKEN_BORDER | wxRAISED_BORDER | wxBORDER | wxSTATIC_BORDER ) ;
}
-
+/*
+wxMacFocusHelper::wxMacFocusHelper( wxWindow * theWindow )
+{
+ m_ok = false ;
+ Point localOrigin ;
+ Rect clipRect ;
+ WindowRef window ;
+ wxWindow *rootwin ;
+ m_currentPort = NULL ;
+ GetPort( &m_formerPort ) ;
+ if ( theWindow )
+ {
+
+ theWindow->MacGetPortParams( &localOrigin , &clipRect , &window , &rootwin) ;
+ m_currentPort = UMAGetWindowPort( window ) ;
+ theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ;
+ m_ok = true ;
+ }
+}
+
+wxMacFocusHelper::~wxMacFocusHelper()
+{
+ if ( m_ok )
+ {
+ SetPort( m_currentPort ) ;
+ SetOrigin( 0 , 0 ) ;
+ }
+ if ( m_formerPort != m_currentPort )
+ SetPort( m_formerPort ) ;
+}
+*/
wxMacDrawingHelper::wxMacDrawingHelper( wxWindow * theWindow )
{