Created at 14:23 Nov 03, 2014 by AlbrechtS
Even though FLTK 1.3.3 does not fix all STRs, we decided to release FLTK 1.3.3 as it contains many new features, bug fixes, and adaptations to new compiler releases.
- New class Fl_Copy_Surface allows copying graphical data to the clipboard in a cross-platform way (STR #3058). - Support for pasting graphical data from the clipboard to a widget. - New class Fl_Image_Surface allows drawing into an Fl_Image object. - Methods Fl::add_clipboard_notify() and Fl::remove_clipboard_notify() to get notifications whenever the clipboard changes (STR #2636). - New method Fl_Window::wait_for_expose() (STR #3124, STR #3129). - New bilinear scaling method for RGB images (STR #2869, STR #3062). - New method Fl_Widget::top_window() (STR #2948). - New method Fl_Widget::top_window_offset() (part of STR #2944). - New Fl_Tree_Item methods label_x(), label_y(), label_w(), label_h(). - New methods Fl::enable_im() and Fl::disable_im() to enable/disable system Input Methods (IM). - New methods Fl::add_system_handler() and Fl::remove_system_handler() to intercept low level system events. - New FLTK scheme "gleam" (STR #2672). - New method Fl::is_scheme() to compare the current scheme name. - New method to set custom icons for windows (STR #2816), see Fl_Window::icon() for more info. - New method to set any custom cursor, based on a Fl_RGB_Image object. Also changed fallback cursors to use this method, so that fallback cursors are handled in a platform independent manner (STR #2660). - New ability to convert Fl_Pixmap to Fl_RGB_Image (STR #2659). - Support for full screen windows over multiple monitors. - New optional line numbers in Fl_Text_Display and options to control line numbers and word wrapping (on/off) in example test/editor.cxx. - On Linux/Unix, class Fl_Native_File_Chooser uses file dialogs from the Gnome environment (provided by the libgtk dynamic library) if available, and falls back to Fl_File_Chooser if not (STR #3088). Use option Fl::OPTION_FNFC_USES_GTK to enable/disable this feature. - New support for the Mac OS text input system that deals with character composition and input of languages with large character sets (e.g. Chinese and Japanese). This implementation has been reported to work well for Chinese. Superficial testing suggests it's also operational for Japanese. In-depth testing remains needed though.
- Many CMake improvements (e.g. STR #2962, 2977, 2994, 3045, 3055). - Some autoconf, configure improvements. - Removed 1024 bytes constraint in labels and browser lines (STR #2990). - Mac OS version of Fl_Native_File_Chooser: when using filters in a save file dialog, the output file extension gets changed when the user modifies the output file type. - Many Mac OS X improvements related to Fl_Sys_Menu_Bar. - Improved Mac OS X keyboard handling of special keys or combinations. - General Mac OS X improvements, incl. high resolution (Retina) displays, and support up to Mac OS X 10.10. - Documentation improvements and clarifications. - Printing support improvements, including GL windows. - Many improvements related to Fl_Tree (some of them only as ABI breaking features, see below). - Some static data has been made 'const' to improve memory usage with shared libraries. - Don't grab navkeys with modifiers (CTRL, ALT), as the application may want them (STR #3104). - Check compiler support of -fvisibility, -fvisibility-inlines-hidden, and use it, if available. Reduces shared library size. - Drag'n'drop behaves better now: if text is dropped in the widget it comes from, then it works like cut and paste. - Other improvements of DND handling when dragging text from other applications, e.g. Firefox and Thunderbird. - Windows message WM_QUIT is processed like SIGTERM, i.e. as a request to terminate the program. - Fluid no longer closes the code window when hitting ESC (STR #2997). - Improved Fl_Widget::when() handling in Fl_Tabs (STR #2939). - Improved support for more recent compilers (clang and gcc) that issue more warnings, and fixed some 32-/64-bit compilation issues. - Added method Fl_Window::clear_modal_states() to make it possible to remove the modal or non-modal state from a window (STR #3123).
- Fixed word selection dragging in text input (STR #3014). - Fixed border padding for special cases (STR #3061, Windows only). - Fixed crash if Fl_Window::flush() called while window not shown() (STR #3028). - Fixed segfault in fl_set_fonts_xft.cxx when loading fonts not named as expected (STR #2976). - Fixed a memory leak in font loading/allocation (STR #3069). - Fixed minor memory leaks in handling/freeing of X11 objects. - Fixed OS X fl_read_image() and Fl_Paged_Device::print_window_part() when using a Retina display. - Fixed MinGW build if configure didn't find strcasecmp() (STR #2994). - Fixed access of protected member under Linux/Unix (STR #2903). - Fixed various Mac specific OpenGL issues (STR #2944) - Fixed PostScript printing with non-english locale (STR #3130). - Fixed a regression in Fl_File_Chooser since FLTK 1.1.8: the Enter key now selects the file again. - Fixed a bug in Fl_Native_File_Chooser (Windows) for some file name input filters (STR #3101). - Fixed out-of-bounds memory access in Fl_Text_Display (STR #2730).
To enable the following ABI features, put: #define FLTK_ABI_VERSION 10303 ..at the top of your FL/Enumerations.H and rebuild FLTK and your app. - Added Fl_Window::shape(const Fl_Image*) to create arbitrarily-shaped windows - Made Fl_Help_View::handle() public and Fl_Help_View::draw() protected to enable inheritance and for consistency (STR #2834). Note: both methods were private. - Made Fl_Scroll::recalc_scrollbars() protected so that it can be used in derived widgets to calculate scrollbar visibility and positions. - Added Fl_Table::tab_cell_nav() for controlling Tab key navigation of table - Added Fl_Tree::get_selected_items(), returns the selected items as an array - Added Fl_Tree::item_draw_callback(), letting one define a custom draw function for Fl_Tree_Item's. - Fl_Tree: various related changes: o Added horizontal scrollbar o Separated draw() and tree size calculation o Added new public methods: > resize() -- uses optimized dim calc, avoids tree recalc > next_item() -- added parameters: direction, visibility > extend_selection() -- added parameters, improved algorithm > calc_dimensions() -- calc tix/y/w/h, tox/y/w/h and scrollbars > calc_tree() -- calc tree_w/tree_h > recalc_tree() -- schedules calc_tree() > first_visible_item(), last_visible_item(), next_visible_item() > first_selected_item(), last_selected_item(), next_selected_item() o Added protected variables: > _tix/y/w/h -- tree widget 'inner' dimension > _tox/y/w/h -- tree widget 'outer' dimension > _tree_w,_tree_h -- entire tree hierarchy width/height o Deprecated: > item_clicked() -- use callback_item() instead > first_visible() -- use first_visible_item() instead > last_visible() -- use last_visible_item() instead - Fl_Tree_Item: various related changes: o Added Fl_Tree ptr: needed for auto-recalc when item modified directly o Added new methods tree(), recalc_tree() o Added new ctor that accepts Fl_Tree* o draw() parameters changed to include tree size calculations o Deprecated: > ctor using Fl_Tree_Prefs parameter (Fl_Tree* version better, and must be used for 1.3.3 ABI features to work correctly) > next_displayed() -- use next_visible() instead > prev_displayed() -- use prev_visible() instead - test/tree: added tests for newly added features
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What link order do you have in your Makefile? I wonder if there's something odd about the linkage order or something that is exposing a problem here?
FWIW, and assuming you do have XFT working, then XFontStruct* Fl_XFont_On_Demand::value() is defined in fl_font_xft.cxx near line 540, and prototyped (and public) in x.H near line 125, so should be visible in the generated code.
Was there anything more in the error message? Perhaps the decorated name does not match for some reason, etc.?
> This problem has been reported already but I did not see a fix yet. Is
> there any simple work around?
Can you try static linking? It looks like it might be a dynamic linking issue, at a guess...
Is there some reason why you opted for dynamic linking for your app.? It is rarely the better choice with fltk apps.
Where was it reported?
Hmm. Obviously libfltk_gl.so includes a reference to
Fl_XFont_On_Demand::value(), and this is not exported from libfltk.so.
Here's a small patch:
Index: FL/x.H
===================================================================
--- FL/x.H (revision 10486)
+++ FL/x.H (working copy)
@@ -114,7 +114,7 @@
// With Xlib / X11 fonts, fl_xfont will return the current selected font.
// With XFT / X11 fonts, fl_xfont will attempt to return the bitmap "core" font most
// similar to (usually the same as) the current XFT font.
-class Fl_XFont_On_Demand
+class FL_EXPORT Fl_XFont_On_Demand
{
public:
Fl_XFont_On_Demand(XFontStruct* p = NULL) : ptr(p) { }
The short form: add FL_EXPORT in line 117 of FL/x.H.
Richard, can you please try the above patch with dynamic linking? This
would help to verify the problem so that we know this is the correct fix.
But before you do this, please try what happens if you revert the order
of the fltk libs as Ian suggested. This should be done anyway, but I
don't think that it will help here. So please do two tests and report
the outcome:
(1) reorder libs so that libfltk_gl is before libfltk (both static and
shared builds)
I assume this will give the same error in the shared build.
(2) Apply the patch above, and link shared again.
I assume this will work. Hopefully.
Thanks for your assistance.
Are you sure you linked dynamically on Linux before? I assume that this
problem would also have been visible in FLTK 1.3.2 when linking shared.
Maybe you didn't build the shared libs, and so the linker used the
static libs as a fallback.
I would be surprised if this was not the case with 1.3.2, but maybe
there was something else going on (no shared libs available?).
> By the way is there a strong advantage to using the fltk libraries from
> the /usr/X11R6/lib64 as opposed to the ones found in /usr/lib64? This
> is something that is not clear to me yet.
Generally there's no advantage of any directory. But if you build from
source, then I'd recommend either not to install the FLTK libs at all
(as Ian suggested), or to remove the system libs (if you installed any).
The two different directories make me think that the libs in
/usr/X11R6/lib64 are installed by a system package - maybe FLTK itself
or any app that needs FLTK.
Your configure lines in your previous post say:
./configure \
--prefix=/usr \
...
--libdir=/usr/lib${LIBDIRSUFFIX} \
so I *assume* that you installed _your_ version in /usr/lib64, and that
should be the version you use for building your apps, of course.
Otherwise you wouldn't need to build FLTK at all, if there is a system
package installed - however, this may be an older version and you might
want the newest version, so you build from source.
The minimal option you should consider is to remove the fltk-devel or
fltk-dev package to remove the FLTK headers of older releases installed
by your linux distro.
> > What link order do you have in your Makefile? I wonder
> > if there's something odd about the linkage order or
> > something that is exposing a problem here?
> -lfltk -lfltk_gl -lXxf86vm -lGL -lGLU -lXext -lX11 -lXft
Ah, that's interesting...
libfltk resolves symbols that are needed by libfltk_gl so really ought to be listed after it.
I wonder if trying...
-lfltk_gl -lfltk -lXxf86vm -lGL -lGLU -lXext -lX11 -lXft
...etc. would work any better.
Be interested to hear the outcome.
Dynamic linking a lib can be a win if many apps are using the lib, or if the lib itself is large.
I find that neither is (generally) true for fltk apps, so pretty much always static link.
YMMV.
> By the way is there a strong advantage to using the
> fltk libraries from the /usr/X11R6/lib64 as opposed
> to the ones found in /usr/lib64?
I could not say.
FWIW, I seldom "install" fltk at all, since it works perfectly well from the build location (and I tend to have multiple, potentially incompatible, fltk versions on the go anyway, so installation is not really an option for me...)
Judicious use of fltk-config makes it easy to have multiple copies of fltk and use each directly from its build tree.