Blind Tinderbox build fix according to simiar usage in carbon/listbox.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1394,12 +1394,12 @@ OSStatus wxMacDataBrowserControl::AddColumn( DataBrowserListViewColumnDesc *colu
|
|||||||
}
|
}
|
||||||
|
|
||||||
OSStatus wxMacDataBrowserControl::GetColumnIDFromIndex( DataBrowserTableViewColumnIndex position, DataBrowserTableViewColumnID* id ){
|
OSStatus wxMacDataBrowserControl::GetColumnIDFromIndex( DataBrowserTableViewColumnIndex position, DataBrowserTableViewColumnID* id ){
|
||||||
return GetDataBrowserTableViewColumnProperty( m_controlRef, position, id );
|
return GetDataBrowserTableViewColumnProperty( m_controlRef, position, id );
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus wxMacDataBrowserControl::RemoveColumn( DataBrowserTableViewColumnIndex position )
|
OSStatus wxMacDataBrowserControl::RemoveColumn( DataBrowserTableViewColumnIndex position )
|
||||||
{
|
{
|
||||||
DataBrowserTableViewColumnID id;
|
DataBrowserTableViewColumnID id;
|
||||||
GetColumnIDFromIndex( position, &id );
|
GetColumnIDFromIndex( position, &id );
|
||||||
return RemoveDataBrowserTableViewColumn( m_controlRef, id );
|
return RemoveDataBrowserTableViewColumn( m_controlRef, id );
|
||||||
}
|
}
|
||||||
@@ -1624,6 +1624,7 @@ OSStatus wxMacDataBrowserControl::SetDisclosureColumn( DataBrowserPropertyID pro
|
|||||||
wxMacDataItem::wxMacDataItem()
|
wxMacDataItem::wxMacDataItem()
|
||||||
{
|
{
|
||||||
m_data = NULL;
|
m_data = NULL;
|
||||||
|
|
||||||
m_order = 0;
|
m_order = 0;
|
||||||
m_colId = kTextColumnId; // for compat with existing wx*ListBox impls.
|
m_colId = kTextColumnId; // for compat with existing wx*ListBox impls.
|
||||||
}
|
}
|
||||||
@@ -1660,7 +1661,7 @@ short wxMacDataItem::GetColumn()
|
|||||||
void wxMacDataItem::SetColumn( short col )
|
void wxMacDataItem::SetColumn( short col )
|
||||||
{
|
{
|
||||||
m_colId = col;
|
m_colId = col;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacDataItem::SetLabel( const wxString& str)
|
void wxMacDataItem::SetLabel( const wxString& str)
|
||||||
{
|
{
|
||||||
@@ -1679,11 +1680,11 @@ bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner ,
|
|||||||
{
|
{
|
||||||
const wxMacDataItem* otherItem = dynamic_cast<const wxMacDataItem*>(rhs);
|
const wxMacDataItem* otherItem = dynamic_cast<const wxMacDataItem*>(rhs);
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
|
|
||||||
if ( sortProperty == m_colId ){
|
if ( sortProperty == m_colId ){
|
||||||
retval = m_label.CmpNoCase( otherItem->m_label) < 0;
|
retval = m_label.CmpNoCase( otherItem->m_label) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( sortProperty == kNumericOrderColumnId )
|
else if ( sortProperty == kNumericOrderColumnId )
|
||||||
retval = m_order < otherItem->m_order;
|
retval = m_order < otherItem->m_order;
|
||||||
|
|
||||||
@@ -1805,7 +1806,7 @@ OSStatus wxMacDataItemBrowserControl::GetSetItemData(
|
|||||||
// right now default behaviour on these
|
// right now default behaviour on these
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
|
|
||||||
if ( item != NULL ){
|
if ( item != NULL ){
|
||||||
err = item->GetSetData( this, property , itemData , changeValue );
|
err = item->GetSetData( this, property , itemData , changeValue );
|
||||||
}
|
}
|
||||||
@@ -1842,7 +1843,7 @@ unsigned int wxMacDataItemBrowserControl::GetItemCount(const wxMacDataItem* cont
|
|||||||
return numItems;
|
return numItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int wxMacDataItemBrowserControl::GetSelectedItemCount( const wxMacDataItem* container,
|
unsigned int wxMacDataItemBrowserControl::GetSelectedItemCount( const wxMacDataItem* container,
|
||||||
bool recurse ) const
|
bool recurse ) const
|
||||||
{
|
{
|
||||||
return GetItemCount( container, recurse, kDataBrowserItemIsSelected );
|
return GetItemCount( container, recurse, kDataBrowserItemIsSelected );
|
||||||
@@ -1913,11 +1914,11 @@ void wxMacDataItemBrowserControl::InsertColumn(int colId, DataBrowserPropertyTyp
|
|||||||
columnDesc.headerBtnDesc.btnFontStyle.flags =
|
columnDesc.headerBtnDesc.btnFontStyle.flags =
|
||||||
kControlUseFontMask | kControlUseJustMask;
|
kControlUseFontMask | kControlUseJustMask;
|
||||||
|
|
||||||
columnDesc.headerBtnDesc.btnContentInfo.contentType = kControlContentTextOnly;
|
columnDesc.headerBtnDesc.btnContentInfo.contentType = kControlContentTextOnly;
|
||||||
columnDesc.headerBtnDesc.btnFontStyle.just = just;
|
columnDesc.headerBtnDesc.btnFontStyle.just = just;
|
||||||
columnDesc.headerBtnDesc.btnFontStyle.font = kControlFontViewSystemFont;
|
columnDesc.headerBtnDesc.btnFontStyle.font = kControlFontViewSystemFont;
|
||||||
columnDesc.headerBtnDesc.btnFontStyle.style = normal;
|
columnDesc.headerBtnDesc.btnFontStyle.style = normal;
|
||||||
|
|
||||||
// TODO: Why is m_font not defined when we enter wxLC_LIST mode, but is
|
// TODO: Why is m_font not defined when we enter wxLC_LIST mode, but is
|
||||||
// defined for other modes?
|
// defined for other modes?
|
||||||
wxFontEncoding enc;
|
wxFontEncoding enc;
|
||||||
@@ -1927,14 +1928,17 @@ void wxMacDataItemBrowserControl::InsertColumn(int colId, DataBrowserPropertyTyp
|
|||||||
enc = wxLocale::GetSystemEncoding();
|
enc = wxLocale::GetSystemEncoding();
|
||||||
wxMacCFStringHolder cfTitle;
|
wxMacCFStringHolder cfTitle;
|
||||||
cfTitle.Assign( title, enc );
|
cfTitle.Assign( title, enc );
|
||||||
columnDesc.headerBtnDesc.titleString = cfTitle;
|
columnDesc.headerBtnDesc.titleString = cfTitle;
|
||||||
|
|
||||||
columnDesc.headerBtnDesc.minimumWidth = 0;
|
columnDesc.headerBtnDesc.minimumWidth = 0;
|
||||||
columnDesc.headerBtnDesc.maximumWidth = 30000;
|
columnDesc.headerBtnDesc.maximumWidth = 30000;
|
||||||
|
|
||||||
columnDesc.propertyDesc.propertyID = (kMinColumnId + colId);
|
columnDesc.propertyDesc.propertyID = (kMinColumnId + colId);
|
||||||
columnDesc.propertyDesc.propertyType = colType;
|
columnDesc.propertyDesc.propertyType = colType;
|
||||||
columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewSortableColumn | kDataBrowserListViewTypeSelectColumn;
|
columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewSortableColumn;
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
|
||||||
|
columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewTypeSelectColumn;
|
||||||
|
#endif
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||||
columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewNoGapForIconInHeaderButton;
|
columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewNoGapForIconInHeaderButton;
|
||||||
#endif
|
#endif
|
||||||
@@ -2125,7 +2129,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, const wxArrayString
|
|||||||
item->SetLabel( items[i]);
|
item->SetLabel( items[i]);
|
||||||
if ( column != -1 )
|
if ( column != -1 )
|
||||||
item->SetColumn( kMinColumnId + column );
|
item->SetColumn( kMinColumnId + column );
|
||||||
|
|
||||||
if ( m_sortOrder == SortOrder_None )
|
if ( m_sortOrder == SortOrder_None )
|
||||||
item->SetOrder( frontLineOrder + 1 + i );
|
item->SetOrder( frontLineOrder + 1 + i );
|
||||||
|
|
||||||
@@ -2353,12 +2357,12 @@ wxMacPortSaver::~wxMacPortSaver()
|
|||||||
|
|
||||||
void wxMacGlobalToLocal( WindowRef window , Point*pt )
|
void wxMacGlobalToLocal( WindowRef window , Point*pt )
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
|
||||||
HIPoint p = CGPointMake( pt->h, pt->v );
|
HIPoint p = CGPointMake( pt->h, pt->v );
|
||||||
HIViewRef contentView ;
|
HIViewRef contentView ;
|
||||||
// TODO check toolbar offset
|
// TODO check toolbar offset
|
||||||
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
|
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
|
||||||
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
|
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
|
||||||
pt->h = p.x;
|
pt->h = p.x;
|
||||||
pt->v = p.y;
|
pt->v = p.y;
|
||||||
#else
|
#else
|
||||||
@@ -2368,10 +2372,10 @@ void wxMacGlobalToLocal( WindowRef window , Point*pt )
|
|||||||
|
|
||||||
void wxMacLocalToGlobal( WindowRef window , Point*pt )
|
void wxMacLocalToGlobal( WindowRef window , Point*pt )
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
|
||||||
HIPoint p = CGPointMake( pt->h, pt->v );
|
HIPoint p = CGPointMake( pt->h, pt->v );
|
||||||
HIViewRef contentView ;
|
HIViewRef contentView ;
|
||||||
// TODO check toolbar offset
|
// TODO check toolbar offset
|
||||||
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
|
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
|
||||||
HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );
|
HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );
|
||||||
pt->h = p.x;
|
pt->h = p.x;
|
||||||
|
Reference in New Issue
Block a user