Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » Mac OS X port architecture
Re: best way to draw text/fonts on MacOS from C/C++ [message #33312 is a reply to message #33310] Sun, 24 July 2011 10:06 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
Quote:


Modern x86_64 apps apparently need to use Cocoa
only for non-drawing functions, and to create the
graphics context and associate it with a window
(and this must be done in Objective-C/C++).
The .mm file and -framework Cocoa
needs to be passed into gcc, maybe as a post build
step in UPP
. I will try this out.



Actually, I believe we should rather teach theide to recognize .m/.mm files (should be simple) and put -framework options to linker step (can be done in Package oraganizer now).

We should bind adding -framework and the whole conditional compilation for MACOSX as "MACOSX" flag. Later, it will be "host flag" added automatically (just like WIN32 or LINUX are now).

So I see this as next step:

- investigate how minimal Cocoa application looks like - it is enough to display "Hello world" in otherwise emtpy window (view?), preferably without the presence of .nib files

- this can be developed and tested in XCode

- then make theide compile this app


Quote:


fl_cocoa.mm            window, event, kybd, mouse, dnd code
                       Objective-C++ (3500 lines)
mac.H                  header mapping FLTK to mac functions
fl_font_mac.cxx        font/text info & drawing code in C++


FLTK does not use any high-level widgets on any platform;
it works a lot more like UPP, and draws itself whatever
is needed from basic 2D elements: polylines/polygons,
images/pixmaps, and text/fonts. So, for these
reasons I recommend taking a look at it.

Dave




This is a good find. Looking at FLTK might be a good kickstart... Smile

Mirek

[Updated on: Sun, 24 July 2011 10:41]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TheIDE/max x11 binary by daveremba
Next Topic: fix TheIde [DOWNLOAD] build flag options in GccBuilder for OSX11 and Cocoa
Goto Forum:
  


Current Time: Thu May 09 09:52:55 CEST 2024

Total time taken to generate the page: 0.02349 seconds