FLTK on IOS 7 and Android

748 views
Skip to first unread message

Andr EBERSOLD

unread,
Feb 4, 2014, 8:29:42 AM2/4/14
to fltkg...@googlegroups.com
Hello,

Has someone ever tried to build fltk for IOS 7 and Android ?

Would be interesting to know if someone is working on the subject.

Kind regards,
Andre E.

MacArthur, Ian (Selex ES, UK)

unread,
Feb 4, 2014, 8:57:29 AM2/4/14
to fltkg...@googlegroups.com
> Has someone ever tried to build fltk for
> IOS 7 and Android ?
>
> Would be interesting to know if someone
> is working on the subject.

This comes up from time to time, so it might be worth searching the archives for previous responses, to see the discussions and such.

I think the short answer amounts, basically, to no.


The view (as I remember it) was that an IOS port is unlikely to be acceptable to Apple's app store guidelines, so even if it existed it would probably not gain any traction.

An Android port wouldn't have those issues, I assume, so ought to be feasible, though the rendering layer in Android is very different from X11, and some considerable porting work would be needed.

I have a vague idea that someone (maybe Matt?) actually looked at that way back when?

I seem to recall that it was suggested that fltk's back end could be made to write html5 - there was a browser based proof-of-concept for that a while back, so a suitably tweaked fltk might be used like that to generate code that could "run" on any html5 capable browser, including a suitable phone, I suppose?




Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

Andr EBERSOLD

unread,
Feb 4, 2014, 11:09:41 AM2/4/14
to fltkg...@googlegroups.com, ian.ma...@selex-es.com
Hi Ian,

Thanks for your reply. I'm not sure if not considering these platforms is the best strategy. The PC market decreased by 10% last year and this trend will probably continue this year.
wxWidgets team has created the wxIOS project.
I think that a C++ graphical user interface that would work on Both IOS and Android would be a big plus. It does not exist today and people who develop mobile application need to maintain two versions of the software. One written in Java and the other in Objective C. To be able to write code that would work on both platform is a big gain for programmer.

Andre E.

Greg Ercolano

unread,
Feb 4, 2014, 12:10:35 PM2/4/14
to fltkg...@googlegroups.com
On 02/04/14 08:09, Andr EBERSOLD wrote:
> Hi Ian,
>
> Thanks for your reply. I'm not sure if not considering these platforms is the best strategy. The PC market decreased by 10% last year and this trend will probably continue this year.
> wxWidgets team has created the wxIOS project.
> I think that a C++ graphical user interface that would work on Both IOS and Android would be a big plus. It does not exist today and people who develop mobile application need to maintain two versions of the software. One written in Java and the other in Objective C. To be able to write code that would work on both platform is a big gain for programmer.

Someone new would have to step up to do the port.

I don't think any of the current fltk devs are familiar enough
with either platform to do a port.

If someone wants to step up to do it, they're free to do so.
But it might end up as a code fork unless it can be integrated
into FLTK. To ensure such a port goes well, the dev in question
should probably establish a running conversation with the devs
as the port progresses so that any changes to the core are done
in a way we'd be willing to integrate on completion.

What I'd advise /against/ is someone just going off and doing
a port, and then dropping a ginormous patch that changes large
parts of the core without input from the devs, as such a thing
is unlikely to be merged.

Regarding IOS..

I think Ian's right though about ios; Apple's store won't accept
apps developed in gui toolkits that aren't native in look+feel.

Unlike FLTK, wxwidgets uses /native/ widgets (IIRC) and therefore
has an advantage here in that apple might accept an app written
with it because the 'look and feel' will be apple's own.

FLTK is different in that it doesn't use native widgets,
it defines its own.
.
So if there were a port of FLTK for IOS, and one were to 'release'
a tool written with it, from what I've read of Apple's app store guidelines,
it would be rejected, and therefore be severely limited in use
only to other devs.

But perhaps they'll relax these restrictions, or perhaps there's
a use for non-istore apps among devs that makes it worth porting.

Regarding Android..

Google wants Android apps written in Java only, so that a single
app can run on all their different hardware (which is not all
binary compatible)

That said, the dev community has strongly pressured Google to
supply a C/C++ API, and this API has been growing. Google still
warns people not to write complete apps with the new C/C++ API,
advising the bulk of the app be written in Java, and the C/C++
code used only in small parts of the app where speed is needed.

But devs will do what they want regardless of the vendor's
desires, so there may be an opportunity for FLTK here.
Still, all the window manager stuff is different, so it'd
be a non-trivial port.

Dmitrij K

unread,
Feb 4, 2014, 12:35:23 PM2/4/14
to fltkg...@googlegroups.com
Greg wrote:
> I think Ian's right though about ios; Apple's store won't accept
> apps developed in gui toolkits that aren't native in look+feel.

I had minds about creating themes for each platform (most closly to native disigns),
but that are minds only in this moment ... Perhaps in a future I will took view to that,
because I know how to make a theme for FLTK ...

--
regards

Greg Ercolano

unread,
Feb 4, 2014, 12:45:27 PM2/4/14
to fltkg...@googlegroups.com
Neat.. sounds good.

Yes, I've had to make a few 'nice' looking widgets in FLTK recently,
and I found I could do cairo-like drawing without cairo, just by
dragging a tiny PNG alpha image around like a 'paint brush'.
This let me draw "anti-aliased" lines using native FLTK drawing tools.

Dmitrij K

unread,
Feb 4, 2014, 1:43:31 PM2/4/14
to fltkg...@googlegroups.com
> dragging a tiny PNG alpha image around like a 'paint brush'.
> This let me draw "anti-aliased" lines using native FLTK drawing tools.

Cool !
Where can I look to that (realization of algorithm 'paint brush') ?
Does that exists in your chit page ?

PS: that is very compositely - find out border of object in image
and do 'brush' for object's border...

--
regards

Greg Ercolano

unread,
Feb 4, 2014, 4:12:31 PM2/4/14
to fltkg...@googlegroups.com
On 02/04/14 10:43, Dmitrij K wrote:
>> dragging a tiny PNG alpha image around like a 'paint brush'.
>> This let me draw "anti-aliased" lines using native FLTK drawing tools.
>
> Cool !
> Where can I look to that (realization of algorithm 'paint brush') ?
> Does that exists in your chit page ?

Yes, see:
http://seriss.com/people/erco/fltk/#MultiColorBarGraph

In particular, the AddColorBar() method that uses a "disc"
that is transparent around the corners.

In this case I'm using it to draw horizontal lines, so
rather than draw the whole line dragging around the disc,
I just draw a rectangle that ends at the centers of the disc,
and then drop a disk on either end of the rectangle to give
it 'end caps'.

But I imagine if you drag the disc around with a brezenham
algorithm, you can draw diagonal lines and such the same way
(albeit "slowly").

What one can do is define a disc just by the alpha channels,
and then load into the RGB values whatever color you want
just before drawing, so that you can draw in different
colors.

I think that's what I did there.. can't remember now.


> PS: that is very compositely - find out border of object in image
> and do 'brush' for object's border...

For straight lines (horizontal or vertical) you can get away
with regular rectangle drawing, then plop the "disc" at the
corners to get nice rounded edges.

Dmitrij K

unread,
Feb 5, 2014, 2:18:24 AM2/5/14
to fltkg...@googlegroups.com
Greg wrote:
> Yes, see:
> http://seriss.com/people/erco/fltk/#MultiColorBarGraph

Thanks for the link !

--
regards

keghn feem

unread,
Apr 30, 2014, 8:32:13 PM4/30/14
to fltkg...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages