Move global FLTK options into new app fltk-admin (#560)

This commit is contained in:
Matthias Melcher
2023-01-21 17:14:41 +01:00
committed by GitHub
parent 4ddcbc81de
commit 1fc269b0d4
47 changed files with 1465 additions and 828 deletions
+3
View File
@@ -125,6 +125,9 @@ if (UNIX OR MSYS OR MINGW)
if (FLTK_BUILD_FLUID)
INSTALL_MAN (fluid 1)
endif (FLTK_BUILD_FLUID)
if (FLTK_BUILD_FLTK_OPTIONS)
INSTALL_MAN (fltk-options 1)
endif (FLTK_BUILD_FLTK_OPTIONS)
INSTALL_MAN (fltk-config 1)
INSTALL_MAN (fltk 3)
+4 -3
View File
@@ -360,9 +360,10 @@ option (OPTION_BUILD_SHARED_LIBS
option (OPTION_PRINT_SUPPORT "allow print support" ON)
option (OPTION_FILESYSTEM_SUPPORT "allow file system support" ON)
option (FLTK_BUILD_FLUID "Build FLUID" ON)
option (FLTK_BUILD_TEST "Build test/demo programs" ON)
option (FLTK_BUILD_EXAMPLES "Build example programs" OFF)
option (FLTK_BUILD_FLUID "Build FLUID" ON)
option (FLTK_BUILD_FLTK_OPTIONS "Build fltk-options" ON)
option (FLTK_BUILD_TEST "Build test/demo programs" ON)
option (FLTK_BUILD_EXAMPLES "Build example programs" OFF)
if (DEFINED OPTION_BUILD_EXAMPLES)
message (WARNING
+16 -2
View File
@@ -115,6 +115,14 @@ if (FLTK_BUILD_FLUID)
add_subdirectory (fluid)
endif (FLTK_BUILD_FLUID)
#######################################################################
# build fltk-options
#######################################################################
if (FLTK_BUILD_FLTK_OPTIONS)
add_subdirectory (fltk-options)
endif (FLTK_BUILD_FLTK_OPTIONS)
#######################################################################
# variables shared by export and install
# export.cmake creates configuration files for direct use in a built but uninstalled FLTK
@@ -214,9 +222,15 @@ endif ()
if (FLTK_BUILD_FLUID)
message (STATUS "FLUID will be built in ${CMAKE_CURRENT_BINARY_DIR}/bin/fluid")
else ()
else ()
message (STATUS "FLUID will not be built (set FLTK_BUILD_FLUID=ON to build)")
endif ()
endif ()
if (FLTK_BUILD_FLTK_OPTIONS)
message (STATUS "fltk-options will be built in ${CMAKE_CURRENT_BINARY_DIR}/bin/fltk-options")
else ()
message (STATUS "fltk-options will not be built (set FLTK_BUILD_FLTK_OPTIONS=ON to build)")
endif ()
if (FLTK_BUILD_TEST)
message (STATUS "Test programs will be built in ${CMAKE_CURRENT_BINARY_DIR}/bin/test")
+4 -2
View File
@@ -16,7 +16,7 @@
include makeinclude
DIRS = $(IMAGEDIRS) $(LIBDECORDIR) src $(CAIRODIR) fluid test documentation
DIRS = $(IMAGEDIRS) $(LIBDECORDIR) src $(CAIRODIR) fluid fltk-options test documentation
all: makeinclude fltk-config
for dir in $(DIRS); do\
@@ -36,6 +36,7 @@ install: makeinclude
install-desktop: makeinclude
cd documentation; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP)
cd fluid; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP)
cd fltk-options; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP)
cd test; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP)
uninstall: makeinclude
@@ -48,6 +49,7 @@ uninstall: makeinclude
uninstall-desktop: makeinclude
cd documentation; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP)
cd fluid; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP)
cd fltk-options; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP)
cd test; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP)
depend: makeinclude
@@ -111,7 +113,7 @@ native-dist:
epm -v -f native fltk
etags:
etags FL/*.H FL/*.h src/*.cxx src/*.c src/*.h src/xutf8/*.h src/xutf8/*.c cairo/*.cxx fluid/*.h fluid/*.cxx test/*.h test/*.cxx
etags FL/*.H FL/*.h src/*.cxx src/*.c src/*.h src/xutf8/*.h src/xutf8/*.c cairo/*.cxx fluid/*.h fluid/*.cxx fltk-options/*.cxx test/*.h test/*.cxx
#
# Run the clang.llvm.org static code analysis tool on the C sources.
+3
View File
@@ -122,6 +122,9 @@ OPTION_BUILD_SHARED_LIBS - default OFF
FLTK_BUILD_FLUID - default ON
Builds the Fast Light User-Interface Designer ("FLUID").
FLTK_BUILD_FLTK_OPTIONS - default ON
Builds the FLTK options editor ("fltk-options").
FLTK_BUILD_TEST - default ON
Builds the test and demo programs in the 'test' directory.
+3
View File
@@ -292,6 +292,7 @@ AS_IF([test "x$enable_shared" = xyes], [
PICFLAG=1
SHAREDSUFFIX=""
FLUID="fluid-shared"
FLTK_OPTIONS="fltk-options-shared"
AS_CASE([$host_os], [darwin*], [
DSONAME="libfltk.$FL_DSO_VERSION.dylib"
@@ -441,6 +442,7 @@ AS_IF([test "x$enable_shared" = xyes], [
PICFLAG=0
SHAREDSUFFIX=""
FLUID="fluid"
FLTK_OPTIONS="fltk-options"
LINKSHARED="$LINKFLTKCAIRO ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
])
@@ -467,6 +469,7 @@ AC_SUBST([SHAREDSUFFIX])
AC_SUBST([LINKSHARED])
AC_SUBST([FLUID])
AC_SUBST([FLUID_BUILD])
AC_SUBST([FLTK_OPTIONS])
dnl Find commands...
+1
View File
@@ -565,6 +565,7 @@ INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/events.dox
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/subclassing.dox
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/opengl.dox
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/fluid.dox
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/fltk-options.dox
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/advanced.dox
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/src/unicode.dox
INPUT += @FLTK_SOURCE_DIR@/FL
+7 -1
View File
@@ -37,6 +37,7 @@ HTMLFILES = \
$(SRC_DOCDIR)/subclassing.dox \
$(SRC_DOCDIR)/opengl.dox \
$(SRC_DOCDIR)/fluid.dox \
$(SRC_DOCDIR)/fltk-options.dox \
$(SRC_DOCDIR)/advanced.dox \
$(SRC_DOCDIR)/unicode.dox \
$(SRC_DOCDIR)/enumerations.dox \
@@ -51,7 +52,8 @@ HTMLFILES = \
MANPAGES = $(SRC_DOCDIR)/fltk.$(CAT3EXT) $(SRC_DOCDIR)/fltk-config.$(CAT1EXT) \
$(SRC_DOCDIR)/fluid.$(CAT1EXT) $(SRC_DOCDIR)/blocks.$(CAT6EXT) \
$(SRC_DOCDIR)/checkers.$(CAT6EXT) $(SRC_DOCDIR)/sudoku.$(CAT6EXT)
$(SRC_DOCDIR)/checkers.$(CAT6EXT) $(SRC_DOCDIR)/sudoku.$(CAT6EXT) \
$(SRC_DOCDIR)/fltk-options.$(CAT1EXT)
all: $(MANPAGES)
@@ -91,11 +93,13 @@ install: $(MANPAGES)
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat1
$(INSTALL_MAN) $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
$(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
$(INSTALL_MAN) $(SRC_DOCDIR)/fltk-options.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat3
$(INSTALL_MAN) $(SRC_DOCDIR)/fltk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1
$(INSTALL_MAN) $(SRC_DOCDIR)/fluid.man $(DESTDIR)$(mandir)/man1/fluid.1
$(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.man $(DESTDIR)$(mandir)/man1/fltk-config.1
$(INSTALL_MAN) $(SRC_DOCDIR)/fltk-options.man $(DESTDIR)$(mandir)/man1/fltk-options.1
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/man3
$(INSTALL_MAN) $(SRC_DOCDIR)/fltk.man $(DESTDIR)$(mandir)/man3/fltk.3
@@ -116,6 +120,8 @@ uninstall:
$(RM) $(DESTDIR)$(mandir)/man1/fluid.1
$(RM) $(DESTDIR)$(mandir)/cat1/fltk-config.$(CAT1EXT)
$(RM) $(DESTDIR)$(mandir)/man1/fltk-config.1
$(RM) $(DESTDIR)$(mandir)/cat1/fltk-options.$(CAT1EXT)
$(RM) $(DESTDIR)$(mandir)/man1/fltk-options.1
$(RM) $(DESTDIR)$(mandir)/cat3/fltk.$(CAT3EXT)
$(RM) $(DESTDIR)$(mandir)/man3/fltk.3
+2 -2
View File
@@ -425,9 +425,9 @@ Fl::thread_message().
<table summary="navigation bar" width="100%" border="0">
<tr>
<td width="45%" align="LEFT">
<a class="el" href="fluid.html">
<a class="el" href="fltk-options.html">
[Prev]
Programming with FLUID
FLTK Runtime Options
</a>
</td>
<td width="10%" align="CENTER">
+1 -1
View File
@@ -81,7 +81,7 @@ Enables image file support.
.br
Displays the current FLTK version number, e.g. "1.1.0".
.SH SEE ALSO
fluid(1), fltk(3)
fluid(1), fltk-options(1), fltk(3)
.br
FLTK Programming Manual
.br
+85
View File
@@ -0,0 +1,85 @@
/**
\page fltk-options FLTK Runtime Options
In this chapter, we will cover how to access and alter settings for
applications created using FLTK, both as an administrator and as
a regular user.
Subchapters:
\li \ref fltk-options_basics
\li \ref fltk-options_access
\li \ref fltk-options_app
\li \ref fltk-options_options
\section fltk-options_basics Runtime Options
FLTK keeps track of various aspects of the user interface in a system-wide
database. Users have the ability to set their own preferences and override
default or system settings. For instance, FLTK will display a dotted
rectangle around the widget with current focus. This might not be desirable
for users who do not use keyboard navigation and do not need the rectangle.
This can be turned off by setting the OPTION_VISIBLE_FOCUS option to 'off'
for that user, which will disable the focus rectangle in all FLTK-based
applications.
\section fltk-options_access Obtaining Current Settings
Options are kept in preference files using the signature
`Fl_Preferences::CORE_SYSTEM, "fltk.org", "fltk"` for system-wide settings
and `Fl_Preferences::CORE_USER, "fltk.org", "fltk"` for individual users.
They can be accessed by using the function `bool Fl::option(Fl_Option opt)`.
If an application needs to temporarily override user or system settings,
it can use the function `void option(Fl_Option opt, bool val)`.
To make changes to options permanently, FLTK provides an administrative
tool called fltk-options.
\section fltk-options_app Administrative Tool
`fltk-options` is a hybrid app that is part of FLTK and can be installed on
the target system. It includes an up-to-date man page.
When fltk-options is called without any command-line arguments, it opens in
interactive mode and provides a user interface to view and alter all
system and current user options.
Starting the tool from a shell, the command-line options `-S` and `-U` can be
used to display or change system or user options. On MS-Windows, `fltk-options`
is also available as `fltk-options-cmd.exe`.
\section fltk-options_options List of Options
Calling `fltk-options --help` gives a list of all available commands, and
options and their values. `fltk-options --help OPTION` prints more detailed
information for OPTION if available. In interactive mode, tooltips provide
this additional information.
A full list of options can be found in the maunal at \ref Fl_Option .
\htmlonly
<hr>
<table summary="navigation bar" width="100%" border="0">
<tr>
<td width="45%" align="LEFT">
<a class="el" href="fluid.html">
[Prev]
Programming with FLUID
</a>
</td>
<td width="10%" align="CENTER">
<a class="el" href="index.html">[Index]</a>
</td>
<td width="45%" align="RIGHT">
<a class="el" href="advanced.html">
Advanced FLTK
[Next]
</a>
</td>
</tr>
</table>
\endhtmlonly
*/
+98
View File
@@ -0,0 +1,98 @@
.TH fltk\-options 1 "Fast Light Tool Kit" "13. January 2023"
.SH NAME
fltk\-options \- application to get and modify FLTK runtime options.
.sp
.SH SYNOPSIS
fltk\-options
[ \-S\fIoption[=value]\fR ]
[ \-U\fIoption[=value]\fR ]
[ \-L ]
[ \-LS ]
[ \-LU ]
[ \-f ]
[ \-v ] [ \-\-verbose ]
[ \-h[option] ] [ \-\-help [option] ]
.SH DESCRIPTION
\fIfltk\-options\fR is a tool that allows you to access and change settings
related to the user interface in applications built with FLTK. These settings
will be applied when the program is launched. They can be set at the system
level or by the individual user. User settings take precedence
over system settings.
.LP
The following command line arguments are supported:
.TP 5
\-S\fIoption[=value]\fR
.br
Change or print system wide option.
.TP 5
\-U\fIoption[=value]\fR
.br
Change or print user option. Values can be "0" or "OFF" to clear,
or "1" or "ON" to set the option. The value "-1" or "DEFAULT" sets
the option to its default value.
If no value is given, the current setting is returned as "-1", "0", or "1".
.TP 5
\-L
.br
List the value of all options.
.TP 5
\-LS
.br
List the value of all system options.
.TP 5
\-LU
.br
List the value of all user options.
.TP 5
\-f
.br
Suppress error messages concerning file access permissions.
.TP 5
\-v, \-\-verbose
.br
Print additional information in command line mode.
.TP 5
\-h[option], \-\-help [option]
.br
Prints a help page. If an option is give, print detailed information
for that option.
.LP
The following FLTK options are supported:
.TP 5
OPTION_VISIBLE_FOCUS
.br
Draw a dotted rectangle in widget with keyboard focus.
.TP 5
OPTION_ARROW_FOCUS
.br
Arrow keys will move focus beyond text input field.
.TP 5
OPTION_SHOW_TOOLTIPS
.br
Show or hide tooltips.
.TP 5
OPTION_DND_TEXT
.br
User can drag text from FLTK into other apps.
.TP 5
OPTION_FNFC_USES_GTK
.br
Use GTK file chooser instead of FLTK if available.
.TP 5
OPTION_PRINTER_USES_GTK
.br
Use GTK printer dialog instead of FLTK if available.
.TP 5
OPTION_SHOW_SCALING
.br
Show the zoom factor in a transient popup window.
.LP
Calling fltk-options without options will launch fltk-options interactive mode.
.SH SEE ALSO
fluid(1), fltk-config(1), fltk(3)
.br
FLTK Programming Manual
.br
FLTK Web Site, https://www.fltk.org/
.SH AUTHORS
Bill Spitzak and others.
+2 -2
View File
@@ -1694,8 +1694,8 @@ On Apple computers, use the Apple Command key instead of Ctrl.
<a class="el" href="index.html">[Index]</a>
</td>
<td width="45%" align="RIGHT">
<a class="el" href="advanced.html">
Advanced FLTK
<a class="el" href="fltk-options.html">
FLTK Runtime Options
[Next]
</a>
</td>
+2
View File
@@ -72,6 +72,8 @@
- \ref fluid_selecting_moving
- \ref fluid_images
\subpage fltk-options
\subpage advanced
\subpage unicode
+1
View File
@@ -31,6 +31,7 @@ This manual is organized into the following chapters and appendices:
\li \ref subclassing
\li \ref opengl
\li \ref fluid
\li \ref fltk-options
\li \ref advanced
\li \ref unicode
\li \ref enumerations
+141
View File
@@ -0,0 +1,141 @@
#
# CMakeLists.txt to build fltk-options for the FLTK project using CMake (www.cmake.org)
#
# Copyright 2023 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
# file is missing or damaged, see the license at:
#
# https://www.fltk.org/COPYING.php
#
# Please see the following page on how to report bugs and issues:
#
# https://www.fltk.org/bugs.php
#
set (CPPFILES
fltk-options.cxx
)
set (HEADERFILES
)
set (FLTK_OPTIONS_TARGETS fltk-options) # fltk-options and optional fltk-options-cmd target
set (FLTK_OPTIONS_LIBS fltk) # libraries used to link fltk-options executables
if (APPLE AND (NOT OPTION_APPLE_X11))
# macOS
set (ICON_NAME fltk-options.icns)
set (ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_NAME}")
add_executable (fltk-options MACOSX_BUNDLE ${CPPFILES} ${HEADERFILES} ${ICON_PATH})
# create macOS bundle wrapper script
set (WRAPPER "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/fltk-options")
add_custom_command (
TARGET fltk-options POST_BUILD
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/../CMake/macOS-bundle-wrapper.in ${WRAPPER}
COMMAND chmod u+x,g+x,o+x ${WRAPPER}
BYPRODUCTS ${WRAPPER}
VERBATIM
)
unset (WRAPPER)
else ()
# option WIN32 builds a Windows GUI program, ignored on other platforms
add_executable (fltk-options WIN32 ${CPPFILES} ${HEADERFILES})
endif ()
# we must link all programs with fltk_cairo if option CAIROEXT is enabled
if (FLTK_HAVE_CAIROEXT)
list (APPEND FLTK_OPTIONS_LIBS fltk_cairo cairo)
endif (FLTK_HAVE_CAIROEXT)
if (FLTK_HAVE_CAIRO)
fl_target_link_directories (fltk-options PRIVATE "${PKG_CAIRO_LIBRARY_DIRS}")
endif (FLTK_HAVE_CAIRO)
if (USE_GDIPLUS) # can only be true on Windows
list (APPEND FLTK_OPTIONS_LIBS gdiplus)
endif (USE_GDIPLUS)
target_link_libraries (fltk-options ${FLTK_OPTIONS_LIBS})
# Add fltk-options-cmd console app (Windows only) for editing FLTK options.
# This is done for all Windows targets, even if cross-compiling.
if (WIN32)
list (APPEND FLTK_OPTIONS_TARGETS fltk-options-cmd)
add_executable (fltk-options-cmd ${CPPFILES} ${HEADERFILES})
target_link_libraries (fltk-options-cmd ${FLTK_OPTIONS_LIBS})
if (FLTK_HAVE_CAIRO)
fl_target_link_directories (fltk-options-cmd PRIVATE "${PKG_CAIRO_LIBRARY_DIRS}")
endif (FLTK_HAVE_CAIRO)
endif ()
# install fltk-options GUI and commandline tool
if (APPLE AND (NOT OPTION_APPLE_X11))
# On macOS, fltk-options must be installed twice. The bundled version of
# fltk-options needs to go into the /Applications folder to make it visible
# as a user App with full GUI.
# The binary without bundle should go into ${FLTK_BINDIR}, usually
# /usr/local/bin, so it will be picked up as a command line tool by
# the build process of other apps.
# On macOS the command line tool is the same target ('fltk-options') as the
# one included in the bundle.
# create bundle
set_target_properties (fltk-options PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/fltk-options.plist")
set_target_properties (fltk-options PROPERTIES MACOSX_BUNDLE_ICON_FILE ${ICON_NAME})
# The line below would wrongly install /Applications/fltk-options.icns
# ## set_target_properties (fltk-options PROPERTIES RESOURCE ${ICON_PATH})
# install fltk-options GUI and commandline tools
#install (TARGETS fltk-options DESTINATION "/Applications")
# install command line tool
install (PROGRAMS $<TARGET_FILE:fltk-options> DESTINATION ${FLTK_BINDIR})
else()
# install fltk-options GUI and optional commandline tool 'fltk-options-cmd'
# (only on Windows)
install (TARGETS ${FLTK_OPTIONS_TARGETS}
EXPORT FLTK-Targets
RUNTIME DESTINATION ${FLTK_BINDIR}
LIBRARY DESTINATION ${FLTK_LIBDIR}
ARCHIVE DESTINATION ${FLTK_LIBDIR}
)
endif (APPLE AND (NOT OPTION_APPLE_X11))
# install desktop files
if (UNIX)
install (FILES fltk-options.desktop
DESTINATION ${FLTK_DATADIR}/applications
)
# Install mime-type file (x-fltk-options.desktop method is deprecated)
install (FILES fltk-options.xml
DESTINATION ${FLTK_DATADIR}/mime/packages
)
# Install desktop icons
foreach (icon 32 48 64 128)
install (FILES icons/fltk-options-${icon}.png
DESTINATION ${FLTK_DATADIR}/icons/hicolor/${icon}x${icon}/apps
RENAME fltk-options.png
)
endforeach()
endif (UNIX)
+93
View File
@@ -0,0 +1,93 @@
#
# fltk-options Makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 2023 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
# file is missing or damaged, see the license at:
#
# https://www.fltk.org/COPYING.php
#
# Please see the following page on how to report bugs and issues:
#
# https://www.fltk.org/bugs.php
#
include ../makeinclude
CPPFILES = \
fltk-options.cxx
################################################################
OBJECTS = $(CPPFILES:.cxx=.o)
all: $(FLTK_OPTIONS) fltk-options$(EXEEXT)
fltk-options$(EXEEXT): $(OBJECTS) $(LIBNAME) $(FLLIBNAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKFLTKIMG) $(LDFLAGS) $(LDLIBS)
$(OSX_ONLY) $(RM) -r -f fltk-options.app
$(OSX_ONLY) mkdir -p fltk-options.app/Contents/MacOS fltk-options.app/Contents/Resources
$(OSX_ONLY) $(INSTALL_BIN) fltk-options fltk-options.app/Contents/MacOS
$(OSX_ONLY) $(INSTALL) icons/fltk-options.icns fltk-options.app/Contents/Resources
$(OSX_ONLY) $(INSTALL) fltk-options.plist fltk-options.app/Contents/Info.plist
fltk-options-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDFLAGS) $(LDLIBS)
clean:
-$(RM) *.o core.* *~ *.bck *.bak
-$(RM) core fltk-options$(EXEEXT) fltk-options-shared$(EXEEXT)
$(OSX_ONLY) -$(RMDIR) fltk-options.app
depend: $(CPPFILES)
makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES)
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
echo "" >> makedepend.tmp
grep '^[a-zA-Z]' makedepend | ( LC_ALL=C sort -u -f >> makedepend.tmp; )
mv makedepend.tmp makedepend
# Automatically generated dependencies...
include makedepend
install: all
echo "Installing fltk-options in $(DESTDIR)$(bindir)..."
-$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_BIN) $(FLTK_OPTIONS) $(DESTDIR)$(bindir)/fltk-options$(EXEEXT)
install-linux:
-$(INSTALL_DIR) $(DESTDIR)/usr/share/applications
$(INSTALL_DATA) fltk-options.desktop $(DESTDIR)/usr/share/applications
for size in 16 32 48 64 128; do \
if test ! -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; then \
$(INSTALL_DIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
fi; \
$(INSTALL_DATA) icons/fltk-options-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fltk-options.png; \
done
-$(INSTALL_DIR) $(DESTDIR)/usr/share/mimelnk/application
$(INSTALL_DATA) x-fltk-options.desktop $(DESTDIR)/usr/share/mimelnk/application
install-osx:
echo Installing fltk-options in $(DESTDIR)/Applications...
-$(INSTALL_DIR) $(DESTDIR)/Applications/fltk-options.app
-$(INSTALL_DIR) $(DESTDIR)/Applications/fltk-options.app/Contents
$(INSTALL_DATA) fltk-options.app/Contents/Info.plist $(DESTDIR)/Applications/fltk-options.app/Contents/Info.plist
-$(INSTALL_DIR) $(DESTDIR)/Applications/fltk-options.app/Contents/MacOS
$(RM) $(DESTDIR)/Applications/fltk-options.app/Contents/MacOS/fltk-options
$(LN) $(bindir)/fltk-options $(DESTDIR)/Applications/fltk-options.app/Contents/MacOS/fltk-options
-$(INSTALL_DIR) $(DESTDIR)/Applications/fltk-options.app/Contents/Resources
$(INSTALL_DATA) fltk-options.app/Contents/Resources/fltk-options.icns $(DESTDIR)/Applications/fltk-options.app/Contents/Resources
uninstall:
$(RM) $(DESTDIR)$(bindir)/fltk-options$(EXEEXT)
uninstall-linux:
$(RM) $(DESTDIR)/usr/share/applications/fltk-options.desktop
$(RM) $(DESTDIR)/usr/share/icons/hicolor/*/fltk-options.png
$(RM) $(DESTDIR)/usr/share/mimelnk/application/x-fltk-options.desktop
uninstall-osx:
$(RM) -r $(DESTDIR)/Applications/fltk-options.app
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=fltk-options
Comment=FLTK Options Editor
TryExec=fltk-options
Exec=fltk-options %F
Icon=fltk-options
Terminal=false
Type=Application
MimeType=application/x-fltk-options;
Categories=Development;Settings;
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>fltk-options</string>
<key>CFBundleIdentifier</key>
<string>org.fltk.fltk-options</string>
<key>CFBundleVersion</key>
<string>1.4.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2023 by Bill Spitzak and others</string>
<key>CFAppleHelpAnchor</key>
<string>help</string>
<key>CFBundleName</key>
<string>fltk-options</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>FLOP</string>
<key>CFBundleIconFile</key>
<string>fltk-options.icns</string>
<key>CFBundleShortVersionString</key>
<string>1.4.0</string>
<key>CFBundleGetInfoString</key>
<string>1.4.0, Copyright 2023 by Bill Spitzak and others</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-fltk-options">
<comment>FLTK Options Editor</comment>
</mime-type>
</mime-info>
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+70
View File
@@ -0,0 +1,70 @@
/* XPM */
static char *_bae769a99384303e21a66e415de0b1aBvKpx6NXTDEGsJa6[] = {
/* columns rows colors chars-per-pixel */
"32 32 32 1 ",
" c #1A1C1C",
". c #2D3746",
"X c #393B38",
"o c #334E74",
"O c #595C5C",
"+ c #6A6135",
"@ c #4D6D9E",
"# c #6A7891",
"$ c #777976",
"% c #5885C6",
"& c #7F817F",
"* c #948539",
"= c #598ED7",
"- c #6D8BBB",
"; c #888A87",
": c #5D97E7",
"> c #90928F",
", c #999C99",
"< c #60A6FF",
"1 c #9EA19E",
"2 c #AAA27A",
"3 c #BAA63E",
"4 c #C4B367",
"5 c #D9C351",
"6 c #C9CBC6",
"7 c #F7E14C",
"8 c black",
"9 c black",
"0 c black",
"q c black",
"w c black",
"e c black",
/* pixels */
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$::#$$$-:#$$$$$$$$$$$$$",
"$$$$$$$$$#<<=$$-<<-$$$$$$$$$$$$$",
"$$$$$#$$$#<<:$$:<<-$$$$$$$$$$$$$",
"&&&&-<:-&&:<<-#:<<#&&--#&&&&&&&&",
"&&&&-<<<##:<<<<<<:&&=<<=&&&&&&&&",
"&&&&$:<<<<<<<<<<<<:=<<<#&&&&&&&&",
"&&&&&#:<<<<<<<<<<<<<<<%$&&&&&&&&",
"&&&&&&%<<<<<<:<<<<<<<%$&&&&&&&&&",
"&-:<:-<<<<<%#O@:<<<<<=&##&&&&&&&",
";=<<<<<<<<:#;;;$@<<<<<:<<<-;;;;;",
";$=<<<<<<<#;;;;;&%<<<<<1<<-;;;;;",
";;$O@<<<<=;;;;;;;#:<:577-@&;;;;;",
";;;;;<<<<-;;;;245776<5772;;;;;;;",
";;--:<<<<-;257777774<4774;;;;;;;",
";-<<<<<<<:;&77777774<6775>;;;;;;",
";<<<<<<<<<-;57752-:<<:7776>>>>>>",
">#%%@@<<<<<:4774::1<<:7776,>>>>>",
">>;;>;:<<<<<6777777<<#5774;>>>>>",
">>>>>=<<<<<<:7777776<-4775>>>>2>",
">>>>-<<<:<<<<5777751<<,77745775>",
">>>><<<%$%<<<4774%@:<<=77777777>",
">>>>:=@;>-<<:2774->#:<<57777775>",
",,,,&&,,,:<<-2777-,,$@@47753*O$>",
",,,,,,,,,:<:>>7771,,,,>&+O$;>,,,",
",,,,,,,,,:<-,,5772,,,,,,,,,,,,,,",
",,,,,,,,,&#>,,2*O&,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,>,,,,,,,,,,,,,,,,,",
"11111111111111111111111111111111",
"11111111111111111111111111111111"
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+134
View File
@@ -0,0 +1,134 @@
/* XPM */
static char *_e101498a8b740e7b97aa74122d70714MqWFs5PhLjx31lZ1[] = {
/* columns rows colors chars-per-pixel */
"96 96 32 1 ",
" c #1A1C1C",
". c #2D3746",
"X c #393B38",
"o c #334E74",
"O c #595C5C",
"+ c #6A6135",
"@ c #4D6D9E",
"# c #6A7891",
"$ c #777976",
"% c #5885C6",
"& c #7F817F",
"* c #948539",
"= c #598ED7",
"- c #6D8BBB",
"; c #888A87",
": c #5D97E7",
"> c #90928F",
", c #999C99",
"< c #60A6FF",
"1 c #9EA19E",
"2 c #AAA27A",
"3 c #BAA63E",
"4 c #C4B367",
"5 c #D9C351",
"6 c #C9CBC6",
"7 c #F7E14C",
"8 c black",
"9 c black",
"0 c black",
"q c black",
"w c black",
"e c black",
/* pixels */
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#-#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#:<<:#$$$$$$$$$$$$$$-:-#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%<<<<:#$$$$$$$$$$$$-<<<<-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$:<<<<<=$$$$$$$$$$$-<<<<<=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#<<<<<<<-$$$$$$$$$#<<<<<<:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#<<<<<<<:$$$$$$$$$:<<<<<<<#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$-<<<<<<<<-$$$$$$$-<<<<<<<<#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$-<<<<<<<<%$$$$$$$:<<<<<<<<#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@<<<<<<<<=$$$$$$$<<<<<<<<<#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$%%-$$$$$$$$$$$#<<<<<<<<=$$$$$$#<<<<<<<<:#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"&&&&&&&&&&&&&$=<<<:-#$&&&&&&&O=<<<<<<<:$&&&&&#<<<<<<<<=$&&&&&&&&&&&&$&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&$%<<<<<<<-&&&&&&&$@<<<<<<<<-$&&&&%<<<<<<<<o$&&&&&&&&&#-%:#&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&$@<<<<<<<<=&&&&&&&.<<<<<<<<<=%%-=<<<<<<<<:X&&&&&&&&#=<<<<<#&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&o<<<<<<<<<-&&&&&&O<<<<<<<<<<<<<<<<<<<<<<@$&&&&&&#=<<<<<<<:$&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&O:<<<<<<<<<#&&&&&%<<<<<<<<<<<<<<<<<<<<<<@&&&&&&#:<<<<<<<<:O&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&$%<<<<<<<<<:#&&-:<<<<<<<<<<<<<<<<<<<<<<<:#&&&&$=<<<<<<<<<%$&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&$o<<<<<<<<<<:%:<<<<<<<<<<<<<<<<<<<<<<<<<<<-&&&%<<<<<<<<<<o&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&O=<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<:-=<<<<<<<<<<=O&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&$.:<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<o$&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&&Oo:<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<%O&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&&&X.=<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<:.$&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&&&&O =<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<%.O&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&&&&&Oo<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<:o O&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&&&&&&-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<oX$&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&&&&&&&&&&&&&&&#:<<<<<<<<<<<<<<<<<<<:=@:<<<<<<<<<<<<<<<<<<<<:O&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&#-%=:::=-#&&&&%<<<<<<<<<<<<<<<<:%@o %<<<<<<<<<<<<<<<<<<<<<#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&&:<<<<<<<<<%#&-<<<<<<<<<<<<<<<<o XOO$.@%:<<<<<<<<<<<<<<<<<<=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
"&&&#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<@O$$&;&&O @=<<<<<<<<<<<<<<<<<#&&&&-%==%-#&&&&&&&&&&&&&&&&&&&",
";;;-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<=#;;;;;;;;&$OX @<<<<<<<<<<<<<<<<:-#-:<<<<<<<:%&;;;;;;;;;;;;;;;;",
";;;@<<<<<<<<<<<<<<<<<<<<<<<<<<<<%.O;;;;;;;;;;;&O o:<<<<<<<<<<<<<<<<<<<<<<<<<<<<#;;;;;;;;;;;;;;;;",
";;;X@<<<<<<<<<<<<<<<<<<<<<<<<<<% O;;;;;;;;;;;;;;$Xo<<<<<<<<<<<<<<<<<<<<<<<<<<<<%;;;;;;;;;;;;;;;;",
";;;$X@<<<<<<<<<<<<<<<<<<<<<<<<:.$;;;;;;;;;;;;;;;;&O@<<<<<<<<<<<<<<<<<<<<<<<<<<<=&;;;;;;;;;;;;;;;",
";;;;$X@:<<<<<<<<<<<<<<<<<<<<<<oO;;;;;;;;;;;;;;;;;;&X=<<<<<<<<<<<<<<<<<::<<<<<<<@&;;;;;;;;;;;;;;;",
";;;;;$X.%:<<<<<<<<<<<<<<<<<<<%O;;;;;;;;;;;;;;;;;;;;$o<<<<<<<<<<<<<:-6474<<<<<:oX&;;;;;;;;;;;;;;;",
";;;;;;&O .o@%:<<<<<<<<<<<<<<<o&;;;;;;;;;;;;;;;;;;;;;O=<<<<<<<<:125777777:<<<=oX&;;;;;;;;;;;;;;;;",
";;;;;;;;$OX =<<<<<<<<<<<<<:O;;;;;;;;;;;;;;;;;;;;;;&@<<<:<<<<,777777777-<:@ O&;;;;;;;;;;;;;;;;;",
";;;;;;;;;;;&$O@<<<<<<<<<<<<<=$;;;;;;;;;;;;;;;;;;;;;;;O1245:<<<%7777777772o X$;;;;;;;;;;;;;;;;;;;",
";;;;;;;;;;;;;;#<<<<<<<<<<<<<@;;;;;;;;;;;;;;;;;;;&223577777-<<<:5777777773XO&;;;;;;;;;;;;;;;;;;;;",
";;;;;;;;;;;;;;#<<<<<<<<<<<<<@;;;;;;;;;;;;;;;;24577777777771<<<<4777777775&;;;;;;;;;;;;;;;;;;;;;;",
";;;;;;;;;;;;;;-<<<<<<<<<<<<<-;;;;;;;;;;;;245777777777777774<<<<1777777777;;;;;;;;;;;;;;;;;;;;;;;",
";;;;;;;;;;;;;&:<<<<<<<<<<<<<-;;;;;;&22357777777777777777775:<<<-7777777772;;;;;;;;;;;;;;;;;;;;;;",
";;;;;;;;&--%%:<<<<<<<<<<<<<<%;;;;;&577777777777777777777777-<<<=7777777774;;;;;;;;;;;;;;;;;;;;;;",
";;;;;;&%<<<<<<<<<<<<<<<<<<<<:&;;;;;3777777777777777777777771<<<:5777777775&;;;;;;;;;;;;;;;;;;;;;",
";;;;;-<<<<<<<<<<<<<<<<<<<<<<<#;;;;;*777777777777777777777772<<<<2777777777;;;;;;;;;;;;;;;;;;;;;;",
";;;;%<<<<<<<<<<<<<<<<<<<<<<<<%;;;;;O777777777777777777777775<<<<#7777777772;;;;;;;;;;;;;;;;;;;;;",
";;;=<<<<<<<<<<<<<<<<<<<<<<<<<<#;;;;O5777777777777777777753+#<<<<=77777777726;;;;;;;;;;;;;;;;;;;;",
";;#<<<<<<<<<<<<<<<<<<<<<<<<<<<=;;;;$37777777777777753*$@%:<<<<<<:577777777566>;;;;;;;;;;;;;;;;;;",
">>O<<<<<<<<<<<<<<<<<<<<<<<<<<<<%;>>;*777777777753*O@=:<<<<<<<<<<<2777777775666;>>>>>>>>>>>>>>>>>",
">>$:<<<<<<<<<<<<<<<<<<<<<<<<<<<<%;>>+777777777* o:<<<<<<<<<<<<<<,7777777776666;>>>>>>>>>>>>>>>>",
">>;@=:<<<<<<<=@o%<<<<<<<<<<<<<<<<:&>O7777777773 @<<<<<<<<<<<<<<<<%7777777772666$>>>>>>>>>>>>>>>>",
">>>X .o@%=%@o X =<<<<<<<<<<<<<<<<<-#5777777775=<<<<<<:--<<<<<<<<:5777777774666$>>>>>>>>>>>>>>>>",
">>>;$O X$;>$o<<<<<<<<<<<<<<<<<<<2777777777=<<:-14574<<<<<<<:o377777777566>;>>>>>>>>>>>>>>>>",
">>>>>>;&$$$;>>>>>O%<<<<<<<<<<<<<<<<<<-7777777771257777775<<<<<<<oX*777777777>$O>>>>>>>>>>>>>>>>>",
">>>>>>>>>>>>>>>>>&@<<<<<<<<<<<<<<<<<<=7777777777777777777=<<<<<%O>+777777777*X$>>>>>>>>>>>>>>>>>",
">>>>>>>>>>>>>>>>>>%<<<<<<<<<<<<<<<<<<:57777777777777777771<<<<:.;>O7777777774;>>>>>>>>>>>>>>>>>>",
">>>>>>>>>>>>>>>>;%<<<<<<<<<<<<<<<<<<<<27777777777777777772<<<<:$>>$5777777775;>>>>>>>>>>>>>>>>>>",
">>>>>>>>>>>>>>>#:<<<<<<<<<<<<<<<<<<<<<,7777777777777777775<<<<<#>>;3777777777;>>>>>>>>>>>>>>>>>>",
">>>>>>>>>>>>>>-<<<<<<<<<<<<<<<<<<<<<<<%7777777777777777777:<<<<<->>+7777777772>>>>>>>>;;2454>>>>",
">>>>>>>>>>>>>&<<<<<<<<<<<<<<<<<<<<<<<<:5777777777777777777-<<<<<<->O7777777774>>>>;243577775;>>>",
">>>>>>>>>>>>>=<<<<<<<<<<<<<<<<<<<<<<<<<4777777777777777777,<<<<<<<-$5777777775>2457777777777>>>>",
">>>>>>>>>>>>#<<<<<<<<<<<%%<<<<<<<<<<<<<,777777777777753*O@=<<<<<<<<#3777777777777777777777772>>>",
">>>>>>>>>>>>%<<<<<<<<<<o o=<<<<<<<<<<<-77777777753+o@%%=<<<<<<<<<<=*777777777777777777777774>>>",
">>>>>>>>>>>&<<<<<<<<<<@O&&O @<<<<<<<<<<:7777777774:<<%. @<<<<<<<<<<O777777777777777777777775>>>",
">>>>>>>>>>>-<<<<<<<<<%X>>>>$X:<<<<<<<<<:3777777775<:o O$$X=<<<<<<<<<@577777777777777777777777;>>",
">>>>>>>>>>>-<<<<<<<:@X;>>>>>&:<<<<<<<<<<2777777777:%O&>>>&.:<<<<<<<<=3777777777777777777777772>>",
">>>>>>>>>>>O%<<<<:@.X&>>>>>>#<<<<<<<<<%@$777777777-%>>>>>>Oo:<<<<<<<:*777777777777777777777774>>",
",,,,,,,,,,,&.%=@o O;,,,,,,>=<<<<<<<<o X7777777771:>,,,,,>Xo=<<<<<<<$777777777777777777775*+O>,",
",,,,,,,,,,,,$ XO;,,,,,,,,#<<<<<<<<:O&;$5777777774<#,,,,,,>O o=<<<:o 77777777777777753*+ O>,",
",,,,,,,,,,,,,&$;>,,,,,,,,,,-<<<<<<<<=;,,;3777777777:=>,,,,,,>$X o@=oX$5777777777753*+ XO$;,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,%<<<<<<<<%>,,>*777777777-:;,,,,,,,,>$X O>;*7777753*+X XO$;>,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,%<<<<<<<<#,,,,O7777777771<;,,,,,,,,,,,>$>,>+753*+ XOO&>,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,%<<<<<<<:O,,,,$5777777774:;,,,,,,,,,,,,,,,,OX XO$;>,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,-<<<<<<<@&,,,,&3777777775=;,,,,,,,,,,,,,,,,$ XO$;,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,@<<<<<<=X,,,,,>*777777777#>,,,,,,,,,,,,,,,,>&>,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,#<<<<<:.;,,,,,,+777777777*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,$:<<<:.$,,,,,,,$777777753+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,;.@==.O,,,,,,,,&57753*$&$O,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,>O $,,,,,,,,,>++X $OX $,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,>&$,,,,,,,,,,,X X O$,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,$$;,,>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
};
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.
+1
View File
@@ -0,0 +1 @@
+23 -1
View File
@@ -48,6 +48,7 @@ $FLLIBNAME=@FLLIBNAME@
$GLDSONAME=@GLDSONAME@
$GLLIBNAME=@GLLIBNAME@
$FLUID=@FLUID@
$FLTK_OPTIONS=@FLTK_OPTIONS@
$JPEG=@JPEG@
$PNG=@PNG@
$ZLIB=@ZLIB@
@@ -114,6 +115,16 @@ f 0444 root sys /Applications/fluid.app/Contents/Resources/fluid.icns fluid/flui
%postinstall $bindir/fltk-config --post $bindir/fluid
%postremove /bin/rm -rf /Applications/fluid.app
d 0555 root sys /Applications/fltk-options.app -
d 0555 root sys /Applications/fltk-options.app/Contents -
f 0444 root sys /Applications/fltk-options.app/Contents/Info.plist fltk-options/fltk-options.app/Contents/Info.plist
d 0555 root sys /Applications/fltk-options.app/Contents/MacOS -
l 0555 root sys /Applications/fltk-options.app/Contents/MacOS/fltk-options $bindir/fltk-options
d 0555 root sys /Applications/fltk-options.app/Contents/Resources -
f 0444 root sys /Applications/fltk-options.app/Contents/Resources/fltk-options.icns fltk-options/fltk-options.app/Contents/Resources/fltk-options.icns
%postinstall $bindir/fltk-config --post $bindir/fltk-options
%postremove /bin/rm -rf /Applications/fltk-options.app
%system !darwin
f 0444 root sys /usr/share/applications/fluid.desktop fluid/fluid.desktop
f 0444 root sys /usr/share/icons/hicolor/16x16/apps/fluid.png fluid/icons/fluid-16.png
@@ -123,17 +134,28 @@ f 0444 root sys /usr/share/icons/hicolor/64x64/apps/fluid.png fluid/icons/fluid-
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/fluid.png fluid/icons/fluid-128.png
f 0444 root sys /usr/share/mimelnk/application/x-fluid.desktop fluid/fluid.desktop
f 0444 root sys /usr/share/applications/fltk-options.desktop fltk-options/fltk-options.desktop
f 0444 root sys /usr/share/icons/hicolor/16x16/apps/fltk-options.png fltk-options/icons/fltk-options-16.png
f 0444 root sys /usr/share/icons/hicolor/32x32/apps/fltk-options.png fltk-options/icons/fltk-options-32.png
f 0444 root sys /usr/share/icons/hicolor/48x48/apps/fltk-options.png fltk-options/icons/fltk-options-48.png
f 0444 root sys /usr/share/icons/hicolor/64x64/apps/fltk-options.png fltk-options/icons/fltk-options-64.png
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/fltk-options.png fltk-options/icons/fltk-options-128.png
f 0444 root sys /usr/share/mimelnk/application/x-fltk-options.desktop fltk-options/fltk-options.desktop
%system all
# FLUID
# Applications
f 0555 root sys $bindir/fluid fluid/$FLUID
f 0555 root sys $bindir/fltk-options fltk-options/$FLTK_OPTIONS
f 0555 root sys $bindir/fltk-config fltk-config
# Man pages
f 0444 root sys $mandir/cat1/fluid.$CAT1EXT documentation/src/fluid.$CAT1EXT
f 0444 root sys $mandir/cat1/fltk-options.$CAT1EXT documentation/src/fltk-options.$CAT1EXT
f 0444 root sys $mandir/cat1/fltk-config.$CAT1EXT documentation/src/fltk-config.$CAT1EXT
f 0444 root sys $mandir/cat3/fltk.$CAT3EXT documentation/src/fltk.$CAT3EXT
f 0444 root sys $mandir/man1/fluid.1 documentation/src/fluid.man
f 0444 root sys $mandir/man1/fltk-options.1 documentation/src/fltk-options.man
f 0444 root sys $mandir/man1/fltk-config.1 documentation/src/fltk-config.man
f 0444 root sys $mandir/man3/fltk.3 documentation/src/fltk.man
-5
View File
@@ -257,11 +257,6 @@ void show_settings_cb(Fl_Widget *, void *) {
settings_window->show();
}
void show_global_settings_cb(Fl_Widget *, void *) {
global_settings_window->hotspot(global_settings_window);
show_global_settings_window();
}
void header_input_cb(Fl_Input* i, void*) {
if (strcmp(g_project.header_file_name, i->value()))
set_modflag(1);
-1
View File
@@ -31,7 +31,6 @@ void toggle_overlays(Fl_Widget *,void *);
void show_project_cb(Fl_Widget *, void *);
void show_grid_cb(Fl_Widget *, void *);
void show_settings_cb(Fl_Widget *, void *);
void show_global_settings_cb(Fl_Widget *, void *);
class Fl_Window_Type : public Fl_Widget_Type {
protected:
-380
View File
@@ -610,383 +610,3 @@ Fl_Double_Window* make_layout_window() {
} // Fl_Double_Window* grid_window
return grid_window;
}
/**
Copy of all options in user and system mode
*/
static int opt[10][2];
/**
Update the UI using the values in the opt array
*/
static void refreshUI() {
int mode = wUserOrSystem->value();
wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]);
wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);
wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]);
wPrintGTKText->value(opt[Fl::OPTION_PRINTER_USES_GTK][mode]);
wShowZoomFactor->value(opt[Fl::OPTION_SHOW_SCALING][mode]);
wUseZenity->value(opt[Fl::OPTION_FNFC_USES_ZENITY][mode]);
}
/**
read all preferences and refresh the GUI
*/
static void readPrefs() {
// read all preferences and refresh the GUI
{
Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2);
opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][1], 2);
opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][1], 2);
opt_prefs.get("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY ][1], 2);
}
{
Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2);
opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][0], 2);
opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][0], 2);
opt_prefs.get("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY ][0], 2);
}
refreshUI();
}
/**
write all preferences using the array
*/
static void writePrefs() {
// write all preferences using the array
{
Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
if (opt[Fl::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1]);
if (opt[Fl::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]);
if (opt[Fl::OPTION_PRINTER_USES_GTK][1]==2) opt_prefs.deleteEntry("PrintUsesGTK");
else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][1]);
if (opt[Fl::OPTION_SHOW_SCALING][1]==2) opt_prefs.deleteEntry("ShowZoomFactor");
else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][1]);
if (opt[Fl::OPTION_FNFC_USES_ZENITY][1]==2) opt_prefs.deleteEntry("UseZenity");
else opt_prefs.set("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY][1]);
}
{
Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
if (opt[Fl::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0]);
if (opt[Fl::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]);
if (opt[Fl::OPTION_PRINTER_USES_GTK][0]==2) opt_prefs.deleteEntry("PrintUsesGTK");
else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][0]);
if (opt[Fl::OPTION_SHOW_SCALING][0]==2) opt_prefs.deleteEntry("ShowZoomFactor");
else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][0]);
if (opt[Fl::OPTION_FNFC_USES_ZENITY][0]==2) opt_prefs.deleteEntry("UseZenity");
else opt_prefs.set("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY][0]);
}
}
void show_global_settings_window() {
if (!global_settings_window)
make_global_settings_window();
readPrefs();
refreshUI();
fl_message(
"WARNING!\n\n"
"The following dialog changes the user interface behavior\n"
"of ALL FLTK applications, for the current user, or for \n"
"ALL users on this machine.\n\n"
"Please choose these settings carefully, or reset\n"
"user and system settings to \"default\".");
global_settings_window->show();
}
Fl_Double_Window *global_settings_window=(Fl_Double_Window *)0;
Fl_Choice *wVisibleFocus=(Fl_Choice *)0;
static void cb_wVisibleFocus(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_VISIBLE_FOCUS][mode] = wVisibleFocus->value();
}
Fl_Menu_Item menu_wVisibleFocus[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wArrowFocus=(Fl_Choice *)0;
static void cb_wArrowFocus(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();
}
Fl_Menu_Item menu_wArrowFocus[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wShowTooltips=(Fl_Choice *)0;
static void cb_wShowTooltips(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();
}
Fl_Menu_Item menu_wShowTooltips[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wDNDText=(Fl_Choice *)0;
static void cb_wDNDText(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_DND_TEXT][mode] = wDNDText->value();
}
Fl_Menu_Item menu_wDNDText[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wGTKText=(Fl_Choice *)0;
static void cb_wGTKText(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_FNFC_USES_GTK ][mode] = wGTKText->value();
}
Fl_Menu_Item menu_wGTKText[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wUseZenity=(Fl_Choice *)0;
static void cb_wUseZenity(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_FNFC_USES_ZENITY ][mode] = wUseZenity->value();
}
Fl_Menu_Item menu_wUseZenity[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wPrintGTKText=(Fl_Choice *)0;
static void cb_wPrintGTKText(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_PRINTER_USES_GTK ][mode] = wPrintGTKText->value();
}
Fl_Menu_Item menu_wPrintGTKText[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wShowZoomFactor=(Fl_Choice *)0;
static void cb_wShowZoomFactor(Fl_Choice*, void*) {
int mode = wUserOrSystem->value();
opt[Fl::OPTION_SHOW_SCALING ][mode] = wShowZoomFactor->value();
}
Fl_Menu_Item menu_wShowZoomFactor[] = {
{"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Choice *wUserOrSystem=(Fl_Choice *)0;
static void cb_wUserOrSystem(Fl_Choice*, void*) {
refreshUI();
}
Fl_Menu_Item menu_wUserOrSystem[] = {
{"User Settings", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"System Settings", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
static void cb_Cancel1(Fl_Button*, void*) {
global_settings_window->hide();
}
static void cb_OK(Fl_Button*, void*) {
writePrefs();
global_settings_window->hide();
}
Fl_Double_Window* make_global_settings_window() {
{ global_settings_window = new Fl_Double_Window(400, 572, "FLTK Preferences");
global_settings_window->color(FL_LIGHT1);
{ Fl_Group* o = new Fl_Group(10, 10, 380, 100, "Keyboard Focus Options");
o->box(FL_GTK_DOWN_BOX);
o->labelfont(2);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ wVisibleFocus = new Fl_Choice(245, 40, 100, 25, "Visible Keyboard Focus:");
wVisibleFocus->tooltip("OPTION_VISIBLE_FOCUS\n\nIf visible focus is switched on, FLTK will draw a dot\
ted rectangle inside the widget that will receive the next keystroke. If switc\
hed off, no such indicator will be drawn and keyboard navigation is disabled.\
\n\nDefault is on.");
wVisibleFocus->down_box(FL_BORDER_BOX);
wVisibleFocus->callback((Fl_Callback*)cb_wVisibleFocus);
wVisibleFocus->menu(menu_wVisibleFocus);
} // Fl_Choice* wVisibleFocus
{ wArrowFocus = new Fl_Choice(245, 75, 100, 25, "Arrow Keys move Focus:");
wArrowFocus->tooltip("OPTION_ARROW_FOCUS\n\nWhen switched on, moving the text cursor beyond the sta\
rt or end of the text in a text widget will change focus to the next widget. W\
hen switched off, the cursor will stop at the end of the text. Pressing Tab or\
Ctrl-Tab will advance the keyboard focus. Switch this on, if you want the old\
behavior of FLTK 1.1.\n\nDefault is off.");
wArrowFocus->down_box(FL_BORDER_BOX);
wArrowFocus->callback((Fl_Callback*)cb_wArrowFocus);
wArrowFocus->menu(menu_wArrowFocus);
} // Fl_Choice* wArrowFocus
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 120, 380, 65, "Tooltip Options");
o->box(FL_GTK_DOWN_BOX);
o->labelfont(2);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ wShowTooltips = new Fl_Choice(245, 150, 100, 25, "Show Tooltips:");
wShowTooltips->tooltip("OPTION_SHOW_TOOLTIPS\n\nIf tooltips are enabled, hovering the mouse over a wi\
dget with a tooltip text will open a little tooltip window until the mouse lea\
ves the widget. If disabled, no tooltip is shown.\n\nDefault is on.");
wShowTooltips->down_box(FL_BORDER_BOX);
wShowTooltips->callback((Fl_Callback*)cb_wShowTooltips);
wShowTooltips->menu(menu_wShowTooltips);
} // Fl_Choice* wShowTooltips
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 194, 380, 66, "Drag And Drop Options");
o->box(FL_GTK_DOWN_BOX);
o->labelfont(2);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ wDNDText = new Fl_Choice(245, 225, 100, 25, "Allow dragging Text:");
wDNDText->tooltip("OPTION_DND_TEXT\n\nIf text drag-and-drop is enabled, the user can select and \
drag text from any text widget. If disabled, no dragging is possible, however \
dropping text from other applications still works.\n\nDefault is on.");
wDNDText->down_box(FL_BORDER_BOX);
wDNDText->callback((Fl_Callback*)cb_wDNDText);
wDNDText->menu(menu_wDNDText);
} // Fl_Choice* wDNDText
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 269, 380, 104, "Native File Chooser Options");
o->box(FL_GTK_DOWN_BOX);
o->labelfont(2);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ wGTKText = new Fl_Choice(245, 300, 100, 25, "Native File Chooser uses GTK:");
wGTKText->tooltip("OPTION_FNFC_USES_GTK\n\nIf \'Native File Chooser uses GTK\' is enabled, the F\
l_Native_File_Chooser class\ncalls the GTK open/save file dialogs when they ar\
e available on the platfom. If disabled, the Fl_Native_File_Chooser class\nalw\
ays uses FLTK\'s own file dialog (i.e., Fl_File_Chooser) even if GTK is availa\
ble.\n\nDefault is on.");
wGTKText->down_box(FL_BORDER_BOX);
wGTKText->callback((Fl_Callback*)cb_wGTKText);
wGTKText->menu(menu_wGTKText);
} // Fl_Choice* wGTKText
{ wUseZenity = new Fl_Choice(245, 334, 100, 26, "Native File Chooser uses Zenity:");
wUseZenity->tooltip("OPTION_FNFC_USES_ZENITY\n\nIf \'Native File Chooser uses Zenity\' is enabled,\
the library uses a Zenity-based file dialog to open/save files when possible.\
If disabled, the GTK-based dialog is used. Default is on. Meaningful only wit\
h Wayland/X11 platforms.");
wUseZenity->down_box(FL_BORDER_BOX);
wUseZenity->callback((Fl_Callback*)cb_wUseZenity);
wUseZenity->menu(menu_wUseZenity);
} // Fl_Choice* wUseZenity
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 384, 380, 66, "Print dialog Options");
o->box(FL_GTK_DOWN_BOX);
o->labelfont(2);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ wPrintGTKText = new Fl_Choice(245, 405, 100, 25, "Print dialog uses GTK:");
wPrintGTKText->tooltip("OPTION_PRINTER_USES_GTK\n\nIf \'Print dialog uses GTK\' is enabled, the Fl_Pr\
inter class\ncalls the GTK print dialog when it\'s available on the platfom. I\
f disabled, the Fl_Printer class\nalways uses FLTK\'s own print dialog even if\
GTK is available.\n\nDefault is on.");
wPrintGTKText->down_box(FL_BORDER_BOX);
wPrintGTKText->callback((Fl_Callback*)cb_wPrintGTKText);
wPrintGTKText->menu(menu_wPrintGTKText);
} // Fl_Choice* wPrintGTKText
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 459, 380, 66, "Scaling Factor Options");
o->box(FL_GTK_DOWN_BOX);
o->labelfont(2);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ wShowZoomFactor = new Fl_Choice(245, 483, 100, 25, "Transiently show scaling factor:");
wShowZoomFactor->tooltip("OPTION_SHOW_SCALING\n\nIf \'Transiently show scaling factor\' is enabled, the\
library shows in a transient yellow window the display\nscaling factor value \
when it is changed. If disabled, no such transient window is used.\n\nDefault \
is on.");
wShowZoomFactor->down_box(FL_BORDER_BOX);
wShowZoomFactor->callback((Fl_Callback*)cb_wShowZoomFactor);
wShowZoomFactor->menu(menu_wShowZoomFactor);
} // Fl_Choice* wShowZoomFactor
o->end();
} // Fl_Group* o
{ wUserOrSystem = new Fl_Choice(10, 535, 141, 25);
wUserOrSystem->tooltip("Change settings for the current user, or default values for all users of this\
computer. Individual users can override system options, if they set their opt\
ions to specific values (not \'default\').");
wUserOrSystem->down_box(FL_BORDER_BOX);
wUserOrSystem->callback((Fl_Callback*)cb_wUserOrSystem);
wUserOrSystem->menu(menu_wUserOrSystem);
} // Fl_Choice* wUserOrSystem
{ Fl_Button* o = new Fl_Button(230, 535, 75, 25, "Cancel");
o->callback((Fl_Callback*)cb_Cancel1);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(315, 535, 75, 25, "OK");
o->callback((Fl_Callback*)cb_OK);
} // Fl_Button* o
global_settings_window->end();
} // Fl_Double_Window* global_settings_window
readPrefs();
Fl::option(Fl::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !
return global_settings_window;
}
+2 -390
View File
@@ -59,7 +59,7 @@ decl {extern struct Fl_Menu_Item *dbmanager_item;} {public local
Function {make_project_window()} {} {
Fl_Window project_window {
label {Project Settings} open
label {Project Settings}
xywh {472 246 399 298} type Double hide
code0 {\#include <FL/Fl_Preferences.H>}
code1 {\#include <FL/Fl_Tooltip.H>} modal
@@ -291,7 +291,7 @@ Examples:
Function {make_shell_window()} {open
} {
Fl_Window shell_window {
label {Shell Command} open
label {Shell Command}
xywh {544 751 365 200} type Double hide modal size_range {365 200 365 200}
} {
Fl_Group {} {open
@@ -488,391 +488,3 @@ Function {make_layout_window()} {open
}
}
}
decl {int opt[10][2];} {
comment {Copy of all options in user and system mode} private local
}
Function {refreshUI()} {
comment {Update the UI using the values in the opt array} private return_type void
} {
code {int mode = wUserOrSystem->value();
wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]);
wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);
wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]);
wPrintGTKText->value(opt[Fl::OPTION_PRINTER_USES_GTK][mode]);
wShowZoomFactor->value(opt[Fl::OPTION_SHOW_SCALING][mode]);
wUseZenity->value(opt[Fl::OPTION_FNFC_USES_ZENITY][mode]);} {}
}
Function {readPrefs()} {
comment {read all preferences and refresh the GUI} open private return_type void
} {
code {// read all preferences and refresh the GUI
{
Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2);
opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][1], 2);
opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][1], 2);
opt_prefs.get("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY ][1], 2);
}
{
Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2);
opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][0], 2);
opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][0], 2);
opt_prefs.get("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY ][0], 2);
}
refreshUI();} {}
}
Function {writePrefs()} {
comment {write all preferences using the array} open private return_type void
} {
code {// write all preferences using the array
{
Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
if (opt[Fl::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1]);
if (opt[Fl::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]);
if (opt[Fl::OPTION_PRINTER_USES_GTK][1]==2) opt_prefs.deleteEntry("PrintUsesGTK");
else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][1]);
if (opt[Fl::OPTION_SHOW_SCALING][1]==2) opt_prefs.deleteEntry("ShowZoomFactor");
else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][1]);
if (opt[Fl::OPTION_FNFC_USES_ZENITY][1]==2) opt_prefs.deleteEntry("UseZenity");
else opt_prefs.set("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY][1]);
}
{
Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
if (opt[Fl::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0]);
if (opt[Fl::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]);
if (opt[Fl::OPTION_PRINTER_USES_GTK][0]==2) opt_prefs.deleteEntry("PrintUsesGTK");
else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][0]);
if (opt[Fl::OPTION_SHOW_SCALING][0]==2) opt_prefs.deleteEntry("ShowZoomFactor");
else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][0]);
if (opt[Fl::OPTION_FNFC_USES_ZENITY][0]==2) opt_prefs.deleteEntry("UseZenity");
else opt_prefs.set("UseZenity", opt[Fl::OPTION_FNFC_USES_ZENITY][0]);
}} {}
}
Function {show_global_settings_window()} {open return_type void
} {
code {if (!global_settings_window)
make_global_settings_window();
readPrefs();
refreshUI();
fl_message(
"WARNING!\\n\\n"
"The following dialog changes the user interface behavior\\n"
"of ALL FLTK applications, for the current user, or for \\n"
"ALL users on this machine.\\n\\n"
"Please choose these settings carefully, or reset\\n"
"user and system settings to \\"default\\".");
global_settings_window->show();} {}
}
Function {make_global_settings_window()} {} {
Fl_Window global_settings_window {
label {FLTK Preferences} open
xywh {817 110 400 572} type Double color 50 hide
} {
Fl_Group {} {
label {Keyboard Focus Options} open
xywh {10 10 380 100} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wVisibleFocus {
label {Visible Keyboard Focus:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_VISIBLE_FOCUS][mode] = wVisibleFocus->value();} open
tooltip {OPTION_VISIBLE_FOCUS
If visible focus is switched on, FLTK will draw a dotted rectangle inside the widget that will receive the next keystroke. If switched off, no such indicator will be drawn and keyboard navigation is disabled.
Default is on.} xywh {245 40 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {10 10 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {10 10 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {10 10 31 20}
}
}
Fl_Choice wArrowFocus {
label {Arrow Keys move Focus:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();} open
tooltip {OPTION_ARROW_FOCUS
When switched on, moving the text cursor beyond the start or end of the text in a text widget will change focus to the next widget. When switched off, the cursor will stop at the end of the text. Pressing Tab or Ctrl-Tab will advance the keyboard focus. Switch this on, if you want the old behavior of FLTK 1.1.
Default is off.} xywh {245 75 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {0 0 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {0 0 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {0 0 31 20}
}
}
}
Fl_Group {} {
label {Tooltip Options} open
xywh {10 120 380 65} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wShowTooltips {
label {Show Tooltips:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();} open
tooltip {OPTION_SHOW_TOOLTIPS
If tooltips are enabled, hovering the mouse over a widget with a tooltip text will open a little tooltip window until the mouse leaves the widget. If disabled, no tooltip is shown.
Default is on.} xywh {245 150 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {10 10 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {10 10 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {10 10 31 20}
}
}
}
Fl_Group {} {
label {Drag And Drop Options} open
xywh {10 194 380 66} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wDNDText {
label {Allow dragging Text:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_DND_TEXT][mode] = wDNDText->value();} open
tooltip {OPTION_DND_TEXT
If text drag-and-drop is enabled, the user can select and drag text from any text widget. If disabled, no dragging is possible, however dropping text from other applications still works.
Default is on.} xywh {245 225 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
}
Fl_Group {} {
label {Native File Chooser Options} open
xywh {10 269 380 104} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wGTKText {
label {Native File Chooser uses GTK:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_FNFC_USES_GTK ][mode] = wGTKText->value();} open
tooltip {OPTION_FNFC_USES_GTK
If 'Native File Chooser uses GTK' is enabled, the Fl_Native_File_Chooser class
calls the GTK open/save file dialogs when they are available on the platfom. If disabled, the Fl_Native_File_Chooser class
always uses FLTK's own file dialog (i.e., Fl_File_Chooser) even if GTK is available.
Default is on.} xywh {245 300 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
Fl_Choice wUseZenity {
label {Native File Chooser uses Zenity:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_FNFC_USES_ZENITY ][mode] = wUseZenity->value();}
tooltip {OPTION_FNFC_USES_ZENITY
If 'Native File Chooser uses Zenity' is enabled, the library uses a Zenity-based file dialog to open/save files when possible. If disabled, the GTK-based dialog is used. Default is on. Meaningful only with Wayland/X11 platforms.} xywh {245 334 100 26} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {545 545 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {545 545 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {545 545 31 20}
}
}
}
Fl_Group {} {
label {Print dialog Options} open
xywh {10 384 380 66} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wPrintGTKText {
label {Print dialog uses GTK:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_PRINTER_USES_GTK ][mode] = wPrintGTKText->value();} open
tooltip {OPTION_PRINTER_USES_GTK
If 'Print dialog uses GTK' is enabled, the Fl_Printer class
calls the GTK print dialog when it's available on the platfom. If disabled, the Fl_Printer class
always uses FLTK's own print dialog even if GTK is available.
Default is on.} xywh {245 405 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
}
Fl_Group {} {
label {Scaling Factor Options} open
xywh {10 459 380 66} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wShowZoomFactor {
label {Transiently show scaling factor:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_SHOW_SCALING ][mode] = wShowZoomFactor->value();} open
tooltip {OPTION_SHOW_SCALING
If 'Transiently show scaling factor' is enabled, the library shows in a transient yellow window the display
scaling factor value when it is changed. If disabled, no such transient window is used.
Default is on.} xywh {245 483 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
}
Fl_Choice wUserOrSystem {
callback {refreshUI();} open
tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 535 141 25} down_box BORDER_BOX
} {
MenuItem {} {
label {User Settings}
user_data 0 user_data_type long
xywh {0 0 31 20}
}
MenuItem {} {
label {System Settings}
user_data 1 user_data_type long
xywh {0 0 31 20}
}
}
Fl_Button {} {
label Cancel
callback {global_settings_window->hide();}
xywh {230 535 75 25}
}
Fl_Button {} {
label OK
callback {writePrefs();
global_settings_window->hide();}
xywh {315 535 75 25}
}
}
code {readPrefs();
Fl::option(Fl::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !} {}
}
-21
View File
@@ -105,25 +105,4 @@ extern Fl_Check_Button *guides_toggle;
extern void default_widget_size_cb(Fl_Round_Button*, long);
extern Fl_Round_Button *def_widget_size[6];
Fl_Double_Window* make_layout_window();
void show_global_settings_window();
extern Fl_Double_Window *global_settings_window;
extern Fl_Choice *wVisibleFocus;
extern Fl_Choice *wArrowFocus;
extern Fl_Choice *wShowTooltips;
extern Fl_Choice *wDNDText;
extern Fl_Choice *wGTKText;
extern Fl_Choice *wUseZenity;
extern Fl_Choice *wPrintGTKText;
extern Fl_Choice *wShowZoomFactor;
extern Fl_Choice *wUserOrSystem;
Fl_Double_Window* make_global_settings_window();
extern Fl_Menu_Item menu_wVisibleFocus[];
extern Fl_Menu_Item menu_wArrowFocus[];
extern Fl_Menu_Item menu_wShowTooltips[];
extern Fl_Menu_Item menu_wDNDText[];
extern Fl_Menu_Item menu_wGTKText[];
extern Fl_Menu_Item menu_wUseZenity[];
extern Fl_Menu_Item menu_wPrintGTKText[];
extern Fl_Menu_Item menu_wShowZoomFactor[];
extern Fl_Menu_Item menu_wUserOrSystem[];
#endif
+1 -3
View File
@@ -1426,8 +1426,7 @@ Fl_Menu_Item Main_Menu[] = {
{"Show Widget &Bin...",FL_ALT+'b',toggle_widgetbin_cb},
{"Show Source Code...",FL_ALT+FL_SHIFT+'s', (Fl_Callback*)toggle_sourceview_cb, 0, FL_MENU_DIVIDER},
{"Pro&ject Settings...",FL_ALT+'p',show_project_cb},
{"GU&I Settings...",FL_ALT+FL_SHIFT+'p',show_settings_cb,0,FL_MENU_DIVIDER},
{"Global &FLTK Settings...",FL_ALT+FL_SHIFT+'g',show_global_settings_cb},
{"GU&I Settings...",FL_ALT+FL_SHIFT+'p',show_settings_cb},
{0},
{"&New", 0, 0, (void *)New_Menu, FL_SUBMENU_POINTER},
{"&Layout",0,0,0,FL_SUBMENU},
@@ -1650,7 +1649,6 @@ void make_main_window() {
if (!batch_mode) {
load_history();
make_settings_window();
make_global_settings_window();
}
}
+3
View File
@@ -129,6 +129,9 @@ FLUID = @FLUID@$(EXEEXT)
# depends on the build type (native or cross-compiler)
FLUID_BUILD = @FLUID_BUILD@
# Name of fltk-options executable we install
FLTK_OPTIONS = @FLTK_OPTIONS@$(EXEEXT)
# Possible steps for OS X build only
OSX_ONLY = @OSX_ONLY@
+23 -13
View File
@@ -1,7 +1,7 @@
//
// Main demo program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2022 by Bill Spitzak and others.
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -112,10 +112,11 @@ char params[256]; // commandline arguments
// Global path variables for all platforms and build systems
// to avoid duplication and dynamic allocation
char app_path [FL_PATH_MAX]; // directory of all demo binaries
char fluid_path [FL_PATH_MAX]; // binary directory of fluid
char data_path [FL_PATH_MAX]; // working directory of all demos
char command [2 * FL_PATH_MAX + 40]; // command to be executed
char app_path [FL_PATH_MAX]; // directory of all demo binaries
char fluid_path [FL_PATH_MAX]; // binary directory of fluid
char options_path [FL_PATH_MAX]; // binary directory of fltk-options
char data_path [FL_PATH_MAX]; // working directory of all demos
char command [2 * FL_PATH_MAX + 40]; // command to be executed
// platform specific suffix for executable files
@@ -387,6 +388,8 @@ void dobut(Fl_Widget *, long arg) {
const char *path = app_path;
if (!strncmp(cmdbuf, "fluid", 5))
path = fluid_path;
else if (!strncmp(cmdbuf, "fltk-options", 5))
path = options_path;
// format commandline with optional parameters
@@ -543,19 +546,25 @@ int main(int argc, char **argv) {
// - "../../$CMAKE_INTDIR" for multi-config (Visual Studio or Xcode) CMake builds
strcpy(fluid_path, app_path);
strcpy(options_path, app_path);
if (cmake_intdir)
if (cmake_intdir) {
fix_path(fluid_path); // remove intermediate (build type) folder, e.g. "/Debug"
fix_path(options_path);
}
fix_path(fluid_path); // remove folder name ("test")
fix_path(options_path);
#if !defined(GENERATED_BY_CMAKE)
strcat(fluid_path, "/fluid");
strcat(options_path, "/fltk-options");
#else
// CMake: potentially Visual Studio or Xcode (multi config)
if (cmake_intdir)
if (cmake_intdir) {
strcat(fluid_path, cmake_intdir); // append e.g. "/Debug"
strcat(options_path, cmake_intdir);
}
#endif // GENERATED_BY_CMAKE
// construct data_path for the menu file and all resources (data files)
@@ -607,11 +616,12 @@ int main(int argc, char **argv) {
fl_getcwd(cwd, sizeof(cwd));
fix_path(cwd, 0);
debug_var("app_path", app_path);
debug_var("fluid_path", fluid_path);
debug_var("data_path", data_path);
debug_var("menu file", menu);
debug_var("cwd", cwd);
debug_var("app_path", app_path);
debug_var("fluid_path", fluid_path);
debug_var("options_path", options_path);
debug_var("data_path", data_path);
debug_var("menu file", menu);
debug_var("cwd", cwd);
tty->printf("\n");
}
+3 -1
View File
@@ -58,7 +58,9 @@
@u:fast && slow widgets:fast_slow
@u:inactive:inactive
@main:Fluid\n(UI design tool):fluid valuators.fl
@main:Tools...:@t
@t:Fluid\n(UI design tool):fluid valuators.fl
@t:FLTK\nRuntime\nOptions:fltk-options
@main:Cool\nDemos...:@e
@e:Mandelbrot:mandelbrot