+
+ wxCHECK_RET( flagToSet, "unknown wxEllipsizeMode value" );
+
+ flags |= flagToSet;
+ verify_noerr( browser->SetPropertyFlags(colID, flags) );
+}
+
+wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
+{
+ wxDataViewColumn * const col = GetOwner();
+
+ wxMacDataViewDataBrowserListViewControl * const
+ browser = GetBrowserFromCol(col);
+ wxCHECK_MSG( browser, wxELLIPSIZE_NONE, "must be fully initialized" );
+
+ const DataBrowserPropertyID colID = col->GetNativeData()->GetPropertyID();
+
+ DataBrowserPropertyFlags flags;
+ browser->GetPropertyFlags(colID, &flags);
+
+ if ( flags & kDataBrowserDoNotTruncateText )
+ return wxELLIPSIZE_NONE;
+ if ( flags & kDataBrowserTruncateTextAtStart )
+ return wxELLIPSIZE_START;
+ if ( flags & kDataBrowserTruncateTextAtEnd )
+ return wxELLIPSIZE_END;
+
+ // kDataBrowserTruncateTextMiddle == 0 so there is no need to test for it
+ return wxELLIPSIZE_MIDDLE;