![]() |
|
#1
|
|||
|
|||
Fl_Help_View does not display imagesHi,
I am trying to display an HTML page with the Fl_Help_View object by using the load ( ) method. Only the the text is displayed and not the images (both JPEG, PNG, GIF images). Did someone already faced this issue? Thanks in advance for your help. Jean-Francois |
|
#2
|
||||
|
||||
|
Quote:
Quote:
Looks like 1.1.x correct? One thing I like to let people know. Make sure your FLTK is up to date. If you have subversion you can get the latest and greatest at the fltk.org site. If you don't have subversion you can get a snapshot or the stable 1.1.6 release but I think the subversion is actually a better choice. It's what will become 1.1.7 (if it hasn't already). Sometimes it matters what platform you are building for as well. At the very least, it won't hurt. We will need your working version though. Take a look at the Posts for Help thread to get the most bang for your buck here. As for your question, can you provided a small bit of test code that shows what you are talking about? Unless I am actually working on a project using the same fltk widgets you are the answers will suffer. Ask away, that's why we are here. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#3
|
|||
|
|||
|
I am currently using FLTK 1.1.6 with Nano-X 0.91 and Linux 2.6.11.7.
You can find hereafter the source code used as example : CPP / C++ / C Code:
Last edited by LuciWiz : 06-Jul-2005 at 11:00.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#4
|
||||
|
||||
|
Ok, now we can get somewhere. One thing, take a look at the thread Posts for Help which describes the code markup system among other things.
In short, [c++] // insert code here [/c++] Now, I modified your example a little to make things easier but now that I have done that I have a feeling your problem is a command line one. It took a while for the coffee to kick in. Make sure you use something similar to this. Code:
Anyhow, here is your code with some modifications. CPP / C++ / C Code:
This requires the gif and html to be in the same directory as your exe but that is easy enough to get around. I just didn't want to track down the raw materials and dumped them in my workdir. Below is a screen capture of the created program. ![]() Hope this was what you were after. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#5
|
|||
|
|||
|
Thanks for your answer but I noticed that in your HTML file there is not image (please ignore the abox image in the exemple) but just text.
Anyway I tried with the following compilation line and it does not work (using my cross-compiler) : arm-linux-g++ -msoft-float -I/nfs/fltk-1.1.6 toto.cxx -L/nfs/fltk-1.1.6/lib -lfltk -lfltk_images -lfltk_forms -L/nfs/nxlib045 -lX11 -L/nfs/jpeg-6b -ljpeg -L/nfs/libpng-1.2.8-config/.libs -lpng -L/nfs/zlib122 -lz `/nfs/fltk-1.1.6/fltk-config --cxxflags --use-images` -s -o help.exe I still have no image displayed. So I modified the Fl_Help_View code to manage JPEG images instead of Shared images and it works. But now I can read only JPEG images :-( |
|
#6
|
||||
|
||||
|
You know, I was looking at your example after I posted it and had a feeling that was what you were talking about.
When you compiled fltk did you use --enable-localpng or something along those lines. Since you can use jpegs it seems odd. I'll find a page with png's on it and try it here and see what I come up with. actually, make sure when you ./configure you have --enable-shared=yes as the default is no. mark EDIT: OK, now I see what you are talking about. None of the png's (I used a savannah page) are being displayed. D'oh, I forgot the simplest part. CPP / C++ / C Code:
fl_register_images() is needed for the extra image types. Sorry for any confusion. It will now display the images inline properly. Well, as much as it does anyhow. __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs Last edited by cable_guy_67 : 06-Jul-2005 at 10:58.
|
|
#7
|
|||
|
|||
|
Ok, after adding the fl_register_images() call, images are correctly displayed inline.
Thanks a lot for your help. |
|
#8
|
|||
|
|||
|
Just a last question : is there a way to change the font used to display the HTML file ?
|
|
#9
|
||||
|
||||
|
Quote:
I'm glad it works. I hadn't used help view for a bit so I can always use the practice. FLTK is a language of methods and derivations and I don't have a photographic memory. Quote:
That link lives in a tab browser. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#10
|
|||
|
|||
|
I am looking for something as follows :
void set_font (const char* font_filemame); where font_filename is the font file that shall be used (e.g. "/nfs/fonts/arial.ttf"). |
Recent GIDBlog
Halfway done! by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problems with a text display in a tab | maveganzones | FLTK Forum | 2 | 23-Mar-2005 02:26 |
| How do I display <filename>.bmp on the screen? | oriharel | MS Visual C++ / MFC Forum | 1 | 01-Dec-2004 14:51 |
| Unable to display images of BBS | sugoiso | Computer Software Forum - Windows | 17 | 26-Oct-2004 12:35 |
| uisng php to display php | dopee | MySQL / PHP Forum | 6 | 14-May-2004 18:40 |
| Why are my images distorted? | rhino1616 | Graphics Forum | 0 | 27-Jun-2003 09:30 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The