-#include "wx/dc.h"
-#include "wx/dcclient.h"
-#include "wx/utils.h"
-#include "wx/app.h"
-#include "wx/panel.h"
-#include "wx/layout.h"
-#include "wx/dialog.h"
-#include "wx/listbox.h"
-#include "wx/scrolbar.h"
-#include "wx/statbox.h"
-#include "wx/button.h"
-#include "wx/settings.h"
-#include "wx/msgdlg.h"
-#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/log.h"
+ #include "wx/app.h"
+ #include "wx/utils.h"
+ #include "wx/panel.h"
+ #include "wx/frame.h"
+ #include "wx/dc.h"
+ #include "wx/dcclient.h"
+ #include "wx/button.h"
+ #include "wx/menu.h"
+ #include "wx/dialog.h"
+ #include "wx/settings.h"
+ #include "wx/msgdlg.h"
+ #include "wx/scrolbar.h"
+ #include "wx/statbox.h"
+ #include "wx/listbox.h"
+ #include "wx/layout.h"
+ #include "wx/statusbr.h"
+ #include "wx/menuitem.h"
+#endif
+
#endif // wxUSE_STATBOX
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
#endif // wxUSE_STATBOX
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
wxControl* control = wxDynamicCast( gFocusWindow , wxControl ) ;
if ( control && control->GetMacControl() )
{
UMASetKeyboardFocus( (WindowRef) gFocusWindow->MacGetRootWindow() , (ControlHandle) control->GetMacControl() , kControlFocusNextPart ) ;
}
wxControl* control = wxDynamicCast( gFocusWindow , wxControl ) ;
if ( control && control->GetMacControl() )
{
UMASetKeyboardFocus( (WindowRef) gFocusWindow->MacGetRootWindow() , (ControlHandle) control->GetMacControl() , kControlFocusNextPart ) ;
}
wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event) ;
wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event) ;
SetRectRgn(oldRgn , oldPos.x , oldPos.y , oldPos.x + m_width , oldPos.y + m_height ) ;
SetRectRgn(newRgn , newPos.x , newPos.y , newPos.x + actualWidth , newPos.y + actualHeight ) ;
DiffRgn( newRgn , oldRgn , diffRgn ) ;
InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
DiffRgn( oldRgn , newRgn , diffRgn ) ;
InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
SetRectRgn(oldRgn , oldPos.x , oldPos.y , oldPos.x + m_width , oldPos.y + m_height ) ;
SetRectRgn(newRgn , newPos.x , newPos.y , newPos.x + actualWidth , newPos.y + actualHeight ) ;
DiffRgn( newRgn , oldRgn , diffRgn ) ;
InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
DiffRgn( oldRgn , newRgn , diffRgn ) ;
InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
- RgnHandle innerOldRgn, innerNewRgn ;
- innerOldRgn = NewRgn() ;
- innerNewRgn = NewRgn() ;
-
- SetRectRgn(innerOldRgn , oldPos.x + MacGetLeftBorderSize() , oldPos.y + MacGetTopBorderSize() ,
- oldPos.x + m_width - MacGetRightBorderSize() , oldPos.y + m_height - MacGetBottomBorderSize() ) ;
- DiffRgn( oldRgn , innerOldRgn , diffRgn ) ;
- InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
-
- SetRectRgn(innerNewRgn , newPos.x + MacGetLeftBorderSize() , newPos.y + MacGetTopBorderSize() ,
- newPos.x + actualWidth - MacGetRightBorderSize() , newPos.y + actualHeight - MacGetBottomBorderSize() ) ;
- DiffRgn( newRgn , innerNewRgn , diffRgn ) ;
- InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
-
- DisposeRgn( innerOldRgn ) ;
- DisposeRgn( innerNewRgn ) ;
+ RgnHandle innerOldRgn, innerNewRgn ;
+ innerOldRgn = NewRgn() ;
+ innerNewRgn = NewRgn() ;
+
+ SetRectRgn(innerOldRgn , oldPos.x + MacGetLeftBorderSize() , oldPos.y + MacGetTopBorderSize() ,
+ oldPos.x + m_width - MacGetRightBorderSize() , oldPos.y + m_height - MacGetBottomBorderSize() ) ;
+ DiffRgn( oldRgn , innerOldRgn , diffRgn ) ;
+ InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
+
+ SetRectRgn(innerNewRgn , newPos.x + MacGetLeftBorderSize() , newPos.y + MacGetTopBorderSize() ,
+ newPos.x + actualWidth - MacGetRightBorderSize() , newPos.y + actualHeight - MacGetBottomBorderSize() ) ;
+ DiffRgn( newRgn , innerNewRgn , diffRgn ) ;
+ InvalWindowRgn( (WindowRef) MacGetRootWindow() , diffRgn ) ;
+
+ DisposeRgn( innerOldRgn ) ;
+ DisposeRgn( innerNewRgn ) ;
int major,minor;
wxGetOsVersion( &major, &minor );
RGBColor white = { 0xFFFF, 0xFFFF , 0xFFFF } ;
RGBColor face = { 0xDDDD, 0xDDDD , 0xDDDD } ;
int major,minor;
wxGetOsVersion( &major, &minor );
RGBColor white = { 0xFFFF, 0xFFFF , 0xFFFF } ;
RGBColor face = { 0xDDDD, 0xDDDD , 0xDDDD } ;
RGBColor darkShadow = { 0x0000, 0x0000 , 0x0000 } ;
RGBColor lightShadow = { 0x4444, 0x4444 , 0x4444 } ;
// OS X has lighter border edges than classic:
RGBColor darkShadow = { 0x0000, 0x0000 , 0x0000 } ;
RGBColor lightShadow = { 0x4444, 0x4444 , 0x4444 } ;
// OS X has lighter border edges than classic:
- if (major >= 10)
- {
- darkShadow.red = 0x8E8E;
- darkShadow.green = 0x8E8E;
- darkShadow.blue = 0x8E8E;
- lightShadow.red = 0xBDBD;
- lightShadow.green = 0xBDBD;
- lightShadow.blue = 0xBDBD;
- }
-
+ if (major >= 10)
+ {
+ darkShadow.red = 0x8E8E;
+ darkShadow.green = 0x8E8E;
+ darkShadow.blue = 0x8E8E;
+ lightShadow.red = 0xBDBD;
+ lightShadow.green = 0xBDBD;
+ lightShadow.blue = 0xBDBD;
+ }
+
SectRect( &scrollrect , &r , &scrollrect ) ;
}
ScrollRect( &scrollrect , dx , dy , updateRgn ) ;
SectRect( &scrollrect , &r , &scrollrect ) ;
}
ScrollRect( &scrollrect , dx , dy , updateRgn ) ;
// in order not to loose updates
WindowRef rootWindow = (WindowRef) MacGetRootWindow() ;
RgnHandle formerUpdateRgn = NewRgn() ;
// in order not to loose updates
WindowRef rootWindow = (WindowRef) MacGetRootWindow() ;
RgnHandle formerUpdateRgn = NewRgn() ;
if ( child->MacGetRootWindow() == (WXWindow) window && child->m_isShown )
{
if (child->MacGetWindowFromPointSub(newPoint , outWin ))
if ( child->MacGetRootWindow() == (WXWindow) window && child->m_isShown )
{
if (child->MacGetWindowFromPointSub(newPoint , outWin ))
int top = 0 , left = 0 ;
MacWindowToRootWindow( &left , &top ) ;
WindowRef rootWindow = (WindowRef) MacGetRootWindow() ;
int top = 0 , left = 0 ;
MacWindowToRootWindow( &left , &top ) ;
WindowRef rootWindow = (WindowRef) MacGetRootWindow() ;
// getting the update region in macos local coordinates
GetWindowUpdateRgn( rootWindow , updateRgn ) ;
GrafPtr port ;
// getting the update region in macos local coordinates
GetWindowUpdateRgn( rootWindow , updateRgn ) ;
GrafPtr port ;
SetRectRgn( tempStaticBoxRgn , child->m_x + borderOther , child->m_y + borderTop , child->m_x + child->m_width - borderOther , child->m_y + child->m_height - borderOther ) ;
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
}
SetRectRgn( tempStaticBoxRgn , child->m_x + borderOther , child->m_y + borderTop , child->m_x + child->m_width - borderOther , child->m_y + child->m_height - borderOther ) ;
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
}
wxPaintEvent event;
event.SetTimestamp(time);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxPaintEvent event;
event.SetTimestamp(time);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
for (wxWindowListNode *node = hiddenWindows.GetFirst(); node; node = node->GetNext())
{
wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ;
for (wxWindowListNode *node = hiddenWindows.GetFirst(); node; node = node->GetNext())
{
wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ;