Skip to content

Commit

Permalink
add support for ColourDatabase#get_all_names for wxw >= 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorino committed Oct 20, 2023
1 parent b2caf3f commit 260c387
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions rakelib/lib/director/gdicommon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ def setup
spec.ignore %w{
wxTheColourDatabase
}
if Config.instance.wx_version >= '3.3.0'
spec.ignore 'wxColourDatabase::GetAllNames', ignore_doc: false
spec.add_extend_code 'wxColourDatabase', <<~__HEREDOC
VALUE get_all_names() const
{
wxVector<wxString> nms = $self->GetAllNames();
VALUE rb_nms = rb_ary_new();
for (const wxString& nm : nms)
{
rb_ary_push(rb_nms, WXSTR_TO_RSTR(nm));
}
return rb_nms;
}
__HEREDOC
spec.map 'wxVector<wxString>' => 'Array<String>', swig: false do
map_out code: ''
end
end
spec.ignore [
'wxClientDisplayRect(int *,int *,int *,int *)',
'wxDisplaySize(int *,int *)',
Expand Down

0 comments on commit 260c387

Please sign in to comment.