moved ZynAddSubFX plugin from LMMS-extras to mainline

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@2078 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2009-02-24 00:23:30 +00:00
parent ba54477d86
commit 9bf5213d81
491 changed files with 140425 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
INCLUDE(BuildPlugin)
BUILD_PLUGIN(zynaddsubfx zynaddsubfx.cpp zynaddsubfx.h MOCFILES zynaddsubfx.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
SET(ZYN_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/DSP/AnalogFilter.C
${CMAKE_CURRENT_SOURCE_DIR}/src/DSP/Filter.C
${CMAKE_CURRENT_SOURCE_DIR}/src/DSP/SVFilter.C
${CMAKE_CURRENT_SOURCE_DIR}/src/DSP/FFTwrapper.C
${CMAKE_CURRENT_SOURCE_DIR}/src/DSP/FormantFilter.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Input/NULLMidiIn.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Input/MidiIn.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Output/Recorder.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Output/WAVaudiooutput.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/EffectMgr.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Effect.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Phaser.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Echo.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/EffectLFO.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Chorus.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/DynamicFilter.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Reverb.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/EQ.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Distorsion.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Effects/Alienwah.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/LFOParams.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/EnvelopeParams.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/SUBnoteParameters.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/ADnoteParameters.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/Presets.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/FilterParams.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/PADnoteParameters.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/Controller.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Params/PresetsStore.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Seq/MIDIFile.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Seq/MIDIEvents.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Seq/Sequencer.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/PADnote.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/SUBnote.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/LFO.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/Resonance.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/ADnote.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/Envelope.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Synth/OscilGen.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Dump.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Bank.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Config.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/XMLwrapper.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Util.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Master.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Microtonal.C
${CMAKE_CURRENT_SOURCE_DIR}/src/Misc/Part.C
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/MasterUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/VirKeyboard.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/ConfigUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/OscilGenUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/WidgetPDial.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/ResonanceUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/MicrotonalUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/ADnoteUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/PresetsUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/EffUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/FilterUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/PartUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/EnvelopeUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/LFOUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/SeqUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/PADnoteUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/SUBnoteUI.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/BankUI.cc
)
SET(MXML_SRC
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-attr.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-entity.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-file.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-index.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-node.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-private.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-search.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-set.c
${CMAKE_CURRENT_SOURCE_DIR}/mxml/mxml-string.c
)
# definitions for ZynAddSubFX
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
ADD_DEFINITIONS(-DOS_LINUX)
ELSE(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
ADD_DEFINITIONS(-DOS_WINDOWS)
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
# use asm optimizations when on x86 or x86_64
IF(LMMS_HOST_X86 OR LMMS_HOST_X86_64)
ADD_DEFINITIONS(-DASM_F2I_YES)
ENDIF(LMMS_HOST_X86 OR LMMS_HOST_X86_64)
# build ZynAddSubFX with full optimizations
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wno-write-strings -Wno-deprecated-declarations")
# link default libraries
LINK_LIBRARIES(${FFTW3F_LIBRARIES} -lz -lpthread ${CMAKE_CURRENT_BINARY_DIR}/fltk/bin/libfltk.a)
# FLTK needs X
IF(LMMS_BUILD_LINUX)
LINK_LIBRARIES(-lX11)
ENDIF(LMMS_BUILD_LINUX)
# link system-libraries when on win32
IF(LMMS_BUILD_WIN32)
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
LINK_LIBRARIES(${QT_LIBRARIES} -lole32 -luuid -lcomctl32 -lgdi32)
ENDIF(LMMS_BUILD_WIN32)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/fltk/ ${CMAKE_CURRENT_SOURCE_DIR})
ADD_EXECUTABLE(remote_zynaddsubfx remote_zynaddsubfx.cpp ${ZYN_SRC} ${MXML_SRC})
INSTALL(TARGETS remote_zynaddsubfx RUNTIME DESTINATION ${PLUGIN_DIR})
IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET remote_zynaddsubfx POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/remote_zynaddsubfx.exe)
ENDIF(LMMS_BUILD_WIN32)
# build FLTK
IF(LMMS_BUILD_WIN64)
SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win64Toolchain.cmake")
ELSEIF(LMMS_BUILD_WIN32)
SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win32Toolchain.cmake")
ENDIF(LMMS_BUILD_WIN64)
ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DUSE_OPENGL:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE=release && ${CMAKE_BUILD_TOOL})
ADD_DEPENDENCIES(remote_zynaddsubfx libfltk)

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,54 @@
#
# 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)

View File

@@ -0,0 +1,37 @@
#-----------------------------------------------------------------------------
#
# 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(FLUID_COMMAND "@FLTK_FLUID_COMMAND@")
SET(FLTK_EXECUTABLE_DIRS "@FLTK_EXECUTABLE_DIRS@")
SET(FLTK_LIBRARY_DIRS "@FLTK_LIBRARY_DIRS@")
SET(FLTK_LIBRARIES "@FLTK_LIBRARIES@")
SET(FLTK_INCLUDE_DIRS "@FLTK_INCLUDE_DIRS@")
# 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@")
# Is FLTK using shared libraries?
SET(FLTK_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
SET(FLTK_BUILD_SETTINGS_FILE "@FLTK_BUILD_SETTINGS_FILE@")
# The location of the UseFLTK.cmake file.
SET(FLTK11_USE_FILE "@FLTK_USE_FILE@")
# The ExodusII library dependencies.
IF(NOT FLTK_NO_LIBRARY_DEPENDS)
INCLUDE("@FLTK_LIBRARY_DEPENDS_FILE@")
ENDIF(NOT FLTK_NO_LIBRARY_DEPENDS)

View File

@@ -0,0 +1,68 @@
IF(NOT FLTK11_FOUND)
MESSAGE(FATAL_ERROR "Something went wrong. You are including FLTKUse.cmake but FLTK was not found")
ENDIF(NOT FLTK11_FOUND)
# -------------------------------------------------------------
# This macro automates wrapping of Fluid files
# Specify the output variable name and the list of sources
# The output variable can be directly added to the target.
#
# For example:
# FLTK_WRAP_FLUID(CubeView_SRCS CubeViewUI.fl)
# ADD_EXECUTABLE(CubeView CubeMain.cxx CubeView.cxx CubeView.h ${CubeView_SRCS})
# -------------------------------------------------------------
MACRO(FLTK_WRAP_FLUID VARIABLE)
FOREACH(src ${ARGN})
IF("${src}" MATCHES ".fl$")
GET_FILENAME_COMPONENT(fname ${src} NAME_WE)
GET_FILENAME_COMPONENT(fpath ${src} PATH)
GET_SOURCE_FILE_PROPERTY(gen ${src} GENERATED)
IF(gen)
SET(fluid_name "${src}")
ELSE(gen)
SET(fluid_name "${CMAKE_CURRENT_SOURCE_DIR}/${fpath}/${fname}.fl")
IF(NOT EXISTS "${fluid_name}")
SET(fluid_name "${CMAKE_CURRENT_BINARY_DIR}/${fpath}/${fname}.fl")
IF(NOT EXISTS "${fluid_name}")
SET(fluid_name "${fpath}/${fname}.fl")
IF(NOT EXISTS "${fluid_name}")
MESSAGE(SEND_ERROR "Cannot find Fluid source file: ${fpath}/${fname}.fl")
ENDIF(NOT EXISTS "${fluid_name}")
ENDIF(NOT EXISTS "${fluid_name}")
ENDIF(NOT EXISTS "${fluid_name}")
ENDIF(gen)
SET(cxx_name "${CMAKE_CURRENT_BINARY_DIR}/${fname}.cxx")
SET(h_name "${CMAKE_CURRENT_BINARY_DIR}/${fname}.h")
SET(${VARIABLE} "${${VARIABLE}};${cxx_name}")
ADD_CUSTOM_COMMAND(
OUTPUT ${cxx_name}
DEPENDS "${fluid_name}" "${FLUID_COMMAND}"
COMMAND ${FLUID_COMMAND}
ARGS -c ${fluid_name})
ADD_CUSTOM_COMMAND(
OUTPUT ${h_name}
DEPENDS "${fluid_name}" "${FLUID_COMMAND}"
COMMAND ${FLUID_COMMAND}
ARGS -c ${fluid_name})
ENDIF("${src}" MATCHES ".fl$")
ENDFOREACH(src)
ENDMACRO(FLTK_WRAP_FLUID VARIABLE)
# Make FLTK easier to use
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIRS})
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
# Load the compiler settings used for FLTK.
IF(FLTK_BUILD_SETTINGS_FILE)
INCLUDE(CMakeImportBuildSettings)
CMAKE_IMPORT_BUILD_SETTINGS(${FLTK_BUILD_SETTINGS_FILE})
ENDIF(FLTK_BUILD_SETTINGS_FILE)
# Add compiler flags needed to use FLTK.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLTK_REQUIRED_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLTK_REQUIRED_CXX_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLTK_REQUIRED_EXE_LINKER_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLTK_REQUIRED_SHARED_LINKER_FLAGS}")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FLTK_REQUIRED_MODULE_LINKER_FLAGS}")

View File

@@ -0,0 +1,81 @@
#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

View File

@@ -0,0 +1,413 @@
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
# Written by Andy Cedilnik and Julien Jomier
PROJECT(FLTK)
CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
# The FLTK version
SET(FLTK_VERSION_MAJOR "1")
SET(FLTK_VERSION_MINOR "1")
SET(FLTK_VERSION_PATCH "9")
SET(FLTK_VERSION "${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}")
SET(FLTK_VERSION_FULL "${FLTK_VERSION}.${FLTK_VERSION_PATCH}")
SET(FLTK_LIBRARIES "fltk_images;fltk;fltk_gl;fltk_forms")
# Executables and libraries should just go to bin
SET(EXECUTABLE_OUTPUT_PATH "${FLTK_BINARY_DIR}/bin" CACHE INTERNAL
"Where to put the executables for FLTK"
)
SET(LIBRARY_OUTPUT_PATH "${FLTK_BINARY_DIR}/bin" CACHE INTERNAL
"Where to put the libraries for FLTK"
)
# Allow building shared libraries
OPTION(BUILD_SHARED_LIBS "Build FLTK as a shared library" OFF)
# Search for modules in the FLTK source dir first
SET(CMAKE_MODULE_PATH "${FLTK_SOURCE_DIR}/CMake")
#-----------------------------------------------------------------------------
# Test for some required system information.
FIND_PACKAGE(Threads)
SET (CMAKE_USE_PTHREADS
"${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL "Use the pthreads library.")
# We need ansi c-flags, especially on HP
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
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)
ELSE(WIN32)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF(WIN32)
SET(FLTK_X11 1)
SET(FLTK_APPLE 0)
IF(APPLE)
OPTION(FLTK_APPLE_X11 "Use X11 on Mac instead of Carbon" OFF)
MARK_AS_ADVANCED(FLTK_APPLE_X11)
IF(NOT FLTK_APPLE_X11)
SET(FLTK_APPLE 1)
SET(FLTK_X11 0)
OPTION(FLTK_QUARTZ "Use Quartz instead of Quickdraw" OFF)
ENDIF(NOT FLTK_APPLE_X11)
ENDIF(APPLE)
IF(UNIX)
FIND_PACKAGE(X11)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
ENDIF(UNIX)
IF(APPLE AND NOT FLTK_APPLE_X11)
SET( FLTK_PLATFORM_DEPENDENT_LIBS
"-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE AND NOT FLTK_APPLE_X11)
IF(CYGWIN)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
ENDIF(CYGWIN)
IF(MINGW)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid wsock32 gdi32 comdlg32)
ENDIF(MINGW)
INCLUDE(CheckIncludeFiles)
# 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("OpenGL/glu.h" HAVE_OPENGL_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)
FIND_PACKAGE(ZLIB)
FIND_PACKAGE(PNG)
FIND_PACKAGE(JPEG)
INCLUDE(CheckSymbolExists)
INCLUDE(CheckFunctionWithHeaderExists)
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(CheckTypeSize)
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 an option to build FLTK with OpenGL support
SET(HAVE_GL 0)
OPTION(USE_OPENGL "OpenGL Support" ON)
IF(USE_OPENGL)
FIND_PACKAGE(OpenGL)
IF(OPENGL_FOUND)
SET(HAVE_GL 1)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
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})
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" OFF)
IF(FLTK_USE_SYSTEM_ZLIB)
IF(ZLIB_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${ZLIB_LIBRARIES})
SET(FLTK_ZLIB_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)
SET(HAVE_LIBZ 1)
SET(FLTK_ZLIB_LIBRARIES fltk_zlib)
SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_zlib")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/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" OFF)
IF(FLTK_USE_SYSTEM_JPEG)
IF(JPEG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${JPEG_LIBRARIES})
SET(FLTK_JPEG_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)
SET(HAVE_LIBJPEG 1)
SET(FLTK_JPEG_LIBRARIES fltk_jpeg)
SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_jpeg")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/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" OFF)
IF(FLTK_USE_SYSTEM_PNG)
IF(PNG_FOUND)
SET(CMAKE_TEST_SPECIAL_LIBRARIES ${PNG_LIBRARIES})
SET(FLTK_PNG_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)
SET(HAVE_LIBPNG 1)
SET(HAVE_PNG_H 1)
SET(FLTK_PNG_LIBRARIES fltk_png)
SET(FLTK_LIBRARIES "${FLTK_LIBRARIES};fltk_png")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/png")
ENDIF(FLTK_USE_SYSTEM_PNG)
SET(FLTK_DATADIR "${CMAKE_INSTALL_PREFIX}/share/FLTK")
SET(FLTK_DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/FLTK")
# Write out configuration header file
CONFIGURE_FILE(${FLTK_SOURCE_DIR}/configh.cmake.in
${FLTK_BINARY_DIR}/config.h)
# On unix create symlinks for backward compatibility
SET(FLTK_CREATE_SYMLINKS 1)
IF(WIN32)
IF(NOT UNIX)
SET(FLTK_CREATE_SYMLINKS 0)
ENDIF(NOT UNIX)
ENDIF(WIN32)
MACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION)
IF(EXISTS "${DESTINATION}")
ELSE(EXISTS "${DESTINATION}")
MESSAGE(STATUS "Create symlink from: \"${SOURCE}\" to \"${DESTINATION}\"")
# The quoting here does seems unnatural, but this is to prevent bug in CMake
EXEC_PROGRAM(ln ARGS
"-s \"${SOURCE}\" \"${DESTINATION}\"" OUTPUT_VARIABLE ln_output
RETURN_VALUE ln_retval)
IF("${ln_retval}" GREATER 0)
MESSAGE(FATAL_ERROR "Problem creatin symlink from \"${SOURCE}\" to \"${DESTINATION}\":\n${ln_output}")
ENDIF("${ln_retval}" GREATER 0)
ENDIF(EXISTS "${DESTINATION}")
ENDMACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION)
# If this is out-of-source build, then copy FL directory
FILE(GLOB FLTK_HEADER_FILES "${FLTK_SOURCE_DIR}/FL/*.[hHr]")
FOREACH(file ${FLTK_HEADER_FILES})
GET_FILENAME_COMPONENT(ext "${file}" EXT)
GET_FILENAME_COMPONENT(namewe "${file}" NAME_WE)
GET_FILENAME_COMPONENT(name "${file}" NAME)
STRING(COMPARE EQUAL "${ext}" ".h" lower_case_h)
STRING(COMPARE EQUAL "${ext}" ".H" upper_case_h)
IF(lower_case_h OR upper_case_h)
SET(outfile_h "${FLTK_BINARY_DIR}/FL/${namewe}.h")
SET(outfile_H "${FLTK_BINARY_DIR}/FL/${namewe}.H")
CONFIGURE_FILE("${file}" "${outfile_H}" COPYONLY IMMEDIATE)
CONFIGURE_FILE("${file}" "${outfile_h}" COPYONLY IMMEDIATE)
# IF(FLTK_CREATE_SYMLINKS)
# SAFE_CREATE_SYMLINK("${outfile_H}" "${outfile_h}")
# ENDIF(FLTK_CREATE_SYMLINKS)
ELSE(lower_case_h OR upper_case_h)
STRING(COMPARE EQUAL "${ext}" ".r" mac_resource_file)
IF(mac_resource_file)
SET(outfile "${FLTK_BINARY_DIR}/FL/${name}")
CONFIGURE_FILE("${file}" "${outfile}" COPYONLY IMMEDIATE)
ENDIF(mac_resource_file)
ENDIF(lower_case_h OR upper_case_h)
ENDFOREACH(file)
IF(FLTK_CREATE_SYMLINKS)
SAFE_CREATE_SYMLINK(
"${FLTK_BINARY_DIR}/FL"
"${FLTK_BINARY_DIR}/Fl")
# SAFE_CREATE_SYMLINK(
# "${FLTK_BINARY_DIR}/FL/gl.H"
# "${FLTK_BINARY_DIR}/FL/gl.h")
# Create the symlinks
FILE(READ ${FLTK_SOURCE_DIR}/fltk.list.in SYMLINKSFILE)
STRING(REGEX MATCHALL "(l 0000 root sys .includedir/)([^(\n)])+"
SYMLINKS ${SYMLINKSFILE})
FOREACH(var ${SYMLINKS} )
IF("${var}" MATCHES ".H")
STRING(REGEX MATCH "(/F)([^(\n)])+" tmp ${var})
STRING(REGEX MATCH "(/F)([^( )])+" in ${tmp})
STRING(REGEX MATCH "( )([^(\n)])+" out ${tmp})
STRING(REGEX REPLACE "( )" "" out ${out})
SAFE_CREATE_SYMLINK("${FLTK_BINARY_DIR}/FL/${out}" "${FLTK_BINARY_DIR}/${in}")
ENDIF("${var}" MATCHES ".H")
ENDFOREACH(var)
ENDIF(FLTK_CREATE_SYMLINKS)
# Set the fluid executable path
#UTILITY_SOURCE(FLUID_COMMAND fluid fluid fluid.cxx)
#SET(FLUID_COMMAND "${FLUID_COMMAND}" CACHE INTERNAL "" FORCE)
# Include header files in fltk binary tree
INCLUDE_DIRECTORIES(${FLTK_BINARY_DIR})
# Do the build of fltk libraries and fluid
SUBDIRS(src)
#SUBDIRS(fluid)
# Set an option to build the examples and testing
OPTION(BUILD_EXAMPLES "Build the tests" ON)
IF(BUILD_EXAMPLES)
# SUBDIRS(test)
ENDIF(BUILD_EXAMPLES)
OPTION(BUILD_TESTING "Build testing of FLTK" ON)
IF(BUILD_TESTING)
ENABLE_TESTING()
INCLUDE(Dart)
ENDIF(BUILD_TESTING)
#-----------------------------------------------------------------------------
# Help outside projects build FLTK projects.
INCLUDE(CMakeExportBuildSettings)
EXPORT_LIBRARY_DEPENDENCIES(${FLTK_BINARY_DIR}/FLTKLibraryDepends.cmake)
CMAKE_EXPORT_BUILD_SETTINGS(${FLTK_BINARY_DIR}/FLTKBuildSettings.cmake)
SET(FL_MAJOR_VERSION "${FLTK_VERSION_MAJOR}")
SET(FL_MINOR_VERSION "${FLTK_VERSION_MINOR}")
SET(FL_PATCH_VERSION "${FLTK_VERSION_PATCH}")
SET(CFLAGS "${CMAKE_C_FLAGS}")
SET(CXXFLAGS "${CMAKE_CXX_FLAGS}")
SET(CC "${CMAKE_C_COMPILER}")
SET(CXX "${CMAKE_CXX_COMPILER}")
# For build tree usage
SET(FLTK_FLUID_COMMAND "${FLUID_COMMAND}")
SET(FLTK_LIBRARY_DEPENDS_FILE ${FLTK_BINARY_DIR}/FLTKLibraryDepends.cmake)
SET(FLTK_EXECUTABLE_DIRS ${EXECUTABLE_OUTPUT_PATH})
SET(FLTK_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH})
SET(FLTK_USE_FILE ${FLTK_SOURCE_DIR}/CMake/FLTKUse.cmake)
SET(FLTK_INCLUDE_DIRS "${FLTK_BINARY_DIR}/")
SET(FLTK_BUILD_SETTINGS_FILE ${FLTK_BINARY_DIR}/FLTKBuildSettings.cmake)
SET(prefix "${FLTK_BINARY_DIR}")
SET(exec_prefix "${prefix}")
SET(exec_prefix_set "no")
SET(bindir "${prefix}/bin")
SET(includedir "${prefix}")
SET(libdir "${prefix}/bin")
SET(srcdir "${FLTK_SOURCE_DIR}")
CONFIGURE_FILE("${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in"
"${FLTK_BINARY_DIR}/FLTKConfig.cmake" @ONLY IMMEDIATE)
CONFIGURE_FILE("${FLTK_SOURCE_DIR}/fltk-config.in"
"${FLTK_BINARY_DIR}/fltk-config" @ONLY IMMEDIATE)
# For installed tree usage
SET(FLTK_FLUID_COMMAND "${CMAKE_INSTALL_PREFIX}/bin/fluid")
SET(FLTK_LIBRARY_DEPENDS_FILE ${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}/FLTKLibraryDepends.cmake)
SET(FLTK_EXECUTABLE_DIRS "${CMAKE_INSTALL_PREFIX}/bin")
SET(FLTK_LIBRARY_DIRS "${CMAKE_INSTALL_PREFIX}/lib")
SET(FLTK_USE_FILE "${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}/FLTKUse.cmake")
SET(FLTK_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/")
SET(FLTK_BUILD_SETTINGS_FILE ${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}/FLTKBuildSettings.cmake)
SET(prefix "${CMAKE_INSTALL_PREFIX}")
SET(exec_prefix "${prefix}")
SET(exec_prefix_set "no")
SET(bindir "${prefix}/bin")
SET(includedir "${prefix}")
SET(libdir "${prefix}/lib")
SET(srcdir ".")
CONFIGURE_FILE("${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in"
"${FLTK_BINARY_DIR}/CMake/FLTKConfig.cmake" @ONLY IMMEDIATE)
CONFIGURE_FILE("${FLTK_SOURCE_DIR}/fltk-config.in"
"${FLTK_BINARY_DIR}/CMake/fltk-config" @ONLY IMMEDIATE)
INSTALL_FILES(/include/FL FILES ${FLTK_HEADER_FILES})
INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_SOURCE_DIR}/CMake/FLTKUse.cmake")
INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_BINARY_DIR}/FLTKBuildSettings.cmake")
INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_BINARY_DIR}/FLTKLibraryDepends.cmake")
INSTALL_FILES(/lib/FLTK-${FLTK_VERSION} FILES "${FLTK_BINARY_DIR}/CMake/FLTKConfig.cmake")

