Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / September 2006



Tip: Looking for answers? Try searching our database.

c++ interface book

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
imutate@hotmail.co.uk - 27 Sep 2006 11:33 GMT
Hi,
I am looking for a book to help me with creating user interfaces and
some graphical output for C++ programs.  I saw some books on cocoa but
some of them are several years old now and seem to be about Objective C
rather than C++, not that it matters how the interface connects with
the rest of a program.
Thanks.
David Phillip Oster - 27 Sep 2006 14:33 GMT
> I am looking for a book to help me with creating user interfaces and
> some graphical output for C++ programs.  I saw some books on cocoa but
> some of them are several years old now and seem to be about Objective C
> rather than C++, not that it matters how the interface connects with
> the rest of a program.

If you are new to writing Macintosh applications, I strongly recommend
you learn Cocoa, the Objective-C U.I. framework, and use it for your
user interface.

My recommendation: Read "Cocoa Programming for Mac OS X" by Hillegas. Do
the exercises in the book.

In your programs, name your ".m" files with a ".mm" extension. The
compiler recognizes .mm as containing both Objective-C and C++.
Objective-C objects can hold pointers to C++ objects.

C++ objects can hold pointers to Objective-C objects, but if the C++
object is copyable and retains the obj-c object, with a release in the
C++ objects' destructor, you'll either want to also retain in you copy
constructor and assignment operator, or refer to the obj-C object
through a boost::shared_ptr (or a tr1::shared_ptr).

C++ and Objective-C don't understand each other's exceptions, so you'll
need to be liberal with your try{}catch(){} and @try{}@catch(){} at the
boundaries, where functions in one language call functions in the other.

For drawing, Quartz drawing is rather like Postscript, and the system
takes care of translation to postscript when you print. You may also
create OpenGL panes from Cocoa, and draw in OpenGL into those panes from
C++. OpenGL is a C api found on both Macs and windows.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.