I see that you didn't include GW_PAGE_SCALE() in GW 4.4, which I really think would have been a great addition. As an alternative, what would you think of creating a third party lib GW_UTILS.bas which would contain useful functions which don't find their way into the core GW.bas? Such 3pp lib could grow as needed.
I report an example below.
! This is the third party lib "GW_UTILS.bas" ! http://laughton.com/basic/programs/html/GW%20(GUI-Web%20lib)/ ! ! This lib requires the main lib "GW.bas" and of course Android RFO-BASIC! ! To download the lib when you have "GW.bas" on your device, do: ! GW_DOWNLOAD_THIRD_PARTY("GW_UTILS.bas") ! ! USAGE: in your program do: INCLUDE "GW.bas" ! Then call: ! GW_PAGE_SCALE (mypage, zoom) % Changes page scaling -- zoom = 0.1 .. 1 ! GW_SET_VIEWPORT (mypage, "param1=value1 param2=value2 ...") % Changes viewport for page ! :PARAM: :VALUES ! :width :device-width|1 .. 10000 ! :height :device-height|1 .. 10000 ! :initial-scale :0.1 .. 10 ! :minimum-scale :0.1 .. 10 ! :maximum-scale :0.1 .. 10 ! :user-scalable :yes|no ! NOTE: Default Viewport is: ! width=device-width initial-scale=1 minimum-scale=1 maximum-scale=1 user-scalable=no
Joined: Tue Jan 03, 2012 9:31 am Posts: 5487 Location: Paris, France
So far only Gilles showed interest in a scaling function for the page. I proposed GW_PAGE_SCALE() although I really wasn't satisfied of it (it looks too much like a coarse hack). Also, I didn't get any feedback on it...
Plus, it's a 4-line function (!) If one user wants a feature that needs 4 lines of code, it wouldn't be very fair that I slow-down everybody else's GW program by adding a new function to the lib, would it ?
I'll gladly maintain GW_SET_VIEWPORT(), but you'll need to maintain your GW_PAGE_SCALE() . The 3rd party lib GW_UTILS.bas should be a misc collection of small utility functions from different sources. Then from time to time if one understands that a specific function gets popular, it could be promoted into GW.bas.
By the way, would you prefer GW_SET_VIEWPORT or GW_CHANGE_VIEWPORT?
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum