Crossplatform scrollable Canvas Gadget (Win + OSX done)
Posted: Wed Nov 16, 2011 10:05 pm
Hi,
I am looking for someone with Mac OSX experience to convert some Windows code of mine to run on a Mac OSX (Linux will follow later). I am happy to do it myself, but have no access to a Mac just yet (am planning on buying one asap). Even when I have purchased one then it will take time for me to learn the Carbon API's etc.
This way, we don't have to wait around!
I am looking to use the nice new canvas gadget to create cross-platform controls. The biggest hurdle to this though (at least with the kind of controls I like to build) is the lack of a scrolling facility. PB simply does not give us the commands to do this in a nice way. We cannot really use separate scrollbar controls because our PB event loops are not provided with all the necessary scrolling events (and I think this would be an un-elegant and messy solution anyhow!) A ScrollArea gadget is not appropriate because we would then need to use a canvas gadget which is physically the size of the scrollable area and Windows, for one, places limits on this size. There are presumably also limits on the size of a canvas gadget due to image size restrictions etc.
For me, there is only one satisfactory and viable solution considering that I wish to use the existing canvas gadget and not roll my own; namely to build a cross-platform container into which we can embed a PB canvas gadget. The container would handle all of the scrolling messages and notifications etc. and the canvas gadget would be exactly as PB intended. No matter how large the 'scrollable area' (and this, unlike a ScrollArea gadget, can be as large as we like), the embedded canvas gadget would remain the size of the control's client area. We have access to all of the canvas gadget's events (such as #PB_EventType_MouseEnter) and the container will provide us with all the necessary scrolling events.
Now, by pure coincidence, such a control already exists... I have just finished it, and it works great (if I say so myself!)
The problem... Window's only at this time!
Now the code has been split into a couple of source files with all the Windows specific code thrown into one file containing 600 lines of source. Much of this is OOP 'overhead' however. A Mac OSX version is a 'simple' matter of converting this one file to run on a Mac! Quite a lot of the source comprising the 600 lines of code can be carried straight across and so really we're looking at perhaps a hundred lines of code requiring some kind of conversion. Course I am aware that Mac OSX probably handles scrolling completely different to Windows and so the Mac version might need a completely different approach in order to offer the same facilities as my Windows version, thus necessitating a complete rewrite of the 600 aforementioned lines. I may even have to rewrite my version to fit in with the Mac one!
Whatever the case, I am thus seeking an experienced Mac OSX / Carbon developer to work on the conversion. I would have to work closely with that person to ensure that our 2 versions operate in exactly the same way; offering the same facilities etc.
I am happy to pay for this, although I could only countenance a flat-fee as opposed to an hourly rate etc. In this case I would of course keep the resulting code myself and not make it publicly available to others except through any cross-platform controls I subsequently develop and release. Otherwise, with the other person's permission, I would be happy for the code to be made available to all.
Please contact me through pm if interested. I shall endeavour to reply asap.
Regards.
Stephen.
I am looking for someone with Mac OSX experience to convert some Windows code of mine to run on a Mac OSX (Linux will follow later). I am happy to do it myself, but have no access to a Mac just yet (am planning on buying one asap). Even when I have purchased one then it will take time for me to learn the Carbon API's etc.
This way, we don't have to wait around!
I am looking to use the nice new canvas gadget to create cross-platform controls. The biggest hurdle to this though (at least with the kind of controls I like to build) is the lack of a scrolling facility. PB simply does not give us the commands to do this in a nice way. We cannot really use separate scrollbar controls because our PB event loops are not provided with all the necessary scrolling events (and I think this would be an un-elegant and messy solution anyhow!) A ScrollArea gadget is not appropriate because we would then need to use a canvas gadget which is physically the size of the scrollable area and Windows, for one, places limits on this size. There are presumably also limits on the size of a canvas gadget due to image size restrictions etc.
For me, there is only one satisfactory and viable solution considering that I wish to use the existing canvas gadget and not roll my own; namely to build a cross-platform container into which we can embed a PB canvas gadget. The container would handle all of the scrolling messages and notifications etc. and the canvas gadget would be exactly as PB intended. No matter how large the 'scrollable area' (and this, unlike a ScrollArea gadget, can be as large as we like), the embedded canvas gadget would remain the size of the control's client area. We have access to all of the canvas gadget's events (such as #PB_EventType_MouseEnter) and the container will provide us with all the necessary scrolling events.
Now, by pure coincidence, such a control already exists... I have just finished it, and it works great (if I say so myself!)
The problem... Window's only at this time!
Now the code has been split into a couple of source files with all the Windows specific code thrown into one file containing 600 lines of source. Much of this is OOP 'overhead' however. A Mac OSX version is a 'simple' matter of converting this one file to run on a Mac! Quite a lot of the source comprising the 600 lines of code can be carried straight across and so really we're looking at perhaps a hundred lines of code requiring some kind of conversion. Course I am aware that Mac OSX probably handles scrolling completely different to Windows and so the Mac version might need a completely different approach in order to offer the same facilities as my Windows version, thus necessitating a complete rewrite of the 600 aforementioned lines. I may even have to rewrite my version to fit in with the Mac one!
Whatever the case, I am thus seeking an experienced Mac OSX / Carbon developer to work on the conversion. I would have to work closely with that person to ensure that our 2 versions operate in exactly the same way; offering the same facilities etc.
I am happy to pay for this, although I could only countenance a flat-fee as opposed to an hourly rate etc. In this case I would of course keep the resulting code myself and not make it publicly available to others except through any cross-platform controls I subsequently develop and release. Otherwise, with the other person's permission, I would be happy for the code to be made available to all.
Please contact me through pm if interested. I shall endeavour to reply asap.
Regards.
Stephen.