View File

@@ -0,0 +1,528 @@
FLTK License
December 11, 2001
The FLTK library and included programs are provided under the terms
of the GNU Library General Public License (LGPL) with the following
exceptions:
1. Modifications to the FLTK configure script, config
header file, and makefiles by themselves to support
a specific platform do not constitute a modified or
derivative work.
The authors do request that such modifications be
contributed to the FLTK project - send all
contributions to "fltk-bugs@fltk.org".
2. Widgets that are subclassed from FLTK widgets do not
constitute a derivative work.
3. Static linking of applications and widgets to the
FLTK library does not constitute a derivative work
and does not require the author to provide source
code for the application or widget, use the shared
FLTK libraries, or link their applications or
widgets against a user-supplied version of FLTK.
If you link the application or widget to a modified
version of FLTK, then the changes to FLTK must be
provided under the terms of the LGPL in sections
1, 2, and 4.
4. You do not have to provide a copy of the FLTK license
with programs that are linked to the FLTK library, nor
do you have to identify the FLTK license in your
program or documentation as required by section 6
of the LGPL.
However, programs must still identify their use of FLTK.
The following example statement can be included in user
documentation to satisfy this requirement:
[program/widget] is based in part on the work of
the FLTK project (http://www.fltk.org).
-----------------------------------------------------------------------
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -0,0 +1,54 @@
CREDITS - Fast Light Tool Kit (FLTK) Version 1.1.5
--------------------------------------------------
This file lists the people responsible for the toolkit you
are now using. If you've looking for your name in lights
but we've forgotten you here, please send an email to
"fltk-bugs@fltk.org" and we'll update this file accordingly.
CORE DEVELOPERS
The following people do the day-to-day development of FLTK:
Craig P. Earls
Curtis Edwards (trilec@users.sourceforge.net)
Gustavo Hime (hime@users.sourceforge.net)
Talbot Hughes
Robert Kesterson (robertk@users.sourceforge.net)
Matthias Melcher (matthias@users.sourceforge.net)
James Dean Palmer (jamespalmer@users.sourceforge.net)
Vincent Penne (vincentp@users.sourceforge.net)
Bill Spitzak (spitzak@users.sourceforge.net)
Michael Sweet (easysw@users.sourceforge.net)
Carl Thompson (clip@users.sourceforge.net)
Nafees Bin Zafar (nafees@users.sourceforge.net)
OTHER CONTRIBUTORS
The following people have contributed fixes or enhancements
for FLTK:
Teun Burgers
Paul Chambers
Fabien Costantini
Stephen Davies
Yuri D'Elia
Greg Ercolano
Yuri Fedorchenko
George Garvey
Mikael Hultgren
Stuart Levy
Howard Lightstone
Mike Lindner
Alexander Mai
Alexander Rabi
James Roth
Albrecht Schlosser
Andrea Suatoni
Paul Sydney
Aaron Ucko
Emanuele Vicentini
Jim Wilson
Ken Yarnall

View File

@@ -0,0 +1,456 @@
//
// "$Id: Enumerations.H 6096 2008-04-12 04:18:58Z mike $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Enumerations_H
#define Fl_Enumerations_H
# include "Fl_Export.H"
//
// The FLTK version number; this is changed slightly from the beta versions
// because the old "const double" definition would not allow for conditional
// compilation...
//
// FL_VERSION is a double that describes the major and minor version numbers.
// Version 1.1 is actually stored as 1.01 to allow for more than 9 minor
// releases.
//
// The FL_MAJOR_VERSION, FL_MINOR_VERSION, and FL_PATCH_VERSION constants
// give the integral values for the major, minor, and patch releases
// respectively.
//
#define FL_MAJOR_VERSION 1
#define FL_MINOR_VERSION 1
#define FL_PATCH_VERSION 9
#define FL_VERSION ((double)FL_MAJOR_VERSION + \
(double)FL_MINOR_VERSION * 0.01 + \
(double)FL_PATCH_VERSION * 0.0001)
typedef unsigned char uchar;
typedef unsigned long ulong;
enum Fl_Event { // events
FL_NO_EVENT = 0,
FL_PUSH = 1,
FL_RELEASE = 2,
FL_ENTER = 3,
FL_LEAVE = 4,
FL_DRAG = 5,
FL_FOCUS = 6,
FL_UNFOCUS = 7,
FL_KEYDOWN = 8,
FL_KEYUP = 9,
FL_CLOSE = 10,
FL_MOVE = 11,
FL_SHORTCUT = 12,
FL_DEACTIVATE = 13,
FL_ACTIVATE = 14,
FL_HIDE = 15,
FL_SHOW = 16,
FL_PASTE = 17,
FL_SELECTIONCLEAR = 18,
FL_MOUSEWHEEL = 19,
FL_DND_ENTER = 20,
FL_DND_DRAG = 21,
FL_DND_LEAVE = 22,
FL_DND_RELEASE = 23
};
#define FL_KEYBOARD FL_KEYDOWN
enum Fl_When { // Fl_Widget::when():
FL_WHEN_NEVER = 0,
FL_WHEN_CHANGED = 1,
FL_WHEN_RELEASE = 4,
FL_WHEN_RELEASE_ALWAYS= 6,
FL_WHEN_ENTER_KEY = 8,
FL_WHEN_ENTER_KEY_ALWAYS=10,
FL_WHEN_ENTER_KEY_CHANGED=11,
FL_WHEN_NOT_CHANGED = 2 // modifier bit to disable changed() test
};
// Fl::event_key() and Fl::get_key(n) (use ascii letters for all other keys):
#define FL_Button 0xfee8 // use Fl_Button+FL_*_MOUSE
#define FL_BackSpace 0xff08
#define FL_Tab 0xff09
#define FL_Enter 0xff0d
#define FL_Pause 0xff13
#define FL_Scroll_Lock 0xff14
#define FL_Escape 0xff1b
#define FL_Home 0xff50
#define FL_Left 0xff51
#define FL_Up 0xff52
#define FL_Right 0xff53
#define FL_Down 0xff54
#define FL_Page_Up 0xff55
#define FL_Page_Down 0xff56
#define FL_End 0xff57
#define FL_Print 0xff61
#define FL_Insert 0xff63
#define FL_Menu 0xff67 // the "menu/apps" key on XFree86
#define FL_Help 0xff68 // the 'help' key on Mac keyboards
#define FL_Num_Lock 0xff7f
#define FL_KP 0xff80 // use FL_KP+'x' for 'x' on numeric keypad
#define FL_KP_Enter 0xff8d // same as Fl_KP+'\r'
#define FL_KP_Last 0xffbd // use to range-check keypad
#define FL_F 0xffbd // use FL_F+n for function key n
#define FL_F_Last 0xffe0 // use to range-check function keys
#define FL_Shift_L 0xffe1
#define FL_Shift_R 0xffe2
#define FL_Control_L 0xffe3
#define FL_Control_R 0xffe4
#define FL_Caps_Lock 0xffe5
#define FL_Meta_L 0xffe7 // the left MSWindows key on XFree86
#define FL_Meta_R 0xffe8 // the right MSWindows key on XFree86
#define FL_Alt_L 0xffe9
#define FL_Alt_R 0xffea
#define FL_Delete 0xffff
// Fl::event_button():
#define FL_LEFT_MOUSE 1
#define FL_MIDDLE_MOUSE 2
#define FL_RIGHT_MOUSE 3
// Fl::event_state():
#define FL_SHIFT 0x00010000
#define FL_CAPS_LOCK 0x00020000
#define FL_CTRL 0x00040000
#define FL_ALT 0x00080000
#define FL_NUM_LOCK 0x00100000 // most X servers do this?
#define FL_META 0x00400000 // correct for XFree86
#define FL_SCROLL_LOCK 0x00800000 // correct for XFree86
#define FL_BUTTON1 0x01000000
#define FL_BUTTON2 0x02000000
#define FL_BUTTON3 0x04000000
#define FL_BUTTONS 0x7f000000 // All possible buttons
#define FL_BUTTON(n) (0x00800000<<(n))
#ifdef __APPLE__
# define FL_COMMAND FL_META
#else
# define FL_COMMAND FL_CTRL
#endif // __APPLE__
enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
FL_NO_BOX = 0, FL_FLAT_BOX,
FL_UP_BOX, FL_DOWN_BOX,
FL_UP_FRAME, FL_DOWN_FRAME,
FL_THIN_UP_BOX, FL_THIN_DOWN_BOX,
FL_THIN_UP_FRAME, FL_THIN_DOWN_FRAME,
FL_ENGRAVED_BOX, FL_EMBOSSED_BOX,
FL_ENGRAVED_FRAME, FL_EMBOSSED_FRAME,
FL_BORDER_BOX, _FL_SHADOW_BOX,
FL_BORDER_FRAME, _FL_SHADOW_FRAME,
_FL_ROUNDED_BOX, _FL_RSHADOW_BOX,
_FL_ROUNDED_FRAME, _FL_RFLAT_BOX,
_FL_ROUND_UP_BOX, _FL_ROUND_DOWN_BOX,
_FL_DIAMOND_UP_BOX, _FL_DIAMOND_DOWN_BOX,
_FL_OVAL_BOX, _FL_OSHADOW_BOX,
_FL_OVAL_FRAME, _FL_OFLAT_BOX,
_FL_PLASTIC_UP_BOX, _FL_PLASTIC_DOWN_BOX,
_FL_PLASTIC_UP_FRAME, _FL_PLASTIC_DOWN_FRAME,
_FL_PLASTIC_THIN_UP_BOX, _FL_PLASTIC_THIN_DOWN_BOX,
_FL_PLASTIC_ROUND_UP_BOX, _FL_PLASTIC_ROUND_DOWN_BOX,
_FL_GTK_UP_BOX, _FL_GTK_DOWN_BOX,
_FL_GTK_UP_FRAME, _FL_GTK_DOWN_FRAME,
_FL_GTK_THIN_UP_BOX, _FL_GTK_THIN_DOWN_BOX,
_FL_GTK_THIN_UP_FRAME, _FL_GTK_THIN_DOWN_FRAME,
_FL_GTK_ROUND_UP_BOX, _FL_GTK_ROUND_DOWN_BOX,
FL_FREE_BOXTYPE
};
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
#define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
#define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1)
extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX();
#define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX()
#define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2)
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX();
#define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX()
#define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2)
extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX();
#define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX()
extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX();
#define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX()
extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX();
#define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX()
#define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1)
extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX();
#define FL_OVAL_BOX fl_define_FL_OVAL_BOX()
#define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1)
#define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2)
#define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3)
extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
#define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX()
#define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1)
#define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2)
#define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3)
#define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4)
#define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5)
#define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
#define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
#define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
#define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
#define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
#define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
#define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
#define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
#define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
#define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
#define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
#define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
// conversions of box types to other boxtypes:
inline Fl_Boxtype fl_box(Fl_Boxtype b) {
return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
}
inline Fl_Boxtype fl_down(Fl_Boxtype b) {
return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
}
inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
return (Fl_Boxtype)((b%4<2)?b:(b+2));
}
// back-compatability box types:
#define FL_FRAME FL_ENGRAVED_FRAME
#define FL_FRAME_BOX FL_ENGRAVED_BOX
#define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
#define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
enum Fl_Labeltype { // labeltypes:
FL_NORMAL_LABEL = 0,
FL_NO_LABEL,
_FL_SHADOW_LABEL,
_FL_ENGRAVED_LABEL,
_FL_EMBOSSED_LABEL,
_FL_MULTI_LABEL,
_FL_ICON_LABEL,
_FL_IMAGE_LABEL,
FL_FREE_LABELTYPE
};
#define FL_SYMBOL_LABEL FL_NORMAL_LABEL
extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL();
#define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL()
extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
#define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL()
extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
#define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
enum Fl_Align { // align() values
FL_ALIGN_CENTER = 0,
FL_ALIGN_TOP = 1,
FL_ALIGN_BOTTOM = 2,
FL_ALIGN_LEFT = 4,
FL_ALIGN_RIGHT = 8,
FL_ALIGN_INSIDE = 16,
FL_ALIGN_TEXT_OVER_IMAGE = 32,
FL_ALIGN_IMAGE_OVER_TEXT = 0,
FL_ALIGN_CLIP = 64,
FL_ALIGN_WRAP = 128,
FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT,
FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT,
FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT,
FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT,
FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT,
FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT,
FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT,
FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT,
FL_ALIGN_NOWRAP = 0 // for back compatability
};
enum Fl_Font { // standard fonts
FL_HELVETICA = 0,
FL_HELVETICA_BOLD,
FL_HELVETICA_ITALIC,
FL_HELVETICA_BOLD_ITALIC,
FL_COURIER,
FL_COURIER_BOLD,
FL_COURIER_ITALIC,
FL_COURIER_BOLD_ITALIC,
FL_TIMES,
FL_TIMES_BOLD,
FL_TIMES_ITALIC,
FL_TIMES_BOLD_ITALIC,
FL_SYMBOL,
FL_SCREEN,
FL_SCREEN_BOLD,
FL_ZAPF_DINGBATS,
FL_FREE_FONT = 16, // first one to allocate
FL_BOLD = 1, // add this to helvetica, courier, or times
FL_ITALIC = 2 // add this to helvetica, courier, or times
};
extern FL_EXPORT int FL_NORMAL_SIZE;
enum Fl_Color { // standard colors
// These are used as default colors in widgets and altered as necessary
FL_FOREGROUND_COLOR = 0,
FL_BACKGROUND2_COLOR = 7,
FL_INACTIVE_COLOR = 8,
FL_SELECTION_COLOR = 15,
// boxtypes generally limit themselves to these colors so
// the whole ramp is not allocated:
FL_GRAY0 = 32, // 'A'
FL_DARK3 = 39, // 'H'
FL_DARK2 = 45, // 'N'
FL_DARK1 = 47, // 'P'
FL_BACKGROUND_COLOR = 49, // 'R' default background color
FL_LIGHT1 = 50, // 'S'
FL_LIGHT2 = 52, // 'U'
FL_LIGHT3 = 54, // 'W'
// FLTK provides a 5x8x5 color cube that is used with colormap visuals
FL_BLACK = 56,
FL_RED = 88,
FL_GREEN = 63,
FL_YELLOW = 95,
FL_BLUE = 216,
FL_MAGENTA = 248,
FL_CYAN = 223,
FL_DARK_RED = 72,
FL_DARK_GREEN = 60,
FL_DARK_YELLOW = 76,
FL_DARK_BLUE = 136,
FL_DARK_MAGENTA = 152,
FL_DARK_CYAN = 140,
FL_WHITE = 255
};
#define FL_FREE_COLOR (Fl_Color)16
#define FL_NUM_FREE_COLOR 16
#define FL_GRAY_RAMP (Fl_Color)32
#define FL_NUM_GRAY 24
#define FL_GRAY FL_BACKGROUND_COLOR
#define FL_COLOR_CUBE (Fl_Color)56
#define FL_NUM_RED 5
#define FL_NUM_GREEN 8
#define FL_NUM_BLUE 5
FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
if (!r && !g && !b) return FL_BLACK;
else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
}
inline Fl_Color fl_rgb_color(uchar g) {
if (!g) return FL_BLACK;
else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8);
}
inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
inline Fl_Color fl_color_cube(int r, int g, int b) {
return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);}
enum Fl_Cursor { // standard cursors
FL_CURSOR_DEFAULT = 0,
FL_CURSOR_ARROW = 35,
FL_CURSOR_CROSS = 66,
FL_CURSOR_WAIT = 76,
FL_CURSOR_INSERT = 77,
FL_CURSOR_HAND = 31,
FL_CURSOR_HELP = 47,
FL_CURSOR_MOVE = 27,
// fltk provides bitmaps for these:
FL_CURSOR_NS = 78,
FL_CURSOR_WE = 79,
FL_CURSOR_NWSE = 80,
FL_CURSOR_NESW = 81,
FL_CURSOR_NONE = 255,
// for back compatability (non MSWindows ones):
FL_CURSOR_N = 70,
FL_CURSOR_NE = 69,
FL_CURSOR_E = 49,
FL_CURSOR_SE = 8,
FL_CURSOR_S = 9,
FL_CURSOR_SW = 7,
FL_CURSOR_W = 36,
FL_CURSOR_NW = 68
//FL_CURSOR_NS = 22,
//FL_CURSOR_WE = 55,
};
enum { // values for "when" passed to Fl::add_fd()
FL_READ = 1,
FL_WRITE = 4,
FL_EXCEPT = 8
};
enum Fl_Mode { // visual types and Fl_Gl_Window::mode() (values match Glut)
FL_RGB = 0,
FL_INDEX = 1,
FL_SINGLE = 0,
FL_DOUBLE = 2,
FL_ACCUM = 4,
FL_ALPHA = 8,
FL_DEPTH = 16,
FL_STENCIL = 32,
FL_RGB8 = 64,
FL_MULTISAMPLE= 128,
FL_STEREO = 256,
FL_FAKE_SINGLE = 512 // Fake single buffered windows using double-buffer
};
// image alpha blending
#define FL_IMAGE_WITH_ALPHA 0x40000000
// damage masks
enum Fl_Damage {
FL_DAMAGE_CHILD = 0x01,
FL_DAMAGE_EXPOSE = 0x02,
FL_DAMAGE_SCROLL = 0x04,
FL_DAMAGE_OVERLAY = 0x08,
FL_DAMAGE_USER1 = 0x10,
FL_DAMAGE_USER2 = 0x20,
FL_DAMAGE_ALL = 0x80
};
// FLTK 1.0.x compatibility definitions...
# ifdef FLTK_1_0_COMPAT
# define contrast fl_contrast
# define down fl_down
# define frame fl_frame
# define inactive fl_inactive
# endif // FLTK_1_0_COMPAT
#endif
//
// End of "$Id: Enumerations.H 6096 2008-04-12 04:18:58Z mike $".
//

View File

