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 » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to import iml from other class?
Re: How to import iml from other class? [message #8726 is a reply to message #8724] Wed, 28 March 2007 09:43 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14160
Registered: November 2005
Ultimate Member
guido wrote on Tue, 27 March 2007 16:37

How to use .iml from other class?

If I have App.iml defined in App.cpp/hpp and a class Splash.cpp/hpp, what goes there precisely to use App.iml?
The GUI-tutorial answers this question sparsely with remarks about iml_header.h and iml_source.h. But I'm pulling my hairs out trying the put the headers and defines for App.iml in the proper place of Splash class files, going back an forward between undefined and redefined identifiers.

Guido


If you are using images just in single file, just put:

#define  IMAGEFILE  <iml/image.iml>
#define  IMAGECLASS MyImg
#include <Draw/iml.h>


at the beginning.

If you are using it across more files, you will need to declare in header:

#define  IMAGEFILE  <iml/image.iml>
#define  IMAGECLASS MyImg
#include <Draw/iml_header.h>


and also "define somewhere", in some .cpp (but only one!) file:


#define  IMAGEFILE  <iml/image.iml>
#define  IMAGECLASS MyImg
#include <Draw/iml_source.h>


Note this is the same as declaring "extern int myint" in .h and then defining it "int myint" in .cpp.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Loading Image (from HttpClient)
Next Topic: DrawImage with XOR undefined
Goto Forum:
  


Current Time: Sat Dec 07 19:25:01 CET 2024

Total time taken to generate the page: 0.01936 seconds