Ftree and GTK

I've been asked about a GTK version of Ftree by a few people. I think in general they have been in the tyre-kicker class, but I think one or two were genuine users with sensible questions, so to save repeating myself, here are my thoughts on the subject.

Firstly if its just a look-and-feel thing, then sorry, too many other things to do.. Same response applies if you don't have an actual problem that needs GTK or a piece of GTK functionality.

I'd also add the I've recently been getting increasingly disillusioned with GTK desktops. The developers seem to be determined to emulate all the MS problems that drove us away in the first place. I'm on Linux precisely because I don't want those "issues".
I think we need to remind people that applications should be desktop independent. The desktop should not be part of the OS.

Back to FTree on GTK...

If you have a genuine reason for asking the question I might be interested.

My first question is what exactly is the feature you need, then why do you need it and then do you know enough about the internals of GTK to advise whether that feature could be added (or even just emulated) without doing a full conversion to GTK?

On the subject of conversion to GTK, the first thing I would observe is that it would be non-trivial. FTree is about 30k lines of source and a lot of them are dealing with the GUI/user interaction.
The simplest way of dealing with it might be a GTK based Xforms compatability library that emulated xforms in GTK. This would actually be a useful set of components for others too. Taking this concept further, what would be more sensible still, would be to go the whole hog and build a wxWindows xforms library. This would have real benefits for platform independance.

For anyone in the least bit serious about this, here is a simple list of the functions that I use and that would need to be emulated..

fl_activate_form(), fl_activate_object(), fl_add_box(), fl_add_browser(), fl_add_browser_line(), fl_add_button(), fl_add_canvas(), fl_add_canvas_handler(), fl_add_checkbutton(), fl_add_choice(), fl_add_frame(), fl_add_input(), fl_add_labelframe(), fl_add_menu(), fl_add_slider(), fl_add_tabfolder(), fl_add_text(), fl_add_timeout(), fl_add_valslider(), fl_addto_choice(), fl_addto_tabfolder(), fl_bgn_form(), fl_bgn_group(), fl_call_object_callback(), fl_calloc(), fl_check_forms(), fl_check_input(), fl_clear_browser(), fl_deactivate_form(), fl_deactivate_object(), fl_default_window(), fl_deselect_browser(), fl_do_forms(), fl_end_form(), fl_end_group(), fl_enumerate_fonts(), fl_form_is_visible(), fl_freeze_form(), fl_get_app_resources(), fl_get_border_width(), fl_get_browser(), fl_get_browser_line(), fl_get_browser_maxline(), fl_get_browser_screenlines(), fl_get_browser_topline(), fl_get_button(), fl_get_canvas_id(), fl_get_choice(), fl_get_display(), fl_get_flcolor(), fl_get_focus_object(), fl_get_form(), fl_get_input(), fl_get_menu(), fl_get_menu_item_mode(), fl_get_object_geometry(), fl_get_slider_value(), fl_get_winsize(), fl_hide_form(), fl_hide_object(), fl_initialize(), fl_input_changed(), fl_input_clear_changed(), fl_input_set_changed(), fl_prepare_form_window(), fl_raise_form(), fl_redraw_form(), fl_redraw_object(), fl_register_raw_callback(), fl_remove_timeout(), fl_reset_cursor(), fl_select_browser_line(), fl_set_atclose(), fl_set_border_width(), fl_set_browser_hscrollbar(), fl_set_browser_scrollbarsize(), fl_set_browser_topline(), fl_set_browser_vscrollbar(), fl_set_button(), fl_set_choice(), fl_set_choice_entries(), fl_set_cursor(), fl_set_focus_object(), fl_set_font_name(), fl_set_form_callback(), fl_set_form_minsize(), fl_set_form_position(), fl_set_form_size(), fl_set_goodies_font(), fl_set_input(), fl_set_input_filter(), fl_set_input_hscrollbar(), fl_set_input_return(), fl_set_input_vscrollbar(), fl_set_menu(), fl_set_menu_item_mode(), fl_set_object_boxtype(), fl_set_object_callback(), fl_set_object_color(), fl_set_object_dblbuffer(), fl_set_object_gravity(), fl_set_object_label(), fl_set_object_lalign(), fl_set_object_lcolor(), fl_set_object_lsize(), fl_set_object_lstyle(), fl_set_object_prehandler(), fl_set_object_resize(), fl_set_slider_bounds(), fl_set_slider_filter(), fl_set_slider_size(), fl_set_slider_value(), fl_set_text(), fl_show_alert(), fl_show_file_selector(), fl_show_form(), fl_show_form_window(), fl_show_fselector(), fl_show_message(), fl_show_object(), fl_show_question(), fl_unfreeze_form(), fl_update_display(), fl_winisvalid(), fl_winmove(), fl_winposition(), fl_winreparent(), fl_winresize(),

For what its worth, thats about 128 functions. I got the list using something like

grep fl_ *.c | strstr fl_ | grep '(' | awk 'BEGIN{FS="("}{print $1 "(),"}' | sort | uniq

which is not perfect, but gives a good rough idea! In addition there is all the stuff that accesses xforms data structs...

I admit, the size of that list even surprised me.

The simple summary is, that if someone developed an easy migration path, I would certainly consider it. And since Xforms is now open source, there is nothing now to stop you building just that. So once you have the Xforms to GTK conversion library working, let me know, I'll try a build.

Last modified: 5th April 2005