@@ -0,0 +1,293 @@
//
// "$Id: Fl.H 5848 2007-05-20 16:18:31Z mike $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2006 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_H
# define Fl_H
# include "Enumerations.H"
# ifndef Fl_Object
# define Fl_Object Fl_Widget
# endif
# ifdef check
# undef check
# endif
class Fl_Widget;
class Fl_Window;
class Fl_Image;
struct Fl_Label;
typedef void (Fl_Label_Draw_F)(const Fl_Label*, int,int,int,int, Fl_Align);
typedef void (Fl_Label_Measure_F)(const Fl_Label*, int&, int&);
typedef void (Fl_Box_Draw_F)(int,int,int,int, Fl_Color);
typedef void (*Fl_Timeout_Handler)(void*);
typedef void (*Fl_Awake_Handler)(void*);
class FL_EXPORT Fl {
Fl() {}; // no constructor!
public: // should be private!
static int e_number;
static int e_x;
static int e_y;
static int e_x_root;
static int e_y_root;
static int e_dx;
static int e_dy;
static int e_state;
static int e_clicks;
static int e_is_click;
static int e_keysym;
static char* e_text;
static int e_length;
static Fl_Widget* belowmouse_;
static Fl_Widget* pushed_;
static Fl_Widget* focus_;
static int damage_;
static Fl_Widget* selection_owner_;
static Fl_Window* modal_;
static Fl_Window* grab_;
static int compose_state;
static int visible_focus_;
static int dnd_text_ops_;
static void damage(int d) {damage_ = d;}
static void (*idle)();
static Fl_Awake_Handler *awake_ring_;
static void **awake_data_;
static int awake_ring_size_;
static int awake_ring_head_;
static int awake_ring_tail_;
static int add_awake_handler_(Fl_Awake_Handler, void*);
static int get_awake_handler_(Fl_Awake_Handler&, void*&);
static const char* scheme_;
static Fl_Image* scheme_bg_;
static int e_original_keysym; // late addition
public:
// API version number
static double version();
// argument parsers:
static int arg(int, char**, int&);
static int args(int, char**, int&, int (*)(int,char**,int&) = 0);
static const char* const help;
static void args(int, char**);
// things called by initialization:
static void display(const char*);
static int visual(int);
static int gl_visual(int, int *alist=0);
static void own_colormap();
static void get_system_colors();
static void foreground(uchar, uchar, uchar);
static void background(uchar, uchar, uchar);
static void background2(uchar, uchar, uchar);
// schemes:
static int scheme(const char*);
static const char* scheme() {return scheme_;}
static int reload_scheme();
static int scrollbar_size();
static void scrollbar_size(int W);
// execution:
static int wait();
static double wait(double time);
static int check();
static int ready();
static int run();
static Fl_Widget* readqueue();
static void add_timeout(double t, Fl_Timeout_Handler,void* = 0);
static void repeat_timeout(double t, Fl_Timeout_Handler,void* = 0);
static int has_timeout(Fl_Timeout_Handler, void* = 0);
static void remove_timeout(Fl_Timeout_Handler, void* = 0);
static void add_check(Fl_Timeout_Handler, void* = 0);
static int has_check(Fl_Timeout_Handler, void* = 0);
static void remove_check(Fl_Timeout_Handler, void* = 0);
static void add_fd(int fd, int when, void (*cb)(int,void*),void* =0);
static void add_fd(int fd, void (*cb)(int, void*), void* = 0);
static void remove_fd(int, int when);
static void remove_fd(int);
static void add_idle(void (*cb)(void*), void* = 0);
static int has_idle(void (*cb)(void*), void* = 0);
static void remove_idle(void (*cb)(void*), void* = 0);
static int damage() {return damage_;}
static void redraw();
static void flush();
static void (*warning)(const char*, ...);
static void (*error)(const char*, ...);
static void (*fatal)(const char*, ...);
static Fl_Window* first_window();
static void first_window(Fl_Window*);
static Fl_Window* next_window(const Fl_Window*);
static Fl_Window* modal() {return modal_;}
static Fl_Window* grab() {return grab_;}
static void grab(Fl_Window*);
// event information:
static int event() {return e_number;}
static int event_x() {return e_x;}
static int event_y() {return e_y;}
static int event_x_root() {return e_x_root;}
static int event_y_root() {return e_y_root;}
static int event_dx() {return e_dx;}
static int event_dy() {return e_dy;}
static void get_mouse(int &,int &);
static int event_clicks() {return e_clicks;}
static void event_clicks(int i) {e_clicks = i;}
static int event_is_click() {return e_is_click;}
static void event_is_click(int i) {e_is_click = i;} // only 0 works!
static int event_button() {return e_keysym-FL_Button;}
static int event_state() {return e_state;}
static int event_state(int i) {return e_state&i;}
static int event_key() {return e_keysym;}
static int event_original_key(){return e_original_keysym;}
static int event_key(int);
static int get_key(int);
static const char* event_text() {return e_text;}
static int event_length() {return e_length;}
static int compose(int &del);
static void compose_reset() {compose_state = 0;}
static int event_inside(int,int,int,int);
static int event_inside(const Fl_Widget*);
static int test_shortcut(int);
// event destinations:
static int handle(int, Fl_Window*);
static Fl_Widget* belowmouse() {return belowmouse_;}
static void belowmouse(Fl_Widget*);
static Fl_Widget* pushed() {return pushed_;}
static void pushed(Fl_Widget*);
static Fl_Widget* focus() {return focus_;}
static void focus(Fl_Widget*);
static void add_handler(int (*h)(int));
static void remove_handler(int (*h)(int));
// cut/paste:
static void copy(const char* stuff, int len, int clipboard = 0);
static void paste(Fl_Widget &receiver, int clipboard /*=0*/);
static int dnd();
// These are for back-compatability only:
static Fl_Widget* selection_owner() {return selection_owner_;}
static void selection_owner(Fl_Widget*);
static void selection(Fl_Widget &owner, const char*, int len);
static void paste(Fl_Widget &receiver);
// screen size:
static int x();
static int y();
static int w();
static int h();
// multi-head support:
static int screen_count();
static void screen_xywh(int &X, int &Y, int &W, int &H) {
screen_xywh(X, Y, W, H, e_x_root, e_y_root);
}
static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
static void screen_xywh(int &X, int &Y, int &W, int &H, int n);
// color map:
static void set_color(Fl_Color, uchar, uchar, uchar);
static void set_color(Fl_Color, unsigned);
static unsigned get_color(Fl_Color);
static void get_color(Fl_Color, uchar&, uchar&, uchar&);
static void free_color(Fl_Color, int overlay = 0);
// fonts:
static const char* get_font(Fl_Font);
static const char* get_font_name(Fl_Font, int* attributes = 0);
static int get_font_sizes(Fl_Font, int*& sizep);
static void set_font(Fl_Font, const char*);
static void set_font(Fl_Font, Fl_Font);
static Fl_Font set_fonts(const char* = 0);
// labeltypes:
static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
static void set_labeltype(Fl_Labeltype, Fl_Labeltype from);
// boxtypes:
static Fl_Box_Draw_F *get_boxtype(Fl_Boxtype);
static void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);
static void set_boxtype(Fl_Boxtype, Fl_Boxtype from);
static int box_dx(Fl_Boxtype);
static int box_dy(Fl_Boxtype);
static int box_dw(Fl_Boxtype);
static int box_dh(Fl_Boxtype);
static int draw_box_active();
// back compatability:
static void set_abort(void (*f)(const char*,...)) {fatal = f;}
static void (*atclose)(Fl_Window*,void*);
static void default_atclose(Fl_Window*,void*);
static void set_atclose(void (*f)(Fl_Window*,void*)) {atclose = f;}
static int event_shift() {return e_state&FL_SHIFT;}
static int event_ctrl() {return e_state&FL_CTRL;}
static int event_alt() {return e_state&FL_ALT;}
static int event_buttons() {return e_state&0x7f000000;}
static int event_button1() {return e_state&FL_BUTTON1;}
static int event_button2() {return e_state&FL_BUTTON2;}
static int event_button3() {return e_state&FL_BUTTON3;}
static void set_idle(void (*cb)()) {idle = cb;}
static void grab(Fl_Window&win) {grab(&win);}
static void release() {grab(0);}
// Visible focus methods...
static void visible_focus(int v) { visible_focus_ = v; }
static int visible_focus() { return visible_focus_; }
// Drag-n-drop text operation methods...
static void dnd_text_ops(int v) { dnd_text_ops_ = v; }
static int dnd_text_ops() { return dnd_text_ops_; }
// Multithreading support:
static void lock();
static void unlock();
static void awake(void* message = 0);
static int awake(Fl_Awake_Handler cb, void* message = 0);
static void* thread_message();
// Widget deletion:
static void delete_widget(Fl_Widget *w);
static void do_widget_deletion();
static void watch_widget_pointer(Fl_Widget *&w);
static void release_widget_pointer(Fl_Widget *&w);
static void clear_widget_pointer(Fl_Widget const *w);
};
#endif // !Fl_H
//
// End of "$Id: Fl.H 5848 2007-05-20 16:18:31Z mike $".
//

View File

@@ -0,0 +1,55 @@
//
// "$Id: Fl_Adjuster.H 4288 2005-04-16 00:13:17Z mike $"
//
// Adjuster widget header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// 3-button "slider", made for Nuke
#ifndef Fl_Adjuster_H
#define Fl_Adjuster_H
#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif
class FL_EXPORT Fl_Adjuster : public Fl_Valuator {
int drag;
int ix;
int soft_;
protected:
void draw();
int handle(int);
void value_damage();
public:
Fl_Adjuster(int X,int Y,int W,int H,const char *l=0);
void soft(int s) {soft_ = s;}
int soft() const {return soft_;}
};
#endif
//
// End of "$Id: Fl_Adjuster.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,64 @@
//
// "$Id: Fl_Bitmap.H 4288 2005-04-16 00:13:17Z mike $"
//
// Bitmap header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Bitmap_H
#define Fl_Bitmap_H
# include "Fl_Image.H"
class Fl_Widget;
struct Fl_Menu_Item;
class FL_EXPORT Fl_Bitmap : public Fl_Image {
public:
const uchar *array;
int alloc_array; // Non-zero if data was allocated
#if defined(__APPLE__) || defined(WIN32)
void *id; // for internal use
#else
unsigned id; // for internal use
#endif // __APPLE__ || WIN32
Fl_Bitmap(const uchar *bits, int W, int H) :
Fl_Image(W,H,0), array(bits), alloc_array(0), id(0) {data((const char **)&array, 1);}
Fl_Bitmap(const char *bits, int W, int H) :
Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id(0) {data((const char **)&array, 1);}
virtual ~Fl_Bitmap();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
virtual void label(Fl_Widget*w);
virtual void label(Fl_Menu_Item*m);
virtual void uncache();
};
#endif
//
// End of "$Id: Fl_Bitmap.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,51 @@
//
// "$Id: Fl_Box.H 4288 2005-04-16 00:13:17Z mike $"
//
// Box header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Box_H
#define Fl_Box_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
class FL_EXPORT Fl_Box : public Fl_Widget {
protected:
void draw();
public:
Fl_Box(int X, int Y, int W, int H, const char *l=0)
: Fl_Widget(X,Y,W,H,l) {}
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l)
: Fl_Widget(X,Y,W,H,l) {box(b);}
virtual int handle(int);
};
#endif
//
// End of "$Id: Fl_Box.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,132 @@
//
// "$Id: Fl_Browser.H 4288 2005-04-16 00:13:17Z mike $"
//
// Browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// Forms-compatable browser. Probably useful for other
// lists of textual data. Notice that the line numbers
// start from 1, and 0 means "no line".
#ifndef Fl_Browser_H
#define Fl_Browser_H
#include "Fl_Browser_.H"
struct FL_BLINE;
class FL_EXPORT Fl_Browser : public Fl_Browser_ {
FL_BLINE *first; // the array of lines
FL_BLINE *last;
FL_BLINE *cache;
int cacheline; // line number of cache
int lines; // Number of lines
int full_height_;
const int* column_widths_;
char format_char_; // alternative to @-sign
char column_char_; // alternative to tab
protected:
// required routines for Fl_Browser_ subclass:
void* item_first() const ;
void* item_next(void*) const ;
void* item_prev(void*) const ;
int item_selected(void*) const ;
void item_select(void*, int);
int item_height(void*) const ;
int item_width(void*) const ;
void item_draw(void*, int, int, int, int) const ;
int full_height() const ;
int incr_height() const ;
FL_BLINE* find_line(int) const ;
FL_BLINE* _remove(int) ;
void insert(int, FL_BLINE*);
int lineno(void*) const ;
void swap(FL_BLINE *a, FL_BLINE *b);
public:
void remove(int);
void add(const char*, void* = 0);
void insert(int, const char*, void* = 0);
void move(int to, int from);
int load(const char* filename);
void swap(int a, int b);
void clear();
int size() const {return lines;}
void size(int W, int H) { Fl_Widget::size(W, H); }
int topline() const ;
enum Fl_Line_Position { TOP, BOTTOM, MIDDLE };
void lineposition(int, Fl_Line_Position);
void topline(int l) { lineposition(l, TOP); }
void bottomline(int l) { lineposition(l, BOTTOM); }
void middleline(int l) { lineposition(l, MIDDLE); }
int select(int, int=1);
int selected(int) const ;
void show(int n);
void show() {Fl_Widget::show();}
void hide(int n);
void hide() {Fl_Widget::hide();}
int visible(int n) const ;
int value() const ;
void value(int v) {select(v);}
const char* text(int) const ;
void text(int, const char*);
void* data(int) const ;
void data(int, void* v);
Fl_Browser(int, int, int, int, const char* = 0);
~Fl_Browser() { clear(); }
char format_char() const {return format_char_;}
void format_char(char c) {format_char_ = c;}
char column_char() const {return column_char_;}
void column_char(char c) {column_char_ = c;}
const int* column_widths() const {return column_widths_;}
void column_widths(const int* l) {column_widths_ = l;}
int displayed(int n) const {return Fl_Browser_::displayed(find_line(n));}
void make_visible(int n) {
if (n < 1) Fl_Browser_::display(find_line(1));
else if (n > lines) Fl_Browser_::display(find_line(lines));
else Fl_Browser_::display(find_line(n));
}
// for back compatability only:
void replace(int a, const char* b) {text(a, b);}
void display(int, int=1);
};
#endif
//
// End of "$Id: Fl_Browser.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,154 @@
//
// "$Id: Fl_Browser_.H 4879 2006-03-28 23:27:20Z matt $"
//
// Common browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// This is the base class for browsers. To be useful it must
// be subclassed and several virtual functions defined. The
// Forms-compatable browser and the file chooser's browser are
// subclassed off of this.
// Yes, I know this should be a template...
#ifndef Fl_Browser__H
#define Fl_Browser__H
#ifndef Fl_Group_H
#include "Fl_Group.H"
#endif
#include "Fl_Scrollbar.H"
#define FL_NORMAL_BROWSER 0
#define FL_SELECT_BROWSER 1
#define FL_HOLD_BROWSER 2
#define FL_MULTI_BROWSER 3
class FL_EXPORT Fl_Browser_ : public Fl_Group {
int position_; // where user wants it scrolled to
int real_position_; // the current vertical scrolling position
int hposition_; // where user wants it panned to
int real_hposition_; // the current horizontal scrolling position
int offset_; // how far down top_ item the real_position is
int max_width; // widest object seen so far
uchar has_scrollbar_; // which scrollbars are enabled
uchar textfont_, textsize_;
unsigned textcolor_;
void* top_; // which item scrolling position is in
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
void *redraw1,*redraw2; // minimal update pointers
void* max_width_item; // which item has max_width_
static int scrollbar_width_;
void update_top();
protected:
// All of the following must be supplied by the subclass:
virtual void *item_first() const = 0;
virtual void *item_next(void *) const = 0;
virtual void *item_prev(void *) const = 0;
virtual int item_height(void *) const = 0;
virtual int item_width(void *) const = 0;
virtual int item_quick_height(void *) const ;
virtual void item_draw(void *,int,int,int,int) const = 0;
// you don't have to provide these but it may help speed it up:
virtual int full_width() const ; // current width of all items
virtual int full_height() const ; // current height of all items
virtual int incr_height() const ; // average height of an item
// These only need to be done by subclass if you want a multi-browser:
virtual void item_select(void *,int=1);
virtual int item_selected(void *) const ;
// things the subclass may want to call:
void *top() const {return top_;}
void *selection() const {return selection_;}
void new_list(); // completely clobber all data, as though list replaced
void deleting(void *a); // get rid of any pointers to a
void replacing(void *a,void *b); // change a pointers to b
void swapping(void *a,void *b); // exchange pointers a and b
void inserting(void *a,void *b); // insert b near a
int displayed(void *) const ; // true if this line is visible
void redraw_line(void *); // minimal update, no change in size
void redraw_lines() {damage(FL_DAMAGE_SCROLL);} // redraw all of them
void bbox(int&,int&,int&,int&) const;
int leftedge() const; // x position after scrollbar & border
void *find_item(int my); // item under mouse
void draw(int,int,int,int);
int handle(int,int,int,int,int);
void draw();
Fl_Browser_(int,int,int,int,const char * = 0);
public:
Fl_Scrollbar scrollbar; // Vertical scrollbar
Fl_Scrollbar hscrollbar; // Horizontal scrollbar
int handle(int);
void resize(int,int,int,int);
int select(void *,int=1,int docallbacks=0);
int select_only(void *,int docallbacks=0);
int deselect(int docallbacks=0);
int position() const {return position_;}
int hposition() const {return hposition_;}
void position(int); // scroll to here
void hposition(int); // pan to here
void display(void*); // scroll so this item is shown
uchar has_scrollbar() const {return has_scrollbar_;}
void has_scrollbar(uchar i) {has_scrollbar_ = i;}
enum { // values for has_scrollbar()
HORIZONTAL = 1,
VERTICAL = 2,
BOTH = 3,
ALWAYS_ON = 4,
HORIZONTAL_ALWAYS = 5,
VERTICAL_ALWAYS = 6,
BOTH_ALWAYS = 7
};
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
static void scrollbar_width(int b) {scrollbar_width_ = b;}
static int scrollbar_width() {return scrollbar_width_;}
// for back compatability:
void scrollbar_right() {scrollbar.align(FL_ALIGN_RIGHT);}
void scrollbar_left() {scrollbar.align(FL_ALIGN_LEFT);}
};
#endif
//
// End of "$Id: Fl_Browser_.H 4879 2006-03-28 23:27:20Z matt $".
//

View File

@@ -0,0 +1,78 @@
//
// "$Id: Fl_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Button_H
#define Fl_Button_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
// values for type()
#define FL_NORMAL_BUTTON 0
#define FL_TOGGLE_BUTTON 1
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2)
#define FL_HIDDEN_BUTTON 3 // for Forms compatability
extern FL_EXPORT int fl_old_shortcut(const char*);
class FL_EXPORT Fl_Button : public Fl_Widget {
int shortcut_;
char value_;
char oldval;
uchar down_box_;
protected:
virtual void draw();
public:
virtual int handle(int);
Fl_Button(int,int,int,int,const char * = 0);
int value(int);
char value() const {return value_;}
int set() {return value(1);}
int clear() {return value(0);}
void setonly(); // this should only be called on FL_RADIO_BUTTONs
int shortcut() const {return shortcut_;}
void shortcut(int s) {shortcut_ = s;}
Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;}
void down_box(Fl_Boxtype b) {down_box_ = b;}
// back compatability:
void shortcut(const char *s) {shortcut(fl_old_shortcut(s));}
Fl_Color down_color() const {return selection_color();}
void down_color(unsigned c) {selection_color(c);}
};
#endif
//
// End of "$Id: Fl_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,93 @@
//
// "$Id: Fl_Chart.H 4288 2005-04-16 00:13:17Z mike $"
//
// Forms chart header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Chart_H
#define Fl_Chart_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
// values for type()
#define FL_BAR_CHART 0
#define FL_HORBAR_CHART 1
#define FL_LINE_CHART 2
#define FL_FILL_CHART 3
#define FL_SPIKE_CHART 4
#define FL_PIE_CHART 5
#define FL_SPECIALPIE_CHART 6
#define FL_FILLED_CHART FL_FILL_CHART // compatibility
#define FL_CHART_MAX 128
#define FL_CHART_LABEL_MAX 18
struct FL_CHART_ENTRY {
float val;
unsigned col;
char str[FL_CHART_LABEL_MAX+1];
};
class FL_EXPORT Fl_Chart : public Fl_Widget {
int numb;
int maxnumb;
int sizenumb;
FL_CHART_ENTRY *entries;
double min,max;
uchar autosize_;
uchar textfont_,textsize_;
unsigned textcolor_;
protected:
void draw();
public:
Fl_Chart(int,int,int,int,const char * = 0);
~Fl_Chart();
void clear();
void add(double, const char * =0, unsigned=0);
void insert(int, double, const char * =0, unsigned=0);
void replace(int, double, const char * =0, unsigned=0);
void bounds(double *a,double *b) const {*a = min; *b = max;}
void bounds(double a,double b);
int size() const {return numb;}
void size(int W, int H) { Fl_Widget::size(W, H); }
int maxsize() const {return maxnumb;}
void maxsize(int);
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
uchar autosize() const {return autosize_;}
void autosize(uchar n) {autosize_ = n;}
};
#endif
//
// End of "$Id: Fl_Chart.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,103 @@
//
// "$Id: Fl_Check_Browser.H 5979 2007-11-19 15:46:24Z matt $"
//
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Check_Browser_H
#define Fl_Check_Browser_H
#include "Fl.H"
#include "Fl_Browser_.H"
class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ {
/* required routines for Fl_Browser_ subclass: */
void *item_first() const;
void *item_next(void *) const;
void *item_prev(void *) const;
int item_height(void *) const;
int item_width(void *) const;
void item_draw(void *, int, int, int, int) const;
void item_select(void *, int);
int item_selected(void *) const;
/* private data */
public: // IRIX 5.3 C++ compiler doesn't support private structures...
struct cb_item {
cb_item *next;
cb_item *prev;
char checked;
char selected;
char *text;
};
private:
cb_item *first;
cb_item *last;
cb_item *cache;
int cached_item;
int nitems_;
int nchecked_;
cb_item *find_item(int) const;
int lineno(cb_item *) const;
public:
Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0);
~Fl_Check_Browser() { clear(); }
int add(char *s); // add an (unchecked) item
int add(char *s, int b); // add an item and set checked
// both return the new nitems()
int remove(int item); // delete an item. Returns nitems()
// inline const char * methods to avoid breaking binary compatibility...
int add(const char *s) { return add((char *)s); }
int add(const char *s, int b) { return add((char *)s, b); }
void clear(); // delete all items
int nitems() const { return nitems_; }
int nchecked() const { return nchecked_; }
int checked(int item) const;
void checked(int item, int b);
void set_checked(int item) { checked(item, 1); }
void check_all();
void check_none();
int value() const; // currently selected item
char *text(int item) const; // returns pointer to internal buffer
protected:
int handle(int);
};
#endif // Fl_Check_Browser_H
//
// End of "$Id: Fl_Check_Browser.H 5979 2007-11-19 15:46:24Z matt $".
//

View File

