#endif // wxUSE_BASE
+
+// ============================================================================
+// GUI-only functions from now on
+// ============================================================================
+
#if wxUSE_GUI
+// ----------------------------------------------------------------------------
+// Launch document with default app
+// ----------------------------------------------------------------------------
+
+bool wxLaunchDefaultApplication(const wxString& document, int flags)
+{
+ wxUnusedVar(flags);
+
+ static const char * const OPEN_CMD = "/usr/bin/open";
+ if ( wxFileExists(OPEN_CMD) &&
+ wxExecute(wxString(OPEN_CMD) + " " + document) )
+ return true;
+
+ return false;
+}
+
+// ----------------------------------------------------------------------------
+// Launch default browser
+// ----------------------------------------------------------------------------
+
+bool wxDoLaunchDefaultBrowser(const wxString& url, int flags)
+{
+ wxUnusedVar(flags);
+ wxCFRef< CFURLRef > curl( CFURLCreateWithString( kCFAllocatorDefault,
+ wxCFStringRef( url ), NULL ) );
+ OSStatus err = LSOpenCFURLRef( curl , NULL );
+
+ if (err == noErr)
+ {
+ return true;
+ }
+ else
+ {
+ wxLogDebug(wxT("Browser Launch error %d"), (int) err);
+ return false;
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Miscellaneous functions
+// ----------------------------------------------------------------------------
+
void wxGetMousePosition( int* x, int* y )
{
Point pt;
const wxMacDataItem* rhs,
DataBrowserPropertyID sortProperty) const
{
- const wxMacDataItem* otherItem = wx_const_cast(wxMacDataItem*,rhs);
bool retval = false;
if ( sortProperty == kNumericOrderColumnId )
- retval = m_order < otherItem->m_order;
+ retval = m_order < rhs->m_order;
return retval;
}