Commit 398d9e39 authored by Aaron M. Ucko's avatar Aaron M. Ucko

Load fltk-1.1.5rc3 into branches/upstream/current.

parent 190e20c8
----TEXT----
The second release candidate for FLTK 1.1.5 is now available for
download and testing. You now have until August 10th, 2004 to
The third release candidate for FLTK 1.1.5 is now available for
download and testing. You now have until October 8th, 2004 to
report any problems with this release candidate using the
software trouble report form at the following URL:
......@@ -33,6 +33,65 @@ exceptions that allow for static linking.
Changes since FLTK 1.1.4 include:
- Documentation updates (STR #505, STR #513)
- Updated PNG library source to 1.2.7.
- Updated ZLIB library source to 1.2.1.
- Fixed VC++ project file problems (STR #476, STR #478,
STR #520, STR #527, STR #537)
- Now look for 8 bits of alpha when the developer has
requested FL_RGB8 (STR #541)
- The last line in an Fl_Help_View widget was not
aligned properly (STR #536)
- The "search" symbol looked like a Q (STR #536)
- Changed Fl_Help_View::get_color() to use a lookup
table to avoid serious Borland C++ 5.5 compiler bugs
(STR #533)
- Fixed Watcom compiler warnings with FL/Fl_Widget.H
(STR #540)
- The image class copy() methods did not always make a
separate copy of the image data (STR #539)
- Fixed an edge case in fl_old_shortcut() that could
cause it to read beyond then end of the shortcut
string (used for XForms named shortcuts)
- Added (unsupported) CMake files (STR #499)
- Tooltips would not reappear on the same widget, and
the initial tooltip delay was not used after a tooltip
was shown (STR #465)
- Fixed a compile problem with the Linux 2.6 threading
support (STR #483)
- Fixed problems with 2-byte Xpm files on 64-bit
platforms (STR #525)
- FLTK didn't handle the ReparentNotify event on X11
(STR #524)
- The old source file "fl_set_gray.cxx" is not needed
(STR #516)
- Fl_Text_Display still called delete[] instead of
free() in one place (STR #503)
- The symbol test program did not handle the @+ symbol
properly (STR #490)
- Fl_File_Chooser didn't correctly call isprint() and
isspace() when checking to see if the current file was
text that can be previewed (STR #517)
- FLUID didn't compile with Borland C++ due to a
compiler bug (STR #496)
- Fl_Positioner did not handle reversed min and max
values (STR #510)
- fl_descent(), fl_height(), and fl_width() would crash
a program if you didn't call fl_font() first; they now
return -1 if no font is set (STR #500)
- Added test/unittests to verify pixel drawing and
alignment across platforms
- Fl_Menu_::find_item() didn't determine the menu path
properly (STR #481)
- The build system now installs image library header
files in FL/images/filename.h so that FLTK programs
will use the same header files as the FLTK image
libraries.
- The build system now creates image libraries named
"libfltk_name.a" instead of "libname.a" to avoid
clobbering an existing installed library (STR #480)
[1.1.5rc2]
- Documentation updates (STR #365, STR #399, STR #407,
STR #412, STR #414, STR #452, STR #462)
- Fl_Text_Display did not handle drawing of overlapping
......@@ -230,8 +289,8 @@ Changes since FLTK 1.1.4 include:
----HTML----
<P>The second release candidate for FLTK 1.1.5 is now available
for download and testing. You now have until August 10th, 2004 to
<P>The third release candidate for FLTK 1.1.5 is now available
for download and testing. You now have until Ocotber 8th, 2004 to
report any problems with this release candidate using the
software trouble report form at the following URL:</P>
......@@ -267,6 +326,66 @@ exceptions that allow for static linking.
<UL>
<li>Documentation updates (<a href='http://www.fltk.org/str.php?L505'>STR #505</a>, <a href='http://www.fltk.org/str.php?L513'>STR #513</a>)
<li>Updated PNG library source to 1.2.7.
<li>Updated ZLIB library source to 1.2.1.
<li>Fixed VC++ project file problems (<a href='http://www.fltk.org/str.php?L476'>STR #476</a>, <a href='http://www.fltk.org/str.php?L478'>STR #478</a>,
<a href='http://www.fltk.org/str.php?L520'>STR #520</a>, <a href='http://www.fltk.org/str.php?L527'>STR #527</a>, <a href='http://www.fltk.org/str.php?L537'>STR #537</a>)
<li>Now look for 8 bits of alpha when the developer has
requested FL_RGB8 (<a href='http://www.fltk.org/str.php?L541'>STR #541</a>)
<li>The last line in an Fl_Help_View widget was not
aligned properly (<a href='http://www.fltk.org/str.php?L536'>STR #536</a>)
<li>The "search" symbol looked like a Q (<a href='http://www.fltk.org/str.php?L536'>STR #536</a>)
<li>Changed Fl_Help_View::get_color() to use a lookup
table to avoid serious Borland C++ 5.5 compiler bugs
(<a href='http://www.fltk.org/str.php?L533'>STR #533</a>)
<li>Fixed Watcom compiler warnings with FL/Fl_Widget.H
(<a href='http://www.fltk.org/str.php?L540'>STR #540</a>)
<li>The image class copy() methods did not always make a
separate copy of the image data (<a href='http://www.fltk.org/str.php?L539'>STR #539</a>)
<li>Fixed an edge case in fl_old_shortcut() that could
cause it to read beyond then end of the shortcut
string (used for XForms named shortcuts)
<li>Added (unsupported) CMake files (<a href='http://www.fltk.org/str.php?L499'>STR #499</a>)
<li>Tooltips would not reappear on the same widget, and
the initial tooltip delay was not used after a tooltip
was shown (<a href='http://www.fltk.org/str.php?L465'>STR #465</a>)
<li>Fixed a compile problem with the Linux 2.6 threading
support (<a href='http://www.fltk.org/str.php?L483'>STR #483</a>)
<li>Fixed problems with 2-byte Xpm files on 64-bit
platforms (<a href='http://www.fltk.org/str.php?L525'>STR #525</a>)
<li>FLTK didn't handle the ReparentNotify event on X11
(<a href='http://www.fltk.org/str.php?L524'>STR #524</a>)
<li>The old source file "fl_set_gray.cxx" is not needed
(<a href='http://www.fltk.org/str.php?L516'>STR #516</a>)
<li>Fl_Text_Display still called delete[] instead of
free() in one place (<a href='http://www.fltk.org/str.php?L503'>STR #503</a>)
<li>The symbol test program did not handle the @+ symbol
properly (<a href='http://www.fltk.org/str.php?L490'>STR #490</a>)
<li>Fl_File_Chooser didn't correctly call isprint() and
isspace() when checking to see if the current file was
text that can be previewed (<a href='http://www.fltk.org/str.php?L517'>STR #517</a>)
<li>FLUID didn't compile with Borland C++ due to a
compiler bug (<a href='http://www.fltk.org/str.php?L496'>STR #496</a>)
<li>Fl_Positioner did not handle reversed min and max
values (<a href='http://www.fltk.org/str.php?L510'>STR #510</a>)
<li>fl_descent(), fl_height(), and fl_width() would crash
a program if you didn't call fl_font() first; they now
return -1 if no font is set (<a href='http://www.fltk.org/str.php?L500'>STR #500</a>)
<li>Added test/unittests to verify pixel drawing and
alignment across platforms
<li>Fl_Menu_::find_item() didn't determine the menu path
properly (<a href='http://www.fltk.org/str.php?L481'>STR #481</a>)
<li>The build system now installs image library header
files in FL/images/filename.h so that FLTK programs
will use the same header files as the FLTK image
libraries.
<li>The build system now creates image libraries named
"libfltk_name.a" instead of "libname.a" to avoid
clobbering an existing installed library (<a href='http://www.fltk.org/str.php?L480'>STR #480</a>)
<br /><i>[1.1.5rc2]</i>
<li>Documentation updates (<a href='http://www.fltk.org/str.php?L365'>STR #365</a>, <a href='http://www.fltk.org/str.php?L399'>STR #399</a>, <a href='http://www.fltk.org/str.php?L407'>STR #407</a>,
<a href='http://www.fltk.org/str.php?L412'>STR #412</a>, <a href='http://www.fltk.org/str.php?L414'>STR #414</a>, <a href='http://www.fltk.org/str.php?L452'>STR #452</a>, <a href='http://www.fltk.org/str.php?L462'>STR #462</a>)
<li>Fl_Text_Display did not handle drawing of overlapping
......
CHANGES IN FLTK 1.1.5rc3
- Documentation updates (STR #505, STR #513)
- Updated PNG library source to 1.2.7.
- Updated ZLIB library source to 1.2.1.
- Fixed VC++ project file problems (STR #476, STR #478,
STR #520, STR #527, STR #537)
- Now look for 8 bits of alpha when the developer has
requested FL_RGB8 (STR #541)
- The last line in an Fl_Help_View widget was not
aligned properly (STR #536)
- The "search" symbol looked like a Q (STR #536)
- Changed Fl_Help_View::get_color() to use a lookup
table to avoid serious Borland C++ 5.5 compiler bugs
(STR #533)
- Fixed Watcom compiler warnings with FL/Fl_Widget.H
(STR #540)
- The image class copy() methods did not always make a
separate copy of the image data (STR #539)
- Fixed an edge case in fl_old_shortcut() that could
cause it to read beyond then end of the shortcut
string (used for XForms named shortcuts)
- Added (unsupported) CMake files (STR #499)
- Tooltips would not reappear on the same widget, and
the initial tooltip delay was not used after a tooltip
was shown (STR #465)
- Fixed a compile problem with the Linux 2.6 threading
support (STR #483)
- Fixed problems with 2-byte Xpm files on 64-bit
platforms (STR #525)
- FLTK didn't handle the ReparentNotify event on X11
(STR #524)
- The old source file "fl_set_gray.cxx" is not needed
(STR #516)
- Fl_Text_Display still called delete[] instead of
free() in one place (STR #503)
- The symbol test program did not handle the @+ symbol
properly (STR #490)
- Fl_File_Chooser didn't correctly call isprint() and
isspace() when checking to see if the current file was
text that can be previewed (STR #517)
- FLUID didn't compile with Borland C++ due to a
compiler bug (STR #496)
- Fl_Positioner did not handle reversed min and max
values (STR #510)
- fl_descent(), fl_height(), and fl_width() would crash
a program if you didn't call fl_font() first; they now
return -1 if no font is set (STR #500)
- Added test/unittests to verify pixel drawing and
alignment across platforms
- Fl_Menu_::find_item() didn't determine the menu path
properly (STR #481)
- The build system now installs image library header
files in FL/images/filename.h so that FLTK programs
will use the same header files as the FLTK image
libraries.
- The build system now creates image libraries named
"libfltk_name.a" instead of "libname.a" to avoid
clobbering an existing installed library (STR #480)
CHANGES IN FLTK 1.1.5rc2
- Documentation updates (STR #365, STR #399, STR #407,
......
#
# Check if the symbol exists in include files
#
# CHECK_FUNCTIONWITHHEADER_EXISTS - macro which checks the symbol exists in include files.
# SYMBOL - symbol
# FILES - include files to check
# VARIABLE - variable to return result
#
MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CHECK_SYMBOL_EXISTS_CONTENT "/* */\n")
SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_SYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
FOREACH(FILE ${FILES})
SET(CHECK_SYMBOL_EXISTS_CONTENT
"${CHECK_SYMBOL_EXISTS_CONTENT}#include <${FILE}>\n")
ENDFOREACH(FILE)
SET(CHECK_SYMBOL_EXISTS_CONTENT
"${CHECK_SYMBOL_EXISTS_CONTENT}\nint main()\n{\n${SYMBOL};return 0;\n}\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
"${CHECK_SYMBOL_EXISTS_CONTENT}")
MESSAGE(STATUS "Looking for ${SYMBOL}")
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
"${CHECK_SYMBOL_EXISTS_LIBS}"
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the ${SYMBOL} "
"exist passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c:\n"
"${CHECK_SYMBOL_EXISTS_CONTENT}\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the ${SYMBOL} "
"exist failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c:\n"
"${CHECK_SYMBOL_EXISTS_CONTENT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_FUNCTIONWITHHEADER_EXISTS)
#-----------------------------------------------------------------------------
#
# FLTKConfig.cmake - FLTK CMake configuration file for external projects.
#
# This file is configured by FLTK and used by the UseFLTK.cmake module
# to load FLTK's settings for an external project.
# The FLTK source tree.
SET(FLTK_SOURCE_DIR "@FLTK_SOURCE_DIR@")
# The FLTK include file directories.
SET(FLTK_EXECUTABLE_DIRS "@FLTK_EXECUTABLE_DIRS@")
SET(FLTK_LIBRARY_DIRS "@FLTK_LIBRARY_DIRS@")
SET(FLTK_LIBRARIES "fltk_images;fltk;fltk_gl;fltk_forms")
# The C and C++ flags added by FLTK to the cmake-configured flags.
SET(FLTK_REQUIRED_C_FLAGS "@FLTK_REQUIRED_C_FLAGS@")
SET(FLTK_REQUIRED_CXX_FLAGS "@FLTK_REQUIRED_CXX_FLAGS@")
# The FLTK version number
SET(FLTK_VERSION_MAJOR "@FLTK_VERSION_MAJOR@")
SET(FLTK_VERSION_MINOR "@FLTK_VERSION_MINOR@")
SET(FLTK_VERSION_PATCH "@FLTK_VERSION_PATCH@")
# The location of the UseFLTK.cmake file.
SET(FLTK_USE_FILE "@FLTK_USE_FILE@")
# The build settings file.
SET(FLTK_BUILD_SETTINGS_FILE "@FLTK_BUILD_SETTINGS_FILE@")
# Whether FLTK was built with shared libraries.
SET(FLTK_BUILD_SHARED "@BUILD_SHARED_LIBS@")
#ifdef HAVE_LIBZ
#include <zlib.h>
int main()
{
unsigned long compressedSize = 0;
unsigned char cd[100];
const unsigned char ud[100] = "";
unsigned long uncompressedSize = 0;
// Call zlib's compress function.
if(compress(cd, &compressedSize, ud, uncompressedSize) != Z_OK)
{
return 0;
}
return 1;
}
#endif
#ifdef HAVE_LIBJPEG
#include <stdio.h>
#include <jpeglib.h>
int main()
{
struct jpeg_decompress_struct cinfo;
jpeg_create_decompress(&cinfo);
jpeg_read_header(&cinfo, TRUE);
return 1;
}
#endif
#ifdef HAVE_LIBPNG
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_infop info_ptr = png_create_info_struct(png_ptr);
png_set_sig_bytes(png_ptr, 8);
png_read_info(png_ptr, info_ptr);
return 0;
}
#endif
#ifdef HAVE_PNG_H
#include <png.h>
int main() { retunr 0;}
#endif
#ifdef HAVE_PNG_GET_VALID
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_infop info_ptr = png_create_info_struct(png_ptr);
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS);
return 0;
}
#endif
#ifdef HAVE_PNG_SET_TRNS_TO_ALPHA
#include <png.h>
int main()
{
png_structp png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
NULL, NULL);
png_set_tRNS_to_alpha(png_ptr);
return 0;
}
#endif
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
# Written by Andy Cedilnik and Julien Jomier
PROJECT(FLTK)
SET(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin CACHE INTERNAL
"Where to put the executables for FLTK"
)
SET(LIBRARY_OUTPUT_PATH "${FLTK_BINARY_DIR}/lib" CACHE INTERNAL
"Where to put the libraries for FLTK"
)
#-----------------------------------------------------------------------------
# Test for some required system information.
INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake)
SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL "Use the pthreads library.")
SET(FLTK_DATADIR "${CMAKE_INSTALL_PREFIX}/share/FLTK")
SET(FLTK_DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/FLTK")
CONFIGURE_FILE(${FLTK_SOURCE_DIR}/configh.cmake.in
${FLTK_BINARY_DIR}/config.h)
IF(WIN32)
IF(NOT CYGWIN)
IF(BORLAND)
SET( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
ELSE(BORLAND)
SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
ENDIF(BORLAND)
ENDIF(NOT CYGWIN)
ENDIF(WIN32)
IF(UNIX)
INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
ENDIF(UNIX)
IF(APPLE)
SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE)
IF(CYGWIN)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
ENDIF(CYGWIN)
INCLUDE_DIRECTORIES(
${FLTK_BINARY_DIR}
${FLTK_SOURCE_DIR}
)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
# Check if header file exists and add it to the list.
MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
CHECK_INCLUDE_FILES("${PROJECT_INCLUDES};${FILE}" ${VARIABLE})
IF(${VARIABLE})
SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${FILE})
ENDIF(${VARIABLE})
ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
CHECK_INCLUDE_FILE_CONCAT("GL/glu.h" HAVE_GL_GLU_H)
CHECK_INCLUDE_FILE_CONCAT("dirent.h" HAVE_DIRENT_H)
CHECK_INCLUDE_FILE_CONCAT("stdio.h" HAVE_STDIO_H)
CHECK_INCLUDE_FILE_CONCAT("strings.h" HAVE_STRINGS_H)
CHECK_INCLUDE_FILE_CONCAT("sys/dir.h" HAVE_SYS_DIR_H)
CHECK_INCLUDE_FILE_CONCAT("sys/ndir.h" HAVE_SYS_NDIR_H)
CHECK_INCLUDE_FILE_CONCAT("sys/select.h" HAVE_SYS_SELECT_H)
CHECK_INCLUDE_FILE_CONCAT("sys/stdtypes.h" HAVE_SYS_STDTYPES_H)
CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
INCLUDE(${CMAKE_ROOT}/Modules/FindZLIB.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindPNG.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindJPEG.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
INCLUDE(${FLTK_SOURCE_DIR}/CMake/CheckFunctionWithHeaderExists.cmake)
CHECK_FUNCTIONWITHHEADER_EXISTS("int strcasecmp()" "${PROJECT_INCLUDES}" HAVE_STRCASECMP)
CHECK_SYMBOL_EXISTS(strlcat "${PROJECT_INCLUDES}" HAVE_STRLCAT)
CHECK_SYMBOL_EXISTS(strlcpy "${PROJECT_INCLUDES}" HAVE_STRLCPY)
CHECK_SYMBOL_EXISTS(vsnprintf "${PROJECT_INCLUDES}" HAVE_VSNPRINTF)
CHECK_SYMBOL_EXISTS(snprintf "${PROJECT_INCLUDES}" HAVE_SNPRINTF)
CHECK_SYMBOL_EXISTS(scandir "${PROJECT_INCLUDES}" HAVE_SCANDIR)
INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
CHECK_TYPE_SIZE(int SIZEOF_INT)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
IF(${SIZEOF_SHORT} MATCHES "^2$")
SET(U16 "unsigned short")
ENDIF(${SIZEOF_SHORT} MATCHES "^2$")
IF(${SIZEOF_INT} MATCHES "^4$")
SET(U32 "unsigned")
ELSE(${SIZEOF_INT} MATCHES "^4$")
IF(${SIZEOF_LONG} MATCHES "^4$")
SET(U32 "unsigned long")
ENDIF(${SIZEOF_LONG} MATCHES "^4$")
ENDIF(${SIZEOF_INT} MATCHES "^4$")
IF(${SIZEOF_INT} MATCHES "^8$")
SET(U64 "unsigned")
ELSE(${SIZEOF_INT} MATCHES "^8$")
IF(${SIZEOF_LONG} MATCHES "^8$")
SET(U64 "unsigned long")
ENDIF(${SIZEOF_LONG} MATCHES "^8$")
ENDIF(${SIZEOF_INT} MATCHES "^8$")
SET(HAVE_GL 0)
# Set an option to build FLTK with OpenGL support
OPTION(USE_OPENGL "OpenGL Support" ON)
IF(USE_OPENGL)
INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
IF(OPENGL_FOUND)
SET(HAVE_GL 1)
ENDIF(OPENGL_FOUND)
ENDIF(USE_OPENGL)
#
# Perform the FLTK specific test with status output
#
MACRO(PERFORM_CMAKE_TEST FILE TEST)
IF("${TEST}" MATCHES "^${TEST}$")
# Perform test
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${TEST} ${CMAKE_REQUIRED_FLAGS}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(TEST_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
MESSAGE(STATUS "Performing Test ${TEST}")
TRY_COMPILE(${TEST}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-DLINK_LIBRARIES:STRING=${CMAKE_TEST_SPECIAL_LIBRARIES}
"${TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(${TEST})
SET(${TEST} 1 CACHE INTERNAL "CMake test ${FUNCTION}")
MESSAGE(STATUS "Performing Test ${TEST} - Success")
ELSE(${TEST})
MESSAGE(STATUS "Performing Test ${TEST} - Failed")
SET(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION}")
WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
"Performing Test ${TEST} failed with the following output:\n"
"${OUTPUT}\n" APPEND)
ENDIF(${TEST})
ELSE("${TEST}" MATCHES "^${TEST}$")
# Have result
#FOREACH(tst ${TEST})
# MESSAGE("Test ${TEST} resulted in ${${tst}}")
#ENDFOREACH(tst ${TEST})
ENDIF("${TEST}" MATCHES "^${TEST}$")
ENDMACRO(PERFORM_CMAKE_TEST FILE TEST)
# Set an option to build the zlib library or not
OPTION(FLTK_USE_SYSTEM_ZLIB "Use's system zlib" ON)
IF(FLTK_USE_SYSTEM_ZLIB)
IF(ZLIB_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${ZLIB_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBZ)
ENDIF(ZLIB_FOUND)
# We build the fltk zlib
ELSE(FLTK_USE_SYSTEM_ZLIB)
MARK_AS_ADVANCED(ZLIB_INCLUDE_DIR)
MARK_AS_ADVANCED(ZLIB_LIBRARY)
SUBDIRS(zlib)
ENDIF(FLTK_USE_SYSTEM_ZLIB)
# Set an option to build the jpeg library or not
OPTION(FLTK_USE_SYSTEM_JPEG "Use's system jpeg" ON)
IF(FLTK_USE_SYSTEM_JPEG)
IF(JPEG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${JPEG_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBJPEG)
ENDIF(JPEG_FOUND)
# We build the fltk png
ELSE(FLTK_USE_SYSTEM_JPEG)
MARK_AS_ADVANCED(JPEG_INCLUDE_DIR)
MARK_AS_ADVANCED(JPEG_LIBRARY)
SUBDIRS(jpeg)
ENDIF(FLTK_USE_SYSTEM_JPEG)
# Set an option to build the png library or not
OPTION(FLTK_USE_SYSTEM_PNG "Use's system png" ON)
IF(FLTK_USE_SYSTEM_PNG)
IF(PNG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${PNG_LIBRARIES})
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_LIBPNG)
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_PNG_GET_VALID)
PERFORM_CMAKE_TEST(CMake/PlatformTests.cxx HAVE_PNG_SET_TRNS_TO_ALPHA)
SET(HAVE_PNG_H 1)
ENDIF(PNG_FOUND)
# We build the fltk png
ELSE(FLTK_USE_SYSTEM_PNG)
MARK_AS_ADVANCED(PNG_INCLUDE_DIR)
MARK_AS_ADVANCED(PNG_LIBRARY)
SUBDIRS(png)
ENDIF(FLTK_USE_SYSTEM_PNG)
SUBDIRS(src)
SUBDIRS(fluid)
# Set the fluid executable path
SET(FLUID_COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/fluid)
# Set an option to build the tests
OPTION(BUILD_TESTS "Build the tests" ON)
IF(BUILD_TESTS)
SUBDIRS(test)
ENDIF(BUILD_TESTS )
#Genereate the configuration file
SET(FLTK_EXECUTABLE_DIRS ${EXECUTABLE_OUTPUT_PATH})
SET(FLTK_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH})
CONFIGURE_FILE(${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in
${FLTK_BINARY_DIR}/FLTKConfig.cmake)
//
// "$Id: Fl_Tooltip.H,v 1.16.2.12 2004/04/11 04:38:54 easysw Exp $"
// "$Id: Fl_Tooltip.H,v 1.16.2.13 2004/09/12 20:26:23 easysw Exp $"
//
// Tooltip header file for the Fast Light Tool Kit (FLTK).
//
......@@ -52,6 +52,11 @@ public:
static Fl_Color color() { return (Fl_Color)color_; }
static void textcolor(unsigned c) { textcolor_ = c; }
static Fl_Color textcolor() { return (Fl_Color)textcolor_; }
// These should not be public, but Fl_Widget::tooltip() needs them...
static void enter_(Fl_Widget* w);
static void exit_(Fl_Widget *w);
private:
static float delay_;
static float hoverdelay_;
......@@ -66,5 +71,5 @@ private:
#endif
//
// End of "$Id: Fl_Tooltip.H,v 1.16.2.12 2004/04/11 04:38:54 easysw Exp $".
// End of "$Id: Fl_Tooltip.H,v 1.16.2.13 2004/09/12 20:26:23 easysw Exp $".
//
//
// "$Id: Fl_Widget.H,v 1.6.2.4.2.24 2004/07/27 16:02:18 easysw Exp $"
// "$Id: Fl_Widget.H,v 1.6.2.4.2.25 2004/09/24 16:00:08 easysw Exp $"
//
// Widget header file for the Fast Light Tool Kit (FLTK).
//
......@@ -81,10 +81,10 @@ protected:
Fl_Widget(int,int,int,int,const char* =0);
void x(int v) {x_ = v;}
void y(int v) {y_ = v;}
void w(int v) {w_ = v;}
void h(int v) {h_ = v;}
void x(int v) {x_ = (short)v;}
void y(int v) {y_ = (short)v;}
void w(int v) {w_ = (short)v;}
void h(int v) {h_ = (short)v;}
int flags() const {return flags_;}
void set_flag(int c) {flags_ |= c;}
......@@ -217,5 +217,5 @@ public:
#endif
//