@@ -0,0 +1,42 @@
//
// "$Id: Fl_Check_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Check button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Check_Button_H
#define Fl_Check_Button_H
#include "Fl_Light_Button.H"
class FL_EXPORT Fl_Check_Button : public Fl_Light_Button {
public:
Fl_Check_Button(int x,int y,int w,int h,const char *l = 0);
};
#endif
//
// End of "$Id: Fl_Check_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,48 @@
//
// "$Id: Fl_Choice.H 4288 2005-04-16 00:13:17Z mike $"
//
// Choice header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Choice_H
#define Fl_Choice_H
#include "Fl_Menu_.H"
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
protected:
void draw();
public:
int handle(int);
Fl_Choice(int,int,int,int,const char * = 0);
int value(const Fl_Menu_Item*);
int value(int i);
int value() const {return Fl_Menu_::value();}
};
#endif
//
// End of "$Id: Fl_Choice.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,75 @@
//
// "$Id: Fl_Clock.H 4288 2005-04-16 00:13:17Z mike $"
//
// Clock header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Clock_H
#define Fl_Clock_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
// values for type:
#define FL_SQUARE_CLOCK 0
#define FL_ROUND_CLOCK 1
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // nyi
// a Fl_Clock_Output can be used to display a program-supplied time:
class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
int hour_, minute_, second_;
ulong value_;
void drawhands(Fl_Color,Fl_Color); // part of draw
protected:
void draw(int, int, int, int);
void draw();
public:
Fl_Clock_Output(int x,int y,int w,int h, const char *l = 0);
void value(ulong v); // set to this Unix time
void value(int,int,int); // set hour, minute, second
ulong value() const {return value_;}
int hour() const {return hour_;}
int minute() const {return minute_;}
int second() const {return second_;}
};
// a Fl_Clock displays the current time always by using a timeout:
class FL_EXPORT Fl_Clock : public Fl_Clock_Output {
public:
int handle(int);
void update();
Fl_Clock(int x,int y,int w,int h, const char *l = 0);
Fl_Clock(uchar t,int x,int y,int w,int h, const char *l);
~Fl_Clock();
};
#endif
//
// End of "$Id: Fl_Clock.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,104 @@
//
// "$Id: Fl_Color_Chooser.H 4288 2005-04-16 00:13:17Z mike $"
//
// Color chooser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// The color chooser object and the color chooser popup. The popup
// is just a window containing a single color chooser and some boxes
// to indicate the current and cancelled color.
#ifndef Fl_Color_Chooser_H
#define Fl_Color_Chooser_H
#include <FL/Fl_Group.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Return_Button.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Value_Input.H>
class FL_EXPORT Flcc_HueBox : public Fl_Widget {
int px, py;
protected:
void draw();
int handle_key(int);
public:
int handle(int);
Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
px = py = 0;}
};
class FL_EXPORT Flcc_ValueBox : public Fl_Widget {
int py;
protected:
void draw();
int handle_key(int);
public:
int handle(int);
Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
py = 0;}
};
class FL_EXPORT Flcc_Value_Input : public Fl_Value_Input {
public:
int format(char*);
Flcc_Value_Input(int X, int Y, int W, int H) : Fl_Value_Input(X,Y,W,H) {}
};
class FL_EXPORT Fl_Color_Chooser : public Fl_Group {
Flcc_HueBox huebox;
Flcc_ValueBox valuebox;
Fl_Choice choice;
Flcc_Value_Input rvalue;
Flcc_Value_Input gvalue;
Flcc_Value_Input bvalue;
Fl_Box resize_box;
double hue_, saturation_, value_;
double r_, g_, b_;
void set_valuators();
static void rgb_cb(Fl_Widget*, void*);
static void mode_cb(Fl_Widget*, void*);
public:
int mode() {return choice.value();}
double hue() const {return hue_;}
double saturation() const {return saturation_;}
double value() const {return value_;}
double r() const {return r_;}
double g() const {return g_;}
double b() const {return b_;}
int hsv(double,double,double);
int rgb(double,double,double);
static void hsv2rgb(double, double, double,double&,double&,double&);
static void rgb2hsv(double, double, double,double&,double&,double&);
Fl_Color_Chooser(int,int,int,int,const char* = 0);
};
FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b);
FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b);
#endif
//
// End of "$Id: Fl_Color_Chooser.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,76 @@
//
// "$Id: Fl_Counter.H 4288 2005-04-16 00:13:17Z mike $"
//
// Counter header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// A numerical value with up/down step buttons. From Forms.
#ifndef Fl_Counter_H
#define Fl_Counter_H
#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif
// values for type():
#define FL_NORMAL_COUNTER 0
#define FL_SIMPLE_COUNTER 1
class FL_EXPORT Fl_Counter : public Fl_Valuator {
uchar textfont_, textsize_;
unsigned textcolor_;
double lstep_;
uchar mouseobj;
static void repeat_callback(void *);
int calc_mouseobj();
void increment_cb();
protected:
void draw();
public:
int handle(int);
Fl_Counter(int,int,int,int,const char * = 0);
~Fl_Counter();
void lstep(double a) {lstep_ = a;}
void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}
void step(double a) {Fl_Valuator::step(a);}
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
//
// End of "$Id: Fl_Counter.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,67 @@
//
// "$Id: Fl_Dial.H 4288 2005-04-16 00:13:17Z mike $"
//
// Dial header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Dial_H
#define Fl_Dial_H
#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif
// values for type():
#define FL_NORMAL_DIAL 0
#define FL_LINE_DIAL 1
#define FL_FILL_DIAL 2
class FL_EXPORT Fl_Dial : public Fl_Valuator {
short a1,a2;
protected:
// these allow subclasses to put the dial in a smaller area:
void draw(int, int, int, int);
int handle(int, int, int, int, int);
void draw();
public:
int handle(int);
Fl_Dial(int x,int y,int w,int h, const char *l = 0);
short angle1() const {return a1;}
void angle1(short a) {a1 = a;}
short angle2() const {return a2;}
void angle2(short a) {a2 = a;}
void angles(short a, short b) {a1 = a; a2 = b;}
};
#endif
//
// End of "$Id: Fl_Dial.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,54 @@
//
// "$Id: Fl_Double_Window.H 4288 2005-04-16 00:13:17Z mike $"
//
// Double-buffered window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Double_Window_H
#define Fl_Double_Window_H
#include "Fl_Window.H"
class FL_EXPORT Fl_Double_Window : public Fl_Window {
protected:
void flush(int eraseoverlay);
char force_doublebuffering_; // force db, even if the OS already buffers windows (overlays need that on MacOS and Windows2000)
public:
void show();
void show(int a, char **b) {Fl_Window::show(a,b);}
void flush();
void resize(int,int,int,int);
void hide();
~Fl_Double_Window();
Fl_Double_Window(int W, int H, const char *l = 0)
: Fl_Window(W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0)
: Fl_Window(X,Y,W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
};
#endif
//
// End of "$Id: Fl_Double_Window.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,49 @@
/*
* "$Id: Fl_Export.H 4288 2005-04-16 00:13:17Z mike $"
*
* WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2005 by Bill Spitzak and others.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems on the following page:
*
* http://www.fltk.org/str.php
*/
#ifndef Fl_Export_H
# define Fl_Export_H
/*
* The following is only used when building DLLs under WIN32...
*/
# if defined(FL_DLL) && (defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) || __GNUC__ >= 3)
# ifdef FL_LIBRARY
# define FL_EXPORT __declspec(dllexport)
# else
# define FL_EXPORT __declspec(dllimport)
# endif /* FL_LIBRARY */
# else
# define FL_EXPORT
# endif /* FL_DLL */
#endif /* !Fl_Export_H */
/*
* End of "$Id: Fl_Export.H 4288 2005-04-16 00:13:17Z mike $".
*/

View File

@@ -0,0 +1,81 @@
//
// "$Id: Fl_File_Browser.H 4288 2005-04-16 00:13:17Z mike $"
//
// FileBrowser definitions.
//
// Copyright 1999-2005 by Michael Sweet.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
//
// Include necessary header files...
//
#ifndef _Fl_File_Browser_H_
# define _Fl_File_Browser_H_
# include "Fl_Browser.H"
# include "Fl_File_Icon.H"
# include "filename.H"
//
// Fl_File_Browser class...
//
class FL_EXPORT Fl_File_Browser : public Fl_Browser
{
int filetype_;
const char *directory_;
uchar iconsize_;
const char *pattern_;
int full_height() const;
int item_height(void *) const;
int item_width(void *) const;
void item_draw(void *, int, int, int, int) const;
int incr_height() const { return (item_height(0)); }
public:
enum { FILES, DIRECTORIES };
Fl_File_Browser(int, int, int, int, const char * = 0);
uchar iconsize() const { return (iconsize_); };
void iconsize(uchar s) { iconsize_ = s; redraw(); };
void filter(const char *pattern);
const char *filter() const { return (pattern_); };
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
uchar textsize() const { return (Fl_Browser::textsize()); };
void textsize(uchar s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
int filetype() const { return (filetype_); };
void filetype(int t) { filetype_ = t; };
};
#endif // !_Fl_File_Browser_H_
//
// End of "$Id: Fl_File_Browser.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,187 @@
//
// "$Id: Fl_File_Chooser.H 5644 2007-01-28 19:41:56Z mike $"
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0108
#ifndef Fl_File_Chooser_H
#define Fl_File_Chooser_H
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <FL/Fl_Group.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Menu_Button.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Preferences.H>
#include <FL/Fl_Tile.H>
#include <FL/Fl_File_Browser.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_File_Input.H>
#include <FL/Fl_Return_Button.H>
#include <FL/fl_ask.H>
class FL_EXPORT Fl_File_Chooser {
public:
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
private:
static Fl_Preferences prefs_;
void (*callback_)(Fl_File_Chooser*, void *);
void *data_;
char directory_[1024];
char pattern_[1024];
char preview_text_[2048];
int type_;
void favoritesButtonCB();
void favoritesCB(Fl_Widget *w);
void fileListCB();
void fileNameCB();
void newdir();
static void previewCB(Fl_File_Chooser *fc);
void showChoiceCB();
void update_favorites();
void update_preview();
public:
Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
private:
Fl_Double_Window *window;
void cb_window_i(Fl_Double_Window*, void*);
static void cb_window(Fl_Double_Window*, void*);
Fl_Choice *showChoice;
void cb_showChoice_i(Fl_Choice*, void*);
static void cb_showChoice(Fl_Choice*, void*);
Fl_Menu_Button *favoritesButton;
void cb_favoritesButton_i(Fl_Menu_Button*, void*);
static void cb_favoritesButton(Fl_Menu_Button*, void*);
public:
Fl_Button *newButton;
private:
void cb_newButton_i(Fl_Button*, void*);
static void cb_newButton(Fl_Button*, void*);
void cb__i(Fl_Tile*, void*);
static void cb_(Fl_Tile*, void*);
Fl_File_Browser *fileList;
void cb_fileList_i(Fl_File_Browser*, void*);
static void cb_fileList(Fl_File_Browser*, void*);
Fl_Box *previewBox;
public:
Fl_Check_Button *previewButton;
private:
void cb_previewButton_i(Fl_Check_Button*, void*);
static void cb_previewButton(Fl_Check_Button*, void*);
Fl_File_Input *fileName;
void cb_fileName_i(Fl_File_Input*, void*);
static void cb_fileName(Fl_File_Input*, void*);
Fl_Return_Button *okButton;
void cb_okButton_i(Fl_Return_Button*, void*);
static void cb_okButton(Fl_Return_Button*, void*);
Fl_Button *cancelButton;
void cb_cancelButton_i(Fl_Button*, void*);
static void cb_cancelButton(Fl_Button*, void*);
Fl_Double_Window *favWindow;
Fl_File_Browser *favList;
void cb_favList_i(Fl_File_Browser*, void*);
static void cb_favList(Fl_File_Browser*, void*);
Fl_Button *favUpButton;
void cb_favUpButton_i(Fl_Button*, void*);
static void cb_favUpButton(Fl_Button*, void*);
Fl_Button *favDeleteButton;
void cb_favDeleteButton_i(Fl_Button*, void*);
static void cb_favDeleteButton(Fl_Button*, void*);
Fl_Button *favDownButton;
void cb_favDownButton_i(Fl_Button*, void*);
static void cb_favDownButton(Fl_Button*, void*);
Fl_Button *favCancelButton;
void cb_favCancelButton_i(Fl_Button*, void*);
static void cb_favCancelButton(Fl_Button*, void*);
Fl_Return_Button *favOkButton;
void cb_favOkButton_i(Fl_Return_Button*, void*);
static void cb_favOkButton(Fl_Return_Button*, void*);
public:
~Fl_File_Chooser();
void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
void color(Fl_Color c);
Fl_Color color();
int count();
void directory(const char *d);
char * directory();
void filter(const char *p);
const char * filter();
int filter_value();
void filter_value(int f);
void hide();
void iconsize(uchar s);
uchar iconsize();
void label(const char *l);
const char * label();
void ok_label(const char *l);
const char * ok_label();
void preview(int e);
int preview() const { return previewButton->value(); };
void rescan();
void rescan_keep_filename();
void show();
int shown();
void textcolor(Fl_Color c);
Fl_Color textcolor();
void textfont(uchar f);
uchar textfont();
void textsize(uchar s);
uchar textsize();
void type(int t);
int type();
void * user_data() const;
void user_data(void *d);
const char *value(int f = 1);
void value(const char *filename);
int visible();
static const char *add_favorites_label;
static const char *all_files_label;
static const char *custom_filter_label;
static const char *existing_file_label;
static const char *favorites_label;
static const char *filename_label;
static const char *filesystems_label;
static const char *manage_favorites_label;
static const char *new_directory_label;
static const char *new_directory_tooltip;
static const char *preview_label;
static const char *save_label;
static const char *show_label;
static Fl_File_Sort_F *sort;
};
FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);
FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);
FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
FL_EXPORT void fl_file_chooser_ok_label(const char*l);
#endif
//
// End of "$Id: Fl_File_Chooser.H 5644 2007-01-28 19:41:56Z mike $".
//

View File

@@ -0,0 +1,115 @@
//
// "$Id: Fl_File_Icon.H 4288 2005-04-16 00:13:17Z mike $"
//
// Fl_File_Icon definitions.
//
// Copyright 1999-2005 by Michael Sweet.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
//
// Include necessary header files...
//
#ifndef _Fl_Fl_File_Icon_H_
# define _Fl_Fl_File_Icon_H_
# include "Fl.H"
//
// Special color value for the icon color.
//
# define FL_ICON_COLOR (Fl_Color)0xffffffff
//
// Fl_File_Icon class...
//
class FL_EXPORT Fl_File_Icon //// Icon data
{
static Fl_File_Icon *first_; // Pointer to first icon/filetype
Fl_File_Icon *next_; // Pointer to next icon/filetype
const char *pattern_; // Pattern string
int type_; // Match only if directory or file?
int num_data_; // Number of data elements
int alloc_data_; // Number of allocated elements
short *data_; // Icon data
public:
enum // File types
{
ANY, // Any kind of file
PLAIN, // Only plain files
FIFO, // Only named pipes
DEVICE, // Only character and block devices
LINK, // Only symbolic links
DIRECTORY // Only directories
};
enum // Data opcodes
{
END, // End of primitive/icon
COLOR, // Followed by color value (2 shorts)
LINE, // Start of line
CLOSEDLINE, // Start of closed line
POLYGON, // Start of polygon
OUTLINEPOLYGON, // Followed by outline color (2 shorts)
VERTEX // Followed by scaled X,Y
};
Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0);
~Fl_File_Icon();
short *add(short d);
short *add_color(Fl_Color c)
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
short *add_vertex(int x, int y)
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
short *add_vertex(float x, float y)
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
add((short)(y * 10000.0)); return (d); }
void clear() { num_data_ = 0; }
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
void label(Fl_Widget *w);
static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
void load(const char *f);
int load_fti(const char *fti);
int load_image(const char *i);
Fl_File_Icon *next() { return (next_); }
const char *pattern() { return (pattern_); }
int size() { return (num_data_); }
int type() { return (type_); }
short *value() { return (data_); }
static Fl_File_Icon *find(const char *filename, int filetype = ANY);
static Fl_File_Icon *first() { return (first_); }
static void load_system_icons(void);
};
#endif // !_Fl_Fl_File_Icon_H_
//
// End of "$Id: Fl_File_Icon.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,68 @@
//
// "$Id: Fl_File_Input.H 4288 2005-04-16 00:13:17Z mike $"
//
// File_Input header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
// Original version Copyright 1998 by Curtis Edwards.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_File_Input_H
# define Fl_File_Input_H
# include <FL/Fl_Input.H>
class FL_EXPORT Fl_File_Input : public Fl_Input
{
Fl_Color errorcolor_;
char ok_entry_;
uchar down_box_;
short buttons_[200];
short pressed_;
void draw_buttons();
int handle_button(int event);
void update_buttons();
public:
Fl_File_Input(int,int,int,int,const char *t=0);
virtual int handle(int);
virtual void draw();
Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
void down_box(Fl_Boxtype b) { down_box_ = b; }
Fl_Color errorcolor() const { return errorcolor_; }
void errorcolor(Fl_Color c) { errorcolor_ = c; }
int value(const char*);
int value(const char*, int);
const char *value() { return Fl_Input_::value(); }
};
#endif // !Fl_File_Input_H
//
// End of "$Id: Fl_File_Input.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Fill_Dial.H 4288 2005-04-16 00:13:17Z mike $"
//
// Filled dial header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Fill_Dial_H
#define Fl_Fill_Dial_H
#include "Fl_Dial.H"
class Fl_Fill_Dial : public Fl_Dial {
public:
Fl_Fill_Dial(int x,int y,int w,int h, const char *l = 0)
: Fl_Dial(x,y,w,h,l) {type(FL_FILL_DIAL);}
};
#endif
//
// End of "$Id: Fl_Fill_Dial.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// Filled slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Fill_Slider_H
#define Fl_Fill_Slider_H
#include "Fl_Slider.H"
class Fl_Fill_Slider : public Fl_Slider {
public:
Fl_Fill_Slider(int x,int y,int w,int h,const char *l=0)
: Fl_Slider(x,y,w,h,l) {type(FL_VERT_FILL_SLIDER);}
};
#endif
//
// End of "$Id: Fl_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Float_Input.H 4288 2005-04-16 00:13:17Z mike $"
//
// Floating point input header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Float_Input_H
#define Fl_Float_Input_H
#include "Fl_Input.H"
class Fl_Float_Input : public Fl_Input {
public:
Fl_Float_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_FLOAT_INPUT);}
};
#endif
//
// End of "$Id: Fl_Float_Input.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,48 @@
//
// "$Id: Fl_FormsBitmap.H 4288 2005-04-16 00:13:17Z mike $"
//
// Forms bitmap header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_FormsBitmap_H
#define Fl_FormsBitmap_H
#include "Fl_Bitmap.H"
class FL_EXPORT Fl_FormsBitmap : public Fl_Widget {
Fl_Bitmap *b;
protected:
void draw();
public:
Fl_FormsBitmap(Fl_Boxtype, int, int, int, int, const char * = 0);
void set(int W, int H, const uchar *bits);
void bitmap(Fl_Bitmap *B) {b = B;}
Fl_Bitmap *bitmap() const {return b;}
};
#endif
//
// End of "$Id: Fl_FormsBitmap.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,48 @@
//
// "$Id: Fl_FormsPixmap.H 4288 2005-04-16 00:13:17Z mike $"
//
// Forms pixmap header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_FormsPixmap_H
#define Fl_FormsPixmap_H
#include "Fl_Pixmap.H"
class FL_EXPORT Fl_FormsPixmap : public Fl_Widget {
Fl_Pixmap *b;
protected:
void draw();
public:
Fl_FormsPixmap(Fl_Boxtype, int, int, int, int, const char * = 0);
void set(/*const*/char * const * bits);
void Pixmap(Fl_Pixmap *B) {b = B;}
Fl_Pixmap *Pixmap() const {return b;}
};
#endif
//
// End of "$Id: Fl_FormsPixmap.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,66 @@
//
// "$Id: Fl_Free.H 4288 2005-04-16 00:13:17Z mike $"
//
// Forms free header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Free_H
#define Fl_Free_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
#define FL_NORMAL_FREE 1
#define FL_SLEEPING_FREE 2
#define FL_INPUT_FREE 3
#define FL_CONTINUOUS_FREE 4
#define FL_ALL_FREE 5
typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char);
class FL_EXPORT Fl_Free : public Fl_Widget {
FL_HANDLEPTR hfunc;
static void step(void *);
protected:
void draw();
public:
int handle(int);
Fl_Free(uchar t,int x,int y,int w,int h,const char *l,FL_HANDLEPTR hdl);
~Fl_Free();
};
// old event names for compatability:
#define FL_MOUSE FL_DRAG
#define FL_DRAW 100 // NOT USED
#define FL_STEP 101
#define FL_FREEMEM 102 // NOT USED
#define FL_FREEZE 103 // NOT USED
#define FL_THAW 104 // NOT USED
#endif
//
// End of "$Id: Fl_Free.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,111 @@
//
// "$Id: Fl_Group.H 5993 2007-12-15 16:42:00Z mike $"
//
// Group header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Group_H
#define Fl_Group_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
class FL_EXPORT Fl_Group : public Fl_Widget {
Fl_Widget** array_;
Fl_Widget* savedfocus_;
Fl_Widget* resizable_;
int children_;
short *sizes_; // remembered initial sizes of children
int navigation(int);
static Fl_Group *current_;
// unimplemented copy ctor and assignment operator
Fl_Group(const Fl_Group&);
Fl_Group& operator=(const Fl_Group&);
protected:
enum { CLIP_CHILDREN = 2048 };
void clip_children(int c) { if (c) set_flag(CLIP_CHILDREN); else clear_flag(CLIP_CHILDREN); }
int clip_children() { return (flags() & CLIP_CHILDREN) != 0; }
void draw();
void draw_child(Fl_Widget&) const;
void draw_children();
void draw_outside_label(const Fl_Widget&) const ;
void update_child(Fl_Widget&) const;
short* sizes();
public:
int handle(int);
void begin();
void end();
static Fl_Group *current();
static void current(Fl_Group *g);
int children() const {return children_;}
Fl_Widget* child(int n) const {return array()[n];}
int find(const Fl_Widget*) const;
int find(const Fl_Widget& o) const {return find(&o);}
Fl_Widget* const* array() const;
void resize(int,int,int,int);
Fl_Group(int,int,int,int, const char * = 0);
virtual ~Fl_Group();
void add(Fl_Widget&);
void add(Fl_Widget* o) {add(*o);}
void insert(Fl_Widget&, int i);
void insert(Fl_Widget& o, Fl_Widget* before) {insert(o,find(before));}
void remove(Fl_Widget&);
void remove(Fl_Widget* o) {remove(*o);}
void clear();
void resizable(Fl_Widget& o) {resizable_ = &o;}
void resizable(Fl_Widget* o) {resizable_ = o;}
Fl_Widget* resizable() const {return resizable_;}
void add_resizable(Fl_Widget& o) {resizable_ = &o; add(o);}
void init_sizes();
// back compatability function:
void focus(Fl_Widget* o) {o->take_focus();}
Fl_Widget* & _ddfdesign_kludge() {return resizable_;}
void forms_end();
};
// dummy class used to end child groups in constructors for complex
// subclasses of Fl_Group:
class FL_EXPORT Fl_End {
public:
Fl_End() {Fl_Group::current()->end();}
};
#endif
//
// End of "$Id: Fl_Group.H 5993 2007-12-15 16:42:00Z mike $".
//

View File

