Not logged inOpenClonk Forum
Up Topic Mac Dev Mode

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Günther

> I'm afraid not since ConsoleWindowController is an Objective-C class which isn't compatible with C++ concepts like 'friend'. But of course it's no big deal to just write some small wrapper C++ class if those functions really should be kept private.


Hm. I would have thought that Objective C++ would be better integrated than that. After all, it's apparently integrated enough to respect "protected"...
Yet another set of wrapper functions certainly won't make the code any uglier, but they do raise the question whether there's a better way. Maybe we could change all those callbacks to be static and let them just fetch the singleton C4Console instance themselves. That way, most Cocoa and GTK+ callbacks could be replaced with a generic one that gets the appropriate function in the data argument, and the ConsoleDlgProc would use C4Console::Foo() instead of Console.Foo(). Maybe you have a better idea? Don't hesitate to change the existing code, or make suggestions that require someone using GTK+ and/or windows to make changes.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill