Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
This commit is contained in:
parent
b0e0c355ed
commit
f09e17c3c5
56
.clang-format
Executable file → Normal file
56
.clang-format
Executable file → Normal file
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# clang-format control file for the FLTK project.
|
||||
#
|
||||
# Copyright 2017 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
#
|
||||
# Important notes:
|
||||
@ -46,11 +44,11 @@
|
||||
|
||||
# FLTK settings (currently experimental).
|
||||
|
||||
BasedOnStyle: LLVM
|
||||
BasedOnStyle: LLVM
|
||||
|
||||
# The Language tag marks C++ options
|
||||
|
||||
# Language: Cpp
|
||||
# Language: Cpp
|
||||
|
||||
# The following options override the LLVM style definitions, if set.
|
||||
|
||||
@ -65,61 +63,61 @@ BasedOnStyle: LLVM
|
||||
# UseTab can be set to 'Never' (default) or 'ForIndentation' to avoid
|
||||
# this annoying bug of clang-format.
|
||||
#
|
||||
# UseTab: Always
|
||||
UseTab: ForIndentation
|
||||
# UseTab: Always
|
||||
UseTab: ForIndentation
|
||||
|
||||
# Should we extend code lines beyond 80 columns ?
|
||||
# Default: 80
|
||||
ColumnLimit: 120
|
||||
ColumnLimit: 120
|
||||
|
||||
# The FLTK CMP requires that case labels are indented (LLVM: false)
|
||||
IndentCaseLabels: true
|
||||
IndentCaseLabels: true
|
||||
|
||||
# There are sometimes more than 1 empty lines; should we keep 2 or more ?
|
||||
# LLVM default is 1.
|
||||
|
||||
MaxEmptyLinesToKeep: 2
|
||||
MaxEmptyLinesToKeep: 2
|
||||
|
||||
# Present FLTK source code contains some short blocks and if statements
|
||||
# in one line, but we should better make it consistent and NOT use the
|
||||
# following "Allow..." statements (leave them commented out):
|
||||
#
|
||||
# LLVM default values:
|
||||
# AllowShortBlocksOnASingleLine: false
|
||||
# AllowShortFunctionsOnASingleLine: All
|
||||
# AllowShortIfStatementsOnASingleLine: false
|
||||
# AllowShortLoopsOnASingleLine: false
|
||||
# AllowShortBlocksOnASingleLine: false
|
||||
# AllowShortFunctionsOnASingleLine: All
|
||||
# AllowShortIfStatementsOnASingleLine: false
|
||||
# AllowShortLoopsOnASingleLine: false
|
||||
#
|
||||
# FLTK values:
|
||||
# AllowShortBlocksOnASingleLine: true
|
||||
# AllowShortIfStatementsOnASingleLine: true
|
||||
# AllowShortBlocksOnASingleLine: true
|
||||
# AllowShortIfStatementsOnASingleLine: true
|
||||
|
||||
# Short inline functions in header files are an exception to the above "rule":
|
||||
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
|
||||
# The following is particularly useful for macros with continuation lines.
|
||||
# LLVM default: AlignEscapedNewlinesLeft: false
|
||||
# LLVM default: AlignEscapedNewlinesLeft: false
|
||||
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignEscapedNewlinesLeft: true
|
||||
|
||||
# Include files should be left as-is until we know we can sort them
|
||||
# without any bad side effects (LLVM: true)
|
||||
|
||||
SortIncludes: false
|
||||
SortIncludes: false
|
||||
|
||||
# Multiple constructor initializers must be on consecutive lines:
|
||||
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
|
||||
# Constructor initializers will be indented by 2 spaces (LLVM: 4):
|
||||
|
||||
ConstructorInitializerIndentWidth: 2
|
||||
ConstructorInitializerIndentWidth: 2
|
||||
|
||||
# Continuation lines (if automatically wrapped) may be indented differently.
|
||||
# This does not apply to function call arguments which are aligned to the
|
||||
# opening bracket. LLVM (default): 4
|
||||
# ContinuationIndentWidth: 2
|
||||
# ContinuationIndentWidth: 2
|
||||
|
||||
# Most of FLTK's code uses 'void *p' as opposed to 'void* p'.
|
||||
# This is particularly useful in combined declarations like:
|
||||
@ -131,9 +129,5 @@ ConstructorInitializerIndentWidth: 2
|
||||
# Note: this also applies to references like 'int &w, int &h', for instance
|
||||
# in function parameter lists.
|
||||
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Right
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Right
|
||||
|
54
.gitattributes
vendored
54
.gitattributes
vendored
@ -14,50 +14,50 @@
|
||||
|
||||
# files that will not be exported in source tarballs
|
||||
|
||||
makesrcdist export-ignore eol=lf
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.gitlab-ci.yml export-ignore
|
||||
.travis.yml export-ignore
|
||||
makesrcdist export-ignore eol=lf
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.gitlab-ci.yml export-ignore
|
||||
.travis.yml export-ignore
|
||||
|
||||
# fluid files (eol=lf or text?)
|
||||
|
||||
*.fl eol=lf
|
||||
*.fl eol=lf
|
||||
|
||||
# shell scripts etc. with Unix line endings (lf)
|
||||
|
||||
*.ac eol=lf
|
||||
*.in eol=lf
|
||||
*.desktop eol=lf
|
||||
*.sh eol=lf
|
||||
*.ac eol=lf
|
||||
*.in eol=lf
|
||||
*.desktop eol=lf
|
||||
*.sh eol=lf
|
||||
|
||||
fltk-config.in eol=lf
|
||||
fltk-config.in eol=lf
|
||||
|
||||
documentation/make_pdf eol=lf
|
||||
misc/config.guess eol=lf
|
||||
misc/config.sub eol=lf
|
||||
misc/update_config_scripts eol=lf
|
||||
documentation/make_pdf eol=lf
|
||||
misc/config.guess eol=lf
|
||||
misc/config.sub eol=lf
|
||||
misc/update_config_scripts eol=lf
|
||||
|
||||
# files with Windows line endings (crlf)
|
||||
|
||||
*.rc eol=crlf
|
||||
*.bat eol=crlf
|
||||
*.rc eol=crlf
|
||||
*.bat eol=crlf
|
||||
|
||||
# Android Studio special support file (Windows .bat file)
|
||||
ide/AndroidStudio3/gradlew.rename_to_bat eol=crlf
|
||||
|
||||
# binary files
|
||||
|
||||
*.ico binary
|
||||
*.icns binary
|
||||
*.jar binary
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.ttf binary
|
||||
*.xcf binary
|
||||
*.xcf_gz binary
|
||||
*.ico binary
|
||||
*.icns binary
|
||||
*.jar binary
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.ttf binary
|
||||
*.xcf binary
|
||||
*.xcf_gz binary
|
||||
|
||||
# image files that consist of ASCII text
|
||||
|
||||
# *.xbm text
|
||||
# *.xpm text
|
||||
# *.xbm text
|
||||
# *.xpm text
|
||||
|
@ -31,12 +31,12 @@ stages:
|
||||
build-autotools:
|
||||
stage: build
|
||||
# install the necessary build tools
|
||||
before_script:
|
||||
before_script:
|
||||
- apt update && apt -y install make autoconf man
|
||||
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev
|
||||
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
|
||||
- apt -y install libpango1.0-dev libcairo2-dev
|
||||
script:
|
||||
script:
|
||||
- make clean
|
||||
- ./configure --enable-pango --enable-cairo
|
||||
- time make -j3
|
||||
|
@ -1,4 +1,4 @@
|
||||
Changes in FLTK 1.4.0 Released: ??? ?? 2020
|
||||
Changes in FLTK 1.4.0 Released: ??? ?? 2020
|
||||
|
||||
General Information about this Release
|
||||
|
||||
|
1329
CHANGES_1.0.txt
1329
CHANGES_1.0.txt
File diff suppressed because it is too large
Load Diff
5117
CHANGES_1.1.txt
5117
CHANGES_1.1.txt
File diff suppressed because it is too large
Load Diff
1488
CHANGES_1.3.txt
1488
CHANGES_1.3.txt
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,4 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* Configuration file for the Fast Light Tool Kit (FLTK).
|
||||
*
|
||||
* Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@ -11,9 +9,9 @@
|
||||
*
|
||||
* https://www.fltk.org/COPYING.php
|
||||
*
|
||||
* Please report all bugs and problems on the following page:
|
||||
* Please see the following page on how to report bugs and issues:
|
||||
*
|
||||
* https://www.fltk.org/str.php
|
||||
* https://www.fltk.org/bugs.php
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -25,7 +23,3 @@
|
||||
/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
|
||||
|
||||
/* #undef FL_ABI_VERSION */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
@ -36,7 +36,3 @@ if (CMAKE_CROSSCOMPILING)
|
||||
else ()
|
||||
set (FLTK_FLUID_EXECUTABLE fluid)
|
||||
endif (CMAKE_CROSSCOMPILING)
|
||||
|
||||
#
|
||||
# End of file
|
||||
#
|
||||
|
@ -68,46 +68,46 @@
|
||||
message("<FindSDL2.cmake>")
|
||||
|
||||
SET(SDL2_SEARCH_PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
${SDL2_PATH}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
${SDL2_PATH}
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES include/SDL2 include
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES include/SDL2 include
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
||||
NAMES SDL2
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
NAMES SDL2
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
# Non-OS X framework versions expect you to also dynamically link to
|
||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||
# seem to provide SDL2main for compatibility even though they don't
|
||||
# necessarily need it.
|
||||
FIND_LIBRARY(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
# Non-OS X framework versions expect you to also dynamically link to
|
||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||
# seem to provide SDL2main for compatibility even though they don't
|
||||
# necessarily need it.
|
||||
FIND_LIBRARY(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main
|
||||
HINTS
|
||||
$ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
|
||||
# SDL2 may require threads on your system.
|
||||
@ -115,50 +115,50 @@ ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
# frameworks may already provide it.
|
||||
# But for non-OSX systems, I will use the CMake Threads package.
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# MinGW needs an additional library, mwindows
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows
|
||||
# (Actually on second look, I think it only needs one of the m* libraries.)
|
||||
IF(MINGW)
|
||||
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
||||
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(SDL2_LIBRARY_TEMP)
|
||||
# For SDL2main
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(SDL2MAIN_LIBRARY)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(SDL2MAIN_LIBRARY)
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
# For SDL2main
|
||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||
IF(SDL2MAIN_LIBRARY)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(SDL2MAIN_LIBRARY)
|
||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
IF(APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
IF(APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
IF(NOT APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
IF(NOT APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(MINGW)
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
ENDIF(SDL2_LIBRARY_TEMP)
|
||||
|
||||
message("</FindSDL2.cmake>")
|
||||
|
@ -13,7 +13,3 @@ message(AUTHOR_WARNING
|
||||
* or later. Please use 'include_directories(\${FLTK_INCLUDE_DIRS})' or
|
||||
* 'target_include_directories(<target> PUBLIC|PRIVATE \${FLTK_INCLUDE_DIRS})'
|
||||
* instead of 'include(\${FLTK_USE_FILE})'.")
|
||||
|
||||
#
|
||||
# End of file
|
||||
#
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# android.cmake to build the FLTK AndroidStudio project using CMake
|
||||
# Written by Matthias Melcher
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
# all target modules will be added here later
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
@ -79,7 +77,7 @@ configure_file(
|
||||
|
||||
if (UNIX)
|
||||
execute_process(COMMAND chmod 755 fltk-config
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
endif (UNIX)
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Macros used by the CMake build system for the Fast Light Tool Kit (FLTK).
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
@ -59,9 +57,9 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
|
||||
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||
|
||||
if (MSVC)
|
||||
set (DEBUG_OUTPUT_NAME "${LIBNAME}d")
|
||||
set (DEBUG_OUTPUT_NAME "${LIBNAME}d")
|
||||
else ()
|
||||
set (DEBUG_OUTPUT_NAME "${LIBNAME}")
|
||||
set (DEBUG_OUTPUT_NAME "${LIBNAME}")
|
||||
endif (MSVC)
|
||||
|
||||
add_library(${TARGET_NAME} ${LIBTYPE} ${LIBFILES})
|
||||
@ -72,33 +70,33 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
|
||||
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
||||
CLEAN_DIRECT_OUTPUT TRUE
|
||||
COMPILE_DEFINITIONS "FL_LIBRARY"
|
||||
)
|
||||
)
|
||||
|
||||
if (${LIBTYPE} STREQUAL "SHARED")
|
||||
set_target_properties(${TARGET_NAME}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${LIBNAME}
|
||||
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
||||
VERSION ${FLTK_VERSION_FULL}
|
||||
SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
|
||||
PREFIX "lib" # for MSVC static/shared coexistence
|
||||
)
|
||||
set_target_properties(${TARGET_NAME}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${LIBNAME}
|
||||
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
||||
VERSION ${FLTK_VERSION_FULL}
|
||||
SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
|
||||
PREFIX "lib" # for MSVC static/shared coexistence
|
||||
)
|
||||
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||
|
||||
if (MSVC)
|
||||
if (OPTION_LARGE_FILE)
|
||||
set_target_properties(${TARGET_NAME}
|
||||
PROPERTIES
|
||||
LINK_FLAGS /LARGEADDRESSAWARE
|
||||
)
|
||||
endif (OPTION_LARGE_FILE)
|
||||
if (OPTION_LARGE_FILE)
|
||||
set_target_properties(${TARGET_NAME}
|
||||
PROPERTIES
|
||||
LINK_FLAGS /LARGEADDRESSAWARE
|
||||
)
|
||||
endif (OPTION_LARGE_FILE)
|
||||
|
||||
if (${LIBTYPE} STREQUAL "SHARED")
|
||||
set_target_properties(${TARGET_NAME}
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS "FL_DLL"
|
||||
)
|
||||
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||
if (${LIBTYPE} STREQUAL "SHARED")
|
||||
set_target_properties(${TARGET_NAME}
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS "FL_DLL"
|
||||
)
|
||||
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||
endif (MSVC)
|
||||
|
||||
install(TARGETS ${TARGET_NAME}
|
||||
@ -106,7 +104,7 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
|
||||
RUNTIME DESTINATION ${FLTK_BINDIR}
|
||||
LIBRARY DESTINATION ${FLTK_LIBDIR}
|
||||
ARCHIVE DESTINATION ${FLTK_LIBDIR}
|
||||
)
|
||||
)
|
||||
|
||||
list(APPEND FLTK_LIBRARIES "${TARGET_NAME}")
|
||||
set (FLTK_LIBRARIES ${FLTK_LIBRARIES} PARENT_SCOPE)
|
||||
@ -119,14 +117,14 @@ function(FLTK_RUN_FLUID TARGET SOURCES)
|
||||
set (CXX_FILES)
|
||||
foreach(src ${SOURCES})
|
||||
if ("${src}" MATCHES "\\.fl$")
|
||||
string(REGEX REPLACE "(.*).fl" \\1 basename ${src})
|
||||
add_custom_command(
|
||||
OUTPUT "${basename}.cxx" "${basename}.h"
|
||||
COMMAND fluid -c ${CMAKE_CURRENT_SOURCE_DIR}/${src}
|
||||
DEPENDS ${src}
|
||||
MAIN_DEPENDENCY ${src}
|
||||
)
|
||||
list(APPEND CXX_FILES "${basename}.cxx")
|
||||
string(REGEX REPLACE "(.*).fl" \\1 basename ${src})
|
||||
add_custom_command(
|
||||
OUTPUT "${basename}.cxx" "${basename}.h"
|
||||
COMMAND fluid -c ${CMAKE_CURRENT_SOURCE_DIR}/${src}
|
||||
DEPENDS ${src}
|
||||
MAIN_DEPENDENCY ${src}
|
||||
)
|
||||
list(APPEND CXX_FILES "${basename}.cxx")
|
||||
endif ("${src}" MATCHES "\\.fl$")
|
||||
set (${TARGET} ${CXX_FILES} PARENT_SCOPE)
|
||||
endforeach(src)
|
||||
@ -135,11 +133,11 @@ endfunction(FLTK_RUN_FLUID TARGET SOURCES)
|
||||
#######################################################################
|
||||
macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
||||
|
||||
set (srcs) # source files
|
||||
set (flsrcs) # fluid source files
|
||||
set (srcs) # source files
|
||||
set (flsrcs) # fluid source files
|
||||
|
||||
set (tname ${NAME}) # target name
|
||||
set (oname ${NAME}) # output (executable) name
|
||||
set (tname ${NAME}) # target name
|
||||
set (oname ${NAME}) # output (executable) name
|
||||
|
||||
foreach(src ${SOURCES})
|
||||
if ("${src}" MATCHES "\\.fl$")
|
||||
@ -151,7 +149,7 @@ macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
||||
|
||||
set (FLUID_SOURCES)
|
||||
if (flsrcs)
|
||||
FLTK_RUN_FLUID(FLUID_SOURCES "${flsrcs}")
|
||||
FLTK_RUN_FLUID(FLUID_SOURCES "${flsrcs}")
|
||||
endif (flsrcs)
|
||||
|
||||
if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -12,9 +10,9 @@
|
||||
#
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# https://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
set (DEBUG_OPTIONS_CMAKE 0)
|
||||
@ -471,7 +469,7 @@ if(X11_Xft_FOUND AND OPTION_USE_PANGO)
|
||||
set(USE_PANGO TRUE)
|
||||
list(APPEND FLTK_LDLIBS -lpango-1.0 -lpangoxft-1.0 -lgobject-2.0)
|
||||
else(PANGOXFT_FOUND)
|
||||
|
||||
|
||||
#this covers Debian, Ubuntu, FreeBSD, NetBSD, Darwin
|
||||
if(APPLE AND OPTION_APPLE_X11)
|
||||
find_file(FINK_PREFIX NAMES /opt/sw /sw)
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
@ -208,31 +206,31 @@ if(HAVE_DLFCN_H)
|
||||
endif(HAVE_DLFCN_H)
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
|
||||
CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
|
||||
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
|
||||
|
||||
if(LIB_png)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${LIB_png})
|
||||
CHECK_FUNCTION_EXISTS(png_get_valid HAVE_PNG_GET_VALID)
|
||||
CHECK_FUNCTION_EXISTS(png_set_tRNS_to_alpha HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||
CHECK_FUNCTION_EXISTS(png_get_valid HAVE_PNG_GET_VALID)
|
||||
CHECK_FUNCTION_EXISTS(png_set_tRNS_to_alpha HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif(LIB_png)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(scandir HAVE_SCANDIR)
|
||||
CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
|
||||
CHECK_FUNCTION_EXISTS(scandir HAVE_SCANDIR)
|
||||
CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
|
||||
|
||||
# not really true but we convert strcasecmp calls to _stricmp calls in flstring.h
|
||||
if(MSVC)
|
||||
set(HAVE_STRCASECMP 1)
|
||||
endif(MSVC)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
||||
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
||||
CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
|
||||
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
|
||||
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
||||
CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
|
||||
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
|
||||
|
||||
if(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX)
|
||||
set(MSG "POSIX compatible scandir")
|
||||
@ -285,7 +283,3 @@ endif (DOXYGEN_FOUND)
|
||||
# Cleanup: unset local variables
|
||||
|
||||
unset (CMAKE_REQUIRED_QUIET)
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# This file sets variables for common use in export.cmake and install.cmake
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
|
@ -1,6 +1,4 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
#
|
||||
@ -10,11 +8,11 @@
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# http://www.fltk.org/COPYING.php
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please report all bugs and problems on the following page:
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# http://www.fltk.org/str.php
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
# Prevent annoying warning under Cygwin; this must be before project().
|
||||
|
6
COPYING
6
COPYING
@ -13,8 +13,8 @@ exceptions:
|
||||
The authors do request that such modifications be
|
||||
contributed to the FLTK project - send all contributions
|
||||
through the "Software Trouble Report" on the following page:
|
||||
|
||||
http://www.fltk.org/str.php
|
||||
|
||||
https://www.fltk.org/bugs.php
|
||||
|
||||
2. Widgets that are subclassed from FLTK widgets do not
|
||||
constitute a derivative work.
|
||||
@ -42,7 +42,7 @@ exceptions:
|
||||
documentation to satisfy this requirement:
|
||||
|
||||
[program/widget] is based in part on the work of
|
||||
the FLTK project (http://www.fltk.org).
|
||||
the FLTK project (https://www.fltk.org).
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
110
CREDITS.txt
110
CREDITS.txt
@ -1,71 +1,71 @@
|
||||
CREDITS.txt - Fast Light Tool Kit (FLTK) Version 1.4.0
|
||||
------------------------------------------------------
|
||||
|
||||
This file lists the people responsible for the toolkit you are
|
||||
now using. If you've been looking for your name in lights
|
||||
but we've forgotten you here, please use the report on the
|
||||
following page, and we'll update this file accordingly:
|
||||
This file lists the people responsible for the toolkit you are
|
||||
now using. If you've been looking for your name in lights
|
||||
but we've forgotten you here, please use the report on the
|
||||
following page, and we'll update this file accordingly:
|
||||
|
||||
https://www.fltk.org/str.php
|
||||
https://www.fltk.org/bugs.php
|
||||
|
||||
|
||||
CORE DEVELOPERS
|
||||
|
||||
The following people do the day-to-day development of FLTK:
|
||||
The following people do the day-to-day development of FLTK:
|
||||
|
||||
Greg Ercolano
|
||||
Manolo Gouy
|
||||
Lauri Kasanen
|
||||
Ian MacArthur
|
||||
Pierre Ossman
|
||||
Albrecht Schlosser
|
||||
Greg Ercolano
|
||||
Manolo Gouy
|
||||
Lauri Kasanen
|
||||
Ian MacArthur
|
||||
Pierre Ossman
|
||||
Albrecht Schlosser
|
||||
|
||||
These people have previously been active developers of FLTK:
|
||||
These people have previously been active developers of FLTK:
|
||||
|
||||
Fabien Costantini (fabien67@users.sf.net)
|
||||
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 (mm@robowerk.com)
|
||||
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)
|
||||
Fabien Costantini (fabien67@users.sf.net)
|
||||
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 (mm@robowerk.com)
|
||||
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:
|
||||
The following people have contributed fixes or enhancements
|
||||
for FLTK:
|
||||
|
||||
Laszlo Z. Antal (LZA)
|
||||
Teun Burgers
|
||||
Paul Chambers
|
||||
Stephen Davies
|
||||
Yuri D'Elia
|
||||
Domingo Alvarez Duarte
|
||||
Yuri Fedorchenko
|
||||
George Garvey
|
||||
Duncan Gibson
|
||||
Mikael Hultgren
|
||||
Stuart Levy
|
||||
Jean-Marc Lienher (OksiD)
|
||||
Howard Lightstone
|
||||
Mike Lindner
|
||||
Alexander Mai
|
||||
Alexander Rabi
|
||||
James Roth
|
||||
Ivan Nieto (Mr.Satan)
|
||||
Jamie Snape
|
||||
Andrea Suatoni
|
||||
Michael Surette
|
||||
Paul Sydney
|
||||
Aaron Ucko
|
||||
Emanuele Vicentini
|
||||
Josef Vitu
|
||||
Jim Wilson
|
||||
Ken Yarnall
|
||||
Laszlo Z. Antal (LZA)
|
||||
Teun Burgers
|
||||
Paul Chambers
|
||||
Stephen Davies
|
||||
Yuri D'Elia
|
||||
Domingo Alvarez Duarte
|
||||
Yuri Fedorchenko
|
||||
George Garvey
|
||||
Duncan Gibson
|
||||
Mikael Hultgren
|
||||
Stuart Levy
|
||||
Jean-Marc Lienher (OksiD)
|
||||
Howard Lightstone
|
||||
Mike Lindner
|
||||
Alexander Mai
|
||||
Alexander Rabi
|
||||
James Roth
|
||||
Ivan Nieto (Mr.Satan)
|
||||
Jamie Snape
|
||||
Andrea Suatoni
|
||||
Michael Surette
|
||||
Paul Sydney
|
||||
Aaron Ucko
|
||||
Emanuele Vicentini
|
||||
Josef Vitu
|
||||
Jim Wilson
|
||||
Ken Yarnall
|
||||
|
@ -9,15 +9,15 @@ SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
|
||||
SET (TRIGGER_SITE "http://${DROP_SITE}/cgi-bin/Submit-Fltk-TestingResults.pl")
|
||||
|
||||
# Project Home Page
|
||||
SET (PROJECT_URL "http://www.fltk.org")
|
||||
SET (PROJECT_URL "https://www.fltk.org")
|
||||
|
||||
# Dart server configuration
|
||||
# Dart server configuration
|
||||
SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/fltk-rollup-dashboard.sh")
|
||||
SET (CVS_WEB_URL "http://cvs.sourceforge.net/viewcvs.py/fltk/fltk/")
|
||||
SET (CVS_WEB_CVSROOT "fltk")
|
||||
|
||||
SET (USE_GNATS "On")
|
||||
SET (GNATS_WEB_URL "http://www.fltk.org/str.php")
|
||||
SET (GNATS_WEB_URL "https://www.fltk.org/bugs.php")
|
||||
|
||||
# Continuous email delivery variables
|
||||
SET (CONTINUOUS_FROM "fltk-dashboard@public.kitware.com")
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Enumerations for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file
|
||||
@ -51,21 +49,21 @@
|
||||
The major release version of this FLTK library.
|
||||
\see FL_VERSION
|
||||
*/
|
||||
#define FL_MAJOR_VERSION 1
|
||||
#define FL_MAJOR_VERSION 1
|
||||
|
||||
/**
|
||||
The minor release version for this library.
|
||||
|
||||
FLTK remains mostly source-code compatible between minor version changes.
|
||||
*/
|
||||
#define FL_MINOR_VERSION 4
|
||||
#define FL_MINOR_VERSION 4
|
||||
|
||||
/**
|
||||
The patch version for this library.
|
||||
|
||||
FLTK remains binary compatible between patches.
|
||||
*/
|
||||
#define FL_PATCH_VERSION 0
|
||||
#define FL_PATCH_VERSION 0
|
||||
|
||||
/**
|
||||
The FLTK version number as a \em double.
|
||||
@ -88,9 +86,9 @@
|
||||
\see FL_API_VERSION
|
||||
\see Fl::api_version()
|
||||
*/
|
||||
#define FL_VERSION ( (double)FL_MAJOR_VERSION + \
|
||||
(double)FL_MINOR_VERSION * 0.01 + \
|
||||
(double)FL_PATCH_VERSION * 0.0001 )
|
||||
#define FL_VERSION ( (double)FL_MAJOR_VERSION + \
|
||||
(double)FL_MINOR_VERSION * 0.01 + \
|
||||
(double)FL_PATCH_VERSION * 0.0001 )
|
||||
|
||||
/**
|
||||
The FLTK API version number as an \em int.
|
||||
@ -127,7 +125,7 @@
|
||||
\verbatim
|
||||
FLTK Version FL_API_VERSION FL_ABI_VERSION FL_VERSION (deprecated)
|
||||
1.3.0 10300 10300 1.0300
|
||||
1.3.4 10304 10300 1.0304
|
||||
1.3.4 10304 10300 1.0304
|
||||
\endverbatim
|
||||
|
||||
Version 1.2.3 is actually stored as 10203 to allow for more than 9
|
||||
@ -152,7 +150,7 @@
|
||||
This is done to prevent users from defining an illegal ABI version.
|
||||
|
||||
Rule: FL_MAJOR_VERSION * 10000 + FL_MINOR_VERSION * 100
|
||||
<= FL_ABI_VERSION <= FL_API_VERSION.
|
||||
<= FL_ABI_VERSION <= FL_API_VERSION.
|
||||
|
||||
Example (FLTK 1.3.4):
|
||||
|
||||
@ -174,19 +172,19 @@
|
||||
|
||||
#endif
|
||||
|
||||
/*@}*/ // group: Version Numbers
|
||||
/*@}*/ // group: Version Numbers
|
||||
|
||||
/**
|
||||
Every time a user moves the mouse pointer, clicks a button,
|
||||
or presses a key, an event is generated and sent to your
|
||||
application. Events can also come from other programs like the
|
||||
window manager.
|
||||
|
||||
Events are identified by the integer argument passed to the
|
||||
Fl_Widget::handle() virtual method. Other information about the
|
||||
most recent event is stored in static locations and acquired by
|
||||
calling the Fl::event_*() methods. This static information remains
|
||||
valid until the next event is read from the window system, so it
|
||||
|
||||
Events are identified by the integer argument passed to the
|
||||
Fl_Widget::handle() virtual method. Other information about the
|
||||
most recent event is stored in static locations and acquired by
|
||||
calling the Fl::event_*() methods. This static information remains
|
||||
valid until the next event is read from the window system, so it
|
||||
is ok to look at it outside of the handle() method.
|
||||
|
||||
Event numbers can be converted to their actual names using the
|
||||
@ -195,203 +193,203 @@
|
||||
\see Fl::event_text(), Fl::event_key(), class Fl::
|
||||
*/
|
||||
// DEV NOTE: Keep this list in sync with FL/names.h
|
||||
enum Fl_Event { // events
|
||||
enum Fl_Event { // events
|
||||
/** No event. */
|
||||
FL_NO_EVENT = 0,
|
||||
FL_NO_EVENT = 0,
|
||||
|
||||
/** A mouse button has gone down with the mouse pointing at this
|
||||
widget. You can find out what button by calling Fl::event_button().
|
||||
widget. You can find out what button by calling Fl::event_button().
|
||||
You find out the mouse position by calling Fl::event_x() and
|
||||
Fl::event_y().
|
||||
|
||||
A widget indicates that it "wants" the mouse click by returning non-zero
|
||||
from its Fl_Widget::handle() method. It will then become the
|
||||
Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events.
|
||||
If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH
|
||||
to another widget.
|
||||
A widget indicates that it "wants" the mouse click by returning non-zero
|
||||
from its Fl_Widget::handle() method. It will then become the
|
||||
Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events.
|
||||
If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH
|
||||
to another widget.
|
||||
*/
|
||||
FL_PUSH = 1,
|
||||
FL_PUSH = 1,
|
||||
|
||||
/** A mouse button has been released. You can find out what button by
|
||||
/** A mouse button has been released. You can find out what button by
|
||||
calling Fl::event_button().
|
||||
|
||||
In order to receive the FL_RELEASE event, the widget must return
|
||||
In order to receive the FL_RELEASE event, the widget must return
|
||||
non-zero when handling FL_PUSH.
|
||||
*/
|
||||
FL_RELEASE = 2,
|
||||
FL_RELEASE = 2,
|
||||
|
||||
/** The mouse has been moved to point at this widget. This can
|
||||
be used for highlighting feedback. If a widget wants to
|
||||
highlight or otherwise track the mouse, it indicates this by
|
||||
returning non-zero from its handle() method. It then
|
||||
becomes the Fl::belowmouse() widget and will receive
|
||||
becomes the Fl::belowmouse() widget and will receive
|
||||
FL_MOVE and FL_LEAVE events.
|
||||
*/
|
||||
FL_ENTER = 3,
|
||||
FL_ENTER = 3,
|
||||
|
||||
/** The mouse has moved out of the widget.
|
||||
In order to receive the FL_LEAVE event, the widget must
|
||||
In order to receive the FL_LEAVE event, the widget must
|
||||
return non-zero when handling FL_ENTER.
|
||||
*/
|
||||
FL_LEAVE = 4,
|
||||
FL_LEAVE = 4,
|
||||
|
||||
/** The mouse has moved with a button held down. The current button state
|
||||
is in Fl::event_state(). The mouse position is in Fl::event_x() and
|
||||
/** The mouse has moved with a button held down. The current button state
|
||||
is in Fl::event_state(). The mouse position is in Fl::event_x() and
|
||||
Fl::event_y().
|
||||
|
||||
In order to receive FL_DRAG events, the widget must return non-zero
|
||||
In order to receive FL_DRAG events, the widget must return non-zero
|
||||
when handling FL_PUSH.
|
||||
*/
|
||||
FL_DRAG = 5,
|
||||
FL_DRAG = 5,
|
||||
|
||||
/** This indicates an <I>attempt</I> to give a widget the keyboard focus.
|
||||
|
||||
If a widget wants the focus, it should change itself to display the
|
||||
If a widget wants the focus, it should change itself to display the
|
||||
fact that it has the focus, and return non-zero from its handle() method.
|
||||
It then becomes the Fl::focus() widget and gets FL_KEYDOWN, FL_KEYUP,
|
||||
It then becomes the Fl::focus() widget and gets FL_KEYDOWN, FL_KEYUP,
|
||||
and FL_UNFOCUS events.
|
||||
|
||||
The focus will change either because the window manager changed which
|
||||
window gets the focus, or because the user tried to navigate using tab,
|
||||
arrows, or other keys. You can check Fl::event_key() to figure out why
|
||||
it moved. For navigation it will be the key pressed and for interaction
|
||||
The focus will change either because the window manager changed which
|
||||
window gets the focus, or because the user tried to navigate using tab,
|
||||
arrows, or other keys. You can check Fl::event_key() to figure out why
|
||||
it moved. For navigation it will be the key pressed and for interaction
|
||||
with the window manager it will be zero.
|
||||
*/
|
||||
FL_FOCUS = 6,
|
||||
|
||||
/** This event is sent to the previous Fl::focus() widget when another
|
||||
FL_FOCUS = 6,
|
||||
|
||||
/** This event is sent to the previous Fl::focus() widget when another
|
||||
widget gets the focus or the window loses focus.
|
||||
*/
|
||||
FL_UNFOCUS = 7,
|
||||
FL_UNFOCUS = 7,
|
||||
|
||||
/** A key was pressed (FL_KEYDOWN) or released (FL_KEYUP).
|
||||
/** A key was pressed (FL_KEYDOWN) or released (FL_KEYUP).
|
||||
Fl_KEYBOARD is a synonym for FL_KEYDOWN.
|
||||
The key can be found in Fl::event_key().
|
||||
The text that the key should insert can be found with Fl::event_text()
|
||||
The text that the key should insert can be found with Fl::event_text()
|
||||
and its length is in Fl::event_length(). If you use the key handle()
|
||||
should return 1. If you return zero then FLTK assumes you ignored the
|
||||
key and will then attempt to send it to a parent widget. If none of
|
||||
should return 1. If you return zero then FLTK assumes you ignored the
|
||||
key and will then attempt to send it to a parent widget. If none of
|
||||
them want it, it will change the event into a FL_SHORTCUT event.
|
||||
|
||||
To receive FL_KEYBOARD events you must also respond to the FL_FOCUS
|
||||
and FL_UNFOCUS events.
|
||||
|
||||
If you are writing a text-editing widget you may also want to call
|
||||
the Fl::compose() function to translate individual keystrokes into
|
||||
If you are writing a text-editing widget you may also want to call
|
||||
the Fl::compose() function to translate individual keystrokes into
|
||||
non-ASCII characters.
|
||||
|
||||
FL_KEYUP events are sent to the widget that currently has focus. This
|
||||
is not necessarily the same widget that received the corresponding
|
||||
FL_KEYUP events are sent to the widget that currently has focus. This
|
||||
is not necessarily the same widget that received the corresponding
|
||||
FL_KEYDOWN event because focus may have changed between events.
|
||||
*/
|
||||
FL_KEYDOWN = 8,
|
||||
FL_KEYDOWN = 8,
|
||||
|
||||
/** Equivalent to FL_KEYDOWN.
|
||||
\see FL_KEYDOWN
|
||||
*/
|
||||
FL_KEYBOARD = 8,
|
||||
|
||||
FL_KEYBOARD = 8,
|
||||
|
||||
/** Key release event.
|
||||
\see FL_KEYDOWN
|
||||
*/
|
||||
FL_KEYUP = 9,
|
||||
FL_KEYUP = 9,
|
||||
|
||||
/** The user clicked the close button of a window.
|
||||
This event is used internally only to trigger the callback of
|
||||
Fl_Window derived classed. The default callback closes the
|
||||
Fl_Window derived classed. The default callback closes the
|
||||
window calling Fl_Window::hide().
|
||||
*/
|
||||
FL_CLOSE = 10,
|
||||
FL_CLOSE = 10,
|
||||
|
||||
/** The mouse has moved without any mouse buttons held down.
|
||||
/** The mouse has moved without any mouse buttons held down.
|
||||
This event is sent to the Fl::belowmouse() widget.
|
||||
|
||||
In order to receive FL_MOVE events, the widget must return
|
||||
In order to receive FL_MOVE events, the widget must return
|
||||
non-zero when handling FL_ENTER.
|
||||
*/
|
||||
FL_MOVE = 11,
|
||||
FL_MOVE = 11,
|
||||
|
||||
/** If the Fl::focus() widget is zero or ignores an FL_KEYBOARD
|
||||
event then FLTK tries sending this event to every widget it
|
||||
can, until one of them returns non-zero. FL_SHORTCUT is first
|
||||
sent to the Fl::belowmouse() widget, then its parents and siblings,
|
||||
and eventually to every widget in the window, trying to find an
|
||||
object that returns non-zero. FLTK tries really hard to not to ignore
|
||||
event then FLTK tries sending this event to every widget it
|
||||
can, until one of them returns non-zero. FL_SHORTCUT is first
|
||||
sent to the Fl::belowmouse() widget, then its parents and siblings,
|
||||
and eventually to every widget in the window, trying to find an
|
||||
object that returns non-zero. FLTK tries really hard to not to ignore
|
||||
any keystrokes!
|
||||
|
||||
You can also make "global" shortcuts by using Fl::add_handler(). A
|
||||
global shortcut will work no matter what windows are displayed or
|
||||
You can also make "global" shortcuts by using Fl::add_handler(). A
|
||||
global shortcut will work no matter what windows are displayed or
|
||||
which one has the focus.
|
||||
*/
|
||||
FL_SHORTCUT = 12,
|
||||
FL_SHORTCUT = 12,
|
||||
|
||||
/** This widget is no longer active, due to Fl_Widget::deactivate()
|
||||
being called on it or one of its parents. Fl_Widget::active() may
|
||||
/** This widget is no longer active, due to Fl_Widget::deactivate()
|
||||
being called on it or one of its parents. Fl_Widget::active() may
|
||||
still be true after this, the widget is only active if Fl_Widget::active()
|
||||
is true on it and all its parents (use Fl_Widget::active_r() to check this).
|
||||
*/
|
||||
FL_DEACTIVATE = 13,
|
||||
FL_DEACTIVATE = 13,
|
||||
|
||||
/** This widget is now active, due to Fl_Widget::activate() being
|
||||
/** This widget is now active, due to Fl_Widget::activate() being
|
||||
called on it or one of its parents.
|
||||
*/
|
||||
FL_ACTIVATE = 14,
|
||||
FL_ACTIVATE = 14,
|
||||
|
||||
/** This widget is no longer visible, due to Fl_Widget::hide() being
|
||||
called on it or one of its parents, or due to a parent window being
|
||||
minimized. Fl_Widget::visible() may still be true after this, but the
|
||||
widget is visible only if visible() is true for it and all its
|
||||
/** This widget is no longer visible, due to Fl_Widget::hide() being
|
||||
called on it or one of its parents, or due to a parent window being
|
||||
minimized. Fl_Widget::visible() may still be true after this, but the
|
||||
widget is visible only if visible() is true for it and all its
|
||||
parents (use Fl_Widget::visible_r() to check this).
|
||||
*/
|
||||
FL_HIDE = 15,
|
||||
FL_HIDE = 15,
|
||||
|
||||
/** This widget is visible again, due to Fl_Widget::show() being called on
|
||||
it or one of its parents, or due to a parent window being restored.
|
||||
Child Fl_Windows respond to this by actually creating the window if not
|
||||
done already, so if you subclass a window, be sure to pass FL_SHOW
|
||||
/** This widget is visible again, due to Fl_Widget::show() being called on
|
||||
it or one of its parents, or due to a parent window being restored.
|
||||
Child Fl_Windows respond to this by actually creating the window if not
|
||||
done already, so if you subclass a window, be sure to pass FL_SHOW
|
||||
to the base class Fl_Widget::handle() method!
|
||||
*/
|
||||
FL_SHOW = 16,
|
||||
FL_SHOW = 16,
|
||||
|
||||
/** You should get this event some time after you call Fl::paste().
|
||||
The contents of Fl::event_text() is the text to insert and the number
|
||||
/** You should get this event some time after you call Fl::paste().
|
||||
The contents of Fl::event_text() is the text to insert and the number
|
||||
of characters is in Fl::event_length().
|
||||
*/
|
||||
FL_PASTE = 17,
|
||||
FL_PASTE = 17,
|
||||
|
||||
/** The Fl::selection_owner() will get this event before the selection is
|
||||
moved to another widget. This indicates that some other widget or program
|
||||
has claimed the selection. Motif programs used this to clear the selection
|
||||
/** The Fl::selection_owner() will get this event before the selection is
|
||||
moved to another widget. This indicates that some other widget or program
|
||||
has claimed the selection. Motif programs used this to clear the selection
|
||||
indication. Most modern programs ignore this.
|
||||
*/
|
||||
FL_SELECTIONCLEAR = 18,
|
||||
FL_SELECTIONCLEAR = 18,
|
||||
|
||||
/** The user has moved the mouse wheel. The Fl::event_dx() and Fl::event_dy()
|
||||
methods can be used to find the amount to scroll horizontally and vertically.
|
||||
*/
|
||||
FL_MOUSEWHEEL = 19,
|
||||
FL_MOUSEWHEEL = 19,
|
||||
|
||||
/** The mouse has been moved to point at this widget. A widget that is
|
||||
interested in receiving drag'n'drop data must return 1 to receive
|
||||
/** The mouse has been moved to point at this widget. A widget that is
|
||||
interested in receiving drag'n'drop data must return 1 to receive
|
||||
FL_DND_DRAG, FL_DND_LEAVE and FL_DND_RELEASE events.
|
||||
*/
|
||||
FL_DND_ENTER = 20,
|
||||
FL_DND_ENTER = 20,
|
||||
|
||||
/** The mouse has been moved inside a widget while dragging data. A
|
||||
widget that is interested in receiving drag'n'drop data should
|
||||
/** The mouse has been moved inside a widget while dragging data. A
|
||||
widget that is interested in receiving drag'n'drop data should
|
||||
indicate the possible drop position.
|
||||
*/
|
||||
FL_DND_DRAG = 21,
|
||||
FL_DND_DRAG = 21,
|
||||
|
||||
/** The mouse has moved out of the widget.
|
||||
*/
|
||||
FL_DND_LEAVE = 22,
|
||||
FL_DND_LEAVE = 22,
|
||||
|
||||
/** The user has released the mouse button dropping data into the widget.
|
||||
If the widget returns 1, it will receive the data in the immediately
|
||||
/** The user has released the mouse button dropping data into the widget.
|
||||
If the widget returns 1, it will receive the data in the immediately
|
||||
following FL_PASTE event.
|
||||
*/
|
||||
FL_DND_RELEASE = 23,
|
||||
FL_DND_RELEASE = 23,
|
||||
/** The screen configuration (number, positions) was changed.
|
||||
Use Fl::add_handler() to be notified of this event.
|
||||
*/
|
||||
@ -405,7 +403,7 @@ enum Fl_Event { // events
|
||||
Fl::event_x() and Fl::event_y() are set as well.
|
||||
This event is sent to the window's handle method.
|
||||
*/
|
||||
FL_ZOOM_GESTURE = 26,
|
||||
FL_ZOOM_GESTURE = 26,
|
||||
/** A zoom event (ctrl/+/-/0/ or cmd/+/-/0/) was processed.
|
||||
Use Fl::add_handler() to be notified of this event.
|
||||
*/
|
||||
@ -421,17 +419,17 @@ enum Fl_Event { // events
|
||||
\todo doxygen comments for values are incomplete and maybe wrong or unclear
|
||||
*/
|
||||
enum Fl_When { // Fl_Widget::when():
|
||||
FL_WHEN_NEVER = 0, ///< Never call the callback
|
||||
FL_WHEN_CHANGED = 1, ///< Do the callback only when the widget value changes
|
||||
FL_WHEN_NOT_CHANGED = 2, ///< Do the callback whenever the user interacts with the widget
|
||||
FL_WHEN_RELEASE = 4, ///< Do the callback when the button or key is released and the value changes
|
||||
FL_WHEN_RELEASE_ALWAYS= 6, ///< Do the callback when the button or key is released, even if the value doesn't change
|
||||
FL_WHEN_ENTER_KEY = 8, ///< Do the callback when the user presses the ENTER key and the value changes
|
||||
FL_WHEN_ENTER_KEY_ALWAYS=10, ///< Do the callback when the user presses the ENTER key, even if the value doesn't change
|
||||
FL_WHEN_ENTER_KEY_CHANGED=11 ///< ?
|
||||
FL_WHEN_NEVER = 0, ///< Never call the callback
|
||||
FL_WHEN_CHANGED = 1, ///< Do the callback only when the widget value changes
|
||||
FL_WHEN_NOT_CHANGED = 2, ///< Do the callback whenever the user interacts with the widget
|
||||
FL_WHEN_RELEASE = 4, ///< Do the callback when the button or key is released and the value changes
|
||||
FL_WHEN_RELEASE_ALWAYS= 6, ///< Do the callback when the button or key is released, even if the value doesn't change
|
||||
FL_WHEN_ENTER_KEY = 8, ///< Do the callback when the user presses the ENTER key and the value changes
|
||||
FL_WHEN_ENTER_KEY_ALWAYS=10, ///< Do the callback when the user presses the ENTER key, even if the value doesn't change
|
||||
FL_WHEN_ENTER_KEY_CHANGED=11 ///< ?
|
||||
};
|
||||
|
||||
/*@}*/ // group: When Conditions
|
||||
/*@}*/ // group: When Conditions
|
||||
|
||||
/** \name Mouse and Keyboard Events
|
||||
|
||||
@ -441,53 +439,53 @@ enum Fl_When { // Fl_Widget::when():
|
||||
\see Fl::event_key() and Fl::get_key(int) (use ASCII letters for all other keys):
|
||||
|
||||
\todo FL_Button and FL_key... constants could be structured better
|
||||
(use an enum or some doxygen grouping ?)
|
||||
(use an enum or some doxygen grouping ?)
|
||||
*/
|
||||
|
||||
/*@{*/
|
||||
|
||||
// FIXME: These codes collide with valid Unicode keys
|
||||
|
||||
#define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for mouse button n.
|
||||
#define FL_BackSpace 0xff08 ///< The backspace key.
|
||||
#define FL_Tab 0xff09 ///< The tab key.
|
||||
#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards.
|
||||
#define FL_Enter 0xff0d ///< The enter key.
|
||||
#define FL_Pause 0xff13 ///< The pause key.
|
||||
#define FL_Scroll_Lock 0xff14 ///< The scroll lock key.
|
||||
#define FL_Escape 0xff1b ///< The escape key.
|
||||
#define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for mouse button n.
|
||||
#define FL_BackSpace 0xff08 ///< The backspace key.
|
||||
#define FL_Tab 0xff09 ///< The tab key.
|
||||
#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards.
|
||||
#define FL_Enter 0xff0d ///< The enter key.
|
||||
#define FL_Pause 0xff13 ///< The pause key.
|
||||
#define FL_Scroll_Lock 0xff14 ///< The scroll lock key.
|
||||
#define FL_Escape 0xff1b ///< The escape key.
|
||||
#define FL_Kana 0xff2e ///< The Kana key of JIS keyboards.
|
||||
#define FL_Eisu 0xff2f ///< The Eisu key of JIS keyboards.
|
||||
#define FL_Yen 0xff30 ///< The Yen key of JIS keyboards.
|
||||
#define FL_JIS_Underscore 0xff31 ///< The underscore key of JIS keyboards.
|
||||
#define FL_Home 0xff50 ///< The home key.
|
||||
#define FL_Left 0xff51 ///< The left arrow key.
|
||||
#define FL_Up 0xff52 ///< The up arrow key.
|
||||
#define FL_Right 0xff53 ///< The right arrow key.
|
||||
#define FL_Down 0xff54 ///< The down arrow key.
|
||||
#define FL_Page_Up 0xff55 ///< The page-up key.
|
||||
#define FL_Page_Down 0xff56 ///< The page-down key.
|
||||
#define FL_End 0xff57 ///< The end key.
|
||||
#define FL_Print 0xff61 ///< The print (or print-screen) key.
|
||||
#define FL_Insert 0xff63 ///< The insert key.
|
||||
#define FL_Menu 0xff67 ///< The menu key.
|
||||
#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards
|
||||
#define FL_Num_Lock 0xff7f ///< The num lock key.
|
||||
#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n.
|
||||
#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'.
|
||||
#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad.
|
||||
#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n.
|
||||
#define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys.
|
||||
#define FL_Shift_L 0xffe1 ///< The lefthand shift key.
|
||||
#define FL_Shift_R 0xffe2 ///< The righthand shift key.
|
||||
#define FL_Control_L 0xffe3 ///< The lefthand control key.
|
||||
#define FL_Control_R 0xffe4 ///< The righthand control key.
|
||||
#define FL_Caps_Lock 0xffe5 ///< The caps lock key.
|
||||
#define FL_Meta_L 0xffe7 ///< The left meta/Windows key.
|
||||
#define FL_Meta_R 0xffe8 ///< The right meta/Windows key.
|
||||
#define FL_Alt_L 0xffe9 ///< The left alt key.
|
||||
#define FL_Alt_R 0xffea ///< The right alt key.
|
||||
#define FL_Delete 0xffff ///< The delete key.
|
||||
#define FL_Home 0xff50 ///< The home key.
|
||||
#define FL_Left 0xff51 ///< The left arrow key.
|
||||
#define FL_Up 0xff52 ///< The up arrow key.
|
||||
#define FL_Right 0xff53 ///< The right arrow key.
|
||||
#define FL_Down 0xff54 ///< The down arrow key.
|
||||
#define FL_Page_Up 0xff55 ///< The page-up key.
|
||||
#define FL_Page_Down 0xff56 ///< The page-down key.
|
||||
#define FL_End 0xff57 ///< The end key.
|
||||
#define FL_Print 0xff61 ///< The print (or print-screen) key.
|
||||
#define FL_Insert 0xff63 ///< The insert key.
|
||||
#define FL_Menu 0xff67 ///< The menu key.
|
||||
#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards
|
||||
#define FL_Num_Lock 0xff7f ///< The num lock key.
|
||||
#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n.
|
||||
#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'.
|
||||
#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad.
|
||||
#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n.
|
||||
#define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys.
|
||||
#define FL_Shift_L 0xffe1 ///< The lefthand shift key.
|
||||
#define FL_Shift_R 0xffe2 ///< The righthand shift key.
|
||||
#define FL_Control_L 0xffe3 ///< The lefthand control key.
|
||||
#define FL_Control_R 0xffe4 ///< The righthand control key.
|
||||
#define FL_Caps_Lock 0xffe5 ///< The caps lock key.
|
||||
#define FL_Meta_L 0xffe7 ///< The left meta/Windows key.
|
||||
#define FL_Meta_R 0xffe8 ///< The right meta/Windows key.
|
||||
#define FL_Alt_L 0xffe9 ///< The left alt key.
|
||||
#define FL_Alt_R 0xffea ///< The right alt key.
|
||||
#define FL_Delete 0xffff ///< The delete key.
|
||||
|
||||
// These use the Private Use Area (PUA) of the Basic Multilingual Plane
|
||||
// of Unicode. Guaranteed not to conflict with a proper Unicode character.
|
||||
@ -510,7 +508,7 @@ enum Fl_When { // Fl_Widget::when():
|
||||
#define FL_Sleep 0xEF2F /* Put system to sleep */
|
||||
#define FL_Favorites 0xEF30 /* Show favorite locations */
|
||||
|
||||
/*@}*/ // group: Mouse and Keyboard Events
|
||||
/*@}*/ // group: Mouse and Keyboard Events
|
||||
|
||||
/** \name Mouse Buttons
|
||||
|
||||
@ -521,43 +519,43 @@ enum Fl_When { // Fl_Widget::when():
|
||||
|
||||
/*@{*/
|
||||
|
||||
#define FL_LEFT_MOUSE 1 ///< The left mouse button
|
||||
#define FL_MIDDLE_MOUSE 2 ///< The middle mouse button
|
||||
#define FL_RIGHT_MOUSE 3 ///< The right mouse button
|
||||
#define FL_LEFT_MOUSE 1 ///< The left mouse button
|
||||
#define FL_MIDDLE_MOUSE 2 ///< The middle mouse button
|
||||
#define FL_RIGHT_MOUSE 3 ///< The right mouse button
|
||||
|
||||
/*@}*/ // group: Mouse Buttons
|
||||
/*@}*/ // group: Mouse Buttons
|
||||
|
||||
|
||||
/** \name Event States
|
||||
/** \name Event States
|
||||
|
||||
The following constants define bits in the Fl::event_state() value.
|
||||
The following constants define bits in the Fl::event_state() value.
|
||||
*/
|
||||
|
||||
/*@{*/ // group: Event States
|
||||
/*@{*/ // group: Event States
|
||||
|
||||
// FIXME: it would be nice to have the modifiers in the upper 8 bit so that
|
||||
// a unicode key (24bit) can be sent as an unsigned with the modifiers.
|
||||
|
||||
#define FL_SHIFT 0x00010000 ///< One of the shift keys is down
|
||||
#define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on
|
||||
#define FL_CTRL 0x00040000 ///< One of the ctrl keys is down
|
||||
#define FL_ALT 0x00080000 ///< One of the alt keys is down
|
||||
#define FL_NUM_LOCK 0x00100000 ///< The num lock is on
|
||||
// most X servers do this?
|
||||
#define FL_META 0x00400000 ///< One of the meta/Windows keys is down
|
||||
// correct for XFree86
|
||||
#define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on
|
||||
// correct for XFree86
|
||||
#define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed
|
||||
#define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed
|
||||
#define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed
|
||||
#define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed
|
||||
#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
|
||||
#define FL_SHIFT 0x00010000 ///< One of the shift keys is down
|
||||
#define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on
|
||||
#define FL_CTRL 0x00040000 ///< One of the ctrl keys is down
|
||||
#define FL_ALT 0x00080000 ///< One of the alt keys is down
|
||||
#define FL_NUM_LOCK 0x00100000 ///< The num lock is on
|
||||
// most X servers do this?
|
||||
#define FL_META 0x00400000 ///< One of the meta/Windows keys is down
|
||||
// correct for XFree86
|
||||
#define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on
|
||||
// correct for XFree86
|
||||
#define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed
|
||||
#define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed
|
||||
#define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed
|
||||
#define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed
|
||||
#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
|
||||
|
||||
#define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now
|
||||
// FIXME: Unicode needs 24 bits!
|
||||
#define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now
|
||||
// FIXME: Unicode needs 24 bits!
|
||||
|
||||
/*@}*/ // group: Event States
|
||||
/*@}*/ // group: Event States
|
||||
|
||||
/** \name Box Types
|
||||
\brief FLTK standard box types
|
||||
@ -570,20 +568,20 @@ enum Fl_When { // Fl_Widget::when():
|
||||
leading underscore in your code! Enum values with leading underscores
|
||||
are reserved for internal use and subject to change without notice!
|
||||
|
||||
FL_NO_BOX means nothing is drawn at all, so whatever is already
|
||||
on the screen remains. The FL_..._FRAME types only draw their edges,
|
||||
leaving the interior unchanged. The blue color in Figure 1
|
||||
FL_NO_BOX means nothing is drawn at all, so whatever is already
|
||||
on the screen remains. The FL_..._FRAME types only draw their edges,
|
||||
leaving the interior unchanged. The blue color in Figure 1
|
||||
is the area that is not drawn by the frame types.
|
||||
|
||||
\image html boxtypes.png "Figure 1: FLTK standard box types"
|
||||
\image latex boxtypes.png "FLTK standard box types" width=10cm
|
||||
|
||||
\todo Description of boxtypes is incomplete.
|
||||
See below for the defined enum Fl_Boxtype.
|
||||
\see src/Fl_get_system_colors.cxx
|
||||
\todo Description of boxtypes is incomplete.
|
||||
See below for the defined enum Fl_Boxtype.
|
||||
\see src/Fl_get_system_colors.cxx
|
||||
*/
|
||||
|
||||
/*@{*/ // group: Box Types
|
||||
/*@{*/ // group: Box Types
|
||||
|
||||
/**
|
||||
\brief FLTK standard box types
|
||||
@ -599,63 +597,63 @@ enum Fl_When { // Fl_Widget::when():
|
||||
*/
|
||||
enum Fl_Boxtype { // boxtypes (if you change these you must also change fl_boxtype.cxx):
|
||||
|
||||
FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible
|
||||
FL_FLAT_BOX, ///< a flat box
|
||||
FL_UP_BOX, ///< see figure 1
|
||||
FL_DOWN_BOX, ///< see figure 1
|
||||
FL_UP_FRAME, ///< see figure 1
|
||||
FL_DOWN_FRAME, ///< see figure 1
|
||||
FL_THIN_UP_BOX, ///< see figure 1
|
||||
FL_THIN_DOWN_BOX, ///< see figure 1
|
||||
FL_THIN_UP_FRAME, ///< see figure 1
|
||||
FL_THIN_DOWN_FRAME, ///< see figure 1
|
||||
FL_ENGRAVED_BOX, ///< see figure 1
|
||||
FL_EMBOSSED_BOX, ///< see figure 1
|
||||
FL_ENGRAVED_FRAME, ///< see figure 1
|
||||
FL_EMBOSSED_FRAME, ///< see figure 1
|
||||
FL_BORDER_BOX, ///< see figure 1
|
||||
_FL_SHADOW_BOX, ///< see figure 1, use FL_SHADOW_BOX
|
||||
FL_BORDER_FRAME, ///< see figure 1
|
||||
_FL_SHADOW_FRAME, ///< see figure 1, use FL_SHADOW_FRAME
|
||||
_FL_ROUNDED_BOX, ///< see figure 1, use FL_ROUNDED_BOX
|
||||
_FL_RSHADOW_BOX, ///< see figure 1, use FL_RSHADOW_BOX
|
||||
_FL_ROUNDED_FRAME, ///< see figure 1, use FL_ROUNDED_FRAME
|
||||
_FL_RFLAT_BOX, ///< see figure 1, use FL_RFLAT_BOX
|
||||
_FL_ROUND_UP_BOX, ///< see figure 1, use FL_ROUND_UP_BOX
|
||||
_FL_ROUND_DOWN_BOX, ///< see figure 1, use FL_ROUND_DOWN_BOX
|
||||
_FL_DIAMOND_UP_BOX, ///< see figure 1, use FL_DIAMOND_UP_BOX
|
||||
_FL_DIAMOND_DOWN_BOX, ///< see figure 1, use FL_DIAMOND_DOWN_BOX
|
||||
_FL_OVAL_BOX, ///< see figure 1, use FL_OVAL_BOX
|
||||
_FL_OSHADOW_BOX, ///< see figure 1, use FL_OSHADOW_BOX
|
||||
_FL_OVAL_FRAME, ///< see figure 1, use FL_OVAL_FRAME
|
||||
_FL_OFLAT_BOX, ///< see figure 1, use FL_OFLAT_BOX
|
||||
_FL_PLASTIC_UP_BOX, ///< plastic version of FL_UP_BOX, use FL_PLASTIC_UP_BOX
|
||||
_FL_PLASTIC_DOWN_BOX, ///< plastic version of FL_DOWN_BOX, use FL_PLASTIC_DOWN_BOX
|
||||
_FL_PLASTIC_UP_FRAME, ///< plastic version of FL_UP_FRAME, use FL_PLASTIC_UP_FRAME
|
||||
_FL_PLASTIC_DOWN_FRAME, ///< plastic version of FL_DOWN_FRAME, use FL_PLASTIC_DOWN_FRAME
|
||||
_FL_PLASTIC_THIN_UP_BOX, ///< plastic version of FL_THIN_UP_BOX, use FL_PLASTIC_THIN_UP_BOX
|
||||
_FL_PLASTIC_THIN_DOWN_BOX, ///< plastic version of FL_THIN_DOWN_BOX, use FL_PLASTIC_THIN_DOWN_BOX
|
||||
_FL_PLASTIC_ROUND_UP_BOX, ///< plastic version of FL_ROUND_UP_BOX, use FL_PLASTIC_ROUND_UP_BOX
|
||||
_FL_PLASTIC_ROUND_DOWN_BOX, ///< plastic version of FL_ROUND_DOWN_BOX, use FL_PLASTIC_ROUND_DOWN_BOX
|
||||
_FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX, use FL_GTK_UP_BOX
|
||||
_FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX, use FL_GTK_DOWN_BOX
|
||||
_FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME, use FL_GTK_UP_FRAME
|
||||
_FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME, use FL_GTK_DOWN_FRAME
|
||||
_FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX, use FL_GTK_THIN_UP_BOX
|
||||
_FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX, use FL_GTK_THIN_DOWN_BOX
|
||||
_FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME, use FL_GTK_THIN_UP_FRAME
|
||||
_FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME, use FL_GTK_THIN_DOWN_FRAME
|
||||
_FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX, use FL_GTK_ROUND_UP_BOX
|
||||
_FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX, use FL_GTK_ROUND_DOWN_BOX
|
||||
_FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX, use FL_GLEAM_UP_BOX
|
||||
_FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX, use FL_GLEAM_DOWN_BOX
|
||||
_FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME, use FL_GLEAM_UP_FRAME
|
||||
_FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME, use FL_GLEAM_DOWN_FRAME
|
||||
_FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX, use FL_GLEAM_THIN_UP_BOX
|
||||
_FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX, use FL_GLEAM_THIN_DOWN_BOX
|
||||
_FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX, use FL_GLEAM_ROUND_UP_BOX
|
||||
_FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX, use FL_GLEAM_ROUND_DOWN_BOX
|
||||
FL_FREE_BOXTYPE ///< the first free box type for creation of new box types
|
||||
FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible
|
||||
FL_FLAT_BOX, ///< a flat box
|
||||
FL_UP_BOX, ///< see figure 1
|
||||
FL_DOWN_BOX, ///< see figure 1
|
||||
FL_UP_FRAME, ///< see figure 1
|
||||
FL_DOWN_FRAME, ///< see figure 1
|
||||
FL_THIN_UP_BOX, ///< see figure 1
|
||||
FL_THIN_DOWN_BOX, ///< see figure 1
|
||||
FL_THIN_UP_FRAME, ///< see figure 1
|
||||
FL_THIN_DOWN_FRAME, ///< see figure 1
|
||||
FL_ENGRAVED_BOX, ///< see figure 1
|
||||
FL_EMBOSSED_BOX, ///< see figure 1
|
||||
FL_ENGRAVED_FRAME, ///< see figure 1
|
||||
FL_EMBOSSED_FRAME, ///< see figure 1
|
||||
FL_BORDER_BOX, ///< see figure 1
|
||||
_FL_SHADOW_BOX, ///< see figure 1, use FL_SHADOW_BOX
|
||||
FL_BORDER_FRAME, ///< see figure 1
|
||||
_FL_SHADOW_FRAME, ///< see figure 1, use FL_SHADOW_FRAME
|
||||
_FL_ROUNDED_BOX, ///< see figure 1, use FL_ROUNDED_BOX
|
||||
_FL_RSHADOW_BOX, ///< see figure 1, use FL_RSHADOW_BOX
|
||||
_FL_ROUNDED_FRAME, ///< see figure 1, use FL_ROUNDED_FRAME
|
||||
_FL_RFLAT_BOX, ///< see figure 1, use FL_RFLAT_BOX
|
||||
_FL_ROUND_UP_BOX, ///< see figure 1, use FL_ROUND_UP_BOX
|
||||
_FL_ROUND_DOWN_BOX, ///< see figure 1, use FL_ROUND_DOWN_BOX
|
||||
_FL_DIAMOND_UP_BOX, ///< see figure 1, use FL_DIAMOND_UP_BOX
|
||||
_FL_DIAMOND_DOWN_BOX, ///< see figure 1, use FL_DIAMOND_DOWN_BOX
|
||||
_FL_OVAL_BOX, ///< see figure 1, use FL_OVAL_BOX
|
||||
_FL_OSHADOW_BOX, ///< see figure 1, use FL_OSHADOW_BOX
|
||||
_FL_OVAL_FRAME, ///< see figure 1, use FL_OVAL_FRAME
|
||||
_FL_OFLAT_BOX, ///< see figure 1, use FL_OFLAT_BOX
|
||||
_FL_PLASTIC_UP_BOX, ///< plastic version of FL_UP_BOX, use FL_PLASTIC_UP_BOX
|
||||
_FL_PLASTIC_DOWN_BOX, ///< plastic version of FL_DOWN_BOX, use FL_PLASTIC_DOWN_BOX
|
||||
_FL_PLASTIC_UP_FRAME, ///< plastic version of FL_UP_FRAME, use FL_PLASTIC_UP_FRAME
|
||||
_FL_PLASTIC_DOWN_FRAME, ///< plastic version of FL_DOWN_FRAME, use FL_PLASTIC_DOWN_FRAME
|
||||
_FL_PLASTIC_THIN_UP_BOX, ///< plastic version of FL_THIN_UP_BOX, use FL_PLASTIC_THIN_UP_BOX
|
||||
_FL_PLASTIC_THIN_DOWN_BOX, ///< plastic version of FL_THIN_DOWN_BOX, use FL_PLASTIC_THIN_DOWN_BOX
|
||||
_FL_PLASTIC_ROUND_UP_BOX, ///< plastic version of FL_ROUND_UP_BOX, use FL_PLASTIC_ROUND_UP_BOX
|
||||
_FL_PLASTIC_ROUND_DOWN_BOX, ///< plastic version of FL_ROUND_DOWN_BOX, use FL_PLASTIC_ROUND_DOWN_BOX
|
||||
_FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX, use FL_GTK_UP_BOX
|
||||
_FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX, use FL_GTK_DOWN_BOX
|
||||
_FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME, use FL_GTK_UP_FRAME
|
||||
_FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME, use FL_GTK_DOWN_FRAME
|
||||
_FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX, use FL_GTK_THIN_UP_BOX
|
||||
_FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX, use FL_GTK_THIN_DOWN_BOX
|
||||
_FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME, use FL_GTK_THIN_UP_FRAME
|
||||
_FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME, use FL_GTK_THIN_DOWN_FRAME
|
||||
_FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX, use FL_GTK_ROUND_UP_BOX
|
||||
_FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX, use FL_GTK_ROUND_DOWN_BOX
|
||||
_FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX, use FL_GLEAM_UP_BOX
|
||||
_FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX, use FL_GLEAM_DOWN_BOX
|
||||
_FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME, use FL_GLEAM_UP_FRAME
|
||||
_FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME, use FL_GLEAM_DOWN_FRAME
|
||||
_FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX, use FL_GLEAM_THIN_UP_BOX
|
||||
_FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX, use FL_GLEAM_THIN_DOWN_BOX
|
||||
_FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX, use FL_GLEAM_ROUND_UP_BOX
|
||||
_FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX, use FL_GLEAM_ROUND_DOWN_BOX
|
||||
FL_FREE_BOXTYPE ///< the first free box type for creation of new box types
|
||||
};
|
||||
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
|
||||
#define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
|
||||
@ -743,7 +741,7 @@ inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
|
||||
#define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
|
||||
#define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
|
||||
|
||||
/*@}*/ // group: Box Types
|
||||
/*@}*/ // group: Box Types
|
||||
|
||||
/**
|
||||
The labeltype() method sets the type of the label.
|
||||
@ -896,9 +894,9 @@ extern Fl_Labeltype FL_EXPORT fl_define_FL_IMAGE_LABEL();
|
||||
-# Although bits can be or'd together there are some unused/illegal
|
||||
combinations, for instance:
|
||||
- setting both FL_ALIGN_TOP and FL_ALIGN_BOTTOM in combinations other
|
||||
than those given in the \p Fl_Align constants below (magic values)
|
||||
than those given in the \p Fl_Align constants below (magic values)
|
||||
- setting both FL_ALIGN_LEFT and FL_ALIGN_RIGHT in combinations other
|
||||
than those given in the \p Fl_Align constants below (magic values)
|
||||
than those given in the \p Fl_Align constants below (magic values)
|
||||
- using one of the "magic values" (2) together with FL_ALIGN_INSIDE
|
||||
\note
|
||||
Using illegal bit combinations or undefined bits may yield unexpected
|
||||
@ -910,37 +908,37 @@ extern Fl_Labeltype FL_EXPORT fl_define_FL_IMAGE_LABEL();
|
||||
typedef unsigned Fl_Align;
|
||||
|
||||
/** Align the label horizontally in the middle. */
|
||||
const Fl_Align FL_ALIGN_CENTER = 0x0000;
|
||||
const Fl_Align FL_ALIGN_CENTER = 0x0000;
|
||||
|
||||
/** Align the label at the top of the widget. Inside labels appear below the top,
|
||||
outside labels are drawn on top of the widget. */
|
||||
const Fl_Align FL_ALIGN_TOP = 0x0001;
|
||||
const Fl_Align FL_ALIGN_TOP = 0x0001;
|
||||
|
||||
/** Align the label at the bottom of the widget. */
|
||||
const Fl_Align FL_ALIGN_BOTTOM = 0x0002;
|
||||
const Fl_Align FL_ALIGN_BOTTOM = 0x0002;
|
||||
|
||||
/** Align the label at the left of the widget. Inside labels appear left-justified
|
||||
starting at the left side of the widget, outside labels are right-justified and
|
||||
drawn to the left of the widget. */
|
||||
const Fl_Align FL_ALIGN_LEFT = 0x0004;
|
||||
const Fl_Align FL_ALIGN_LEFT = 0x0004;
|
||||
|
||||
/** Align the label to the right of the widget. */
|
||||
const Fl_Align FL_ALIGN_RIGHT = 0x0008;
|
||||
const Fl_Align FL_ALIGN_RIGHT = 0x0008;
|
||||
|
||||
/** Draw the label inside of the widget. */
|
||||
const Fl_Align FL_ALIGN_INSIDE = 0x0010;
|
||||
const Fl_Align FL_ALIGN_INSIDE = 0x0010;
|
||||
|
||||
/** If the label contains an image, draw the text on top of the image. */
|
||||
const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = 0x0020;
|
||||
const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = 0x0020;
|
||||
|
||||
/** If the label contains an image, draw the text below the image. */
|
||||
const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = 0x0000;
|
||||
const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = 0x0000;
|
||||
|
||||
/** All parts of the label that are larger than the widget will not be drawn. */
|
||||
const Fl_Align FL_ALIGN_CLIP = 0x0040;
|
||||
const Fl_Align FL_ALIGN_CLIP = 0x0040;
|
||||
|
||||
/** Wrap text that does not fit the width of the widget. */
|
||||
const Fl_Align FL_ALIGN_WRAP = 0x0080;
|
||||
const Fl_Align FL_ALIGN_WRAP = 0x0080;
|
||||
|
||||
/** If the label contains an image, draw the text to the right of the image. */
|
||||
const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = 0x0100;
|
||||
@ -951,25 +949,25 @@ const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = 0x0120;
|
||||
/** If the label contains an image, draw the image or deimage in the background. */
|
||||
const Fl_Align FL_ALIGN_IMAGE_BACKDROP = 0x0200;
|
||||
|
||||
const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT;
|
||||
const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
|
||||
const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
|
||||
const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
|
||||
const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT;
|
||||
const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
|
||||
const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
|
||||
const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
|
||||
|
||||
/** Outside only, left of widget, top position, magic value: TOP | BOTTOM | LEFT. */
|
||||
const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007;
|
||||
const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007;
|
||||
|
||||
/** Outside only, right of widget, top position, magic value: TOP | BOTTOM | RIGHT. */
|
||||
const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b;
|
||||
const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b;
|
||||
|
||||
/** Outside only, left of widget, bottom position, magic value: TOP | LEFT | RIGHT. */
|
||||
const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d;
|
||||
const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d;
|
||||
|
||||
/** Outside only, right of widget, bottom position, magic value: BOTTOM | LEFT | RIGHT. */
|
||||
const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e;
|
||||
const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e;
|
||||
|
||||
/** Nothing, same as FL_ALIGN_CENTER, for back compatibility. */
|
||||
const Fl_Align FL_ALIGN_NOWRAP = 0x0000;
|
||||
const Fl_Align FL_ALIGN_NOWRAP = 0x0000;
|
||||
|
||||
/** Mask value to test for TOP, BOTTOM, LEFT, and RIGHT flags. */
|
||||
const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f;
|
||||
@ -986,27 +984,27 @@ const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320;
|
||||
/** A font number is an index into the internal font table. */
|
||||
typedef int Fl_Font;
|
||||
|
||||
const Fl_Font FL_HELVETICA = 0; ///< Helvetica (or Arial) normal (0)
|
||||
const Fl_Font FL_HELVETICA_BOLD = 1; ///< Helvetica (or Arial) bold
|
||||
const Fl_Font FL_HELVETICA_ITALIC = 2; ///< Helvetica (or Arial) oblique
|
||||
const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; ///< Helvetica (or Arial) bold-oblique
|
||||
const Fl_Font FL_COURIER = 4; ///< Courier normal
|
||||
const Fl_Font FL_COURIER_BOLD = 5; ///< Courier bold
|
||||
const Fl_Font FL_COURIER_ITALIC = 6; ///< Courier italic
|
||||
const Fl_Font FL_COURIER_BOLD_ITALIC = 7; ///< Courier bold-italic
|
||||
const Fl_Font FL_TIMES = 8; ///< Times roman
|
||||
const Fl_Font FL_TIMES_BOLD = 9; ///< Times roman bold
|
||||
const Fl_Font FL_TIMES_ITALIC = 10; ///< Times roman italic
|
||||
const Fl_Font FL_TIMES_BOLD_ITALIC = 11; ///< Times roman bold-italic
|
||||
const Fl_Font FL_SYMBOL = 12; ///< Standard symbol font
|
||||
const Fl_Font FL_SCREEN = 13; ///< Default monospaced screen font
|
||||
const Fl_Font FL_SCREEN_BOLD = 14; ///< Default monospaced bold screen font
|
||||
const Fl_Font FL_ZAPF_DINGBATS = 15; ///< Zapf-dingbats font
|
||||
const Fl_Font FL_HELVETICA = 0; ///< Helvetica (or Arial) normal (0)
|
||||
const Fl_Font FL_HELVETICA_BOLD = 1; ///< Helvetica (or Arial) bold
|
||||
const Fl_Font FL_HELVETICA_ITALIC = 2; ///< Helvetica (or Arial) oblique
|
||||
const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; ///< Helvetica (or Arial) bold-oblique
|
||||
const Fl_Font FL_COURIER = 4; ///< Courier normal
|
||||
const Fl_Font FL_COURIER_BOLD = 5; ///< Courier bold
|
||||
const Fl_Font FL_COURIER_ITALIC = 6; ///< Courier italic
|
||||
const Fl_Font FL_COURIER_BOLD_ITALIC = 7; ///< Courier bold-italic
|
||||
const Fl_Font FL_TIMES = 8; ///< Times roman
|
||||
const Fl_Font FL_TIMES_BOLD = 9; ///< Times roman bold
|
||||
const Fl_Font FL_TIMES_ITALIC = 10; ///< Times roman italic
|
||||
const Fl_Font FL_TIMES_BOLD_ITALIC = 11; ///< Times roman bold-italic
|
||||
const Fl_Font FL_SYMBOL = 12; ///< Standard symbol font
|
||||
const Fl_Font FL_SCREEN = 13; ///< Default monospaced screen font
|
||||
const Fl_Font FL_SCREEN_BOLD = 14; ///< Default monospaced bold screen font
|
||||
const Fl_Font FL_ZAPF_DINGBATS = 15; ///< Zapf-dingbats font
|
||||
|
||||
const Fl_Font FL_FREE_FONT = 16; ///< first one to allocate
|
||||
const Fl_Font FL_BOLD = 1; ///< add this to helvetica, courier, or times
|
||||
const Fl_Font FL_ITALIC = 2; ///< add this to helvetica, courier, or times
|
||||
const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier, or times
|
||||
const Fl_Font FL_FREE_FONT = 16; ///< first one to allocate
|
||||
const Fl_Font FL_BOLD = 1; ///< add this to helvetica, courier, or times
|
||||
const Fl_Font FL_ITALIC = 2; ///< add this to helvetica, courier, or times
|
||||
const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier, or times
|
||||
|
||||
/*@}*/
|
||||
|
||||
@ -1015,9 +1013,9 @@ const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier
|
||||
*/
|
||||
typedef int Fl_Fontsize;
|
||||
|
||||
extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
|
||||
extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
|
||||
|
||||
/** \name Colors
|
||||
/** \name Colors
|
||||
The Fl_Color type holds an FLTK color value.
|
||||
|
||||
Colors are either 8-bit indexes into a <a href="fltk-colormap.png">virtual colormap</a>
|
||||
@ -1035,7 +1033,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
|
||||
+--------- red component (8 bit)
|
||||
</pre>
|
||||
|
||||
A color can have either an index or an rgb value. Colors with rgb set
|
||||
A color can have either an index or an rgb value. Colors with rgb set
|
||||
and an index >0 are reserved for special use.
|
||||
|
||||
*/
|
||||
@ -1044,22 +1042,22 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
|
||||
typedef unsigned int Fl_Color;
|
||||
|
||||
// Standard colors. These are used as default colors in widgets and altered as necessary
|
||||
const Fl_Color FL_FOREGROUND_COLOR = 0; ///< the default foreground color (0) used for labels and text
|
||||
const Fl_Color FL_BACKGROUND2_COLOR = 7; ///< the default background color for text, list, and valuator widgets
|
||||
const Fl_Color FL_INACTIVE_COLOR = 8; ///< the inactive foreground color
|
||||
const Fl_Color FL_SELECTION_COLOR = 15; ///< the default selection/highlight color
|
||||
const Fl_Color FL_FOREGROUND_COLOR = 0; ///< the default foreground color (0) used for labels and text
|
||||
const Fl_Color FL_BACKGROUND2_COLOR = 7; ///< the default background color for text, list, and valuator widgets
|
||||
const Fl_Color FL_INACTIVE_COLOR = 8; ///< the inactive foreground color
|
||||
const Fl_Color FL_SELECTION_COLOR = 15; ///< the default selection/highlight color
|
||||
|
||||
// boxtypes generally limit themselves to these colors so
|
||||
// the whole ramp is not allocated:
|
||||
|
||||
const Fl_Color FL_GRAY0 = 32; // 'A'
|
||||
const Fl_Color FL_DARK3 = 39; // 'H'
|
||||
const Fl_Color FL_DARK2 = 45; // 'N'
|
||||
const Fl_Color FL_DARK1 = 47; // 'P'
|
||||
const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color
|
||||
const Fl_Color FL_LIGHT1 = 50; // 'S'
|
||||
const Fl_Color FL_LIGHT2 = 52; // 'U'
|
||||
const Fl_Color FL_LIGHT3 = 54; // 'W'
|
||||
const Fl_Color FL_GRAY0 = 32; // 'A'
|
||||
const Fl_Color FL_DARK3 = 39; // 'H'
|
||||
const Fl_Color FL_DARK2 = 45; // 'N'
|
||||
const Fl_Color FL_DARK1 = 47; // 'P'
|
||||
const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color
|
||||
const Fl_Color FL_LIGHT1 = 50; // 'S'
|
||||
const Fl_Color FL_LIGHT2 = 52; // 'U'
|
||||
const Fl_Color FL_LIGHT3 = 54; // 'W'
|
||||
|
||||
// FLTK provides a 5x8x5 color cube that is used with colormap visuals
|
||||
|
||||
@ -1142,7 +1140,7 @@ 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);}
|
||||
|
||||
/*@}*/ // group: Colors
|
||||
/*@}*/ // group: Colors
|
||||
|
||||
/** \name Cursors */
|
||||
/*@{*/
|
||||
@ -1181,7 +1179,7 @@ enum Fl_Cursor {
|
||||
|
||||
FL_CURSOR_NONE =255 /**< invisible. */
|
||||
};
|
||||
/*@}*/ // group: Cursors
|
||||
/*@}*/ // group: Cursors
|
||||
|
||||
/** FD "when" conditions */
|
||||
enum { // values for "when" passed to Fl::add_fd()
|
||||
@ -1191,19 +1189,19 @@ enum { // values for "when" passed to Fl::add_fd()
|
||||
};
|
||||
|
||||
/** visual types and Fl_Gl_Window::mode() (values match Glut) */
|
||||
enum Fl_Mode {
|
||||
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,
|
||||
enum Fl_Mode {
|
||||
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
|
||||
FL_FAKE_SINGLE = 512, // Fake single buffered windows using double-buffer
|
||||
FL_OPENGL3 = 1024
|
||||
};
|
||||
|
||||
@ -1225,7 +1223,3 @@ enum Fl_Damage {
|
||||
// FLTK 1.0.x compatibility definitions (FLTK_1_0_COMPAT) dropped in 1.4.0
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
308
FL/Fl.H
308
FL/Fl.H
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@ -11,9 +9,9 @@
|
||||
//
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// https://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file
|
||||
@ -33,7 +31,7 @@
|
||||
# include "fl_utf8.h"
|
||||
# include "Enumerations.H"
|
||||
# ifndef Fl_Object
|
||||
# define Fl_Object Fl_Widget /**< for back compatibility - use Fl_Widget! */
|
||||
# define Fl_Object Fl_Widget /**< for back compatibility - use Fl_Widget! */
|
||||
# endif
|
||||
|
||||
# ifdef check
|
||||
@ -72,7 +70,7 @@ extern FL_EXPORT const char* fl_local_shift; ///< string pointer used in shortcu
|
||||
callback function to handle such events in the user's code.
|
||||
|
||||
\see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(),
|
||||
Fl::remove_timeout() and others
|
||||
Fl::remove_timeout() and others
|
||||
@{ */
|
||||
|
||||
/** Signature of some label drawing functions passed as parameters */
|
||||
@ -206,7 +204,7 @@ public: // should be private!
|
||||
If true then flush() will do something.
|
||||
*/
|
||||
static void damage(int d) {damage_ = d;}
|
||||
|
||||
|
||||
public:
|
||||
/** Enumerator for global FLTK options.
|
||||
These options can be set system wide, per user, or for the running
|
||||
@ -225,7 +223,7 @@ public:
|
||||
/// See also: Fl_Input_::tab_nav()
|
||||
///
|
||||
OPTION_ARROW_FOCUS = 0,
|
||||
// When switched on, FLTK will use the file chooser dialog that comes
|
||||
// When switched on, FLTK will use the file chooser dialog that comes
|
||||
// with your operating system whenever possible. When switched off, FLTK
|
||||
// will present its own file chooser.
|
||||
// \todo implement me
|
||||
@ -235,7 +233,7 @@ public:
|
||||
// decides to choose the file.
|
||||
// \todo implement me
|
||||
//OPTION_FILECHOOSER_PREVIEW,
|
||||
/// If visible focus is switched on (default), FLTK will draw a dotted rectangle
|
||||
/// If visible focus is switched on (default), FLTK will draw a dotted rectangle
|
||||
/// inside the widget that will receive the next keystroke. If switched
|
||||
/// off, no such indicator will be drawn and keyboard navigation
|
||||
/// is disabled.
|
||||
@ -244,7 +242,7 @@ public:
|
||||
/// from any text widget. If disabled, no dragging is possible, however
|
||||
/// dropping text from other applications still works.
|
||||
OPTION_DND_TEXT,
|
||||
/// If tooltips are enabled (default), hovering the mouse over a widget with a
|
||||
/// If tooltips are enabled (default), hovering the mouse over a widget with a
|
||||
/// tooltip text will open a little tooltip window until the mouse leaves
|
||||
/// the widget. If disabled, no tooltip is shown.
|
||||
OPTION_SHOW_TOOLTIPS,
|
||||
@ -265,26 +263,26 @@ public:
|
||||
OPTION_LAST
|
||||
} Fl_Option;
|
||||
|
||||
private:
|
||||
private:
|
||||
static unsigned char options_[OPTION_LAST];
|
||||
static unsigned char options_read_;
|
||||
static int program_should_quit_; // non-zero means the program was asked to cleanly terminate
|
||||
|
||||
public:
|
||||
public:
|
||||
/*
|
||||
Return a global setting for all FLTK applications, possibly overridden
|
||||
by a setting specifically for this application.
|
||||
*/
|
||||
static bool option(Fl_Option opt);
|
||||
|
||||
|
||||
/*
|
||||
Override an option while the application is running.
|
||||
*/
|
||||
static void option(Fl_Option opt, bool val);
|
||||
|
||||
|
||||
/**
|
||||
The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
|
||||
|
||||
|
||||
This is now used as part of a higher level system allowing multiple
|
||||
idle callback functions to be called.
|
||||
\see add_idle(), remove_idle()
|
||||
@ -302,7 +300,7 @@ public:
|
||||
|
||||
static int e_original_keysym; // late addition
|
||||
static int scrollbar_size_;
|
||||
static int menu_linespacing_; // STR #2927
|
||||
static int menu_linespacing_; // STR #2927
|
||||
#endif
|
||||
|
||||
|
||||
@ -409,9 +407,9 @@ public:
|
||||
return (scheme_ && name && !strcmp(name,scheme_));
|
||||
}
|
||||
/**
|
||||
Called by scheme according to scheme name.
|
||||
Loads or reloads the current scheme selection.
|
||||
See void scheme(const char *name)
|
||||
Called by scheme according to scheme name.
|
||||
Loads or reloads the current scheme selection.
|
||||
See void scheme(const char *name)
|
||||
*/
|
||||
static int reload_scheme(); // platform dependent
|
||||
static int scrollbar_size();
|
||||
@ -444,16 +442,16 @@ public:
|
||||
Adds a one-shot timeout callback. The function will be called by
|
||||
Fl::wait() at <i>t</i> seconds after this function is called.
|
||||
The optional void* argument is passed to the callback.
|
||||
|
||||
|
||||
You can have multiple timeout callbacks. To remove a timeout
|
||||
callback use Fl::remove_timeout().
|
||||
|
||||
|
||||
If you need more accurate, repeated timeouts, use Fl::repeat_timeout() to
|
||||
reschedule the subsequent timeouts.
|
||||
|
||||
|
||||
The following code will print "TICK" each second on
|
||||
stdout with a fair degree of accuracy:
|
||||
|
||||
|
||||
\code
|
||||
#include <stdio.h>
|
||||
#include <FL/Fl.H>
|
||||
@ -520,7 +518,7 @@ int main() {
|
||||
@{ */
|
||||
/**
|
||||
FLTK calls Fl::warning() to output a warning message.
|
||||
|
||||
|
||||
The default version on Windows returns \e without printing a warning
|
||||
message, because Windows programs normally don't have stderr (a console
|
||||
window) enabled.
|
||||
@ -539,7 +537,7 @@ int main() {
|
||||
static void (*warning)(const char*, ...);
|
||||
/**
|
||||
FLTK calls Fl::error() to output a normal error message.
|
||||
|
||||
|
||||
The default version on Windows displays the error message in a MessageBox window.
|
||||
|
||||
The default version on all other platforms prints the error message to stderr.
|
||||
@ -554,11 +552,11 @@ int main() {
|
||||
static void (*error)(const char*, ...);
|
||||
/**
|
||||
FLTK calls Fl::fatal() to output a fatal error message.
|
||||
|
||||
|
||||
The default version on Windows displays the error message in a MessageBox window.
|
||||
|
||||
The default version on all other platforms prints the error message to stderr.
|
||||
|
||||
|
||||
You can override the behavior by setting the function pointer to your
|
||||
own routine.
|
||||
|
||||
@ -589,14 +587,14 @@ int main() {
|
||||
*/
|
||||
static Fl_Window* modal() {return modal_;}
|
||||
/** Returns the window that currently receives all events.
|
||||
|
||||
|
||||
\return The window that currently receives all events,
|
||||
or NULL if event grabbing is currently OFF.
|
||||
*/
|
||||
static Fl_Window* grab() {return grab_;}
|
||||
/** Selects the window to grab.
|
||||
/** Selects the window to grab.
|
||||
This is used when pop-up menu systems are active.
|
||||
|
||||
|
||||
Send all events to the passed window no matter where the pointer or
|
||||
focus is (including in other programs). The window <I>does not have
|
||||
to be shown()</I> , this lets the handle() method of a
|
||||
@ -604,26 +602,26 @@ int main() {
|
||||
map and unmap a complex set of windows (under both X and Windows
|
||||
<I>some</I> window must be mapped because the system interface needs a
|
||||
window id).
|
||||
|
||||
|
||||
If grab() is on it will also affect show() of windows by doing
|
||||
system-specific operations (on X it turns on override-redirect).
|
||||
These are designed to make menus popup reliably
|
||||
and faster on the system.
|
||||
|
||||
|
||||
To turn off grabbing do Fl::grab(0).
|
||||
|
||||
|
||||
<I>Be careful that your program does not enter an infinite loop
|
||||
while grab() is on. On X this will lock up your screen!</I>
|
||||
To avoid this potential lockup, all newer operating systems seem to
|
||||
limit mouse pointer grabbing to the time during which a mouse button
|
||||
To avoid this potential lockup, all newer operating systems seem to
|
||||
limit mouse pointer grabbing to the time during which a mouse button
|
||||
is held down. Some OS's may not support grabbing at all.
|
||||
*/
|
||||
static void grab(Fl_Window*); // platform dependent
|
||||
/** @} */
|
||||
|
||||
/** \defgroup fl_events Events handling functions
|
||||
Fl class events handling API declared in <FL/Fl.H>
|
||||
@{
|
||||
Fl class events handling API declared in <FL/Fl.H>
|
||||
@{
|
||||
*/
|
||||
// event information:
|
||||
/**
|
||||
@ -631,44 +629,44 @@ int main() {
|
||||
to determine if a callback is being done in response to a
|
||||
keypress, mouse click, etc.
|
||||
*/
|
||||
static int event() {return e_number;}
|
||||
static int event() {return e_number;}
|
||||
/**
|
||||
Returns the mouse position of the event relative to the Fl_Window
|
||||
it was passed to.
|
||||
*/
|
||||
static int event_x() {return e_x;}
|
||||
static int event_x() {return e_x;}
|
||||
/**
|
||||
Returns the mouse position of the event relative to the Fl_Window
|
||||
it was passed to.
|
||||
*/
|
||||
static int event_y() {return e_y;}
|
||||
static int event_y() {return e_y;}
|
||||
/**
|
||||
Returns the mouse position on the screen of the event. To find the
|
||||
absolute position of an Fl_Window on the screen, use the
|
||||
difference between event_x_root(),event_y_root() and
|
||||
difference between event_x_root(),event_y_root() and
|
||||
event_x(),event_y().
|
||||
*/
|
||||
static int event_x_root() {return e_x_root;}
|
||||
static int event_x_root() {return e_x_root;}
|
||||
/**
|
||||
Returns the mouse position on the screen of the event. To find the
|
||||
absolute position of an Fl_Window on the screen, use the
|
||||
difference between event_x_root(),event_y_root() and
|
||||
difference between event_x_root(),event_y_root() and
|
||||
event_x(),event_y().
|
||||
*/
|
||||
static int event_y_root() {return e_y_root;}
|
||||
static int event_y_root() {return e_y_root;}
|
||||
/**
|
||||
Returns the current horizontal mouse scrolling associated with the
|
||||
FL_MOUSEWHEEL event. Right is positive.
|
||||
*/
|
||||
static int event_dx() {return e_dx;}
|
||||
static int event_dx() {return e_dx;}
|
||||
/**
|
||||
Returns the current vertical mouse scrolling associated with the
|
||||
FL_MOUSEWHEEL event. Down is positive.
|
||||
*/
|
||||
static int event_dy() {return e_dy;}
|
||||
static int event_dy() {return e_dy;}
|
||||
/**
|
||||
Return where the mouse is on the screen by doing a round-trip query to
|
||||
the server. You should use Fl::event_x_root() and
|
||||
the server. You should use Fl::event_x_root() and
|
||||
Fl::event_y_root() if possible, but this is necessary if you are
|
||||
not sure if a mouse event has been processed recently (such as to
|
||||
position your first window). If the display is not open, this will
|
||||
@ -677,15 +675,15 @@ int main() {
|
||||
static void get_mouse(int &,int &);
|
||||
/**
|
||||
Returns non zero if we had a double click event.
|
||||
\retval Non-zero if the most recent FL_PUSH or FL_KEYBOARD was a "double click".
|
||||
\retval N-1 for N clicks.
|
||||
\retval Non-zero if the most recent FL_PUSH or FL_KEYBOARD was a "double click".
|
||||
\retval N-1 for N clicks.
|
||||
A double click is counted if the same button is pressed
|
||||
again while event_is_click() is true.
|
||||
|
||||
|
||||
*/
|
||||
static int event_clicks() {return e_clicks;}
|
||||
static int event_clicks() {return e_clicks;}
|
||||
/**
|
||||
Manually sets the number returned by Fl::event_clicks().
|
||||
Manually sets the number returned by Fl::event_clicks().
|
||||
This can be used to set it to zero so that
|
||||
later code does not think an item was double-clicked.
|
||||
\param[in] i corresponds to no double-click if 0, i+1 mouse clicks otherwise
|
||||
@ -694,17 +692,17 @@ int main() {
|
||||
static void event_clicks(int i) {e_clicks = i;}
|
||||
/**
|
||||
Returns non-zero if the mouse has not moved far enough
|
||||
and not enough time has passed since the last FL_PUSH or
|
||||
and not enough time has passed since the last FL_PUSH or
|
||||
FL_KEYBOARD event for it to be considered a "drag" rather than a
|
||||
"click". You can test this on FL_DRAG, FL_RELEASE,
|
||||
and FL_MOVE events.
|
||||
and FL_MOVE events.
|
||||
*/
|
||||
static int event_is_click() {return e_is_click;}
|
||||
static int event_is_click() {return e_is_click;}
|
||||
/**
|
||||
Clears the value returned by Fl::event_is_click().
|
||||
Clears the value returned by Fl::event_is_click().
|
||||
Useful to prevent the <I>next</I>
|
||||
click from being counted as a double-click or to make a popup menu
|
||||
pick an item with a single click. Don't pass non-zero to this.
|
||||
pick an item with a single click. Don't pass non-zero to this.
|
||||
*/
|
||||
static void event_is_click(int i) {e_is_click = i;}
|
||||
/**
|
||||
@ -716,7 +714,7 @@ int main() {
|
||||
\retval FL_RIGHT_MOUSE.
|
||||
\see Fl::event_buttons()
|
||||
*/
|
||||
static int event_button() {return e_keysym-FL_Button;}
|
||||
static int event_button() {return e_keysym-FL_Button;}
|
||||
/**
|
||||
Returns the keyboard and mouse button states of the last event.
|
||||
|
||||
@ -735,14 +733,14 @@ int main() {
|
||||
- FL_BUTTON1
|
||||
- FL_BUTTON2
|
||||
- FL_BUTTON3
|
||||
|
||||
|
||||
X servers do not agree on shift states, and FL_NUM_LOCK, FL_META, and
|
||||
FL_SCROLL_LOCK may not work. The values were selected to match the
|
||||
XFree86 server on Linux. In addition there is a bug in the way X works
|
||||
so that the shift state is not correctly reported until the first event
|
||||
<I>after</I> the shift key is pressed or released.
|
||||
*/
|
||||
static int event_state() {return e_state;}
|
||||
static int event_state() {return e_state;}
|
||||
|
||||
/** Returns non-zero if any of the passed event state bits are turned on.
|
||||
|
||||
@ -754,74 +752,74 @@ int main() {
|
||||
Gets which key on the keyboard was last pushed.
|
||||
|
||||
The returned integer 'key code' is not necessarily a text
|
||||
equivalent for the keystroke. For instance: if someone presses '5' on the
|
||||
equivalent for the keystroke. For instance: if someone presses '5' on the
|
||||
numeric keypad with numlock on, Fl::event_key() may return the 'key code'
|
||||
for this key, and NOT the character '5'. To always get the '5', use Fl::event_text() instead.
|
||||
|
||||
|
||||
\returns an integer 'key code', or 0 if the last event was not a key press or release.
|
||||
\see int event_key(int), event_text(), compose(int&).
|
||||
*/
|
||||
static int event_key() {return e_keysym;}
|
||||
static int event_key() {return e_keysym;}
|
||||
/**
|
||||
Returns the keycode of the last key event, regardless of the NumLock state.
|
||||
|
||||
If NumLock is deactivated, FLTK translates events from the
|
||||
numeric keypad into the corresponding arrow key events.
|
||||
|
||||
If NumLock is deactivated, FLTK translates events from the
|
||||
numeric keypad into the corresponding arrow key events.
|
||||
event_key() returns the translated key code, whereas
|
||||
event_original_key() returns the keycode before NumLock translation.
|
||||
*/
|
||||
static int event_original_key(){return e_original_keysym;}
|
||||
/**
|
||||
/**
|
||||
Returns true if the given \p key was held
|
||||
down (or pressed) <I>during</I> the last event. This is constant until
|
||||
the next event is read from the server.
|
||||
|
||||
|
||||
Fl::get_key(int) returns true if the given key is held down <I>now</I>.
|
||||
Under X this requires a round-trip to the server and is <I>much</I>
|
||||
slower than Fl::event_key(int).
|
||||
|
||||
|
||||
Keys are identified by the <I>unshifted</I> values. FLTK defines a
|
||||
set of symbols that should work on most modern machines for every key
|
||||
on the keyboard:
|
||||
|
||||
|
||||
\li All keys on the main keyboard producing a printable ASCII
|
||||
character use the value of that ASCII character (as though shift,
|
||||
ctrl, and caps lock were not on). The space bar is 32.
|
||||
character use the value of that ASCII character (as though shift,
|
||||
ctrl, and caps lock were not on). The space bar is 32.
|
||||
\li All keys on the numeric keypad producing a printable ASCII
|
||||
character use the value of that ASCII character plus FL_KP.
|
||||
The highest possible value is FL_KP_Last so you can
|
||||
range-check to see if something is on the keypad.
|
||||
\li All numbered function keys use the number on the function key plus
|
||||
FL_F. The highest possible number is FL_F_Last, so you
|
||||
can range-check a value.
|
||||
character use the value of that ASCII character plus FL_KP.
|
||||
The highest possible value is FL_KP_Last so you can
|
||||
range-check to see if something is on the keypad.
|
||||
\li All numbered function keys use the number on the function key plus
|
||||
FL_F. The highest possible number is FL_F_Last, so you
|
||||
can range-check a value.
|
||||
\li Buttons on the mouse are considered keys, and use the button
|
||||
number (where the left button is 1) plus FL_Button.
|
||||
number (where the left button is 1) plus FL_Button.
|
||||
\li All other keys on the keypad have a symbol: FL_Escape,
|
||||
FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause,
|
||||
FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down,
|
||||
FL_Left, FL_Up, FL_Right, FL_Down, FL_Iso_Key, FL_Shift_L, FL_Shift_R,
|
||||
FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R,
|
||||
FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter. Be
|
||||
careful not to confuse these with the very similar, but all-caps,
|
||||
symbols used by Fl::event_state().
|
||||
FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause,
|
||||
FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down,
|
||||
FL_Left, FL_Up, FL_Right, FL_Down, FL_Iso_Key, FL_Shift_L, FL_Shift_R,
|
||||
FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R,
|
||||
FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter. Be
|
||||
careful not to confuse these with the very similar, but all-caps,
|
||||
symbols used by Fl::event_state().
|
||||
|
||||
On X Fl::get_key(FL_Button+n) does not work.
|
||||
|
||||
|
||||
On Windows Fl::get_key(FL_KP_Enter) and Fl::event_key(FL_KP_Enter) do not work.
|
||||
*/
|
||||
static int event_key(int key);
|
||||
/**
|
||||
Returns true if the given \p key is held down <I>now</I>.
|
||||
/**
|
||||
Returns true if the given \p key is held down <I>now</I>.
|
||||
Under X this requires a round-trip to the server and is <I>much</I>
|
||||
slower than Fl::event_key(int). \see event_key(int)
|
||||
*/
|
||||
static int get_key(int key); // platform dependent
|
||||
/**
|
||||
/**
|
||||
Returns the text associated with the current event, including FL_PASTE or FL_DND_RELEASE events.
|
||||
This can be used in response to FL_KEYUP, FL_KEYDOWN, FL_PASTE, and FL_DND_RELEASE.
|
||||
|
||||
When responding to FL_KEYUP/FL_KEYDOWN, use this function instead of Fl::event_key()
|
||||
to get the text equivalent of keystrokes suitable for inserting into strings
|
||||
to get the text equivalent of keystrokes suitable for inserting into strings
|
||||
and text widgets.
|
||||
|
||||
The returned string is guaranteed to be NULL terminated.
|
||||
@ -838,7 +836,7 @@ int main() {
|
||||
you paste a nul character.
|
||||
*/
|
||||
static int event_length() {return e_length;}
|
||||
|
||||
|
||||
/** During an FL_PASTE event of non-textual data, returns a pointer to the pasted data.
|
||||
The returned data is an Fl_RGB_Image * when the result of Fl::event_clipboard_type() is Fl::clipboard_image.
|
||||
*/
|
||||
@ -861,16 +859,16 @@ int main() {
|
||||
// event destinations:
|
||||
static int handle(int, Fl_Window*);
|
||||
static int handle_(int, Fl_Window*);
|
||||
/** Gets the widget that is below the mouse.
|
||||
/** Gets the widget that is below the mouse.
|
||||
\see belowmouse(Fl_Widget*) */
|
||||
static Fl_Widget* belowmouse() {return belowmouse_;}
|
||||
static void belowmouse(Fl_Widget*);
|
||||
/** Gets the widget that is being pushed.
|
||||
\see void pushed(Fl_Widget*) */
|
||||
static Fl_Widget* pushed() {return pushed_;}
|
||||
static Fl_Widget* pushed() {return pushed_;}
|
||||
static void pushed(Fl_Widget*);
|
||||
/** Gets the current Fl::focus() widget. \sa Fl::focus(Fl_Widget*) */
|
||||
static Fl_Widget* focus() {return focus_;}
|
||||
static Fl_Widget* focus() {return focus_;}
|
||||
static void focus(Fl_Widget*);
|
||||
static void add_handler(Fl_Event_Handler h);
|
||||
static void remove_handler(Fl_Event_Handler h);
|
||||
@ -881,20 +879,20 @@ int main() {
|
||||
/** @} */
|
||||
|
||||
/** \defgroup fl_clipboard Selection & Clipboard functions
|
||||
FLTK global copy/cut/paste functions declared in <FL/Fl.H>
|
||||
FLTK global copy/cut/paste functions declared in <FL/Fl.H>
|
||||
@{ */
|
||||
// cut/paste:
|
||||
/**
|
||||
Copies the data pointed to by \p stuff to the selection buffer
|
||||
Copies the data pointed to by \p stuff to the selection buffer
|
||||
(\p destination is 0), the clipboard (\p destination is 1), or
|
||||
both (\p destination is 2). Copying to both is only relevant on X11,
|
||||
on other platforms it maps to the clipboard (1).
|
||||
\p len is the number of relevant bytes in \p stuff.
|
||||
\p type is always Fl::clipboard_plain_text.
|
||||
The selection buffer is used for
|
||||
middle-mouse pastes and for drag-and-drop selections. The
|
||||
middle-mouse pastes and for drag-and-drop selections. The
|
||||
clipboard is used for traditional copy/cut/paste operations.
|
||||
|
||||
|
||||
\note This function is, at present, intended only to copy UTF-8 encoded textual data.
|
||||
To copy graphical data, use the Fl_Copy_Surface class. The \p type argument may allow
|
||||
in the future to copy other kinds of data.
|
||||
@ -904,17 +902,17 @@ int main() {
|
||||
/**
|
||||
Pastes the data from the selection buffer (\p source is 0) or the clipboard
|
||||
(\p source is 1) into \p receiver.
|
||||
|
||||
|
||||
The selection buffer (\p source is 0) is used for middle-mouse pastes and for
|
||||
drag-and-drop selections. The clipboard (\p source is 1) is used for
|
||||
copy/cut/paste operations.
|
||||
|
||||
|
||||
If \p source is 1, the optional \p type argument indicates what type of data is requested from the clipboard.
|
||||
At present, Fl::clipboard_plain_text (requesting text data) and
|
||||
Fl::clipboard_image (requesting image data) are possible.
|
||||
Set things up so the handle function of the \p receiver widget will be called with an FL_PASTE event some
|
||||
time in the future if the clipboard does contain data of the requested type.
|
||||
|
||||
|
||||
The handle function of \p receiver can process the FL_PASTE event as follows:
|
||||
\li If the \p receiver widget is known to only receive text data, the text string
|
||||
from the specified \p source is in Fl::event_text() with UTF-8 encoding, and the
|
||||
@ -929,13 +927,13 @@ int main() {
|
||||
If \p receiver accepts the clipboard image, receiver.handle() should return 1 and the
|
||||
application should take ownership of this image (that is, delete it after use).
|
||||
Conversely, if receiver.handle() returns 0, the application must not use the image.
|
||||
|
||||
|
||||
The receiver should be prepared to be called \e directly by this, or for
|
||||
it to happen \e later, or possibly <i>not at all</i>. This
|
||||
allows the window system to take as long as necessary to retrieve
|
||||
the paste buffer (or even to screw up completely) without complex
|
||||
and error-prone synchronization code in FLTK.
|
||||
|
||||
|
||||
\par Platform details for image data:
|
||||
\li Unix/Linux platform: Clipboard images in PNG or BMP formats are recognized. Requires linking with the fltk_images library.
|
||||
\li Windows platform: Both bitmap and vectorial (Enhanced metafile) data from clipboard
|
||||
@ -944,7 +942,7 @@ int main() {
|
||||
can be pasted as image data.
|
||||
*/
|
||||
static void paste(Fl_Widget &receiver, int source, const char *type = Fl::clipboard_plain_text);
|
||||
|
||||
|
||||
/**
|
||||
FLTK will call the registered callback whenever there is a change to the
|
||||
selection buffer or the clipboard. The source argument indicates which
|
||||
@ -954,13 +952,13 @@ int main() {
|
||||
\code
|
||||
void clip_callback(int source, void *data) {
|
||||
if ( source == 0 ) printf("CLIP CALLBACK: selection buffer changed\n");
|
||||
if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n");
|
||||
if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n");
|
||||
}
|
||||
[..]
|
||||
int main() {
|
||||
[..]
|
||||
Fl::add_clipboard_notify(clip_callback);
|
||||
[..]
|
||||
Fl::add_clipboard_notify(clip_callback);
|
||||
[..]
|
||||
}
|
||||
\endcode
|
||||
\note Some systems require polling to monitor the clipboard and may
|
||||
@ -988,14 +986,14 @@ int main() {
|
||||
filled with relevant data before calling this method. FLTK will
|
||||
then initiate the system wide drag and drop handling. Dropped data
|
||||
will be marked as <i>text</i>.
|
||||
|
||||
|
||||
Create a selection first using:
|
||||
Fl::copy(const char *stuff, int len, 0)
|
||||
*/
|
||||
static int dnd(); // platform dependent
|
||||
|
||||
// These are for back-compatibility only:
|
||||
/** back-compatibility only: Gets the widget owning the current selection
|
||||
/** back-compatibility only: Gets the widget owning the current selection
|
||||
\see Fl_Widget* selection_owner(Fl_Widget*) */
|
||||
static Fl_Widget* selection_owner() {return selection_owner_;}
|
||||
static void selection_owner(Fl_Widget*);
|
||||
@ -1006,7 +1004,7 @@ int main() {
|
||||
|
||||
/** \defgroup fl_screen Screen functions
|
||||
Fl global screen functions declared in <FL/Fl.H>.
|
||||
|
||||
|
||||
FLTK supports high-DPI screens using a screen scaling factor.
|
||||
The scaling factor is initialized by the library to a value
|
||||
based on information obtained from the OS. If this initial value
|
||||
@ -1046,25 +1044,25 @@ int main() {
|
||||
|
||||
|
||||
/** \defgroup fl_attributes Color & Font functions
|
||||
fl global color, font functions.
|
||||
These functions are declared in <FL/Fl.H> or <FL/fl_draw.H>.
|
||||
fl global color, font functions.
|
||||
These functions are declared in <FL/Fl.H> or <FL/fl_draw.H>.
|
||||
@{ */
|
||||
|
||||
|
||||
// color map:
|
||||
static void set_color(Fl_Color, uchar, uchar, uchar);
|
||||
static void set_color(Fl_Color, uchar, uchar, uchar);
|
||||
/**
|
||||
Sets an entry in the fl_color index table. You can set it to any
|
||||
8-bit RGB color. The color is not allocated until fl_color(i) is used.
|
||||
*/
|
||||
static void set_color(Fl_Color i, unsigned c); // platform dependent
|
||||
static void set_color(Fl_Color i, unsigned c); // platform dependent
|
||||
static unsigned get_color(Fl_Color i);
|
||||
static void get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue);
|
||||
static void get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue);
|
||||
/**
|
||||
Frees the specified color from the colormap, if applicable.
|
||||
If overlay is non-zero then the color is freed from the
|
||||
overlay colormap.
|
||||
*/
|
||||
static void free_color(Fl_Color i, int overlay = 0); // platform dependent
|
||||
static void free_color(Fl_Color i, int overlay = 0); // platform dependent
|
||||
|
||||
// fonts:
|
||||
static const char* get_font(Fl_Font);
|
||||
@ -1073,9 +1071,9 @@ int main() {
|
||||
is useful if you are presenting a choice to the user. There is no
|
||||
guarantee that each face has a different name. The return value points
|
||||
to a static buffer that is overwritten each call.
|
||||
|
||||
|
||||
The integer pointed to by \p attributes (if the pointer is not
|
||||
zero) is set to zero, FL_BOLD or FL_ITALIC or
|
||||
zero) is set to zero, FL_BOLD or FL_ITALIC or
|
||||
FL_BOLD | FL_ITALIC. To locate a "family" of fonts, search
|
||||
forward and back for a set with non-zero attributes, these faces along
|
||||
with the face with a zero attribute before them constitute a family.
|
||||
@ -1100,7 +1098,7 @@ int main() {
|
||||
face table. It will attempt to put "families" of faces together, so
|
||||
that the normal one is first, followed by bold, italic, and bold
|
||||
italic.
|
||||
|
||||
|
||||
The optional argument is a string to describe the set of fonts to
|
||||
add. Passing NULL will select only fonts that have the
|
||||
ISO8859-1 character set (and are thus usable by normal text). Passing
|
||||
@ -1110,7 +1108,7 @@ int main() {
|
||||
values may be useful but are system dependent. With Windows NULL
|
||||
selects fonts with ISO8859-1 encoding and non-NULL selects
|
||||
all fonts.
|
||||
|
||||
|
||||
The return value is how many faces are in the table after this is done.
|
||||
*/
|
||||
static Fl_Font set_fonts(const char* = 0); // platform dependent
|
||||
@ -1118,7 +1116,7 @@ int main() {
|
||||
/** @} */
|
||||
/** \defgroup fl_drawings Drawing functions
|
||||
FLTK global graphics and GUI drawing functions.
|
||||
These functions are declared in <FL/fl_draw.H>,
|
||||
These functions are declared in <FL/fl_draw.H>,
|
||||
and in <FL/platform.H> for offscreen buffer-related ones.
|
||||
@{ */
|
||||
// <Hack to re-order the 'Drawing functions' group>
|
||||
@ -1143,7 +1141,7 @@ int main() {
|
||||
static void set_box_color(Fl_Color);
|
||||
|
||||
// back compatibility:
|
||||
/** \addtogroup fl_windows
|
||||
/** \addtogroup fl_windows
|
||||
@{ */
|
||||
/** For back compatibility, sets the void Fl::fatal handler callback */
|
||||
static void set_abort(Fl_Abort_Handler f) {fatal = f;}
|
||||
@ -1155,7 +1153,7 @@ int main() {
|
||||
static void set_atclose(Fl_Atclose_Handler f) {atclose = f;}
|
||||
/** @} */
|
||||
|
||||
/** \addtogroup fl_events
|
||||
/** \addtogroup fl_events
|
||||
@{ */
|
||||
/** Returns non-zero if the Shift key is pressed. */
|
||||
static int event_shift() {return e_state&FL_SHIFT;}
|
||||
@ -1167,9 +1165,9 @@ int main() {
|
||||
static int event_alt() {return e_state&FL_ALT;}
|
||||
/**
|
||||
Returns the mouse buttons state bits; if non-zero, then at least one
|
||||
button is pressed now. This function returns the button state at the
|
||||
time of the event. During an FL_RELEASE event, the state
|
||||
of the released button will be 0. To find out, which button
|
||||
button is pressed now. This function returns the button state at the
|
||||
time of the event. During an FL_RELEASE event, the state
|
||||
of the released button will be 0. To find out, which button
|
||||
caused an FL_RELEASE event, you can use Fl::event_button() instead.
|
||||
\return a bit mask value like { [FL_BUTTON1] | [FL_BUTTON2] | [FL_BUTTON3] }
|
||||
*/
|
||||
@ -1234,7 +1232,7 @@ int main() {
|
||||
*/
|
||||
static int dnd_text_ops() { return option(OPTION_DND_TEXT); }
|
||||
/** \defgroup fl_multithread Multithreading support functions
|
||||
fl multithreading support functions declared in <FL/Fl.H>
|
||||
fl multithreading support functions declared in <FL/Fl.H>
|
||||
@{ */
|
||||
|
||||
// Multithreading support:
|
||||
@ -1246,7 +1244,7 @@ int main() {
|
||||
/**
|
||||
The thread_message() method returns the last message
|
||||
that was sent from a child by the awake() method.
|
||||
|
||||
|
||||
See also: \ref advanced_multithreading
|
||||
*/
|
||||
static void* thread_message(); // platform dependent
|
||||
@ -1268,17 +1266,17 @@ int main() {
|
||||
There are three groups of related methods:
|
||||
|
||||
-# scheduled widget deletion
|
||||
- Fl::delete_widget() schedules widgets for deletion
|
||||
- Fl::do_widget_deletion() deletes all scheduled widgets
|
||||
- Fl::delete_widget() schedules widgets for deletion
|
||||
- Fl::do_widget_deletion() deletes all scheduled widgets
|
||||
-# widget watch list ("smart pointers")
|
||||
- Fl::watch_widget_pointer() adds a widget pointer to the watch list
|
||||
- Fl::release_widget_pointer() removes a widget pointer from the watch list
|
||||
- Fl::clear_widget_pointer() clears a widget pointer \e in the watch list
|
||||
- Fl::watch_widget_pointer() adds a widget pointer to the watch list
|
||||
- Fl::release_widget_pointer() removes a widget pointer from the watch list
|
||||
- Fl::clear_widget_pointer() clears a widget pointer \e in the watch list
|
||||
-# the class Fl_Widget_Tracker:
|
||||
- the constructor calls Fl::watch_widget_pointer()
|
||||
- the destructor calls Fl::release_widget_pointer()
|
||||
- the access methods can be used to test, if a widget has been deleted
|
||||
\see Fl_Widget_Tracker.
|
||||
- the constructor calls Fl::watch_widget_pointer()
|
||||
- the destructor calls Fl::release_widget_pointer()
|
||||
- the access methods can be used to test, if a widget has been deleted
|
||||
\see Fl_Widget_Tracker.
|
||||
|
||||
@{ */
|
||||
// Widget deletion:
|
||||
@ -1288,7 +1286,7 @@ int main() {
|
||||
static void release_widget_pointer(Fl_Widget *&w);
|
||||
static void clear_widget_pointer(Fl_Widget const *w);
|
||||
/** @} */
|
||||
|
||||
|
||||
/** sets whether GL windows should be drawn at high resolution on Apple
|
||||
computers with retina displays
|
||||
\version 1.3.4
|
||||
@ -1300,7 +1298,7 @@ int main() {
|
||||
\version 1.3.4
|
||||
*/
|
||||
static int use_high_res_GL() { return use_high_res_GL_; }
|
||||
|
||||
|
||||
/** sets whether OpenGL uses textures to draw all text.
|
||||
By default, FLTK draws OpenGL text using textures, if the necessary
|
||||
hardware support is available. Call \p Fl::draw_GL_text_with_textures(0)
|
||||
@ -1313,7 +1311,7 @@ int main() {
|
||||
\version 1.4.0
|
||||
*/
|
||||
static void draw_GL_text_with_textures(int val) { draw_GL_text_with_textures_ = val; }
|
||||
|
||||
|
||||
/** returns whether whether OpenGL uses textures to draw all text.
|
||||
Default is yes.
|
||||
\see draw_GL_text_with_textures(int val)
|
||||
@ -1324,7 +1322,7 @@ int main() {
|
||||
|
||||
#ifdef FLTK_HAVE_CAIRO
|
||||
/** \defgroup group_cairo Cairo Support Functions and Classes
|
||||
@{
|
||||
@{
|
||||
*/
|
||||
public:
|
||||
// Cairo support API
|
||||
@ -1336,19 +1334,19 @@ public:
|
||||
When you wish to associate a cairo context in this mode,
|
||||
you need to call explicitly in your draw() overridden method,
|
||||
Fl::cairo_make_current(Fl_Window*). This will create a cairo context
|
||||
but only for this Window.
|
||||
Still in custom cairo application it is possible to handle
|
||||
but only for this Window.
|
||||
Still in custom cairo application it is possible to handle
|
||||
completely this process automatically by setting \p alink to true.
|
||||
In this last case, you don't need anymore to call Fl::cairo_make_current().
|
||||
You can use Fl::cairo_cc() to get the current cairo context anytime.
|
||||
\note Only available when configure has the --enable-cairo option
|
||||
*/
|
||||
static void cairo_autolink_context(bool alink) {cairo_state_.autolink(alink);}
|
||||
/**
|
||||
/**
|
||||
Gets the current autolink mode for cairo support.
|
||||
\retval false if no cairo context autolink is made for each window.
|
||||
\retval true if any fltk window is attached a cairo context when it
|
||||
is current. \see void cairo_autolink_context(bool alink)
|
||||
\retval false if no cairo context autolink is made for each window.
|
||||
\retval true if any fltk window is attached a cairo context when it
|
||||
is current. \see void cairo_autolink_context(bool alink)
|
||||
\note Only available when configure has the --enable-cairo option
|
||||
*/
|
||||
static bool cairo_autolink_context() {return cairo_state_.autolink();}
|
||||
@ -1358,14 +1356,14 @@ public:
|
||||
Set \p own to true if you want fltk to handle this cc deletion.
|
||||
\note Only available when configure has the --enable-cairo option
|
||||
*/
|
||||
static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); }
|
||||
static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); }
|
||||
|
||||
private:
|
||||
static cairo_t * cairo_make_current(void* gc);
|
||||
static cairo_t * cairo_make_current(void* gc, int W, int H);
|
||||
static Fl_Cairo_State cairo_state_;
|
||||
public:
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
#endif // FLTK_HAVE_CAIRO
|
||||
|
||||
@ -1386,7 +1384,7 @@ public:
|
||||
variable, such that its destructor is called when the object's
|
||||
scope is left. This ensures that no stale widget pointers are
|
||||
left in the widget watch list (see example below).
|
||||
|
||||
|
||||
You can also create Fl_Widget_Tracker objects with \c new, but then it
|
||||
is your responsibility to delete the object (and thus remove the
|
||||
widget pointer from the watch list) when it is no longer needed.
|
||||
@ -1454,12 +1452,8 @@ public:
|
||||
};
|
||||
|
||||
/** \defgroup fl_unicode Unicode and UTF-8 functions
|
||||
fl global Unicode and UTF-8 handling functions declared in <FL/fl_utf8.h>
|
||||
fl global Unicode and UTF-8 handling functions declared in <FL/fl_utf8.h>
|
||||
@{ */
|
||||
/** @} */
|
||||
|
||||
#endif // !Fl_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Adjuster widget header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -31,7 +29,7 @@
|
||||
/**
|
||||
The Fl_Adjuster widget was stolen from Prisms, and has proven
|
||||
to be very useful for values that need a large dynamic range.
|
||||
\image html adjuster1.png
|
||||
\image html adjuster1.png
|
||||
\image latex adjuster1.png "Fl_Adjuster" width=4cm
|
||||
<P>When you press a button and drag to the right the value increases.
|
||||
When you drag to the left it decreases. The largest button adjusts by
|
||||
@ -67,7 +65,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// BMP image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@ -11,9 +9,9 @@
|
||||
//
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// https://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -41,7 +39,3 @@ class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image {
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -38,7 +36,7 @@ public:
|
||||
const uchar *array;
|
||||
/** Non-zero if array points to bitmap data allocated internally */
|
||||
int alloc_array;
|
||||
|
||||
|
||||
private:
|
||||
/** for internal use */
|
||||
fl_uintptr_t id_;
|
||||
@ -62,7 +60,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
14
FL/Fl_Box.H
14
FL/Fl_Box.H
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Box header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -45,7 +43,7 @@ public:
|
||||
<P>The destructor removes the box.
|
||||
*/
|
||||
Fl_Box(int X, int Y, int W, int H, const char *l=0);
|
||||
|
||||
|
||||
/** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */
|
||||
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l);
|
||||
|
||||
@ -53,7 +51,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -36,7 +34,7 @@ struct FL_BLINE;
|
||||
lines, and manages all the storage for the text. This is not a text
|
||||
editor or spreadsheet! But it is useful for showing a vertical list of
|
||||
named objects to the user.
|
||||
|
||||
|
||||
\image html fl_hold_browser.png "Fl_Hold_Browser"
|
||||
\image latex fl_hold_browser.png "Fl_Hold_Browser" width=4cm
|
||||
|
||||
@ -57,9 +55,9 @@ struct FL_BLINE;
|
||||
describes.
|
||||
|
||||
The base class does nothing when the user clicks on it. The
|
||||
subclasses
|
||||
Fl_Select_Browser,
|
||||
Fl_Hold_Browser, and
|
||||
subclasses
|
||||
Fl_Select_Browser,
|
||||
Fl_Hold_Browser, and
|
||||
Fl_Multi_Browser react to user clicks to select lines in
|
||||
the browser and do callbacks.
|
||||
|
||||
@ -76,7 +74,7 @@ struct FL_BLINE;
|
||||
\code
|
||||
// How to loop through all the items in the browser
|
||||
for ( int t=1; t<=browser->size(); t++ ) { // index 1 based..!
|
||||
printf("item #%d, label='%s'\n", t, browser->text(t));
|
||||
printf("item #%d, label='%s'\n", t, browser->text(t));
|
||||
}
|
||||
\endcode
|
||||
|
||||
@ -87,15 +85,15 @@ struct FL_BLINE;
|
||||
*/
|
||||
class FL_EXPORT Fl_Browser : public Fl_Browser_ {
|
||||
|
||||
FL_BLINE *first; // the array of lines
|
||||
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 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
|
||||
char format_char_; // alternative to @-sign
|
||||
char column_char_; // alternative to tab
|
||||
|
||||
protected:
|
||||
|
||||
@ -218,7 +216,7 @@ public:
|
||||
Gets the current format code prefix character, which by default is '\@'.
|
||||
A string of formatting codes at the start of each column are stripped off
|
||||
and used to modify how the rest of the line is printed:
|
||||
|
||||
|
||||
\li <tt>'\@.'</tt> Print rest of line, don't look for more '\@' signs
|
||||
\li <tt>'\@\@'</tt> Doubling the format character prints the format
|
||||
character once, followed by the rest of line
|
||||
@ -241,7 +239,7 @@ public:
|
||||
\li <tt>'\@-'</tt> draw an engraved line through the middle.
|
||||
|
||||
Notice that the '\@.' command can be used to reliably
|
||||
terminate the parsing. To print a random string in a random color, use
|
||||
terminate the parsing. To print a random string in a random color, use
|
||||
<tt>sprintf("@C%d@.%s", color, string)</tt> and it will work even if the
|
||||
string starts with a digit or has the format character in it.
|
||||
*/
|
||||
@ -330,7 +328,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
112
FL/Fl_Browser_.H
112
FL/Fl_Browser_.H
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Common browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -28,15 +26,15 @@
|
||||
#include "Fl_Group.H"
|
||||
#endif
|
||||
#include "Fl_Scrollbar.H"
|
||||
#include <FL/Fl.H> // Fl::scrollbar_size()
|
||||
#include <FL/Fl.H> // Fl::scrollbar_size()
|
||||
|
||||
#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */
|
||||
#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */
|
||||
#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */
|
||||
#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */
|
||||
#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */
|
||||
#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */
|
||||
#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */
|
||||
#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */
|
||||
|
||||
#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */
|
||||
#define FL_SORT_DESCENDING 1 /**< sort in descending order */
|
||||
#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */
|
||||
#define FL_SORT_DESCENDING 1 /**< sort in descending order */
|
||||
|
||||
/**
|
||||
This is the base class for browsers. To be useful it must be
|
||||
@ -44,7 +42,7 @@
|
||||
browser and the file chooser's browser are subclassed off of this.
|
||||
|
||||
This has been designed so that the subclass has complete control
|
||||
over the storage of the data, although because next() and
|
||||
over the storage of the data, although because next() and
|
||||
prev() functions are used to index, it works best as a linked list
|
||||
or as a large block of characters in which the line breaks must be
|
||||
searched for.
|
||||
@ -76,21 +74,21 @@ Keyboard navigation of browser items
|
||||
extend a selection or de-selection.
|
||||
*/
|
||||
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
|
||||
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
|
||||
Fl_Font textfont_;
|
||||
Fl_Fontsize textsize_;
|
||||
Fl_Color textcolor_;
|
||||
void* top_; // which item scrolling position is in
|
||||
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
|
||||
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_
|
||||
int scrollbar_size_; // size of scrollbar trough
|
||||
void* max_width_item; // which item has max_width_
|
||||
int scrollbar_size_; // size of scrollbar trough
|
||||
|
||||
void update_top();
|
||||
|
||||
@ -98,7 +96,7 @@ protected:
|
||||
|
||||
// All of the following must be supplied by the subclass:
|
||||
/**
|
||||
This method must be provided by the subclass
|
||||
This method must be provided by the subclass
|
||||
to return the first item in the list.
|
||||
\see item_first(), item_next(), item_last(), item_prev()
|
||||
*/
|
||||
@ -121,8 +119,8 @@ protected:
|
||||
\see item_first(), item_next(), item_last(), item_prev()
|
||||
*/
|
||||
virtual void *item_last() const { return 0L; }
|
||||
/**
|
||||
This method must be provided by the subclass to return
|
||||
/**
|
||||
This method must be provided by the subclass to return
|
||||
the height of \p item in pixels.
|
||||
Allow for two additional pixels for the list selection box.
|
||||
\param[in] item The item whose height is returned.
|
||||
@ -145,28 +143,28 @@ protected:
|
||||
*/
|
||||
virtual void item_draw(void *item,int X,int Y,int W,int H) const = 0;
|
||||
/**
|
||||
This optional method returns a string (label) that may be used for sorting.
|
||||
This optional method returns a string (label) that may be used for sorting.
|
||||
\param[in] item The item whose label text is returned.
|
||||
\returns The item's text label. (Can be NULL if blank)
|
||||
*/
|
||||
virtual const char *item_text(void *item) const { (void)item; return 0L; }
|
||||
/**
|
||||
This optional method should be provided by the subclass
|
||||
This optional method should be provided by the subclass
|
||||
to efficiently swap browser items \p a and \p b, such as for sorting.
|
||||
\param[in] a,b The two items to be swapped.
|
||||
*/
|
||||
virtual void item_swap(void *a,void *b) { (void)a; (void)b; }
|
||||
/**
|
||||
This method must be provided by the subclass
|
||||
to return the item for the specified \p index.
|
||||
This method must be provided by the subclass
|
||||
to return the item for the specified \p index.
|
||||
\param[in] index The \p index of the item to be returned
|
||||
\returns The item at the specified \p index.
|
||||
*/
|
||||
virtual void *item_at(int index) const { (void)index; return 0L; }
|
||||
// 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
|
||||
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 *item,int val=1);
|
||||
virtual int item_selected(void *item) const ;
|
||||
@ -178,9 +176,9 @@ protected:
|
||||
void *top() const { return top_; }
|
||||
/**
|
||||
Returns the item currently selected, or NULL if there is no selection.
|
||||
|
||||
|
||||
For multiple selection browsers this call returns the currently focused item,
|
||||
even if it is not selected. To find all selected items, call
|
||||
even if it is not selected. To find all selected items, call
|
||||
Fl_Multi_Browser::selected() for every item in question.
|
||||
*/
|
||||
void *selection() const { return selection_; }
|
||||
@ -197,9 +195,9 @@ protected:
|
||||
*/
|
||||
void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them
|
||||
void bbox(int &X,int &Y,int &W,int &H) const;
|
||||
int leftedge() const; // x position after scrollbar & border
|
||||
int leftedge() const; // x position after scrollbar & border
|
||||
void *find_item(int ypos); // item under mouse
|
||||
|
||||
|
||||
void draw();
|
||||
Fl_Browser_(int X,int Y,int W,int H,const char *L=0);
|
||||
|
||||
@ -223,7 +221,7 @@ public:
|
||||
/**
|
||||
Gets the vertical scroll position of the list as a pixel position \p pos.
|
||||
The position returned is how many pixels of the list are scrolled off the top edge
|
||||
of the screen. Example: A position of '3' indicates the top 3 pixels of
|
||||
of the screen. Example: A position of '3' indicates the top 3 pixels of
|
||||
the list are scrolled off the top edge of the screen.
|
||||
\see position(), hposition()
|
||||
*/
|
||||
@ -250,13 +248,13 @@ public:
|
||||
- bit 3-31: reserved for future use
|
||||
*/
|
||||
enum { // values for has_scrollbar()
|
||||
HORIZONTAL = 1, ///< Only show horizontal scrollbar.
|
||||
VERTICAL = 2, ///< Only show vertical scrollbar.
|
||||
BOTH = 3, ///< Show both scrollbars. (default)
|
||||
ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
|
||||
HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on.
|
||||
VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on.
|
||||
BOTH_ALWAYS = 7 ///< Both scrollbars always on.
|
||||
HORIZONTAL = 1, ///< Only show horizontal scrollbar.
|
||||
VERTICAL = 2, ///< Only show vertical scrollbar.
|
||||
BOTH = 3, ///< Show both scrollbars. (default)
|
||||
ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
|
||||
HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on.
|
||||
VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on.
|
||||
BOTH_ALWAYS = 7 ///< Both scrollbars always on.
|
||||
};
|
||||
/**
|
||||
Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar)
|
||||
@ -265,9 +263,9 @@ public:
|
||||
/**
|
||||
Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH).
|
||||
By default you can scroll in both directions, and the scrollbars
|
||||
disappear if the data will fit in the widget.
|
||||
disappear if the data will fit in the widget.
|
||||
has_scrollbar() changes this based on the value of \p mode:
|
||||
|
||||
|
||||
- 0 - No scrollbars.
|
||||
|
||||
- Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar.
|
||||
@ -317,9 +315,9 @@ public:
|
||||
/**
|
||||
Gets the current size of the scrollbars' troughs, in pixels.
|
||||
|
||||
If this value is zero (default), this widget will use the
|
||||
If this value is zero (default), this widget will use the
|
||||
Fl::scrollbar_size() value as the scrollbar's width.
|
||||
|
||||
|
||||
\returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used.
|
||||
\see Fl::scrollbar_size(int)
|
||||
*/
|
||||
@ -330,24 +328,24 @@ public:
|
||||
Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels.
|
||||
|
||||
Normally you should not need this method, and should use
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
has a consistent UI, is the default behavior, and is normally
|
||||
what you want.
|
||||
|
||||
Only use THIS method if you really need to override the global
|
||||
scrollbar size. The need for this should be rare.
|
||||
|
||||
|
||||
Setting \p newSize to the special value of 0 causes the widget to
|
||||
track the global Fl::scrollbar_size(), which is the default.
|
||||
|
||||
|
||||
\param[in] newSize Sets the scrollbar size in pixels.\n
|
||||
If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
|
||||
\see Fl::scrollbar_size()
|
||||
*/
|
||||
void scrollbar_size(int newSize) {
|
||||
scrollbar_size_ = newSize;
|
||||
}
|
||||
}
|
||||
/**
|
||||
Returns the global value Fl::scrollbar_size().
|
||||
\deprecated Use scrollbar_size() instead.
|
||||
@ -379,7 +377,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Button header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -27,13 +25,13 @@
|
||||
#endif
|
||||
|
||||
// values for type()
|
||||
#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
|
||||
#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
|
||||
reverts back to 0 when the button is released */
|
||||
#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button
|
||||
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other
|
||||
buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||
are set to zero.*/
|
||||
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility
|
||||
#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button
|
||||
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other
|
||||
buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||
are set to zero.*/
|
||||
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility
|
||||
|
||||
extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*);
|
||||
|
||||
@ -59,7 +57,7 @@ class Fl_Widget_Tracker;
|
||||
\li \c FL_TOGGLE_BUTTON: value() is inverted after button press.
|
||||
\li \c FL_RADIO_BUTTON: value() is set to 1 after button press, and all other
|
||||
buttons in the current group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||
are set to zero.
|
||||
are set to zero.
|
||||
|
||||
\todo Refactor the doxygen comments for Fl_Button when() documentation.
|
||||
|
||||
@ -70,7 +68,7 @@ class Fl_Widget_Tracker;
|
||||
clicks the button, or when a shortcut is typed.
|
||||
\li \c FL_WHEN_CHANGED: The callback is done each time the value() changes
|
||||
(when the user pushes and releases the button, and as the mouse is
|
||||
dragged around in and out of the button).
|
||||
dragged around in and out of the button).
|
||||
*/
|
||||
|
||||
class FL_EXPORT Fl_Button : public Fl_Widget {
|
||||
@ -170,7 +168,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@ -9,15 +7,15 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
Handling transparently platform dependent cairo include files
|
||||
Handling transparently platform dependent cairo include files
|
||||
*/
|
||||
|
||||
#ifndef FL_CAIRO_H
|
||||
@ -31,12 +29,12 @@
|
||||
|
||||
# include <cairo.h>
|
||||
|
||||
/**
|
||||
/**
|
||||
\addtogroup group_cairo
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
Contains all the necessary info on the current cairo context.
|
||||
A private internal & unique corresponding object is created to
|
||||
permit cairo context state handling while keeping it opaque.
|
||||
@ -48,33 +46,33 @@ public:
|
||||
Fl_Cairo_State() : cc_(0), own_cc_(false), autolink_(false), window_(0), gc_(0) {}
|
||||
|
||||
// access attributes
|
||||
cairo_t* cc() const {return cc_;} ///< Gets the current cairo context
|
||||
bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
|
||||
cairo_t* cc() const {return cc_;} ///< Gets the current cairo context
|
||||
bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
|
||||
/** Sets the current cairo context.
|
||||
|
||||
\p own == \e true (the default) indicates that the cairo context \p c
|
||||
will be deleted by FLTK internally when another cc is set later.
|
||||
\p own == \e true (the default) indicates that the cairo context \p c
|
||||
will be deleted by FLTK internally when another cc is set later.
|
||||
|
||||
\p own == \e false indicates cc deletion is handled externally
|
||||
by the user program.
|
||||
\p own == \e false indicates cc deletion is handled externally
|
||||
by the user program.
|
||||
*/
|
||||
void cc(cairo_t* c, bool own=true) {
|
||||
if (cc_ && own_cc_) cairo_destroy(cc_);
|
||||
cc_=c;
|
||||
if (!cc_) window_=0;
|
||||
own_cc_=own;
|
||||
if (cc_ && own_cc_) cairo_destroy(cc_);
|
||||
cc_=c;
|
||||
if (!cc_) window_=0;
|
||||
own_cc_=own;
|
||||
}
|
||||
void autolink(bool b); ///< Sets the autolink option, only available with --enable-cairoext
|
||||
void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on
|
||||
void* window() const {return window_;} ///< Gets the last window attached to a cc
|
||||
void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on
|
||||
void* gc() const {return gc_;} ///< Gets the last gc attached to a cc
|
||||
void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on
|
||||
void* window() const {return window_;} ///< Gets the last window attached to a cc
|
||||
void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on
|
||||
void* gc() const {return gc_;} ///< Gets the last gc attached to a cc
|
||||
|
||||
private:
|
||||
cairo_t * cc_; // contains the unique autoupdated cairo context
|
||||
bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup
|
||||
bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows
|
||||
// for custom cairo implementations.
|
||||
cairo_t * cc_; // contains the unique autoupdated cairo context
|
||||
bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup
|
||||
bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows
|
||||
// for custom cairo implementations.
|
||||
void* window_, *gc_; // for keeping track internally of last win+gc treated
|
||||
};
|
||||
|
||||
@ -82,7 +80,3 @@ private:
|
||||
|
||||
# endif // FLTK_HAVE_CAIRO
|
||||
#endif // FL_CAIRO_H
|
||||
|
||||
//
|
||||
// End of "$Id$" .
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -29,7 +27,7 @@
|
||||
# include <FL/Fl.H>
|
||||
# include <FL/Fl_Double_Window.H>
|
||||
|
||||
/**
|
||||
/**
|
||||
\addtogroup group_cairo
|
||||
@{
|
||||
*/
|
||||
@ -44,7 +42,7 @@
|
||||
\note You can alternatively define your custom cairo FLTK window,
|
||||
and thus at least override the draw() method to provide custom cairo
|
||||
support. In this case you will probably use Fl::cairo_make_current(Fl_Window*)
|
||||
to attach a context to your window. You should do it only when your window is
|
||||
to attach a context to your window. You should do it only when your window is
|
||||
the current window. \see Fl_Window::current()
|
||||
*/
|
||||
class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window {
|
||||
@ -62,7 +60,7 @@ protected:
|
||||
if (draw_cb_) { // call the Cairo draw callback
|
||||
// manual method ? if yes explicitly get a cairo_context here
|
||||
if (!Fl::cairo_autolink_context())
|
||||
Fl::cairo_make_current(this);
|
||||
Fl::cairo_make_current(this);
|
||||
draw_cb_(this, Fl::cairo_cc());
|
||||
// flush cairo drawings: necessary at least for Windows
|
||||
cairo_surface_t *s = cairo_get_target(Fl::cairo_cc());
|
||||
@ -73,7 +71,7 @@ protected:
|
||||
public:
|
||||
/** This defines the cairo draw callback prototype that you must further */
|
||||
typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def);
|
||||
/**
|
||||
/**
|
||||
You must provide a draw callback which will implement your cairo rendering.
|
||||
This method will permit you to set your cairo callback to \p cb.
|
||||
*/
|
||||
@ -87,7 +85,3 @@ private:
|
||||
|
||||
# endif // FLTK_HAVE_CAIRO
|
||||
#endif // FL_CAIRO_WINDOW_H
|
||||
|
||||
//
|
||||
// End of "$Id$" .
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms chart header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -27,24 +25,24 @@
|
||||
#endif
|
||||
|
||||
// values for type()
|
||||
#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */
|
||||
#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */
|
||||
#define FL_LINE_CHART 2 /**< type() for Line Chart variant */
|
||||
#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */
|
||||
#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */
|
||||
#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */
|
||||
#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */
|
||||
#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */
|
||||
#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */
|
||||
#define FL_LINE_CHART 2 /**< type() for Line Chart variant */
|
||||
#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */
|
||||
#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */
|
||||
#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */
|
||||
#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */
|
||||
|
||||
#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */
|
||||
#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */
|
||||
|
||||
#define FL_CHART_MAX 128 /**< max entries per chart */
|
||||
#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */
|
||||
#define FL_CHART_MAX 128 /**< max entries per chart */
|
||||
#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */
|
||||
|
||||
/** For internal use only */
|
||||
struct FL_CHART_ENTRY {
|
||||
float val; /**< For internal use only. */
|
||||
unsigned col; /**< For internal use only. */
|
||||
char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */
|
||||
float val; /**< For internal use only. */
|
||||
unsigned col; /**< For internal use only. */
|
||||
char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -52,7 +50,7 @@ struct FL_CHART_ENTRY {
|
||||
\brief Fl_Chart displays simple charts.
|
||||
It is provided for Forms compatibility.
|
||||
|
||||
\image html charts.png
|
||||
\image html charts.png
|
||||
\image latex charts.png "Fl_Chart" width=10cm
|
||||
\todo Refactor Fl_Chart::type() information.
|
||||
|
||||
@ -145,7 +143,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -55,11 +53,11 @@ public:
|
||||
#ifndef FL_DOXYGEN
|
||||
/** For internal use only. */
|
||||
struct cb_item {
|
||||
cb_item *next; /**< For internal use only. */
|
||||
cb_item *prev; /**< For internal use only. */
|
||||
char checked; /**< For internal use only. */
|
||||
char selected; /**< For internal use only. */
|
||||
char *text; /**< For internal use only. */
|
||||
cb_item *next; /**< For internal use only. */
|
||||
cb_item *prev; /**< For internal use only. */
|
||||
char checked; /**< For internal use only. */
|
||||
char selected; /**< For internal use only. */
|
||||
char *text; /**< For internal use only. */
|
||||
};
|
||||
#endif // !FL_DOXYGEN
|
||||
|
||||
@ -81,7 +79,7 @@ public:
|
||||
~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()
|
||||
// both return the new nitems()
|
||||
int remove(int item); // delete an item. Returns nitems()
|
||||
|
||||
// inline const char * methods to avoid breaking binary compatibility...
|
||||
@ -114,7 +112,3 @@ public:
|
||||
|
||||
#endif // Fl_Check_Browser_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Check button header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef Fl_Check_Button_H
|
||||
@ -33,7 +31,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Choice header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -45,7 +43,7 @@
|
||||
and then:
|
||||
|
||||
- The item's callback is done if one has been set; the
|
||||
Fl_Choice is passed as the Fl_Widget* argument,
|
||||
Fl_Choice is passed as the Fl_Widget* argument,
|
||||
along with any userdata configured for the callback.
|
||||
|
||||
- If the item does not have a callback, the Fl_Choice widget's
|
||||
@ -100,7 +98,7 @@
|
||||
return Fl::run();
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
*/
|
||||
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
|
||||
protected:
|
||||
@ -122,7 +120,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Clock header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -30,12 +28,12 @@
|
||||
// Please change doxygen documentation below (class Fl_Clock_Output)
|
||||
// accordingly as well when changing the following type values:
|
||||
|
||||
#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
|
||||
#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */
|
||||
#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
|
||||
#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */
|
||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */
|
||||
|
||||
// fabien: Please keep the horizontal formatting of both images in class desc,
|
||||
// fabien: Please keep the horizontal formatting of both images in class desc,
|
||||
// don't lose vertical space for nothing!
|
||||
|
||||
/**
|
||||
@ -45,11 +43,11 @@
|
||||
The time shown on the clock is not updated. To display the current time,
|
||||
use Fl_Clock instead.
|
||||
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
<caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly
|
||||
\image html clock.png
|
||||
\image html clock.png
|
||||
\htmlonly </TD> <TD> \endhtmlonly
|
||||
\image html round_clock.png
|
||||
\image html round_clock.png
|
||||
\htmlonly </TD> </TR> </table> \endhtmlonly
|
||||
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
|
||||
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
|
||||
@ -57,10 +55,10 @@
|
||||
Values for clock type() (\#include \<FL/Clock.H\>):
|
||||
|
||||
\code
|
||||
#define FL_SQUARE_CLOCK 0 // Square Clock variant
|
||||
#define FL_ROUND_CLOCK 1 // Round Clock variant
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
|
||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
|
||||
#define FL_SQUARE_CLOCK 0 // Square Clock variant
|
||||
#define FL_ROUND_CLOCK 1 // Round Clock variant
|
||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
|
||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
|
||||
\endcode
|
||||
|
||||
*/
|
||||
@ -76,8 +74,8 @@ 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(ulong v); // set to this Unix time
|
||||
|
||||
void value(int H, int m, int s);
|
||||
|
||||
/**
|
||||
@ -108,9 +106,9 @@ public:
|
||||
/**
|
||||
Returns the shadow drawing mode of the hands.
|
||||
|
||||
\returns shadow drawing mode of the hands
|
||||
\retval 0 no shadows
|
||||
\retval 1 draw shadows of hands (default)
|
||||
\returns shadow drawing mode of the hands
|
||||
\retval 0 no shadows
|
||||
\retval 1 draw shadows of hands (default)
|
||||
*/
|
||||
int shadow() const {return shadow_;}
|
||||
|
||||
@ -124,7 +122,7 @@ public:
|
||||
|
||||
The default is to draw the shadows (1).
|
||||
|
||||
\param[in] mode 1 = shadows (default), 0 = no shadows
|
||||
\param[in] mode 1 = shadows (default), 0 = no shadows
|
||||
*/
|
||||
void shadow(int mode) { shadow_ = mode ? 1 : 0; }
|
||||
};
|
||||
@ -135,18 +133,18 @@ public:
|
||||
\class Fl_Clock
|
||||
\brief This widget provides a round analog clock display.
|
||||
|
||||
Fl_Clock is provided for Forms compatibility.
|
||||
Fl_Clock is provided for Forms compatibility.
|
||||
It installs a 1-second timeout callback using Fl::add_timeout().
|
||||
You can choose the rounded or square type of the clock with type().
|
||||
Please see Fl_Clock_Output widget for applicable values.
|
||||
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
|
||||
<caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly
|
||||
\image html clock.png
|
||||
\image html clock.png
|
||||
\htmlonly </TD> <TD> \endhtmlonly
|
||||
\image html round_clock.png
|
||||
\image html round_clock.png
|
||||
\htmlonly </TD> </TR> </table> \endhtmlonly
|
||||
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
|
||||
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
|
||||
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
|
||||
|
||||
\see class Fl_Clock_Output
|
||||
@ -156,14 +154,10 @@ public:
|
||||
int handle(int);
|
||||
|
||||
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$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Color chooser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2019 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file
|
||||
@ -67,7 +65,7 @@ public:
|
||||
|
||||
#endif // !FL_DOXYGEN
|
||||
|
||||
/** \addtogroup group_comdlg
|
||||
/** \addtogroup group_comdlg
|
||||
@{ */
|
||||
|
||||
/**
|
||||
@ -122,21 +120,21 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group {
|
||||
static void rgb_cb(Fl_Widget*, void*);
|
||||
static void mode_cb(Fl_Widget*, void*);
|
||||
public:
|
||||
|
||||
|
||||
int handle(int e);
|
||||
|
||||
/**
|
||||
Returns which Fl_Color_Chooser variant is currently active
|
||||
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
/**
|
||||
Returns which Fl_Color_Chooser variant is currently active
|
||||
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
*/
|
||||
int mode() {return choice.value();}
|
||||
|
||||
/**
|
||||
Set which Fl_Color_Chooser variant is currently active
|
||||
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
|
||||
/**
|
||||
Set which Fl_Color_Chooser variant is currently active
|
||||
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||
*/
|
||||
void mode(int newMode);
|
||||
|
||||
|
||||
/**
|
||||
Returns the current hue.
|
||||
0 <= hue < 6. Zero is red, one is yellow, two is green, etc.
|
||||
@ -190,7 +188,3 @@ 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, int m=-1);
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef Fl_Copy_Surface_H
|
||||
@ -22,12 +20,12 @@
|
||||
#include <FL/Fl_Widget_Surface.H>
|
||||
|
||||
/** Supports copying of graphical data to the clipboard.
|
||||
|
||||
|
||||
<br> After creation of an Fl_Copy_Surface object, make it the current drawing surface calling Fl_Surface_Device::push_current(), and all subsequent graphics requests
|
||||
will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw()
|
||||
) or to use any of the \ref fl_drawings or the \ref fl_attributes.
|
||||
Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data.
|
||||
<br> Fl_Gl_Window 's can be copied to the clipboard as well.
|
||||
<br> Fl_Gl_Window 's can be copied to the clipboard as well.
|
||||
<br> Usage example:
|
||||
\code
|
||||
Fl_Widget *g = ...; // a widget you want to copy to the clipboard
|
||||
@ -44,7 +42,7 @@
|
||||
2) as a color bitmap. Applications to which the clipboard content is pasted can use the format
|
||||
that suits them best.
|
||||
\li Mac OS: The graphical data are copied to the clipboard (a.k.a. pasteboard) in two 'flavors':
|
||||
1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image.
|
||||
1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image.
|
||||
Applications to which the clipboard content is pasted can use the flavor that suits them best.
|
||||
\li X11: the graphical data are copied to the clipboard as an image in BMP format.
|
||||
*/
|
||||
@ -78,7 +76,7 @@ public:
|
||||
|
||||
/**
|
||||
A base class describing the interface between FLTK and draw-to-clipboard operations.
|
||||
|
||||
|
||||
This class is only for internal use by the FLTK library.
|
||||
|
||||
A supported platform should implement the virtual methods of this class
|
||||
@ -108,7 +106,3 @@ protected:
|
||||
*/
|
||||
|
||||
#endif // Fl_Copy_Surface_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Counter header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -29,8 +27,8 @@
|
||||
#endif
|
||||
|
||||
// values for type():
|
||||
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
||||
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
||||
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
||||
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
||||
|
||||
/**
|
||||
Controls a single floating point value with button (or keyboard) arrows.
|
||||
@ -109,7 +107,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Definition of classes Fl_Surface_Device, Fl_Display_Device
|
||||
// for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -10,14 +8,14 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file Fl_Device.H
|
||||
/** \file Fl_Device.H
|
||||
\brief declaration of classes Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin.
|
||||
*/
|
||||
|
||||
@ -36,7 +34,7 @@ class Fl_Widget;
|
||||
A drawing surface that's susceptible to receive graphical output.
|
||||
Any FLTK application has at any time a current drawing surface to which all drawing requests are directed.
|
||||
The current surface is given by Fl_Surface_Device::surface().
|
||||
When main() begins running, the current drawing surface has been set to the computer's display,
|
||||
When main() begins running, the current drawing surface has been set to the computer's display,
|
||||
an instance of the Fl_Display_Device class.
|
||||
|
||||
A drawing surface other than the computer's display, is typically used as follows:
|
||||
@ -53,7 +51,7 @@ class Fl_Widget;
|
||||
</ol>
|
||||
For back-compatibility, it is also possible to use the Fl_Surface_Device::set_current() member function
|
||||
to change the current drawing surface, once to the new surface, once to the previous one.
|
||||
|
||||
|
||||
Class Fl_Surface_Device can also be derived to define new kinds of graphical output
|
||||
usable with FLTK drawing functions.
|
||||
An example would be to draw to a PDF file. This would require to create a new class,
|
||||
@ -105,7 +103,7 @@ public:
|
||||
|
||||
/**
|
||||
This plugin socket allows the integration of new device drivers for special
|
||||
window or screen types.
|
||||
window or screen types.
|
||||
This class is not intended for use outside the FLTK library.
|
||||
It is currently used to provide an automated printing
|
||||
service and screen capture for OpenGL windows, if linked with fltk_gl.
|
||||
@ -130,7 +128,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // Fl_Device_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
22
FL/Fl_Dial.H
22
FL/Fl_Dial.H
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Dial header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -27,14 +25,14 @@
|
||||
#endif
|
||||
|
||||
// values for type():
|
||||
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
||||
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
|
||||
#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */
|
||||
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
||||
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
|
||||
#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */
|
||||
|
||||
/**
|
||||
The Fl_Dial widget provides a circular dial to control a
|
||||
single floating point value.
|
||||
<P ALIGN=CENTER>\image html dial.png
|
||||
<P ALIGN=CENTER>\image html dial.png
|
||||
\image latex dial.png "Fl_Dial" width=4cm
|
||||
Use type() to set the type of the dial to:
|
||||
<UL>
|
||||
@ -63,7 +61,7 @@ public:
|
||||
and label string. The default type is FL_NORMAL_DIAL.
|
||||
*/
|
||||
Fl_Dial(int x,int y,int w,int h, const char *l = 0);
|
||||
/**
|
||||
/**
|
||||
Sets Or gets the angles used for the minimum and maximum values. The default
|
||||
values are 45 and 315 (0 degrees is straight down and the angles
|
||||
progress clockwise). Normally angle1 is less than angle2, but if you
|
||||
@ -82,7 +80,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Double-buffered window header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -50,13 +48,13 @@ public:
|
||||
void hide();
|
||||
void flush();
|
||||
~Fl_Double_Window();
|
||||
|
||||
|
||||
/**
|
||||
Creates a new Fl_Double_Window widget using the given
|
||||
position, size, and label (title) string.
|
||||
*/
|
||||
Fl_Double_Window(int W, int H, const char *l = 0);
|
||||
|
||||
|
||||
/**
|
||||
See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
|
||||
*/
|
||||
@ -65,7 +63,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* Windows DLL export .
|
||||
*
|
||||
* Copyright 1998-2018 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
* the file "COPYING" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at:
|
||||
*
|
||||
* http://www.fltk.org/COPYING.php
|
||||
* https://www.fltk.org/COPYING.php
|
||||
*
|
||||
* Please report all bugs and problems on the following page:
|
||||
* Please see the following page on how to report bugs and issues:
|
||||
*
|
||||
* http://www.fltk.org/str.php
|
||||
* https://www.fltk.org/bugs.php
|
||||
*/
|
||||
|
||||
#ifndef Fl_Export_H
|
||||
@ -25,9 +23,9 @@
|
||||
|
||||
# if defined(FL_DLL)
|
||||
# ifdef FL_LIBRARY
|
||||
# define FL_EXPORT __declspec(dllexport)
|
||||
# define FL_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define FL_EXPORT __declspec(dllimport)
|
||||
# define FL_EXPORT __declspec(dllimport)
|
||||
# endif /* FL_LIBRARY */
|
||||
# elif __GNUC__ >= 4
|
||||
# define FL_EXPORT __attribute__ ((visibility ("default")))
|
||||
@ -36,7 +34,3 @@
|
||||
# endif /* FL_DLL */
|
||||
|
||||
#endif /* !Fl_Export_H */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// FileBrowser definitions.
|
||||
//
|
||||
// Copyright 1999-2010 by Michael Sweet.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -37,17 +35,17 @@
|
||||
|
||||
/** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */
|
||||
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)); }
|
||||
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 };
|
||||
@ -59,34 +57,34 @@ public:
|
||||
Fl_File_Browser(int, int, int, int, const char * = 0);
|
||||
|
||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
||||
uchar iconsize() const { return (iconsize_); };
|
||||
uchar iconsize() const { return (iconsize_); };
|
||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
||||
void iconsize(uchar s) { iconsize_ = s; redraw(); };
|
||||
void iconsize(uchar s) { iconsize_ = s; redraw(); };
|
||||
|
||||
/**
|
||||
Sets or gets the filename filter. The pattern matching uses
|
||||
the fl_filename_match()
|
||||
function in FLTK.
|
||||
*/
|
||||
void filter(const char *pattern);
|
||||
void filter(const char *pattern);
|
||||
/**
|
||||
Sets or gets the filename filter. The pattern matching uses
|
||||
the fl_filename_match()
|
||||
function in FLTK.
|
||||
*/
|
||||
const char *filter() const { return (pattern_); };
|
||||
const char *filter() const { return (pattern_); };
|
||||
|
||||
/**
|
||||
Loads the specified directory into the browser. If icons have been
|
||||
loaded then the correct icon is associated with each file in the list.
|
||||
|
||||
|
||||
<P>The sort argument specifies a sort function to be used with
|
||||
fl_filename_list().
|
||||
*/
|
||||
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
|
||||
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
|
||||
|
||||
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); };
|
||||
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
|
||||
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
|
||||
|
||||
/**
|
||||
Sets or gets the file browser type, FILES or
|
||||
@ -94,18 +92,14 @@ public:
|
||||
files and directories are shown. Otherwise only directories are
|
||||
shown.
|
||||
*/
|
||||
int filetype() const { return (filetype_); };
|
||||
int filetype() const { return (filetype_); };
|
||||
/**
|
||||
Sets or gets the file browser type, FILES or
|
||||
DIRECTORIES. When set to FILES, both
|
||||
files and directories are shown. Otherwise only directories are
|
||||
shown.
|
||||
*/
|
||||
void filetype(int t) { filetype_ = t; };
|
||||
void filetype(int t) { filetype_ = t; };
|
||||
};
|
||||
|
||||
#endif // !_Fl_File_Browser_H_
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
// =======================================================================
|
||||
// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
|
||||
@ -47,24 +45,24 @@
|
||||
|
||||
class FL_EXPORT Fl_File_Chooser {
|
||||
public:
|
||||
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
||||
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
||||
private:
|
||||
static Fl_Preferences *prefs_;
|
||||
void (*callback_)(Fl_File_Chooser*, void *);
|
||||
void *data_;
|
||||
char directory_[FL_PATH_MAX];
|
||||
char pattern_[FL_PATH_MAX];
|
||||
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();
|
||||
static Fl_Preferences *prefs_;
|
||||
void (*callback_)(Fl_File_Chooser*, void *);
|
||||
void *data_;
|
||||
char directory_[FL_PATH_MAX];
|
||||
char pattern_[FL_PATH_MAX];
|
||||
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:
|
||||
@ -131,10 +129,10 @@ public:
|
||||
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);
|
||||
int count();
|
||||
void directory(const char *d);
|
||||
char * directory();
|
||||
void filter(const char *p);
|
||||
void filter(const char *p);
|
||||
const char * filter();
|
||||
int filter_value();
|
||||
void filter_value(int f);
|
||||
@ -145,15 +143,15 @@ public:
|
||||
const char * label();
|
||||
void ok_label(const char *l);
|
||||
const char * ok_label();
|
||||
void preview(int e);
|
||||
int preview() const { return previewButton->value(); };
|
||||
void preview(int e);
|
||||
int preview() const { return previewButton->value(); };
|
||||
private:
|
||||
void showHidden(int e);
|
||||
void remove_hidden_files();
|
||||
void showHidden(int e);
|
||||
void remove_hidden_files();
|
||||
public:
|
||||
void rescan();
|
||||
void rescan_keep_filename();
|
||||
void show();
|
||||
void rescan();
|
||||
void rescan_keep_filename();
|
||||
void show();
|
||||
int shown();
|
||||
void textcolor(Fl_Color c);
|
||||
Fl_Color textcolor();
|
||||
@ -165,72 +163,72 @@ public:
|
||||
int type();
|
||||
void * user_data() const;
|
||||
void user_data(void *d);
|
||||
const char *value(int f = 1);
|
||||
void value(const char *filename);
|
||||
const char *value(int f = 1);
|
||||
void value(const char *filename);
|
||||
int visible();
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *add_favorites_label;
|
||||
static const char *add_favorites_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *all_files_label;
|
||||
static const char *all_files_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *custom_filter_label;
|
||||
static const char *custom_filter_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *existing_file_label;
|
||||
static const char *existing_file_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *favorites_label;
|
||||
static const char *favorites_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *filename_label;
|
||||
static const char *filename_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *filesystems_label;
|
||||
static const char *filesystems_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *manage_favorites_label;
|
||||
static const char *manage_favorites_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *new_directory_label;
|
||||
static const char *new_directory_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *new_directory_tooltip;
|
||||
static const char *new_directory_tooltip;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *preview_label;
|
||||
static const char *preview_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *save_label;
|
||||
static const char *save_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *show_label;
|
||||
static const char *show_label;
|
||||
/**
|
||||
[standard text may be customized at run-time]
|
||||
*/
|
||||
static const char *hidden_label;
|
||||
static const char *hidden_label;
|
||||
/**
|
||||
the sort function that is used when loading
|
||||
the contents of a directory.
|
||||
*/
|
||||
static Fl_File_Sort_F *sort;
|
||||
static Fl_File_Sort_F *sort;
|
||||
private:
|
||||
Fl_Widget* ext_group;
|
||||
Fl_Widget* ext_group;
|
||||
public:
|
||||
Fl_Widget* add_extra(Fl_Widget* gr);
|
||||
};
|
||||
@ -239,7 +237,3 @@ FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *
|
||||
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$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_File_Icon definitions.
|
||||
//
|
||||
// Copyright 1999-2010 by Michael Sweet.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -33,61 +31,61 @@
|
||||
// Special color value for the icon color.
|
||||
//
|
||||
|
||||
# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/
|
||||
# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/
|
||||
|
||||
|
||||
//
|
||||
// Fl_File_Icon class...
|
||||
//
|
||||
|
||||
/**
|
||||
The Fl_File_Icon class manages icon images that can be used
|
||||
/**
|
||||
The Fl_File_Icon class manages icon images that can be used
|
||||
as labels in other widgets and as icons in the FileBrowser widget.
|
||||
*/
|
||||
class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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(short d);
|
||||
|
||||
/**
|
||||
Adds a color value to the icon array, returning a pointer to it.
|
||||
\param[in] c color value
|
||||
*/
|
||||
short *add_color(Fl_Color c)
|
||||
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
|
||||
short *add_color(Fl_Color c)
|
||||
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
|
||||
|
||||
/**
|
||||
Adds a vertex value to the icon array, returning a pointer to it.
|
||||
@ -95,8 +93,8 @@ class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
The origin (0.0) is in the lower-lefthand corner of the icon.
|
||||
\param[in] x, y vertex coordinates
|
||||
*/
|
||||
short *add_vertex(int x, int y)
|
||||
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
|
||||
short *add_vertex(int x, int y)
|
||||
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
|
||||
|
||||
/**
|
||||
Adds a vertex value to the icon array, returning a pointer to it.
|
||||
@ -104,35 +102,35 @@ class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
The origin (0.0) is in the lower-lefthand corner of the icon.
|
||||
\param[in] x, y vertex coordinates
|
||||
*/
|
||||
short *add_vertex(float x, float y)
|
||||
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
|
||||
add((short)(y * 10000.0)); 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); }
|
||||
|
||||
/** Clears all icon data from the icon.*/
|
||||
void clear() { num_data_ = 0; }
|
||||
void clear() { num_data_ = 0; }
|
||||
|
||||
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
|
||||
void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
|
||||
|
||||
void label(Fl_Widget *w);
|
||||
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);
|
||||
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);
|
||||
|
||||
/** Returns next file icon object. See Fl_File_Icon::first() */
|
||||
Fl_File_Icon *next() { return (next_); }
|
||||
Fl_File_Icon *next() { return (next_); }
|
||||
|
||||
/** Returns the filename matching pattern for the icon.*/
|
||||
const char *pattern() { return (pattern_); }
|
||||
const char *pattern() { return (pattern_); }
|
||||
|
||||
/** Returns the number of words of data used by the icon.*/
|
||||
int size() { return (num_data_); }
|
||||
int size() { return (num_data_); }
|
||||
|
||||
/**
|
||||
Returns the filetype associated with the icon, which can be one of the
|
||||
following:
|
||||
|
||||
|
||||
\li Fl_File_Icon::ANY, any kind of file.
|
||||
\li Fl_File_Icon::PLAIN, plain files.
|
||||
\li Fl_File_Icon::FIFO, named pipes.
|
||||
@ -140,20 +138,16 @@ class FL_EXPORT Fl_File_Icon { //// Icon data
|
||||
\li Fl_File_Icon::LINK, symbolic links.
|
||||
\li Fl_File_Icon::DIRECTORY, directories.
|
||||
*/
|
||||
int type() { return (type_); }
|
||||
int type() { return (type_); }
|
||||
|
||||
/** Returns the data array for the icon.*/
|
||||
short *value() { return (data_); }
|
||||
short *value() { return (data_); }
|
||||
|
||||
static Fl_File_Icon *find(const char *filename, int filetype = ANY);
|
||||
|
||||
/** Returns a pointer to the first icon in the list.*/
|
||||
static Fl_File_Icon *first() { return (first_); }
|
||||
static void load_system_icons(void);
|
||||
static void load_system_icons(void);
|
||||
};
|
||||
|
||||
#endif // !_Fl_Fl_File_Icon_H_
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// File_Input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -10,11 +8,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -36,7 +34,7 @@
|
||||
FL_WHEN_RELEASE callback won't be called if the directory clicked
|
||||
is the same as the current one.
|
||||
|
||||
<P align=CENTER> \image html Fl_File_Input.png </P>
|
||||
<P align=CENTER> \image html Fl_File_Input.png </P>
|
||||
\image latex Fl_File_Input.png "Fl_File_Input" width=6cm
|
||||
|
||||
\note As all Fl_Input derived objects, Fl_File_Input may call its callback
|
||||
@ -45,15 +43,15 @@
|
||||
to avoid reentrant calls if you plan to show another window or dialog box in the callback.
|
||||
*/
|
||||
class FL_EXPORT Fl_File_Input : public Fl_Input {
|
||||
|
||||
char ok_entry_;
|
||||
uchar down_box_;
|
||||
short buttons_[200];
|
||||
short pressed_;
|
||||
|
||||
void draw_buttons();
|
||||
int handle_button(int event);
|
||||
void update_buttons();
|
||||
char ok_entry_;
|
||||
uchar down_box_;
|
||||
short buttons_[200];
|
||||
short pressed_;
|
||||
|
||||
void draw_buttons();
|
||||
int handle_button(int event);
|
||||
void update_buttons();
|
||||
|
||||
public:
|
||||
|
||||
@ -66,9 +64,9 @@ protected:
|
||||
|
||||
public:
|
||||
/** Gets the box type used for the navigation bar. */
|
||||
Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
|
||||
Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
|
||||
/** Sets the box type to use for the navigation bar. */
|
||||
void down_box(Fl_Boxtype b) { down_box_ = b; }
|
||||
void down_box(Fl_Boxtype b) { down_box_ = b; }
|
||||
|
||||
/**
|
||||
Gets the current error color.
|
||||
@ -79,7 +77,7 @@ public:
|
||||
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
||||
\todo Remove Fl_File_Input::errorcolor() in FLTK 1.5.0 or higher.
|
||||
*/
|
||||
Fl_Color errorcolor() const { return FL_RED; }
|
||||
Fl_Color errorcolor() const { return FL_RED; }
|
||||
|
||||
/**
|
||||
Sets the current error color to \p c.
|
||||
@ -89,21 +87,16 @@ public:
|
||||
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
||||
\todo Remove Fl_File_Input::errorcolor(Fl_Color) in FLTK 1.5.0 or higher.
|
||||
*/
|
||||
void errorcolor(Fl_Color c) {}
|
||||
void errorcolor(Fl_Color c) {}
|
||||
|
||||
int value(const char *str);
|
||||
int value(const char *str, int len);
|
||||
int value(const char *str);
|
||||
int value(const char *str, int len);
|
||||
|
||||
/**
|
||||
Returns the current value, which is a pointer to an internal buffer
|
||||
and is valid only until the next event is handled.
|
||||
*/
|
||||
const char *value() { return Fl_Input_::value(); }
|
||||
const char *value() { return Fl_Input_::value(); }
|
||||
};
|
||||
|
||||
#endif // !Fl_File_Input_H
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Filled dial header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -32,7 +30,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Filled slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -31,7 +29,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Floating point input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -41,7 +39,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -24,7 +22,7 @@
|
||||
|
||||
#include "Fl_Bitmap.H"
|
||||
|
||||
/**
|
||||
/**
|
||||
Forms compatibility Bitmap Image Widget
|
||||
*/
|
||||
class FL_EXPORT Fl_FormsBitmap : public Fl_Widget {
|
||||
@ -41,7 +39,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms pixmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -48,7 +46,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
42
FL/Fl_Free.H
42
FL/Fl_Free.H
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Forms free header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -26,33 +24,33 @@
|
||||
#include "Fl_Widget.H"
|
||||
#endif
|
||||
|
||||
#define FL_NORMAL_FREE 1 /**< normal event handling */
|
||||
#define FL_SLEEPING_FREE 2 /**< deactivate event handling */
|
||||
#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */
|
||||
#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */
|
||||
#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */
|
||||
#define FL_NORMAL_FREE 1 /**< normal event handling */
|
||||
#define FL_SLEEPING_FREE 2 /**< deactivate event handling */
|
||||
#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */
|
||||
#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */
|
||||
#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */
|
||||
|
||||
/** appropriate signature for handle function */
|
||||
typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char);
|
||||
|
||||
/**
|
||||
Emulation of the Forms "free" widget.
|
||||
|
||||
|
||||
This emulation allows the free demo to run, and appears to be useful for
|
||||
porting programs written in Forms which use the free widget or make
|
||||
subclasses of the Forms widgets.
|
||||
|
||||
There are five types of free, which determine when the handle function
|
||||
is called:
|
||||
|
||||
|
||||
\li \c FL_NORMAL_FREE normal event handling.
|
||||
\li \c FL_SLEEPING_FREE deactivates event handling (widget is inactive).
|
||||
\li \c FL_INPUT_FREE accepts FL_FOCUS events.
|
||||
\li \c FL_CONTINUOUS_FREE sets a timeout callback 100 times a second and
|
||||
provides an FL_STEP event. This has obvious
|
||||
detrimental effects on machine performance.
|
||||
detrimental effects on machine performance.
|
||||
\li \c FL_ALL_FREE same as FL_INPUT_FREE and FL_CONTINUOUS_FREE.
|
||||
|
||||
|
||||
*/
|
||||
class FL_EXPORT Fl_Free : public Fl_Widget {
|
||||
FL_HANDLEPTR hfunc;
|
||||
@ -66,15 +64,11 @@ public:
|
||||
};
|
||||
|
||||
// old event names for compatibility:
|
||||
#define FL_MOUSE FL_DRAG /**< for backward compatibility */
|
||||
#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_STEP 101 /**< for backward compatibility */
|
||||
#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_MOUSE FL_DRAG /**< for backward compatibility */
|
||||
#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_STEP 101 /**< for backward compatibility */
|
||||
#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/
|
||||
#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// GIF image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -42,7 +40,3 @@ protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// OpenGL header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -28,7 +26,7 @@ class Fl_Gl_Choice; // structure to hold result of glXChooseVisual
|
||||
class Fl_Gl_Window_Driver;
|
||||
/**
|
||||
The Fl_Gl_Window widget sets things up so OpenGL works.
|
||||
|
||||
|
||||
It also keeps an OpenGL "context" for that window, so that changes to the
|
||||
lighting and projection may be reused between redraws. Fl_Gl_Window
|
||||
also flushes the OpenGL streams and swaps buffers after draw() returns.
|
||||
@ -42,7 +40,7 @@ class Fl_Gl_Window_Driver;
|
||||
Please note that the FLTK drawing and clipping functions
|
||||
will not work inside an Fl_Gl_Window. All drawing
|
||||
should be done using OpenGL calls exclusively.
|
||||
|
||||
|
||||
\see \ref opengl_highdpi
|
||||
|
||||
\note FLTK 1.4 introduces a driver system for graphic calls. It is now possible
|
||||
@ -81,9 +79,9 @@ public:
|
||||
int handle(int);
|
||||
/** Returns a pointer to the window's Fl_Gl_Window_Driver object */
|
||||
Fl_Gl_Window_Driver *gl_driver() {return pGlWindowDriver;}
|
||||
|
||||
|
||||
/**
|
||||
Is turned off when FLTK creates a new context for this window or
|
||||
Is turned off when FLTK creates a new context for this window or
|
||||
when the window resizes, and is turned on \e after draw() is called.
|
||||
You can use this inside your draw() method to avoid unnecessarily
|
||||
initializing the OpenGL context. Just do this:
|
||||
@ -100,28 +98,28 @@ public:
|
||||
... draw your geometry here ...
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
You can turn valid() on by calling valid(1). You
|
||||
should only do this after fixing the transformation inside a draw()
|
||||
or after make_current(). This is done automatically after
|
||||
or after make_current(). This is done automatically after
|
||||
draw() returns.
|
||||
*/
|
||||
char valid() const {return valid_f_ & 1;}
|
||||
/**
|
||||
See char Fl_Gl_Window::valid() const
|
||||
See char Fl_Gl_Window::valid() const
|
||||
*/
|
||||
void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;}
|
||||
void invalidate();
|
||||
|
||||
/**
|
||||
Will only be set if the
|
||||
Will only be set if the
|
||||
OpenGL context is created or recreated. It differs from
|
||||
Fl_Gl_Window::valid() which is also set whenever the context
|
||||
changes size.
|
||||
*/
|
||||
char context_valid() const {return valid_f_ & 2;}
|
||||
/**
|
||||
See char Fl_Gl_Window::context_valid() const
|
||||
See char Fl_Gl_Window::context_valid() const
|
||||
*/
|
||||
void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;}
|
||||
|
||||
@ -139,7 +137,7 @@ public:
|
||||
/**
|
||||
Set or change the OpenGL capabilites of the window. The value can be
|
||||
any of the following OR'd together:
|
||||
|
||||
|
||||
- \c FL_RGB - RGB color (not indexed)
|
||||
- \c FL_RGB8 - RGB color with at least 8 bits of each color
|
||||
- \c FL_INDEX - Indexed mode
|
||||
@ -151,14 +149,14 @@ public:
|
||||
- \c FL_STENCIL - stencil buffer
|
||||
- \c FL_MULTISAMPLE - multisample antialiasing
|
||||
- \c FL_OPENGL3 - use OpenGL version 3.0 or more.
|
||||
|
||||
|
||||
FL_RGB and FL_SINGLE have a value of zero, so they
|
||||
are "on" unless you give FL_INDEX or FL_DOUBLE.
|
||||
|
||||
|
||||
If the desired combination cannot be done, FLTK will try turning off
|
||||
FL_MULTISAMPLE. If this also fails the show() will call
|
||||
Fl::error() and not show the window.
|
||||
|
||||
|
||||
You can change the mode while the window is displayed. This is most
|
||||
useful for turning double-buffering on and off. Under X this will
|
||||
cause the old X window to be destroyed and a new one to be created. If
|
||||
@ -166,14 +164,14 @@ public:
|
||||
window to blink, raise to the top, and be de-iconized, and the xid()
|
||||
will change, possibly breaking other code. It is best to make the GL
|
||||
window a child of another window if you wish to do this!
|
||||
|
||||
|
||||
mode() must not be called within draw() since it
|
||||
changes the current context.
|
||||
|
||||
|
||||
The FL_OPENGL3 flag is required to access OpenGL version 3 or more
|
||||
under the X11 and MacOS platforms; it's optional under Windows.
|
||||
See more details in \ref opengl3.
|
||||
|
||||
|
||||
\version the <tt>FL_OPENGL3</tt> flag appeared in version 1.3.4
|
||||
*/
|
||||
int mode(int a) {return mode(a,0);}
|
||||
@ -204,7 +202,7 @@ public:
|
||||
|
||||
// Note: Doxygen docs in Fl_Widget.H to avoid redundancy.
|
||||
virtual Fl_Gl_Window* as_gl_window() {return this;}
|
||||
|
||||
|
||||
float pixels_per_unit();
|
||||
/** Gives the window width in OpenGL pixels.
|
||||
When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::w()
|
||||
@ -226,10 +224,10 @@ public:
|
||||
\version 1.3.4
|
||||
*/
|
||||
int pixel_h() { return int(pixels_per_unit() * h() + 0.5f); }
|
||||
|
||||
|
||||
~Fl_Gl_Window();
|
||||
/**
|
||||
Creates a new Fl_Gl_Window widget using the given size, and label string.
|
||||
Creates a new Fl_Gl_Window widget using the given size, and label string.
|
||||
The default boxtype is FL_NO_BOX. The default mode is FL_RGB|FL_DOUBLE|FL_DEPTH.
|
||||
*/
|
||||
Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();}
|
||||
@ -244,7 +242,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // Fl_Gl_Window_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Definition of classes Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
|
||||
// for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -10,11 +8,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/**
|
||||
@ -64,9 +62,9 @@ struct Fl_Fontdesc;
|
||||
drawing operations (e.g., fl_rectf()) that operate on the current drawing surface (see Fl_Surface_Device).
|
||||
Drawing operations are functionally presented in \ref drawing and as function lists
|
||||
in the \ref fl_drawings and \ref fl_attributes modules.
|
||||
|
||||
|
||||
<tt>Fl_Surface_Device::surface()->driver()</tt>
|
||||
gives at any time the graphics driver used by all drawing operations.
|
||||
gives at any time the graphics driver used by all drawing operations.
|
||||
For compatibility with older FLTK versions, the \ref fl_graphics_driver global variable gives the same result.
|
||||
Its value changes when
|
||||
drawing operations are directed to another drawing surface by Fl_Surface_Device::push_current() /
|
||||
@ -130,7 +128,7 @@ and
|
||||
draw_fixed(Fl_RGB_Image *,....) because scale-and-draw may require function Alphablend()
|
||||
from MSIMG32.DLL. In the absence of that, the draw_rgb() implementation calls
|
||||
Fl_Graphics_Driver::draw_rgb() which runs Fl_GDI_Graphics_Driver::draw_fixed(Fl_RGB_Image*,...).
|
||||
|
||||
|
||||
Graphics drivers also implement cache(Fl_Pixmap*), cache(Fl_Bitmap*) and cache(Fl_RGB_Image*)
|
||||
to compute the cached form of all image types, and uncache(Fl_RGB_Image *,...),
|
||||
uncache_pixmap(fl_uintptr_t) and delete_bitmask(Fl_Bitmask) to destroy cached image forms.
|
||||
@ -235,7 +233,7 @@ protected:
|
||||
static Fl_Offscreen get_offscreen_and_delete_image_surface(Fl_Image_Surface*);
|
||||
/** For internal library use only */
|
||||
static void draw_empty(Fl_Image* img, int X, int Y) {img->draw_empty(X, Y);}
|
||||
|
||||
|
||||
Fl_Graphics_Driver();
|
||||
void cache_size(Fl_Image *img, int &width, int &height);
|
||||
static unsigned need_pixmap_bg_color;
|
||||
@ -402,10 +400,10 @@ struct Fl_Fontdesc {
|
||||
- scale the cached offscreen of image objects
|
||||
- scale the pixel arrays used when performing direct image draws
|
||||
- call the member functions of a platform-specific,
|
||||
Fl_Scalable_Graphics_Driver-derived class that do the drawings with adequately
|
||||
Fl_Scalable_Graphics_Driver-derived class that do the drawings with adequately
|
||||
scaled coordinates. The member functions are named with the _unscaled suffix.
|
||||
- scale and unscale the clipping region.
|
||||
|
||||
|
||||
This class is presently used by the X11 and Windows platforms to support HiDPI displays.
|
||||
In the future, it may also be used by other platforms.
|
||||
*/
|
||||
@ -492,7 +490,3 @@ protected:
|
||||
\}
|
||||
\endcond
|
||||
*/
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Group header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -52,7 +50,7 @@ class FL_EXPORT Fl_Group : public Fl_Widget {
|
||||
|
||||
int navigation(int);
|
||||
static Fl_Group *current_;
|
||||
|
||||
|
||||
// unimplemented copy ctor and assignment operator
|
||||
Fl_Group(const Fl_Group&);
|
||||
Fl_Group& operator=(const Fl_Group&);
|
||||
@ -84,7 +82,7 @@ public:
|
||||
Fl_Widget* child(int n) const {return array()[n];}
|
||||
int find(const Fl_Widget*) const;
|
||||
/**
|
||||
See int Fl_Group::find(const Fl_Widget *w) const
|
||||
See int Fl_Group::find(const Fl_Widget *w) const
|
||||
*/
|
||||
int find(const Fl_Widget& o) const {return find(&o);}
|
||||
Fl_Widget* const* array() const;
|
||||
@ -98,7 +96,7 @@ public:
|
||||
virtual ~Fl_Group();
|
||||
void add(Fl_Widget&);
|
||||
/**
|
||||
See void Fl_Group::add(Fl_Widget &w)
|
||||
See void Fl_Group::add(Fl_Widget &w)
|
||||
*/
|
||||
void add(Fl_Widget* o) {add(*o);}
|
||||
void insert(Fl_Widget&, int i);
|
||||
@ -117,7 +115,7 @@ public:
|
||||
void clear();
|
||||
|
||||
/**
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
*/
|
||||
void resizable(Fl_Widget& o) {resizable_ = &o;}
|
||||
/**
|
||||
@ -132,11 +130,11 @@ public:
|
||||
\image html resizebox1.png
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
\image html resizebox2.png
|
||||
|
||||
|
||||
\image latex resizebox1.png "before resize" width=4cm
|
||||
|
||||
|
||||
\image latex resizebox2.png "after resize" width=4.85cm
|
||||
|
||||
The resizable may be set to the group itself, in which case all the
|
||||
@ -152,7 +150,7 @@ public:
|
||||
*/
|
||||
void resizable(Fl_Widget* o) {resizable_ = o;}
|
||||
/**
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
See void Fl_Group::resizable(Fl_Widget *box)
|
||||
*/
|
||||
Fl_Widget* resizable() const {return resizable_;}
|
||||
/**
|
||||
@ -164,7 +162,7 @@ public:
|
||||
/**
|
||||
Controls whether the group widget clips the drawing of
|
||||
child widgets to its bounding box.
|
||||
|
||||
|
||||
Set \p c to 1 if you want to clip the child widgets to the
|
||||
bounding box.
|
||||
|
||||
@ -204,7 +202,7 @@ public:
|
||||
/**
|
||||
This is a dummy class that allows you to end a Fl_Group in a constructor list of a
|
||||
class:
|
||||
\code
|
||||
\code
|
||||
class MyClass {
|
||||
Fl_Group group;
|
||||
Fl_Button button_in_group;
|
||||
@ -218,7 +216,7 @@ public:
|
||||
end(),
|
||||
button_outside_group(10,120,60,30) {
|
||||
[..ctor code..]
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class FL_EXPORT Fl_End {
|
||||
@ -228,7 +226,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
// ========================================================================
|
||||
// DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!!
|
||||
@ -36,11 +34,11 @@
|
||||
#include <FL/Fl_Help_View.H>
|
||||
|
||||
class FL_EXPORT Fl_Help_Dialog {
|
||||
int index_;
|
||||
int max_;
|
||||
int index_;
|
||||
int max_;
|
||||
int line_[100]; // FIXME: we must remove those static numbers
|
||||
char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers
|
||||
int find_pos_;
|
||||
int find_pos_;
|
||||
public:
|
||||
Fl_Help_Dialog();
|
||||
private:
|
||||
@ -84,7 +82,3 @@ public:
|
||||
int y();
|
||||
};
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Help Viewer widget definitions.
|
||||
//
|
||||
// Copyright 1997-2010 by Easy Software Products.
|
||||
@ -10,11 +8,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -45,15 +43,15 @@ typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *);
|
||||
//
|
||||
|
||||
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
|
||||
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
|
||||
};
|
||||
|
||||
//
|
||||
@ -61,12 +59,12 @@ struct Fl_Help_Block {
|
||||
//
|
||||
/** Definition of a link for the html viewer. */
|
||||
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
|
||||
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
|
||||
};
|
||||
|
||||
/*
|
||||
@ -93,22 +91,22 @@ struct FL_EXPORT Fl_Help_Font_Stack {
|
||||
nfonts_ = 0;
|
||||
}
|
||||
|
||||
void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
nfonts_ = 0;
|
||||
elts_[nfonts_].set(f, s, c);
|
||||
fl_font(f, s);
|
||||
fl_font(f, s);
|
||||
fl_color(c);
|
||||
}
|
||||
/** Gets the top (current) element on the stack. */
|
||||
void top(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { elts_[nfonts_].get(f, s, c); }
|
||||
/** Pushes the font style triplet on the stack, also calls fl_font() & fl_color() adequately */
|
||||
void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) {
|
||||
if (nfonts_ < MAX_FL_HELP_FS_ELTS-1) nfonts_ ++;
|
||||
elts_[nfonts_].set(f, s, c);
|
||||
fl_font(f, s); fl_color(c);
|
||||
fl_font(f, s); fl_color(c);
|
||||
}
|
||||
/** Pops from the stack the font style triplet and calls fl_font() & fl_color() adequately */
|
||||
void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {
|
||||
void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {
|
||||
if (nfonts_ > 0) nfonts_ --;
|
||||
top(f, s, c);
|
||||
fl_font(f, s); fl_color(c);
|
||||
@ -117,15 +115,15 @@ struct FL_EXPORT Fl_Help_Font_Stack {
|
||||
size_t count() const {return nfonts_;} // Gets the current number of fonts in the stack
|
||||
|
||||
protected:
|
||||
size_t nfonts_; ///< current number of fonts in stack
|
||||
size_t nfonts_; ///< current number of fonts in stack
|
||||
Fl_Help_Font_Style elts_[MAX_FL_HELP_FS_ELTS]; ///< font elements
|
||||
};
|
||||
|
||||
/** Fl_Help_Target structure */
|
||||
|
||||
struct Fl_Help_Target {
|
||||
char name[32]; ///< Target name
|
||||
int y; ///< Y offset of target
|
||||
char name[32]; ///< Target name
|
||||
int y; ///< Y offset of target
|
||||
};
|
||||
|
||||
/**
|
||||
@ -193,42 +191,42 @@ struct Fl_Help_Target {
|
||||
- yen Yuml yuml
|
||||
|
||||
*/
|
||||
class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
||||
|
||||
enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments
|
||||
class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
||||
|
||||
char title_[1024]; ///< Title string
|
||||
Fl_Color defcolor_, ///< Default text color
|
||||
bgcolor_, ///< Background color
|
||||
textcolor_, ///< Text color
|
||||
linkcolor_; ///< Link color
|
||||
Fl_Font textfont_; ///< Default font for text
|
||||
Fl_Fontsize textsize_; ///< Default font size
|
||||
const char *value_; ///< HTML text value
|
||||
Fl_Help_Font_Stack fstack_; ///< font stack management
|
||||
int nblocks_, ///< Number of blocks/paragraphs
|
||||
ablocks_; ///< Allocated blocks
|
||||
Fl_Help_Block *blocks_; ///< Blocks
|
||||
enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments
|
||||
|
||||
Fl_Help_Func *link_; ///< Link transform function
|
||||
char title_[1024]; ///< Title string
|
||||
Fl_Color defcolor_, ///< Default text color
|
||||
bgcolor_, ///< Background color
|
||||
textcolor_, ///< Text color
|
||||
linkcolor_; ///< Link color
|
||||
Fl_Font textfont_; ///< Default font for text
|
||||
Fl_Fontsize textsize_; ///< Default font size
|
||||
const char *value_; ///< HTML text value
|
||||
Fl_Help_Font_Stack fstack_; ///< font stack management
|
||||
int nblocks_, ///< Number of blocks/paragraphs
|
||||
ablocks_; ///< Allocated blocks
|
||||
Fl_Help_Block *blocks_; ///< Blocks
|
||||
|
||||
int nlinks_, ///< Number of links
|
||||
alinks_; ///< Allocated links
|
||||
Fl_Help_Link *links_; ///< Links
|
||||
Fl_Help_Func *link_; ///< Link transform function
|
||||
|
||||
int ntargets_, ///< Number of targets
|
||||
atargets_; ///< Allocated targets
|
||||
Fl_Help_Target *targets_; ///< Targets
|
||||
int nlinks_, ///< Number of links
|
||||
alinks_; ///< Allocated links
|
||||
Fl_Help_Link *links_; ///< Links
|
||||
|
||||
char directory_[FL_PATH_MAX];///< Directory for current file
|
||||
char filename_[FL_PATH_MAX]; ///< Current filename
|
||||
int topline_, ///< Top line in document
|
||||
leftline_, ///< Lefthand position
|
||||
size_, ///< Total document length
|
||||
hsize_, ///< Maximum document width
|
||||
scrollbar_size_; ///< Size for both scrollbars
|
||||
Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document
|
||||
hscrollbar_; ///< Horizontal scrollbar
|
||||
int ntargets_, ///< Number of targets
|
||||
atargets_; ///< Allocated targets
|
||||
Fl_Help_Target *targets_; ///< Targets
|
||||
|
||||
char directory_[FL_PATH_MAX];///< Directory for current file
|
||||
char filename_[FL_PATH_MAX]; ///< Current filename
|
||||
int topline_, ///< Top line in document
|
||||
leftline_, ///< Lefthand position
|
||||
size_, ///< Total document length
|
||||
hsize_, ///< Maximum document width
|
||||
scrollbar_size_; ///< Size for both scrollbars
|
||||
Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document
|
||||
hscrollbar_; ///< Horizontal scrollbar
|
||||
|
||||
static int selection_first;
|
||||
static int selection_last;
|
||||
@ -251,24 +249,24 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
||||
void pushfont(Fl_Font f, Fl_Fontsize s, Fl_Color c) {fstack_.push(f, s, c);}
|
||||
void popfont(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {fstack_.pop(f, s, c);}
|
||||
|
||||
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);
|
||||
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);
|
||||
protected:
|
||||
void draw();
|
||||
void draw();
|
||||
private:
|
||||
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);
|
||||
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 get_length(const char *l);
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int);
|
||||
private:
|
||||
|
||||
void hv_draw(const char *t, int x, int y, int entity_extra_length = 0);
|
||||
@ -284,72 +282,72 @@ public:
|
||||
Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0);
|
||||
~Fl_Help_View();
|
||||
/** Returns the current directory for the text in the buffer. */
|
||||
const char *directory() const { if (directory_[0]) return (directory_);
|
||||
else return ((const char *)0); }
|
||||
const char *directory() const { if (directory_[0]) return (directory_);
|
||||
else return ((const char *)0); }
|
||||
/** Returns the current filename for the text in the buffer. */
|
||||
const char *filename() const { if (filename_[0]) return (filename_);
|
||||
else return ((const char *)0); }
|
||||
int find(const char *s, int p = 0);
|
||||
const char *filename() const { if (filename_[0]) return (filename_);
|
||||
else return ((const char *)0); }
|
||||
int find(const char *s, int p = 0);
|
||||
/**
|
||||
This method assigns a callback function to use when a link is
|
||||
followed or a file is loaded (via Fl_Help_View::load()) that
|
||||
requires a different file or path.
|
||||
|
||||
|
||||
The callback function receives a pointer to the Fl_Help_View
|
||||
widget and the URI or full pathname for the file in question.
|
||||
It must return a pathname that can be opened as a local file or NULL:
|
||||
|
||||
|
||||
\code
|
||||
const char *fn(Fl_Widget *w, const char *uri);
|
||||
\endcode
|
||||
|
||||
|
||||
The link function can be used to retrieve remote or virtual
|
||||
documents, returning a temporary file that contains the actual
|
||||
data. If the link function returns NULL, the value of
|
||||
the Fl_Help_View widget will remain unchanged.
|
||||
|
||||
|
||||
If the link callback cannot handle the URI scheme, it should
|
||||
return the uri value unchanged or set the value() of the widget
|
||||
before returning NULL.
|
||||
*/
|
||||
void link(Fl_Help_Func *fn) { link_ = fn; }
|
||||
int load(const char *f);
|
||||
void resize(int,int,int,int);
|
||||
void link(Fl_Help_Func *fn) { link_ = fn; }
|
||||
int load(const char *f);
|
||||
void resize(int,int,int,int);
|
||||
/** Gets the size of the help view. */
|
||||
int size() const { return (size_); }
|
||||
void size(int W, int H) { Fl_Widget::size(W, H); }
|
||||
int size() const { return (size_); }
|
||||
void size(int W, int H) { Fl_Widget::size(W, H); }
|
||||
/** Sets the default text color. */
|
||||
void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
|
||||
void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
|
||||
/** Returns the current default text color. */
|
||||
Fl_Color textcolor() const { return (defcolor_); }
|
||||
Fl_Color textcolor() const { return (defcolor_); }
|
||||
/** Sets the default text font. */
|
||||
void textfont(Fl_Font f) { textfont_ = f; format(); }
|
||||
void textfont(Fl_Font f) { textfont_ = f; format(); }
|
||||
/** Returns the current default text font. */
|
||||
Fl_Font textfont() const { return (textfont_); }
|
||||
/** Sets the default text size. */
|
||||
void textsize(Fl_Fontsize s) { textsize_ = s; format(); }
|
||||
void textsize(Fl_Fontsize s) { textsize_ = s; format(); }
|
||||
/** Gets the default text size. */
|
||||
Fl_Fontsize textsize() const { return (textsize_); }
|
||||
/** Returns the current document title, or NULL if there is no title. */
|
||||
const char *title() { return (title_); }
|
||||
void topline(const char *n);
|
||||
void topline(int);
|
||||
const char *title() { return (title_); }
|
||||
void topline(const char *n);
|
||||
void topline(int);
|
||||
/** Returns the current top line in pixels. */
|
||||
int topline() const { return (topline_); }
|
||||
void leftline(int);
|
||||
int topline() const { return (topline_); }
|
||||
void leftline(int);
|
||||
/** Gets the left position in pixels. */
|
||||
int leftline() const { return (leftline_); }
|
||||
void value(const char *val);
|
||||
int leftline() const { return (leftline_); }
|
||||
void value(const char *val);
|
||||
/** Returns the current buffer contents. */
|
||||
const char *value() const { return (value_); }
|
||||
const char *value() const { return (value_); }
|
||||
void clear_selection();
|
||||
void select_all();
|
||||
/**
|
||||
Gets the current size of the scrollbars' troughs, in pixels.
|
||||
|
||||
If this value is zero (default), this widget will use the
|
||||
If this value is zero (default), this widget will use the
|
||||
Fl::scrollbar_size() value as the scrollbar's width.
|
||||
|
||||
|
||||
\returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used.
|
||||
\see Fl::scrollbar_size(int)
|
||||
*/
|
||||
@ -360,28 +358,24 @@ public:
|
||||
Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels.
|
||||
|
||||
Normally you should not need this method, and should use
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||
your widgets' scrollbars. This ensures your application
|
||||
has a consistent UI, is the default behavior, and is normally
|
||||
what you want.
|
||||
|
||||
Only use THIS method if you really need to override the global
|
||||
scrollbar size. The need for this should be rare.
|
||||
|
||||
|
||||
Setting \p newSize to the special value of 0 causes the widget to
|
||||
track the global Fl::scrollbar_size(), which is the default.
|
||||
|
||||
|
||||
\param[in] newSize Sets the scrollbar size in pixels.\n
|
||||
If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
|
||||
\see Fl::scrollbar_size()
|
||||
*/
|
||||
void scrollbar_size(int newSize) {
|
||||
scrollbar_size_ = newSize;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !Fl_Help_View_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Hold browser header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -25,7 +23,7 @@
|
||||
#include "Fl_Browser.H"
|
||||
|
||||
/**
|
||||
The Fl_Hold_Browser is a subclass of Fl_Browser which lets the user
|
||||
The Fl_Hold_Browser is a subclass of Fl_Browser which lets the user
|
||||
select a single item, or no items by clicking on the empty space.
|
||||
|
||||
\image html fl_hold_browser.png "Fl_Hold_Browser"
|
||||
@ -49,7 +47,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal fill slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -30,7 +28,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal "nice" slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -30,7 +28,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -39,7 +37,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Horizontal value slider header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/* \file
|
||||
@ -30,7 +28,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Image header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
/** \file
|
||||
@ -44,19 +42,19 @@ enum Fl_RGB_Scaling {
|
||||
|
||||
/**
|
||||
\brief Base class for image caching, scaling and drawing.
|
||||
|
||||
|
||||
Fl_Image is the base class used for caching, scaling and drawing all kinds of images
|
||||
in FLTK. This class keeps track of common image data such as the pixels,
|
||||
colormap, width, height, and depth. Virtual methods are used to provide
|
||||
in FLTK. This class keeps track of common image data such as the pixels,
|
||||
colormap, width, height, and depth. Virtual methods are used to provide
|
||||
type-specific image handling.
|
||||
|
||||
|
||||
Each image possesses two (width, height) pairs. 1) The width and height of the
|
||||
image raw data are returned by data_w() and data_h(). These values are set
|
||||
when the image is created and remain unchanged. 2) The width and height
|
||||
of the area filled by the image when it gets drawn are returned by w() and h().
|
||||
The values are equal to data_w() and data_h() when the image is created,
|
||||
and can be changed by the scale() member function.
|
||||
|
||||
|
||||
Since the Fl_Image class does not support image
|
||||
drawing by itself, calling the draw() method results in
|
||||
a box with an X in it being drawn instead.
|
||||
@ -67,7 +65,7 @@ public:
|
||||
static const int ERR_NO_IMAGE = -1;
|
||||
static const int ERR_FILE_ACCESS = -2;
|
||||
static const int ERR_FORMAT = -3;
|
||||
|
||||
|
||||
private:
|
||||
int w_, h_, d_, ld_, count_;
|
||||
int data_w_, data_h_;
|
||||
@ -108,7 +106,7 @@ protected:
|
||||
to account for the extra data per line.
|
||||
*/
|
||||
void ld(int LD) {ld_ = LD;}
|
||||
/**
|
||||
/**
|
||||
Sets the current array pointer and count of pointers in the array.
|
||||
*/
|
||||
void data(const char * const *p, int c) {data_ = p; count_ = c;}
|
||||
@ -120,7 +118,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns the current image drawing width in FLTK units.
|
||||
The values of w() and data_w() are identical unless scale() has been called
|
||||
after which they may differ.
|
||||
@ -233,10 +231,10 @@ public:
|
||||
/**
|
||||
Draws the image to the current drawing surface with a bounding box.
|
||||
Arguments <tt>X,Y,W,H</tt> specify
|
||||
a bounding box for the image, with the origin
|
||||
a bounding box for the image, with the origin
|
||||
(upper-left corner) of the image offset by the \c cx
|
||||
and \c cy arguments.
|
||||
|
||||
|
||||
In other words: <tt>fl_push_clip(X,Y,W,H)</tt> is applied,
|
||||
the image is drawn with its upper-left corner at <tt>X-cx,Y-cy</tt> and its own width and height,
|
||||
<tt>fl_pop_clip</tt><tt>()</tt> is applied.
|
||||
@ -256,7 +254,7 @@ public:
|
||||
static void RGB_scaling(Fl_RGB_Scaling);
|
||||
// get RGB image scaling method
|
||||
static Fl_RGB_Scaling RGB_scaling();
|
||||
|
||||
|
||||
// set the image drawing size
|
||||
virtual void scale(int width, int height, int proportional = 1, int can_expand = 0);
|
||||
/** Sets what algorithm is used when resizing a source image to draw it.
|
||||
@ -320,17 +318,17 @@ public:
|
||||
virtual void label(Fl_Menu_Item*m);
|
||||
virtual void uncache();
|
||||
/** Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
|
||||
|
||||
|
||||
The image size in bytes of an Fl_RGB_Image object is the value of the product w() * h() * d().
|
||||
If this product exceeds size, the created object of a derived class of Fl_RGB_Image
|
||||
If this product exceeds size, the created object of a derived class of Fl_RGB_Image
|
||||
won't be loaded with the image data.
|
||||
This does not apply to direct RGB image creation with
|
||||
This does not apply to direct RGB image creation with
|
||||
Fl_RGB_Image::Fl_RGB_Image(const uchar *bits, int W, int H, int D, int LD).
|
||||
The default max_size() value is essentially infinite.
|
||||
The default max_size() value is essentially infinite.
|
||||
*/
|
||||
static void max_size(size_t size) { max_size_ = size;}
|
||||
/** Returns the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
|
||||
|
||||
|
||||
\sa void Fl_RGB_Image::max_size(size_t)
|
||||
*/
|
||||
static size_t max_size() {return max_size_;}
|
||||
@ -343,7 +341,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // !Fl_Image_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Draw-to-image code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef Fl_Image_Surface_H
|
||||
@ -25,17 +23,17 @@
|
||||
#include <FL/platform_types.h> // for Fl_Offscreen
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
\brief Directs all graphics requests to an Fl_Image.
|
||||
|
||||
|
||||
After creation of an Fl_Image_Surface object, make it the current drawing
|
||||
surface calling Fl_Surface_Device::push_current(), and all
|
||||
subsequent graphics requests will be recorded in the image. It's possible to
|
||||
draw widgets (using Fl_Image_Surface::draw()) or to use any of the
|
||||
subsequent graphics requests will be recorded in the image. It's possible to
|
||||
draw widgets (using Fl_Image_Surface::draw()) or to use any of the
|
||||
\ref fl_drawings or the \ref fl_attributes. Finally, call image() on the object
|
||||
to obtain a newly allocated Fl_RGB_Image object.
|
||||
Fl_Gl_Window objects can be drawn in the image as well.
|
||||
|
||||
|
||||
Usage example:
|
||||
\code
|
||||
// this is the widget that you want to draw into an image
|
||||
@ -43,12 +41,12 @@
|
||||
|
||||
// create an Fl_Image_Surface object
|
||||
Fl_Image_Surface *image_surface = new Fl_Image_Surface(g->w(), g->h());
|
||||
|
||||
|
||||
// direct all further graphics requests to the image
|
||||
Fl_Surface_Device::push_current(image_surface);
|
||||
|
||||
// draw a white background
|
||||
fl_color(FL_WHITE);
|
||||
fl_color(FL_WHITE);
|
||||
fl_rectf(0, 0, g->w(), g->h());
|
||||
|
||||
// draw the g widget in the image
|
||||
@ -59,7 +57,7 @@
|
||||
|
||||
// direct graphics requests back to their previous destination
|
||||
Fl_Surface_Device::pop_current();
|
||||
|
||||
|
||||
// delete the image_surface object, but not the image itself
|
||||
delete image_surface;
|
||||
\endcode
|
||||
@ -125,7 +123,3 @@ protected:
|
||||
*/
|
||||
|
||||
#endif // Fl_Image_Surface_H
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
@ -1,6 +1,4 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Input header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
@ -9,11 +7,11 @@
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
// file is missing or damaged, see the license at:
|
||||
//
|
||||
// http://www.fltk.org/COPYING.php
|
||||
// https://www.fltk.org/COPYING.php
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
// Please see the following page on how to report bugs and issues:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||