Remove hard TABs and trailing spaces
no real changes
This commit is contained in:
@@ -221,7 +221,7 @@ void wxWindowMac::Init()
|
||||
wxWindowMac::~wxWindowMac()
|
||||
{
|
||||
SendDestroyEvent();
|
||||
|
||||
|
||||
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
|
||||
for ( int i = s_hotkeys.size()-1; i>=0; -- i )
|
||||
{
|
||||
@@ -310,10 +310,10 @@ void wxWindowMac::SetWrappingPeer(wxOSXWidgetImpl* wrapper)
|
||||
wxOSXWidgetImpl* inner = GetPeer();
|
||||
wxASSERT_MSG( inner != NULL && inner->IsOk(), "missing or incomplete inner peer" );
|
||||
wxASSERT_MSG( wrapper != NULL && wrapper->IsOk(), "missing or incomplete wrapper" );
|
||||
|
||||
|
||||
if ( !(inner != NULL && inner->IsOk() && wrapper != NULL && wrapper->IsOk()) )
|
||||
return;
|
||||
|
||||
|
||||
inner->RemoveFromParent();
|
||||
wrapper->InstallEventHandler();
|
||||
wrapper->Embed(inner);
|
||||
@@ -334,28 +334,28 @@ void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer)
|
||||
if ( GetPeer() && !GetPeer()->IsRootControl())
|
||||
{
|
||||
wxASSERT_MSG( GetPeer()->IsOk() , wxT("The native control must exist already") ) ;
|
||||
|
||||
|
||||
if (!GetParent()->GetChildren().Find((wxWindow*)this))
|
||||
GetParent()->AddChild( this );
|
||||
|
||||
|
||||
GetPeer()->InstallEventHandler();
|
||||
GetPeer()->Embed(GetParent()->GetPeer());
|
||||
|
||||
|
||||
GetParent()->MacChildAdded() ;
|
||||
|
||||
|
||||
// adjust font, controlsize etc
|
||||
GetPeer()->SetControlSize( m_windowVariant );
|
||||
InheritAttributes();
|
||||
// in case nothing has been set, use the variant default fonts
|
||||
if ( !m_hasFont )
|
||||
DoSetWindowVariant( m_windowVariant );
|
||||
|
||||
|
||||
GetPeer()->SetInitialLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ;
|
||||
|
||||
|
||||
// for controls we want to use best size for wxDefaultSize params )
|
||||
if ( !GetPeer()->IsUserPane() )
|
||||
SetInitialSize(GetMinSize());
|
||||
|
||||
|
||||
SetCursor( *wxSTANDARD_CURSOR ) ;
|
||||
}
|
||||
}
|
||||
@@ -859,16 +859,16 @@ void wxWindowMac::DoGetClientSize( int *x, int *y ) const
|
||||
// we shouldn't return invalid width
|
||||
if ( ww < 0 )
|
||||
ww = 0;
|
||||
|
||||
|
||||
*x = ww;
|
||||
}
|
||||
|
||||
|
||||
if (y)
|
||||
{
|
||||
// we shouldn't return invalid height
|
||||
if ( hh < 0 )
|
||||
hh = 0;
|
||||
|
||||
|
||||
*y = hh;
|
||||
}
|
||||
}
|
||||
@@ -1244,7 +1244,7 @@ bool wxWindowMac::Show(bool show)
|
||||
{
|
||||
if ( !show )
|
||||
MacInvalidateBorders();
|
||||
|
||||
|
||||
if ( !wxWindowBase::Show(show) )
|
||||
return false;
|
||||
|
||||
@@ -1375,7 +1375,7 @@ void wxWindowMac::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect)
|
||||
|
||||
if ( !IsShownOnScreen() )
|
||||
return ;
|
||||
|
||||
|
||||
if ( IsFrozen() )
|
||||
return;
|
||||
|
||||
@@ -1999,7 +1999,7 @@ bool wxWindowMac::MacDoRedraw( long time )
|
||||
wxNonOwnedWindow* top = MacGetTopLevelWindow();
|
||||
if (top)
|
||||
top->WindowWasPainted() ;
|
||||
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
@@ -2302,14 +2302,14 @@ long wxWindowMac::MacGetLeftBorderSize() const
|
||||
{
|
||||
// the wx borders are all symmetric in mac themes
|
||||
long border = MacGetWXBorderSize() ;
|
||||
|
||||
|
||||
if ( GetPeer() )
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
GetPeer()->GetLayoutInset( left, top, right, bottom );
|
||||
border -= left;
|
||||
}
|
||||
|
||||
|
||||
return border;
|
||||
}
|
||||
|
||||
@@ -2318,14 +2318,14 @@ long wxWindowMac::MacGetRightBorderSize() const
|
||||
{
|
||||
// the wx borders are all symmetric in mac themes
|
||||
long border = MacGetWXBorderSize() ;
|
||||
|
||||
|
||||
if ( GetPeer() )
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
GetPeer()->GetLayoutInset( left, top, right, bottom );
|
||||
border -= right;
|
||||
}
|
||||
|
||||
|
||||
return border;
|
||||
}
|
||||
|
||||
@@ -2333,14 +2333,14 @@ long wxWindowMac::MacGetTopBorderSize() const
|
||||
{
|
||||
// the wx borders are all symmetric in mac themes
|
||||
long border = MacGetWXBorderSize() ;
|
||||
|
||||
|
||||
if ( GetPeer() )
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
GetPeer()->GetLayoutInset( left, top, right, bottom );
|
||||
border -= top;
|
||||
}
|
||||
|
||||
|
||||
return border;
|
||||
}
|
||||
|
||||
@@ -2348,14 +2348,14 @@ long wxWindowMac::MacGetBottomBorderSize() const
|
||||
{
|
||||
// the wx borders are all symmetric in mac themes
|
||||
long border = MacGetWXBorderSize() ;
|
||||
|
||||
|
||||
if ( GetPeer() )
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
GetPeer()->GetLayoutInset( left, top, right, bottom );
|
||||
border -= bottom;
|
||||
}
|
||||
|
||||
|
||||
return border;
|
||||
}
|
||||
|
||||
@@ -2530,18 +2530,18 @@ wxHotKeyHandler(EventHandlerCallRef WXUNUSED(nextHandler),
|
||||
GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL, 1, NULL, &charCode );
|
||||
GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode );
|
||||
GetEventParameter( event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers );
|
||||
|
||||
|
||||
UInt32 keymessage = (keyCode << 8) + charCode;
|
||||
|
||||
|
||||
wxKeyEvent wxevent(wxEVT_HOTKEY);
|
||||
wxevent.SetId(hotKeyId.id);
|
||||
wxTheApp->MacCreateKeyEvent( wxevent, s_hotkeys[i].window , keymessage ,
|
||||
modifiers , when , 0 ) ;
|
||||
|
||||
|
||||
s_hotkeys[i].window->HandleWindowEvent(wxevent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
@@ -2552,11 +2552,11 @@ bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode)
|
||||
if ( s_hotkeys[i].keyId == hotkeyId )
|
||||
{
|
||||
wxLogLastError(wxT("hotkeyId already registered"));
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool installed = false;
|
||||
if ( !installed )
|
||||
{
|
||||
@@ -2567,7 +2567,7 @@ bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode)
|
||||
InstallApplicationEventHandler(&wxHotKeyHandler, 1, &eventType, NULL, NULL);
|
||||
installed = true;
|
||||
}
|
||||
|
||||
|
||||
UInt32 mac_modifiers=0;
|
||||
if ( modifiers & wxMOD_ALT )
|
||||
mac_modifiers |= optionKey;
|
||||
@@ -2577,18 +2577,18 @@ bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode)
|
||||
mac_modifiers |= controlKey;
|
||||
if ( modifiers & wxMOD_CONTROL )
|
||||
mac_modifiers |= cmdKey;
|
||||
|
||||
|
||||
EventHotKeyRef hotKeyRef;
|
||||
EventHotKeyID hotKeyIDmac;
|
||||
|
||||
|
||||
hotKeyIDmac.signature = 'WXMC';
|
||||
hotKeyIDmac.id = hotkeyId;
|
||||
|
||||
|
||||
if ( RegisterEventHotKey(wxCharCodeWXToOSX((wxKeyCode)keycode), mac_modifiers, hotKeyIDmac,
|
||||
GetApplicationEventTarget(), 0, &hotKeyRef) != noErr )
|
||||
{
|
||||
wxLogLastError(wxT("RegisterHotKey"));
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -2597,10 +2597,10 @@ bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode)
|
||||
v.ref = hotKeyRef;
|
||||
v.keyId = hotkeyId;
|
||||
v.window = this;
|
||||
|
||||
|
||||
s_hotkeys.push_back(v);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2615,14 +2615,14 @@ bool wxWindowMac::UnregisterHotKey(int hotkeyId)
|
||||
if ( UnregisterEventHotKey(ref) != noErr )
|
||||
{
|
||||
wxLogLastError(wxT("UnregisterHotKey"));
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2631,7 +2631,7 @@ bool wxWindowMac::UnregisterHotKey(int hotkeyId)
|
||||
bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
|
||||
{
|
||||
bool handled = false;
|
||||
|
||||
|
||||
// moved the ordinary key event sending AFTER the accel evaluation
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
@@ -2665,7 +2665,7 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
|
||||
if ( !handled )
|
||||
{
|
||||
handled = HandleWindowEvent( event ) ;
|
||||
@@ -2738,9 +2738,9 @@ void wxWidgetImpl::RemoveAssociations(wxWidgetImpl* impl)
|
||||
|
||||
void wxWidgetImpl::RemoveAssociation(WXWidget control)
|
||||
{
|
||||
wxCHECK_RET( control != NULL, wxT("attempt to remove a NULL WXWidget from control map") );
|
||||
wxCHECK_RET( control != NULL, wxT("attempt to remove a NULL WXWidget from control map") );
|
||||
|
||||
wxWinMacControlList.erase(control);
|
||||
wxWinMacControlList.erase(control);
|
||||
}
|
||||
|
||||
wxIMPLEMENT_ABSTRACT_CLASS(wxWidgetImpl, wxObject);
|
||||
|
Reference in New Issue
Block a user