mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 19:10:24 +08:00
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:
Executable → Regular
+25
-31
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# clang-format control file for the FLTK project.
|
# clang-format control file for the FLTK project.
|
||||||
#
|
#
|
||||||
# Copyright 2017 by Bill Spitzak and others.
|
# Copyright 2017 by Bill Spitzak and others.
|
||||||
@@ -9,11 +7,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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:
|
# Important notes:
|
||||||
@@ -46,11 +44,11 @@
|
|||||||
|
|
||||||
# FLTK settings (currently experimental).
|
# FLTK settings (currently experimental).
|
||||||
|
|
||||||
BasedOnStyle: LLVM
|
BasedOnStyle: LLVM
|
||||||
|
|
||||||
# The Language tag marks C++ options
|
# The Language tag marks C++ options
|
||||||
|
|
||||||
# Language: Cpp
|
# Language: Cpp
|
||||||
|
|
||||||
# The following options override the LLVM style definitions, if set.
|
# 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
|
# UseTab can be set to 'Never' (default) or 'ForIndentation' to avoid
|
||||||
# this annoying bug of clang-format.
|
# this annoying bug of clang-format.
|
||||||
#
|
#
|
||||||
# UseTab: Always
|
# UseTab: Always
|
||||||
UseTab: ForIndentation
|
UseTab: ForIndentation
|
||||||
|
|
||||||
# Should we extend code lines beyond 80 columns ?
|
# Should we extend code lines beyond 80 columns ?
|
||||||
# Default: 80
|
# Default: 80
|
||||||
ColumnLimit: 120
|
ColumnLimit: 120
|
||||||
|
|
||||||
# The FLTK CMP requires that case labels are indented (LLVM: false)
|
# 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 ?
|
# There are sometimes more than 1 empty lines; should we keep 2 or more ?
|
||||||
# LLVM default is 1.
|
# LLVM default is 1.
|
||||||
|
|
||||||
MaxEmptyLinesToKeep: 2
|
MaxEmptyLinesToKeep: 2
|
||||||
|
|
||||||
# Present FLTK source code contains some short blocks and if statements
|
# 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
|
# in one line, but we should better make it consistent and NOT use the
|
||||||
# following "Allow..." statements (leave them commented out):
|
# following "Allow..." statements (leave them commented out):
|
||||||
#
|
#
|
||||||
# LLVM default values:
|
# LLVM default values:
|
||||||
# AllowShortBlocksOnASingleLine: false
|
# AllowShortBlocksOnASingleLine: false
|
||||||
# AllowShortFunctionsOnASingleLine: All
|
# AllowShortFunctionsOnASingleLine: All
|
||||||
# AllowShortIfStatementsOnASingleLine: false
|
# AllowShortIfStatementsOnASingleLine: false
|
||||||
# AllowShortLoopsOnASingleLine: false
|
# AllowShortLoopsOnASingleLine: false
|
||||||
#
|
#
|
||||||
# FLTK values:
|
# FLTK values:
|
||||||
# AllowShortBlocksOnASingleLine: true
|
# AllowShortBlocksOnASingleLine: true
|
||||||
# AllowShortIfStatementsOnASingleLine: true
|
# AllowShortIfStatementsOnASingleLine: true
|
||||||
|
|
||||||
# Short inline functions in header files are an exception to the above "rule":
|
# 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.
|
# 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
|
# Include files should be left as-is until we know we can sort them
|
||||||
# without any bad side effects (LLVM: true)
|
# without any bad side effects (LLVM: true)
|
||||||
|
|
||||||
SortIncludes: false
|
SortIncludes: false
|
||||||
|
|
||||||
# Multiple constructor initializers must be on consecutive lines:
|
# Multiple constructor initializers must be on consecutive lines:
|
||||||
|
|
||||||
BreakConstructorInitializersBeforeComma: true
|
BreakConstructorInitializersBeforeComma: true
|
||||||
|
|
||||||
# Constructor initializers will be indented by 2 spaces (LLVM: 4):
|
# Constructor initializers will be indented by 2 spaces (LLVM: 4):
|
||||||
|
|
||||||
ConstructorInitializerIndentWidth: 2
|
ConstructorInitializerIndentWidth: 2
|
||||||
|
|
||||||
# Continuation lines (if automatically wrapped) may be indented differently.
|
# Continuation lines (if automatically wrapped) may be indented differently.
|
||||||
# This does not apply to function call arguments which are aligned to the
|
# This does not apply to function call arguments which are aligned to the
|
||||||
# opening bracket. LLVM (default): 4
|
# opening bracket. LLVM (default): 4
|
||||||
# ContinuationIndentWidth: 2
|
# ContinuationIndentWidth: 2
|
||||||
|
|
||||||
# Most of FLTK's code uses 'void *p' as opposed to 'void* p'.
|
# Most of FLTK's code uses 'void *p' as opposed to 'void* p'.
|
||||||
# This is particularly useful in combined declarations like:
|
# 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
|
# Note: this also applies to references like 'int &w, int &h', for instance
|
||||||
# in function parameter lists.
|
# in function parameter lists.
|
||||||
|
|
||||||
DerivePointerAlignment: false
|
DerivePointerAlignment: false
|
||||||
PointerAlignment: Right
|
PointerAlignment: Right
|
||||||
|
|
||||||
#
|
|
||||||
# End of "$Id$".
|
|
||||||
#
|
|
||||||
|
|||||||
+27
-27
@@ -14,50 +14,50 @@
|
|||||||
|
|
||||||
# files that will not be exported in source tarballs
|
# files that will not be exported in source tarballs
|
||||||
|
|
||||||
makesrcdist export-ignore eol=lf
|
makesrcdist export-ignore eol=lf
|
||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
.gitlab-ci.yml export-ignore
|
.gitlab-ci.yml export-ignore
|
||||||
.travis.yml export-ignore
|
.travis.yml export-ignore
|
||||||
|
|
||||||
# fluid files (eol=lf or text?)
|
# fluid files (eol=lf or text?)
|
||||||
|
|
||||||
*.fl eol=lf
|
*.fl eol=lf
|
||||||
|
|
||||||
# shell scripts etc. with Unix line endings (lf)
|
# shell scripts etc. with Unix line endings (lf)
|
||||||
|
|
||||||
*.ac eol=lf
|
*.ac eol=lf
|
||||||
*.in eol=lf
|
*.in eol=lf
|
||||||
*.desktop eol=lf
|
*.desktop eol=lf
|
||||||
*.sh eol=lf
|
*.sh eol=lf
|
||||||
|
|
||||||
fltk-config.in eol=lf
|
fltk-config.in eol=lf
|
||||||
|
|
||||||
documentation/make_pdf eol=lf
|
documentation/make_pdf eol=lf
|
||||||
misc/config.guess eol=lf
|
misc/config.guess eol=lf
|
||||||
misc/config.sub eol=lf
|
misc/config.sub eol=lf
|
||||||
misc/update_config_scripts eol=lf
|
misc/update_config_scripts eol=lf
|
||||||
|
|
||||||
# files with Windows line endings (crlf)
|
# files with Windows line endings (crlf)
|
||||||
|
|
||||||
*.rc eol=crlf
|
*.rc eol=crlf
|
||||||
*.bat eol=crlf
|
*.bat eol=crlf
|
||||||
|
|
||||||
# Android Studio special support file (Windows .bat file)
|
# Android Studio special support file (Windows .bat file)
|
||||||
ide/AndroidStudio3/gradlew.rename_to_bat eol=crlf
|
ide/AndroidStudio3/gradlew.rename_to_bat eol=crlf
|
||||||
|
|
||||||
# binary files
|
# binary files
|
||||||
|
|
||||||
*.ico binary
|
*.ico binary
|
||||||
*.icns binary
|
*.icns binary
|
||||||
*.jar binary
|
*.jar binary
|
||||||
*.png binary
|
*.png binary
|
||||||
*.jpg binary
|
*.jpg binary
|
||||||
*.ttf binary
|
*.ttf binary
|
||||||
*.xcf binary
|
*.xcf binary
|
||||||
*.xcf_gz binary
|
*.xcf_gz binary
|
||||||
|
|
||||||
# image files that consist of ASCII text
|
# image files that consist of ASCII text
|
||||||
|
|
||||||
# *.xbm text
|
# *.xbm text
|
||||||
# *.xpm text
|
# *.xpm text
|
||||||
|
|||||||
+2
-2
@@ -31,12 +31,12 @@ stages:
|
|||||||
build-autotools:
|
build-autotools:
|
||||||
stage: build
|
stage: build
|
||||||
# install the necessary build tools
|
# install the necessary build tools
|
||||||
before_script:
|
before_script:
|
||||||
- apt update && apt -y install make autoconf man
|
- apt update && apt -y install make autoconf man
|
||||||
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev
|
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev
|
||||||
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
|
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
|
||||||
- apt -y install libpango1.0-dev libcairo2-dev
|
- apt -y install libpango1.0-dev libcairo2-dev
|
||||||
script:
|
script:
|
||||||
- make clean
|
- make clean
|
||||||
- ./configure --enable-pango --enable-cairo
|
- ./configure --enable-pango --enable-cairo
|
||||||
- time make -j3
|
- time make -j3
|
||||||
|
|||||||
+1
-1
@@ -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
|
General Information about this Release
|
||||||
|
|
||||||
|
|||||||
+661
-668
File diff suppressed because it is too large
Load Diff
+2556
-2561
File diff suppressed because it is too large
Load Diff
+744
-744
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* "$Id$"
|
|
||||||
*
|
|
||||||
* Configuration file for the Fast Light Tool Kit (FLTK).
|
* Configuration file for the Fast Light Tool Kit (FLTK).
|
||||||
*
|
*
|
||||||
* Copyright 1998-2020 by Bill Spitzak and others.
|
* Copyright 1998-2020 by Bill Spitzak and others.
|
||||||
@@ -11,9 +9,9 @@
|
|||||||
*
|
*
|
||||||
* https://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:
|
||||||
*
|
*
|
||||||
* 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 */
|
/* define FL_ABI_VERSION as 10x0y for FLTK ABI version 1.x.y */
|
||||||
|
|
||||||
/* #undef FL_ABI_VERSION */
|
/* #undef FL_ABI_VERSION */
|
||||||
|
|
||||||
/*
|
|
||||||
* End of "$Id$".
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -36,7 +36,3 @@ if (CMAKE_CROSSCOMPILING)
|
|||||||
else ()
|
else ()
|
||||||
set (FLTK_FLUID_EXECUTABLE fluid)
|
set (FLTK_FLUID_EXECUTABLE fluid)
|
||||||
endif (CMAKE_CROSSCOMPILING)
|
endif (CMAKE_CROSSCOMPILING)
|
||||||
|
|
||||||
#
|
|
||||||
# End of file
|
|
||||||
#
|
|
||||||
|
|||||||
+62
-62
@@ -68,46 +68,46 @@
|
|||||||
message("<FindSDL2.cmake>")
|
message("<FindSDL2.cmake>")
|
||||||
|
|
||||||
SET(SDL2_SEARCH_PATHS
|
SET(SDL2_SEARCH_PATHS
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
/usr/local
|
/usr/local
|
||||||
/usr
|
/usr
|
||||||
/sw # Fink
|
/sw # Fink
|
||||||
/opt/local # DarwinPorts
|
/opt/local # DarwinPorts
|
||||||
/opt/csw # Blastwave
|
/opt/csw # Blastwave
|
||||||
/opt
|
/opt
|
||||||
${SDL2_PATH}
|
${SDL2_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||||
HINTS
|
HINTS
|
||||||
$ENV{SDL2DIR}
|
$ENV{SDL2DIR}
|
||||||
PATH_SUFFIXES include/SDL2 include
|
PATH_SUFFIXES include/SDL2 include
|
||||||
PATHS ${SDL2_SEARCH_PATHS}
|
PATHS ${SDL2_SEARCH_PATHS}
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
||||||
NAMES SDL2
|
NAMES SDL2
|
||||||
HINTS
|
HINTS
|
||||||
$ENV{SDL2DIR}
|
$ENV{SDL2DIR}
|
||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
PATHS ${SDL2_SEARCH_PATHS}
|
PATHS ${SDL2_SEARCH_PATHS}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||||
IF(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
|
# Non-OS X framework versions expect you to also dynamically link to
|
||||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||||
# seem to provide SDL2main for compatibility even though they don't
|
# seem to provide SDL2main for compatibility even though they don't
|
||||||
# necessarily need it.
|
# necessarily need it.
|
||||||
FIND_LIBRARY(SDL2MAIN_LIBRARY
|
FIND_LIBRARY(SDL2MAIN_LIBRARY
|
||||||
NAMES SDL2main
|
NAMES SDL2main
|
||||||
HINTS
|
HINTS
|
||||||
$ENV{SDL2DIR}
|
$ENV{SDL2DIR}
|
||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
PATHS ${SDL2_SEARCH_PATHS}
|
PATHS ${SDL2_SEARCH_PATHS}
|
||||||
)
|
)
|
||||||
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
|
||||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||||
|
|
||||||
# SDL2 may require threads on your system.
|
# SDL2 may require threads on your system.
|
||||||
@@ -115,50 +115,50 @@ ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
|||||||
# frameworks may already provide it.
|
# frameworks may already provide it.
|
||||||
# But for non-OSX systems, I will use the CMake Threads package.
|
# But for non-OSX systems, I will use the CMake Threads package.
|
||||||
IF(NOT APPLE)
|
IF(NOT APPLE)
|
||||||
FIND_PACKAGE(Threads)
|
FIND_PACKAGE(Threads)
|
||||||
ENDIF(NOT APPLE)
|
ENDIF(NOT APPLE)
|
||||||
|
|
||||||
# MinGW needs an additional library, mwindows
|
# MinGW needs an additional library, mwindows
|
||||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows
|
# 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.)
|
# (Actually on second look, I think it only needs one of the m* libraries.)
|
||||||
IF(MINGW)
|
IF(MINGW)
|
||||||
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(SDL2_LIBRARY_TEMP)
|
IF(SDL2_LIBRARY_TEMP)
|
||||||
# For SDL2main
|
# For SDL2main
|
||||||
IF(NOT SDL2_BUILDING_LIBRARY)
|
IF(NOT SDL2_BUILDING_LIBRARY)
|
||||||
IF(SDL2MAIN_LIBRARY)
|
IF(SDL2MAIN_LIBRARY)
|
||||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||||
ENDIF(SDL2MAIN_LIBRARY)
|
ENDIF(SDL2MAIN_LIBRARY)
|
||||||
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
ENDIF(NOT SDL2_BUILDING_LIBRARY)
|
||||||
|
|
||||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
# 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
|
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||||
# though it actually is there if I modify a pre-used variable.
|
# though it actually is there if I modify a pre-used variable.
|
||||||
# I think it has something to do with the CACHE STRING.
|
# 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
|
# So I use a temporary variable until the end so I can set the
|
||||||
# "real" variable in one-shot.
|
# "real" variable in one-shot.
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
# For threads, as mentioned Apple doesn't need this.
|
# For threads, as mentioned Apple doesn't need this.
|
||||||
# In fact, there seems to be a problem if I used the Threads package
|
# 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.
|
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||||
IF(NOT APPLE)
|
IF(NOT APPLE)
|
||||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
ENDIF(NOT APPLE)
|
ENDIF(NOT APPLE)
|
||||||
|
|
||||||
# For MinGW library
|
# For MinGW library
|
||||||
IF(MINGW)
|
IF(MINGW)
|
||||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
# Set the final string here so the GUI reflects the final state.
|
# 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(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 the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||||
ENDIF(SDL2_LIBRARY_TEMP)
|
ENDIF(SDL2_LIBRARY_TEMP)
|
||||||
|
|
||||||
message("</FindSDL2.cmake>")
|
message("</FindSDL2.cmake>")
|
||||||
|
|||||||
@@ -13,7 +13,3 @@ message(AUTHOR_WARNING
|
|||||||
* or later. Please use 'include_directories(\${FLTK_INCLUDE_DIRS})' or
|
* or later. Please use 'include_directories(\${FLTK_INCLUDE_DIRS})' or
|
||||||
* 'target_include_directories(<target> PUBLIC|PRIVATE \${FLTK_INCLUDE_DIRS})'
|
* 'target_include_directories(<target> PUBLIC|PRIVATE \${FLTK_INCLUDE_DIRS})'
|
||||||
* instead of 'include(\${FLTK_USE_FILE})'.")
|
* instead of 'include(\${FLTK_USE_FILE})'.")
|
||||||
|
|
||||||
#
|
|
||||||
# End of file
|
|
||||||
#
|
|
||||||
|
|||||||
+3
-5
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# android.cmake to build the FLTK AndroidStudio project using CMake
|
# android.cmake to build the FLTK AndroidStudio project using CMake
|
||||||
# Written by Matthias Melcher
|
# Written by Matthias Melcher
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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
|
# all target modules will be added here later
|
||||||
|
|||||||
+4
-6
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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)
|
if (UNIX)
|
||||||
execute_process(COMMAND chmod 755 fltk-config
|
execute_process(COMMAND chmod 755 fltk-config
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
|
|||||||
+3
-5
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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
|
||||||
#
|
#
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|||||||
+40
-42
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# Macros used by the CMake build system for the Fast Light Tool Kit (FLTK).
|
# Macros used by the CMake build system for the Fast Light Tool Kit (FLTK).
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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")
|
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set (DEBUG_OUTPUT_NAME "${LIBNAME}d")
|
set (DEBUG_OUTPUT_NAME "${LIBNAME}d")
|
||||||
else ()
|
else ()
|
||||||
set (DEBUG_OUTPUT_NAME "${LIBNAME}")
|
set (DEBUG_OUTPUT_NAME "${LIBNAME}")
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
|
|
||||||
add_library(${TARGET_NAME} ${LIBTYPE} ${LIBFILES})
|
add_library(${TARGET_NAME} ${LIBTYPE} ${LIBFILES})
|
||||||
@@ -72,33 +70,33 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
|
|||||||
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
||||||
CLEAN_DIRECT_OUTPUT TRUE
|
CLEAN_DIRECT_OUTPUT TRUE
|
||||||
COMPILE_DEFINITIONS "FL_LIBRARY"
|
COMPILE_DEFINITIONS "FL_LIBRARY"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (${LIBTYPE} STREQUAL "SHARED")
|
if (${LIBTYPE} STREQUAL "SHARED")
|
||||||
set_target_properties(${TARGET_NAME}
|
set_target_properties(${TARGET_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
OUTPUT_NAME ${LIBNAME}
|
OUTPUT_NAME ${LIBNAME}
|
||||||
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
DEBUG_OUTPUT_NAME ${DEBUG_OUTPUT_NAME}
|
||||||
VERSION ${FLTK_VERSION_FULL}
|
VERSION ${FLTK_VERSION_FULL}
|
||||||
SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
|
SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
|
||||||
PREFIX "lib" # for MSVC static/shared coexistence
|
PREFIX "lib" # for MSVC static/shared coexistence
|
||||||
)
|
)
|
||||||
endif (${LIBTYPE} STREQUAL "SHARED")
|
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
if (OPTION_LARGE_FILE)
|
if (OPTION_LARGE_FILE)
|
||||||
set_target_properties(${TARGET_NAME}
|
set_target_properties(${TARGET_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
LINK_FLAGS /LARGEADDRESSAWARE
|
LINK_FLAGS /LARGEADDRESSAWARE
|
||||||
)
|
)
|
||||||
endif (OPTION_LARGE_FILE)
|
endif (OPTION_LARGE_FILE)
|
||||||
|
|
||||||
if (${LIBTYPE} STREQUAL "SHARED")
|
if (${LIBTYPE} STREQUAL "SHARED")
|
||||||
set_target_properties(${TARGET_NAME}
|
set_target_properties(${TARGET_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
COMPILE_DEFINITIONS "FL_DLL"
|
COMPILE_DEFINITIONS "FL_DLL"
|
||||||
)
|
)
|
||||||
endif (${LIBTYPE} STREQUAL "SHARED")
|
endif (${LIBTYPE} STREQUAL "SHARED")
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
|
|
||||||
install(TARGETS ${TARGET_NAME}
|
install(TARGETS ${TARGET_NAME}
|
||||||
@@ -106,7 +104,7 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
|
|||||||
RUNTIME DESTINATION ${FLTK_BINDIR}
|
RUNTIME DESTINATION ${FLTK_BINDIR}
|
||||||
LIBRARY DESTINATION ${FLTK_LIBDIR}
|
LIBRARY DESTINATION ${FLTK_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${FLTK_LIBDIR}
|
ARCHIVE DESTINATION ${FLTK_LIBDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLTK_LIBRARIES "${TARGET_NAME}")
|
list(APPEND FLTK_LIBRARIES "${TARGET_NAME}")
|
||||||
set (FLTK_LIBRARIES ${FLTK_LIBRARIES} PARENT_SCOPE)
|
set (FLTK_LIBRARIES ${FLTK_LIBRARIES} PARENT_SCOPE)
|
||||||
@@ -119,14 +117,14 @@ function(FLTK_RUN_FLUID TARGET SOURCES)
|
|||||||
set (CXX_FILES)
|
set (CXX_FILES)
|
||||||
foreach(src ${SOURCES})
|
foreach(src ${SOURCES})
|
||||||
if ("${src}" MATCHES "\\.fl$")
|
if ("${src}" MATCHES "\\.fl$")
|
||||||
string(REGEX REPLACE "(.*).fl" \\1 basename ${src})
|
string(REGEX REPLACE "(.*).fl" \\1 basename ${src})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${basename}.cxx" "${basename}.h"
|
OUTPUT "${basename}.cxx" "${basename}.h"
|
||||||
COMMAND fluid -c ${CMAKE_CURRENT_SOURCE_DIR}/${src}
|
COMMAND fluid -c ${CMAKE_CURRENT_SOURCE_DIR}/${src}
|
||||||
DEPENDS ${src}
|
DEPENDS ${src}
|
||||||
MAIN_DEPENDENCY ${src}
|
MAIN_DEPENDENCY ${src}
|
||||||
)
|
)
|
||||||
list(APPEND CXX_FILES "${basename}.cxx")
|
list(APPEND CXX_FILES "${basename}.cxx")
|
||||||
endif ("${src}" MATCHES "\\.fl$")
|
endif ("${src}" MATCHES "\\.fl$")
|
||||||
set (${TARGET} ${CXX_FILES} PARENT_SCOPE)
|
set (${TARGET} ${CXX_FILES} PARENT_SCOPE)
|
||||||
endforeach(src)
|
endforeach(src)
|
||||||
@@ -135,11 +133,11 @@ endfunction(FLTK_RUN_FLUID TARGET SOURCES)
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
||||||
|
|
||||||
set (srcs) # source files
|
set (srcs) # source files
|
||||||
set (flsrcs) # fluid source files
|
set (flsrcs) # fluid source files
|
||||||
|
|
||||||
set (tname ${NAME}) # target name
|
set (tname ${NAME}) # target name
|
||||||
set (oname ${NAME}) # output (executable) name
|
set (oname ${NAME}) # output (executable) name
|
||||||
|
|
||||||
foreach(src ${SOURCES})
|
foreach(src ${SOURCES})
|
||||||
if ("${src}" MATCHES "\\.fl$")
|
if ("${src}" MATCHES "\\.fl$")
|
||||||
@@ -151,7 +149,7 @@ macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
|||||||
|
|
||||||
set (FLUID_SOURCES)
|
set (FLUID_SOURCES)
|
||||||
if (flsrcs)
|
if (flsrcs)
|
||||||
FLTK_RUN_FLUID(FLUID_SOURCES "${flsrcs}")
|
FLTK_RUN_FLUID(FLUID_SOURCES "${flsrcs}")
|
||||||
endif (flsrcs)
|
endif (flsrcs)
|
||||||
|
|
||||||
if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
||||||
|
|||||||
+3
-5
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -12,9 +10,9 @@
|
|||||||
#
|
#
|
||||||
# https://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:
|
||||||
#
|
#
|
||||||
# https://www.fltk.org/str.php
|
# https://www.fltk.org/bugs.php
|
||||||
#
|
#
|
||||||
|
|
||||||
set (DEBUG_OPTIONS_CMAKE 0)
|
set (DEBUG_OPTIONS_CMAKE 0)
|
||||||
@@ -471,7 +469,7 @@ if(X11_Xft_FOUND AND OPTION_USE_PANGO)
|
|||||||
set(USE_PANGO TRUE)
|
set(USE_PANGO TRUE)
|
||||||
list(APPEND FLTK_LDLIBS -lpango-1.0 -lpangoxft-1.0 -lgobject-2.0)
|
list(APPEND FLTK_LDLIBS -lpango-1.0 -lpangoxft-1.0 -lgobject-2.0)
|
||||||
else(PANGOXFT_FOUND)
|
else(PANGOXFT_FOUND)
|
||||||
|
|
||||||
#this covers Debian, Ubuntu, FreeBSD, NetBSD, Darwin
|
#this covers Debian, Ubuntu, FreeBSD, NetBSD, Darwin
|
||||||
if(APPLE AND OPTION_APPLE_X11)
|
if(APPLE AND OPTION_APPLE_X11)
|
||||||
find_file(FINK_PREFIX NAMES /opt/sw /sw)
|
find_file(FINK_PREFIX NAMES /opt/sw /sw)
|
||||||
|
|||||||
+13
-19
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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)
|
endif(HAVE_DLFCN_H)
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
|
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
|
CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
|
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
|
||||||
|
|
||||||
if(LIB_png)
|
if(LIB_png)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${LIB_png})
|
set(CMAKE_REQUIRED_LIBRARIES ${LIB_png})
|
||||||
CHECK_FUNCTION_EXISTS(png_get_valid HAVE_PNG_GET_VALID)
|
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_set_tRNS_to_alpha HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
endif(LIB_png)
|
endif(LIB_png)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(scandir HAVE_SCANDIR)
|
CHECK_FUNCTION_EXISTS(scandir HAVE_SCANDIR)
|
||||||
CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
|
CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
|
||||||
|
|
||||||
# not really true but we convert strcasecmp calls to _stricmp calls in flstring.h
|
# not really true but we convert strcasecmp calls to _stricmp calls in flstring.h
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(HAVE_STRCASECMP 1)
|
set(HAVE_STRCASECMP 1)
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
|
||||||
CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
|
CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
|
||||||
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
|
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
|
||||||
|
|
||||||
if(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX)
|
if(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX)
|
||||||
set(MSG "POSIX compatible scandir")
|
set(MSG "POSIX compatible scandir")
|
||||||
@@ -285,7 +283,3 @@ endif (DOXYGEN_FOUND)
|
|||||||
# Cleanup: unset local variables
|
# Cleanup: unset local variables
|
||||||
|
|
||||||
unset (CMAKE_REQUIRED_QUIET)
|
unset (CMAKE_REQUIRED_QUIET)
|
||||||
|
|
||||||
#
|
|
||||||
# End of "$Id$".
|
|
||||||
#
|
|
||||||
|
|||||||
+3
-5
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
# CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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
|
# This file sets variables for common use in export.cmake and install.cmake
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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
|
||||||
#
|
#
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|||||||
+3
-5
@@ -1,6 +1,4 @@
|
|||||||
#
|
#
|
||||||
# "$Id$"
|
|
||||||
#
|
|
||||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||||
# Written by Michael Surette
|
# Written by Michael Surette
|
||||||
#
|
#
|
||||||
@@ -10,11 +8,11 @@
|
|||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
# file is missing or damaged, see the license at:
|
# 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().
|
# Prevent annoying warning under Cygwin; this must be before project().
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ exceptions:
|
|||||||
The authors do request that such modifications be
|
The authors do request that such modifications be
|
||||||
contributed to the FLTK project - send all contributions
|
contributed to the FLTK project - send all contributions
|
||||||
through the "Software Trouble Report" on the following page:
|
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
|
2. Widgets that are subclassed from FLTK widgets do not
|
||||||
constitute a derivative work.
|
constitute a derivative work.
|
||||||
@@ -42,7 +42,7 @@ exceptions:
|
|||||||
documentation to satisfy this requirement:
|
documentation to satisfy this requirement:
|
||||||
|
|
||||||
[program/widget] is based in part on the work of
|
[program/widget] is based in part on the work of
|
||||||
the FLTK project (http://www.fltk.org).
|
the FLTK project (https://www.fltk.org).
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
+55
-55
@@ -1,71 +1,71 @@
|
|||||||
CREDITS.txt - Fast Light Tool Kit (FLTK) Version 1.4.0
|
CREDITS.txt - Fast Light Tool Kit (FLTK) Version 1.4.0
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
||||||
This file lists the people responsible for the toolkit you are
|
This file lists the people responsible for the toolkit you are
|
||||||
now using. If you've been looking for your name in lights
|
now using. If you've been looking for your name in lights
|
||||||
but we've forgotten you here, please use the report on the
|
but we've forgotten you here, please use the report on the
|
||||||
following page, and we'll update this file accordingly:
|
following page, and we'll update this file accordingly:
|
||||||
|
|
||||||
https://www.fltk.org/str.php
|
https://www.fltk.org/bugs.php
|
||||||
|
|
||||||
|
|
||||||
CORE DEVELOPERS
|
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
|
Greg Ercolano
|
||||||
Manolo Gouy
|
Manolo Gouy
|
||||||
Lauri Kasanen
|
Lauri Kasanen
|
||||||
Ian MacArthur
|
Ian MacArthur
|
||||||
Pierre Ossman
|
Pierre Ossman
|
||||||
Albrecht Schlosser
|
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)
|
Fabien Costantini (fabien67@users.sf.net)
|
||||||
Craig P. Earls
|
Craig P. Earls
|
||||||
Curtis Edwards (trilec@users.sourceforge.net)
|
Curtis Edwards (trilec@users.sourceforge.net)
|
||||||
Gustavo Hime (hime@users.sourceforge.net)
|
Gustavo Hime (hime@users.sourceforge.net)
|
||||||
Talbot Hughes
|
Talbot Hughes
|
||||||
Robert Kesterson (robertk@users.sourceforge.net)
|
Robert Kesterson (robertk@users.sourceforge.net)
|
||||||
Matthias Melcher (mm@robowerk.com)
|
Matthias Melcher (mm@robowerk.com)
|
||||||
James Dean Palmer (jamespalmer@users.sourceforge.net)
|
James Dean Palmer (jamespalmer@users.sourceforge.net)
|
||||||
Vincent Penne (vincentp@users.sourceforge.net)
|
Vincent Penne (vincentp@users.sourceforge.net)
|
||||||
Bill Spitzak (spitzak@users.sourceforge.net)
|
Bill Spitzak (spitzak@users.sourceforge.net)
|
||||||
Michael Sweet (easysw@users.sourceforge.net)
|
Michael Sweet (easysw@users.sourceforge.net)
|
||||||
Carl Thompson (clip@users.sourceforge.net)
|
Carl Thompson (clip@users.sourceforge.net)
|
||||||
Nafees Bin Zafar (nafees@users.sourceforge.net)
|
Nafees Bin Zafar (nafees@users.sourceforge.net)
|
||||||
|
|
||||||
|
|
||||||
OTHER CONTRIBUTORS
|
OTHER CONTRIBUTORS
|
||||||
|
|
||||||
The following people have contributed fixes or enhancements
|
The following people have contributed fixes or enhancements
|
||||||
for FLTK:
|
for FLTK:
|
||||||
|
|
||||||
Laszlo Z. Antal (LZA)
|
Laszlo Z. Antal (LZA)
|
||||||
Teun Burgers
|
Teun Burgers
|
||||||
Paul Chambers
|
Paul Chambers
|
||||||
Stephen Davies
|
Stephen Davies
|
||||||
Yuri D'Elia
|
Yuri D'Elia
|
||||||
Domingo Alvarez Duarte
|
Domingo Alvarez Duarte
|
||||||
Yuri Fedorchenko
|
Yuri Fedorchenko
|
||||||
George Garvey
|
George Garvey
|
||||||
Duncan Gibson
|
Duncan Gibson
|
||||||
Mikael Hultgren
|
Mikael Hultgren
|
||||||
Stuart Levy
|
Stuart Levy
|
||||||
Jean-Marc Lienher (OksiD)
|
Jean-Marc Lienher (OksiD)
|
||||||
Howard Lightstone
|
Howard Lightstone
|
||||||
Mike Lindner
|
Mike Lindner
|
||||||
Alexander Mai
|
Alexander Mai
|
||||||
Alexander Rabi
|
Alexander Rabi
|
||||||
James Roth
|
James Roth
|
||||||
Ivan Nieto (Mr.Satan)
|
Ivan Nieto (Mr.Satan)
|
||||||
Jamie Snape
|
Jamie Snape
|
||||||
Andrea Suatoni
|
Andrea Suatoni
|
||||||
Michael Surette
|
Michael Surette
|
||||||
Paul Sydney
|
Paul Sydney
|
||||||
Aaron Ucko
|
Aaron Ucko
|
||||||
Emanuele Vicentini
|
Emanuele Vicentini
|
||||||
Josef Vitu
|
Josef Vitu
|
||||||
Jim Wilson
|
Jim Wilson
|
||||||
Ken Yarnall
|
Ken Yarnall
|
||||||
|
|||||||
+3
-3
@@ -9,15 +9,15 @@ SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
|
|||||||
SET (TRIGGER_SITE "http://${DROP_SITE}/cgi-bin/Submit-Fltk-TestingResults.pl")
|
SET (TRIGGER_SITE "http://${DROP_SITE}/cgi-bin/Submit-Fltk-TestingResults.pl")
|
||||||
|
|
||||||
# Project Home Page
|
# 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 (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_URL "http://cvs.sourceforge.net/viewcvs.py/fltk/fltk/")
|
||||||
SET (CVS_WEB_CVSROOT "fltk")
|
SET (CVS_WEB_CVSROOT "fltk")
|
||||||
|
|
||||||
SET (USE_GNATS "On")
|
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
|
# Continuous email delivery variables
|
||||||
SET (CONTINUOUS_FROM "fltk-dashboard@public.kitware.com")
|
SET (CONTINUOUS_FROM "fltk-dashboard@public.kitware.com")
|
||||||
|
|||||||
+313
-319
File diff suppressed because it is too large
Load Diff
+4
-10
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Adjuster widget header file for the Fast Light Tool Kit (FLTK).
|
// Adjuster widget header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -31,7 +29,7 @@
|
|||||||
/**
|
/**
|
||||||
The Fl_Adjuster widget was stolen from Prisms, and has proven
|
The Fl_Adjuster widget was stolen from Prisms, and has proven
|
||||||
to be very useful for values that need a large dynamic range.
|
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
|
\image latex adjuster1.png "Fl_Adjuster" width=4cm
|
||||||
<P>When you press a button and drag to the right the value increases.
|
<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
|
When you drag to the left it decreases. The largest button adjusts by
|
||||||
@@ -67,7 +65,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+2
-8
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// BMP image header file for the Fast Light Tool Kit (FLTK).
|
// BMP image header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2020 by Bill Spitzak and others.
|
// Copyright 1998-2020 by Bill Spitzak and others.
|
||||||
@@ -11,9 +9,9 @@
|
|||||||
//
|
//
|
||||||
// https://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:
|
||||||
//
|
//
|
||||||
// https://www.fltk.org/str.php
|
// https://www.fltk.org/bugs.php
|
||||||
//
|
//
|
||||||
|
|
||||||
/* \file
|
/* \file
|
||||||
@@ -41,7 +39,3 @@ class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+4
-10
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -38,7 +36,7 @@ public:
|
|||||||
const uchar *array;
|
const uchar *array;
|
||||||
/** Non-zero if array points to bitmap data allocated internally */
|
/** Non-zero if array points to bitmap data allocated internally */
|
||||||
int alloc_array;
|
int alloc_array;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** for internal use */
|
/** for internal use */
|
||||||
fl_uintptr_t id_;
|
fl_uintptr_t id_;
|
||||||
@@ -62,7 +60,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+4
-10
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Box header file for the Fast Light Tool Kit (FLTK).
|
// Box header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -45,7 +43,7 @@ public:
|
|||||||
<P>The destructor removes the box.
|
<P>The destructor removes the box.
|
||||||
*/
|
*/
|
||||||
Fl_Box(int X, int Y, int W, int H, const char *l=0);
|
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) */
|
/** 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);
|
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l);
|
||||||
|
|
||||||
@@ -53,7 +51,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+15
-21
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Browser header file for the Fast Light Tool Kit (FLTK).
|
// Browser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -36,7 +34,7 @@ struct FL_BLINE;
|
|||||||
lines, and manages all the storage for the text. This is not a text
|
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
|
editor or spreadsheet! But it is useful for showing a vertical list of
|
||||||
named objects to the user.
|
named objects to the user.
|
||||||
|
|
||||||
\image html fl_hold_browser.png "Fl_Hold_Browser"
|
\image html fl_hold_browser.png "Fl_Hold_Browser"
|
||||||
\image latex fl_hold_browser.png "Fl_Hold_Browser" width=4cm
|
\image latex fl_hold_browser.png "Fl_Hold_Browser" width=4cm
|
||||||
|
|
||||||
@@ -57,9 +55,9 @@ struct FL_BLINE;
|
|||||||
describes.
|
describes.
|
||||||
|
|
||||||
The base class does nothing when the user clicks on it. The
|
The base class does nothing when the user clicks on it. The
|
||||||
subclasses
|
subclasses
|
||||||
Fl_Select_Browser,
|
Fl_Select_Browser,
|
||||||
Fl_Hold_Browser, and
|
Fl_Hold_Browser, and
|
||||||
Fl_Multi_Browser react to user clicks to select lines in
|
Fl_Multi_Browser react to user clicks to select lines in
|
||||||
the browser and do callbacks.
|
the browser and do callbacks.
|
||||||
|
|
||||||
@@ -76,7 +74,7 @@ struct FL_BLINE;
|
|||||||
\code
|
\code
|
||||||
// How to loop through all the items in the browser
|
// How to loop through all the items in the browser
|
||||||
for ( int t=1; t<=browser->size(); t++ ) { // index 1 based..!
|
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
|
\endcode
|
||||||
|
|
||||||
@@ -87,15 +85,15 @@ struct FL_BLINE;
|
|||||||
*/
|
*/
|
||||||
class FL_EXPORT Fl_Browser : public Fl_Browser_ {
|
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 *last;
|
||||||
FL_BLINE *cache;
|
FL_BLINE *cache;
|
||||||
int cacheline; // line number of cache
|
int cacheline; // line number of cache
|
||||||
int lines; // Number of lines
|
int lines; // Number of lines
|
||||||
int full_height_;
|
int full_height_;
|
||||||
const int* column_widths_;
|
const int* column_widths_;
|
||||||
char format_char_; // alternative to @-sign
|
char format_char_; // alternative to @-sign
|
||||||
char column_char_; // alternative to tab
|
char column_char_; // alternative to tab
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -218,7 +216,7 @@ public:
|
|||||||
Gets the current format code prefix character, which by default is '\@'.
|
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
|
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:
|
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> Print rest of line, don't look for more '\@' signs
|
||||||
\li <tt>'\@\@'</tt> Doubling the format character prints the format
|
\li <tt>'\@\@'</tt> Doubling the format character prints the format
|
||||||
character once, followed by the rest of line
|
character once, followed by the rest of line
|
||||||
@@ -241,7 +239,7 @@ public:
|
|||||||
\li <tt>'\@-'</tt> draw an engraved line through the middle.
|
\li <tt>'\@-'</tt> draw an engraved line through the middle.
|
||||||
|
|
||||||
Notice that the '\@.' command can be used to reliably
|
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
|
<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.
|
string starts with a digit or has the format character in it.
|
||||||
*/
|
*/
|
||||||
@@ -330,7 +328,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+53
-59
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Common browser header file for the Fast Light Tool Kit (FLTK).
|
// Common browser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -28,15 +26,15 @@
|
|||||||
#include "Fl_Group.H"
|
#include "Fl_Group.H"
|
||||||
#endif
|
#endif
|
||||||
#include "Fl_Scrollbar.H"
|
#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_NORMAL_BROWSER 0 /**< type() of Fl_Browser */
|
||||||
#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */
|
#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */
|
||||||
#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */
|
#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */
|
||||||
#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_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_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */
|
||||||
#define FL_SORT_DESCENDING 1 /**< sort in descending order */
|
#define FL_SORT_DESCENDING 1 /**< sort in descending order */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is the base class for browsers. To be useful it must be
|
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.
|
browser and the file chooser's browser are subclassed off of this.
|
||||||
|
|
||||||
This has been designed so that the subclass has complete control
|
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
|
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
|
or as a large block of characters in which the line breaks must be
|
||||||
searched for.
|
searched for.
|
||||||
@@ -76,21 +74,21 @@ Keyboard navigation of browser items
|
|||||||
extend a selection or de-selection.
|
extend a selection or de-selection.
|
||||||
*/
|
*/
|
||||||
class FL_EXPORT Fl_Browser_ : public Fl_Group {
|
class FL_EXPORT Fl_Browser_ : public Fl_Group {
|
||||||
int position_; // where user wants it scrolled to
|
int position_; // where user wants it scrolled to
|
||||||
int real_position_; // the current vertical scrolling position
|
int real_position_; // the current vertical scrolling position
|
||||||
int hposition_; // where user wants it panned to
|
int hposition_; // where user wants it panned to
|
||||||
int real_hposition_; // the current horizontal scrolling position
|
int real_hposition_; // the current horizontal scrolling position
|
||||||
int offset_; // how far down top_ item the real_position is
|
int offset_; // how far down top_ item the real_position is
|
||||||
int max_width; // widest object seen so far
|
int max_width; // widest object seen so far
|
||||||
uchar has_scrollbar_; // which scrollbars are enabled
|
uchar has_scrollbar_; // which scrollbars are enabled
|
||||||
Fl_Font textfont_;
|
Fl_Font textfont_;
|
||||||
Fl_Fontsize textsize_;
|
Fl_Fontsize textsize_;
|
||||||
Fl_Color textcolor_;
|
Fl_Color textcolor_;
|
||||||
void* top_; // which item scrolling position is in
|
void* top_; // which item scrolling position is in
|
||||||
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
|
void* selection_; // which is selected (except for FL_MULTI_BROWSER)
|
||||||
void *redraw1,*redraw2; // minimal update pointers
|
void *redraw1,*redraw2; // minimal update pointers
|
||||||
void* max_width_item; // which item has max_width_
|
void* max_width_item; // which item has max_width_
|
||||||
int scrollbar_size_; // size of scrollbar trough
|
int scrollbar_size_; // size of scrollbar trough
|
||||||
|
|
||||||
void update_top();
|
void update_top();
|
||||||
|
|
||||||
@@ -98,7 +96,7 @@ protected:
|
|||||||
|
|
||||||
// All of the following must be supplied by the subclass:
|
// 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.
|
to return the first item in the list.
|
||||||
\see item_first(), item_next(), item_last(), item_prev()
|
\see item_first(), item_next(), item_last(), item_prev()
|
||||||
*/
|
*/
|
||||||
@@ -121,8 +119,8 @@ protected:
|
|||||||
\see item_first(), item_next(), item_last(), item_prev()
|
\see item_first(), item_next(), item_last(), item_prev()
|
||||||
*/
|
*/
|
||||||
virtual void *item_last() const { return 0L; }
|
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.
|
the height of \p item in pixels.
|
||||||
Allow for two additional pixels for the list selection box.
|
Allow for two additional pixels for the list selection box.
|
||||||
\param[in] item The item whose height is returned.
|
\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;
|
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.
|
\param[in] item The item whose label text is returned.
|
||||||
\returns The item's text label. (Can be NULL if blank)
|
\returns The item's text label. (Can be NULL if blank)
|
||||||
*/
|
*/
|
||||||
virtual const char *item_text(void *item) const { (void)item; return 0L; }
|
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.
|
to efficiently swap browser items \p a and \p b, such as for sorting.
|
||||||
\param[in] a,b The two items to be swapped.
|
\param[in] a,b The two items to be swapped.
|
||||||
*/
|
*/
|
||||||
virtual void item_swap(void *a,void *b) { (void)a; (void)b; }
|
virtual void item_swap(void *a,void *b) { (void)a; (void)b; }
|
||||||
/**
|
/**
|
||||||
This method must be provided by the subclass
|
This method must be provided by the subclass
|
||||||
to return the item for the specified \p index.
|
to return the item for the specified \p index.
|
||||||
\param[in] index The \p index of the item to be returned
|
\param[in] index The \p index of the item to be returned
|
||||||
\returns The item at the specified \p index.
|
\returns The item at the specified \p index.
|
||||||
*/
|
*/
|
||||||
virtual void *item_at(int index) const { (void)index; return 0L; }
|
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:
|
// 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_width() const ; // current width of all items
|
||||||
virtual int full_height() const ; // current height 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 incr_height() const ; // average height of an item
|
||||||
// These only need to be done by subclass if you want a multi-browser:
|
// These only need to be done by subclass if you want a multi-browser:
|
||||||
virtual void item_select(void *item,int val=1);
|
virtual void item_select(void *item,int val=1);
|
||||||
virtual int item_selected(void *item) const ;
|
virtual int item_selected(void *item) const ;
|
||||||
@@ -178,9 +176,9 @@ protected:
|
|||||||
void *top() const { return top_; }
|
void *top() const { return top_; }
|
||||||
/**
|
/**
|
||||||
Returns the item currently selected, or NULL if there is no selection.
|
Returns the item currently selected, or NULL if there is no selection.
|
||||||
|
|
||||||
For multiple selection browsers this call returns the currently focused item,
|
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.
|
Fl_Multi_Browser::selected() for every item in question.
|
||||||
*/
|
*/
|
||||||
void *selection() const { return selection_; }
|
void *selection() const { return selection_; }
|
||||||
@@ -197,9 +195,9 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them
|
void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them
|
||||||
void bbox(int &X,int &Y,int &W,int &H) const;
|
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 *find_item(int ypos); // item under mouse
|
||||||
|
|
||||||
void draw();
|
void draw();
|
||||||
Fl_Browser_(int X,int Y,int W,int H,const char *L=0);
|
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.
|
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
|
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.
|
the list are scrolled off the top edge of the screen.
|
||||||
\see position(), hposition()
|
\see position(), hposition()
|
||||||
*/
|
*/
|
||||||
@@ -250,13 +248,13 @@ public:
|
|||||||
- bit 3-31: reserved for future use
|
- bit 3-31: reserved for future use
|
||||||
*/
|
*/
|
||||||
enum { // values for has_scrollbar()
|
enum { // values for has_scrollbar()
|
||||||
HORIZONTAL = 1, ///< Only show horizontal scrollbar.
|
HORIZONTAL = 1, ///< Only show horizontal scrollbar.
|
||||||
VERTICAL = 2, ///< Only show vertical scrollbar.
|
VERTICAL = 2, ///< Only show vertical scrollbar.
|
||||||
BOTH = 3, ///< Show both scrollbars. (default)
|
BOTH = 3, ///< Show both scrollbars. (default)
|
||||||
ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
|
ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL)
|
||||||
HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on.
|
HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on.
|
||||||
VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on.
|
VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on.
|
||||||
BOTH_ALWAYS = 7 ///< Both scrollbars always on.
|
BOTH_ALWAYS = 7 ///< Both scrollbars always on.
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar)
|
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).
|
Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH).
|
||||||
By default you can scroll in both directions, and the scrollbars
|
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:
|
has_scrollbar() changes this based on the value of \p mode:
|
||||||
|
|
||||||
- 0 - No scrollbars.
|
- 0 - No scrollbars.
|
||||||
|
|
||||||
- Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar.
|
- Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar.
|
||||||
@@ -317,9 +315,9 @@ public:
|
|||||||
/**
|
/**
|
||||||
Gets the current size of the scrollbars' troughs, in pixels.
|
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.
|
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.
|
\returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used.
|
||||||
\see Fl::scrollbar_size(int)
|
\see Fl::scrollbar_size(int)
|
||||||
*/
|
*/
|
||||||
@@ -330,24 +328,24 @@ public:
|
|||||||
Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels.
|
Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels.
|
||||||
|
|
||||||
Normally you should not need this method, and should use
|
Normally you should not need this method, and should use
|
||||||
Fl::scrollbar_size(int) instead to manage the size of ALL
|
Fl::scrollbar_size(int) instead to manage the size of ALL
|
||||||
your widgets' scrollbars. This ensures your application
|
your widgets' scrollbars. This ensures your application
|
||||||
has a consistent UI, is the default behavior, and is normally
|
has a consistent UI, is the default behavior, and is normally
|
||||||
what you want.
|
what you want.
|
||||||
|
|
||||||
Only use THIS method if you really need to override the global
|
Only use THIS method if you really need to override the global
|
||||||
scrollbar size. The need for this should be rare.
|
scrollbar size. The need for this should be rare.
|
||||||
|
|
||||||
Setting \p newSize to the special value of 0 causes the widget to
|
Setting \p newSize to the special value of 0 causes the widget to
|
||||||
track the global Fl::scrollbar_size(), which is the default.
|
track the global Fl::scrollbar_size(), which is the default.
|
||||||
|
|
||||||
\param[in] newSize Sets the scrollbar size in pixels.\n
|
\param[in] newSize Sets the scrollbar size in pixels.\n
|
||||||
If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
|
If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
|
||||||
\see Fl::scrollbar_size()
|
\see Fl::scrollbar_size()
|
||||||
*/
|
*/
|
||||||
void scrollbar_size(int newSize) {
|
void scrollbar_size(int newSize) {
|
||||||
scrollbar_size_ = newSize;
|
scrollbar_size_ = newSize;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
Returns the global value Fl::scrollbar_size().
|
Returns the global value Fl::scrollbar_size().
|
||||||
\deprecated Use scrollbar_size() instead.
|
\deprecated Use scrollbar_size() instead.
|
||||||
@@ -379,7 +377,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+11
-17
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Button header file for the Fast Light Tool Kit (FLTK).
|
// Button header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -27,13 +25,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// values for type()
|
// 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 */
|
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_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
|
#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>
|
buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt>
|
||||||
are set to zero.*/
|
are set to zero.*/
|
||||||
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility
|
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility
|
||||||
|
|
||||||
extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*);
|
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_TOGGLE_BUTTON: value() is inverted after button press.
|
||||||
\li \c FL_RADIO_BUTTON: value() is set to 1 after button press, and all other
|
\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>
|
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.
|
\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.
|
clicks the button, or when a shortcut is typed.
|
||||||
\li \c FL_WHEN_CHANGED: The callback is done each time the value() changes
|
\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
|
(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 {
|
class FL_EXPORT Fl_Button : public Fl_Widget {
|
||||||
@@ -170,7 +168,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+24
-30
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
Handling transparently platform dependent cairo include files
|
Handling transparently platform dependent cairo include files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FL_CAIRO_H
|
#ifndef FL_CAIRO_H
|
||||||
@@ -31,12 +29,12 @@
|
|||||||
|
|
||||||
# include <cairo.h>
|
# include <cairo.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\addtogroup group_cairo
|
\addtogroup group_cairo
|
||||||
@{
|
@{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Contains all the necessary info on the current cairo context.
|
Contains all the necessary info on the current cairo context.
|
||||||
A private internal & unique corresponding object is created to
|
A private internal & unique corresponding object is created to
|
||||||
permit cairo context state handling while keeping it opaque.
|
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) {}
|
Fl_Cairo_State() : cc_(0), own_cc_(false), autolink_(false), window_(0), gc_(0) {}
|
||||||
|
|
||||||
// access attributes
|
// access attributes
|
||||||
cairo_t* cc() const {return cc_;} ///< Gets the current cairo context
|
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)
|
bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
|
||||||
/** Sets the current cairo context.
|
/** Sets the current cairo context.
|
||||||
|
|
||||||
\p own == \e true (the default) indicates that the cairo context \p c
|
\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.
|
will be deleted by FLTK internally when another cc is set later.
|
||||||
|
|
||||||
\p own == \e false indicates cc deletion is handled externally
|
\p own == \e false indicates cc deletion is handled externally
|
||||||
by the user program.
|
by the user program.
|
||||||
*/
|
*/
|
||||||
void cc(cairo_t* c, bool own=true) {
|
void cc(cairo_t* c, bool own=true) {
|
||||||
if (cc_ && own_cc_) cairo_destroy(cc_);
|
if (cc_ && own_cc_) cairo_destroy(cc_);
|
||||||
cc_=c;
|
cc_=c;
|
||||||
if (!cc_) window_=0;
|
if (!cc_) window_=0;
|
||||||
own_cc_=own;
|
own_cc_=own;
|
||||||
}
|
}
|
||||||
void autolink(bool b); ///< Sets the autolink option, only available with --enable-cairoext
|
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(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* 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(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* gc() const {return gc_;} ///< Gets the last gc attached to a cc
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cairo_t * cc_; // contains the unique autoupdated cairo context
|
cairo_t * cc_; // contains the unique autoupdated cairo context
|
||||||
bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup
|
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
|
bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows
|
||||||
// for custom cairo implementations.
|
// for custom cairo implementations.
|
||||||
void* window_, *gc_; // for keeping track internally of last win+gc treated
|
void* window_, *gc_; // for keeping track internally of last win+gc treated
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -82,7 +80,3 @@ private:
|
|||||||
|
|
||||||
# endif // FLTK_HAVE_CAIRO
|
# endif // FLTK_HAVE_CAIRO
|
||||||
#endif // FL_CAIRO_H
|
#endif // FL_CAIRO_H
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$" .
|
|
||||||
//
|
|
||||||
|
|||||||
+7
-13
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -29,7 +27,7 @@
|
|||||||
# include <FL/Fl.H>
|
# include <FL/Fl.H>
|
||||||
# include <FL/Fl_Double_Window.H>
|
# include <FL/Fl_Double_Window.H>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\addtogroup group_cairo
|
\addtogroup group_cairo
|
||||||
@{
|
@{
|
||||||
*/
|
*/
|
||||||
@@ -44,7 +42,7 @@
|
|||||||
\note You can alternatively define your custom cairo FLTK window,
|
\note You can alternatively define your custom cairo FLTK window,
|
||||||
and thus at least override the draw() method to provide custom cairo
|
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*)
|
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()
|
the current window. \see Fl_Window::current()
|
||||||
*/
|
*/
|
||||||
class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window {
|
class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window {
|
||||||
@@ -62,7 +60,7 @@ protected:
|
|||||||
if (draw_cb_) { // call the Cairo draw callback
|
if (draw_cb_) { // call the Cairo draw callback
|
||||||
// manual method ? if yes explicitly get a cairo_context here
|
// manual method ? if yes explicitly get a cairo_context here
|
||||||
if (!Fl::cairo_autolink_context())
|
if (!Fl::cairo_autolink_context())
|
||||||
Fl::cairo_make_current(this);
|
Fl::cairo_make_current(this);
|
||||||
draw_cb_(this, Fl::cairo_cc());
|
draw_cb_(this, Fl::cairo_cc());
|
||||||
// flush cairo drawings: necessary at least for Windows
|
// flush cairo drawings: necessary at least for Windows
|
||||||
cairo_surface_t *s = cairo_get_target(Fl::cairo_cc());
|
cairo_surface_t *s = cairo_get_target(Fl::cairo_cc());
|
||||||
@@ -73,7 +71,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
/** This defines the cairo draw callback prototype that you must further */
|
/** This defines the cairo draw callback prototype that you must further */
|
||||||
typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def);
|
typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def);
|
||||||
/**
|
/**
|
||||||
You must provide a draw callback which will implement your cairo rendering.
|
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.
|
This method will permit you to set your cairo callback to \p cb.
|
||||||
*/
|
*/
|
||||||
@@ -87,7 +85,3 @@ private:
|
|||||||
|
|
||||||
# endif // FLTK_HAVE_CAIRO
|
# endif // FLTK_HAVE_CAIRO
|
||||||
#endif // FL_CAIRO_WINDOW_H
|
#endif // FL_CAIRO_WINDOW_H
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$" .
|
|
||||||
//
|
|
||||||
|
|||||||
+17
-23
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Forms chart header file for the Fast Light Tool Kit (FLTK).
|
// Forms chart header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -27,24 +25,24 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// values for type()
|
// values for type()
|
||||||
#define FL_BAR_CHART 0 /**< type() for Bar 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_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */
|
||||||
#define FL_LINE_CHART 2 /**< type() for Line 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_FILL_CHART 3 /**< type() for Fill Line Chart variant */
|
||||||
#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */
|
#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */
|
||||||
#define FL_PIE_CHART 5 /**< type() for Pie 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_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_MAX 128 /**< max entries per chart */
|
||||||
#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */
|
#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */
|
||||||
|
|
||||||
/** For internal use only */
|
/** For internal use only */
|
||||||
struct FL_CHART_ENTRY {
|
struct FL_CHART_ENTRY {
|
||||||
float val; /**< For internal use only. */
|
float val; /**< For internal use only. */
|
||||||
unsigned col; /**< For internal use only. */
|
unsigned col; /**< For internal use only. */
|
||||||
char str[FL_CHART_LABEL_MAX+1]; /**< 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.
|
\brief Fl_Chart displays simple charts.
|
||||||
It is provided for Forms compatibility.
|
It is provided for Forms compatibility.
|
||||||
|
|
||||||
\image html charts.png
|
\image html charts.png
|
||||||
\image latex charts.png "Fl_Chart" width=10cm
|
\image latex charts.png "Fl_Chart" width=10cm
|
||||||
\todo Refactor Fl_Chart::type() information.
|
\todo Refactor Fl_Chart::type() information.
|
||||||
|
|
||||||
@@ -145,7 +143,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+9
-15
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
|
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -55,11 +53,11 @@ public:
|
|||||||
#ifndef FL_DOXYGEN
|
#ifndef FL_DOXYGEN
|
||||||
/** For internal use only. */
|
/** For internal use only. */
|
||||||
struct cb_item {
|
struct cb_item {
|
||||||
cb_item *next; /**< For internal use only. */
|
cb_item *next; /**< For internal use only. */
|
||||||
cb_item *prev; /**< For internal use only. */
|
cb_item *prev; /**< For internal use only. */
|
||||||
char checked; /**< For internal use only. */
|
char checked; /**< For internal use only. */
|
||||||
char selected; /**< For internal use only. */
|
char selected; /**< For internal use only. */
|
||||||
char *text; /**< For internal use only. */
|
char *text; /**< For internal use only. */
|
||||||
};
|
};
|
||||||
#endif // !FL_DOXYGEN
|
#endif // !FL_DOXYGEN
|
||||||
|
|
||||||
@@ -81,7 +79,7 @@ public:
|
|||||||
~Fl_Check_Browser() { clear(); }
|
~Fl_Check_Browser() { clear(); }
|
||||||
int add(char *s); // add an (unchecked) item
|
int add(char *s); // add an (unchecked) item
|
||||||
int add(char *s, int b); // add an item and set checked
|
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()
|
int remove(int item); // delete an item. Returns nitems()
|
||||||
|
|
||||||
// inline const char * methods to avoid breaking binary compatibility...
|
// inline const char * methods to avoid breaking binary compatibility...
|
||||||
@@ -114,7 +112,3 @@ public:
|
|||||||
|
|
||||||
#endif // Fl_Check_Browser_H
|
#endif // Fl_Check_Browser_H
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Check button header file for the Fast Light Tool Kit (FLTK).
|
// Check button header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
#ifndef Fl_Check_Button_H
|
||||||
@@ -33,7 +31,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+5
-11
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Choice header file for the Fast Light Tool Kit (FLTK).
|
// Choice header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -45,7 +43,7 @@
|
|||||||
and then:
|
and then:
|
||||||
|
|
||||||
- The item's callback is done if one has been set; the
|
- 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.
|
along with any userdata configured for the callback.
|
||||||
|
|
||||||
- If the item does not have a callback, the Fl_Choice widget's
|
- If the item does not have a callback, the Fl_Choice widget's
|
||||||
@@ -100,7 +98,7 @@
|
|||||||
return Fl::run();
|
return Fl::run();
|
||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
*/
|
*/
|
||||||
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
|
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
|
||||||
protected:
|
protected:
|
||||||
@@ -122,7 +120,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+27
-33
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Clock header file for the Fast Light Tool Kit (FLTK).
|
// Clock header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -30,12 +28,12 @@
|
|||||||
// Please change doxygen documentation below (class Fl_Clock_Output)
|
// Please change doxygen documentation below (class Fl_Clock_Output)
|
||||||
// accordingly as well when changing the following type values:
|
// accordingly as well when changing the following type values:
|
||||||
|
|
||||||
#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
|
#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
|
||||||
#define FL_ROUND_CLOCK 1 /**< type() of Round 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_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */
|
||||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */
|
#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!
|
// 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,
|
The time shown on the clock is not updated. To display the current time,
|
||||||
use Fl_Clock instead.
|
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
|
<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
|
\htmlonly </TD> <TD> \endhtmlonly
|
||||||
\image html round_clock.png
|
\image html round_clock.png
|
||||||
\htmlonly </TD> </TR> </table> \endhtmlonly
|
\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
|
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
|
||||||
@@ -57,10 +55,10 @@
|
|||||||
Values for clock type() (\#include \<FL/Clock.H\>):
|
Values for clock type() (\#include \<FL/Clock.H\>):
|
||||||
|
|
||||||
\code
|
\code
|
||||||
#define FL_SQUARE_CLOCK 0 // Square Clock variant
|
#define FL_SQUARE_CLOCK 0 // Square Clock variant
|
||||||
#define FL_ROUND_CLOCK 1 // Round Clock variant
|
#define FL_ROUND_CLOCK 1 // Round Clock variant
|
||||||
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
|
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
|
||||||
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
|
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@@ -76,8 +74,8 @@ public:
|
|||||||
|
|
||||||
Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0);
|
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);
|
void value(int H, int m, int s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,9 +106,9 @@ public:
|
|||||||
/**
|
/**
|
||||||
Returns the shadow drawing mode of the hands.
|
Returns the shadow drawing mode of the hands.
|
||||||
|
|
||||||
\returns shadow drawing mode of the hands
|
\returns shadow drawing mode of the hands
|
||||||
\retval 0 no shadows
|
\retval 0 no shadows
|
||||||
\retval 1 draw shadows of hands (default)
|
\retval 1 draw shadows of hands (default)
|
||||||
*/
|
*/
|
||||||
int shadow() const {return shadow_;}
|
int shadow() const {return shadow_;}
|
||||||
|
|
||||||
@@ -124,7 +122,7 @@ public:
|
|||||||
|
|
||||||
The default is to draw the shadows (1).
|
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; }
|
void shadow(int mode) { shadow_ = mode ? 1 : 0; }
|
||||||
};
|
};
|
||||||
@@ -135,18 +133,18 @@ public:
|
|||||||
\class Fl_Clock
|
\class Fl_Clock
|
||||||
\brief This widget provides a round analog clock display.
|
\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().
|
It installs a 1-second timeout callback using Fl::add_timeout().
|
||||||
You can choose the rounded or square type of the clock with type().
|
You can choose the rounded or square type of the clock with type().
|
||||||
Please see Fl_Clock_Output widget for applicable values.
|
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
|
<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
|
\htmlonly </TD> <TD> \endhtmlonly
|
||||||
\image html round_clock.png
|
\image html round_clock.png
|
||||||
\htmlonly </TD> </TR> </table> \endhtmlonly
|
\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
|
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
|
||||||
|
|
||||||
\see class Fl_Clock_Output
|
\see class Fl_Clock_Output
|
||||||
@@ -156,14 +154,10 @@ public:
|
|||||||
int handle(int);
|
int handle(int);
|
||||||
|
|
||||||
Fl_Clock(int X, int Y, int W, int H, const char *L = 0);
|
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(uchar t, int X, int Y, int W, int H, const char *L);
|
||||||
|
|
||||||
~Fl_Clock();
|
~Fl_Clock();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+13
-19
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Color chooser header file for the Fast Light Tool Kit (FLTK).
|
// Color chooser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2019 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/** \file
|
||||||
@@ -67,7 +65,7 @@ public:
|
|||||||
|
|
||||||
#endif // !FL_DOXYGEN
|
#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 rgb_cb(Fl_Widget*, void*);
|
||||||
static void mode_cb(Fl_Widget*, void*);
|
static void mode_cb(Fl_Widget*, void*);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
int handle(int e);
|
int handle(int e);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns which Fl_Color_Chooser variant is currently active
|
Returns which Fl_Color_Chooser variant is currently active
|
||||||
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||||
*/
|
*/
|
||||||
int mode() {return choice.value();}
|
int mode() {return choice.value();}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set which Fl_Color_Chooser variant is currently active
|
Set which Fl_Color_Chooser variant is currently active
|
||||||
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
|
||||||
*/
|
*/
|
||||||
void mode(int newMode);
|
void mode(int newMode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current hue.
|
Returns the current hue.
|
||||||
0 <= hue < 6. Zero is red, one is yellow, two is green, etc.
|
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);
|
FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m=-1);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+7
-13
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
|
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2014 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
#ifndef Fl_Copy_Surface_H
|
||||||
@@ -22,12 +20,12 @@
|
|||||||
#include <FL/Fl_Widget_Surface.H>
|
#include <FL/Fl_Widget_Surface.H>
|
||||||
|
|
||||||
/** Supports copying of graphical data to the clipboard.
|
/** 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
|
<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()
|
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.
|
) 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.
|
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:
|
<br> Usage example:
|
||||||
\code
|
\code
|
||||||
Fl_Widget *g = ...; // a widget you want to copy to the clipboard
|
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
|
2) as a color bitmap. Applications to which the clipboard content is pasted can use the format
|
||||||
that suits them best.
|
that suits them best.
|
||||||
\li Mac OS: The graphical data are copied to the clipboard (a.k.a. pasteboard) in two 'flavors':
|
\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.
|
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.
|
\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.
|
A base class describing the interface between FLTK and draw-to-clipboard operations.
|
||||||
|
|
||||||
This class is only for internal use by the FLTK library.
|
This class is only for internal use by the FLTK library.
|
||||||
|
|
||||||
A supported platform should implement the virtual methods of this class
|
A supported platform should implement the virtual methods of this class
|
||||||
@@ -108,7 +106,3 @@ protected:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#endif // Fl_Copy_Surface_H
|
#endif // Fl_Copy_Surface_H
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+5
-11
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Counter header file for the Fast Light Tool Kit (FLTK).
|
// Counter header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -29,8 +27,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// values for type():
|
// values for type():
|
||||||
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
||||||
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Controls a single floating point value with button (or keyboard) arrows.
|
Controls a single floating point value with button (or keyboard) arrows.
|
||||||
@@ -109,7 +107,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+7
-13
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Definition of classes Fl_Surface_Device, Fl_Display_Device
|
// Definition of classes Fl_Surface_Device, Fl_Display_Device
|
||||||
// for the Fast Light Tool Kit (FLTK).
|
// for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -10,14 +8,14 @@
|
|||||||
// the file "COPYING" which should have been included with this file. If this
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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.
|
\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.
|
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.
|
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().
|
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.
|
an instance of the Fl_Display_Device class.
|
||||||
|
|
||||||
A drawing surface other than the computer's display, is typically used as follows:
|
A drawing surface other than the computer's display, is typically used as follows:
|
||||||
@@ -53,7 +51,7 @@ class Fl_Widget;
|
|||||||
</ol>
|
</ol>
|
||||||
For back-compatibility, it is also possible to use the Fl_Surface_Device::set_current() member function
|
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.
|
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
|
Class Fl_Surface_Device can also be derived to define new kinds of graphical output
|
||||||
usable with FLTK drawing functions.
|
usable with FLTK drawing functions.
|
||||||
An example would be to draw to a PDF file. This would require to create a new class,
|
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
|
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.
|
This class is not intended for use outside the FLTK library.
|
||||||
It is currently used to provide an automated printing
|
It is currently used to provide an automated printing
|
||||||
service and screen capture for OpenGL windows, if linked with fltk_gl.
|
service and screen capture for OpenGL windows, if linked with fltk_gl.
|
||||||
@@ -130,7 +128,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // Fl_Device_H
|
#endif // Fl_Device_H
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+8
-14
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Dial header file for the Fast Light Tool Kit (FLTK).
|
// Dial header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -27,14 +25,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// values for type():
|
// values for type():
|
||||||
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
||||||
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
|
#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_FILL_DIAL 2 /**< type() for dial variant with filled arc */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The Fl_Dial widget provides a circular dial to control a
|
The Fl_Dial widget provides a circular dial to control a
|
||||||
single floating point value.
|
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
|
\image latex dial.png "Fl_Dial" width=4cm
|
||||||
Use type() to set the type of the dial to:
|
Use type() to set the type of the dial to:
|
||||||
<UL>
|
<UL>
|
||||||
@@ -63,7 +61,7 @@ public:
|
|||||||
and label string. The default type is FL_NORMAL_DIAL.
|
and label string. The default type is FL_NORMAL_DIAL.
|
||||||
*/
|
*/
|
||||||
Fl_Dial(int x,int y,int w,int h, const char *l = 0);
|
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
|
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
|
values are 45 and 315 (0 degrees is straight down and the angles
|
||||||
progress clockwise). Normally angle1 is less than angle2, but if you
|
progress clockwise). Normally angle1 is less than angle2, but if you
|
||||||
@@ -82,7 +80,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+5
-11
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Double-buffered window header file for the Fast Light Tool Kit (FLTK).
|
// Double-buffered window header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -50,13 +48,13 @@ public:
|
|||||||
void hide();
|
void hide();
|
||||||
void flush();
|
void flush();
|
||||||
~Fl_Double_Window();
|
~Fl_Double_Window();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Creates a new Fl_Double_Window widget using the given
|
Creates a new Fl_Double_Window widget using the given
|
||||||
position, size, and label (title) string.
|
position, size, and label (title) string.
|
||||||
*/
|
*/
|
||||||
Fl_Double_Window(int W, int H, const char *l = 0);
|
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)
|
See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
|
||||||
*/
|
*/
|
||||||
@@ -65,7 +63,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+5
-11
@@ -1,6 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* "$Id$"
|
|
||||||
*
|
|
||||||
* Windows DLL export .
|
* Windows DLL export .
|
||||||
*
|
*
|
||||||
* Copyright 1998-2018 by Bill Spitzak and others.
|
* 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
|
* the file "COPYING" which should have been included with this file. If this
|
||||||
* file is missing or damaged, see the license at:
|
* 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
|
#ifndef Fl_Export_H
|
||||||
@@ -25,9 +23,9 @@
|
|||||||
|
|
||||||
# if defined(FL_DLL)
|
# if defined(FL_DLL)
|
||||||
# ifdef FL_LIBRARY
|
# ifdef FL_LIBRARY
|
||||||
# define FL_EXPORT __declspec(dllexport)
|
# define FL_EXPORT __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
# define FL_EXPORT __declspec(dllimport)
|
# define FL_EXPORT __declspec(dllimport)
|
||||||
# endif /* FL_LIBRARY */
|
# endif /* FL_LIBRARY */
|
||||||
# elif __GNUC__ >= 4
|
# elif __GNUC__ >= 4
|
||||||
# define FL_EXPORT __attribute__ ((visibility ("default")))
|
# define FL_EXPORT __attribute__ ((visibility ("default")))
|
||||||
@@ -36,7 +34,3 @@
|
|||||||
# endif /* FL_DLL */
|
# endif /* FL_DLL */
|
||||||
|
|
||||||
#endif /* !Fl_Export_H */
|
#endif /* !Fl_Export_H */
|
||||||
|
|
||||||
/*
|
|
||||||
* End of "$Id$".
|
|
||||||
*/
|
|
||||||
|
|||||||
+22
-28
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// FileBrowser definitions.
|
// FileBrowser definitions.
|
||||||
//
|
//
|
||||||
// Copyright 1999-2010 by Michael Sweet.
|
// Copyright 1999-2010 by Michael Sweet.
|
||||||
@@ -9,11 +7,11 @@
|
|||||||
// the file "COPYING" which should have been included with this file. If this
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -37,17 +35,17 @@
|
|||||||
|
|
||||||
/** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */
|
/** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */
|
||||||
class FL_EXPORT Fl_File_Browser : public Fl_Browser {
|
class FL_EXPORT Fl_File_Browser : public Fl_Browser {
|
||||||
|
|
||||||
int filetype_;
|
|
||||||
const char *directory_;
|
|
||||||
uchar iconsize_;
|
|
||||||
const char *pattern_;
|
|
||||||
|
|
||||||
int full_height() const;
|
int filetype_;
|
||||||
int item_height(void *) const;
|
const char *directory_;
|
||||||
int item_width(void *) const;
|
uchar iconsize_;
|
||||||
void item_draw(void *, int, int, int, int) const;
|
const char *pattern_;
|
||||||
int incr_height() const { return (item_height(0)); }
|
|
||||||
|
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:
|
public:
|
||||||
enum { FILES, DIRECTORIES };
|
enum { FILES, DIRECTORIES };
|
||||||
@@ -59,34 +57,34 @@ public:
|
|||||||
Fl_File_Browser(int, int, int, int, const char * = 0);
|
Fl_File_Browser(int, int, int, int, const char * = 0);
|
||||||
|
|
||||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
/** 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. */
|
/** 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
|
Sets or gets the filename filter. The pattern matching uses
|
||||||
the fl_filename_match()
|
the fl_filename_match()
|
||||||
function in FLTK.
|
function in FLTK.
|
||||||
*/
|
*/
|
||||||
void filter(const char *pattern);
|
void filter(const char *pattern);
|
||||||
/**
|
/**
|
||||||
Sets or gets the filename filter. The pattern matching uses
|
Sets or gets the filename filter. The pattern matching uses
|
||||||
the fl_filename_match()
|
the fl_filename_match()
|
||||||
function in FLTK.
|
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
|
Loads the specified directory into the browser. If icons have been
|
||||||
loaded then the correct icon is associated with each file in the list.
|
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
|
<P>The sort argument specifies a sort function to be used with
|
||||||
fl_filename_list().
|
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(); };
|
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
|
Sets or gets the file browser type, FILES or
|
||||||
@@ -94,18 +92,14 @@ public:
|
|||||||
files and directories are shown. Otherwise only directories are
|
files and directories are shown. Otherwise only directories are
|
||||||
shown.
|
shown.
|
||||||
*/
|
*/
|
||||||
int filetype() const { return (filetype_); };
|
int filetype() const { return (filetype_); };
|
||||||
/**
|
/**
|
||||||
Sets or gets the file browser type, FILES or
|
Sets or gets the file browser type, FILES or
|
||||||
DIRECTORIES. When set to FILES, both
|
DIRECTORIES. When set to FILES, both
|
||||||
files and directories are shown. Otherwise only directories are
|
files and directories are shown. Otherwise only directories are
|
||||||
shown.
|
shown.
|
||||||
*/
|
*/
|
||||||
void filetype(int t) { filetype_ = t; };
|
void filetype(int t) { filetype_ = t; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !_Fl_File_Browser_H_
|
#endif // !_Fl_File_Browser_H_
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+48
-54
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
|
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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 !!!
|
// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
|
||||||
@@ -47,24 +45,24 @@
|
|||||||
|
|
||||||
class FL_EXPORT Fl_File_Chooser {
|
class FL_EXPORT Fl_File_Chooser {
|
||||||
public:
|
public:
|
||||||
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
||||||
private:
|
private:
|
||||||
static Fl_Preferences *prefs_;
|
static Fl_Preferences *prefs_;
|
||||||
void (*callback_)(Fl_File_Chooser*, void *);
|
void (*callback_)(Fl_File_Chooser*, void *);
|
||||||
void *data_;
|
void *data_;
|
||||||
char directory_[FL_PATH_MAX];
|
char directory_[FL_PATH_MAX];
|
||||||
char pattern_[FL_PATH_MAX];
|
char pattern_[FL_PATH_MAX];
|
||||||
char preview_text_[2048];
|
char preview_text_[2048];
|
||||||
int type_;
|
int type_;
|
||||||
void favoritesButtonCB();
|
void favoritesButtonCB();
|
||||||
void favoritesCB(Fl_Widget *w);
|
void favoritesCB(Fl_Widget *w);
|
||||||
void fileListCB();
|
void fileListCB();
|
||||||
void fileNameCB();
|
void fileNameCB();
|
||||||
void newdir();
|
void newdir();
|
||||||
static void previewCB(Fl_File_Chooser *fc);
|
static void previewCB(Fl_File_Chooser *fc);
|
||||||
void showChoiceCB();
|
void showChoiceCB();
|
||||||
void update_favorites();
|
void update_favorites();
|
||||||
void update_preview();
|
void update_preview();
|
||||||
public:
|
public:
|
||||||
Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
|
Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
|
||||||
private:
|
private:
|
||||||
@@ -131,10 +129,10 @@ public:
|
|||||||
void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
|
void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
|
||||||
void color(Fl_Color c);
|
void color(Fl_Color c);
|
||||||
Fl_Color color();
|
Fl_Color color();
|
||||||
int count();
|
int count();
|
||||||
void directory(const char *d);
|
void directory(const char *d);
|
||||||
char * directory();
|
char * directory();
|
||||||
void filter(const char *p);
|
void filter(const char *p);
|
||||||
const char * filter();
|
const char * filter();
|
||||||
int filter_value();
|
int filter_value();
|
||||||
void filter_value(int f);
|
void filter_value(int f);
|
||||||
@@ -145,15 +143,15 @@ public:
|
|||||||
const char * label();
|
const char * label();
|
||||||
void ok_label(const char *l);
|
void ok_label(const char *l);
|
||||||
const char * ok_label();
|
const char * ok_label();
|
||||||
void preview(int e);
|
void preview(int e);
|
||||||
int preview() const { return previewButton->value(); };
|
int preview() const { return previewButton->value(); };
|
||||||
private:
|
private:
|
||||||
void showHidden(int e);
|
void showHidden(int e);
|
||||||
void remove_hidden_files();
|
void remove_hidden_files();
|
||||||
public:
|
public:
|
||||||
void rescan();
|
void rescan();
|
||||||
void rescan_keep_filename();
|
void rescan_keep_filename();
|
||||||
void show();
|
void show();
|
||||||
int shown();
|
int shown();
|
||||||
void textcolor(Fl_Color c);
|
void textcolor(Fl_Color c);
|
||||||
Fl_Color textcolor();
|
Fl_Color textcolor();
|
||||||
@@ -165,72 +163,72 @@ public:
|
|||||||
int type();
|
int type();
|
||||||
void * user_data() const;
|
void * user_data() const;
|
||||||
void user_data(void *d);
|
void user_data(void *d);
|
||||||
const char *value(int f = 1);
|
const char *value(int f = 1);
|
||||||
void value(const char *filename);
|
void value(const char *filename);
|
||||||
int visible();
|
int visible();
|
||||||
/**
|
/**
|
||||||
[standard text may be customized at run-time]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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]
|
[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 sort function that is used when loading
|
||||||
the contents of a directory.
|
the contents of a directory.
|
||||||
*/
|
*/
|
||||||
static Fl_File_Sort_F *sort;
|
static Fl_File_Sort_F *sort;
|
||||||
private:
|
private:
|
||||||
Fl_Widget* ext_group;
|
Fl_Widget* ext_group;
|
||||||
public:
|
public:
|
||||||
Fl_Widget* add_extra(Fl_Widget* gr);
|
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_callback(void (*cb)(const char*));
|
||||||
FL_EXPORT void fl_file_chooser_ok_label(const char*l);
|
FL_EXPORT void fl_file_chooser_ok_label(const char*l);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+51
-57
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// Fl_File_Icon definitions.
|
// Fl_File_Icon definitions.
|
||||||
//
|
//
|
||||||
// Copyright 1999-2010 by Michael Sweet.
|
// Copyright 1999-2010 by Michael Sweet.
|
||||||
@@ -9,11 +7,11 @@
|
|||||||
// the file "COPYING" which should have been included with this file. If this
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -33,61 +31,61 @@
|
|||||||
// Special color value for the icon color.
|
// 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...
|
// 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.
|
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
|
static Fl_File_Icon *first_; // Pointer to first icon/filetype
|
||||||
Fl_File_Icon *next_; // Pointer to next icon/filetype
|
Fl_File_Icon *next_; // Pointer to next icon/filetype
|
||||||
const char *pattern_; // Pattern string
|
const char *pattern_; // Pattern string
|
||||||
int type_; // Match only if directory or file?
|
int type_; // Match only if directory or file?
|
||||||
int num_data_; // Number of data elements
|
int num_data_; // Number of data elements
|
||||||
int alloc_data_; // Number of allocated elements
|
int alloc_data_; // Number of allocated elements
|
||||||
short *data_; // Icon data
|
short *data_; // Icon data
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum // File types
|
enum // File types
|
||||||
{
|
{
|
||||||
ANY, // Any kind of file
|
ANY, // Any kind of file
|
||||||
PLAIN, // Only plain files
|
PLAIN, // Only plain files
|
||||||
FIFO, // Only named pipes
|
FIFO, // Only named pipes
|
||||||
DEVICE, // Only character and block devices
|
DEVICE, // Only character and block devices
|
||||||
LINK, // Only symbolic links
|
LINK, // Only symbolic links
|
||||||
DIRECTORY // Only directories
|
DIRECTORY // Only directories
|
||||||
};
|
};
|
||||||
|
|
||||||
enum // Data opcodes
|
enum // Data opcodes
|
||||||
{
|
{
|
||||||
END, // End of primitive/icon
|
END, // End of primitive/icon
|
||||||
COLOR, // Followed by color value (2 shorts)
|
COLOR, // Followed by color value (2 shorts)
|
||||||
LINE, // Start of line
|
LINE, // Start of line
|
||||||
CLOSEDLINE, // Start of closed line
|
CLOSEDLINE, // Start of closed line
|
||||||
POLYGON, // Start of polygon
|
POLYGON, // Start of polygon
|
||||||
OUTLINEPOLYGON, // Followed by outline color (2 shorts)
|
OUTLINEPOLYGON, // Followed by outline color (2 shorts)
|
||||||
VERTEX // Followed by scaled X,Y
|
VERTEX // Followed by scaled X,Y
|
||||||
};
|
};
|
||||||
|
|
||||||
Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0);
|
Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0);
|
||||||
~Fl_File_Icon();
|
~Fl_File_Icon();
|
||||||
|
|
||||||
short *add(short d);
|
short *add(short d);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds a color value to the icon array, returning a pointer to it.
|
Adds a color value to the icon array, returning a pointer to it.
|
||||||
\param[in] c color value
|
\param[in] c color value
|
||||||
*/
|
*/
|
||||||
short *add_color(Fl_Color c)
|
short *add_color(Fl_Color c)
|
||||||
{ short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); }
|
{ 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.
|
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.
|
The origin (0.0) is in the lower-lefthand corner of the icon.
|
||||||
\param[in] x, y vertex coordinates
|
\param[in] x, y vertex coordinates
|
||||||
*/
|
*/
|
||||||
short *add_vertex(int x, int y)
|
short *add_vertex(int x, int y)
|
||||||
{ short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); }
|
{ 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.
|
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.
|
The origin (0.0) is in the lower-lefthand corner of the icon.
|
||||||
\param[in] x, y vertex coordinates
|
\param[in] x, y vertex coordinates
|
||||||
*/
|
*/
|
||||||
short *add_vertex(float x, float y)
|
short *add_vertex(float x, float y)
|
||||||
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
|
{ short *d = add((short)VERTEX); add((short)(x * 10000.0));
|
||||||
add((short)(y * 10000.0)); return (d); }
|
add((short)(y * 10000.0)); return (d); }
|
||||||
|
|
||||||
/** Clears all icon data from the icon.*/
|
/** 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);
|
static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
|
||||||
void load(const char *f);
|
void load(const char *f);
|
||||||
int load_fti(const char *fti);
|
int load_fti(const char *fti);
|
||||||
int load_image(const char *i);
|
int load_image(const char *i);
|
||||||
|
|
||||||
/** Returns next file icon object. See Fl_File_Icon::first() */
|
/** 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.*/
|
/** 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.*/
|
/** 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
|
Returns the filetype associated with the icon, which can be one of the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
\li Fl_File_Icon::ANY, any kind of file.
|
\li Fl_File_Icon::ANY, any kind of file.
|
||||||
\li Fl_File_Icon::PLAIN, plain files.
|
\li Fl_File_Icon::PLAIN, plain files.
|
||||||
\li Fl_File_Icon::FIFO, named pipes.
|
\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::LINK, symbolic links.
|
||||||
\li Fl_File_Icon::DIRECTORY, directories.
|
\li Fl_File_Icon::DIRECTORY, directories.
|
||||||
*/
|
*/
|
||||||
int type() { return (type_); }
|
int type() { return (type_); }
|
||||||
|
|
||||||
/** Returns the data array for the icon.*/
|
/** 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);
|
static Fl_File_Icon *find(const char *filename, int filetype = ANY);
|
||||||
|
|
||||||
/** Returns a pointer to the first icon in the list.*/
|
/** Returns a pointer to the first icon in the list.*/
|
||||||
static Fl_File_Icon *first() { return (first_); }
|
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_
|
#endif // !_Fl_Fl_File_Icon_H_
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
+19
-26
@@ -1,6 +1,4 @@
|
|||||||
//
|
//
|
||||||
// "$Id$"
|
|
||||||
//
|
|
||||||
// File_Input header file for the Fast Light Tool Kit (FLTK).
|
// File_Input header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
// 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
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
// file is missing or damaged, see the license at:
|
// 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
|
/* \file
|
||||||
@@ -36,7 +34,7 @@
|
|||||||
FL_WHEN_RELEASE callback won't be called if the directory clicked
|
FL_WHEN_RELEASE callback won't be called if the directory clicked
|
||||||
is the same as the current one.
|
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
|
\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
|
\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.
|
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 {
|
class FL_EXPORT Fl_File_Input : public Fl_Input {
|
||||||
|
|
||||||
char ok_entry_;
|
|
||||||
uchar down_box_;
|
|
||||||
short buttons_[200];
|
|
||||||
short pressed_;
|
|
||||||
|
|
||||||
void draw_buttons();
|
char ok_entry_;
|
||||||
int handle_button(int event);
|
uchar down_box_;
|
||||||
void update_buttons();
|
short buttons_[200];
|
||||||
|
short pressed_;
|
||||||
|
|
||||||
|
void draw_buttons();
|
||||||
|
int handle_button(int event);
|
||||||
|
void update_buttons();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -66,9 +64,9 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/** Gets the box type used for the navigation bar. */
|
/** 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. */
|
/** 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.
|
Gets the current error color.
|
||||||
@@ -79,7 +77,7 @@ public:
|
|||||||
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
||||||
\todo Remove Fl_File_Input::errorcolor() 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.
|
Sets the current error color to \p c.
|
||||||
@@ -89,21 +87,16 @@ public:
|
|||||||
\deprecated Will be removed in FLTK 1.5.0 or higher.
|
\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.
|
\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 value(const char *str, int len);
|
int value(const char *str, int len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current value, which is a pointer to an internal buffer
|
Returns the current value, which is a pointer to an internal buffer
|
||||||
and is valid only until the next event is handled.
|
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
|
#endif // !Fl_File_Input_H
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// End of "$Id$".
|
|
||||||
//
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user