Hi, On Mon, Oct 29, 2007 at 11:18:21PM +0000, place wrote:
(I could have sworn that I sent you a patch making the page menu work, but since I didn't realize that it wasn't in the main tree until I was preparing this patch, it's included here. I'll likely end up separating it out as we go through the process of refining the rest of this patch...)
This has an extra argument in the link signals, as you recommended, instead of the array of image handlers that my previous version used.
I had to add an x_img to style.
The link block stores the Image and the url until loading is requested.
Great! I made an extensive revision of the patch and commited it with some minor changes (attached so you can review and sync more easily). Urbi et orbi, this patch set more or less is: - Added code for the image menu and hooked it to dw2 signals. - Hooked the page and link menus. - Added code for optional image loading (nice interface) very advanced! - Fixed the position of the Bug Meter popup menu. - Added an extra argument in the link signals - Aded an x_img camp to style (an image array index, like x_link).
Although there's no placeholder, if there's anything to click on, left click loads instances of that image and middle click loads all images on the page. The latter should probably be in the page menu instead.
The patch is very advanced and here go my comments: Yes, a place holder is the next step (sometimes image size is provided as attributes in the IMG element, some others not; in which case we can use a standard size). Note that with the current patch, images that are also links are not working (i.e. clicking on them loads the image but doesn't follow the link). I understand that left-clicking to load an image is quite handy. Now, FLTK2 has a nice feature with popups and it's that they can remember a menuitem position. If we make the right click popup remember the "load image" item, the same easeness of user interface may be attained (you may look in the test/menu program inside fltk2 sources). I also agree that "load all images" naturally belongs to the page menu. BTW, with regard to the toggle button, in the past I thought of a toolbox icon with a popup holding things like: "Load images" // toggle item "Force my colors" // toggle item "Restrict width" // toggle item ... It looks lilke a good idea to me, but I don't know whether in practice this is as convenient as it looks. Comments welcomed. -- Cheers Jorge.-