View Single Post
Old 11-10-2009, 04:40 PM   #38
Max
Connoisseur
Max has a complete set of Star Wars action figures.Max has a complete set of Star Wars action figures.Max has a complete set of Star Wars action figures.Max has a complete set of Star Wars action figures.
 
Max's Avatar
 
Posts: 79
Karma: 380
Join Date: Mar 2008
Location: Girona, Spain
Device: iLiad, DR1000s
Hi tovarish ,

I'm glad you liked iViewer and I would appreciate any contribution (I'm a Java Programmer and it has been a long time since I program in C++ ).

I use the ipdf source as example to implement iViewer and lot of code are adapted form ipdf.

In order to implement the landscape images split you would need to include buttons in the toolbar see IliadToolbar.cpp in the iViewer project in Dev Hub,
and ipdf source class channels.cpp.

the instruction is:

tbAppendPlatformIcon( ertoolbarChannel,
ER_PDF_VIEWER_UA_ID,
iconID_trashcan,
-1);
tbSetStatePlatformIcon(ertoolbarChannel,
ER_PDF_VIEWER_UA_ID,
iconID_trashcan,
iconState_grey );

the only icons you could use (as far as i know) are the already defined. I attach a list of the icons .

After that set the callback function (gtk_signal_connect (GTK_OBJECT (window), "button_press_event", GTK_SIGNAL_FUNC (buttonPressCbk), this)
(see PDFView.cpp from ipdf source)

In iViewer I tried to package all toolbar functions in the class IliadToolbar, but I never finished it.

After that iViewer works with two lists TodoList has an item for every page you wan to render, PageList has the pages rendered as Pixbuf (GrPixbuf is a class that contains the GtkPixbuf). If you can split the page Pixbuf in two and put them in the PageList, iViewer will show them.

I hope this helped you.

I included the attachmend in the first post. The list of icons has de icon id and the image for every state. (iconstate_grey, iconstate_normal and iconstate_selected)

Last edited by Max; 11-10-2009 at 04:46 PM.
Max is offline   Reply With Quote