todos, cleanups, detabified

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-09-26 01:57:38 +00:00
parent 739e35e4fb
commit 976f924083

View File

@@ -28,6 +28,12 @@
#endif #endif
//
//TODO: Implement Apple Software Guidelines - show the top window it it's not shown,
//and force it to be unminimized - and all unminimized windows should be brought to
//the front
//http://developer.apple.com/documentation/MacOSX/Conceptual/AppleSWDesign/MacOSXEnvironment/chapter_6_section_4.html
//TODO:
IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler)
pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef, pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef,
@@ -40,6 +46,11 @@ pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef,
if (eventClass == kEventClassCommand && eventKind == kEventCommandProcess) if (eventClass == kEventClassCommand && eventKind == kEventCommandProcess)
{ {
//TODO:
//TODO: This is a complete copy of
//static pascal OSStatus wxMacAppCommandEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
//FIND A WAY TO EXTERN THIS AND USE THAT HERE INSTEAD!!
//TODO:
MenuRef hMenu = MAC_WXHMENU(pTB->GetCurrentMenu()->GetHMenu()); MenuRef hMenu = MAC_WXHMENU(pTB->GetCurrentMenu()->GetHMenu());
OSStatus result = eventNotHandledErr ; OSStatus result = eventNotHandledErr ;
@@ -150,7 +161,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
return true; return true;
#else #else
//TODO: Educated guess //TODO: (IT WORKS!) Make work without mask - mayby by using a wxDC?
CGImageRef pImage; CGImageRef pImage;
//create the icon from the bitmap and mask bitmap contained within //create the icon from the bitmap and mask bitmap contained within
@@ -169,19 +180,16 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
if (pImage != NULL) if (pImage != NULL)
CGImageRelease(pImage); CGImageRelease(pImage);
m_iconAdded = true; return m_iconAdded = err == noErr;
return true;
#endif #endif
} }
bool wxTaskBarIcon::RemoveIcon() bool wxTaskBarIcon::RemoveIcon()
{ {
//TODO: Not tested
OSStatus err = RestoreApplicationDockTileImage(); OSStatus err = RestoreApplicationDockTileImage();
wxASSERT(err == 0); wxASSERT(err == 0);
m_iconAdded = false;
return true; return !(m_iconAdded = !(err == noErr));
} }
bool wxTaskBarIcon::PopupMenu(wxMenu *menu) bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
@@ -208,7 +216,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
&hMenu); &hMenu);
wxASSERT(err == 0); wxASSERT(err == 0);
return true; return err == noErr;
} }
#endif //wxHAS_TASK_BAR_ICON #endif //wxHAS_TASK_BAR_ICON