+ wxCFStringRef cfidentifier;
+ const NSString *nsItemId;
+ if (tool->GetStyle() == wxTOOL_STYLE_SEPARATOR)
+ {
+ nsItemId = tool->IsStretchable() ? NSToolbarFlexibleSpaceItemIdentifier
+ : NSToolbarSeparatorItemIdentifier;
+ }
+ else
+ {
+ cfidentifier = wxCFStringRef(wxString::Format("%ld", (long)tool));
+ nsItemId = cfidentifier.AsNSString();
+ }
+
+ [refTB insertItemWithItemIdentifier:nsItemId atIndex:currentPosition];