@@ -0,0 +1,92 @@
//
// "$Id: Fl_Help_Dialog.H 5643 2007-01-28 19:36:51Z mike $"
//
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0108
#ifndef Fl_Help_Dialog_H
#define Fl_Help_Dialog_H
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Help_View.H>
class FL_EXPORT Fl_Help_Dialog {
int index_;
int max_;
int line_[100];
char file_[100][256];
int find_pos_;
public:
Fl_Help_Dialog();
private:
Fl_Double_Window *window_;
Fl_Button *back_;
void cb_back__i(Fl_Button*, void*);
static void cb_back_(Fl_Button*, void*);
Fl_Button *forward_;
void cb_forward__i(Fl_Button*, void*);
static void cb_forward_(Fl_Button*, void*);
Fl_Button *smaller_;
void cb_smaller__i(Fl_Button*, void*);
static void cb_smaller_(Fl_Button*, void*);
Fl_Button *larger_;
void cb_larger__i(Fl_Button*, void*);
static void cb_larger_(Fl_Button*, void*);
Fl_Input *find_;
void cb_find__i(Fl_Input*, void*);
static void cb_find_(Fl_Input*, void*);
Fl_Help_View *view_;
void cb_view__i(Fl_Help_View*, void*);
static void cb_view_(Fl_Help_View*, void*);
public:
~Fl_Help_Dialog();
int h();
void hide();
void load(const char *f);
void position(int xx, int yy);
void resize(int xx, int yy, int ww, int hh);
void show();
void show(int argc, char **argv);
void textsize(uchar s);
uchar textsize();
void topline(const char *n);
void topline(int n);
void value(const char *f);
const char * value() const;
int visible();
int w();
int x();
int y();
};
#endif
//
// End of "$Id: Fl_Help_Dialog.H 5643 2007-01-28 19:36:51Z mike $".
//

View File

@@ -0,0 +1,221 @@
//
// "$Id: Fl_Help_View.H 5991 2007-12-15 16:08:23Z mike $"
//
// Help Viewer widget definitions.
//
// Copyright 1997-2005 by Easy Software Products.
// Image support donated by Matthias Melcher, Copyright 2000.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Help_View_H
# define Fl_Help_View_H
//
// Include necessary header files...
//
# include <stdio.h>
# include "Fl.H"
# include "Fl_Group.H"
# include "Fl_Scrollbar.H"
# include "fl_draw.H"
# include "Fl_Shared_Image.H"
//
// Fl_Help_Func type - link callback function for files...
//
typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *);
//
// Fl_Help_Block structure...
//
struct Fl_Help_Block
{
const char *start, // Start of text
*end; // End of text
uchar border; // Draw border?
Fl_Color bgcolor; // Background color
int x, // Indentation/starting X coordinate
y, // Starting Y coordinate
w, // Width
h; // Height
int line[32]; // Left starting position for each line
};
//
// Fl_Help_Link structure...
//
struct Fl_Help_Link
{
char filename[192], // Reference filename
name[32]; // Link target (blank if none)
int x, // X offset of link text
y, // Y offset of link text
w, // Width of link text
h; // Height of link text
};
//
// Fl_Help_Target structure...
//
struct Fl_Help_Target
{
char name[32]; // Target name
int y; // Y offset of target
};
//
// Fl_Help_View class...
//
class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
{
enum { RIGHT = -1, CENTER, LEFT }; // Alignments
char title_[1024]; // Title string
Fl_Color defcolor_, // Default text color
bgcolor_, // Background color
textcolor_, // Text color
linkcolor_; // Link color
uchar textfont_, // Default font for text
textsize_; // Default font size
const char *value_; // HTML text value
int nblocks_, // Number of blocks/paragraphs
ablocks_; // Allocated blocks
Fl_Help_Block *blocks_; // Blocks
int nfonts_; // Number of fonts in stack
uchar fonts_[100][2]; // Font stack
Fl_Help_Func *link_; // Link transform function
int nlinks_, // Number of links
alinks_; // Allocated links
Fl_Help_Link *links_; // Links
int ntargets_, // Number of targets
atargets_; // Allocated targets
Fl_Help_Target *targets_; // Targets
char directory_[1024]; // Directory for current file
char filename_[1024]; // Current filename
int topline_, // Top line in document
leftline_, // Lefthand position
size_, // Total document length
hsize_; // Maximum document width
Fl_Scrollbar scrollbar_, // Vertical scrollbar for document
hscrollbar_; // Horizontal scrollbar
static int selection_first;
static int selection_last;
static int selection_push_first;
static int selection_push_last;
static int selection_drag_first;
static int selection_drag_last;
static int selected;
static int draw_mode;
static int mouse_x;
static int mouse_y;
static int current_pos;
static Fl_Help_View *current_view;
static Fl_Color hv_selection_color;
static Fl_Color hv_selection_text_color;
Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
void add_link(const char *n, int xx, int yy, int ww, int hh);
void add_target(const char *n, int yy);
static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1);
int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l);
void draw();
void format();
void format_table(int *table_width, int *columns, const char *table);
void free_data();
int get_align(const char *p, int a);
const char *get_attr(const char *p, const char *n, char *buf, int bufsize);
Fl_Color get_color(const char *n, Fl_Color c);
Fl_Shared_Image *get_image(const char *name, int W, int H);
int get_length(const char *l);
int handle(int);
void initfont(uchar &f, uchar &s) { nfonts_ = 0;
fl_font(f = fonts_[0][0] = textfont_,
s = fonts_[0][1] = textsize_); }
void pushfont(uchar f, uchar s) { if (nfonts_ < 99) nfonts_ ++;
fl_font(fonts_[nfonts_][0] = f,
fonts_[nfonts_][1] = s); }
void popfont(uchar &f, uchar &s) { if (nfonts_ > 0) nfonts_ --;
fl_font(f = fonts_[nfonts_][0],
s = fonts_[nfonts_][1]); }
void hv_draw(const char *t, int x, int y);
char begin_selection();
char extend_selection();
void end_selection(int c=0);
void clear_global_selection();
Fl_Help_Link *find_link(int, int);
void follow_link(Fl_Help_Link*);
public:
Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0);
~Fl_Help_View();
const char *directory() const { if (directory_[0]) return (directory_);
else return ((const char *)0); }
const char *filename() const { if (filename_[0]) return (filename_);
else return ((const char *)0); }
int find(const char *s, int p = 0);
void link(Fl_Help_Func *fn) { link_ = fn; }
int load(const char *f);
void resize(int,int,int,int);
int size() const { return (size_); }
void size(int W, int H) { Fl_Widget::size(W, H); }
void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
Fl_Color textcolor() const { return (defcolor_); }
void textfont(uchar f) { textfont_ = f; format(); }
uchar textfont() const { return (textfont_); }
void textsize(uchar s) { textsize_ = s; format(); }
uchar textsize() const { return (textsize_); }
const char *title() { return (title_); }
void topline(const char *n);
void topline(int);
int topline() const { return (topline_); }
void leftline(int);
int leftline() const { return (leftline_); }
void value(const char *v);
const char *value() const { return (value_); }
void clear_selection();
void select_all();
};
#endif // !Fl_Help_View_H
//
// End of "$Id: Fl_Help_View.H 5991 2007-12-15 16:08:23Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Hold_Browser.H 4288 2005-04-16 00:13:17Z mike $"
//
// Hold browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Hold_Browser_H
#define Fl_Hold_Browser_H
#include "Fl_Browser.H"
class Fl_Hold_Browser : public Fl_Browser {
public:
Fl_Hold_Browser(int X,int Y,int W,int H,const char *l=0)
: Fl_Browser(X,Y,W,H,l) {type(FL_HOLD_BROWSER);}
};
#endif
//
// End of "$Id: Fl_Hold_Browser.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,42 @@
//
// "$Id: Fl_Hor_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// Horizontal fill slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Hor_Fill_Slider_H
#define Fl_Hor_Fill_Slider_H
#include "Fl_Slider.H"
class Fl_Hor_Fill_Slider : public Fl_Slider {
public:
Fl_Hor_Fill_Slider(int x,int y,int w,int h,const char *l=0)
: Fl_Slider(x,y,w,h,l) {type(FL_HOR_FILL_SLIDER);}
};
#endif
//
// End of "$Id: Fl_Hor_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Hor_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// Horizontal "nice" slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Hor_Nice_Slider_H
#define Fl_Hor_Nice_Slider_H
#include "Fl_Slider.H"
class Fl_Hor_Nice_Slider : public Fl_Slider {
public:
Fl_Hor_Nice_Slider(int x,int y,int w,int h,const char *l=0)
: Fl_Slider(x,y,w,h,l) {type(FL_HOR_NICE_SLIDER); box(FL_FLAT_BOX);}
};
#endif
//
// End of "$Id: Fl_Hor_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Hor_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// Horizontal slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Hor_Slider_H
#define Fl_Hor_Slider_H
#include "Fl_Slider.H"
class Fl_Hor_Slider : public Fl_Slider {
public:
Fl_Hor_Slider(int X,int Y,int W,int H,const char *l=0)
: Fl_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);}
};
#endif
//
// End of "$Id: Fl_Hor_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Hor_Value_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// Horizontal value slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Hor_Value_Slider_H
#define Fl_Hor_Value_Slider_H
#include "Fl_Value_Slider.H"
class Fl_Hor_Value_Slider : public Fl_Value_Slider {
public:
Fl_Hor_Value_Slider(int X,int Y,int W,int H,const char *l=0)
: Fl_Value_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);}
};
#endif
//
// End of "$Id: Fl_Hor_Value_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,112 @@
//
// "$Id: Fl_Image.H 4288 2005-04-16 00:13:17Z mike $"
//
// Image header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Image_H
# define Fl_Image_H
# include "Enumerations.H"
class Fl_Widget;
struct Fl_Menu_Item;
struct Fl_Label;
class FL_EXPORT Fl_Image {
int w_, h_, d_, ld_, count_;
const char * const *data_;
// Forbid use of copy contructor and assign operator
Fl_Image & operator=(const Fl_Image &);
Fl_Image(const Fl_Image &);
protected:
void w(int W) {w_ = W;}
void h(int H) {h_ = H;}
void d(int D) {d_ = D;}
void ld(int LD) {ld_ = LD;}
void data(const char * const *p, int c) {data_ = p; count_ = c;}
void draw_empty(int X, int Y);
static void labeltype(const Fl_Label *lo, int lx, int ly, int lw, int lh, Fl_Align la);
static void measure(const Fl_Label *lo, int &lw, int &lh);
public:
int w() const {return w_;}
int h() const {return h_;}
int d() const {return d_;}
int ld() const {return ld_;}
int count() const {return count_;}
const char * const *data() const {return data_;}
Fl_Image(int W, int H, int D) {w_ = W; h_ = H; d_ = D; ld_ = 0; count_ = 0; data_ = 0;}
virtual ~Fl_Image();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
virtual void color_average(Fl_Color c, float i);
void inactive() { color_average(FL_GRAY, .33f); }
virtual void desaturate();
virtual void label(Fl_Widget*w);
virtual void label(Fl_Menu_Item*m);
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
virtual void uncache();
};
class FL_EXPORT Fl_RGB_Image : public Fl_Image {
public:
const uchar *array;
int alloc_array; // Non-zero if array was allocated
#if defined(__APPLE__) || defined(WIN32)
void *id; // for internal use
void *mask; // for internal use (mask bitmap)
#else
unsigned id; // for internal use
unsigned mask; // for internal use (mask bitmap)
#endif // __APPLE__ || WIN32
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
Fl_Image(W,H,D), array(bits), alloc_array(0), id(0), mask(0) {data((const char **)&array, 1); ld(LD);}
virtual ~Fl_RGB_Image();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
virtual void color_average(Fl_Color c, float i);
virtual void desaturate();
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
virtual void label(Fl_Widget*w);
virtual void label(Fl_Menu_Item*m);
virtual void uncache();
};
#endif // !Fl_Image_H
//
// End of "$Id: Fl_Image.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,47 @@
//
// "$Id: Fl_Input.H 5300 2006-08-14 07:06:45Z matt $"
//
// Input header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Input_H
#define Fl_Input_H
#include "Fl_Input_.H"
class FL_EXPORT Fl_Input : public Fl_Input_ {
int handle_key();
int shift_position(int p);
int shift_up_down_position(int p);
public:
void draw();
int handle(int);
Fl_Input(int,int,int,int,const char * = 0);
};
#endif
//
// End of "$Id: Fl_Input.H 5300 2006-08-14 07:06:45Z matt $".
//

View File

@@ -0,0 +1,145 @@
//
// "$Id: Fl_Input_.H 4288 2005-04-16 00:13:17Z mike $"
//
// Input base class header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Input__H
#define Fl_Input__H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
#define FL_NORMAL_INPUT 0
#define FL_FLOAT_INPUT 1
#define FL_INT_INPUT 2
#define FL_HIDDEN_INPUT 3
#define FL_MULTILINE_INPUT 4
#define FL_SECRET_INPUT 5
#define FL_INPUT_TYPE 7
#define FL_INPUT_READONLY 8
#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY)
#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY)
#define FL_INPUT_WRAP 16
#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP)
#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP)
class FL_EXPORT Fl_Input_ : public Fl_Widget {
const char* value_;
char* buffer;
int size_;
int bufsize;
int position_;
int mark_;
int xscroll_, yscroll_;
int mu_p;
int maximum_size_;
uchar erase_cursor_only;
uchar textfont_;
uchar textsize_;
unsigned textcolor_;
unsigned cursor_color_;
const char* expand(const char*, char*) const;
double expandpos(const char*, const char*, const char*, int*) const;
void minimal_update(int, int);
void minimal_update(int p);
void put_in_buffer(int newsize);
void setfont() const;
protected:
int word_start(int i) const;
int word_end(int i) const;
int line_start(int i) const;
int line_end(int i) const;
void drawtext(int, int, int, int);
int up_down_position(int, int keepmark=0);
void handle_mouse(int, int, int, int, int keepmark=0);
int handletext(int e, int, int, int, int);
void maybe_do_callback();
int xscroll() const {return xscroll_;}
int yscroll() const {return yscroll_;}
public:
void resize(int, int, int, int);
Fl_Input_(int, int, int, int, const char* = 0);
~Fl_Input_();
int value(const char*);
int value(const char*, int);
int static_value(const char*);
int static_value(const char*, int);
const char* value() const {return value_;}
char index(int i) const {return value_[i];}
int size() const {return size_;}
void size(int W, int H) { Fl_Widget::size(W, H); }
int maximum_size() const {return maximum_size_;}
void maximum_size(int m) {maximum_size_ = m;}
int position() const {return position_;}
int mark() const {return mark_;}
int position(int p, int m);
int position(int p) {return position(p, p);}
int mark(int m) {return position(position(), m);}
int replace(int, int, const char*, int=0);
int cut() {return replace(position(), mark(), 0);}
int cut(int n) {return replace(position(), position()+n, 0);}
int cut(int a, int b) {return replace(a, b, 0);}
int insert(const char* t, int l=0){return replace(position_, mark_, t, l);}
int copy(int clipboard);
int undo();
int copy_cuts();
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
Fl_Color cursor_color() const {return (Fl_Color)cursor_color_;}
void cursor_color(unsigned n) {cursor_color_ = n;}
int input_type() const {return type() & FL_INPUT_TYPE; }
void input_type(int t) { type((uchar)(t | readonly())); }
int readonly() const { return type() & FL_INPUT_READONLY; }
void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY));
else type((uchar)(type() & ~FL_INPUT_READONLY)); }
int wrap() const { return type() & FL_INPUT_WRAP; }
void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP));
else type((uchar)(type() & ~FL_INPUT_WRAP)); }
};
#endif
//
// End of "$Id: Fl_Input_.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,199 @@
//
// "$Id$"
//
// An input/chooser widget.
// ______________ ____
// | || __ |
// | input area || \/ |
// |______________||____|
//
// Copyright 1998-2005 by Bill Spitzak and others.
// Copyright 2004 by Greg Ercolano.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Input_Choice_H
#define Fl_Input_Choice_H
#include <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Menu_Button.H>
#include <FL/fl_draw.H>
#include <string.h>
class Fl_Input_Choice : public Fl_Group {
// Private class to handle slightly 'special' behavior of menu button
class InputMenuButton : public Fl_Menu_Button {
void draw() {
draw_box(FL_UP_BOX, color());
fl_color(active_r() ? labelcolor() : fl_inactive(labelcolor()));
int xc = x()+w()/2, yc=y()+h()/2;
fl_polygon(xc-5,yc-3,xc+5,yc-3,xc,yc+3);
if (Fl::focus() == this) draw_focus();
}
public:
InputMenuButton(int x,int y,int w,int h,const char*l=0) :
Fl_Menu_Button(x,y,w,h,l) { box(FL_UP_BOX); }
};
Fl_Input *inp_;
InputMenuButton *menu_;
static void menu_cb(Fl_Widget*, void *data) {
Fl_Input_Choice *o=(Fl_Input_Choice *)data;
const Fl_Menu_Item *item = o->menubutton()->mvalue();
if (item && item->flags & (FL_SUBMENU|FL_SUBMENU_POINTER)) return; // ignore submenus
if (!strcmp(o->inp_->value(), o->menu_->text()))
{
o->Fl_Widget::clear_changed();
if (o->when() & FL_WHEN_NOT_CHANGED)
o->do_callback();
}
else
{
o->inp_->value(o->menu_->text());
o->inp_->set_changed();
o->Fl_Widget::set_changed();
if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE))
o->do_callback();
}
if (o->callback() != default_callback)
{
o->Fl_Widget::clear_changed();
o->inp_->clear_changed();
}
}
static void inp_cb(Fl_Widget*, void *data) {
Fl_Input_Choice *o=(Fl_Input_Choice *)data;
if (o->inp_->changed()) {
o->Fl_Widget::set_changed();
if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE))
o->do_callback();
} else {
o->Fl_Widget::clear_changed();
if (o->when() & FL_WHEN_NOT_CHANGED)
o->do_callback();
}
if (o->callback() != default_callback)
o->Fl_Widget::clear_changed();
}
// Custom resize behavior -- input stretches, menu button doesn't
inline int inp_x() { return(x() + Fl::box_dx(box())); }
inline int inp_y() { return(y() + Fl::box_dy(box())); }
inline int inp_w() { return(w() - Fl::box_dw(box()) - 20); }
inline int inp_h() { return(h() - Fl::box_dh(box())); }
inline int menu_x() { return(x() + w() - 20 - Fl::box_dx(box())); }
inline int menu_y() { return(y() + Fl::box_dy(box())); }
inline int menu_w() { return(20); }
inline int menu_h() { return(h() - Fl::box_dh(box())); }
public:
Fl_Input_Choice (int x,int y,int w,int h,const char*l=0) : Fl_Group(x,y,w,h,l) {
Fl_Group::box(FL_DOWN_BOX);
align(FL_ALIGN_LEFT); // default like Fl_Input
inp_ = new Fl_Input(inp_x(), inp_y(),
inp_w(), inp_h());
inp_->callback(inp_cb, (void*)this);
inp_->box(FL_FLAT_BOX); // cosmetic
inp_->when(FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED);
menu_ = new InputMenuButton(menu_x(), menu_y(),
menu_w(), menu_h());
menu_->callback(menu_cb, (void*)this);
menu_->box(FL_FLAT_BOX); // cosmetic
end();
}
void add(const char *s) {
menu_->add(s);
}
int changed() const {
return inp_->changed() | Fl_Widget::changed();
}
void clear_changed() {
inp_->clear_changed();
Fl_Widget::clear_changed();
}
void set_changed() {
inp_->set_changed();
// no need to call Fl_Widget::set_changed()
}
void clear() {
menu_->clear();
}
Fl_Boxtype down_box() const {
return (menu_->down_box());
}
void down_box(Fl_Boxtype b) {
menu_->down_box(b);
}
const Fl_Menu_Item *menu() {
return (menu_->menu());
}
void menu(const Fl_Menu_Item *m) {
menu_->menu(m);
}
void resize(int X, int Y, int W, int H) {
Fl_Group::resize(X,Y,W,H);
inp_->resize(inp_x(), inp_y(), inp_w(), inp_h());
menu_->resize(menu_x(), menu_y(), menu_w(), menu_h());
}
Fl_Color textcolor() const {
return (inp_->textcolor());
}
void textcolor(Fl_Color c) {
inp_->textcolor(c);
}
uchar textfont() const {
return (inp_->textfont());
}
void textfont(uchar f) {
inp_->textfont(f);
}
uchar textsize() const {
return (inp_->textsize());
}
void textsize(uchar s) {
inp_->textsize(s);
}
const char* value() const {
return (inp_->value());
}
void value(const char *val) {
inp_->value(val);
}
void value(int val) {
menu_->value(val);
inp_->value(menu_->text(val));
}
Fl_Menu_Button *menubutton() { return menu_; }
Fl_Input *input() { return inp_; }
};
#endif // !Fl_Input_Choice_H
//
// End of "$Id$".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Int_Input.H 4288 2005-04-16 00:13:17Z mike $"
//
// Integer input header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Int_Input_H
#define Fl_Int_Input_H
#include "Fl_Input.H"
class Fl_Int_Input : public Fl_Input {
public:
Fl_Int_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_INT_INPUT);}
};
#endif
//
// End of "$Id: Fl_Int_Input.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,45 @@
//
// "$Id: Fl_Light_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Lighted button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Light_Button_H
#define Fl_Light_Button_H
#include "Fl_Button.H"
class FL_EXPORT Fl_Light_Button : public Fl_Button {
protected:
virtual void draw();
public:
virtual int handle(int);
Fl_Light_Button(int x,int y,int w,int h,const char *l = 0);
};
#endif
//
// End of "$Id: Fl_Light_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Line_Dial.H 4288 2005-04-16 00:13:17Z mike $"
//
// Line dial header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Line_Dial_H
#define Fl_Line_Dial_H
#include "Fl_Dial.H"
class Fl_Line_Dial : public Fl_Dial {
public:
Fl_Line_Dial(int x,int y,int w,int h, const char *l = 0)
: Fl_Dial(x,y,w,h,l) {type(FL_LINE_DIAL);}
};
#endif
//
// End of "$Id: Fl_Line_Dial.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,33 @@
//
// "$Id: Fl_Menu.H 4288 2005-04-16 00:13:17Z mike $"
//
// Old menu header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// this include file is for back compatability only
#include "Fl_Menu_Item.H"
//
// End of "$Id: Fl_Menu.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,102 @@
//
// "$Id: Fl_Menu_.H 4288 2005-04-16 00:13:17Z mike $"
//
// Menu base class header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Menu__H
#define Fl_Menu__H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
#include "Fl_Menu_Item.H"
class FL_EXPORT Fl_Menu_ : public Fl_Widget {
Fl_Menu_Item *menu_;
const Fl_Menu_Item *value_;
protected:
uchar alloc;
uchar down_box_;
uchar textfont_;
uchar textsize_;
unsigned textcolor_;
public:
Fl_Menu_(int,int,int,int,const char * =0);
~Fl_Menu_();
int item_pathname(char *name, int namelen, const Fl_Menu_Item *finditem=0) const;
const Fl_Menu_Item* picked(const Fl_Menu_Item*);
const Fl_Menu_Item* find_item(const char *name);
const Fl_Menu_Item* test_shortcut() {return picked(menu()->test_shortcut());}
void global();
const Fl_Menu_Item *menu() const {return menu_;}
void menu(const Fl_Menu_Item *m);
void copy(const Fl_Menu_Item *m, void* user_data = 0);
int add(const char*, int shortcut, Fl_Callback*, void* = 0, int = 0);
int add(const char* a, const char* b, Fl_Callback* c,
void* d = 0, int e = 0) {return add(a,fl_old_shortcut(b),c,d,e);}
int size() const ;
void size(int W, int H) { Fl_Widget::size(W, H); }
void clear();
int add(const char *);
void replace(int,const char *);
void remove(int);
void shortcut(int i, int s) {menu_[i].shortcut(s);}
void mode(int i,int fl) {menu_[i].flags = fl;}
int mode(int i) const {return menu_[i].flags;}
const Fl_Menu_Item *mvalue() const {return value_;}
int value() const {return value_ ? (int)(value_-menu_) : -1;}
int value(const Fl_Menu_Item*);
int value(int i) {return value(menu_+i);}
const char *text() const {return value_ ? value_->text : 0;}
const char *text(int i) const {return menu_[i].text;}
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar c) {textfont_=c;}
uchar textsize() const {return textsize_;}
void textsize(uchar c) {textsize_=c;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned c) {textcolor_=c;}
Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;}
void down_box(Fl_Boxtype b) {down_box_ = b;}
// back compatability:
Fl_Color down_color() const {return selection_color();}
void down_color(unsigned c) {selection_color(c);}
};
#endif
//
// End of "$Id: Fl_Menu_.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,46 @@
//
// "$Id: Fl_Menu_Bar.H 4288 2005-04-16 00:13:17Z mike $"
//
// Menu bar header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Menu_Bar_H
#define Fl_Menu_Bar_H
#include "Fl_Menu_.H"
class FL_EXPORT Fl_Menu_Bar : public Fl_Menu_ {
protected:
void draw();
public:
int handle(int);
Fl_Menu_Bar(int X, int Y, int W, int H,const char *l=0)
: Fl_Menu_(X,Y,W,H,l) {}
};
#endif
//
// End of "$Id: Fl_Menu_Bar.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,48 @@
//
// "$Id: Fl_Menu_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Menu button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Menu_Button_H
#define Fl_Menu_Button_H
#include "Fl_Menu_.H"
class FL_EXPORT Fl_Menu_Button : public Fl_Menu_ {
protected:
void draw();
public:
// values for type:
enum {POPUP1 = 1, POPUP2, POPUP12, POPUP3, POPUP13, POPUP23, POPUP123};
int handle(int);
const Fl_Menu_Item* popup();
Fl_Menu_Button(int,int,int,int,const char * =0);
};
#endif
//
// End of "$Id: Fl_Menu_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,167 @@
//
// "$Id: Fl_Menu_Item.H 4288 2005-04-16 00:13:17Z mike $"
//
// Menu item header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Menu_Item_H
#define Fl_Menu_Item_H
# include "Fl_Widget.H"
# include "Fl_Image.H"
# if defined(__APPLE__) && defined(check)
# undef check
# endif
enum { // values for flags:
FL_MENU_INACTIVE = 1,
FL_MENU_TOGGLE= 2,
FL_MENU_VALUE = 4,
FL_MENU_RADIO = 8,
FL_MENU_INVISIBLE = 0x10,
FL_SUBMENU_POINTER = 0x20,
FL_SUBMENU = 0x40,
FL_MENU_DIVIDER = 0x80,
FL_MENU_HORIZONTAL = 0x100
};
extern FL_EXPORT int fl_old_shortcut(const char*);
class Fl_Menu_;
struct FL_EXPORT Fl_Menu_Item {
const char *text; // label()
int shortcut_;
Fl_Callback *callback_;
void *user_data_;
int flags;
uchar labeltype_;
uchar labelfont_;
uchar labelsize_;
unsigned labelcolor_;
// advance N items, skipping submenus:
const Fl_Menu_Item *next(int=1) const;
Fl_Menu_Item *next(int i=1) {
return (Fl_Menu_Item*)(((const Fl_Menu_Item*)this)->next(i));}
const Fl_Menu_Item *first() const { return next(0); }
Fl_Menu_Item *first() { return next(0); }
// methods on menu items:
const char* label() const {return text;}
void label(const char* a) {text=a;}
void label(Fl_Labeltype a,const char* b) {labeltype_ = a; text = b;}
Fl_Labeltype labeltype() const {return (Fl_Labeltype)labeltype_;}
void labeltype(Fl_Labeltype a) {labeltype_ = a;}
Fl_Color labelcolor() const {return (Fl_Color)labelcolor_;}
void labelcolor(unsigned a) {labelcolor_ = a;}
Fl_Font labelfont() const {return (Fl_Font)labelfont_;}
void labelfont(uchar a) {labelfont_ = a;}
uchar labelsize() const {return labelsize_;}
void labelsize(uchar a) {labelsize_ = a;}
Fl_Callback_p callback() const {return callback_;}
void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;}
void callback(Fl_Callback* c) {callback_=c;}
void callback(Fl_Callback0*c) {callback_=(Fl_Callback*)c;}
void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)p;}
void* user_data() const {return user_data_;}
void user_data(void* v) {user_data_ = v;}
long argument() const {return (long long)user_data_;}
void argument(long v) {user_data_ = (void*)v;}
int shortcut() const {return shortcut_;}
void shortcut(int s) {shortcut_ = s;}
int submenu() const {return flags&(FL_SUBMENU|FL_SUBMENU_POINTER);}
int checkbox() const {return flags&FL_MENU_TOGGLE;}
int radio() const {return flags&FL_MENU_RADIO;}
int value() const {return flags&FL_MENU_VALUE;}
void set() {flags |= FL_MENU_VALUE;}
void clear() {flags &= ~FL_MENU_VALUE;}
void setonly();
int visible() const {return !(flags&FL_MENU_INVISIBLE);}
void show() {flags &= ~FL_MENU_INVISIBLE;}
void hide() {flags |= FL_MENU_INVISIBLE;}
int active() const {return !(flags&FL_MENU_INACTIVE);}
void activate() {flags &= ~FL_MENU_INACTIVE;}
void deactivate() {flags |= FL_MENU_INACTIVE;}
int activevisible() const {return !(flags&0x11);}
// compatibility for FLUID so it can set the image of a menu item...
void image(Fl_Image* a) {a->label(this);}
void image(Fl_Image& a) {a.label(this);}
// used by menubar:
int measure(int* h, const Fl_Menu_*) const;
void draw(int x, int y, int w, int h, const Fl_Menu_*, int t=0) const;
// popup menus without using an Fl_Menu_ widget:
const Fl_Menu_Item* popup(
int X, int Y,
const char *title = 0,
const Fl_Menu_Item* picked=0,
const Fl_Menu_* = 0) const;
const Fl_Menu_Item* pulldown(
int X, int Y, int W, int H,
const Fl_Menu_Item* picked = 0,
const Fl_Menu_* = 0,
const Fl_Menu_Item* title = 0,
int menubar=0) const;
const Fl_Menu_Item* test_shortcut() const;
const Fl_Menu_Item* find_shortcut(int *ip=0) const;
void do_callback(Fl_Widget* o) const {callback_(o, user_data_);}
void do_callback(Fl_Widget* o,void* arg) const {callback_(o, arg);}
void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);}
// back-compatability, do not use:
int checked() const {return flags&FL_MENU_VALUE;}
void check() {flags |= FL_MENU_VALUE;}
void uncheck() {flags &= ~FL_MENU_VALUE;}
int add(const char*, int shortcut, Fl_Callback*, void* =0, int = 0);
int add(const char*a, const char* b, Fl_Callback* c,
void* d = 0, int e = 0) {
return add(a,fl_old_shortcut(b),c,d,e);}
int size() const ;
};
typedef Fl_Menu_Item Fl_Menu; // back compatability
enum { // back-compatability enum:
FL_PUP_NONE = 0,
FL_PUP_GREY = FL_MENU_INACTIVE,
FL_PUP_GRAY = FL_MENU_INACTIVE,
FL_MENU_BOX = FL_MENU_TOGGLE,
FL_PUP_BOX = FL_MENU_TOGGLE,
FL_MENU_CHECK = FL_MENU_VALUE,
FL_PUP_CHECK = FL_MENU_VALUE,
FL_PUP_RADIO = FL_MENU_RADIO,
FL_PUP_INVISIBLE = FL_MENU_INVISIBLE,
FL_PUP_SUBMENU = FL_SUBMENU_POINTER
};
#endif
//
// End of "$Id: Fl_Menu_Item.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,54 @@
//
// "$Id: Fl_Menu_Window.H 4288 2005-04-16 00:13:17Z mike $"
//
// Menu window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Menu_Window_H
#define Fl_Menu_Window_H
#include "Fl_Single_Window.H"
class FL_EXPORT Fl_Menu_Window : public Fl_Single_Window {
enum {NO_OVERLAY = 128};
public:
void show();
void erase();
void flush();
void hide();
int overlay() {return !(flags()&NO_OVERLAY);}
void set_overlay() {clear_flag(NO_OVERLAY);}
void clear_overlay() {set_flag(NO_OVERLAY);}
~Fl_Menu_Window();
Fl_Menu_Window(int W, int H, const char *l = 0)
: Fl_Single_Window(W,H,l) { image(0); }
Fl_Menu_Window(int X, int Y, int W, int H, const char *l = 0)
: Fl_Single_Window(X,Y,W,H,l) { image(0); }
};
#endif
//
// End of "$Id: Fl_Menu_Window.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Multi_Browser.H 4288 2005-04-16 00:13:17Z mike $"
//
// Multi browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Multi_Browser_H
#define Fl_Multi_Browser_H
#include "Fl_Browser.H"
class Fl_Multi_Browser : public Fl_Browser {
public:
Fl_Multi_Browser(int X,int Y,int W,int H,const char *L=0)
: Fl_Browser(X,Y,W,H,L) {type(FL_MULTI_BROWSER);}
};
#endif
//
// End of "$Id: Fl_Multi_Browser.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,47 @@
//
// "$Id: Fl_Multi_Label.H 4288 2005-04-16 00:13:17Z mike $"
//
// Multi-label header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Multi_Label_H
#define Fl_Multi_Label_H
class Fl_Widget;
struct Fl_Menu_Item;
struct FL_EXPORT Fl_Multi_Label {
const char* labela;
const char* labelb;
uchar typea;
uchar typeb;
void label(Fl_Widget*);
void label(Fl_Menu_Item*);
};
#endif
//
// End of "$Id: Fl_Multi_Label.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Multiline_Input.H 4288 2005-04-16 00:13:17Z mike $"
//
// Multiline input header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Multiline_Input_H
#define Fl_Multiline_Input_H
#include "Fl_Input.H"
class Fl_Multiline_Input : public Fl_Input {
public:
Fl_Multiline_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_MULTILINE_INPUT);}
};
#endif
//
// End of "$Id: Fl_Multiline_Input.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Multiline_Output.H 4288 2005-04-16 00:13:17Z mike $"
//
// Multi line output header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Multiline_Output_H
#define Fl_Multiline_Output_H
#include "Fl_Output.H"
class Fl_Multiline_Output : public Fl_Output {
public:
Fl_Multiline_Output(int X,int Y,int W,int H,const char *l = 0)
: Fl_Output(X,Y,W,H,l) {type(FL_MULTILINE_OUTPUT);}
};
#endif
//
// End of "$Id: Fl_Multiline_Output.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,42 @@
//
// "$Id: Fl_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// "Nice" slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Nice_Slider_H
#define Fl_Nice_Slider_H
#include "Fl_Slider.H"
class Fl_Nice_Slider : public Fl_Slider {
public:
Fl_Nice_Slider(int x,int y,int w,int h,const char *l=0)
: Fl_Slider(x,y,w,h,l) {type(FL_VERT_NICE_SLIDER); box(FL_FLAT_BOX);}
};
#endif
//
// End of "$Id: Fl_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,36 @@
//
// "$Id: Fl_Object.H 4288 2005-04-16 00:13:17Z mike $"
//
// Old Fl_Object header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// This file is provided for back compatability only. Please use Fl_Widget
#ifndef Fl_Object
#define Fl_Object Fl_Widget
#endif
#include "Fl_Widget.H"
//
// End of "$Id: Fl_Object.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Output.H 4288 2005-04-16 00:13:17Z mike $"
//
// Output header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Output_H
#define Fl_Output_H
#include "Fl_Input.H"
class Fl_Output : public Fl_Input {
public:
Fl_Output(int X,int Y,int W,int H, const char *l = 0)
: Fl_Input(X, Y, W, H, l) {type(FL_NORMAL_OUTPUT);}
};
#endif
//
// End of "$Id: Fl_Output.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,56 @@
//
// "$Id: Fl_Overlay_Window.H 4288 2005-04-16 00:13:17Z mike $"
//
// Overlay window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Overlay_Window_H
#define Fl_Overlay_Window_H
#include "Fl_Double_Window.H"
class FL_EXPORT Fl_Overlay_Window : public Fl_Double_Window {
friend class _Fl_Overlay;
virtual void draw_overlay() = 0;
Fl_Window *overlay_;
public:
void show();
void flush();
void hide();
void resize(int,int,int,int);
~Fl_Overlay_Window();
int can_do_overlay();
void redraw_overlay();
Fl_Overlay_Window(int W, int H, const char *l=0)
: Fl_Double_Window(W,H,l) {overlay_ = 0; force_doublebuffering_=1; image(0); }
Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0)
: Fl_Double_Window(X,Y,W,H,l) {overlay_ = 0; force_doublebuffering_=1; image(0); }
void show(int a, char **b) {Fl_Double_Window::show(a,b);}
};
#endif
//
// End of "$Id: Fl_Overlay_Window.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,51 @@
//
// "$Id: Fl_Pack.H 4288 2005-04-16 00:13:17Z mike $"
//
// Pack header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Pack_H
#define Fl_Pack_H
#include <FL/Fl_Group.H>
class FL_EXPORT Fl_Pack : public Fl_Group {
int spacing_;
public:
enum { // values for type(int)
VERTICAL = 0,
HORIZONTAL = 1
};
void draw();
Fl_Pack(int x,int y,int w ,int h,const char *l = 0);
int spacing() const {return spacing_;}
void spacing(int i) {spacing_ = i;}
uchar horizontal() const {return type();}
};
#endif
//
// End of "$Id: Fl_Pack.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,80 @@
//
// "$Id: Fl_Pixmap.H 4288 2005-04-16 00:13:17Z mike $"
//
// Pixmap header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Pixmap_H
#define Fl_Pixmap_H
# include "Fl_Image.H"
class Fl_Widget;
struct Fl_Menu_Item;
// Older C++ compilers don't support the explicit keyword... :(
# if defined(__sgi) && !defined(_COMPILER_VERSION)
# define explicit
# endif // __sgi && !_COMPILER_VERSION
class FL_EXPORT Fl_Pixmap : public Fl_Image {
void copy_data();
void delete_data();
void set_data(const char * const *p);
protected:
void measure();
public:
int alloc_data; // Non-zero if data was allocated
#if defined(__APPLE__) || defined(WIN32)
void *id; // for internal use
void *mask; // for internal use (mask bitmap)
#else
unsigned id; // for internal use
unsigned mask; // for internal use (mask bitmap)
#endif // __APPLE__ || WIN32
explicit Fl_Pixmap(char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
explicit Fl_Pixmap(uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
explicit Fl_Pixmap(const char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
explicit Fl_Pixmap(const uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();}
virtual ~Fl_Pixmap();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
virtual void color_average(Fl_Color c, float i);
virtual void desaturate();
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
virtual void label(Fl_Widget*w);
virtual void label(Fl_Menu_Item*m);
virtual void uncache();
};
#endif
//
// End of "$Id: Fl_Pixmap.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,77 @@
//
// "$Id: Fl_Positioner.H 4288 2005-04-16 00:13:17Z mike $"
//
// Positioner header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Positioner_H
#define Fl_Positioner_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
class FL_EXPORT Fl_Positioner : public Fl_Widget {
double xmin, ymin;
double xmax, ymax;
double xvalue_, yvalue_;
double xstep_, ystep_;
protected:
// these allow subclasses to put the dial in a smaller area:
void draw(int, int, int, int);
int handle(int, int, int, int, int);
void draw();
public:
int handle(int);
Fl_Positioner(int x,int y,int w,int h, const char *l=0);
double xvalue() const {return xvalue_;}
double yvalue() const {return yvalue_;}
int xvalue(double);
int yvalue(double);
int value(double,double);
void xbounds(double, double);
double xminimum() const {return xmin;}
void xminimum(double a) {xbounds(a,xmax);}
double xmaximum() const {return xmax;}
void xmaximum(double a) {xbounds(xmin,a);}
void ybounds(double, double);
double yminimum() const {return ymin;}
void yminimum(double a) {ybounds(a,ymax);}
double ymaximum() const {return ymax;}
void ymaximum(double a) {ybounds(ymin,a);}
void xstep(double a) {xstep_ = a;}
void ystep(double a) {ystep_ = a;}
};
#endif
//
// End of "$Id: Fl_Positioner.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,171 @@
//
// "$Id: Fl_Preferences.H 5330 2006-08-18 07:29:09Z matt $"
//
// Preferences definitions for the Fast Light Tool Kit (FLTK).
//
// Copyright 2002-2005 by Matthias Melcher.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Preferences_H
# define Fl_Preferences_H
# ifdef WIN32
# include <windows.h>
# endif // WIN32
# include <stdio.h>
# include "Fl_Export.H"
/**
* Preferences are a data tree containing a root, branches and leafs
*/
class FL_EXPORT Fl_Preferences
{
public:
enum Root { SYSTEM=0, USER };
// enum Type { win32, macos, fltk };
Fl_Preferences( Root root, const char *vendor, const char *application );
Fl_Preferences( const char *path, const char *vendor, const char *application );
Fl_Preferences( Fl_Preferences&, const char *group );
Fl_Preferences( Fl_Preferences*, const char *group );
~Fl_Preferences();
int groups();
const char *group( int );
char groupExists( const char *group );
char deleteGroup( const char *group );
int entries();
const char *entry( int );
char entryExists( const char *entry );
char deleteEntry( const char *entry );
char set( const char *entry, int value );
char set( const char *entry, float value );
char set( const char *entry, float value, int precision );
char set( const char *entry, double value );
char set( const char *entry, double value, int precision );
char set( const char *entry, const char *value );
char set( const char *entry, const void *value, int size );
char get( const char *entry, int &value, int defaultValue );
char get( const char *entry, float &value, float defaultValue );
char get( const char *entry, double &value, double defaultValue );
char get( const char *entry, char *&value, const char *defaultValue );
char get( const char *entry, char *value, const char *defaultValue, int maxSize );
char get( const char *entry, void *&value, const void *defaultValue, int defaultSize );
char get( const char *entry, void *value, const void *defaultValue, int defaultSize, int maxSize );
int size( const char *entry );
char getUserdataPath( char *path, int pathlen );
void flush();
// char export( const char *filename, Type fileFormat );
// char import( const char *filename );
class FL_EXPORT Name {
char *data_;
public:
Name( unsigned int n );
Name( const char *format, ... );
operator const char *() { return data_; }
~Name();
};
struct Entry
{
char *name, *value;
};
private:
// make the following functions unavailable
Fl_Preferences();
Fl_Preferences(const Fl_Preferences&);
Fl_Preferences &operator=(const Fl_Preferences&);
static char nameBuffer[128];
class FL_EXPORT Node // a node contains a list to all its entries
{ // and all means to manage the tree structure
Node *child_, *next_, *parent_;
char *path_;
char dirty_;
public:
Node( const char *path );
~Node();
// node methods
int write( FILE *f );
Node *find( const char *path );
Node *search( const char *path, int offset=0 );
Node *addChild( const char *path );
void setParent( Node *parent );
Node *parent() { return parent_; }
char remove();
char dirty();
// entry methods
int nChildren();
const char *child( int ix );
void set( const char *name, const char *value );
void set( const char *line );
void add( const char *line );
const char *get( const char *name );
int getEntry( const char *name );
char deleteEntry( const char *name );
// public values
Entry *entry;
int nEntry, NEntry;
static int lastEntrySet;
};
friend class Node;
class FL_EXPORT RootNode // the root node manages file paths and basic reading and writing
{
Fl_Preferences *prefs_;
char *filename_;
char *vendor_, *application_;
public:
RootNode( Fl_Preferences *, Root root, const char *vendor, const char *application );
RootNode( Fl_Preferences *, const char *path, const char *vendor, const char *application );
~RootNode();
int read();
int write();
char getPath( char *path, int pathlen );
};
friend class RootNode;
Node *node;
RootNode *rootNode;
};
#endif // !Fl_Preferences_H
//
// End of "$Id: Fl_Preferences.H 5330 2006-08-18 07:29:09Z matt $".
//

View File

@@ -0,0 +1,70 @@
//
// "$Id: Fl_Progress.H 4288 2005-04-16 00:13:17Z mike $"
//
// Progress bar widget definitions.
//
// Copyright 2000-2005 by Michael Sweet.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef _Fl_Progress_H_
# define _Fl_Progress_H_
//
// Include necessary headers.
//
#include "Fl_Widget.H"
//
// Progress class...
//
class FL_EXPORT Fl_Progress : public Fl_Widget
{
float value_,
minimum_,
maximum_;
protected:
virtual void draw();
public:
Fl_Progress(int x, int y, int w, int h, const char *l = 0);
void maximum(float v) { maximum_ = v; redraw(); }
float maximum() const { return (maximum_); }
void minimum(float v) { minimum_ = v; redraw(); }
float minimum() const { return (minimum_); }
void value(float v) { value_ = v; redraw(); }
float value() const { return (value_); }
};
#endif // !_Fl_Progress_H_
//
// End of "$Id: Fl_Progress.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Radio_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Radio button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Radio_Button_H
#define Fl_Radio_Button_H
#include "Fl_Button.H"
class Fl_Radio_Button : public Fl_Button {
public:
Fl_Radio_Button(int x,int y,int w,int h,const char *l=0)
: Fl_Button(x,y,w,h,l) {type(FL_RADIO_BUTTON);}
};
#endif
//
// End of "$Id: Fl_Radio_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,42 @@
//
// "$Id: Fl_Radio_Light_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Radio light button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Radio_Light_Button_H
#define Fl_Radio_Light_Button_H
#include "Fl_Light_Button.H"
class Fl_Radio_Light_Button : public Fl_Light_Button {
public:
Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Light_Button(X,Y,W,H,l) {type(FL_RADIO_BUTTON);}
};
#endif
//
// End of "$Id: Fl_Radio_Light_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Radio_Round_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Radio round button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Radio_Round_Button_H
#define Fl_Radio_Round_Button_H
#include "Fl_Round_Button.H"
class Fl_Radio_Round_Button : public Fl_Round_Button {
public:
Fl_Radio_Round_Button(int x,int y,int w,int h,const char *l=0)
: Fl_Round_Button(x,y,w,h,l) {type(FL_RADIO_BUTTON);}
};
#endif
//
// End of "$Id: Fl_Radio_Round_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,49 @@
//
// "$Id: Fl_Repeat_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Repeat button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Repeat_Button_H
#define Fl_Repeat_Button_H
#include "Fl.H"
#include "Fl_Button.H"
class FL_EXPORT Fl_Repeat_Button : public Fl_Button {
static void repeat_callback(void *);
public:
int handle(int);
Fl_Repeat_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {}
void deactivate() {
Fl::remove_timeout(repeat_callback,this);
Fl_Button::deactivate();
}
};
#endif
//
// End of "$Id: Fl_Repeat_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,45 @@
//
// "$Id: Fl_Return_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Return button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Return_Button_H
#define Fl_Return_Button_H
#include "Fl_Button.H"
class FL_EXPORT Fl_Return_Button : public Fl_Button {
protected:
void draw();
public:
int handle(int);
Fl_Return_Button(int X, int Y, int W, int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {}
};
#endif
//
// End of "$Id: Fl_Return_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,47 @@
//
// "$Id: Fl_Roller.H 4288 2005-04-16 00:13:17Z mike $"
//
// Roller header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Roller_H
#define Fl_Roller_H
#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif
class FL_EXPORT Fl_Roller : public Fl_Valuator {
protected:
void draw();
public:
int handle(int);
Fl_Roller(int X,int Y,int W,int H,const char* L=0);
};
#endif
//
// End of "$Id: Fl_Roller.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,42 @@
//
// "$Id: Fl_Round_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Round button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Round_Button_H
#define Fl_Round_Button_H
#include "Fl_Light_Button.H"
class FL_EXPORT Fl_Round_Button : public Fl_Light_Button {
public:
Fl_Round_Button(int x,int y,int w,int h,const char *l = 0);
};
#endif
//
// End of "$Id: Fl_Round_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Round_Clock.H 4288 2005-04-16 00:13:17Z mike $"
//
// Round clock header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Round_Clock_H
#define Fl_Round_Clock_H
#include "Fl_Clock.H"
class Fl_Round_Clock : public Fl_Clock {
public:
Fl_Round_Clock(int x,int y,int w,int h, const char *l = 0)
: Fl_Clock(x,y,w,h,l) {type(FL_ROUND_CLOCK); box(FL_NO_BOX);}
};
#endif
//
// End of "$Id: Fl_Round_Clock.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,79 @@
//
// "$Id: Fl_Scroll.H 5618 2007-01-18 19:23:24Z matt $"
//
// Scroll header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Scroll_H
#define Fl_Scroll_H
#include "Fl_Group.H"
#include "Fl_Scrollbar.H"
class FL_EXPORT Fl_Scroll : public Fl_Group {
int xposition_, yposition_;
int width_, height_;
int oldx, oldy;
static void hscrollbar_cb(Fl_Widget*, void*);
static void scrollbar_cb(Fl_Widget*, void*);
void fix_scrollbar_order();
static void draw_clip(void*,int,int,int,int);
protected:
void bbox(int&,int&,int&,int&);
void draw();
public:
Fl_Scrollbar scrollbar;
Fl_Scrollbar hscrollbar;
void resize(int,int,int,int);
int handle(int);
Fl_Scroll(int X,int Y,int W,int H,const char*l=0);
enum { // values for type()
HORIZONTAL = 1,
VERTICAL = 2,
BOTH = 3,
ALWAYS_ON = 4,
HORIZONTAL_ALWAYS = 5,
VERTICAL_ALWAYS = 6,
BOTH_ALWAYS = 7
};
int xposition() const {return xposition_;}
int yposition() const {return yposition_;}
void position(int, int);
void clear();
};
#endif
//
// End of "$Id: Fl_Scroll.H 5618 2007-01-18 19:23:24Z matt $".
//

View File

@@ -0,0 +1,61 @@
//
// "$Id: Fl_Scrollbar.H 6042 2008-02-25 13:00:53Z matt $"
//
// Scroll bar header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Scrollbar_H
#define Fl_Scrollbar_H
#include "Fl_Slider.H"
class FL_EXPORT Fl_Scrollbar : public Fl_Slider {
int linesize_;
int pushed_;
static void timeout_cb(void*);
void increment_cb();
protected:
void draw();
public:
Fl_Scrollbar(int x,int y,int w,int h, const char *l = 0);
~Fl_Scrollbar();
int handle(int);
int value() {return int(Fl_Slider::value());}
int value(int p, int s, int top, int total) {
return scrollvalue(p, s, top, total);
}
int linesize() const {return linesize_;}
void linesize(int i) {linesize_ = i;}
};
#endif
//
// End of "$Id: Fl_Scrollbar.H 6042 2008-02-25 13:00:53Z matt $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Secret_Input.H 4288 2005-04-16 00:13:17Z mike $"
//
// Secret input header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Secret_Input_H
#define Fl_Secret_Input_H
#include "Fl_Input.H"
class Fl_Secret_Input : public Fl_Input {
public:
Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0)
: Fl_Input(X,Y,W,H,l) {type(FL_SECRET_INPUT);}
};
#endif
//
// End of "$Id: Fl_Secret_Input.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Select_Browser.H 4288 2005-04-16 00:13:17Z mike $"
//
// Select browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Select_Browser_H
#define Fl_Select_Browser_H
#include "Fl_Browser.H"
class Fl_Select_Browser : public Fl_Browser {
public:
Fl_Select_Browser(int X,int Y,int W,int H,const char *l=0)
: Fl_Browser(X,Y,W,H,l) {type(FL_SELECT_BROWSER);}
};
#endif
//
// End of "$Id: Fl_Select_Browser.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,99 @@
//
// "$Id: Fl_Shared_Image.H 4288 2005-04-16 00:13:17Z mike $"
//
// Shared image header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Shared_Image_H
# define Fl_Shared_Image_H
# include "Fl_Image.H"
// Test function for adding new formats
typedef Fl_Image *(*Fl_Shared_Handler)(const char *name, uchar *header,
int headerlen);
// Shared images class.
class FL_EXPORT Fl_Shared_Image : public Fl_Image {
protected:
static Fl_Shared_Image **images_; // Shared images
static int num_images_; // Number of shared images
static int alloc_images_; // Allocated shared images
static Fl_Shared_Handler *handlers_; // Additional format handlers
static int num_handlers_; // Number of format handlers
static int alloc_handlers_; // Allocated format handlers
const char *name_; // Name of image file
int original_; // Original image?
int refcount_; // Number of times this image has been used
Fl_Image *image_; // The image that is shared
int alloc_image_; // Was the image allocated?
static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1);
// Use get() and release() to load/delete images in memory...
Fl_Shared_Image();
Fl_Shared_Image(const char *n, Fl_Image *img = 0);
virtual ~Fl_Shared_Image();
void add();
void update();
public:
const char *name() { return name_; }
int refcount() { return refcount_; }
void release();
void reload();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
virtual void color_average(Fl_Color c, float i);
virtual void desaturate();
virtual void draw(int X, int Y, int W, int H, int cx, int cy);
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
virtual void uncache();
static Fl_Shared_Image *find(const char *n, int W = 0, int H = 0);
static Fl_Shared_Image *get(const char *n, int W = 0, int H = 0);
static Fl_Shared_Image **images();
static int num_images();
static void add_handler(Fl_Shared_Handler f);
static void remove_handler(Fl_Shared_Handler f);
};
//
// The following function is provided in the fltk_images library and
// registers all of the "extra" image file formats that are not part
// of the core FLTK library...
//
FL_EXPORT extern void fl_register_images();
#endif // !Fl_Shared_Image_H
//
// End of "$Id: Fl_Shared_Image.H 4288 2005-04-16 00:13:17Z mike $"
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Simple_Counter.H 4288 2005-04-16 00:13:17Z mike $"
//
// Simple counter header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Simple_Counter_H
#define Fl_Simple_Counter_H
#include "Fl_Counter.H"
class Fl_Simple_Counter : public Fl_Counter {
public:
Fl_Simple_Counter(int x,int y,int w,int h, const char *l = 0)
: Fl_Counter(x,y,w,h,l) {type(FL_SIMPLE_COUNTER);}
};
#endif
//
// End of "$Id: Fl_Simple_Counter.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,49 @@
//
// "$Id: Fl_Single_Window.H 4288 2005-04-16 00:13:17Z mike $"
//
// Single-buffered window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Single_Window_H
#define Fl_Single_Window_H
#include "Fl_Window.H"
class FL_EXPORT Fl_Single_Window : public Fl_Window {
public:
void show();
void show(int a, char **b) {Fl_Window::show(a,b);}
void flush();
Fl_Single_Window(int W, int H, const char *l=0)
: Fl_Window(W,H,l) {}
Fl_Single_Window(int X, int Y, int W, int H, const char *l=0)
: Fl_Window(X,Y,W,H,l) {}
int make_current();
};
#endif
//
// End of "$Id: Fl_Single_Window.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,75 @@
//
// "$Id: Fl_Slider.H 4288 2005-04-16 00:13:17Z mike $"
//
// Slider header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Slider_H
#define Fl_Slider_H
#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif
// values for type(), lowest bit indicate horizontal:
#define FL_VERT_SLIDER 0
#define FL_HOR_SLIDER 1
#define FL_VERT_FILL_SLIDER 2
#define FL_HOR_FILL_SLIDER 3
#define FL_VERT_NICE_SLIDER 4
#define FL_HOR_NICE_SLIDER 5
class FL_EXPORT Fl_Slider : public Fl_Valuator {
float slider_size_;
uchar slider_;
void _Fl_Slider();
void draw_bg(int, int, int, int);
protected:
// these allow subclasses to put the slider in a smaller area:
void draw(int, int, int, int);
int handle(int, int, int, int, int);
public:
void draw();
int handle(int);
Fl_Slider(int x,int y,int w,int h, const char *l = 0);
Fl_Slider(uchar t,int x,int y,int w,int h, const char *l);
int scrollvalue(int windowtop,int windowsize,int first,int totalsize);
void bounds(double a, double b);
float slider_size() const {return slider_size_;}
void slider_size(double v);
Fl_Boxtype slider() const {return (Fl_Boxtype)slider_;}
void slider(Fl_Boxtype c) {slider_ = c;}
};
#endif
//
// End of "$Id: Fl_Slider.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,224 @@
//
// "$Id$"
//
// Spinner widget for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2006 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Spinner_H
# define Fl_Spinner_H
//
// Include necessary headers...
//
# include <FL/Enumerations.H>
# include <FL/Fl_Group.H>
# include <FL/Fl_Input.H>
# include <FL/Fl_Repeat_Button.H>
# include <stdio.h>
# include <stdlib.h>
//
// Fl_Spinner widget class...
//
class Fl_Spinner : public Fl_Group
{
double value_; // Current value
double minimum_; // Minimum value
double maximum_; // Maximum value
double step_; // Amount to add/subtract for up/down
const char *format_; // Format string
Fl_Input input_; // Input field for the value
Fl_Repeat_Button
up_button_, // Up button
down_button_; // Down button
static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) {
double v; // New value
if (w == &(sb->input_)) {
// Something changed in the input field...
v = atof(sb->input_.value());
if (v < sb->minimum_) {
sb->value_ = sb->minimum_;
sb->update();
} else if (v > sb->maximum_) {
sb->value_ = sb->maximum_;
sb->update();
} else sb->value_ = v;
} else if (w == &(sb->up_button_)) {
// Up button pressed...
v = sb->value_ + sb->step_;
if (v > sb->maximum_) sb->value_ = sb->minimum_;
else sb->value_ = v;
sb->update();
} else if (w == &(sb->down_button_)) {
// Down button pressed...
v = sb->value_ - sb->step_;
if (v < sb->minimum_) sb->value_ = sb->maximum_;
else sb->value_ = v;
sb->update();
}
sb->do_callback();
}
void update() {
char s[255]; // Value string
if (format_[0]=='%'&&format_[1]=='.'&&format_[2]=='*') { // precision argument
// this code block is a simplified version of
// Fl_Valuator::format() and works well (but looks ugly)
int c = 0;
char temp[64], *sp = temp;
sprintf(temp, "%.12f", step_);
while (*sp) sp++;
sp--;
while (sp>temp && *sp=='0') sp--;
while (sp>temp && (*sp>='0' && *sp<='9')) { sp--; c++; }
sprintf(s, format_, c, value_);
} else {
sprintf(s, format_, value_);
}
input_.value(s);
}
public:
Fl_Spinner(int X, int Y, int W, int H, const char *L = 0)
: Fl_Group(X, Y, W, H, L),
input_(X, Y, W - H / 2 - 2, H),
up_button_(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2, "@-42<"),
down_button_(X + W - H / 2 - 2, Y + H - H / 2,
H / 2 + 2, H / 2, "@-42>") {
end();
value_ = 1.0;
minimum_ = 1.0;
maximum_ = 100.0;
step_ = 1.0;
format_ = "%g";
align(FL_ALIGN_LEFT);
input_.value("1");
input_.type(FL_INT_INPUT);
input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE);
input_.callback((Fl_Callback *)sb_cb, this);
up_button_.callback((Fl_Callback *)sb_cb, this);
down_button_.callback((Fl_Callback *)sb_cb, this);
}
const char *format() { return (format_); }
void format(const char *f) { format_ = f; update(); }
int handle(int event) {
switch (event) {
case FL_KEYDOWN :
case FL_SHORTCUT :
if (Fl::event_key() == FL_Up) {
up_button_.do_callback();
return 1;
} else if (Fl::event_key() == FL_Down) {
down_button_.do_callback();
return 1;
} else return 0;
case FL_FOCUS :
if (input_.take_focus()) return 1;
else return 0;
}
return Fl_Group::handle(event);
}
// Speling mistaks retained for source compatibility...
double maxinum() const { return (maximum_); }
double maximum() const { return (maximum_); }
void maximum(double m) { maximum_ = m; }
double mininum() const { return (minimum_); }
double minimum() const { return (minimum_); }
void minimum(double m) { minimum_ = m; }
void range(double a, double b) { minimum_ = a; maximum_ = b; }
void resize(int X, int Y, int W, int H) {
Fl_Group::resize(X,Y,W,H);
input_.resize(X, Y, W - H / 2 - 2, H);
up_button_.resize(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2);
down_button_.resize(X + W - H / 2 - 2, Y + H - H / 2,
H / 2 + 2, H / 2);
}
double step() const { return (step_); }
void step(double s) {
step_ = s;
if (step_ != (int)step_) input_.type(FL_FLOAT_INPUT);
else input_.type(FL_INT_INPUT);
update();
}
Fl_Color textcolor() const {
return (input_.textcolor());
}
void textcolor(Fl_Color c) {
input_.textcolor(c);
}
uchar textfont() const {
return (input_.textfont());
}
void textfont(uchar f) {
input_.textfont(f);
}
uchar textsize() const {
return (input_.textsize());
}
void textsize(uchar s) {
input_.textsize(s);
}
uchar type() const { return (input_.type()); }
void type(uchar v) {
if (v==FL_FLOAT_INPUT) {
format("%.*f");
} else {
format("%.0f");
}
input_.type(v);
}
double value() const { return (value_); }
void value(double v) { value_ = v; update(); }
};
#endif // !Fl_Spinner_H
//
// End of "$Id$".
//

View File

@@ -0,0 +1,56 @@
//
// "$Id: Fl_Sys_Menu_Bar.H 4546 2005-08-29 20:05:38Z matt $"
//
// MacOS system menu bar header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Sys_Menu_Bar_H
#define Fl_Sys_Menu_Bar_H
#include "Fl_Menu_Bar.H"
#ifdef __APPLE__
class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar {
protected:
void draw();
public:
Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0)
: Fl_Menu_Bar(x,y,w,h,l) {
deactivate(); // don't let the old area take events
}
void menu(const Fl_Menu_Item *m);
};
#else
typedef Fl_Menu_Bar Fl_Sys_Menu_Bar;
#endif
#endif
//
// End of "$Id: Fl_Sys_Menu_Bar.H 4546 2005-08-29 20:05:38Z matt $".
//

View File

@@ -0,0 +1,57 @@
//
// "$Id: Fl_Tabs.H 5326 2006-08-17 13:43:07Z matt $"
//
// Tab header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Tabs_H
#define Fl_Tabs_H
#include "Fl_Group.H"
class FL_EXPORT Fl_Tabs : public Fl_Group {
Fl_Widget *value_;
Fl_Widget *push_;
int tab_positions(int*, int*);
int tab_height();
void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
protected:
void redraw_tabs();
void draw();
public:
int handle(int);
Fl_Widget *value();
int value(Fl_Widget *);
Fl_Widget *push() const {return push_;}
int push(Fl_Widget *);
Fl_Tabs(int,int,int,int,const char * = 0);
Fl_Widget *which(int event_x, int event_y);
};
#endif
//
// End of "$Id: Fl_Tabs.H 5326 2006-08-17 13:43:07Z matt $".
//

View File

@@ -0,0 +1,263 @@
//
// "$Id: Fl_Text_Buffer.H 6010 2008-01-04 20:31:52Z matt $"
//
// Header file for Fl_Text_Buffer class.
//
// Copyright 2001-2005 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
// the LGPL for the FLTK library granted by Mark Edel.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef FL_TEXT_BUFFER_H
#define FL_TEXT_BUFFER_H
/* Maximum length in characters of a tab or control character expansion
of a single buffer character */
#define FL_TEXT_MAX_EXP_CHAR_LEN 20
#include "Fl_Export.H"
class FL_EXPORT Fl_Text_Selection {
friend class Fl_Text_Buffer;
public:
void set(int start, int end);
void set_rectangular(int start, int end, int rectStart, int rectEnd);
void update(int pos, int nDeleted, int nInserted);
char rectangular() { return mRectangular; }
int start() { return mStart; }
int end() { return mEnd; }
int rect_start() { return mRectStart; }
int rect_end() { return mRectEnd; }
char selected() { return mSelected; }
void selected(char b) { mSelected = b; }
int includes(int pos, int lineStartPos, int dispIndex);
int position(int* start, int* end);
int position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd);
protected:
char mSelected;
char mRectangular;
int mStart;
int mEnd;
int mRectStart;
int mRectEnd;
};
typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted,
int nRestyled, const char* deletedText,
void* cbArg);
typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg);
class FL_EXPORT Fl_Text_Buffer {
public:
Fl_Text_Buffer(int requestedSize = 0);
~Fl_Text_Buffer();
int length() { return mLength; }
char* text();
void text(const char* text);
char* text_range(int start, int end);
char character(int pos);
char* text_in_rectangle(int start, int end, int rectStart, int rectEnd);
void insert(int pos, const char* text);
void append(const char* t) { insert(length(), t); }
void remove(int start, int end);
void replace(int start, int end, const char *text);
void copy(Fl_Text_Buffer* fromBuf, int fromStart, int fromEnd, int toPos);
int undo(int *cp=0);
void canUndo(char flag=1);
int insertfile(const char *file, int pos, int buflen = 128*1024);
int appendfile(const char *file, int buflen = 128*1024)
{ return insertfile(file, length(), buflen); }
int loadfile(const char *file, int buflen = 128*1024)
{ select(0, length()); remove_selection(); return appendfile(file, buflen); }
int outputfile(const char *file, int start, int end, int buflen = 128*1024);
int savefile(const char *file, int buflen = 128*1024)
{ return outputfile(file, 0, length(), buflen); }
void insert_column(int column, int startPos, const char* text,
int* charsInserted, int* charsDeleted);
void replace_rectangular(int start, int end, int rectStart, int rectEnd,
const char* text);
void overlay_rectangular(int startPos, int rectStart, int rectEnd,
const char* text, int* charsInserted,
int* charsDeleted);
void remove_rectangular(int start, int end, int rectStart, int rectEnd);
void clear_rectangular(int start, int end, int rectStart, int rectEnd);
int tab_distance() { return mTabDist; }
void tab_distance(int tabDist);
void select(int start, int end);
int selected() { return mPrimary.selected(); }
void unselect();
void select_rectangular(int start, int end, int rectStart, int rectEnd);
int selection_position(int* start, int* end);
int selection_position(int* start, int* end, int* isRect, int* rectStart,
int* rectEnd);
char* selection_text();
void remove_selection();
void replace_selection(const char* text);
void secondary_select(int start, int end);
int secondary_selected() { return mSecondary.selected(); }
void secondary_unselect();
void secondary_select_rectangular(int start, int end, int rectStart,
int rectEnd);
int secondary_selection_position(int* start, int* end);
int secondary_selection_position(int* start, int* end, int* isRect,
int* rectStart, int* rectEnd);
char* secondary_selection_text();
void remove_secondary_selection();
void replace_secondary_selection(const char* text);
void highlight(int start, int end);
int highlight() { return mHighlight.selected(); }
void unhighlight();
void highlight_rectangular(int start, int end, int rectStart, int rectEnd);
int highlight_position(int* start, int* end);
int highlight_position(int* start, int* end, int* isRect, int* rectStart,
int* rectEnd);
char* highlight_text();
void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg);
void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg);
void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); }
void add_predelete_callback(Fl_Text_Predelete_Cb bufPredelCB, void* cbArg);
void remove_predelete_callback(Fl_Text_Predelete_Cb predelCB, void* cbArg);
void call_predelete_callbacks() { call_predelete_callbacks(0, 0); }
char* line_text(int pos);
int line_start(int pos);
int line_end(int pos);
int word_start(int pos);
int word_end(int pos);
int expand_character(int pos, int indent, char *outStr);
static int expand_character(char c, int indent, char* outStr, int tabDist,
char nullSubsChar);
static int character_width(char c, int indent, int tabDist, char nullSubsChar);
int count_displayed_characters(int lineStartPos, int targetPos);
int skip_displayed_characters(int lineStartPos, int nChars);
int count_lines(int startPos, int endPos);
int skip_lines(int startPos, int nLines);
int rewind_lines(int startPos, int nLines);
int findchar_forward(int startPos, char searchChar, int* foundPos);
int findchar_backward(int startPos, char searchChar, int* foundPos);
int findchars_forward(int startPos, const char* searchChars, int* foundPos);
int findchars_backward(int startPos, const char* searchChars, int* foundPos);
int search_forward(int startPos, const char* searchString, int* foundPos,
int matchCase = 0);
int search_backward(int startPos, const char* searchString, int* foundPos,
int matchCase = 0);
int substitute_null_characters(char* string, int length);
void unsubstitute_null_characters(char* string);
char null_substitution_character() { return mNullSubsChar; }
Fl_Text_Selection* primary_selection() { return &mPrimary; }
Fl_Text_Selection* secondary_selection() { return &mSecondary; }
Fl_Text_Selection* highlight_selection() { return &mHighlight; }
protected:
void call_modify_callbacks(int pos, int nDeleted, int nInserted,
int nRestyled, const char* deletedText);
void call_predelete_callbacks(int pos, int nDeleted);
int insert_(int pos, const char* text);
void remove_(int start, int end);
void remove_rectangular_(int start, int end, int rectStart, int rectEnd,
int* replaceLen, int* endPos);
void insert_column_(int column, int startPos, const char* insText,
int* nDeleted, int* nInserted, int* endPos);
void overlay_rectangular_(int startPos, int rectStart, int rectEnd,
const char* insText, int* nDeleted,
int* nInserted, int* endPos);
void redisplay_selection(Fl_Text_Selection* oldSelection,
Fl_Text_Selection* newSelection);
void move_gap(int pos);
void reallocate_with_gap(int newGapStart, int newGapLen);
char* selection_text_(Fl_Text_Selection* sel);
void remove_selection_(Fl_Text_Selection* sel);
void replace_selection_(Fl_Text_Selection* sel, const char* text);
void rectangular_selection_boundaries(int lineStartPos, int rectStart,
int rectEnd, int* selStart,
int* selEnd);
void update_selections(int pos, int nDeleted, int nInserted);
Fl_Text_Selection mPrimary; /* highlighted areas */
Fl_Text_Selection mSecondary;
Fl_Text_Selection mHighlight;
int mLength; /* length of the text in the buffer (the length
of the buffer itself must be calculated:
gapEnd - gapStart + length) */
char* mBuf; /* allocated memory where the text is stored */
int mGapStart; /* points to the first character of the gap */
int mGapEnd; /* points to the first char after the gap */
// The hardware tab distance used by all displays for this buffer,
// and used in computing offsets for rectangular selection operations.
int mTabDist; /* equiv. number of characters in a tab */
int mUseTabs; /* True if buffer routines are allowed to use
tabs for padding in rectangular operations */
int mNModifyProcs; /* number of modify-redisplay procs attached */
Fl_Text_Modify_Cb* /* procedures to call when buffer is */
mNodifyProcs; /* modified to redisplay contents */
void** mCbArgs; /* caller arguments for modifyProcs above */
int mNPredeleteProcs; /* number of pre-delete procs attached */
Fl_Text_Predelete_Cb* /* procedure to call before text is deleted */
mPredeleteProcs; /* from the buffer; at most one is supported. */
void **mPredeleteCbArgs; /* caller argument for pre-delete proc above */
int mCursorPosHint; /* hint for reasonable cursor position after
a buffer modification operation */
char mNullSubsChar; /* NEdit is based on C null-terminated strings,
so ascii-nul characters must be substituted
with something else. This is the else, but
of course, things get quite messy when you
use it */
char mCanUndo; /* if this buffer is used for attributes, it must
not do any undo calls */
};
#endif
//
// End of "$Id: Fl_Text_Buffer.H 6010 2008-01-04 20:31:52Z matt $".
//

View File

@@ -0,0 +1,298 @@
//
// "$Id: Fl_Text_Display.H 4502 2005-08-10 23:11:51Z matt $"
//
// Header file for Fl_Text_Display class.
//
// Copyright 2001-2005 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
// the LGPL for the FLTK library granted by Mark Edel.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef FL_TEXT_DISPLAY_H
#define FL_TEXT_DISPLAY_H
#include "fl_draw.H"
#include "Fl_Group.H"
#include "Fl_Widget.H"
#include "Fl_Scrollbar.H"
#include "Fl_Text_Buffer.H"
class FL_EXPORT Fl_Text_Display: public Fl_Group {
public:
enum {
NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR,
BLOCK_CURSOR, HEAVY_CURSOR
};
enum {
CURSOR_POS, CHARACTER_POS
};
// drag types- they match Fl::event_clicks() so that single clicking to
// start a collection selects by character, double clicking selects by
// word and triple clicking selects by line.
enum {
DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2
};
friend void fl_text_drag_me(int pos, Fl_Text_Display* d);
typedef void (*Unfinished_Style_Cb)(int, void *);
// style attributes - currently not implemented!
enum {
ATTR_NONE = 0,
ATTR_UNDERLINE = 1,
ATTR_HIDDEN = 2
};
struct Style_Table_Entry {
Fl_Color color;
Fl_Font font;
int size;
unsigned attr;
};
Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0);
~Fl_Text_Display();
virtual int handle(int e);
void buffer(Fl_Text_Buffer* buf);
void buffer(Fl_Text_Buffer& buf) { buffer(&buf); }
Fl_Text_Buffer* buffer() { return mBuffer; }
void redisplay_range(int start, int end);
void scroll(int topLineNum, int horizOffset);
void insert(const char* text);
void overstrike(const char* text);
void insert_position(int newPos);
int insert_position() { return mCursorPos; }
int in_selection(int x, int y);
void show_insert_position();
int move_right();
int move_left();
int move_up();
int move_down();
int count_lines(int start, int end, bool start_pos_is_line_start);
int line_start(int pos);
int line_end(int pos, bool start_pos_is_line_start);
int skip_lines(int startPos, int nLines, bool startPosIsLineStart);
int rewind_lines(int startPos, int nLines);
void next_word(void);
void previous_word(void);
void show_cursor(int b = 1);
void hide_cursor() { show_cursor(0); }
void cursor_style(int style);
Fl_Color cursor_color() const {return mCursor_color;}
void cursor_color(Fl_Color n) {mCursor_color = n;}
int scrollbar_width() { return scrollbar_width_; }
Fl_Align scrollbar_align() { return scrollbar_align_; }
void scrollbar_width(int W) { scrollbar_width_ = W; }
void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; }
int word_start(int pos) { return buffer()->word_start(pos); }
int word_end(int pos) { return buffer()->word_end(pos); }
void highlight_data(Fl_Text_Buffer *styleBuffer,
const Style_Table_Entry *styleTable,
int nStyles, char unfinishedStyle,
Unfinished_Style_Cb unfinishedHighlightCB,
void *cbArg);
int position_style(int lineStartPos, int lineLen, int lineIndex,
int dispIndex);
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned n) {textcolor_ = n;}
int wrapped_column(int row, int column);
int wrapped_row(int row);
void wrap_mode(int wrap, int wrap_margin);
virtual void resize(int X, int Y, int W, int H);
protected:
// Most (all?) of this stuff should only be called from resize() or
// draw().
// Anything with "vline" indicates thats it deals with currently
// visible lines.
virtual void draw();
void draw_text(int X, int Y, int W, int H);
void draw_range(int start, int end);
void draw_cursor(int, int);
void draw_string(int style, int x, int y, int toX, const char *string,
int nChars);
void draw_vline(int visLineNum, int leftClip, int rightClip,
int leftCharIndex, int rightCharIndex);
void draw_line_numbers(bool clearAll);
void clear_rect(int style, int x, int y, int width, int height);
void display_insert();
void offset_line_starts(int newTopLineNum);
void calc_line_starts(int startLine, int endLine);
void update_line_starts(int pos, int charsInserted, int charsDeleted,
int linesInserted, int linesDeleted, int *scrolled);
void calc_last_char();
int position_to_line( int pos, int* lineNum );
int string_width(const char* string, int length, int style);
static void scroll_timer_cb(void*);
static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg);
static void buffer_modified_cb(int pos, int nInserted, int nDeleted,
int nRestyled, const char* deletedText,
void* cbArg);
static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display* d);
static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display* d);
void update_v_scrollbar();
void update_h_scrollbar();
int measure_vline(int visLineNum);
int longest_vline();
int empty_vlines();
int vline_length(int visLineNum);
int xy_to_position(int x, int y, int PosType = CHARACTER_POS);
void xy_to_rowcol(int x, int y, int* row, int* column,
int PosType = CHARACTER_POS);
int position_to_xy(int pos, int* x, int* y);
void maintain_absolute_top_line_number(int state);
int get_absolute_top_line_number();
void absolute_top_line_number(int oldFirstChar);
int maintaining_absolute_top_line_number();
void reset_absolute_top_line_number();
int position_to_linecol(int pos, int* lineNum, int* column);
void scroll_(int topLineNum, int horizOffset);
void extend_range_for_styles(int* start, int* end);
void find_wrap_range(const char *deletedText, int pos, int nInserted,
int nDeleted, int *modRangeStart, int *modRangeEnd,
int *linesInserted, int *linesDeleted);
void measure_deleted_lines(int pos, int nDeleted);
void wrapped_line_counter(Fl_Text_Buffer *buf, int startPos, int maxPos,
int maxLines, bool startPosIsLineStart,
int styleBufOffset, int *retPos, int *retLines,
int *retLineStart, int *retLineEnd,
bool countLastLineMissingNewLine = true);
void find_line_end(int pos, bool start_pos_is_line_start, int *lineEnd,
int *nextLineStart);
int measure_proportional_character(char c, int colNum, int pos);
int wrap_uses_character(int lineEndPos);
int range_touches_selection(Fl_Text_Selection *sel, int rangeStart,
int rangeEnd);
int damage_range1_start, damage_range1_end;
int damage_range2_start, damage_range2_end;
int mCursorPos;
int mCursorOn;
int mCursorOldY; /* Y pos. of cursor for blanking */
int mCursorToHint; /* Tells the buffer modified callback
where to move the cursor, to reduce
the number of redraw calls */
int mCursorStyle; /* One of enum cursorStyles above */
int mCursorPreferredCol; /* Column for vert. cursor movement */
int mNVisibleLines; /* # of visible (displayed) lines */
int mNBufferLines; /* # of newlines in the buffer */
Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */
Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing
color and font information */
int mFirstChar, mLastChar; /* Buffer positions of first and last
displayed character (lastChar points
either to a newline or one character
beyond the end of the buffer) */
int mContinuousWrap; /* Wrap long lines when displaying */
int mWrapMargin; /* Margin in # of char positions for
wrapping in continuousWrap mode */
int* mLineStarts;
int mTopLineNum; /* Line number of top displayed line
of file (first line of file is 1) */
int mAbsTopLineNum; /* In continuous wrap mode, the line
number of the top line if the text
were not wrapped (note that this is
only maintained as needed). */
int mNeedAbsTopLineNum; /* Externally settable flag to continue
maintaining absTopLineNum even if
it isn't needed for line # display */
int mHorizOffset; /* Horizontal scroll pos. in pixels */
int mTopLineNumHint; /* Line number of top displayed line
of file (first line of file is 1) */
int mHorizOffsetHint; /* Horizontal scroll pos. in pixels */
int mNStyles; /* Number of entries in styleTable */
const Style_Table_Entry *mStyleTable; /* Table of fonts and colors for
coloring/syntax-highlighting */
char mUnfinishedStyle; /* Style buffer entry which triggers
on-the-fly reparsing of region */
Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */
/* regions */
void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */
int mMaxsize;
int mFixedFontWidth; /* Font width if all current fonts are
fixed and match in width, else -1 */
int mSuppressResync; /* Suppress resynchronization of line
starts during buffer updates */
int mNLinesDeleted; /* Number of lines deleted during
buffer modification (only used
when resynchronization is suppressed) */
int mModifyingTabDistance; /* Whether tab distance is being
modified */
Fl_Color mCursor_color;
Fl_Scrollbar* mHScrollBar;
Fl_Scrollbar* mVScrollBar;
int scrollbar_width_;
Fl_Align scrollbar_align_;
int dragPos, dragType, dragging;
int display_insert_position_hint;
struct { int x, y, w, h; } text_area;
uchar textfont_;
uchar textsize_;
unsigned textcolor_;
// The following are not presently used from the original NEdit code,
// but are being put here so that future versions of Fl_Text_Display
// can implement line numbers without breaking binary compatibility.
int mLineNumLeft, mLineNumWidth;
/* Line number margin and width */
};
#endif
//
// End of "$Id: Fl_Text_Display.H 4502 2005-08-10 23:11:51Z matt $".
//

View File

@@ -0,0 +1,110 @@
//
// "$Id: Fl_Text_Editor.H 4288 2005-04-16 00:13:17Z mike $"
//
// Header file for Fl_Text_Editor class.
//
// Copyright 2001-2005 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
// the LGPL for the FLTK library granted by Mark Edel.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef FL_TEXT_EDITOR_H
#define FL_TEXT_EDITOR_H
#include "Fl_Text_Display.H"
// key will match in any state
#define FL_TEXT_EDITOR_ANY_STATE (-1L)
class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
public:
typedef int (*Key_Func)(int key, Fl_Text_Editor* editor);
struct Key_Binding {
int key;
int state;
Key_Func function;
Key_Binding* next;
};
Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0);
~Fl_Text_Editor() { remove_all_key_bindings(); }
virtual int handle(int e);
void insert_mode(int b) { insert_mode_ = b; }
int insert_mode() { return insert_mode_; }
void add_key_binding(int key, int state, Key_Func f, Key_Binding** list);
void add_key_binding(int key, int state, Key_Func f)
{ add_key_binding(key, state, f, &key_bindings); }
void remove_key_binding(int key, int state, Key_Binding** list);
void remove_key_binding(int key, int state)
{ remove_key_binding(key, state, &key_bindings); }
void remove_all_key_bindings(Key_Binding** list);
void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); }
void add_default_key_bindings(Key_Binding** list);
Key_Func bound_key_function(int key, int state, Key_Binding* list);
Key_Func bound_key_function(int key, int state)
{ return bound_key_function(key, state, key_bindings); }
void default_key_function(Key_Func f) { default_key_function_ = f; }
// functions for the built in default bindings
static int kf_default(int c, Fl_Text_Editor* e);
static int kf_ignore(int c, Fl_Text_Editor* e);
static int kf_backspace(int c, Fl_Text_Editor* e);
static int kf_enter(int c, Fl_Text_Editor* e);
static int kf_move(int c, Fl_Text_Editor* e);
static int kf_shift_move(int c, Fl_Text_Editor* e);
static int kf_ctrl_move(int c, Fl_Text_Editor* e);
static int kf_c_s_move(int c, Fl_Text_Editor* e);
static int kf_home(int, Fl_Text_Editor* e);
static int kf_end(int c, Fl_Text_Editor* e);
static int kf_left(int c, Fl_Text_Editor* e);
static int kf_up(int c, Fl_Text_Editor* e);
static int kf_right(int c, Fl_Text_Editor* e);
static int kf_down(int c, Fl_Text_Editor* e);
static int kf_page_up(int c, Fl_Text_Editor* e);
static int kf_page_down(int c, Fl_Text_Editor* e);
static int kf_insert(int c, Fl_Text_Editor* e);
static int kf_delete(int c, Fl_Text_Editor* e);
static int kf_copy(int c, Fl_Text_Editor* e);
static int kf_cut(int c, Fl_Text_Editor* e);
static int kf_paste(int c, Fl_Text_Editor* e);
static int kf_select_all(int c, Fl_Text_Editor* e);
static int kf_undo(int c, Fl_Text_Editor* e);
protected:
int handle_key();
void maybe_do_callback();
int insert_mode_;
Key_Binding* key_bindings;
static Key_Binding* global_key_bindings;
Key_Func default_key_function_;
};
#endif
//
// End of "$Id: Fl_Text_Editor.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,45 @@
//
// "$Id: Fl_Tile.H 4288 2005-04-16 00:13:17Z mike $"
//
// Tile header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Tile_H
#define Fl_Tile_H
#include "Fl_Group.H"
class FL_EXPORT Fl_Tile : public Fl_Group {
public:
int handle(int);
Fl_Tile(int X,int Y,int W,int H,const char*l=0) : Fl_Group(X,Y,W,H,l) {}
void resize(int, int, int, int);
void position(int, int, int, int);
};
#endif
//
// End of "$Id: Fl_Tile.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,59 @@
//
// "$Id: Fl_Tiled_Image.H 4288 2005-04-16 00:13:17Z mike $"
//
// Tiled image header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Tiled_Image_H
# define Fl_Tiled_Image_H
# include "Fl_Image.H"
// Tiled image class.
class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
protected:
Fl_Image *image_; // The image that is shared
int alloc_image_; // Did we allocate this image?
public:
Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0);
virtual ~Fl_Tiled_Image();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
virtual void color_average(Fl_Color c, float i);
virtual void desaturate();
virtual void draw(int X, int Y, int W, int H, int cx, int cy);
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
Fl_Image *image() { return image_; }
};
#endif // !Fl_Tiled_Image_H
//
// End of "$Id: Fl_Tiled_Image.H 4288 2005-04-16 00:13:17Z mike $"
//

View File

@@ -0,0 +1,65 @@
//
// "$Id: Fl_Timer.H 4288 2005-04-16 00:13:17Z mike $"
//
// Timer header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Timer_H
#define Fl_Timer_H
#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif
// values for type():
#define FL_NORMAL_TIMER 0
#define FL_VALUE_TIMER 1
#define FL_HIDDEN_TIMER 2
class FL_EXPORT Fl_Timer : public Fl_Widget {
static void stepcb(void *);
void step();
char on, direction_;
double delay, total;
long lastsec,lastusec;
protected:
void draw();
public:
int handle(int);
Fl_Timer(uchar t,int x,int y,int w,int h, const char *l);
~Fl_Timer();
void value(double);
double value() const {return delay>0.0?delay:0.0;}
char direction() const {return direction_;}
void direction(char d) {direction_ = d;}
char suspended() const {return !on;}
void suspended(char d);
};
#endif
//
// End of "$Id: Fl_Timer.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,43 @@
//
// "$Id: Fl_Toggle_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Toggle button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
#ifndef Fl_Toggle_Button_H
#define Fl_Toggle_Button_H
#include "Fl_Button.H"
class Fl_Toggle_Button : public Fl_Button {
public:
Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0)
: Fl_Button(X,Y,W,H,l) {type(FL_TOGGLE_BUTTON);}
};
#endif
//
// End of "$Id: Fl_Toggle_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,37 @@
//
// "$Id: Fl_Toggle_Light_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Toggle light button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// provided for back-compatability only
#ifndef Fl_Toggle_Light_Button
#include "Fl_Light_Button.H"
#define Fl_Toggle_Light_Button Fl_Light_Button
#endif
//
// End of "$Id: Fl_Toggle_Light_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

View File

@@ -0,0 +1,37 @@
//
// "$Id: Fl_Toggle_Round_Button.H 4288 2005-04-16 00:13:17Z mike $"
//
// Toggle round button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// provided for back-compatability only
#ifndef Fl_Toggle_Round_Button
#include "Fl_Round_Button.H"
#define Fl_Toggle_Round_Button Fl_Round_Button
#endif
//
// End of "$Id: Fl_Toggle_Round_Button.H 4288 2005-04-16 00:13:17Z mike $".
//

Some files were not shown because too many files have changed in this diff Show More