diff --git a/.gitignore b/.gitignore index 42965f17..0cf47694 100644 --- a/.gitignore +++ b/.gitignore @@ -7,16 +7,18 @@ *.rec build.7z build.zip +msvc2003/devilution/orig.asm +msvc2003/devilution/compare.asm # Executables build_en/*.exe build_jp/*.exe # MSVC trash -msvc/msvc2003/CSE2.ncb -msvc/msvc2003/CSE2.suo -msvc/msvc2003/Debug -msvc/msvc2003/Release -msvc/msvc2003/Debug (Japanese) -msvc/msvc2003/Release (Japanese) +msvc2003/CSE2.ncb +msvc2003/CSE2.suo +msvc2003/Debug +msvc2003/Release +msvc2003/Debug (Japanese) +msvc2003/Release (Japanese) *.aps diff --git a/README.md b/README.md index fa19c238..5ef950db 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Run 'make' in the base directory, preferably with some of the following settings ### Visual Studio .NET 2003 -Project files for Visual Studio .NET 2003 are available in the 'msvc/msvc2003' directory. +Project files for Visual Studio .NET 2003 are available in the 'msvc2003' directory. Visual Studio .NET 2003 was used by Pixel to create the original `Doukutsu.exe`, so these project files allow us to check the accuracy of the decompilation by comparing the generated assembly code to that of the original executable. diff --git a/msvc/SDL2/docs/README-android.md b/msvc/SDL2/docs/README-android.md deleted file mode 100644 index 7f3263dc..00000000 --- a/msvc/SDL2/docs/README-android.md +++ /dev/null @@ -1,417 +0,0 @@ -Android -================================================================================ - -Matt Styles wrote a tutorial on building SDL for Android with Visual Studio: -http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html - -The rest of this README covers the Android gradle style build process. - -If you are using the older ant build process, it is no longer officially -supported, but you can use the "android-project-ant" directory as a template. - - -================================================================================ - Requirements -================================================================================ - -Android SDK (version 26 or later) -https://developer.android.com/sdk/index.html - -Android NDK r15c or later -https://developer.android.com/tools/sdk/ndk/index.html - -Minimum API level supported by SDL: 14 (Android 4.0.1) - - -================================================================================ - How the port works -================================================================================ - -- Android applications are Java-based, optionally with parts written in C -- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to - the SDL library -- This means that your application C code must be placed inside an Android - Java project, along with some C support code that communicates with Java -- This eventually produces a standard Android .apk package - -The Android Java code implements an "Activity" and can be found in: -android-project/app/src/main/java/org/libsdl/app/SDLActivity.java - -The Java code loads your game code, the SDL shared library, and -dispatches to native functions implemented in the SDL library: -src/core/android/SDL_android.c - - -================================================================================ - Building an app -================================================================================ - -For simple projects you can use the script located at build-scripts/androidbuild.sh - -There's two ways of using it: - - androidbuild.sh com.yourcompany.yourapp < sources.list - androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c - -sources.list should be a text file with a source file name in each line -Filenames should be specified relative to the current directory, for example if -you are in the build-scripts directory and want to create the testgles.c test, you'll -run: - - ./androidbuild.sh org.libsdl.testgles ../test/testgles.c - -One limitation of this script is that all sources provided will be aggregated into -a single directory, thus all your source files should have a unique name. - -Once the project is complete the script will tell you where the debug APK is located. -If you want to create a signed release APK, you can use the project created by this -utility to generate it. - -Finally, a word of caution: re running androidbuild.sh wipes any changes you may have -done in the build directory for the app! - - -For more complex projects, follow these instructions: - -1. Copy the android-project directory wherever you want to keep your projects - and rename it to the name of your project. -2. Move or symlink this SDL directory into the "/app/jni" directory -3. Edit "/app/jni/src/Android.mk" to include your source files - -4a. If you want to use Android Studio, simply open your directory and start building. - -4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device - -Here's an explanation of the files in the Android project, so you can customize them: - - android-project/app - build.gradle - build info including the application version and SDK - src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application. - jni/ - directory holding native code - jni/Application.mk - Application JNI settings, including target platform and STL library - jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories - jni/SDL/ - (symlink to) directory holding the SDL library files - jni/SDL/Android.mk - Android makefile for creating the SDL shared library - jni/src/ - directory holding your C/C++ source - jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references - src/main/assets/ - directory holding asset files for your application - src/main/res/ - directory holding resources for your application - src/main/res/mipmap-* - directories holding icons for different phone hardware - src/main/res/values/strings.xml - strings used in your application, including the application name - src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application. - - -================================================================================ - Customizing your application name -================================================================================ - -To customize your application name, edit AndroidManifest.xml and replace -"org.libsdl.app" with an identifier for your product package. - -Then create a Java class extending SDLActivity and place it in a directory -under src matching your package, e.g. - - src/com/gamemaker/game/MyGame.java - -Here's an example of a minimal class file: - - --- MyGame.java -------------------------- - package com.gamemaker.game; - - import org.libsdl.app.SDLActivity; - - /** - * A sample wrapper class that just calls SDLActivity - */ - - public class MyGame extends SDLActivity { } - - ------------------------------------------ - -Then replace "SDLActivity" in AndroidManifest.xml with the name of your -class, .e.g. "MyGame" - - -================================================================================ - Customizing your application icon -================================================================================ - -Conceptually changing your icon is just replacing the "ic_launcher.png" files in -the drawable directories under the res directory. There are several directories -for different screen sizes. - - -================================================================================ - Loading assets -================================================================================ - -Any files you put in the "app/src/main/assets" directory of your project -directory will get bundled into the application package and you can load -them using the standard functions in SDL_rwops.h. - -There are also a few Android specific functions that allow you to get other -useful paths for saving and loading data: -* SDL_AndroidGetInternalStoragePath() -* SDL_AndroidGetExternalStorageState() -* SDL_AndroidGetExternalStoragePath() - -See SDL_system.h for more details on these functions. - -The asset packaging system will, by default, compress certain file extensions. -SDL includes two asset file access mechanisms, the preferred one is the so -called "File Descriptor" method, which is faster and doesn't involve the Dalvik -GC, but given this method does not work on compressed assets, there is also the -"Input Stream" method, which is automatically used as a fall back by SDL. You -may want to keep this fact in mind when building your APK, specially when large -files are involved. -For more information on which extensions get compressed by default and how to -disable this behaviour, see for example: - -http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ - - -================================================================================ - Pause / Resume behaviour -================================================================================ - -If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default), -the event loop will block itself when the app is paused (ie, when the user -returns to the main Android dashboard). Blocking is better in terms of battery -use, and it allows your app to spring back to life instantaneously after resume -(versus polling for a resume message). - -Upon resume, SDL will attempt to restore the GL context automatically. -In modern devices (Android 3.0 and up) this will most likely succeed and your -app can continue to operate as it was. - -However, there's a chance (on older hardware, or on systems under heavy load), -where the GL context can not be restored. In that case you have to listen for -a specific message, (which is not yet implemented!) and restore your textures -manually or quit the app (which is actually the kind of behaviour you'll see -under iOS, if the OS can not restore your GL context it will just kill your app) - - -================================================================================ - Threads and the Java VM -================================================================================ - -For a quick tour on how Linux native threads interoperate with the Java VM, take -a look here: https://developer.android.com/guide/practices/jni.html - -If you want to use threads in your SDL app, it's strongly recommended that you -do so by creating them using SDL functions. This way, the required attach/detach -handling is managed by SDL automagically. If you have threads created by other -means and they make calls to SDL functions, make sure that you call -Android_JNI_SetupThread() before doing anything else otherwise SDL will attach -your thread automatically anyway (when you make an SDL call), but it'll never -detach it. - - -================================================================================ - Using STL -================================================================================ - -You can use STL in your project by creating an Application.mk file in the jni -folder and adding the following line: - - APP_STL := c++_shared - -For more information go here: - https://developer.android.com/ndk/guides/cpp-support - - -================================================================================ - Using the emulator -================================================================================ - -There are some good tips and tricks for getting the most out of the -emulator here: https://developer.android.com/tools/devices/emulator.html - -Especially useful is the info on setting up OpenGL ES 2.0 emulation. - -Notice that this software emulator is incredibly slow and needs a lot of disk space. -Using a real device works better. - - -================================================================================ - Troubleshooting -================================================================================ - -You can see if adb can see any devices with the following command: - - adb devices - -You can see the output of log messages on the default device with: - - adb logcat - -You can push files to the device with: - - adb push local_file remote_path_and_file - -You can push files to the SD Card at /sdcard, for example: - - adb push moose.dat /sdcard/moose.dat - -You can see the files on the SD card with a shell command: - - adb shell ls /sdcard/ - -You can start a command shell on the default device with: - - adb shell - -You can remove the library files of your project (and not the SDL lib files) with: - - ndk-build clean - -You can do a build with the following command: - - ndk-build - -You can see the complete command line that ndk-build is using by passing V=1 on the command line: - - ndk-build V=1 - -If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace: - https://developer.android.com/ndk/guides/ndk-stack - -If you want to go through the process manually, you can use addr2line to convert the -addresses in the stack trace to lines in your code. - -For example, if your crash looks like this: - - I/DEBUG ( 31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0 - I/DEBUG ( 31): r0 00000000 r1 00001000 r2 00000003 r3 400085d4 - I/DEBUG ( 31): r4 400085d0 r5 40008000 r6 afd41504 r7 436c6a7c - I/DEBUG ( 31): r8 436c6b30 r9 435c6fb0 10 435c6f9c fp 4168d82c - I/DEBUG ( 31): ip 8346aff0 sp 436c6a60 lr afd1c8ff pc afd1c902 cpsr 60000030 - I/DEBUG ( 31): #00 pc 0001c902 /system/lib/libc.so - I/DEBUG ( 31): #01 pc 0001ccf6 /system/lib/libc.so - I/DEBUG ( 31): #02 pc 000014bc /data/data/org.libsdl.app/lib/libmain.so - I/DEBUG ( 31): #03 pc 00001506 /data/data/org.libsdl.app/lib/libmain.so - -You can see that there's a crash in the C library being called from the main code. -I run addr2line with the debug version of my code: - - arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so - -and then paste in the number after "pc" in the call stack, from the line that I care about: -000014bc - -I get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23. - -You can add logging to your code to help show what's happening: - - #include - - __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x); - -If you need to build without optimization turned on, you can create a file called -"Application.mk" in the jni directory, with the following line in it: - - APP_OPTIM := debug - - -================================================================================ - Memory debugging -================================================================================ - -The best (and slowest) way to debug memory issues on Android is valgrind. -Valgrind has support for Android out of the box, just grab code using: - - svn co svn://svn.valgrind.org/valgrind/trunk valgrind - -... and follow the instructions in the file README.android to build it. - -One thing I needed to do on Mac OS X was change the path to the toolchain, -and add ranlib to the environment variables: -export RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib - -Once valgrind is built, you can create a wrapper script to launch your -application with it, changing org.libsdl.app to your package identifier: - - --- start_valgrind_app ------------------- - #!/system/bin/sh - export TMPDIR=/data/data/org.libsdl.app - exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $* - ------------------------------------------ - -Then push it to the device: - - adb push start_valgrind_app /data/local - -and make it executable: - - adb shell chmod 755 /data/local/start_valgrind_app - -and tell Android to use the script to launch your application: - - adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app" - -If the setprop command says "could not set property", it's likely that -your package name is too long and you should make it shorter by changing -AndroidManifest.xml and the path to your class file in android-project/src - -You can then launch your application normally and waaaaaaaiiittt for it. -You can monitor the startup process with the logcat command above, and -when it's done (or even while it's running) you can grab the valgrind -output file: - - adb pull /sdcard/valgrind.log - -When you're done instrumenting with valgrind, you can disable the wrapper: - - adb shell setprop wrap.org.libsdl.app "" - - -================================================================================ - Graphics debugging -================================================================================ - -If you are developing on a compatible Tegra-based tablet, NVidia provides -Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL -and GLES libraries, you must follow their instructions for installing the -interposer library on a rooted device. The non-rooted instructions are not -compatible with applications that use SDL2 for video. - -The Tegra Graphics Debugger is available from NVidia here: -https://developer.nvidia.com/tegra-graphics-debugger - - -================================================================================ - Why is API level 14 the minimum required? -================================================================================ - -The latest NDK toolchain doesn't support targeting earlier than API level 14. -As of this writing, according to https://developer.android.com/about/dashboards/index.html -about 99% of the Android devices accessing Google Play support API level 14 or -higher (October 2017). - - -================================================================================ - A note regarding the use of the "dirty rectangles" rendering technique -================================================================================ - -If your app uses a variation of the "dirty rectangles" rendering technique, -where you only update a portion of the screen on each frame, you may notice a -variety of visual glitches on Android, that are not present on other platforms. -This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2 -contexts, in particular the use of the eglSwapBuffers function. As stated in the -documentation for the function "The contents of ancillary buffers are always -undefined after calling eglSwapBuffers". -Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED -is not possible for SDL as it requires EGL 1.4, available only on the API level -17+, so the only workaround available on this platform is to redraw the entire -screen each frame. - -Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html - - -================================================================================ - Known issues -================================================================================ - -- The number of buttons reported for each joystick is hardcoded to be 36, which -is the current maximum number of buttons Android can report. - diff --git a/msvc/SDL2/docs/README-cmake.md b/msvc/SDL2/docs/README-cmake.md deleted file mode 100644 index db318602..00000000 --- a/msvc/SDL2/docs/README-cmake.md +++ /dev/null @@ -1,32 +0,0 @@ -CMake -================================================================================ -(www.cmake.org) - -SDL's build system was traditionally based on autotools. Over time, this -approach has suffered from several issues across the different supported -platforms. -To solve these problems, a new build system based on CMake is under development. -It works in parallel to the legacy system, so users can experiment with it -without complication. -While still experimental, the build system should be usable on the following -platforms: - -* FreeBSD -* Linux -* VS.NET 2010 -* MinGW and Msys -* OS X with support for XCode - - -================================================================================ -Usage -================================================================================ - -Assuming the source for SDL is located at ~/sdl - - cd ~ - mkdir build - cd build - cmake ../sdl - -This will build the static and dynamic versions of SDL in the ~/build directory. diff --git a/msvc/SDL2/docs/README-directfb.md b/msvc/SDL2/docs/README-directfb.md deleted file mode 100644 index 67b64fb6..00000000 --- a/msvc/SDL2/docs/README-directfb.md +++ /dev/null @@ -1,107 +0,0 @@ -DirectFB -======== - -Supports: - -- Hardware YUV overlays -- OpenGL - software only -- 2D/3D accelerations (depends on directfb driver) -- multiple displays -- windows - -What you need: - -* DirectFB 1.0.1, 1.2.x, 1.3.0 -* Kernel-Framebuffer support: required: vesafb, radeonfb .... -* Mesa 7.0.x - optional for OpenGL - -/etc/directfbrc - -This file should contain the following lines to make -your joystick work and avoid crashes: ------------------------- -disable-module=joystick -disable-module=cle266 -disable-module=cyber5k -no-linux-input-grab ------------------------- - -To disable to use x11 backend when DISPLAY variable is found use - -export SDL_DIRECTFB_X11_CHECK=0 - -To disable the use of linux input devices, i.e. multimice/multikeyboard support, -use - -export SDL_DIRECTFB_LINUX_INPUT=0 - -To use hardware accelerated YUV-overlays for YUV-textures, use: - -export SDL_DIRECTFB_YUV_DIRECT=1 - -This is disabled by default. It will only support one -YUV texture, namely the first. Every other YUV texture will be -rendered in software. - -In addition, you may use (directfb-1.2.x) - -export SDL_DIRECTFB_YUV_UNDERLAY=1 - -to make the YUV texture an underlay. This will make the cursor to -be shown. - -Simple Window Manager -===================== - -The driver has support for a very, very basic window manager you may -want to use when running with "wm=default". Use - -export SDL_DIRECTFB_WM=1 - -to enable basic window borders. In order to have the window title rendered, -you need to have the following font installed: - -/usr/share/fonts/truetype/freefont/FreeSans.ttf - -OpenGL Support -============== - -The following instructions will give you *software* OpenGL. However this -works at least on all directfb supported platforms. - -As of this writing 20100802 you need to pull Mesa from git and do the following: - ------------------------- -git clone git://anongit.freedesktop.org/git/mesa/mesa -cd mesa -git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a ------------------------- - -Edit configs/linux-directfb so that the Directories-section looks like ------------------------- -# Directories -SRC_DIRS = mesa glu -GLU_DIRS = sgi -DRIVER_DIRS = directfb -PROGRAM_DIRS = ------------------------- - -make linux-directfb -make - -echo Installing - please enter sudo pw. - -sudo make install INSTALL_DIR=/usr/local/dfb_GL -cd src/mesa/drivers/directfb -make -sudo make install INSTALL_DIR=/usr/local/dfb_GL ------------------------- - -To run the SDL - testprograms: - -export SDL_VIDEODRIVER=directfb -export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib -export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7 - -./testgl - diff --git a/msvc/SDL2/docs/README-dynapi.md b/msvc/SDL2/docs/README-dynapi.md deleted file mode 100644 index b9a58bce..00000000 --- a/msvc/SDL2/docs/README-dynapi.md +++ /dev/null @@ -1,130 +0,0 @@ -Dynamic API -================================================================================ -Originally posted by Ryan at: - https://plus.google.com/103391075724026391227/posts/TB8UfnDYu4U - -Background: - -- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2, - but developers are shipping their own SDL2 with individual Steam games. - These games might stop getting updates, but a newer SDL2 might be needed later. - Certainly we'll always be fixing bugs in SDL, even if a new video target isn't - ever needed, and these fixes won't make it to a game shipping its own SDL. -- Even if we replace the SDL2 in those games with a compatible one, that is to - say, edit a developer's Steam depot (yuck!), there are developers that are - statically linking SDL2 that we can't do this for. We can't even force the - dynamic loader to ignore their SDL2 in this case, of course. -- If you don't ship an SDL2 with the game in some form, people that disabled the - Steam Runtime, or just tried to run the game from the command line instead of - Steam might find themselves unable to run the game, due to a missing dependency. -- If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target - generic Linux boxes that may or may not have SDL2 installed, you have to ship - the library or risk a total failure to launch. So now, you might have to have - a non-Steam build plus a Steam build (that is, one with and one without SDL2 - included), which is inconvenient if you could have had one universal build - that works everywhere. -- We like the zlib license, but the biggest complaint from the open source - community about the license change is the static linking. The LGPL forced this - as a legal, not technical issue, but zlib doesn't care. Even those that aren't - concerned about the GNU freedoms found themselves solving the same problems: - swapping in a newer SDL to an older game often times can save the day. - Static linking stops this dead. - -So here's what we did: - -SDL now has, internally, a table of function pointers. So, this is what SDL_Init -now looks like: - - UInt32 SDL_Init(Uint32 flags) - { - return jump_table.SDL_Init(flags); - } - -Except that is all done with a bunch of macro magic so we don't have to maintain -every one of these. - -What is jump_table.SDL_init()? Eventually, that's a function pointer of the real -SDL_Init() that you've been calling all this time. But at startup, it looks more -like this: - - Uint32 SDL_Init_DEFAULT(Uint32 flags) - { - SDL_InitDynamicAPI(); - return jump_table.SDL_Init(flags); - } - -SDL_InitDynamicAPI() fills in jump_table with all the actual SDL function -pointers, which means that this _DEFAULT function never gets called again. -First call to any SDL function sets the whole thing up. - -So you might be asking, what was the value in that? Isn't this what the operating -system's dynamic loader was supposed to do for us? Yes, but now we've got this -level of indirection, we can do things like this: - - export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0 - ./MyGameThatIsStaticallyLinkedToSDL2 - -And now, this game that is statically linked to SDL, can still be overridden -with a newer, or better, SDL. The statically linked one will only be used as -far as calling into the jump table in this case. But in cases where no override -is desired, the statically linked version will provide its own jump table, -and everyone is happy. - -So now: -- Developers can statically link SDL, and users can still replace it. - (We'd still rather you ship a shared library, though!) -- Developers can ship an SDL with their game, Valve can override it for, say, - new features on SteamOS, or distros can override it for their own needs, - but it'll also just work in the default case. -- Developers can ship the same package to everyone (Humble Bundle, GOG, etc), - and it'll do the right thing. -- End users (and Valve) can update a game's SDL in almost any case, - to keep abandoned games running on newer platforms. -- Everyone develops with SDL exactly as they have been doing all along. - Same headers, same ABI. Just get the latest version to enable this magic. - - -A little more about SDL_InitDynamicAPI(): - -Internally, InitAPI does some locking to make sure everything waits until a -single thread initializes everything (although even SDL_CreateThread() goes -through here before spinning a thread, too), and then decides if it should use -an external SDL library. If not, it sets up the jump table using the current -SDL's function pointers (which might be statically linked into a program, or in -a shared library of its own). If so, it loads that library and looks for and -calls a single function: - - SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize); - -That function takes a version number (more on that in a moment), the address of -the jump table, and the size, in bytes, of the table. -Now, we've got policy here: this table's layout never changes; new stuff gets -added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all -the needed functions if tablesize <= sizeof its own jump table. If tablesize is -bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but -if it's smaller, we know we can provide the entire API that the caller needs. - -The version variable is a failsafe switch. -Right now it's always 1. This number changes when there are major API changes -(so we know if the tablesize might be smaller, or entries in it have changed). -Right now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not -inconceivable to have a small dispatch library that only supplies this one -function and loads different, otherwise-incompatible SDL libraries and has the -right one initialize the jump table based on the version. For something that -must generically catch lots of different versions of SDL over time, like the -Steam Client, this isn't a bad option. - -Finally, I'm sure some people are reading this and thinking, -"I don't want that overhead in my project!" -To which I would point out that the extra function call through the jump table -probably wouldn't even show up in a profile, but lucky you: this can all be -disabled. You can build SDL without this if you absolutely must, but we would -encourage you not to do that. However, on heavily locked down platforms like -iOS, or maybe when debugging, it makes sense to disable it. The way this is -designed in SDL, you just have to change one #define, and the entire system -vaporizes out, and SDL functions exactly like it always did. Most of it is -macro magic, so the system is contained to one C file and a few headers. -However, this is on by default and you have to edit a header file to turn it -off. Our hopes is that if we make it easy to disable, but not too easy, -everyone will ultimately be able to get what they want, but we've gently -nudged everyone towards what we think is the best solution. diff --git a/msvc/SDL2/docs/README-emscripten.md b/msvc/SDL2/docs/README-emscripten.md deleted file mode 100644 index 97120848..00000000 --- a/msvc/SDL2/docs/README-emscripten.md +++ /dev/null @@ -1,35 +0,0 @@ -Emscripten -================================================================================ - -Build: - - $ mkdir build - $ cd build - $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2" - $ emmake make - -Or with cmake: - - $ mkdir build - $ cd build - $ emcmake cmake .. - $ emmake make - -To build one of the tests: - - $ cd test/ - $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html - -Uses GLES2 renderer or software - -Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere): - -SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/): - - $ EMCONFIGURE_JS=1 emconfigure ../configure - build as usual... - -SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx): - - $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx - build as usual... diff --git a/msvc/SDL2/docs/README-gesture.md b/msvc/SDL2/docs/README-gesture.md deleted file mode 100644 index 451afaef..00000000 --- a/msvc/SDL2/docs/README-gesture.md +++ /dev/null @@ -1,71 +0,0 @@ -Dollar Gestures -=========================================================================== -SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. - -Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. - -Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. - -Recording: ----------- -To begin recording on a touch device call: -SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices. - -Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event. -A SDL_DOLLARRECORD event is a dgesture with the following fields: - -* event.dgesture.touchId - the Id of the touch used to record the gesture. -* event.dgesture.gestureId - the unique id of the recorded gesture. - - -Performing: ------------ -As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields: - -* event.dgesture.touchId - the Id of the touch which performed the gesture. -* event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke. -* event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match. -* event.dgesture.numFingers - the number of fingers used to draw the stroke. - -Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed). - - - -Saving: -------- -To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored. - -To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored. - -Both functions return the number of gestures successfully saved. - - -Loading: --------- -To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. - -SDL_LoadDollarTemplates returns the number of templates successfully loaded. - - - -=========================================================================== -Multi Gestures -=========================================================================== -SDL provides simple support for pinch/rotate/swipe gestures. -Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: - -* event.mgesture.touchId - the Id of the touch on which the gesture was performed. -* event.mgesture.x - the normalized x coordinate of the gesture. (0..1) -* event.mgesture.y - the normalized y coordinate of the gesture. (0..1) -* event.mgesture.dTheta - the amount that the fingers rotated during this motion. -* event.mgesture.dDist - the amount that the fingers pinched during this motion. -* event.mgesture.numFingers - the number of fingers used in the gesture. - - -=========================================================================== -Notes -=========================================================================== -For a complete example see test/testgesture.c - -Please direct questions/comments to: - jim.tla+sdl_touch@gmail.com diff --git a/msvc/SDL2/docs/README-hg.md b/msvc/SDL2/docs/README-hg.md deleted file mode 100644 index 2449d555..00000000 --- a/msvc/SDL2/docs/README-hg.md +++ /dev/null @@ -1,22 +0,0 @@ -Mercurial -========= - -The latest development version of SDL is available via Mercurial. -Mercurial allows you to get up-to-the-minute fixes and enhancements; -as a developer works on a source tree, you can use "hg" to mirror that -source tree instead of waiting for an official release. Please look -at the Mercurial website ( https://www.mercurial-scm.org/ ) for more -information on using hg, where you can also download software for -Mac OS X, Windows, and Unix systems. - - hg clone http://hg.libsdl.org/SDL - -If you are building SDL via configure, you will need to run autogen.sh -before running configure. - -There is a web interface to the subversion repository at: - http://hg.libsdl.org/SDL/ - -There is an RSS feed available at that URL, for those that want to -track commits in real time. - diff --git a/msvc/SDL2/docs/README-ios.md b/msvc/SDL2/docs/README-ios.md deleted file mode 100644 index 7627a397..00000000 --- a/msvc/SDL2/docs/README-ios.md +++ /dev/null @@ -1,284 +0,0 @@ -iOS -====== - -============================================================================== -Building the Simple DirectMedia Layer for iOS 5.1+ -============================================================================== - -Requirements: Mac OS X 10.8 or later and the iOS 7+ SDK. - -Instructions: - -1. Open SDL.xcodeproj (located in Xcode-iOS/SDL) in Xcode. -2. Select your desired target, and hit build. - -There are three build targets: -- libSDL.a: - Build SDL as a statically linked library -- testsdl: - Build a test program (there are known test failures which are fine) -- Template: - Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen. - - -============================================================================== -Build SDL for iOS from the command line -============================================================================== - -1. cd (PATH WHERE THE SDL CODE IS)/build-scripts -2. ./iosbuild.sh - -If everything goes fine, you should see a build/ios directory, inside there's -two directories "lib" and "include". -"include" contains a copy of the SDL headers that you'll need for your project, -make sure to configure XCode to look for headers there. -"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both -to your XCode project. These libraries contain three architectures in them, -armv6 for legacy devices, armv7, and i386 (for the simulator). -By default, iosbuild.sh will autodetect the SDK version you have installed using -xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour -by setting the MIN_OS_VERSION variable, ie: - -MIN_OS_VERSION=4.2 ./iosbuild.sh - -============================================================================== -Using the Simple DirectMedia Layer for iOS -============================================================================== - -FIXME: This needs to be updated for the latest methods - -Here is the easiest method: -1. Build the SDL library (libSDL2.a) and the iPhone SDL Application template. -2. Install the iPhone SDL Application template by copying it to one of Xcode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/Xcode/Project Templates/" and placing it there. -3. Start a new project using the template. The project should be immediately ready for use with SDL. - -Here is a more manual method: -1. Create a new iOS view based application. -2. Build the SDL static library (libSDL2.a) for iOS and include them in your project. Xcode will ignore the library that is not currently of the correct architecture, hence your app will work both on iOS and in the iOS Simulator. -3. Include the SDL header files in your project. -4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iOS provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iOS produces its user interface programmatically. -5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell Xcode not to use the project prefix file, as it includes Objective-C code. - -============================================================================== -Notes -- Retina / High-DPI and window sizes -============================================================================== - -Window and display mode sizes in SDL are in "screen coordinates" (or "points", -in Apple's terminology) rather than in pixels. On iOS this means that a window -created on an iPhone 6 will have a size in screen coordinates of 375 x 667, -rather than a size in pixels of 750 x 1334. All iOS apps are expected to -size their content based on screen coordinates / points rather than pixels, -as this allows different iOS devices to have different pixel densities -(Retina versus non-Retina screens, etc.) without apps caring too much. - -By default SDL will not use the full pixel density of the screen on -Retina/high-dpi capable devices. Use the SDL_WINDOW_ALLOW_HIGHDPI flag when -creating your window to enable high-dpi support. - -When high-dpi support is enabled, SDL_GetWindowSize() and display mode sizes -will still be in "screen coordinates" rather than pixels, but the window will -have a much greater pixel density when the device supports it, and the -SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() functions (depending on -whether raw OpenGL or the SDL_Render API is used) can be queried to determine -the size in pixels of the drawable screen framebuffer. - -Some OpenGL ES functions such as glViewport expect sizes in pixels rather than -sizes in screen coordinates. When doing 2D rendering with OpenGL ES, an -orthographic projection matrix using the size in screen coordinates -(SDL_GetWindowSize()) can be used in order to display content at the same scale -no matter whether a Retina device is used or not. - -============================================================================== -Notes -- Application events -============================================================================== - -On iOS the application goes through a fixed life cycle and you will get -notifications of state changes via application events. When these events -are delivered you must handle them in an event callback because the OS may -not give you any processing time after the events are delivered. - -e.g. - - int HandleAppEvents(void *userdata, SDL_Event *event) - { - switch (event->type) - { - case SDL_APP_TERMINATING: - /* Terminate the app. - Shut everything down before returning from this function. - */ - return 0; - case SDL_APP_LOWMEMORY: - /* You will get this when your app is paused and iOS wants more memory. - Release as much memory as possible. - */ - return 0; - case SDL_APP_WILLENTERBACKGROUND: - /* Prepare your app to go into the background. Stop loops, etc. - This gets called when the user hits the home button, or gets a call. - */ - return 0; - case SDL_APP_DIDENTERBACKGROUND: - /* This will get called if the user accepted whatever sent your app to the background. - If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops. - When you get this, you have 5 seconds to save all your state or the app will be terminated. - Your app is NOT active at this point. - */ - return 0; - case SDL_APP_WILLENTERFOREGROUND: - /* This call happens when your app is coming back to the foreground. - Restore all your state here. - */ - return 0; - case SDL_APP_DIDENTERFOREGROUND: - /* Restart your loops here. - Your app is interactive and getting CPU again. - */ - return 0; - default: - /* No special processing, add it to the event queue */ - return 1; - } - } - - int main(int argc, char *argv[]) - { - SDL_SetEventFilter(HandleAppEvents, NULL); - - ... run your main loop - - return 0; - } - - -============================================================================== -Notes -- Accelerometer as Joystick -============================================================================== - -SDL for iPhone supports polling the built in accelerometer as a joystick device. For an example on how to do this, see the accelerometer.c in the demos directory. - -The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis() reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_JoystickGetAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF. - -============================================================================== -Notes -- OpenGL ES -============================================================================== - -Your SDL application for iOS uses OpenGL ES for video by default. - -OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute(). - -If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0. - -Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 0. - -OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this: - -- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called. -- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called. -- If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called. - -The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h). - -============================================================================== -Notes -- Keyboard -============================================================================== - -The SDL keyboard API has been extended to support on-screen keyboards: - -void SDL_StartTextInput() - -- enables text events and reveals the onscreen keyboard. - -void SDL_StopTextInput() - -- disables text events and hides the onscreen keyboard. - -SDL_bool SDL_IsTextInputActive() - -- returns whether or not text events are enabled (and the onscreen keyboard is visible) - - -============================================================================== -Notes -- Reading and Writing files -============================================================================== - -Each application installed on iPhone resides in a sandbox which includes its own Application Home directory. Your application may not access files outside this directory. - -Once your application is installed its directory tree looks like: - - MySDLApp Home/ - MySDLApp.app - Documents/ - Library/ - Preferences/ - tmp/ - -When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences". - -More information on this subject is available here: -http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html - -============================================================================== -Notes -- iPhone SDL limitations -============================================================================== - -Windows: - Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow() the flag SDL_WINDOW_BORDERLESS). - -Textures: - The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats. - -Loading Shared Objects: - This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h. - -============================================================================== -Game Center -============================================================================== - -Game Center integration might require that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using: - - int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); - -This will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run. - -e.g. - - extern "C" - void ShowFrame(void*) - { - ... do event handling, frame logic and rendering ... - } - - int main(int argc, char *argv[]) - { - ... initialize game ... - - #if __IPHONEOS__ - // Initialize the Game Center for scoring and matchmaking - InitGameCenter(); - - // Set up the game to run in the window animation callback on iOS - // so that Game Center and so forth works correctly. - SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL); - #else - while ( running ) { - ShowFrame(0); - DelayFrame(); - } - #endif - return 0; - } - -============================================================================== -Deploying to older versions of iOS -============================================================================== - -SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 6.1 - -In order to do that you need to download an older version of Xcode: -https://developer.apple.com/download/more/?name=Xcode - -Open the package contents of the older Xcode and your newer version of Xcode and copy over the folders in Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport - -Then open the file Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist and add the versions of iOS you want to deploy to the key Root/DefaultProperties/DEPLOYMENT_TARGET_SUGGESTED_VALUES - -Open your project and set your deployment target to the desired version of iOS - -Finally, remove GameController from the list of frameworks linked by your application and edit the build settings for "Other Linker Flags" and add -weak_framework GameController diff --git a/msvc/SDL2/docs/README-linux.md b/msvc/SDL2/docs/README-linux.md deleted file mode 100644 index 5274c60e..00000000 --- a/msvc/SDL2/docs/README-linux.md +++ /dev/null @@ -1,90 +0,0 @@ -Linux -================================================================================ - -By default SDL will only link against glibc, the rest of the features will be -enabled dynamically at runtime depending on the available features on the target -system. So, for example if you built SDL with Xinerama support and the target -system does not have the Xinerama libraries installed, it will be disabled -at runtime, and you won't get a missing library error, at least with the -default configuration parameters. - - -================================================================================ -Build Dependencies -================================================================================ - -Ubuntu 13.04, all available features enabled: - -sudo apt-get install build-essential mercurial make cmake autoconf automake \ -libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \ -libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \ -libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \ -libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \ -fcitx-libs-dev libsamplerate0-dev libsndio-dev - -Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols" -to that command line for Wayland support. - -Ubuntu 16.10 can also add "libmirclient-dev libxkbcommon-dev" to that command -line for Mir support. - -NOTES: -- This includes all the audio targets except arts, because Ubuntu pulled the - artsc0-dev package, but in theory SDL still supports it. -- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime - for higher-quality audio resampling. SDL will work without it if the library - is missing, so it's safe to build in support even if the end user doesn't - have this library installed. -- DirectFB isn't included because the configure script (currently) fails to find - it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the - configure script to include DirectFB support. Send patches. :) - - -================================================================================ -Joystick does not work -================================================================================ - -If you compiled or are using a version of SDL with udev support (and you should!) -there's a few issues that may cause SDL to fail to detect your joystick. To -debug this, start by installing the evtest utility. On Ubuntu/Debian: - - sudo apt-get install evtest - -Then run: - - sudo evtest - -You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX" -Now run: - - cat /dev/input/event/XX - -If you get a permission error, you need to set a udev rule to change the mode of -your device (see below) - -Also, try: - - sudo udevadm info --query=all --name=input/eventXX - -If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it, -you need to set up an udev rule to force this variable. - -A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks -like: - - SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" - SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" - -You can set up similar rules for your device by changing the values listed in -idProduct and idVendor. To obtain these values, try: - - sudo udevadm info -a --name=input/eventXX | grep idVendor - sudo udevadm info -a --name=input/eventXX | grep idProduct - -If multiple values come up for each of these, the one you want is the first one of each. - -On other systems which ship with an older udev (such as CentOS), you may need -to set up a rule such as: - - SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1" - diff --git a/msvc/SDL2/docs/README-macosx.md b/msvc/SDL2/docs/README-macosx.md deleted file mode 100644 index 18d39518..00000000 --- a/msvc/SDL2/docs/README-macosx.md +++ /dev/null @@ -1,240 +0,0 @@ -Mac OS X -============================================================================== - -These instructions are for people using Apple's Mac OS X (pronounced -"ten"). - -From the developer's point of view, OS X is a sort of hybrid Mac and -Unix system, and you have the option of using either traditional -command line tools or Apple's IDE Xcode. - -Command Line Build -================== - -To build SDL using the command line, use the standard configure and make -process: - - ./configure - make - sudo make install - -You can also build SDL as a Universal library (a single binary for both -32-bit and 64-bit Intel architectures), on Mac OS X 10.7 and newer, by using -the gcc-fat.sh script in build-scripts: - - mkdir mybuild - cd mybuild - CC=$PWD/../build-scripts/gcc-fat.sh CXX=$PWD/../build-scripts/g++-fat.sh ../configure - make - sudo make install - -This script builds SDL with 10.5 ABI compatibility on i386 and 10.6 -ABI compatibility on x86_64 architectures. For best compatibility you -should compile your application the same way. - -Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK -(even if you target back to 10.5 systems). PowerPC support for Mac OS X has -been officially dropped as of SDL 2.0.2. - -To use the library once it's built, you essential have two possibilities: -use the traditional autoconf/automake/make method, or use Xcode. - -============================================================================== -Caveats for using SDL with Mac OS X -============================================================================== - -Some things you have to be aware of when using SDL on Mac OS X: - -- If you register your own NSApplicationDelegate (using [NSApp setDelegate:]), - SDL will not register its own. This means that SDL will not terminate using - SDL_Quit if it receives a termination request, it will terminate like a - normal app, and it will not send a SDL_DROPFILE when you request to open a - file with the app. To solve these issues, put the following code in your - NSApplicationDelegate implementation: - - - - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender - { - if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) { - SDL_Event event; - event.type = SDL_QUIT; - SDL_PushEvent(&event); - } - - return NSTerminateCancel; - } - - - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename - { - if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) { - SDL_Event event; - event.type = SDL_DROPFILE; - event.drop.file = SDL_strdup([filename UTF8String]); - return (SDL_PushEvent(&event) > 0); - } - - return NO; - } - -============================================================================== -Using the Simple DirectMedia Layer with a traditional Makefile -============================================================================== - -An existing autoconf/automake build system for your SDL app has good chances -to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary -that you can distribute to users, you need to put the generated binary into a -so called "bundle", which basically is a fancy folder with a name like -"MyCoolGame.app". - -To get this build automatically, add something like the following rule to -your Makefile.am: - - bundle_contents = APP_NAME.app/Contents - APP_NAME_bundle: EXE_NAME - mkdir -p $(bundle_contents)/MacOS - mkdir -p $(bundle_contents)/Resources - echo "APPL????" > $(bundle_contents)/PkgInfo - $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/ - -You should replace EXE_NAME with the name of the executable. APP_NAME is what -will be visible to the user in the Finder. Usually it will be the same -as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME -usually is "TestGame". You might also want to use `@PACKAGE@` to use the package -name as specified in your configure.in file. - -If your project builds more than one application, you will have to do a bit -more. For each of your target applications, you need a separate rule. - -If you want the created bundles to be installed, you may want to add this -rule to your Makefile.am: - - install-exec-hook: APP_NAME_bundle - rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app - mkdir -p $(DESTDIR)$(prefix)/Applications/ - cp -r $< /$(DESTDIR)$(prefix)Applications/ - -This rule takes the Bundle created by the rule from step 3 and installs them -into "$(DESTDIR)$(prefix)/Applications/". - -Again, if you want to install multiple applications, you will have to augment -the make rule accordingly. - - -But beware! That is only part of the story! With the above, you end up with -a bare bone .app bundle, which is double clickable from the Finder. But -there are some more things you should do before shipping your product... - -1) The bundle right now probably is dynamically linked against SDL. That - means that when you copy it to another computer, *it will not run*, - unless you also install SDL on that other computer. A good solution - for this dilemma is to static link against SDL. On OS X, you can - achieve that by linking against the libraries listed by - - sdl-config --static-libs - - instead of those listed by - - sdl-config --libs - - Depending on how exactly SDL is integrated into your build systems, the - way to achieve that varies, so I won't describe it here in detail - -2) Add an 'Info.plist' to your application. That is a special XML file which - contains some meta-information about your application (like some copyright - information, the version of your app, the name of an optional icon file, - and other things). Part of that information is displayed by the Finder - when you click on the .app, or if you look at the "Get Info" window. - More information about Info.plist files can be found on Apple's homepage. - - -As a final remark, let me add that I use some of the techniques (and some -variations of them) in Exult and ScummVM; both are available in source on -the net, so feel free to take a peek at them for inspiration! - - -============================================================================== -Using the Simple DirectMedia Layer with Xcode -============================================================================== - -These instructions are for using Apple's Xcode IDE to build SDL applications. - -- First steps - -The first thing to do is to unpack the Xcode.tar.gz archive in the -top level SDL directory (where the Xcode.tar.gz archive resides). -Because Stuffit Expander will unpack the archive into a subdirectory, -you should unpack the archive manually from the command line: - - cd [path_to_SDL_source] - tar zxf Xcode.tar.gz - -This will create a new folder called Xcode, which you can browse -normally from the Finder. - -- Building the Framework - -The SDL Library is packaged as a framework bundle, an organized -relocatable folder hierarchy of executable code, interface headers, -and additional resources. For practical purposes, you can think of a -framework as a more user and system-friendly shared library, whose library -file behaves more or less like a standard UNIX shared library. - -To build the framework, simply open the framework project and build it. -By default, the framework bundle "SDL.framework" is installed in -/Library/Frameworks. Therefore, the testers and project stationary expect -it to be located there. However, it will function the same in any of the -following locations: - - ~/Library/Frameworks - /Local/Library/Frameworks - /System/Library/Frameworks - -- Build Options - There are two "Build Styles" (See the "Targets" tab) for SDL. - "Deployment" should be used if you aren't tweaking the SDL library. - "Development" should be used to debug SDL apps or the library itself. - -- Building the Testers - Open the SDLTest project and build away! - -- Using the Project Stationary - Copy the stationary to the indicated folders to access it from - the "New Project" and "Add target" menus. What could be easier? - -- Setting up a new project by hand - Some of you won't want to use the Stationary so I'll give some tips: - * Create a new "Cocoa Application" - * Add src/main/macosx/SDLMain.m , .h and .nib to your project - * Remove "main.c" from your project - * Remove "MainMenu.nib" from your project - * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path - * Add "$(HOME)/Library/Frameworks" to the frameworks search path - * Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS" - * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib" - * Add your files - * Clean and build - -- Building from command line - Use pbxbuild in the same directory as your .pbproj file - -- Running your app - You can send command line args to your app by either invoking it from - the command line (in *.app/Contents/MacOS) or by entering them in the - "Executables" panel of the target settings. - -- Implementation Notes - Some things that may be of interest about how it all works... - * Working directory - As defined in the SDL_main.m file, the working directory of your SDL app - is by default set to its parent. You may wish to change this to better - suit your needs. - * You have a Cocoa App! - Your SDL app is essentially a Cocoa application. When your app - starts up and the libraries finish loading, a Cocoa procedure is called, - which sets up the working directory and calls your main() method. - You are free to modify your Cocoa app with generally no consequence - to SDL. You cannot, however, easily change the SDL window itself. - Functionality may be added in the future to help this. - - -Known bugs are listed in the file "BUGS.txt". diff --git a/msvc/SDL2/docs/README-nacl.md b/msvc/SDL2/docs/README-nacl.md deleted file mode 100644 index 4c9432b6..00000000 --- a/msvc/SDL2/docs/README-nacl.md +++ /dev/null @@ -1,103 +0,0 @@ -Native Client -================================================================================ - -Requirements: - -* Native Client SDK (https://developer.chrome.com/native-client), - (tested with Pepper version 33 or higher). - -The SDL backend for Chrome's Native Client has been tested only with the PNaCl -toolchain, which generates binaries designed to run on ARM and x86_32/64 -platforms. This does not mean it won't work with the other toolchains! - -================================================================================ -Building SDL for NaCl -================================================================================ - -Set up the right environment variables (see naclbuild.sh), then configure SDL with: - - configure --host=pnacl --prefix some/install/destination - -Then "make". - -As an example of how to create a deployable app a Makefile project is provided -in test/nacl/Makefile, which includes some monkey patching of the common.mk file -provided by NaCl, without which linking properly to SDL won't work (the search -path can't be modified externally, so the linker won't find SDL's binaries unless -you dump them into the SDK path, which is inconvenient). -Also provided in test/nacl is the required support file, such as index.html, -manifest.json, etc. -SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure. -This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem), -hiding the asynchronous nature of the browser behind the scenes...which is not the -same as making it disappear! - - -================================================================================ -Running tests -================================================================================ - -Due to the nature of NaCl programs, building and running SDL tests is not as -straightforward as one would hope. The script naclbuild.sh in build-scripts -automates the process and should serve as a guide for users of SDL trying to build -their own applications. - -Basic usage: - - ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35) - -This will build testgles2.c by default. - -If you want to build a different test, for example testrendercopyex.c: - - SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35 - -Once the build finishes, you have to serve the contents with a web server (the -script will give you instructions on how to do that with Python). - -================================================================================ -RWops and nacl_io -================================================================================ - -SDL_RWops work transparently with nacl_io. Two functions control the mount points: - - int mount(const char* source, const char* target, - const char* filesystemtype, - unsigned long mountflags, const void *data); - int umount(const char *target); - - For convenience, SDL will by default mount an httpfs tree at / before calling -the app's main function. Such setting can be overridden by calling: - - umount("/"); - -And then mounting a different filesystem at / - -It's important to consider that the asynchronous nature of file operations on a -browser is hidden from the application, effectively providing the developer with -a set of blocking file operations just like you get in a regular desktop -environment, which eases the job of porting to Native Client, but also introduces -a set of challenges of its own, in particular when big file sizes and slow -connections are involved. - -For more information on how nacl_io and mount points work, see: - - https://developer.chrome.com/native-client/devguide/coding/nacl_io - https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h - -To be able to save into the directory "/save/" (like backup of game) : - - mount("", "/save", "html5fs", 0, "type=PERSISTENT"); - -And add to manifest.json : - - "permissions": [ - "unlimitedStorage" - ] - -================================================================================ -TODO - Known Issues -================================================================================ -* Testing of all systems with a real application (something other than SDL's tests) -* Key events don't seem to work properly - diff --git a/msvc/SDL2/docs/README-pandora.md b/msvc/SDL2/docs/README-pandora.md deleted file mode 100644 index 511a0547..00000000 --- a/msvc/SDL2/docs/README-pandora.md +++ /dev/null @@ -1,17 +0,0 @@ -Pandora -===================================================================== - -( http://openpandora.org/ ) -- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES -support to work on the pandora under the framebuffer. This driver do not have -input support for now, so if you use it you will have to add your own control code. -The video driver name is "pandora" so if you have problem running it from -the framebuffer, try to set the following variable before starting your application : -"export SDL_VIDEODRIVER=pandora" - -- OpenGL ES support was added to the x11 driver, so it's working like the normal -x11 driver one with OpenGLX support, with SDL input event's etc.. - - -David Carré (Cpasjuste) -cpasjuste@gmail.com diff --git a/msvc/SDL2/docs/README-platforms.md b/msvc/SDL2/docs/README-platforms.md deleted file mode 100644 index 14454ec5..00000000 --- a/msvc/SDL2/docs/README-platforms.md +++ /dev/null @@ -1,8 +0,0 @@ -Platforms -========= - -We maintain the list of supported platforms on our wiki now, and how to -build and install SDL for those platforms: - - https://wiki.libsdl.org/Installation - diff --git a/msvc/SDL2/docs/README-porting.md b/msvc/SDL2/docs/README-porting.md deleted file mode 100644 index cf8ef397..00000000 --- a/msvc/SDL2/docs/README-porting.md +++ /dev/null @@ -1,68 +0,0 @@ -Porting -======= - -* Porting To A New Platform - - The first thing you have to do when porting to a new platform, is look at -include/SDL_platform.h and create an entry there for your operating system. -The standard format is "__PLATFORM__", where PLATFORM is the name of the OS. -Ideally SDL_platform.h will be able to auto-detect the system it's building -on based on C preprocessor symbols. - -There are two basic ways of building SDL at the moment: - -1. The "UNIX" way: ./configure; make; make install - - If you have a GNUish system, then you might try this. Edit configure.in, - take a look at the large section labelled: - - "Set up the configuration based on the host platform!" - - Add a section for your platform, and then re-run autogen.sh and build! - -2. Using an IDE: - - If you're using an IDE or other non-configure build system, you'll probably - want to create a custom SDL_config.h for your platform. Edit SDL_config.h, - add a section for your platform, and create a custom SDL_config_{platform}.h, - based on SDL_config_minimal.h and SDL_config.h.in - - Add the top level include directory to the header search path, and then add - the following sources to the project: - - src/*.c - src/atomic/*.c - src/audio/*.c - src/cpuinfo/*.c - src/events/*.c - src/file/*.c - src/haptic/*.c - src/joystick/*.c - src/power/*.c - src/render/*.c - src/render/software/*.c - src/stdlib/*.c - src/thread/*.c - src/timer/*.c - src/video/*.c - src/audio/disk/*.c - src/audio/dummy/*.c - src/filesystem/dummy/*.c - src/video/dummy/*.c - src/haptic/dummy/*.c - src/joystick/dummy/*.c - src/main/dummy/*.c - src/thread/generic/*.c - src/timer/dummy/*.c - src/loadso/dummy/*.c - - -Once you have a working library without any drivers, you can go back to each -of the major subsystems and start implementing drivers for your platform. - -If you have any questions, don't hesitate to ask on the SDL mailing list: - http://www.libsdl.org/mailing-list.php - -Enjoy! - Sam Lantinga (slouken@libsdl.org) - diff --git a/msvc/SDL2/docs/README-psp.md b/msvc/SDL2/docs/README-psp.md deleted file mode 100644 index 0acc93d4..00000000 --- a/msvc/SDL2/docs/README-psp.md +++ /dev/null @@ -1,19 +0,0 @@ -PSP -====== -SDL port for the Sony PSP contributed by - Captian Lex - -Credit to - Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP - Geecko for his PSP GU lib "Glib2d" - -Building --------- -To build for the PSP, make sure psp-config is in the path and run: - make -f Makefile.psp - - - -To Do ------- -PSP Screen Keyboard diff --git a/msvc/SDL2/docs/README-raspberrypi.md b/msvc/SDL2/docs/README-raspberrypi.md deleted file mode 100644 index 2c95e064..00000000 --- a/msvc/SDL2/docs/README-raspberrypi.md +++ /dev/null @@ -1,188 +0,0 @@ -Raspberry Pi -================================================================================ - -Requirements: - -Raspbian (other Linux distros may work as well). - -================================================================================ - Features -================================================================================ - -* Works without X11 -* Hardware accelerated OpenGL ES 2.x -* Sound via ALSA -* Input (mouse/keyboard/joystick) via EVDEV -* Hotplugging of input devices via UDEV - - -================================================================================ - Raspbian Build Dependencies -================================================================================ - -sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev - -You also need the VideoCore binary stuff that ships in /opt/vc for EGL and -OpenGL ES 2.x, it usually comes pre-installed, but in any case: - -sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev - - -================================================================================ - NEON -================================================================================ - -If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so -that SDL will select some otherwise-disabled highly-optimized code. The -original Pi units don't have NEON, the Pi2 probably does, and the Pi3 -definitely does. - -================================================================================ - Cross compiling from x86 Linux -================================================================================ - -To cross compile SDL for Raspbian from your desktop machine, you'll need a -Raspbian system root and the cross compilation tools. We'll assume these tools -will be placed in /opt/rpi-tools - - sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools - -You'll also need a Raspbian binary image. -Get it from: http://downloads.raspberrypi.org/raspbian_latest -After unzipping, you'll get file with a name like: "-wheezy-raspbian.img" -Let's assume the sysroot will be built in /opt/rpi-sysroot. - - export SYSROOT=/opt/rpi-sysroot - sudo kpartx -a -v .img - sudo mount -o loop /dev/mapper/loop0p2 /mnt - sudo cp -r /mnt $SYSROOT - sudo apt-get install qemu binfmt-support qemu-user-static - sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin - sudo mount --bind /dev $SYSROOT/dev - sudo mount --bind /proc $SYSROOT/proc - sudo mount --bind /sys $SYSROOT/sys - -Now, before chrooting into the ARM sysroot, you'll need to apply a workaround, -edit $SYSROOT/etc/ld.so.preload and comment out all lines in it. - - sudo chroot $SYSROOT - apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev - exit - sudo umount $SYSROOT/dev - sudo umount $SYSROOT/proc - sudo umount $SYSROOT/sys - sudo umount /mnt - -There's one more fix required, as the libdl.so symlink uses an absolute path -which doesn't quite work in our setup. - - sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so - sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so - -The final step is compiling SDL itself. - - export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux" - cd - mkdir -p build;cd build - LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd - make - make install - -To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths: - - perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config - -================================================================================ - Apps don't work or poor video/audio performance -================================================================================ - -If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to -update the RPi's firmware. Note that doing so will fix these problems, but it -will also render the CMA - Dynamic Memory Split functionality useless. - -Also, by default the Raspbian distro configures the GPU RAM at 64MB, this is too -low in general, specially if a 1080p TV is hooked up. - -See here how to configure this setting: http://elinux.org/RPiconfig - -Using a fixed gpu_mem=128 is the best option (specially if you updated the -firmware, using CMA probably won't work, at least it's the current case). - -================================================================================ - No input -================================================================================ - -Make sure you belong to the "input" group. - - sudo usermod -aG input `whoami` - -================================================================================ - No HDMI Audio -================================================================================ - -If you notice that ALSA works but there's no audio over HDMI, try adding: - - hdmi_drive=2 - -to your config.txt file and reboot. - -Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062 - -================================================================================ - Text Input API support -================================================================================ - -The Text Input API is supported, with translation of scan codes done via the -kernel symbol tables. For this to work, SDL needs access to a valid console. -If you notice there's no SDL_TEXTINPUT message being emitted, double check that -your app has read access to one of the following: - -* /proc/self/fd/0 -* /dev/tty -* /dev/tty[0...6] -* /dev/vc/0 -* /dev/console - -This is usually not a problem if you run from the physical terminal (as opposed -to running from a pseudo terminal, such as via SSH). If running from a PTS, a -quick workaround is to run your app as root or add yourself to the tty group, -then re-login to the system. - - sudo usermod -aG tty `whoami` - -The keyboard layout used by SDL is the same as the one the kernel uses. -To configure the layout on Raspbian: - - sudo dpkg-reconfigure keyboard-configuration - -To configure the locale, which controls which keys are interpreted as letters, -this determining the CAPS LOCK behavior: - - sudo dpkg-reconfigure locales - -================================================================================ - OpenGL problems -================================================================================ - -If you have desktop OpenGL headers installed at build time in your RPi or cross -compilation environment, support for it will be built in. However, the chipset -does not actually have support for it, which causes issues in certain SDL apps -since the presence of OpenGL support supersedes the ES/ES2 variants. -The workaround is to disable OpenGL at configuration time: - - ./configure --disable-video-opengl - -Or if the application uses the Render functions, you can use the SDL_RENDER_DRIVER -environment variable: - - export SDL_RENDER_DRIVER=opengles2 - -================================================================================ - Notes -================================================================================ - -* When launching apps remotely (via SSH), SDL can prevent local keystrokes from - leaking into the console only if it has root privileges. Launching apps locally - does not suffer from this issue. - - diff --git a/msvc/SDL2/docs/README-touch.md b/msvc/SDL2/docs/README-touch.md deleted file mode 100644 index b6745acd..00000000 --- a/msvc/SDL2/docs/README-touch.md +++ /dev/null @@ -1,86 +0,0 @@ -Touch -=========================================================================== -System Specific Notes -=========================================================================== -Linux: -The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it. - -Mac: -The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do. - -iPhone: -Works out of box. - -Windows: -Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com - -=========================================================================== -Events -=========================================================================== -SDL_FINGERDOWN: -Sent when a finger (or stylus) is placed on a touch device. -Fields: -* event.tfinger.touchId - the Id of the touch device. -* event.tfinger.fingerId - the Id of the finger which just went down. -* event.tfinger.x - the x coordinate of the touch (0..1) -* event.tfinger.y - the y coordinate of the touch (0..1) -* event.tfinger.pressure - the pressure of the touch (0..1) - -SDL_FINGERMOTION: -Sent when a finger (or stylus) is moved on the touch device. -Fields: -Same as SDL_FINGERDOWN but with additional: -* event.tfinger.dx - change in x coordinate during this motion event. -* event.tfinger.dy - change in y coordinate during this motion event. - -SDL_FINGERUP: -Sent when a finger (or stylus) is lifted from the touch device. -Fields: -Same as SDL_FINGERDOWN. - - -=========================================================================== -Functions -=========================================================================== -SDL provides the ability to access the underlying SDL_Finger structures. -These structures should _never_ be modified. - -The following functions are included from SDL_touch.h - -To get a SDL_TouchID call SDL_GetTouchDevice(int index). -This returns a SDL_TouchID. -IMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this! - -The number of touch devices can be queried with SDL_GetNumTouchDevices(). - -A SDL_TouchID may be used to get pointers to SDL_Finger. - -SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device. - -The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following: - - float x = event.tfinger.x; - float y = event.tfinger.y; - - - -To get a SDL_Finger, call SDL_GetTouchFinger(SDL_TouchID touchID, int index), where touchID is a SDL_TouchID, and index is the requested finger. -This returns a SDL_Finger *, or NULL if the finger does not exist, or has been removed. -A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled. -As a result, be very careful to check for NULL return values. - -A SDL_Finger has the following fields: -* x, y: - The current coordinates of the touch. -* pressure: - The pressure of the touch. - - -=========================================================================== -Notes -=========================================================================== -For a complete example see test/testgesture.c - -Please direct questions/comments to: - jim.tla+sdl_touch@gmail.com - (original author, API was changed since) diff --git a/msvc/SDL2/docs/README-wince.md b/msvc/SDL2/docs/README-wince.md deleted file mode 100644 index 9fc6454d..00000000 --- a/msvc/SDL2/docs/README-wince.md +++ /dev/null @@ -1,10 +0,0 @@ -WinCE -===== - -Windows CE is no longer supported by SDL. - -We have left the CE support in SDL 1.2 for those that must have it, and we -have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3. - ---ryan. - diff --git a/msvc/SDL2/docs/README-windows.md b/msvc/SDL2/docs/README-windows.md deleted file mode 100644 index 71f968ee..00000000 --- a/msvc/SDL2/docs/README-windows.md +++ /dev/null @@ -1,45 +0,0 @@ -Windows -================================================================================ - -================================================================================ -OpenGL ES 2.x support -================================================================================ - -SDL has support for OpenGL ES 2.x under Windows via two alternative -implementations. -The most straightforward method consists in running your app in a system with -a graphic card paired with a relatively recent (as of November of 2013) driver -which supports the WGL_EXT_create_context_es2_profile extension. Vendors known -to ship said extension on Windows currently include nVidia and Intel. - -The other method involves using the ANGLE library (https://code.google.com/p/angleproject/) -If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile -extension is found, SDL will try to load the libEGL.dll library provided by -ANGLE. -To obtain the ANGLE binaries, you can either compile from source from -https://chromium.googlesource.com/angle/angle or copy the relevant binaries from -a recent Chrome/Chromium install for Windows. The files you need are: - - * libEGL.dll - * libGLESv2.dll - * d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler) - or... - * d3dcompiler_43.dll (supports Windows XP or later) - -If you compile ANGLE from source, you can configure it so it does not need the -d3dcompiler_* DLL at all (for details on this, see their documentation). -However, by default SDL will try to preload the d3dcompiler_46.dll to -comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to -support Windows XP) or to skip this step at all, you can use the -SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details). - -Known Bugs: - - * SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears - that there's a bug in the library which prevents the window contents from - refreshing if this is set to anything other than the default value. - -Vulkan Surface Support -============== - -Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application. diff --git a/msvc/SDL2/docs/README-winrt.md b/msvc/SDL2/docs/README-winrt.md deleted file mode 100644 index 35b7e6d8..00000000 --- a/msvc/SDL2/docs/README-winrt.md +++ /dev/null @@ -1,544 +0,0 @@ -WinRT -===== - -This port allows SDL applications to run on Microsoft's platforms that require -use of "Windows Runtime", aka. "WinRT", APIs. Microsoft may, in some cases, -refer to them as either "Windows Store", or for Windows 10, "UWP" apps. - -Some of the operating systems that include WinRT, are: - -* Windows 10, via its Universal Windows Platform (UWP) APIs -* Windows 8.x -* Windows RT 8.x (aka. Windows 8.x for ARM processors) -* Windows Phone 8.x - - -Requirements ------------- - -* Microsoft Visual C++ (aka Visual Studio), either 2017, 2015, 2013, or 2012 - - Free, "Community" or "Express" editions may be used, so long as they - include support for either "Windows Store" or "Windows Phone" apps. - "Express" versions marked as supporting "Windows Desktop" development - typically do not include support for creating WinRT apps, to note. - (The "Community" editions of Visual C++ do, however, support both - desktop/Win32 and WinRT development). - - Visual Studio 2017 can be used, however it is recommended that you install - the Visual C++ 2015 build tools. These build tools can be installed - using VS 2017's installer. Be sure to also install the workload for - "Universal Windows Platform development", its optional component, the - "C++ Universal Windows Platform tools", and for UWP / Windows 10 - development, the "Windows 10 SDK (10.0.10240.0)". Please note that - targeting UWP / Windows 10 apps from development machine(s) running - earlier versions of Windows, such as Windows 7, is not always supported - by Visual Studio, and you may get error(s) when attempting to do so. - - Visual C++ 2012 can only build apps that target versions 8.0 of Windows, - or Windows Phone. 8.0-targeted apps will run on devices running 8.1 - editions of Windows, however they will not be able to take advantage of - 8.1-specific features. - - Visual C++ 2013 cannot create app projects that target Windows 8.0. - Visual C++ 2013 Update 4, can create app projects for Windows Phone 8.0, - Windows Phone 8.1, and Windows 8.1, but not Windows 8.0. An optional - Visual Studio add-in, "Tools for Maintaining Store apps for Windows 8", - allows Visual C++ 2013 to load and build Windows 8.0 projects that were - created with Visual C++ 2012, so long as Visual C++ 2012 is installed - on the same machine. More details on targeting different versions of - Windows can found at the following web pages: - - [Develop apps by using Visual Studio 2013](http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx) - - [To add the Tools for Maintaining Store apps for Windows 8](http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx#AddMaintenanceTools) -* A valid Microsoft account - This requirement is not imposed by SDL, but - rather by Microsoft's Visual C++ toolchain. This is required to launch or - debug apps. - - -Status ------- - -Here is a rough list of what works, and what doesn't: - -* What works: - * compilation via Visual C++ 2012 through 2015 - * compile-time platform detection for SDL programs. The C/C++ #define, - `__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT. - * GPU-accelerated 2D rendering, via SDL_Renderer. - * OpenGL ES 2, via the ANGLE library (included separately from SDL) - * software rendering, via either SDL_Surface (optionally in conjunction with - SDL_GetWindowSurface() and SDL_UpdateWindowSurface()) or via the - SDL_Renderer APIs - * threads - * timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(), - SDL_GetPerformanceFrequency(), etc.) - * file I/O via SDL_RWops - * mouse input (unsupported on Windows Phone) - * audio, via SDL's WASAPI backend (if you want to record, your app must - have "Microphone" capabilities enabled in its manifest, and the user must - not have blocked access. Otherwise, capture devices will fail to work, - presenting as a device disconnect shortly after opening it.) - * .DLL file loading. Libraries *MUST* be packaged inside applications. Loading - anything outside of the app is not supported. - * system path retrieval via SDL's filesystem APIs - * game controllers. Support is provided via the SDL_Joystick and - SDL_GameController APIs, and is backed by Microsoft's XInput API. Please - note, however, that Windows limits game-controller support in UWP apps to, - "Xbox compatible controllers" (many controllers that work in Win32 apps, - do not work in UWP, due to restrictions in UWP itself.) - * multi-touch input - * app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as - appropriate. - * window events - * using Direct3D 11.x APIs outside of SDL. Non-XAML / Direct3D-only apps can - choose to render content directly via Direct3D, using SDL to manage the - internal WinRT window, as well as input and audio. (Use - SDL_GetWindowWMInfo() to get the WinRT 'CoreWindow', and pass it into - IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.) - -* What partially works: - * keyboard input. Most of WinRT's documented virtual keys are supported, as - well as many keys with documented hardware scancodes. Converting - SDL_Scancodes to or from SDL_Keycodes may not work, due to missing APIs - (MapVirtualKey()) in Microsoft's Windows Store / UWP APIs. - * SDLmain. WinRT uses a different signature for each app's main() function. - SDL-based apps that use this port must compile in SDL_winrt_main_NonXAML.cpp - (in `SDL\src\main\winrt\`) directly in order for their C-style main() - functions to be called. - -* What doesn't work: - * compilation with anything other than Visual C++ - * programmatically-created custom cursors. These don't appear to be supported - by WinRT. Different OS-provided cursors can, however, be created via - SDL_CreateSystemCursor() (unsupported on Windows Phone) - * SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal(). This are not currently - supported by WinRT itself. - * joysticks and game controllers that either are not supported by - Microsoft's XInput API, or are not supported within UWP apps (many - controllers that work in Win32, do not work in UWP, due to restrictions in - UWP itself). - * turning off VSync when rendering on Windows Phone. Attempts to turn VSync - off on Windows Phone result either in Direct3D not drawing anything, or it - forcing VSync back on. As such, SDL_RENDERER_PRESENTVSYNC will always get - turned-on on Windows Phone. This limitation is not present in non-Phone - WinRT (such as Windows 8.x), where turning off VSync appears to work. - * probably anything else that's not listed as supported - - - -Upgrade Notes -------------- - -#### SDL_GetPrefPath() usage when upgrading WinRT apps from SDL 2.0.3 - -SDL 2.0.4 fixes two bugs found in the WinRT version of SDL_GetPrefPath(). -The fixes may affect older, SDL 2.0.3-based apps' save data. Please note -that these changes only apply to SDL-based WinRT apps, and not to apps for -any other platform. - -1. SDL_GetPrefPath() would return an invalid path, one in which the path's - directory had not been created. Attempts to create files there - (via fopen(), for example), would fail, unless that directory was - explicitly created beforehand. - -2. SDL_GetPrefPath(), for non-WinPhone-based apps, would return a path inside - a WinRT 'Roaming' folder, the contents of which get automatically - synchronized across multiple devices. This process can occur while an - application runs, and can cause existing save-data to be overwritten - at unexpected times, with data from other devices. (Windows Phone apps - written with SDL 2.0.3 did not utilize a Roaming folder, due to API - restrictions in Windows Phone 8.0). - - -SDL_GetPrefPath(), starting with SDL 2.0.4, addresses these by: - -1. making sure that SDL_GetPrefPath() returns a directory in which data - can be written to immediately, without first needing to create directories. - -2. basing SDL_GetPrefPath() off of a different, non-Roaming folder, the - contents of which do not automatically get synchronized across devices - (and which require less work to use safely, in terms of data integrity). - -Apps that wish to get their Roaming folder's path can do so either by using -SDL_WinRTGetFSPathUTF8(), SDL_WinRTGetFSPathUNICODE() (which returns a -UCS-2/wide-char string), or directly through the WinRT class, -Windows.Storage.ApplicationData. - - - -Setup, High-Level Steps ------------------------ - -The steps for setting up a project for an SDL/WinRT app looks like the -following, at a high-level: - -1. create a new Visual C++ project using Microsoft's template for a, - "Direct3D App". -2. remove most of the files from the project. -3. make your app's project directly reference SDL/WinRT's own Visual C++ - project file, via use of Visual C++'s "References" dialog. This will setup - the linker, and will copy SDL's .dll files to your app's final output. -4. adjust your app's build settings, at minimum, telling it where to find SDL's - header files. -5. add files that contains a WinRT-appropriate main function, along with some - data to make sure mouse-cursor-hiding (via SDL_ShowCursor(SDL_DISABLE) calls) - work properly. -6. add SDL-specific app code. -7. build and run your app. - - -Setup, Detailed Steps ---------------------- - -### 1. Create a new project ### - -Create a new project using one of Visual C++'s templates for a plain, non-XAML, -"Direct3D App" (XAML support for SDL/WinRT is not yet ready for use). If you -don't see one of these templates, in Visual C++'s 'New Project' dialog, try -using the textbox titled, 'Search Installed Templates' to look for one. - - -### 2. Remove unneeded files from the project ### - -In the new project, delete any file that has one of the following extensions: - -- .cpp -- .h -- .hlsl - -When you are done, you should be left with a few files, each of which will be a -necessary part of your app's project. These files will consist of: - -- an .appxmanifest file, which contains metadata on your WinRT app. This is - similar to an Info.plist file on iOS, or an AndroidManifest.xml on Android. -- a few .png files, one of which is a splash screen (displayed when your app - launches), others are app icons. -- a .pfx file, used for code signing purposes. - - -### 3. Add references to SDL's project files ### - -SDL/WinRT can be built in multiple variations, spanning across three different -CPU architectures (x86, x64, and ARM) and two different configurations -(Debug and Release). WinRT and Visual C++ do not currently provide a means -for combining multiple variations of one library into a single file. -Furthermore, it does not provide an easy means for copying pre-built .dll files -into your app's final output (via Post-Build steps, for example). It does, -however, provide a system whereby an app can reference the MSVC projects of -libraries such that, when the app is built: - -1. each library gets built for the appropriate CPU architecture(s) and WinRT - platform(s). -2. each library's output, such as .dll files, get copied to the app's build - output. - -To set this up for SDL/WinRT, you'll need to run through the following steps: - -1. open up the Solution Explorer inside Visual C++ (under the "View" menu, then - "Solution Explorer") -2. right click on your app's solution. -3. navigate to "Add", then to "Existing Project..." -4. find SDL/WinRT's Visual C++ project file and open it. Different project - files exist for different WinRT platforms. All of them are in SDL's - source distribution, in the following directories: - * `VisualC-WinRT/UWP_VS2015/` - for Windows 10 / UWP apps - * `VisualC-WinRT/WinPhone81_VS2013/` - for Windows Phone 8.1 apps - * `VisualC-WinRT/WinRT80_VS2012/` - for Windows 8.0 apps - * `VisualC-WinRT/WinRT81_VS2013/` - for Windows 8.1 apps -5. once the project has been added, right-click on your app's project and - select, "References..." -6. click on the button titled, "Add New Reference..." -7. check the box next to SDL -8. click OK to close the dialog -9. SDL will now show up in the list of references. Click OK to close that - dialog. - -Your project is now linked to SDL's project, insofar that when the app is -built, SDL will be built as well, with its build output getting included with -your app. - - -### 4. Adjust Your App's Build Settings ### - -Some build settings need to be changed in your app's project. This guide will -outline the following: - -- making sure that the compiler knows where to find SDL's header files -- **Optional for C++, but NECESSARY for compiling C code:** telling the - compiler not to use Microsoft's C++ extensions for WinRT development. -- **Optional:** telling the compiler not generate errors due to missing - precompiled header files. - -To change these settings: - -1. right-click on the project -2. choose "Properties" -3. in the drop-down box next to "Configuration", choose, "All Configurations" -4. in the drop-down box next to "Platform", choose, "All Platforms" -5. in the left-hand list, expand the "C/C++" section -6. select "General" -7. edit the "Additional Include Directories" setting, and add a path to SDL's - "include" directory -8. **Optional: to enable compilation of C code:** change the setting for - "Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're - working with a completely C++ based project, this step can usually be - omitted. -9. **Optional: to disable precompiled headers (which can produce - 'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand - list, select "Precompiled Headers", then change the setting for "Precompiled - Header" from "Use (/Yu)" to "Not Using Precompiled Headers". -10. close the dialog, saving settings, by clicking the "OK" button - - -### 5. Add a WinRT-appropriate main function, and a blank-cursor image, to the app. ### - -A few files should be included directly in your app's MSVC project, specifically: -1. a WinRT-appropriate main function (which is different than main() functions on - other platforms) -2. a Win32-style cursor resource, used by SDL_ShowCursor() to hide the mouse cursor - (if and when the app needs to do so). *If this cursor resource is not - included, mouse-position reporting may fail if and when the cursor is - hidden, due to possible bugs/design-oddities in Windows itself.* - -To include these files: - -1. right-click on your project (again, in Visual C++'s Solution Explorer), - navigate to "Add", then choose "Existing Item...". -2. navigate to the directory containing SDL's source code, then into its - subdirectory, 'src/main/winrt/'. Select, then add, the following files: - - `SDL_winrt_main_NonXAML.cpp` - - `SDL2-WinRTResources.rc` - - `SDL2-WinRTResource_BlankCursor.cur` -3. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your - project), then click on "Properties...". -4. in the drop-down box next to "Configuration", choose, "All Configurations" -5. in the drop-down box next to "Platform", choose, "All Platforms" -6. in the left-hand list, click on "C/C++" -7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)". -8. click the OK button. This will close the dialog. - - -**NOTE: C++/CX compilation is currently required in at least one file of your -app's project. This is to make sure that Visual C++'s linker builds a 'Windows -Metadata' file (.winmd) for your app. Not doing so can lead to build errors.** - - -### 6. Add app code and assets ### - -At this point, you can add in SDL-specific source code. Be sure to include a -C-style main function (ie: `int main(int argc, char *argv[])`). From there you -should be able to create a single `SDL_Window` (WinRT apps can only have one -window, at present), as well as an `SDL_Renderer`. Direct3D will be used to -draw content. Events are received via SDL's usual event functions -(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets, -you can start adding them to the project now. If not, or if you would like to -make sure that you're setup correctly, some short and simple sample code is -provided below. - - -#### 6.A. ... when creating a new app #### - -If you are creating a new app (rather than porting an existing SDL-based app), -or if you would just like a simple app to test SDL/WinRT with before trying to -get existing code working, some working SDL/WinRT code is provided below. To -set this up: - -1. right click on your app's project -2. select Add, then New Item. An "Add New Item" dialog will show up. -3. from the left-hand list, choose "Visual C++" -4. from the middle/main list, choose "C++ File (.cpp)" -5. near the bottom of the dialog, next to "Name:", type in a name for your -source file, such as, "main.cpp". -6. click on the Add button. This will close the dialog, add the new file to -your project, and open the file in Visual C++'s text editor. -7. Copy and paste the following code into the new file, then save it. - - - #include - - int main(int argc, char **argv) - { - SDL_DisplayMode mode; - SDL_Window * window = NULL; - SDL_Renderer * renderer = NULL; - SDL_Event evt; - - if (SDL_Init(SDL_INIT_VIDEO) != 0) { - return 1; - } - - if (SDL_GetCurrentDisplayMode(0, &mode) != 0) { - return 1; - } - - if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) { - return 1; - } - - while (1) { - while (SDL_PollEvent(&evt)) { - } - - SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255); - SDL_RenderClear(renderer); - SDL_RenderPresent(renderer); - } - } - - -#### 6.B. Adding code and assets #### - -If you have existing code and assets that you'd like to add, you should be able -to add them now. The process for adding a set of files is as such. - -1. right click on the app's project -2. select Add, then click on "New Item..." -3. open any source, header, or asset files as appropriate. Support for C and -C++ is available. - -Do note that WinRT only supports a subset of the APIs that are available to -Win32-based apps. Many portions of the Win32 API and the C runtime are not -available. - -A list of unsupported C APIs can be found at - - -General information on using the C runtime in WinRT can be found at - - -A list of supported Win32 APIs for WinRT apps can be found at -. To note, -the list of supported Win32 APIs for Windows Phone 8.0 is different. -That list can be found at - - - -### 7. Build and run your app ### - -Your app project should now be setup, and you should be ready to build your app. -To run it on the local machine, open the Debug menu and choose "Start -Debugging". This will build your app, then run your app full-screen. To switch -out of your app, press the Windows key. Alternatively, you can choose to run -your app in a window. To do this, before building and running your app, find -the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand -this by clicking on the arrow on the right side of the list, then click on -Simulator. Once you do that, any time you build and run the app, the app will -launch in window, rather than full-screen. - - -#### 7.A. Running apps on older, ARM-based, "Windows RT" devices #### - -**These instructions do not include Windows Phone, despite Windows Phone -typically running on ARM processors.** They are specifically for devices -that use the "Windows RT" operating system, which was a modified version of -Windows 8.x that ran primarily on ARM-based tablet computers. - -To build and run the app on ARM-based, "Windows RT" devices, you'll need to: - -- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and - debugs ARM-based apps via IP networks. -- change a few options on the development machine, both to make sure it builds - for ARM (rather than x86 or x64), and to make sure it knows how to find the - Windows RT device (on the network). - -Microsoft's Remote Debugger can be found at -. Please note -that separate versions of this debugger exist for different versions of Visual -C++, one each for MSVC 2015, 2013, and 2012. - -To setup Visual C++ to launch your app on an ARM device: - -1. make sure the Remote Debugger is running on your ARM device, and that it's on - the same IP network as your development machine. -2. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click - it, then change the value to "ARM". -3. make sure Visual C++ knows the hostname or IP address of the ARM device. To - do this: - 1. open the app project's properties - 2. select "Debugging" - 3. next to "Machine Name", enter the hostname or IP address of the ARM - device - 4. if, and only if, you've turned off authentication in the Remote Debugger, - then change the setting for "Require Authentication" to No - 5. click "OK" -4. build and run the app (from Visual C++). The first time you do this, a - prompt will show up on the ARM device, asking for a Microsoft Account. You - do, unfortunately, need to log in here, and will need to follow the - subsequent registration steps in order to launch the app. After you do so, - if the app didn't already launch, try relaunching it again from within Visual - C++. - - -Troubleshooting ---------------- - -#### Build fails with message, "error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker'" - -Try adding the following to your linker flags. In MSVC, this can be done by -right-clicking on the app project, navigating to Configuration Properties -> -Linker -> Command Line, then adding them to the Additional Options -section. - -* For Release builds / MSVC-Configurations, add: - - /nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib - -* For Debug builds / MSVC-Configurations, add: - - /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib - - -#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values - -This may be caused by a bug in Windows itself, whereby hiding the mouse -cursor can cause mouse-position reporting to fail. - -SDL provides a workaround for this, but it requires that an app links to a -set of Win32-style cursor image-resource files. A copy of suitable resource -files can be found in `src/main/winrt/`. Adding them to an app's Visual C++ -project file should be sufficient to get the app to use them. - - -#### SDL's Visual Studio project file fails to open, with message, "The system can't find the file specified." - -This can be caused for any one of a few reasons, which Visual Studio can -report, but won't always do so in an up-front manner. - -To help determine why this error comes up: - -1. open a copy of Visual Studio without opening a project file. This can be - accomplished via Windows' Start Menu, among other means. -2. show Visual Studio's Output window. This can be done by going to VS' - menu bar, then to View, and then to Output. -3. try opening the SDL project file directly by going to VS' menu bar, then - to File, then to Open, then to Project/Solution. When a File-Open dialog - appears, open the SDL project (such as the one in SDL's source code, in its - directory, VisualC-WinRT/UWP_VS2015/). -4. after attempting to open SDL's Visual Studio project file, additional error - information will be output to the Output window. - -If Visual Studio reports (via its Output window) that the project: - -"could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections: -Microsoft.VisualStudio.ComponentGroup.UWP.VC" - -... then you will need to re-launch Visual Studio's installer, and make sure that -the workflow for "Universal Windows Platform development" is checked, and that its -optional component, "C++ Universal Windows Platform tools" is also checked. While -you are there, if you are planning on targeting UWP / Windows 10, also make sure -that you check the optional component, "Windows 10 SDK (10.0.10240.0)". After -making sure these items are checked as-appropriate, install them. - -Once you install these components, try re-launching Visual Studio, and re-opening -the SDL project file. If you still get the error dialog, try using the Output -window, again, seeing what Visual Studio says about it. - - -#### Game controllers / joysticks aren't working! - -Windows only permits certain game controllers and joysticks to work within -WinRT / UWP apps. Even if a game controller or joystick works in a Win32 -app, that device is not guaranteed to work inside a WinRT / UWP app. - -According to Microsoft, "Xbox compatible controllers" should work inside -UWP apps, potentially with more working in the future. This includes, but -may not be limited to, Microsoft-made Xbox controllers and USB adapters. -(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop) - - diff --git a/msvc/SDL2/docs/README.md b/msvc/SDL2/docs/README.md deleted file mode 100644 index f3481133..00000000 --- a/msvc/SDL2/docs/README.md +++ /dev/null @@ -1,63 +0,0 @@ -Simple DirectMedia Layer {#mainpage} -======================== - - (SDL) - - Version 2.0 - ---- -http://www.libsdl.org/ - -Simple DirectMedia Layer is a cross-platform development library designed -to provide low level access to audio, keyboard, mouse, joystick, and graphics -hardware via OpenGL and Direct3D. It is used by video playback software, -emulators, and popular games including Valve's award winning catalog -and many Humble Bundle games. - -SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. -Support for other platforms may be found in the source code. - -SDL is written in C, works natively with C++, and there are bindings -available for several other languages, including C# and Python. - -This library is distributed under the zlib license, which can be found -in the file "COPYING.txt". - -The best way to learn how to use SDL is to check out the header files in -the "include" subdirectory and the programs in the "test" subdirectory. -The header files and test programs are well commented and always up to date. - -More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/) - -- [Android](README-android.md) -- [CMake](README-cmake.md) -- [DirectFB](README-directfb.md) -- [DynAPI](README-dynapi.md) -- [Emscripten](README-emscripten.md) -- [Gesture](README-gesture.md) -- [Mercurial](README-hg.md) -- [iOS](README-ios.md) -- [Linux](README-linux.md) -- [OS X](README-macosx.md) -- [Native Client](README-nacl.md) -- [Pandora](README-pandora.md) -- [Supported Platforms](README-platforms.md) -- [Porting information](README-porting.md) -- [PSP](README-psp.md) -- [Raspberry Pi](README-raspberrypi.md) -- [Touch](README-touch.md) -- [WinCE](README-wince.md) -- [Windows](README-windows.md) -- [WinRT](README-winrt.md) - -If you need help with the library, or just want to discuss SDL related -issues, you can join the [developers mailing list](http://www.libsdl.org/mailing-list.php) - -If you want to report bugs or contribute patches, please submit them to -[bugzilla](https://bugzilla.libsdl.org/) - -Enjoy! - - -Sam Lantinga - diff --git a/msvc/SDL2/docs/doxyfile b/msvc/SDL2/docs/doxyfile deleted file mode 100644 index baf1c98d..00000000 --- a/msvc/SDL2/docs/doxyfile +++ /dev/null @@ -1,1560 +0,0 @@ -# Doxyfile 1.5.9 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = SDL - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 2.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./output - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = YES - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = "defined=\"\def\"" \ - "discussion=\"\par Discussion:\n\"" - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set -# FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = YES - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = YES - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = ./doxygen_warn.txt - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = . ../include - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.vhd \ - *.vhdl \ - *.h.in \ - *.h.default \ - *.md - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = ../include/SDL_opengles2_gl2ext.h \ - ../include/SDL_opengles2_gl2platform.h \ - ../include/SDL_opengles2_khrplatform.h \ - ../include/SDL_opengl_glext.h \ - ../include/SDL_opengles2_gl2.h \ - ../include/SDL_opengles2.h \ - ../include/SDL_opengles.h \ - ../include/SDL_opengl.h \ - ../include/SDL_egl.h \ - - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = SDL_ \ - SDL - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = YES - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "SDL 2.0 Doxygen" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.libsdl.sdl20 - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = ./sdl20.chm - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 1 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = ALL - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = YES - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = DOXYGEN_SHOULD_IGNORE_THIS=1 \ - DECLSPEC= \ - SDLCALL= \ - _WIN32=1 - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = ./SDL.tag - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = c:\Perl\bin\perl.exe - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 60 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 2 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = YES - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Options related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/msvc/SDL2/lib/x64/SDL2.dll b/msvc/SDL2/lib/x64/SDL2.dll deleted file mode 100644 index 934f8091..00000000 Binary files a/msvc/SDL2/lib/x64/SDL2.dll and /dev/null differ diff --git a/msvc/SDL2/lib/x64/SDL2.lib b/msvc/SDL2/lib/x64/SDL2.lib deleted file mode 100644 index f4941ae0..00000000 Binary files a/msvc/SDL2/lib/x64/SDL2.lib and /dev/null differ diff --git a/msvc/SDL2/lib/x64/SDL2main.lib b/msvc/SDL2/lib/x64/SDL2main.lib deleted file mode 100644 index 61299465..00000000 Binary files a/msvc/SDL2/lib/x64/SDL2main.lib and /dev/null differ diff --git a/msvc/SDL2/lib/x64/SDL2test.lib b/msvc/SDL2/lib/x64/SDL2test.lib deleted file mode 100644 index 5b032828..00000000 Binary files a/msvc/SDL2/lib/x64/SDL2test.lib and /dev/null differ diff --git a/msvc/fltk/include/FL/Enumerations.H b/msvc/fltk/include/FL/Enumerations.H deleted file mode 100644 index c9cf22c3..00000000 --- a/msvc/fltk/include/FL/Enumerations.H +++ /dev/null @@ -1,1127 +0,0 @@ -// -// "$Id$" -// -// Enumerations for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2017 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - This file contains type definitions and general enumerations. - */ - -#ifndef Fl_Enumerations_H -#define Fl_Enumerations_H - -/* - ****************************************************************************** - * Notes on FL_ABI_VERSION and deprecated (obsolete) FLTK_ABI_VERSION: - * - * (1) FLTK_ABI_VERSION is deprecated, but still defined below. - * Do NOT define FLTK_ABI_VERSION here - it would be overwritten later. - * - * (2) FL_ABI_VERSION is now (as of FLTK 1.3.4) defined by configure - * or CMake. Do NOT define it here. Its definition will be included - * below by "#include ". - * - * (3) If you use the provided IDE files (Windows VC++ or Xcode) you should - * edit the definition in the provided file abi-version.ide. The correct - * file is `/path/to/fltk/abi-version.ide' . - * - ****************************************************************************** - * For more informations on FL_ABI_VERSION see README.abi-version.txt. - ****************************************************************************** - */ - -#include - -# include "Fl_Export.H" -# include "fl_types.h" - -/** \name Version Numbers - - FLTK defines some constants to help the programmer to - find out, for which FLTK version a program is compiled. - - The following constants are defined: - */ -/*@{*/ - -/** - The major release version of this FLTK library. - \sa FL_VERSION - */ -#define FL_MAJOR_VERSION 1 - -/** - The minor release version for this library. - - FLTK remains mostly source-code compatible between minor version changes. - */ -#define FL_MINOR_VERSION 3 - -/** - The patch version for this library. - - FLTK remains binary compatible between patches. - */ -#define FL_PATCH_VERSION 5 - -/** - The FLTK version number as a \em double. - - FL_VERSION is a \em double that describes the major, minor, and patch - version numbers. - - Version 1.2.3 is actually stored as 1.0203 to allow for more than 9 - minor and patch releases. - - \deprecated This \p double version number is retained for compatibility - with existing program code. New code should use \em int FL_API_VERSION - instead. FL_VERSION is deprecated because comparisons of floating point - values may fail due to rounding errors. However, there are currently no - plans to remove this deprecated constant. - - FL_VERSION is equivalent to (double)FL_API_VERSION / 10000. - - \see Fl::version() (deprecated as well) - \see FL_API_VERSION - \see Fl::api_version() - */ -#define FL_VERSION ( (double)FL_MAJOR_VERSION + \ - (double)FL_MINOR_VERSION * 0.01 + \ - (double)FL_PATCH_VERSION * 0.0001 ) - -/** - The FLTK API version number as an \em int. - - FL_API_VERSION is an \em int that describes the major, minor, and patch - version numbers. - - Version 1.2.3 is actually stored as 10203 to allow for more than 9 - minor and patch releases. - - The FL_MAJOR_VERSION, FL_MINOR_VERSION, and FL_PATCH_VERSION constants - give the integral values for the major, minor, and patch releases - respectively. - - \note FL_API_VERSION is intended to replace the deprecated - \em double FL_VERSION. - - \see Fl::api_version() - */ -#define FL_API_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100 + FL_PATCH_VERSION) - -/** - The FLTK ABI (Application Binary Interface) version number as an \em int. - - FL_ABI_VERSION is an \em int that describes the major, minor, and patch - ABI version numbers in the same format as FL_API_VERSION. - - The ABI version number \p FL_ABI_VERSION is usually the same as the - API version \p FL_API_VERSION with the last two digits set to '00'. - - FLTK retains the ABI (Application Binary Interface) during patch - releases of the same major and minor versions. Examples: - - \verbatim - FLTK Version FL_API_VERSION FL_ABI_VERSION FL_VERSION (deprecated) - 1.3.0 10300 10300 1.0300 - 1.3.4 10304 10300 1.0304 - \endverbatim - - Version 1.2.3 is actually stored as 10203 to allow for more than 9 - minor and patch releases. - - The FL_MAJOR_VERSION, FL_MINOR_VERSION, and FL_PATCH_VERSION constants - give the integral values for the major, minor, and patch releases - respectively. - - To enable new ABI-breaking features in patch releases you can configure - FLTK to use a higher FL_ABI_VERSION. - - \see README.abi-version.txt - */ -#ifndef FL_ABI_VERSION -#define FL_ABI_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100) -#endif - -/* - Check if FL_ABI_VERSION is out of allowed range; redefine if necessary. - - This is done to prevent users from defining an illegal ABI version. - - Rule: FL_MAJOR_VERSION * 10000 + FL_MINOR_VERSION * 100 - <= FL_ABI_VERSION <= FL_API_VERSION. - - Example (FLTK 1.3.4): - - 10300 <= FL_ABI_VERSION <= 10304 - - Note: configure + CMake can be used to define FL_ABI_VERSION, but they - do not check validity. This is done here. -*/ - -#if FL_ABI_VERSION < FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100 - -# undef FL_ABI_VERSION -# define FL_ABI_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100) - -#elif FL_ABI_VERSION > FL_API_VERSION - -# undef FL_ABI_VERSION -# define FL_ABI_VERSION FL_API_VERSION - -#endif - -/* - FLTK_ABI_VERSION is deprecated (replaced by FL_ABI_VERSION). - - This deprecated constant will be removed in FLTK 1.4.0 and later. - Please use FL_ABI_VERSION when FLTK 1.4.0 has been released. -*/ - -#ifdef FLTK_ABI_VERSION -#undef FLTK_ABI_VERSION -#endif - -#define FLTK_ABI_VERSION FL_ABI_VERSION - -/*@}*/ // group: Version Numbers - -/** - Every time a user moves the mouse pointer, clicks a button, - or presses a key, an event is generated and sent to your - application. Events can also come from other programs like the - window manager. - - Events are identified by the integer argument passed to the - Fl_Widget::handle() virtual method. Other information about the - most recent event is stored in static locations and acquired by - calling the Fl::event_*() methods. This static information remains - valid until the next event is read from the window system, so it - is ok to look at it outside of the handle() method. - - Event numbers can be converted to their actual names using the - \ref fl_eventnames[] array defined in \#include <FL/names.h> - - \sa Fl::event_text(), Fl::event_key(), class Fl:: - */ -// DEV NOTE: Keep this list in sync with FL/names.H -enum Fl_Event { // events - /** No event. */ - FL_NO_EVENT = 0, - - /** A mouse button has gone down with the mouse pointing at this - widget. You can find out what button by calling Fl::event_button(). - You find out the mouse position by calling Fl::event_x() and - Fl::event_y(). - - A widget indicates that it "wants" the mouse click by returning non-zero - from its Fl_Widget::handle() method. It will then become the - Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events. - If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH - to another widget. - */ - FL_PUSH = 1, - - /** A mouse button has been released. You can find out what button by - calling Fl::event_button(). - - In order to receive the FL_RELEASE event, the widget must return - non-zero when handling FL_PUSH. - */ - FL_RELEASE = 2, - - /** The mouse has been moved to point at this widget. This can - be used for highlighting feedback. If a widget wants to - highlight or otherwise track the mouse, it indicates this by - returning non-zero from its handle() method. It then - becomes the Fl::belowmouse() widget and will receive - FL_MOVE and FL_LEAVE events. - */ - FL_ENTER = 3, - - /** The mouse has moved out of the widget. - In order to receive the FL_LEAVE event, the widget must - return non-zero when handling FL_ENTER. - */ - FL_LEAVE = 4, - - /** The mouse has moved with a button held down. The current button state - is in Fl::event_state(). The mouse position is in Fl::event_x() and - Fl::event_y(). - - In order to receive FL_DRAG events, the widget must return non-zero - when handling FL_PUSH. - */ - FL_DRAG = 5, - - /** This indicates an attempt to give a widget the keyboard focus. - - If a widget wants the focus, it should change itself to display the - fact that it has the focus, and return non-zero from its handle() method. - It then becomes the Fl::focus() widget and gets FL_KEYDOWN, FL_KEYUP, - and FL_UNFOCUS events. - - The focus will change either because the window manager changed which - window gets the focus, or because the user tried to navigate using tab, - arrows, or other keys. You can check Fl::event_key() to figure out why - it moved. For navigation it will be the key pressed and for interaction - with the window manager it will be zero. - */ - FL_FOCUS = 6, - - /** This event is sent to the previous Fl::focus() widget when another - widget gets the focus or the window loses focus. - */ - FL_UNFOCUS = 7, - - /** A key was pressed (FL_KEYDOWN) or released (FL_KEYUP). - Fl_KEYBOARD is a synonym for FL_KEYDOWN. - The key can be found in Fl::event_key(). - The text that the key should insert can be found with Fl::event_text() - and its length is in Fl::event_length(). If you use the key handle() - should return 1. If you return zero then FLTK assumes you ignored the - key and will then attempt to send it to a parent widget. If none of - them want it, it will change the event into a FL_SHORTCUT event. - - To receive FL_KEYBOARD events you must also respond to the FL_FOCUS - and FL_UNFOCUS events. - - If you are writing a text-editing widget you may also want to call - the Fl::compose() function to translate individual keystrokes into - non-ASCII characters. - - FL_KEYUP events are sent to the widget that currently has focus. This - is not necessarily the same widget that received the corresponding - FL_KEYDOWN event because focus may have changed between events. - */ - FL_KEYDOWN = 8, - - /** Equivalent to FL_KEYDOWN. - \see FL_KEYDOWN - */ - FL_KEYBOARD = 8, - - /** Key release event. - \see FL_KEYDOWN - */ - FL_KEYUP = 9, - - /** The user clicked the close button of a window. - This event is used internally only to trigger the callback of - Fl_Window derived classed. The default callback closes the - window calling Fl_Window::hide(). - */ - FL_CLOSE = 10, - - /** The mouse has moved without any mouse buttons held down. - This event is sent to the Fl::belowmouse() widget. - - In order to receive FL_MOVE events, the widget must return - non-zero when handling FL_ENTER. - */ - FL_MOVE = 11, - - /** If the Fl::focus() widget is zero or ignores an FL_KEYBOARD - event then FLTK tries sending this event to every widget it - can, until one of them returns non-zero. FL_SHORTCUT is first - sent to the Fl::belowmouse() widget, then its parents and siblings, - and eventually to every widget in the window, trying to find an - object that returns non-zero. FLTK tries really hard to not to ignore - any keystrokes! - - You can also make "global" shortcuts by using Fl::add_handler(). A - global shortcut will work no matter what windows are displayed or - which one has the focus. - */ - FL_SHORTCUT = 12, - - /** This widget is no longer active, due to Fl_Widget::deactivate() - being called on it or one of its parents. Fl_Widget::active() may - still be true after this, the widget is only active if Fl_Widget::active() - is true on it and all its parents (use Fl_Widget::active_r() to check this). - */ - FL_DEACTIVATE = 13, - - /** This widget is now active, due to Fl_Widget::activate() being - called on it or one of its parents. - */ - FL_ACTIVATE = 14, - - /** This widget is no longer visible, due to Fl_Widget::hide() being - called on it or one of its parents, or due to a parent window being - minimized. Fl_Widget::visible() may still be true after this, but the - widget is visible only if visible() is true for it and all its - parents (use Fl_Widget::visible_r() to check this). - */ - FL_HIDE = 15, - - /** This widget is visible again, due to Fl_Widget::show() being called on - it or one of its parents, or due to a parent window being restored. - Child Fl_Windows respond to this by actually creating the window if not - done already, so if you subclass a window, be sure to pass FL_SHOW - to the base class Fl_Widget::handle() method! - */ - FL_SHOW = 16, - - /** You should get this event some time after you call Fl::paste(). - The contents of Fl::event_text() is the text to insert and the number - of characters is in Fl::event_length(). - */ - FL_PASTE = 17, - - /** The Fl::selection_owner() will get this event before the selection is - moved to another widget. This indicates that some other widget or program - has claimed the selection. Motif programs used this to clear the selection - indication. Most modern programs ignore this. - */ - FL_SELECTIONCLEAR = 18, - - /** The user has moved the mouse wheel. The Fl::event_dx() and Fl::event_dy() - methods can be used to find the amount to scroll horizontally and vertically. - */ - FL_MOUSEWHEEL = 19, - - /** The mouse has been moved to point at this widget. A widget that is - interested in receiving drag'n'drop data must return 1 to receive - FL_DND_DRAG, FL_DND_LEAVE and FL_DND_RELEASE events. - */ - FL_DND_ENTER = 20, - - /** The mouse has been moved inside a widget while dragging data. A - widget that is interested in receiving drag'n'drop data should - indicate the possible drop position. - */ - FL_DND_DRAG = 21, - - /** The mouse has moved out of the widget. - */ - FL_DND_LEAVE = 22, - - /** The user has released the mouse button dropping data into the widget. - If the widget returns 1, it will receive the data in the immediately - following FL_PASTE event. - */ - FL_DND_RELEASE = 23, - /** The screen configuration (number, positions) was changed. - Use Fl::add_handler() to be notified of this event. - */ - FL_SCREEN_CONFIGURATION_CHANGED = 24, - /** The fullscreen state of the window has changed - */ - FL_FULLSCREEN = 25, - /** The user has made a zoom/pinch/magnification gesture. - The Fl::event_dy() method can be used to find magnification amount, - Fl::event_x() and Fl::event_y() are set as well. - */ - FL_ZOOM_GESTURE = 26 -}; - -/** \name When Conditions */ -/*@{*/ -/** These constants determine when a callback is performed. - - \sa Fl_Widget::when(); - \todo doxygen comments for values are incomplete and maybe wrong or unclear - */ -enum Fl_When { // Fl_Widget::when(): - FL_WHEN_NEVER = 0, ///< Never call the callback - FL_WHEN_CHANGED = 1, ///< Do the callback only when the widget value changes - FL_WHEN_NOT_CHANGED = 2, ///< Do the callback whenever the user interacts with the widget - FL_WHEN_RELEASE = 4, ///< Do the callback when the button or key is released and the value changes - FL_WHEN_RELEASE_ALWAYS= 6, ///< Do the callback when the button or key is released, even if the value doesn't change - FL_WHEN_ENTER_KEY = 8, ///< Do the callback when the user presses the ENTER key and the value changes - FL_WHEN_ENTER_KEY_ALWAYS=10, ///< Do the callback when the user presses the ENTER key, even if the value doesn't change - FL_WHEN_ENTER_KEY_CHANGED=11 ///< ? -}; - -/*@}*/ // group: When Conditions - -/** \name Mouse and Keyboard Events - - This and the following constants define the non-ASCII keys on the - keyboard for FL_KEYBOARD and FL_SHORTCUT events. - - \todo FL_Button and FL_key... constants could be structured better - (use an enum or some doxygen grouping ?) - - \sa Fl::event_key() and Fl::get_key(int) (use ascii letters for all other keys): - */ - -/*@{*/ - -// FIXME: These codes collide with valid Unicode keys - -#define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for mouse button n. -#define FL_BackSpace 0xff08 ///< The backspace key. -#define FL_Tab 0xff09 ///< The tab key. -#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards. -#define FL_Enter 0xff0d ///< The enter key. -#define FL_Pause 0xff13 ///< The pause key. -#define FL_Scroll_Lock 0xff14 ///< The scroll lock key. -#define FL_Escape 0xff1b ///< The escape key. -#define FL_Kana 0xff2e ///< The Kana key of JIS keyboards. -#define FL_Eisu 0xff2f ///< The Eisu key of JIS keyboards. -#define FL_Yen 0xff30 ///< The Yen key of JIS keyboards. -#define FL_JIS_Underscore 0xff31 ///< The underscore key of JIS keyboards. -#define FL_Home 0xff50 ///< The home key. -#define FL_Left 0xff51 ///< The left arrow key. -#define FL_Up 0xff52 ///< The up arrow key. -#define FL_Right 0xff53 ///< The right arrow key. -#define FL_Down 0xff54 ///< The down arrow key. -#define FL_Page_Up 0xff55 ///< The page-up key. -#define FL_Page_Down 0xff56 ///< The page-down key. -#define FL_End 0xff57 ///< The end key. -#define FL_Print 0xff61 ///< The print (or print-screen) key. -#define FL_Insert 0xff63 ///< The insert key. -#define FL_Menu 0xff67 ///< The menu key. -#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards -#define FL_Num_Lock 0xff7f ///< The num lock key. -#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n. -#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'. -#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad. -#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n. -#define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys. -#define FL_Shift_L 0xffe1 ///< The lefthand shift key. -#define FL_Shift_R 0xffe2 ///< The righthand shift key. -#define FL_Control_L 0xffe3 ///< The lefthand control key. -#define FL_Control_R 0xffe4 ///< The righthand control key. -#define FL_Caps_Lock 0xffe5 ///< The caps lock key. -#define FL_Meta_L 0xffe7 ///< The left meta/Windows key. -#define FL_Meta_R 0xffe8 ///< The right meta/Windows key. -#define FL_Alt_L 0xffe9 ///< The left alt key. -#define FL_Alt_R 0xffea ///< The right alt key. -#define FL_Delete 0xffff ///< The delete key. - -// These use the Private Use Area (PUA) of the Basic Multilingual Plane -// of Unicode. Guaranteed not to conflict with a proper Unicode character. - -// These primarily map to the XFree86 keysym range -#define FL_Volume_Down 0xEF11 /* Volume control down */ -#define FL_Volume_Mute 0xEF12 /* Mute sound from the system */ -#define FL_Volume_Up 0xEF13 /* Volume control up */ -#define FL_Media_Play 0xEF14 /* Start playing of audio */ -#define FL_Media_Stop 0xEF15 /* Stop playing audio */ -#define FL_Media_Prev 0xEF16 /* Previous track */ -#define FL_Media_Next 0xEF17 /* Next track */ -#define FL_Home_Page 0xEF18 /* Display user's home page */ -#define FL_Mail 0xEF19 /* Invoke user's mail program */ -#define FL_Search 0xEF1B /* Search */ -#define FL_Back 0xEF26 /* Like back on a browser */ -#define FL_Forward 0xEF27 /* Like forward on a browser */ -#define FL_Stop 0xEF28 /* Stop current operation */ -#define FL_Refresh 0xEF29 /* Refresh the page */ -#define FL_Sleep 0xEF2F /* Put system to sleep */ -#define FL_Favorites 0xEF30 /* Show favorite locations */ - -/*@}*/ // group: Mouse and Keyboard Events - -/** \name Mouse Buttons - - These constants define the button numbers for FL_PUSH and FL_RELEASE events. - - \sa Fl::event_button() -*/ - -/*@{*/ - -#define FL_LEFT_MOUSE 1 ///< The left mouse button -#define FL_MIDDLE_MOUSE 2 ///< The middle mouse button -#define FL_RIGHT_MOUSE 3 ///< The right mouse button - -/*@}*/ // group: Mouse Buttons - - -/** \name Event States - - The following constants define bits in the Fl::event_state() value. -*/ - -/*@{*/ // group: Event States - -// FIXME: it would be nice to have the modifiers in the upper 8 bit so that -// a unicode ke (24bit) can be sent as an unsigned with the modifiers. - -#define FL_SHIFT 0x00010000 ///< One of the shift keys is down -#define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on -#define FL_CTRL 0x00040000 ///< One of the ctrl keys is down -#define FL_ALT 0x00080000 ///< One of the alt keys is down -#define FL_NUM_LOCK 0x00100000 ///< The num lock is on - // most X servers do this? -#define FL_META 0x00400000 ///< One of the meta/Windows keys is down - // correct for XFree86 -#define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on - // correct for XFree86 -#define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed -#define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed -#define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed -#define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed -#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed - -#define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now - // FIXME: Unicode needs 24 bits! - -#ifdef __APPLE__ -# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X -# define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X -#else -# define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X -# define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X -#endif // __APPLE__ - -/*@}*/ // group: Event States - -/** \name Box Types - \brief FLTK standard box types - - This enum defines the standard box types included with FLTK. - - FL_NO_BOX means nothing is drawn at all, so whatever is already - on the screen remains. The FL_..._FRAME types only draw their edges, - leaving the interior unchanged. The blue color in Figure 1 - is the area that is not drawn by the frame types. - - \image html boxtypes.png "Figure 1: FLTK standard box types" - \image latex boxtypes.png "FLTK standard box types" width=10cm - \todo Description of boxtypes is incomplete. - See below for the defined enum Fl_Boxtype. - \see src/Fl_get_system_colors.cxx -*/ -/*@{*/ -enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.cxx): - - FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible - FL_FLAT_BOX, ///< a flat box - FL_UP_BOX, ///< see figure 1 - FL_DOWN_BOX, ///< see figure 1 - FL_UP_FRAME, ///< see figure 1 - FL_DOWN_FRAME, ///< see figure 1 - FL_THIN_UP_BOX, ///< see figure 1 - FL_THIN_DOWN_BOX, ///< see figure 1 - FL_THIN_UP_FRAME, ///< see figure 1 - FL_THIN_DOWN_FRAME, ///< see figure 1 - FL_ENGRAVED_BOX, ///< see figure 1 - FL_EMBOSSED_BOX, ///< see figure 1 - FL_ENGRAVED_FRAME, ///< see figure 1 - FL_EMBOSSED_FRAME, ///< see figure 1 - FL_BORDER_BOX, ///< see figure 1 - _FL_SHADOW_BOX, ///< see figure 1 - FL_BORDER_FRAME, ///< see figure 1 - _FL_SHADOW_FRAME, ///< see figure 1 - _FL_ROUNDED_BOX, ///< see figure 1 - _FL_RSHADOW_BOX, ///< see figure 1 - _FL_ROUNDED_FRAME, ///< see figure 1 - _FL_RFLAT_BOX, ///< see figure 1 - _FL_ROUND_UP_BOX, ///< see figure 1 - _FL_ROUND_DOWN_BOX, ///< see figure 1 - _FL_DIAMOND_UP_BOX, ///< see figure 1 - _FL_DIAMOND_DOWN_BOX, ///< see figure 1 - _FL_OVAL_BOX, ///< see figure 1 - _FL_OSHADOW_BOX, ///< see figure 1 - _FL_OVAL_FRAME, ///< see figure 1 - _FL_OFLAT_BOX, ///< see figure 1 - _FL_PLASTIC_UP_BOX, ///< plastic version of FL_UP_BOX - _FL_PLASTIC_DOWN_BOX, ///< plastic version of FL_DOWN_BOX - _FL_PLASTIC_UP_FRAME, ///< plastic version of FL_UP_FRAME - _FL_PLASTIC_DOWN_FRAME, ///< plastic version of FL_DOWN_FRAME - _FL_PLASTIC_THIN_UP_BOX, ///< plastic version of FL_THIN_UP_BOX - _FL_PLASTIC_THIN_DOWN_BOX, ///< plastic version of FL_THIN_DOWN_BOX - _FL_PLASTIC_ROUND_UP_BOX, ///< plastic version of FL_ROUND_UP_BOX - _FL_PLASTIC_ROUND_DOWN_BOX, ///< plastic version of FL_ROUND_DOWN_BOX - _FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX - _FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX - _FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME - _FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME - _FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX - _FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX - _FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME - _FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME - _FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX - _FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX - _FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX - _FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX - _FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME - _FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME - _FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX - _FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX - _FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX - _FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX - FL_FREE_BOXTYPE ///< the first free box type for creation of new box types -}; -extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX(); -#define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX() -#define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1) -extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX(); -#define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX() -#define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2) -extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX(); -#define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX() -#define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2) -extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX(); -#define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX() -extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX(); -#define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX() -extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX(); -#define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX() -#define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1) -extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX(); -#define FL_OVAL_BOX fl_define_FL_OVAL_BOX() -#define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1) -#define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2) -#define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3) - -extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX(); -#define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX() -#define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1) -#define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2) -#define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3) -#define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4) -#define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5) -#define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6) -#define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7) - -extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX(); -#define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX() -#define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1) -#define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2) -#define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3) -#define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4) -#define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5) -#define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6) -#define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7) -#define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8) -#define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9) - -extern FL_EXPORT Fl_Boxtype fl_define_FL_GLEAM_UP_BOX(); -#define FL_GLEAM_UP_BOX fl_define_FL_GLEAM_UP_BOX() -#define FL_GLEAM_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+1) -#define FL_GLEAM_UP_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+2) -#define FL_GLEAM_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+3) -#define FL_GLEAM_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+4) -#define FL_GLEAM_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+5) -#define FL_GLEAM_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+6) -#define FL_GLEAM_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+7) - -// conversions of box types to other boxtypes: -/** - Get the filled version of a frame. - If no filled version of a given frame exists, the behavior of this function - is undefined and some random box or frame is returned. - */ -inline Fl_Boxtype fl_box(Fl_Boxtype b) { - return (Fl_Boxtype)((b1)?b:(b-2)); -} -/** - Get the "pressed" or "down" version of a box. - If no "down" version of a given box exists, the behavior of this function - is undefined and some random box or frame is returned. - */ -inline Fl_Boxtype fl_down(Fl_Boxtype b) { - return (Fl_Boxtype)((b - FL_ALIGN_TOP_LEFT == (FL_ALIGN_TOP|FL_ALIGN_LEFT) != FL_ALIGN_LEFT_TOP. - - \code - Outside alignments (FL_ALIGN_INSIDE is not set): - - TOP_LEFT TOP TOP_RIGHT - +---------------------------------+ - LEFT_TOP| |RIGHT_TOP - | | - LEFT| CENTER |RIGHT - | | - LEFT_BOTTOM| |RIGHT_BOTTOM - +---------------------------------+ - BOTTOM_LEFT BOTTOM BOTTOM_RIGHT - - Inside alignments (FL_ALIGN_INSIDE is set): - - +---------------------------------+ - |TOP_LEFT TOP TOP_RIGHT| - | | - |LEFT CENTER RIGHT| - | | - |BOTTOM_LEFT BOTTOM BOTTOM_RIGHT| - +---------------------------------+ - \endcode - \see #FL_ALIGN_CENTER, etc. - */ -/*@{*/ -/** FLTK type for alignment control */ -typedef unsigned Fl_Align; - /** Align the label horizontally in the middle. */ -const Fl_Align FL_ALIGN_CENTER = (Fl_Align)0; - /** Align the label at the top of the widget. Inside labels appear below the top, - outside labels are drawn on top of the widget. */ -const Fl_Align FL_ALIGN_TOP = (Fl_Align)1; - /** Align the label at the bottom of the widget. */ -const Fl_Align FL_ALIGN_BOTTOM = (Fl_Align)2; - /** Align the label at the left of the widget. Inside labels appear left-justified - starting at the left side of the widget, outside labels are right-justified and - drawn to the left of the widget. */ -const Fl_Align FL_ALIGN_LEFT = (Fl_Align)4; - /** Align the label to the right of the widget. */ -const Fl_Align FL_ALIGN_RIGHT = (Fl_Align)8; - /** Draw the label inside of the widget. */ -const Fl_Align FL_ALIGN_INSIDE = (Fl_Align)16; - /** If the label contains an image, draw the text on top of the image. */ -const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020; - /** If the label contains an image, draw the text below the image. */ -const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000; - /** All parts of the label that are lager than the widget will not be drawn . */ -const Fl_Align FL_ALIGN_CLIP = (Fl_Align)64; - /** Wrap text that does not fit the width of the widget. */ -const Fl_Align FL_ALIGN_WRAP = (Fl_Align)128; - /** If the label contains an image, draw the text to the right of the image. */ -const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100; - /** If the label contains an image, draw the text to the left of the image. */ -const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120; -/** If the label contains an image, draw the image or deimage in the background. */ -const Fl_Align FL_ALIGN_IMAGE_BACKDROP = (Fl_Align)0x0200; -const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT; -const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT; -const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT; -const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT; -const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007; // magic value -const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b; // magic value -const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d; // magic value -const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e; // magic value -const Fl_Align FL_ALIGN_NOWRAP = (Fl_Align)0; // for back compatibility -const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f; // left, right, top, bottom -const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320; // l/r, t/b, backdrop -/*@}*/ - - -/** \name Font Numbers - The following constants define the standard FLTK fonts: - */ -/*@{*/ -/** A font number is an index into the internal font table. */ -typedef int Fl_Font; - -const Fl_Font FL_HELVETICA = 0; ///< Helvetica (or Arial) normal (0) -const Fl_Font FL_HELVETICA_BOLD = 1; ///< Helvetica (or Arial) bold -const Fl_Font FL_HELVETICA_ITALIC = 2; ///< Helvetica (or Arial) oblique -const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; ///< Helvetica (or Arial) bold-oblique -const Fl_Font FL_COURIER = 4; ///< Courier normal -const Fl_Font FL_COURIER_BOLD = 5; ///< Courier bold -const Fl_Font FL_COURIER_ITALIC = 6; ///< Courier italic -const Fl_Font FL_COURIER_BOLD_ITALIC = 7; ///< Courier bold-italic -const Fl_Font FL_TIMES = 8; ///< Times roman -const Fl_Font FL_TIMES_BOLD = 9; ///< Times roman bold -const Fl_Font FL_TIMES_ITALIC = 10; ///< Times roman italic -const Fl_Font FL_TIMES_BOLD_ITALIC = 11; ///< Times roman bold-italic -const Fl_Font FL_SYMBOL = 12; ///< Standard symbol font -const Fl_Font FL_SCREEN = 13; ///< Default monospaced screen font -const Fl_Font FL_SCREEN_BOLD = 14; ///< Default monospaced bold screen font -const Fl_Font FL_ZAPF_DINGBATS = 15; ///< Zapf-dingbats font - -const Fl_Font FL_FREE_FONT = 16; ///< first one to allocate -const Fl_Font FL_BOLD = 1; ///< add this to helvetica, courier, or times -const Fl_Font FL_ITALIC = 2; ///< add this to helvetica, courier, or times -const Fl_Font FL_BOLD_ITALIC = 3; ///< add this to helvetica, courier, or times - -/*@}*/ - -/** Size of a font in pixels. - This is the approximate height of a font in pixels. - */ -typedef int Fl_Fontsize; - -extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size - -/** \name Colors - The Fl_Color type holds an FLTK color value. - - Colors are either 8-bit indexes into a virtual colormap - or 24-bit RGB color values. (See \ref drawing_colors for the default FLTK colormap) - - Color indices occupy the lower 8 bits of the value, while - RGB colors occupy the upper 24 bits, for a byte organization of RGBI. - -
- Fl_Color => 0xrrggbbii
-                | | | |
-                | | | +--- \ref drawing_colors "index" between 0 and 255
-                | | +----- blue color component (8 bit)
-                | +------- green component (8 bit)
-                +--------- red component (8 bit)
- 
- - A color can have either an index or an rgb value. Colors with rgb set - and an index >0 are reserved for special use. - - */ -/*@{*/ -/** An FLTK color value; see also \ref drawing_colors */ -typedef unsigned int Fl_Color; - -// Standard colors. These are used as default colors in widgets and altered as necessary -const Fl_Color FL_FOREGROUND_COLOR = 0; ///< the default foreground color (0) used for labels and text -const Fl_Color FL_BACKGROUND2_COLOR = 7; ///< the default background color for text, list, and valuator widgets -const Fl_Color FL_INACTIVE_COLOR = 8; ///< the inactive foreground color -const Fl_Color FL_SELECTION_COLOR = 15; ///< the default selection/highlight color - - // boxtypes generally limit themselves to these colors so - // the whole ramp is not allocated: - -const Fl_Color FL_GRAY0 = 32; // 'A' -const Fl_Color FL_DARK3 = 39; // 'H' -const Fl_Color FL_DARK2 = 45; // 'N' -const Fl_Color FL_DARK1 = 47; // 'P' -const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color -const Fl_Color FL_LIGHT1 = 50; // 'S' -const Fl_Color FL_LIGHT2 = 52; // 'U' -const Fl_Color FL_LIGHT3 = 54; // 'W' - - // FLTK provides a 5x8x5 color cube that is used with colormap visuals - -const Fl_Color FL_BLACK = 56; -const Fl_Color FL_RED = 88; -const Fl_Color FL_GREEN = 63; -const Fl_Color FL_YELLOW = 95; -const Fl_Color FL_BLUE = 216; -const Fl_Color FL_MAGENTA = 248; -const Fl_Color FL_CYAN = 223; -const Fl_Color FL_DARK_RED = 72; - -const Fl_Color FL_DARK_GREEN = 60; -const Fl_Color FL_DARK_YELLOW = 76; -const Fl_Color FL_DARK_BLUE = 136; -const Fl_Color FL_DARK_MAGENTA = 152; -const Fl_Color FL_DARK_CYAN = 140; - -const Fl_Color FL_WHITE = 255; - - -#define FL_FREE_COLOR (Fl_Color)16 -#define FL_NUM_FREE_COLOR 16 -#define FL_GRAY_RAMP (Fl_Color)32 -#define FL_NUM_GRAY 24 -#define FL_GRAY FL_BACKGROUND_COLOR -#define FL_COLOR_CUBE (Fl_Color)56 -#define FL_NUM_RED 5 -#define FL_NUM_GREEN 8 -#define FL_NUM_BLUE 5 - -FL_EXPORT Fl_Color fl_inactive(Fl_Color c); - -FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg); - -FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight); - -/** Returns a lighter version of the specified color. */ -inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); } - -/** Returns a darker version of the specified color. */ -inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); } - -/** Returns the 24-bit color value closest to \p r, \p g, \p b. */ -inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) { - if (!r && !g && !b) return FL_BLACK; - else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8); -} - -/** Returns the 24-bit color value closest to \p g (grayscale). */ -inline Fl_Color fl_rgb_color(uchar g) { - if (!g) return FL_BLACK; - else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8); -} - -/** Returns a gray color value from black (i == 0) to white (i == FL_NUM_GRAY - 1). - FL_NUM_GRAY is defined to be 24 in the current FLTK release. - To get the closest FLTK gray value to an 8-bit grayscale color 'I' use: - - \code - fl_gray_ramp(I * (FL_NUM_GRAY - 1) / 255) - \endcode -*/ -inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);} - -/** Returns a color out of the color cube. - - \p r must be in the range 0 to FL_NUM_RED (5) minus 1, - \p g must be in the range 0 to FL_NUM_GREEN (8) minus 1, - \p b must be in the range 0 to FL_NUM_BLUE (5) minus 1. - - To get the closest color to a 8-bit set of R,G,B values use: - - \code - fl_color_cube(R * (FL_NUM_RED - 1) / 255, - G * (FL_NUM_GREEN - 1) / 255, - B * (FL_NUM_BLUE - 1) / 255); - \endcode - */ -inline Fl_Color fl_color_cube(int r, int g, int b) { - return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);} - -/*@}*/ // group: Colors - -/** \name Cursors */ -/*@{*/ - -/** The following constants define the mouse cursors that are available in FLTK. - - Cursors are provided by the system when available, or bitmaps built into - FLTK as a fallback. - - \todo enum Fl_Cursor needs maybe an image. -*/ -/* FIXME: We should renumber these, but that will break the ABI */ -enum Fl_Cursor { - FL_CURSOR_DEFAULT = 0, /**< the default cursor, usually an arrow. */ - FL_CURSOR_ARROW = 35, /**< an arrow pointer. */ - FL_CURSOR_CROSS = 66, /**< crosshair. */ - FL_CURSOR_WAIT = 76, /**< busy indicator (e.g. hourglass). */ - FL_CURSOR_INSERT = 77, /**< I-beam. */ - FL_CURSOR_HAND = 31, /**< pointing hand. */ - FL_CURSOR_HELP = 47, /**< question mark pointer. */ - FL_CURSOR_MOVE = 27, /**< 4-pointed arrow or hand. */ - - /* Resize indicators */ - FL_CURSOR_NS = 78, /**< up/down resize. */ - FL_CURSOR_WE = 79, /**< left/right resize. */ - FL_CURSOR_NWSE = 80, /**< diagonal resize. */ - FL_CURSOR_NESW = 81, /**< diagonal resize. */ - FL_CURSOR_N = 70, /**< upwards resize. */ - FL_CURSOR_NE = 69, /**< upwards, right resize. */ - FL_CURSOR_E = 49, /**< rightwards resize. */ - FL_CURSOR_SE = 8, /**< downwards, right resize. */ - FL_CURSOR_S = 9, /**< downwards resize. */ - FL_CURSOR_SW = 7, /**< downwards, left resize. */ - FL_CURSOR_W = 36, /**< leftwards resize. */ - FL_CURSOR_NW = 68, /**< upwards, left resize. */ - - FL_CURSOR_NONE =255 /**< invisible. */ -}; -/*@}*/ // group: Cursors - -/** FD "when" conditions */ -enum { // values for "when" passed to Fl::add_fd() - FL_READ = 1, /**< Call the callback when there is data to be read. */ - FL_WRITE = 4, /**< Call the callback when data can be written without blocking. */ - FL_EXCEPT = 8 /**< Call the callback if an exception occurs on the file. */ -}; - -/** visual types and Fl_Gl_Window::mode() (values match Glut) */ -enum Fl_Mode { - FL_RGB = 0, - FL_INDEX = 1, - FL_SINGLE = 0, - FL_DOUBLE = 2, - FL_ACCUM = 4, - FL_ALPHA = 8, - FL_DEPTH = 16, - FL_STENCIL = 32, - FL_RGB8 = 64, - FL_MULTISAMPLE= 128, - FL_STEREO = 256, - FL_FAKE_SINGLE = 512, // Fake single buffered windows using double-buffer - FL_OPENGL3 = 1024 -}; - -// image alpha blending - -#define FL_IMAGE_WITH_ALPHA 0x40000000 - -/** Damage masks */ -enum Fl_Damage { - FL_DAMAGE_CHILD = 0x01, /**< A child needs to be redrawn. */ - FL_DAMAGE_EXPOSE = 0x02, /**< The window was exposed. */ - FL_DAMAGE_SCROLL = 0x04, /**< The Fl_Scroll widget was scrolled. */ - FL_DAMAGE_OVERLAY = 0x08, /**< The overlay planes need to be redrawn. */ - FL_DAMAGE_USER1 = 0x10, /**< First user-defined damage bit. */ - FL_DAMAGE_USER2 = 0x20, /**< Second user-defined damage bit. */ - FL_DAMAGE_ALL = 0x80 /**< Everything needs to be redrawn. */ -}; - -// FLTK 1.0.x compatibility definitions... -# ifdef FLTK_1_0_COMPAT -# define contrast fl_contrast -# define down fl_down -# define frame fl_frame -# define inactive fl_inactive -# endif // FLTK_1_0_COMPAT - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl.H b/msvc/fltk/include/FL/Fl.H deleted file mode 100644 index 00f589f2..00000000 --- a/msvc/fltk/include/FL/Fl.H +++ /dev/null @@ -1,1420 +0,0 @@ -// -// "$Id$" -// -// Main header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl static class. - */ - -#ifndef Fl_H -# define Fl_H - -#include - -#ifdef FLTK_HAVE_CAIRO -# include -#endif - -# include "fl_utf8.h" -# include "Enumerations.H" -# ifndef Fl_Object -# define Fl_Object Fl_Widget /**< for back compatibility - use Fl_Widget! */ -# endif - -# ifdef check -# undef check -# endif - - -class Fl_Widget; -class Fl_Window; -class Fl_Image; -struct Fl_Label; - -// Keep avoiding having the socket deps at that level but mke sure it will work in both 32 & 64 bit builds -#if defined(WIN32) && !defined(__CYGWIN__) -# if defined(_WIN64) -# define FL_SOCKET unsigned __int64 -# else -# define FL_SOCKET int -# endif -#else -# define FL_SOCKET int -#endif - - -// Pointers you can use to change FLTK to a foreign language. -// Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx -extern FL_EXPORT const char* fl_local_ctrl; -extern FL_EXPORT const char* fl_local_meta; -extern FL_EXPORT const char* fl_local_alt; -extern FL_EXPORT const char* fl_local_shift; - -/** \defgroup callback_functions Callback function typedefs - \brief Typedefs defined in for callback or handler functions passed as function parameters. - - FLTK uses callback functions as parameters for some function calls, e.g. to - set up global event handlers (Fl::add_handler()), to add a timeout handler - (Fl::add_timeout()), and many more. - - The typedefs defined in this group describe the function parameters used to set - up or clear the callback functions and should also be referenced to define the - callback function to handle such events in the user's code. - - \see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(), - Fl::remove_timeout() and others - @{ */ - -/** Signature of some label drawing functions passed as parameters */ -typedef void (Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int h, Fl_Align align); - -/** Signature of some label measurement functions passed as parameters */ -typedef void (Fl_Label_Measure_F)(const Fl_Label *label, int &width, int &height); - -/** Signature of some box drawing functions passed as parameters */ -typedef void (Fl_Box_Draw_F)(int x, int y, int w, int h, Fl_Color color); - -/** Signature of some timeout callback functions passed as parameters */ -typedef void (*Fl_Timeout_Handler)(void *data); - -/** Signature of some wakeup callback functions passed as parameters */ -typedef void (*Fl_Awake_Handler)(void *data); - -/** Signature of add_idle callback functions passed as parameters */ -typedef void (*Fl_Idle_Handler)(void *data); - -/** Signature of set_idle callback functions passed as parameters */ -typedef void (*Fl_Old_Idle_Handler)(); - -/** Signature of add_fd functions passed as parameters */ -typedef void (*Fl_FD_Handler)(FL_SOCKET fd, void *data); - -/** Signature of add_handler functions passed as parameters */ -typedef int (*Fl_Event_Handler)(int event); - -/** Signature of add_system_handler functions passed as parameters */ -typedef int (*Fl_System_Handler)(void *event, void *data); - -/** Signature of set_abort functions passed as parameters */ -typedef void (*Fl_Abort_Handler)(const char *format,...); - -/** Signature of set_atclose functions passed as parameters */ -typedef void (*Fl_Atclose_Handler)(Fl_Window *window, void *data); - -/** Signature of args functions passed as parameters */ -typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i); - -/** Signature of event_dispatch functions passed as parameters. - \see Fl::event_dispatch(Fl_Event_Dispatch) */ -typedef int (*Fl_Event_Dispatch)(int event, Fl_Window *w); - -/** Signature of add_clipboard_notify functions passed as parameters */ -typedef void (*Fl_Clipboard_Notify_Handler)(int source, void *data); - -/** @} */ /* group callback_functions */ - - -/** - The Fl is the FLTK global (static) class containing - state information and global methods for the current application. -*/ -class FL_EXPORT Fl { - Fl() {}; // no constructor! - -private: - static int use_high_res_GL_; - -public: // should be private! -#ifndef FL_DOXYGEN - static int e_number; - static int e_x; - static int e_y; - static int e_x_root; - static int e_y_root; - static int e_dx; - static int e_dy; - static int e_state; - static int e_clicks; - static int e_is_click; - static int e_keysym; - static char* e_text; - static int e_length; - static void *e_clipboard_data; - static const char *e_clipboard_type; - static Fl_Event_Dispatch e_dispatch; - static Fl_Widget* belowmouse_; - static Fl_Widget* pushed_; - static Fl_Widget* focus_; - static int damage_; - static Fl_Widget* selection_owner_; - static Fl_Window* modal_; - static Fl_Window* grab_; - static int compose_state; // used for dead keys (WIN32) or marked text (MacOS) - static void call_screen_init(); // recompute screen number and dimensions -#ifdef __APPLE__ - static void reset_marked_text(); // resets marked text - static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point -#endif -#endif // FL_DOXYGEN - - - /** - If true then flush() will do something. - */ - static void damage(int d) {damage_ = d;} - -public: - /** Enumerator for global FLTK options. - These options can be set system wide, per user, or for the running - application only. - \see Fl::option(Fl_Option, bool) - \see Fl::option(Fl_Option) - */ - typedef enum { - /// When switched on, moving the text cursor beyond the start or end of - /// a text in a text widget will change focus to the next text widget. - /// (This is considered 'old' behavior) - /// - /// When switched off (default), the cursor will stop at the end of the text. - /// Pressing Tab or Ctrl-Tab will advance the keyboard focus. - /// - /// See also: Fl_Input_::tab_nav() - /// - OPTION_ARROW_FOCUS = 0, - // When switched on, FLTK will use the file chooser dialog that comes - // with your operating system whenever possible. When switched off, FLTK - // will present its own file chooser. - // \todo implement me - // OPTION_NATIVE_FILECHOOSER, - // When Filechooser Preview is enabled, the FLTK or native file chooser - // will show a preview of a selected file (if possible) before the user - // decides to choose the file. - // \todo implement me - //OPTION_FILECHOOSER_PREVIEW, - /// If visible focus is switched on (default), FLTK will draw a dotted rectangle - /// inside the widget that will receive the next keystroke. If switched - /// off, no such indicator will be drawn and keyboard navigation - /// is disabled. - OPTION_VISIBLE_FOCUS, - /// If text drag-and-drop is enabled (default), 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. - OPTION_DND_TEXT, - /// If tooltips are enabled (default), hovering the mouse over a widget with a - /// tooltip text will open a little tooltip window until the mouse leaves - /// the widget. If disabled, no tooltip is shown. - OPTION_SHOW_TOOLTIPS, - /// When switched on (default), Fl_Native_File_Chooser runs GTK file dialogs - /// if the GTK library is available on the platform (linux/unix only). - /// When switched off, GTK file dialogs aren't used even if the GTK library is available. - OPTION_FNFC_USES_GTK, - // don't change this, leave it always as the last element - /// For internal use only. - OPTION_LAST - } Fl_Option; - -private: - static unsigned char options_[OPTION_LAST]; - static unsigned char options_read_; - -public: - /* - Return a global setting for all FLTK applications, possibly overridden - by a setting specifically for this application. - */ - static bool option(Fl_Option opt); - - /* - Override an option while the application is running. - */ - static void option(Fl_Option opt, bool val); - - /** - The currently executing idle callback function: DO NOT USE THIS DIRECTLY! - - This is now used as part of a higher level system allowing multiple - idle callback functions to be called. - \see add_idle(), remove_idle() - */ - static void (*idle)(); - -#ifndef FL_DOXYGEN - static Fl_Awake_Handler *awake_ring_; - static void **awake_data_; - static int awake_ring_size_; - static int awake_ring_head_; - static int awake_ring_tail_; - static const char* scheme_; - static Fl_Image* scheme_bg_; - - static int e_original_keysym; // late addition - static int scrollbar_size_; -#endif - - - static int add_awake_handler_(Fl_Awake_Handler, void*); - static int get_awake_handler_(Fl_Awake_Handler&, void*&); - -public: - - // API version number - static double version(); - static int api_version(); - - // ABI version number - static int abi_version(); - - /** - Returns whether the runtime library ABI version is correct. - - This enables you to check the ABI version of the linked FLTK - library at runtime. - - Returns 1 (true) if the compiled ABI version (in the header files) - and the linked library ABI version (used at runtime) are the same, - 0 (false) otherwise. - - Argument \p val can be used to query a particular library ABI version. - Use for instance 10303 to query if the runtime library is compatible - with FLTK ABI version 1.3.3. This is rarely useful. - - The default \p val argument is FL_ABI_VERSION, which checks the version - defined at configure time (i.e. in the header files at program - compilation time) against the linked library version used at runtime. - This is particularly useful if you linked with a shared object library, - but it also concerns static linking. - - \see Fl::abi_version() - */ - static inline int abi_check(const int val = FL_ABI_VERSION) { - return val == abi_version(); - } - - // argument parsers: - static int arg(int argc, char **argv, int& i); - static int args(int argc, char **argv, int& i, Fl_Args_Handler cb = 0); - static void args(int argc, char **argv); - /** - Usage string displayed if Fl::args() detects an invalid argument. - This may be changed to point to customized text at run-time. - */ - static const char* const help; - - // things called by initialization: - static void display(const char*); - static int visual(int); - /** - This does the same thing as Fl::visual(int) but also requires OpenGL - drawing to work. This must be done if you want to draw in - normal windows with OpenGL with gl_start() and gl_end(). - It may be useful to call this so your X windows use the same visual - as an Fl_Gl_Window, which on some servers will reduce colormap flashing. - - See Fl_Gl_Window for a list of additional values for the argument. - */ - static int gl_visual(int, int *alist=0); // platform dependent - static void own_colormap(); - static void get_system_colors(); - static void foreground(uchar, uchar, uchar); - static void background(uchar, uchar, uchar); - static void background2(uchar, uchar, uchar); - - // schemes: - static int scheme(const char *name); - /** See void scheme(const char *name) */ - static const char* scheme() {return scheme_;} - - /** Returns whether the current scheme is the given name. - - This is a fast inline convenience function to support scheme-specific - code in widgets, e.g. in their draw() methods, if required. - - Use a valid scheme name, not \p NULL (although \p NULL is allowed, - this is not a useful argument - see below). - - If Fl::scheme() has not been set or has been set to the default - scheme ("none" or "base"), then this will always return 0 regardless - of the argument, because Fl::scheme() is \p NULL in this case. - - \note The stored scheme name is always lowercase, and this method will - do a case-sensitive compare, so you \b must provide a lowercase string to - return the correct value. This is intentional for performance reasons. - - Example: - \code - if (Fl::is_scheme("gtk+")) { your_code_here(); } - \endcode - - \param[in] name \b lowercase string of requested scheme name. - - \return 1 if the given scheme is active, 0 otherwise. - - \see Fl::scheme(const char *name) - */ - static int is_scheme(const char *name) { - return (scheme_ && name && !strcmp(name,scheme_)); - } - /** - Called by scheme according to scheme name. - Loads or reloads the current scheme selection. - See void scheme(const char *name) - */ - static int reload_scheme(); // platform dependent - static int scrollbar_size(); - static void scrollbar_size(int W); - - // execution: - static int wait(); - static double wait(double time); - static int check(); - static int ready(); - static int run(); - static Fl_Widget* readqueue(); - /** - Adds a one-shot timeout callback. The function will be called by - Fl::wait() at t seconds after this function is called. - The optional void* argument is passed to the callback. - - You can have multiple timeout callbacks. To remove a timeout - callback use Fl::remove_timeout(). - - If you need more accurate, repeated timeouts, use Fl::repeat_timeout() to - reschedule the subsequent timeouts. - - The following code will print "TICK" each second on - stdout with a fair degree of accuracy: - - \code -#include -#include -#include -void callback(void*) { - printf("TICK\n"); - Fl::repeat_timeout(1.0, callback); // retrigger timeout -} -int main() { - Fl_Window win(100,100); - win.show(); - Fl::add_timeout(1.0, callback); // set up first timeout - return Fl::run(); -} - \endcode - */ - static void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent - /** - Repeats a timeout callback from the expiration of the - previous timeout, allowing for more accurate timing. You may only call - this method inside a timeout callback. - - The following code will print "TICK" each second on - stdout with a fair degree of accuracy: - - \code - void callback(void*) { - puts("TICK"); - Fl::repeat_timeout(1.0, callback); - } - - int main() { - Fl::add_timeout(1.0, callback); - return Fl::run(); - } - \endcode - */ - static void repeat_timeout(double t, Fl_Timeout_Handler, void* = 0); // platform dependent - static int has_timeout(Fl_Timeout_Handler, void* = 0); - static void remove_timeout(Fl_Timeout_Handler, void* = 0); - static void add_check(Fl_Timeout_Handler, void* = 0); - static int has_check(Fl_Timeout_Handler, void* = 0); - static void remove_check(Fl_Timeout_Handler, void* = 0); - /** - Adds file descriptor fd to listen to. - - When the fd becomes ready for reading Fl::wait() will call the - callback and then return. The callback is passed the fd and the - arbitrary void* argument. - - The second version takes a when bitfield, with the bits - FL_READ, FL_WRITE, and FL_EXCEPT defined, - to indicate when the callback should be done. - - There can only be one callback of each type for a file descriptor. - Fl::remove_fd() gets rid of all the callbacks for a given - file descriptor. - - Under UNIX any file descriptor can be monitored (files, - devices, pipes, sockets, etc.). Due to limitations in Microsoft Windows, - WIN32 applications can only monitor sockets. - */ - static void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); // platform dependent - /** See void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0) */ - static void add_fd(int fd, Fl_FD_Handler cb, void* = 0); // platform dependent - /** Removes a file descriptor handler. */ - static void remove_fd(int, int when); // platform dependent - /** Removes a file descriptor handler. */ - static void remove_fd(int); // platform dependent - - static void add_idle(Fl_Idle_Handler cb, void* data = 0); - static int has_idle(Fl_Idle_Handler cb, void* data = 0); - static void remove_idle(Fl_Idle_Handler cb, void* data = 0); - /** If true then flush() will do something. */ - static int damage() {return damage_;} - static void redraw(); - static void flush(); - /** \addtogroup group_comdlg - @{ */ - /** - FLTK calls Fl::warning() to output a warning message. - - The default version on Windows returns \e without printing a warning - message, because Windows programs normally don't have stderr (a console - window) enabled. - - The default version on all other platforms prints the warning message to stderr. - - You can override the behavior by setting the function pointer to your - own routine. - - Fl::warning() means that there was a recoverable problem, the display may - be messed up, but the user can probably keep working - all X protocol - errors call this, for example. The default implementation returns after - displaying the message. - \note \#include - */ - static void (*warning)(const char*, ...); - /** - FLTK calls Fl::error() to output a normal error message. - - The default version on Windows displays the error message in a MessageBox window. - - The default version on all other platforms prints the error message to stderr. - - You can override the behavior by setting the function pointer to your - own routine. - - Fl::error() means there is a recoverable error such as the inability to read - an image file. The default implementation returns after displaying the message. - \note \#include - */ - static void (*error)(const char*, ...); - /** - FLTK calls Fl::fatal() to output a fatal error message. - - The default version on Windows displays the error message in a MessageBox window. - - The default version on all other platforms prints the error message to stderr. - - You can override the behavior by setting the function pointer to your - own routine. - - Fl::fatal() must not return, as FLTK is in an unusable state, however your - version may be able to use longjmp or an exception to continue, as long as - it does not call FLTK again. The default implementation exits with status 1 - after displaying the message. - \note \#include - */ - static void (*fatal)(const char*, ...); - /** @} */ - - /** \defgroup fl_windows Windows handling functions - \brief Windows and standard dialogs handling declared in - @{ */ - static Fl_Window* first_window(); - static void first_window(Fl_Window*); - static Fl_Window* next_window(const Fl_Window*); - - /** - Returns the top-most modal() window currently shown. - - This is the most recently shown() window with modal() true, or NULL - if there are no modal() windows shown(). - The modal() window has its handle() method called - for all events, and no other windows will have handle() - called (grab() overrides this). - */ - static Fl_Window* modal() {return modal_;} - /** Returns the window that currently receives all events. - - \return The window that currently receives all events, - or NULL if event grabbing is currently OFF. - */ - static Fl_Window* grab() {return grab_;} - /** Selects the window to grab. - This is used when pop-up menu systems are active. - - Send all events to the passed window no matter where the pointer or - focus is (including in other programs). The window does not have - to be shown() , this lets the handle() method of a - "dummy" window override all event handling and allows you to - map and unmap a complex set of windows (under both X and WIN32 - some window must be mapped because the system interface needs a - window id). - - If grab() is on it will also affect show() of windows by doing - system-specific operations (on X it turns on override-redirect). - These are designed to make menus popup reliably - and faster on the system. - - To turn off grabbing do Fl::grab(0). - - Be careful that your program does not enter an infinite loop - while grab() is on. On X this will lock up your screen! - To avoid this potential lockup, all newer operating systems seem to - limit mouse pointer grabbing to the time during which a mouse button - is held down. Some OS's may not support grabbing at all. - */ - static void grab(Fl_Window*); // platform dependent - /** @} */ - - /** \defgroup fl_events Events handling functions - Fl class events handling API declared in - @{ - */ - // event information: - /** - Returns the last event that was processed. This can be used - to determine if a callback is being done in response to a - keypress, mouse click, etc. - */ - static int event() {return e_number;} - /** - Returns the mouse position of the event relative to the Fl_Window - it was passed to. - */ - static int event_x() {return e_x;} - /** - Returns the mouse position of the event relative to the Fl_Window - it was passed to. - */ - static int event_y() {return e_y;} - /** - Returns the mouse position on the screen of the event. To find the - absolute position of an Fl_Window on the screen, use the - difference between event_x_root(),event_y_root() and - event_x(),event_y(). - */ - static int event_x_root() {return e_x_root;} - /** - Returns the mouse position on the screen of the event. To find the - absolute position of an Fl_Window on the screen, use the - difference between event_x_root(),event_y_root() and - event_x(),event_y(). - */ - static int event_y_root() {return e_y_root;} - /** - Returns the current horizontal mouse scrolling associated with the - FL_MOUSEWHEEL event. Right is positive. - */ - static int event_dx() {return e_dx;} - /** - Returns the current vertical mouse scrolling associated with the - FL_MOUSEWHEEL event. Down is positive. - */ - static int event_dy() {return e_dy;} - /** - Return where the mouse is on the screen by doing a round-trip query to - the server. You should use Fl::event_x_root() and - Fl::event_y_root() if possible, but this is necessary if you are - not sure if a mouse event has been processed recently (such as to - position your first window). If the display is not open, this will - open it. - */ - static void get_mouse(int &,int &); // platform dependent - /** - Returns non zero if we had a double click event. - \retval Non-zero if the most recent FL_PUSH or FL_KEYBOARD was a "double click". - \retval N-1 for N clicks. - A double click is counted if the same button is pressed - again while event_is_click() is true. - - */ - static int event_clicks() {return e_clicks;} - /** - Manually sets the number returned by Fl::event_clicks(). - This can be used to set it to zero so that - later code does not think an item was double-clicked. - \param[in] i corresponds to no double-click if 0, i+1 mouse clicks otherwise - \see int event_clicks() - */ - static void event_clicks(int i) {e_clicks = i;} - /** - Returns non-zero if the mouse has not moved far enough - and not enough time has passed since the last FL_PUSH or - FL_KEYBOARD event for it to be considered a "drag" rather than a - "click". You can test this on FL_DRAG, FL_RELEASE, - and FL_MOVE events. - */ - static int event_is_click() {return e_is_click;} - /** - Clears the value returned by Fl::event_is_click(). - Useful to prevent the next - click from being counted as a double-click or to make a popup menu - pick an item with a single click. Don't pass non-zero to this. - */ - static void event_is_click(int i) {e_is_click = i;} - /** - Gets which particular mouse button caused the current event. - - This returns garbage if the most recent event was not a FL_PUSH or FL_RELEASE event. - \retval FL_LEFT_MOUSE - \retval FL_MIDDLE_MOUSE - \retval FL_RIGHT_MOUSE. - \see Fl::event_buttons() - */ - static int event_button() {return e_keysym-FL_Button;} - /** - Returns the keyboard and mouse button states of the last event. - - This is a bitfield of what shift states were on and what mouse buttons - were held down during the most recent event. - - The legal event state bits are: - - - FL_SHIFT - - FL_CAPS_LOCK - - FL_CTRL - - FL_ALT - - FL_NUM_LOCK - - FL_META - - FL_SCROLL_LOCK - - FL_BUTTON1 - - FL_BUTTON2 - - FL_BUTTON3 - - X servers do not agree on shift states, and FL_NUM_LOCK, FL_META, and - FL_SCROLL_LOCK may not work. The values were selected to match the - XFree86 server on Linux. In addition there is a bug in the way X works - so that the shift state is not correctly reported until the first event - after the shift key is pressed or released. - */ - static int event_state() {return e_state;} - - /** Returns non-zero if any of the passed event state bits are turned on. - - Use \p mask to pass the event states you're interested in. - The legal event state bits are defined in Fl::event_state(). - */ - static int event_state(int mask) {return e_state&mask;} - /** - Gets which key on the keyboard was last pushed. - - The returned integer 'key code' is not necessarily a text - equivalent for the keystroke. For instance: if someone presses '5' on the - numeric keypad with numlock on, Fl::event_key() may return the 'key code' - for this key, and NOT the character '5'. To always get the '5', use Fl::event_text() instead. - - \returns an integer 'key code', or 0 if the last event was not a key press or release. - \see int event_key(int), event_text(), compose(int&). - */ - static int event_key() {return e_keysym;} - /** - Returns the keycode of the last key event, regardless of the NumLock state. - - If NumLock is deactivated, FLTK translates events from the - numeric keypad into the corresponding arrow key events. - event_key() returns the translated key code, whereas - event_original_key() returns the keycode before NumLock translation. - */ - static int event_original_key(){return e_original_keysym;} - /** - Returns true if the given \p key was held - down (or pressed) during the last event. This is constant until - the next event is read from the server. - - Fl::get_key(int) returns true if the given key is held down now. - Under X this requires a round-trip to the server and is much - slower than Fl::event_key(int). - - Keys are identified by the unshifted values. FLTK defines a - set of symbols that should work on most modern machines for every key - on the keyboard: - - \li All keys on the main keyboard producing a printable ASCII - character use the value of that ASCII character (as though shift, - ctrl, and caps lock were not on). The space bar is 32. - \li All keys on the numeric keypad producing a printable ASCII - character use the value of that ASCII character plus FL_KP. - The highest possible value is FL_KP_Last so you can - range-check to see if something is on the keypad. - \li All numbered function keys use the number on the function key plus - FL_F. The highest possible number is FL_F_Last, so you - can range-check a value. - \li Buttons on the mouse are considered keys, and use the button - number (where the left button is 1) plus FL_Button. - \li All other keys on the keypad have a symbol: FL_Escape, - FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause, - FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down, - FL_Left, FL_Up, FL_Right, FL_Down, FL_Iso_Key, FL_Shift_L, FL_Shift_R, - FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R, - FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter. Be - careful not to confuse these with the very similar, but all-caps, - symbols used by Fl::event_state(). - - On X Fl::get_key(FL_Button+n) does not work. - - On WIN32 Fl::get_key(FL_KP_Enter) and Fl::event_key(FL_KP_Enter) do not work. - */ - static int event_key(int key); - /** - Returns true if the given \p key is held down now. - Under X this requires a round-trip to the server and is much - slower than Fl::event_key(int). \see event_key(int) - */ - static int get_key(int key); // platform dependent - /** - Returns the text associated with the current event, including FL_PASTE or FL_DND_RELEASE events. - This can be used in response to FL_KEYUP, FL_KEYDOWN, FL_PASTE, and FL_DND_RELEASE. - - When responding to FL_KEYUP/FL_KEYDOWN, use this function instead of Fl::event_key() - to get the text equivalent of keystrokes suitable for inserting into strings - and text widgets. - - The returned string is guaranteed to be NULL terminated. - However, see Fl::event_length() for the actual length of the string, - in case the string itself contains NULLs that are part of the text data. - - \returns A NULL terminated text string equivalent of the last keystroke. - */ - static const char* event_text() {return e_text;} - /** - Returns the length of the text in Fl::event_text(). There - will always be a nul at this position in the text. However there may - be a nul before that if the keystroke translates to a nul character or - you paste a nul character. - */ - static int event_length() {return e_length;} - - /** During an FL_PASTE event of non-textual data, returns a pointer to the pasted data. - The returned data is an Fl_Image * when the result of Fl::event_clipboard_type() is Fl::clipboard_image. - */ - static void *event_clipboard() { return e_clipboard_data; } - /** Returns the type of the pasted data during an FL_PASTE event. - This type can be Fl::clipboard_plain_text or Fl::clipboard_image. - */ - static const char *event_clipboard_type() {return e_clipboard_type; } - - - static int compose(int &del); - static void compose_reset(); - static int event_inside(int,int,int,int); - static int event_inside(const Fl_Widget*); - static int test_shortcut(Fl_Shortcut); - - /** - Enables the system input methods facilities. This is the default. - \see disable_im() - */ - static void enable_im(); - /** - Disables the system input methods facilities. - \see enable_im() - */ - static void disable_im(); - - // event destinations: - static int handle(int, Fl_Window*); - static int handle_(int, Fl_Window*); - /** Gets the widget that is below the mouse. - \see belowmouse(Fl_Widget*) */ - static Fl_Widget* belowmouse() {return belowmouse_;} - static void belowmouse(Fl_Widget*); - /** Gets the widget that is being pushed. - \see void pushed(Fl_Widget*) */ - static Fl_Widget* pushed() {return pushed_;} - static void pushed(Fl_Widget*); - /** Gets the current Fl::focus() widget. \sa Fl::focus(Fl_Widget*) */ - static Fl_Widget* focus() {return focus_;} - static void focus(Fl_Widget*); - static void add_handler(Fl_Event_Handler h); - static void remove_handler(Fl_Event_Handler h); - static void add_system_handler(Fl_System_Handler h, void *data); - static void remove_system_handler(Fl_System_Handler h); - static void event_dispatch(Fl_Event_Dispatch d); - static Fl_Event_Dispatch event_dispatch(); - /** @} */ - - /** \defgroup fl_clipboard Selection & Clipboard functions - FLTK global copy/cut/paste functions declared in - @{ */ - // cut/paste: - /** - Copies the data pointed to by \p stuff to the selection buffer - (\p destination is 0), the clipboard (\p destination is 1), or - both (\p destination is 2). Copying to both is only relevant on X11, - on other platforms it maps to the clipboard (1). - \p len is the number of relevant bytes in \p stuff. - \p type is always Fl::clipboard_plain_text. - The selection buffer is used for - middle-mouse pastes and for drag-and-drop selections. The - clipboard is used for traditional copy/cut/paste operations. - - \note This function is, at present, intended only to copy UTF-8 encoded textual data. - To copy graphical data, use the Fl_Copy_Surface class. The \p type argument may allow - in the future to copy other kinds of data. - */ -#if FLTK_ABI_VERSION >= 10303 || defined(FL_DOXYGEN) - static void copy(const char* stuff, int len, int destination = 0, const char *type = Fl::clipboard_plain_text); // platform dependent -#else - static void copy(const char* stuff, int len, int destination, const char *type); - static void copy(const char* stuff, int len, int destination = 0); -#endif - -#if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)) - static void copy_image(const unsigned char* data, int W, int H, int destination = 0); // platform dependent -#endif - /** - Pastes the data from the selection buffer (\p source is 0) or the clipboard - (\p source is 1) into \p receiver. - - The selection buffer (\p source is 0) is used for middle-mouse pastes and for - drag-and-drop selections. The clipboard (\p source is 1) is used for - copy/cut/paste operations. - - If \p source is 1, the optional \p type argument indicates what type of data is requested from the clipboard. - At present, Fl::clipboard_plain_text (requesting text data) and - Fl::clipboard_image (requesting image data) are possible. - Set things up so the handle function of the \p receiver widget will be called with an FL_PASTE event some - time in the future if the clipboard does contain data of the requested type. - While processing the FL_PASTE event: - \li if \p type is Fl::clipboard_plain_text, the text string from the specified \p source is in Fl::event_text() - with UTF-8 encoding, and the number of bytes in Fl::event_length(). - If Fl::paste() gets called during the drop step of a files-drag-and-drop operation, - Fl::event_text() contains a list of filenames (see \ref events_dnd). - \li if \p type is Fl::clipboard_image, the pointer returned by Fl::event_clipboard() can be safely cast to - type Fl_Image * to obtain a pointer to the pasted image. Furthermore, starting with FLTK 1.3.4, the image is - of type Fl_RGB_Image across all platforms. - If \p receiver accepts the clipboard image, receiver.handle() should return 1 and the - application should take ownership of this image (that is, delete it after use). - Conversely, if receiver.handle() returns 0, the application must not use the image. - - The receiver should be prepared to be called \e directly by this, or for - it to happen \e later, or possibly not at all. This - allows the window system to take as long as necessary to retrieve - the paste buffer (or even to screw up completely) without complex - and error-prone synchronization code in FLTK. - - \par Platform details for image data: - \li Unix/Linux platform: Clipboard images in PNG or BMP formats are recognized. Requires linking with the fltk_images library. - \li MSWindows platform: Both bitmap and vectorial (Enhanced metafile) data from clipboard - can be pasted as image data. - \li Mac OS X platform: Both bitmap (TIFF) and vectorial (PDF) data from clipboard - can be pasted as image data. - */ -#if FLTK_ABI_VERSION >= 10303 || defined(FL_DOXYGEN) - static void paste(Fl_Widget &receiver, int source, const char *type = Fl::clipboard_plain_text); // platform dependent -#else - static void paste(Fl_Widget &receiver, int source, const char *type); - static void paste(Fl_Widget &receiver, int source /*=0*/); -#endif - /** - FLTK will call the registered callback whenever there is a change to the - selection buffer or the clipboard. The source argument indicates which - of the two has changed. Only changes by other applications are reported. - - Example: - \code - void clip_callback(int source, void *data) { - if ( source == 0 ) printf("CLIP CALLBACK: selection buffer changed\n"); - if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n"); - } - [..] - int main() { - [..] - Fl::add_clipboard_notify(clip_callback); - [..] - } - \endcode - \note Some systems require polling to monitor the clipboard and may - therefore have some delay in detecting changes. - */ - static void add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data = 0); - /** - Stop calling the specified callback when there are changes to the selection - buffer or the clipboard. - */ - static void remove_clipboard_notify(Fl_Clipboard_Notify_Handler h); - /** Returns non 0 if the clipboard contains data matching \p type. - \p type can be Fl::clipboard_plain_text or Fl::clipboard_image. - */ - static int clipboard_contains(const char *type); - /** Denotes plain textual data - */ - static char const * const clipboard_plain_text; - /** Denotes image data - */ - static char const * const clipboard_image; - - /** - Initiate a Drag And Drop operation. The selection buffer should be - filled with relevant data before calling this method. FLTK will - then initiate the system wide drag and drop handling. Dropped data - will be marked as text. - - Create a selection first using: - Fl::copy(const char *stuff, int len, 0) - */ - static int dnd(); // platform dependent - - // These are for back-compatibility only: - /** back-compatibility only: Gets the widget owning the current selection - \see Fl_Widget* selection_owner(Fl_Widget*) */ - static Fl_Widget* selection_owner() {return selection_owner_;} - static void selection_owner(Fl_Widget*); - static void selection(Fl_Widget &owner, const char*, int len); - static void paste(Fl_Widget &receiver); -/** @} */ -/** \defgroup fl_screen Screen functions - fl global screen functions declared in - @{ */ - // screen size: - /** Returns the leftmost x coordinate of the main screen work area. */ - static int x(); // platform dependent - /** Returns the topmost y coordinate of the main screen work area. */ - static int y(); // platform dependent - /** Returns the width in pixels of the main screen work area. */ - static int w(); // platform dependent - /** Returns the height in pixels of the main screen work area. */ - static int h(); // platform dependent - - // multi-head support: - static int screen_count(); - /** - Gets the bounding box of a screen that contains the mouse pointer. - \param[out] X,Y,W,H the corresponding screen bounding box - \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) - */ - static void screen_xywh(int &X, int &Y, int &W, int &H) { - int x, y; - Fl::get_mouse(x, y); - screen_xywh(X, Y, W, H, x, y); - } - static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my); - static void screen_xywh(int &X, int &Y, int &W, int &H, int n); - static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh); - static int screen_num(int x, int y); - static int screen_num(int x, int y, int w, int h); - static void screen_dpi(float &h, float &v, int n=0); - static void screen_work_area(int &X, int &Y, int &W, int &H, int mx, int my); - static void screen_work_area(int &X, int &Y, int &W, int &H, int n); - /** - Gets the bounding box of the work area of the screen that contains the mouse pointer. - \param[out] X,Y,W,H the work area bounding box - \see void screen_work_area(int &x, int &y, int &w, int &h, int mx, int my) - */ - static void screen_work_area(int &X, int &Y, int &W, int &H) { - int x, y; - Fl::get_mouse(x, y); - screen_work_area(X, Y, W, H, x, y); - } - - /** @} */ - - /** \defgroup fl_attributes Color & Font functions - fl global color, font functions. - These functions are declared in or . - @{ */ - - // color map: - static void set_color(Fl_Color, uchar, uchar, uchar); - /** - Sets an entry in the fl_color index table. You can set it to any - 8-bit RGB color. The color is not allocated until fl_color(i) is used. - */ - static void set_color(Fl_Color i, unsigned c); // platform dependent - static unsigned get_color(Fl_Color i); - static void get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue); - /** - Frees the specified color from the colormap, if applicable. - If overlay is non-zero then the color is freed from the - overlay colormap. - */ - static void free_color(Fl_Color i, int overlay = 0); // platform dependent - - // fonts: - static const char* get_font(Fl_Font); - /** - Get a human-readable string describing the family of this face. This - is useful if you are presenting a choice to the user. There is no - guarantee that each face has a different name. The return value points - to a static buffer that is overwritten each call. - - The integer pointed to by \p attributes (if the pointer is not - zero) is set to zero, FL_BOLD or FL_ITALIC or - FL_BOLD | FL_ITALIC. To locate a "family" of fonts, search - forward and back for a set with non-zero attributes, these faces along - with the face with a zero attribute before them constitute a family. - */ - static const char* get_font_name(Fl_Font, int* attributes = 0); - /** - Return an array of sizes in \p sizep. The return value is the - length of this array. The sizes are sorted from smallest to largest - and indicate what sizes can be given to fl_font() that will - be matched exactly (fl_font() will pick the closest size for - other sizes). A zero in the first location of the array indicates a - scalable font, where any size works, although the array may list sizes - that work "better" than others. Warning: the returned array - points at a static buffer that is overwritten each call. Under X this - will open the display. - */ - static int get_font_sizes(Fl_Font, int*& sizep); - static void set_font(Fl_Font, const char*); - static void set_font(Fl_Font, Fl_Font); - /** - FLTK will open the display, and add every fonts on the server to the - face table. It will attempt to put "families" of faces together, so - that the normal one is first, followed by bold, italic, and bold - italic. - - The optional argument is a string to describe the set of fonts to - add. Passing NULL will select only fonts that have the - ISO8859-1 character set (and are thus usable by normal text). Passing - "-*" will select all fonts with any encoding as long as they have - normal X font names with dashes in them. Passing "*" will list every - font that exists (on X this may produce some strange output). Other - values may be useful but are system dependent. With WIN32 NULL - selects fonts with ISO8859-1 encoding and non-NULL selects - all fonts. - - The return value is how many faces are in the table after this is done. - */ - static Fl_Font set_fonts(const char* = 0); // platform dependent - - /** @} */ - /** \defgroup fl_drawings Drawing functions - FLTK global graphics and GUI drawing functions. - These functions are declared in , - and in for offscreen buffer-related ones. - @{ */ - // - /** @} */ - - // labeltypes: - static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*); - /** Sets the functions to call to draw and measure a specific labeltype. */ - static void set_labeltype(Fl_Labeltype, Fl_Labeltype from); // is it defined ? - - // boxtypes: - static Fl_Box_Draw_F *get_boxtype(Fl_Boxtype); - static void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar); - static void set_boxtype(Fl_Boxtype, Fl_Boxtype from); - static int box_dx(Fl_Boxtype); - static int box_dy(Fl_Boxtype); - static int box_dw(Fl_Boxtype); - static int box_dh(Fl_Boxtype); - - static int draw_box_active(); - static Fl_Color box_color(Fl_Color); - static void set_box_color(Fl_Color); - - // back compatibility: - /** \addtogroup fl_windows - @{ */ - /** For back compatibility, sets the void Fl::fatal handler callback */ - static void set_abort(Fl_Abort_Handler f) {fatal = f;} - static void (*atclose)(Fl_Window*,void*); - static void default_atclose(Fl_Window*,void*); - /** For back compatibility, sets the Fl::atclose handler callback. You - can now simply change the callback for the window instead. - \see Fl_Window::callback(Fl_Callback*) */ - static void set_atclose(Fl_Atclose_Handler f) {atclose = f;} - /** @} */ - - /** \addtogroup fl_events - @{ */ - /** Returns non-zero if the Shift key is pressed. */ - static int event_shift() {return e_state&FL_SHIFT;} - /** Returns non-zero if the Control key is pressed. */ - static int event_ctrl() {return e_state&FL_CTRL;} - /** Returns non-zero if the FL_COMMAND key is pressed, either FL_CTRL or on OSX FL_META. */ - static int event_command() {return e_state&FL_COMMAND;} - /** Returns non-zero if the Alt key is pressed. */ - static int event_alt() {return e_state&FL_ALT;} - /** - Returns the mouse buttons state bits; if non-zero, then at least one - button is pressed now. This function returns the button state at the - time of the event. During an FL_RELEASE event, the state - of the released button will be 0. To find out, which button - caused an FL_RELEASE event, you can use Fl::event_button() instead. - \return a bit mask value like { [FL_BUTTON1] | [FL_BUTTON2] | [FL_BUTTON3] } - */ - static int event_buttons() {return e_state&0x7f000000;} - /** - Returns non-zero if mouse button 1 is currently held down. - For more details, see Fl::event_buttons(). - */ - static int event_button1() {return e_state&FL_BUTTON1;} - /** - Returns non-zero if button 2 is currently held down. - For more details, see Fl::event_buttons(). - */ - static int event_button2() {return e_state&FL_BUTTON2;} - /** - Returns non-zero if button 3 is currently held down. - For more details, see Fl::event_buttons(). - */ - static int event_button3() {return e_state&FL_BUTTON3;} - /** @} */ - - /** - Sets an idle callback. - - \deprecated This method is obsolete - use the add_idle() method instead. - */ - static void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;} - /** See grab(Fl_Window*) */ - static void grab(Fl_Window& win) {grab(&win);} - /** Releases the current grabbed window, equals grab(0). - \deprecated Use Fl::grab(0) instead. - \see grab(Fl_Window*) */ - static void release() {grab(0);} - - // Visible focus methods... - /** - Gets or sets the visible keyboard focus on buttons and other - non-text widgets. The default mode is to enable keyboard focus - for all widgets. - */ - static void visible_focus(int v) { option(OPTION_VISIBLE_FOCUS, (v!=0)); } - /** - Gets or sets the visible keyboard focus on buttons and other - non-text widgets. The default mode is to enable keyboard focus - for all widgets. - */ - static int visible_focus() { return option(OPTION_VISIBLE_FOCUS); } - - // Drag-n-drop text operation methods... - /** - Gets or sets whether drag and drop text operations are supported. - This specifically affects whether selected text can - be dragged from text fields or dragged within a text field as a - cut/paste shortcut. - */ - static void dnd_text_ops(int v) { option(OPTION_DND_TEXT, (v!=0)); } - /** - Gets or sets whether drag and drop text operations are - supported. This specifically affects whether selected text can - be dragged from text fields or dragged within a text field as a - cut/paste shortcut. - */ - static int dnd_text_ops() { return option(OPTION_DND_TEXT); } - /** \defgroup fl_multithread Multithreading support functions - fl multithreading support functions declared in - @{ */ - - // Multithreading support: - static int lock(); - static void unlock(); - static void awake(void* message = 0); - /** See void awake(void* message=0). */ - static int awake(Fl_Awake_Handler cb, void* message = 0); - /** - The thread_message() method returns the last message - that was sent from a child by the awake() method. - - See also: \ref advanced_multithreading - */ - static void* thread_message(); // platform dependent - /** @} */ - - /** \defgroup fl_del_widget Safe widget deletion support functions - - These functions, declared in , support deletion of widgets inside callbacks. - - Fl::delete_widget() should be called when deleting widgets - or complete widget trees (Fl_Group, Fl_Window, ...) inside - callbacks. - - The other functions are intended for internal use. The preferred - way to use them is by using the helper class Fl_Widget_Tracker. - - The following is to show how it works ... - - There are three groups of related methods: - - -# scheduled widget deletion - - Fl::delete_widget() schedules widgets for deletion - - Fl::do_widget_deletion() deletes all scheduled widgets - -# widget watch list ("smart pointers") - - Fl::watch_widget_pointer() adds a widget pointer to the watch list - - Fl::release_widget_pointer() removes a widget pointer from the watch list - - Fl::clear_widget_pointer() clears a widget pointer \e in the watch list - -# the class Fl_Widget_Tracker: - - the constructor calls Fl::watch_widget_pointer() - - the destructor calls Fl::release_widget_pointer() - - the access methods can be used to test, if a widget has been deleted - \see Fl_Widget_Tracker. - - @{ */ - // Widget deletion: - static void delete_widget(Fl_Widget *w); - static void do_widget_deletion(); - static void watch_widget_pointer(Fl_Widget *&w); - static void release_widget_pointer(Fl_Widget *&w); - static void clear_widget_pointer(Fl_Widget const *w); - /** @} */ - - /** sets whether GL windows should be drawn at high resolution on Apple - computers with retina displays - \version 1.3.4 - */ - static void use_high_res_GL(int val) { use_high_res_GL_ = val; } - /** returns whether GL windows should be drawn at high resolution on Apple - computers with retina displays. - Default is no. - \version 1.3.4 - */ - static int use_high_res_GL() { return use_high_res_GL_; } - -#ifdef FLTK_HAVE_CAIRO - /** \defgroup group_cairo Cairo Support Functions and Classes - @{ - */ -public: - // Cairo support API - static cairo_t * cairo_make_current(Fl_Window* w); - /** when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, - any current window dc is linked to a current cairo context. - This is not the default, because it may not be necessary - to add cairo support to all fltk supported windows. - When you wish to associate a cairo context in this mode, - you need to call explicitly in your draw() overridden method, - Fl::cairo_make_current(Fl_Window*). This will create a cairo context - but only for this Window. - Still in custom cairo application it is possible to handle - completely this process automatically by setting \p alink to true. - In this last case, you don't need anymore to call Fl::cairo_make_current(). - You can use Fl::cairo_cc() to get the current cairo context anytime. - \note Only available when configure has the --enable-cairo option - */ - static void cairo_autolink_context(bool alink) {cairo_state_.autolink(alink);} - /** - Gets the current autolink mode for cairo support. - \retval false if no cairo context autolink is made for each window. - \retval true if any fltk window is attached a cairo context when it - is current. \see void cairo_autolink_context(bool alink) - \note Only available when configure has the --enable-cairo option - */ - static bool cairo_autolink_context() {return cairo_state_.autolink();} - /** Gets the current cairo context linked with a fltk window. */ - static cairo_t * cairo_cc() { return cairo_state_.cc(); } - /** Sets the current cairo context to \p c. - Set \p own to true if you want fltk to handle this cc deletion. - \note Only available when configure has the --enable-cairo option -*/ - static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); } - -private: - static cairo_t * cairo_make_current(void* gc); - static cairo_t * cairo_make_current(void* gc, int W, int H); - static Fl_Cairo_State cairo_state_; -public: - /** @} */ - -#endif // FLTK_HAVE_CAIRO - -}; - -/** - This class should be used to control safe widget deletion. - - You can use an Fl_Widget_Tracker object to watch another widget, if you - need to know, if this widget has been deleted during a callback. - - This simplifies the use of the "safe widget deletion" methods - Fl::watch_widget_pointer() and Fl::release_widget_pointer() and - makes their use more reliable, because the destructor autmatically - releases the widget pointer from the widget watch list. - - It is intended to be used as an automatic (local/stack) variable, - such that the automatic destructor is called when the object's - scope is left. This ensures that no stale widget pointers are - left in the widget watch list (see example below). - - You can also create Fl_Widget_Tracker objects with \c new, but then it - is your responsibility to delete the object (and thus remove the - widget pointer from the watch list) when it is not needed any more. - - Example: - - \code - int MyClass::handle (int event) { - - if (...) { - Fl_Widget_Tracker wp(this); // watch myself - do_callback(); // call the callback - - if (wp.deleted()) return 1; // exit, if deleted - - // Now we are sure that the widget has not been deleted. - // It is safe to access the widget - - clear_changed(); // access the widget - } - } - \endcode - -*/ -class FL_EXPORT Fl_Widget_Tracker { - - Fl_Widget* wp_; - -public: - - Fl_Widget_Tracker(Fl_Widget *wi); - ~Fl_Widget_Tracker(); - - /** - Returns a pointer to the watched widget. - - This pointer is \c NULL, if the widget has been deleted. - */ - Fl_Widget *widget() {return wp_;} - - /** - Returns 1, if the watched widget has been deleted. - - This is a convenience method. You can also use something like - - if (wp.widget() == 0) // ... - - where \p wp is an Fl_Widget_Tracker object. - */ - int deleted() {return wp_ == 0;} - - /** - Returns 1, if the watched widget exists (has not been deleted). - - This is a convenience method. You can also use something like - - if (wp.widget() != 0) // ... - - where \p wp is an Fl_Widget_Tracker object. - */ - int exists() {return wp_ != 0;} - -}; - - /** \defgroup fl_unicode Unicode and UTF-8 functions - fl global Unicode and UTF-8 handling functions declared in - @{ */ - /** @} */ - -#endif // !Fl_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Adjuster.H b/msvc/fltk/include/FL/Fl_Adjuster.H deleted file mode 100644 index fb20f7d5..00000000 --- a/msvc/fltk/include/FL/Fl_Adjuster.H +++ /dev/null @@ -1,73 +0,0 @@ -// -// "$Id$" -// -// Adjuster widget header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Adjuster widget . */ - -// 3-button "slider", made for Nuke - -#ifndef Fl_Adjuster_H -#define Fl_Adjuster_H - -#ifndef Fl_Valuator_H -#include "Fl_Valuator.H" -#endif - -/** - The Fl_Adjuster widget was stolen from Prisms, and has proven - to be very useful for values that need a large dynamic range. - \image html adjuster1.png - \image latex adjuster1.png "Fl_Adjuster" width=4cm -

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 - 100 * step(), the next by 10 * step() and that - smallest button by step(). Clicking on the buttons - increments by 10 times the amount dragging by a pixel does. Shift + - click decrements by 10 times the amount. -*/ -class FL_EXPORT Fl_Adjuster : public Fl_Valuator { - int drag; - int ix; - int soft_; -protected: - void draw(); - int handle(int); - void value_damage(); -public: - Fl_Adjuster(int X,int Y,int W,int H,const char *l=0); - /** - If "soft" is turned on, the user is allowed to drag the value outside - the range. If they drag the value to one of the ends, let go, then - grab again and continue to drag, they can get to any value. Default is - one. - */ - void soft(int s) {soft_ = s;} - /** - If "soft" is turned on, the user is allowed to drag the value outside - the range. If they drag the value to one of the ends, let go, then - grab again and continue to drag, they can get to any value. Default is - one. - */ - int soft() const {return soft_;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_BMP_Image.H b/msvc/fltk/include/FL/Fl_BMP_Image.H deleted file mode 100644 index 5f0c3011..00000000 --- a/msvc/fltk/include/FL/Fl_BMP_Image.H +++ /dev/null @@ -1,41 +0,0 @@ -// -// "$Id$" -// -// BMP image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_BMP_Image widget . */ - -#ifndef Fl_BMP_Image_H -#define Fl_BMP_Image_H -# include "Fl_Image.H" - -/** - The Fl_BMP_Image class supports loading, caching, - and drawing of Windows Bitmap (BMP) image files. - */ -class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image { - - public: - - Fl_BMP_Image(const char* filename); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Bitmap.H b/msvc/fltk/include/FL/Fl_Bitmap.H deleted file mode 100644 index a5a9b459..00000000 --- a/msvc/fltk/include/FL/Fl_Bitmap.H +++ /dev/null @@ -1,78 +0,0 @@ -// -// "$Id$" -// -// Bitmap header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Bitmap widget . */ - -#ifndef Fl_Bitmap_H -#define Fl_Bitmap_H -# include "Fl_Image.H" - -class Fl_Widget; -struct Fl_Menu_Item; - -/** - The Fl_Bitmap class supports caching and drawing of mono-color - (bitmap) images. Images are drawn using the current color. -*/ -class FL_EXPORT Fl_Bitmap : public Fl_Image { - friend class Fl_Quartz_Graphics_Driver; - friend class Fl_GDI_Graphics_Driver; - friend class Fl_GDI_Printer_Graphics_Driver; - friend class Fl_Xlib_Graphics_Driver; -public: - - /** pointer to raw bitmap data */ - const uchar *array; - /** Non-zero if array points to bitmap data allocated internally */ - int alloc_array; - - private: - int start(int XP, int YP, int WP, int HP, int &cx, int &cy, - int &X, int &Y, int &W, int &H); -#if defined(__APPLE__) || defined(WIN32) - /** for internal use */ - void *id_; -#else - /** for internal use */ - unsigned id_; -#endif // __APPLE__ || WIN32 - - public: - - /** The constructors create a new bitmap from the specified bitmap data */ - Fl_Bitmap(const uchar *bits, int W, int H) : - Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0) {data((const char **)&array, 1);} - /** The constructors create a new bitmap from the specified bitmap data */ - Fl_Bitmap(const char *bits, int W, int H) : - Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0) {data((const char **)&array, 1);} - virtual ~Fl_Bitmap(); - virtual Fl_Image *copy(int W, int H); - Fl_Image *copy() { return copy(w(), h()); } - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); - void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - virtual void uncache(); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Box.H b/msvc/fltk/include/FL/Fl_Box.H deleted file mode 100644 index e1007a7f..00000000 --- a/msvc/fltk/include/FL/Fl_Box.H +++ /dev/null @@ -1,59 +0,0 @@ -// -// "$Id$" -// -// Box header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Box widget . */ - -#ifndef Fl_Box_H -#define Fl_Box_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -/** - This widget simply draws its box, and possibly its label. Putting it - before some other widgets and making it big enough to surround them - will let you draw a frame around them. -*/ -class FL_EXPORT Fl_Box : public Fl_Widget { -protected: - void draw(); -public: - /** - - The first constructor sets box() to FL_NO_BOX, which - means it is invisible. However such widgets are useful as placeholders - or Fl_Group::resizable() - values. To change the box to something visible, use box(n). - - The second form of the constructor sets the box to the specified box - type. -

The destructor removes the box. - */ - Fl_Box(int X, int Y, int W, int H, const char *l=0); - - /** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */ - Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l); - - virtual int handle(int); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Browser.H b/msvc/fltk/include/FL/Fl_Browser.H deleted file mode 100644 index 467c6bf0..00000000 --- a/msvc/fltk/include/FL/Fl_Browser.H +++ /dev/null @@ -1,326 +0,0 @@ -// -// "$Id$" -// -// Browser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Browser widget . */ - -// Forms-compatible browser. Probably useful for other -// lists of textual data. Notice that the line numbers -// start from 1, and 0 means "no line". - -#ifndef Fl_Browser_H -#define Fl_Browser_H - -#include "Fl_Browser_.H" -#include "Fl_Image.H" - -struct FL_BLINE; - -/** - The Fl_Browser widget displays a scrolling list of 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 - named objects to the user. - - Each line in the browser is identified by number. The numbers - start at one (this is so that zero can be reserved for "no line" in - the selective browsers). Unless otherwise noted, the methods do not - check to see if the passed line number is in range and legal. It must - always be greater than zero and <= size(). - - Each line contains a null-terminated string of text and a void * - data pointer. The text string is displayed, the void * - pointer can be used by the callbacks to reference the object the text - describes. - - The base class does nothing when the user clicks on it. The - subclasses - Fl_Select_Browser, - Fl_Hold_Browser, and - Fl_Multi_Browser react to user clicks to select lines in - the browser and do callbacks. - - The base class - Fl_Browser_ provides the scrolling and selection mechanisms of - this and all the subclasses, but the dimensions and appearance of each - item are determined by the subclass. You can use Fl_Browser_ - to display information other than text, or text that is dynamically - produced from your own data structures. If you find that loading the - browser is a lot of work or is inefficient, you may want to make a - subclass of Fl_Browser_. - - Some common coding patterns used for working with Fl_Browser: - \code - // How to loop through all the items in the browser - for ( int t=1; t<=browser->size(); t++ ) { // index 1 based..! - printf("item #%d, label='%s'\n", t, browser->text(t)); - } - \endcode - - Note: If you are subclassing Fl_Browser, it's more efficient - to use the protected methods item_first() and item_next(), since - Fl_Browser internally uses linked lists to manage the browser's items. - For more info, see find_item(int). -*/ -class FL_EXPORT Fl_Browser : public Fl_Browser_ { - - FL_BLINE *first; // the array of lines - FL_BLINE *last; - FL_BLINE *cache; - int cacheline; // line number of cache - int lines; // Number of lines - int full_height_; - const int* column_widths_; - char format_char_; // alternative to @-sign - char column_char_; // alternative to tab - -protected: - - // required routines for Fl_Browser_ subclass: - void* item_first() const ; - void* item_next(void* item) const ; - void* item_prev(void* item) const ; - void* item_last()const ; - int item_selected(void* item) const ; - void item_select(void* item, int val); - int item_height(void* item) const ; - int item_width(void* item) const ; - void item_draw(void* item, int X, int Y, int W, int H) const ; - int full_height() const ; - int incr_height() const ; - const char *item_text(void *item) const; - /** Swap the items \p a and \p b. - You must call redraw() to make any changes visible. - \param[in] a,b the items to be swapped. - \see swap(int,int), item_swap() - */ - void item_swap(void *a, void *b) { swap((FL_BLINE*)a, (FL_BLINE*)b); } - /** Return the item at specified \p line. - \param[in] line The line of the item to return. (1 based) - \returns The item, or NULL if line out of range. - \see item_at(), find_line(), lineno() - */ - void *item_at(int line) const { return (void*)find_line(line); } - - FL_BLINE* find_line(int line) const ; - FL_BLINE* _remove(int line) ; - void insert(int line, FL_BLINE* item); - int lineno(void *item) const ; - void swap(FL_BLINE *a, FL_BLINE *b); - -public: - - void remove(int line); - void add(const char* newtext, void* d = 0); - void insert(int line, const char* newtext, void* d = 0); - void move(int to, int from); - int load(const char* filename); - void swap(int a, int b); - void clear(); - - /** - Returns how many lines are in the browser. - The last line number is equal to this. - Returns 0 if browser is empty. - */ - int size() const { return lines; } - void size(int W, int H) { Fl_Widget::size(W, H); } - - /** - Gets the default text size (in pixels) for the lines in the browser. - */ - Fl_Fontsize textsize() const { return Fl_Browser_::textsize(); } - - /* - Sets the default text size for the lines in the browser to newSize. - Defined and documented in Fl_Browser.cxx - */ - void textsize(Fl_Fontsize newSize); - - int topline() const ; - /** For internal use only? */ - enum Fl_Line_Position { TOP, BOTTOM, MIDDLE }; - void lineposition(int line, Fl_Line_Position pos); - /** - Scrolls the browser so the top item in the browser - is showing the specified \p line. - \param[in] line The line to be displayed at the top. - \see topline(), middleline(), bottomline(), displayed(), lineposition() - */ - void topline(int line) { lineposition(line, TOP); } - /** - Scrolls the browser so the bottom item in the browser - is showing the specified \p line. - \param[in] line The line to be displayed at the bottom. - \see topline(), middleline(), bottomline(), displayed(), lineposition() - */ - void bottomline(int line) { lineposition(line, BOTTOM); } - /** - Scrolls the browser so the middle item in the browser - is showing the specified \p line. - \param[in] line The line to be displayed in the middle. - \see topline(), middleline(), bottomline(), displayed(), lineposition() - */ - void middleline(int line) { lineposition(line, MIDDLE); } - - int select(int line, int val=1); - int selected(int line) const ; - void show(int line); - /** Shows the entire Fl_Browser widget -- opposite of hide(). */ - void show() { Fl_Widget::show(); } - void hide(int line); - /** Hides the entire Fl_Browser widget -- opposite of show(). */ - void hide() { Fl_Widget::hide(); } - int visible(int line) const ; - - int value() const ; - /** - Sets the browser's value(), which selects the specified \p line. - This is the same as calling select(line). - \see select(), selected(), value(), item_select(), item_selected() - */ - void value(int line) { select(line); } - const char* text(int line) const ; - void text(int line, const char* newtext); - void* data(int line) const ; - void data(int line, void* d); - - Fl_Browser(int X, int Y, int W, int H, const char *L = 0); - /** - The destructor deletes all list items and destroys the browser. - */ - ~Fl_Browser() { clear(); } - - /** - Gets the current format code prefix character, which by default is '\@'. - A string of formatting codes at the start of each column are stripped off - and used to modify how the rest of the line is printed: - - \li '\@.' Print rest of line, don't look for more '\@' signs - \li '\@\@' Print rest of line starting with '\@' - \li '\@l' Use a LARGE (24 point) font - \li '\@m' Use a medium large (18 point) font - \li '\@s' Use a small (11 point) font - \li '\@b' Use a bold font (adds FL_BOLD to font) - \li '\@i' Use an italic font (adds FL_ITALIC to font) - \li '\@f' or '\@t' Use a fixed-pitch - font (sets font to FL_COURIER) - \li '\@c' Center the line horizontally - \li '\@r' Right-justify the text - \li '\@B0', '\@B1', ... '\@B255' Fill the backgound with - fl_color(n) - \li '\@C0', '\@C1', ... '\@C255' Use fl_color(n) to draw the text - \li '\@F0', '\@F1', ... Use fl_font(n) to draw the text - \li '\@S1', '\@S2', ... Use point size n to draw the text - \li '\@u' or '\@_' Underline the text. - \li '\@-' draw an engraved line through the middle. - - Notice that the '\@.' command can be used to reliably - terminate the parsing. To print a random string in a random color, use - sprintf("@C%d@.%s", color, string) and it will work even if the - string starts with a digit or has the format character in it. - */ - char format_char() const { return format_char_; } - /** - Sets the current format code prefix character to \p c. - The default prefix is '\@'. Set the prefix to 0 to disable formatting. - \see format_char() for list of '\@' codes - */ - void format_char(char c) { format_char_ = c; } - /** - Gets the current column separator character. - The default is '\\t' (tab). - \see column_char(), column_widths() - */ - char column_char() const { return column_char_; } - /** - Sets the column separator to c. - This will only have an effect if you also set column_widths(). - The default is '\\t' (tab). - \see column_char(), column_widths() - */ - void column_char(char c) { column_char_ = c; } - /** - Gets the current column width array. - This array is zero-terminated and specifies the widths in pixels of - each column. The text is split at each column_char() and each part is - formatted into it's own column. After the last column any remaining - text is formatted into the space between the last column and the - right edge of the browser, even if the text contains instances of - column_char() . The default value is a one-element array of just - a zero, which means there are no columns. - - Example: - \code - Fl_Browser *b = new Fl_Browser(..); - static int widths[] = { 50, 50, 50, 70, 70, 40, 40, 70, 70, 50, 0 }; // widths for each column - b->column_widths(widths); // assign array to widget - b->column_char('\t'); // use tab as the column character - b->add("USER\tPID\tCPU\tMEM\tVSZ\tRSS\tTTY\tSTAT\tSTART\tTIME\tCOMMAND"); - b->add("root\t2888\t0.0\t0.0\t1352\t0\ttty3\tSW\tAug15\t0:00\t@b@f/sbin/mingetty tty3"); - b->add("root\t13115\t0.0\t0.0\t1352\t0\ttty2\tSW\tAug30\t0:00\t@b@f/sbin/mingetty tty2"); - [..] - \endcode - \see column_char(), column_widths() - */ - const int* column_widths() const { return column_widths_; } - /** - Sets the current array to \p arr. Make sure the last entry is zero. - \see column_char(), column_widths() - */ - void column_widths(const int* arr) { column_widths_ = arr; } - - /** - Returns non-zero if \p line has been scrolled to a position where it is being displayed. - Checks to see if the item's vertical position is within the top and bottom - edges of the display window. This does NOT take into account the hide()/show() - status of the widget or item. - \param[in] line The line to be checked - \returns 1 if visible, 0 if not visible. - \see topline(), middleline(), bottomline(), displayed(), lineposition() - */ - int displayed(int line) const { return Fl_Browser_::displayed(find_line(line)); } - - /** - Make the item at the specified \p line visible(). - Functionally similar to show(int line). - If \p line is out of range, redisplay top or bottom of list as appropriate. - \param[in] line The line to be made visible. - \see show(int), hide(int), display(), visible(), make_visible() - */ - void make_visible(int line) { - if (line < 1) Fl_Browser_::display(find_line(1)); - else if (line > lines) Fl_Browser_::display(find_line(lines)); - else Fl_Browser_::display(find_line(line)); - } - - // icon support - void icon(int line, Fl_Image* icon); - Fl_Image* icon(int line) const; - void remove_icon(int line); - - /** For back compatibility only. */ - void replace(int a, const char* b) { text(a, b); } - void display(int line, int val=1); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Browser_.H b/msvc/fltk/include/FL/Fl_Browser_.H deleted file mode 100644 index 613574a0..00000000 --- a/msvc/fltk/include/FL/Fl_Browser_.H +++ /dev/null @@ -1,388 +0,0 @@ -// -// "$Id$" -// -// Common browser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Browser_ widget . */ - -// Yes, I know this should be a template... - -#ifndef Fl_Browser__H -#define Fl_Browser__H - -#ifndef Fl_Group_H -#include "Fl_Group.H" -#endif -#include "Fl_Scrollbar.H" -#include // Fl::scrollbar_size() - -#define FL_NORMAL_BROWSER 0 /**< type() of Fl_Browser */ -#define FL_SELECT_BROWSER 1 /**< type() of FL_Select_Browser */ -#define FL_HOLD_BROWSER 2 /**< type() of Fl_Hold_Browser */ -#define FL_MULTI_BROWSER 3 /**< type() of Fl_Multi_Browser */ - -#define FL_SORT_ASCENDING 0 /**< sort browser items in ascending alphabetic order. */ -#define FL_SORT_DESCENDING 1 /**< sort in descending order */ - -/** - This is the base class for browsers. To be useful it must be - subclassed and several virtual functions defined. The Forms-compatible - browser and the file chooser's browser are subclassed off of this. - - This has been designed so that the subclass has complete control - over the storage of the data, although because next() and - prev() functions are used to index, it works best as a linked list - or as a large block of characters in which the line breaks must be - searched for. - - A great deal of work has been done so that the "height" of a data - object does not need to be determined until it is drawn. This is - useful if actually figuring out the size of an object requires - accessing image data or doing stat() on a file or doing some - other slow operation. - - Keyboard navigation of browser items - ------------------------------------ - The keyboard navigation of browser items is only possible if - visible_focus() is enabled. If disabled, the widget rejects keyboard focus; - Tab and Shift-Tab focus navigation will skip the widget. - - In 'Select' and 'Normal' mode, the widget rejects keyboard focus; - no navigation keys are supported (other than scrollbar positioning). - - In 'Hold' mode, the widget accepts keyboard focus, and Up/Down arrow - keys can navigate the selected item. - - In 'Multi' mode, the widget accepts keyboard focus, and Up/Down arrow - keys navigate the focus box; Space toggles the current item's selection, - Enter selects only the current item (deselects all others). If Shift - (or Ctrl) is combined with Up/Down arrow keys, the current item's - selection state is extended to the next item. In this way one can - extend a selection or de-selection. -*/ -class FL_EXPORT Fl_Browser_ : public Fl_Group { - int position_; // where user wants it scrolled to - int real_position_; // the current vertical scrolling position - int hposition_; // where user wants it panned to - int real_hposition_; // the current horizontal scrolling position - int offset_; // how far down top_ item the real_position is - int max_width; // widest object seen so far - uchar has_scrollbar_; // which scrollbars are enabled - Fl_Font textfont_; - Fl_Fontsize textsize_; - Fl_Color textcolor_; - void* top_; // which item scrolling position is in - void* selection_; // which is selected (except for FL_MULTI_BROWSER) - void *redraw1,*redraw2; // minimal update pointers - void* max_width_item; // which item has max_width_ - int scrollbar_size_; // size of scrollbar trough - - void update_top(); - -protected: - - // All of the following must be supplied by the subclass: - /** - This method must be provided by the subclass - to return the first item in the list. - \see item_first(), item_next(), item_last(), item_prev() - */ - virtual void *item_first() const = 0; - /** - This method must be provided by the subclass - to return the item in the list after \p item. - \see item_first(), item_next(), item_last(), item_prev() - */ - virtual void *item_next(void *item) const = 0; - /** - This method must be provided by the subclass - to return the item in the list before \p item. - \see item_first(), item_next(), item_last(), item_prev() - */ - virtual void *item_prev(void *item) const = 0; - /** - This method must be provided by the subclass - to return the last item in the list. - \see item_first(), item_next(), item_last(), item_prev() - */ - virtual void *item_last() const { return 0L; } - /** - This method must be provided by the subclass to return - the height of \p item in pixels. - Allow for two additional pixels for the list selection box. - \param[in] item The item whose height is returned. - \returns The height of the specified \p item in pixels. - \see item_height(), item_width(), item_quick_height() - */ - virtual int item_height(void *item) const = 0; - /** - This method must be provided by the subclass to return the width of the - \p item in pixels. Allow for two additional pixels for the list - selection box. - \param[in] item The item whose width is returned. - \returns The width of the item in pixels. - */ - virtual int item_width(void *item) const = 0; - virtual int item_quick_height(void *item) const ; - /** - This method must be provided by the subclass to draw the \p item - in the area indicated by \p X, \p Y, \p W, \p H. - */ - 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. - \param[in] item The item whose label text is returned. - \returns The item's text label. (Can be NULL if blank) - */ - virtual const char *item_text(void *item) const { (void)item; return 0L; } - /** - This optional method should be provided by the subclass - to efficiently swap browser items \p a and \p b, such as for sorting. - \param[in] a,b The two items to be swapped. - */ - virtual void item_swap(void *a,void *b) { (void)a; (void)b; } - /** - This method must be provided by the subclass - to return the item for the specified \p index. - \param[in] index The \p index of the item to be returned - \returns The item at the specified \p index. - */ - virtual void *item_at(int index) const { (void)index; return 0L; } - // you don't have to provide these but it may help speed it up: - virtual int full_width() const ; // current width of all items - virtual int full_height() const ; // current height of all items - virtual int incr_height() const ; // average height of an item - // These only need to be done by subclass if you want a multi-browser: - virtual void item_select(void *item,int val=1); - virtual int item_selected(void *item) const ; - - // things the subclass may want to call: - /** - Returns the item that appears at the top of the list. - */ - void *top() const { return top_; } - /** - Returns the item currently selected, or NULL if there is no selection. - - For multiple selection browsers this call returns the currently focused item, - even if it is not selected. To find all selected items, call - Fl_Multi_Browser::selected() for every item in question. - */ - void *selection() const { return selection_; } - void new_list(); // completely clobber all data, as though list replaced - void deleting(void *item); // get rid of any pointers to item - void replacing(void *a,void *b); // change a pointers to b - void swapping(void *a,void *b); // exchange pointers a and b - void inserting(void *a,void *b); // insert b near a - int displayed(void *item) const ; // true if this item is visible - void redraw_line(void *item); // minimal update, no change in size - /** - This method will cause the entire list to be redrawn. - \see redraw_lines(), redraw_line() - */ - void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them - void bbox(int &X,int &Y,int &W,int &H) const; - int leftedge() const; // x position after scrollbar & border - void *find_item(int ypos); // item under mouse - - void draw(); - Fl_Browser_(int X,int Y,int W,int H,const char *L=0); - -public: - - /** - Vertical scrollbar. Public, so that it can be accessed directly. - */ - Fl_Scrollbar scrollbar; - /** - Horizontal scrollbar. Public, so that it can be accessed directly. - */ - Fl_Scrollbar hscrollbar; - - int handle(int event); - void resize(int X,int Y,int W,int H); - - int select(void *item,int val=1,int docallbacks=0); - int select_only(void *item,int docallbacks=0); - int deselect(int docallbacks=0); - /** - Gets the vertical scroll position of the list as a pixel position \p pos. - The position returned is how many pixels of the list are scrolled off the top edge - of the screen. Example: A position of '3' indicates the top 3 pixels of - the list are scrolled off the top edge of the screen. - \see position(), hposition() - */ - int position() const { return position_; } - void position(int pos); // scroll to here - /** - Gets the horizontal 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 left edge - of the screen. Example: A position of '18' indicates the left 18 pixels of - the list are scrolled off the left edge of the screen. - \see position(), hposition() - */ - int hposition() const { return hposition_; } - void hposition(int); // pan to here - void display(void *item); // scroll so this item is shown - - /** - Values for has_scrollbar(). - */ - /** Anonymous enum bit flags for has_scrollbar(). - - bit 0: horizontal - - bit 1: vertical - - bit 2: 'always' (to be combined with bits 0 and 1) - - bit 3-31: reserved for future use - */ - enum { // values for has_scrollbar() - HORIZONTAL = 1, ///< Only show horizontal scrollbar. - VERTICAL = 2, ///< Only show vertical scrollbar. - BOTH = 3, ///< Show both scrollbars. (default) - ALWAYS_ON = 4, ///< Specified scrollbar(s) should 'always' be shown (to be used with HORIZONTAL/VERTICAL) - HORIZONTAL_ALWAYS = 5, ///< Horizontal scrollbar always on. - VERTICAL_ALWAYS = 6, ///< Vertical scrollbar always on. - BOTH_ALWAYS = 7 ///< Both scrollbars always on. - }; - /** - Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar) - */ - uchar has_scrollbar() const { return has_scrollbar_; } - /** - Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH). - By default you can scroll in both directions, and the scrollbars - disappear if the data will fit in the widget. - has_scrollbar() changes this based on the value of \p mode: - - - 0 - No scrollbars. - - - Fl_Browser_::HORIZONTAL - Only a horizontal scrollbar. - - - Fl_Browser_::VERTICAL - Only a vertical scrollbar. - - - Fl_Browser_::BOTH - The default is both scrollbars. - - - Fl_Browser_::HORIZONTAL_ALWAYS - Horizontal scrollbar always on, - vertical always off. - - - Fl_Browser_::VERTICAL_ALWAYS - Vertical scrollbar always on, - horizontal always off. - - - Fl_Browser_::BOTH_ALWAYS - Both always on. - */ - void has_scrollbar(uchar mode) { has_scrollbar_ = mode; } - - /** - Gets the default text font for the lines in the browser. - \see textfont(), textsize(), textcolor() - */ - Fl_Font textfont() const { return textfont_; } - /** - Sets the default text font for the lines in the browser to \p font. - */ - void textfont(Fl_Font font) { textfont_ = font; } - - /** - Gets the default text size (in pixels) for the lines in the browser. - */ - Fl_Fontsize textsize() const { return textsize_; } - /** - Sets the default text size (in pixels) for the lines in the browser to \p size. - */ - void textsize(Fl_Fontsize newSize) { textsize_ = newSize; } - - /** - Gets the default text color for the lines in the browser. - */ - Fl_Color textcolor() const { return textcolor_; } - /** - Sets the default text color for the lines in the browser to color \p col. - */ - void textcolor(Fl_Color col) { textcolor_ = col; } - - /** - Gets the current size of the scrollbars' troughs, in pixels. - - If this value is zero (default), this widget will use the - Fl::scrollbar_size() value as the scrollbar's width. - - \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. - \see Fl::scrollbar_size(int) - */ - int scrollbar_size() const { - return(scrollbar_size_); - } - /** - Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. - - Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL - your widgets' scrollbars. This ensures your application - has a consistent UI, is the default behavior, and is normally - what you want. - - Only use THIS method if you really need to override the global - scrollbar size. The need for this should be rare. - - Setting \p newSize to the special value of 0 causes the widget to - track the global Fl::scrollbar_size(), which is the default. - - \param[in] newSize Sets the scrollbar size in pixels.\n - If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() - \see Fl::scrollbar_size() - */ - void scrollbar_size(int newSize) { - scrollbar_size_ = newSize; - } - /** - This method has been deprecated, existing for backwards compatibility only. - Use scrollbar_size() instead. - This method always returns the global value Fl::scrollbar_size(). - \returns Always returns the global value Fl::scrollbar_size(). - \todo This method should eventually be removed in 1.4+ - */ - int scrollbar_width() const { - return(Fl::scrollbar_size()); - } - /** - This method has been deprecated, existing for backwards compatibility only. - Use scrollbar_size(int) instead. - This method sets the global Fl::scrollbar_size(), and forces this - instance of the widget to use it. - \todo This method should eventually be removed in 1.4+ - */ - void scrollbar_width(int width) { - Fl::scrollbar_size(width); - scrollbar_size_ = 0; - } - /** - Moves the vertical scrollbar to the righthand side of the list. - For back compatibility. - */ - void scrollbar_right() { scrollbar.align(FL_ALIGN_RIGHT); } - /** - Moves the vertical scrollbar to the lefthand side of the list. - For back compatibility. - */ - void scrollbar_left() { scrollbar.align(FL_ALIGN_LEFT); } - void sort(int flags=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Button.H b/msvc/fltk/include/FL/Fl_Button.H deleted file mode 100644 index 33c68496..00000000 --- a/msvc/fltk/include/FL/Fl_Button.H +++ /dev/null @@ -1,176 +0,0 @@ -// -// "$Id$" -// -// Button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Button widget . */ - -#ifndef Fl_Button_H -#define Fl_Button_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -// values for type() -#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and - reverts back to 0 when the button is released */ -#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button -#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other - buttons in the same group with type() == FL_RADIO_BUTTON - are set to zero.*/ -#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility - -extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); - -class Fl_Widget_Tracker; - -/** - \class Fl_Button - \brief Buttons generate callbacks when they are clicked by the user. - - You control exactly when and how by changing the values for type() and - when(). Buttons can also generate callbacks in response to \c FL_SHORTCUT - events. The button can either have an explicit shortcut(int s) value or a - letter shortcut can be indicated in the label() with an '\&' character - before it. For the label shortcut it does not matter if \e Alt is held - down, but if you have an input field in the same window, the user will have - to hold down the \e Alt key so that the input field does not eat the event - first as an \c FL_KEYBOARD event. - - \todo Refactor the doxygen comments for Fl_Button type() documentation. - - For an Fl_Button object, the type() call returns one of: - \li \c FL_NORMAL_BUTTON (0): value() remains unchanged 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 - buttons in the current group with type() == FL_RADIO_BUTTON - are set to zero. - - \todo Refactor the doxygen comments for Fl_Button when() documentation. - - For an Fl_Button object, the following when() values are useful, the default - being \c FL_WHEN_RELEASE: - \li \c 0: The callback is not done, instead changed() is turned on. - \li \c FL_WHEN_RELEASE: The callback is done after the user successfully - clicks the button, or when a shortcut is typed. - \li \c FL_WHEN_CHANGED: The callback is done each time the value() changes - (when the user pushes and releases the button, and as the mouse is - dragged around in and out of the button). -*/ - -class FL_EXPORT Fl_Button : public Fl_Widget { - - int shortcut_; - char value_; - char oldval; - uchar down_box_; - -protected: - - static Fl_Widget_Tracker *key_release_tracker; - static void key_release_timeout(void*); - void simulate_key_action(); - - virtual void draw(); - -public: - - virtual int handle(int); - - Fl_Button(int X, int Y, int W, int H, const char *L = 0); - - int value(int v); - - /** - Returns the current value of the button (0 or 1). - */ - char value() const {return value_;} - - /** - Same as \c value(1). - \see value(int v) - */ - int set() {return value(1);} - - /** - Same as \c value(0). - \see value(int v) - */ - int clear() {return value(0);} - - void setonly(); // this should only be called on FL_RADIO_BUTTONs - - /** - Returns the current shortcut key for the button. - \retval int - */ - int shortcut() const {return shortcut_;} - - /** - Sets the shortcut key to \c s. - Setting this overrides the use of '\&' in the label(). - The value is a bitwise OR of a key and a set of shift flags, for example: - FL_ALT | 'a', or - FL_ALT | (FL_F + 10), or just - 'a'. - A value of 0 disables the shortcut. - - The key can be any value returned by Fl::event_key(), but will usually be - an ASCII letter. Use a lower-case letter unless you require the shift key - to be held down. - - The shift flags can be any set of values accepted by Fl::event_state(). - If the bit is on, that shift key must be pushed. Meta, Alt, Ctrl, and - Shift must be off if they are not in the shift flags (zero for the other - bits indicates a "don't care" setting). - \param[in] s bitwise OR of key and shift flags - */ - void shortcut(int s) {shortcut_ = s;} - - /** - Returns the current down box type, which is drawn when value() is non-zero. - \retval Fl_Boxtype - */ - Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;} - - /** - Sets the down box type. The default value of 0 causes FLTK to figure out - the correct matching down version of box(). - - Some derived classes (e.g. Fl_Round_Button and Fl_Light_Button use - down_box() for special purposes. See docs of these classes. - - \param[in] b down box type - */ - void down_box(Fl_Boxtype b) {down_box_ = b;} - - /// (for backwards compatibility) - void shortcut(const char *s) {shortcut(fl_old_shortcut(s));} - - /// (for backwards compatibility) - Fl_Color down_color() const {return selection_color();} - - /// (for backwards compatibility) - void down_color(unsigned c) {selection_color(c);} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Cairo.H b/msvc/fltk/include/FL/Fl_Cairo.H deleted file mode 100644 index d832c5e5..00000000 --- a/msvc/fltk/include/FL/Fl_Cairo.H +++ /dev/null @@ -1,88 +0,0 @@ -// -// "$Id$" -// -// Main header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Handling transparently platform dependent cairo include files -*/ - -#ifndef FL_CAIRO_H -# define FL_CAIRO_H -# ifdef FLTK_HAVE_CAIRO - -// Cairo is currently supported for the following platforms: -// Win32, Apple Quartz, X11 - -# include - -# include - -/** - \addtogroup group_cairo - @{ -*/ - -/** - Contains all the necessary info on the current cairo context. - A private internal & unique corresponding object is created to - permit cairo context state handling while keeping it opaque. - For internal use only. - \note Only available when configure has the --enable-cairo option -*/ -class FL_EXPORT Fl_Cairo_State { -public: - Fl_Cairo_State() : cc_(0), own_cc_(false), autolink_(false), window_(0), gc_(0) {} - - // access attributes - cairo_t* cc() const {return cc_;} ///< Gets the current cairo context - bool autolink() const {return autolink_;} ///< Gets the autolink option. See Fl::cairo_autolink_context(bool) - /** Sets the current cairo context. - - \p own == \e true (the default) indicates that the cairo context \p c - will be deleted by FLTK internally when another cc is set later. - - \p own == \e false indicates cc deletion is handled externally - by the user program. - */ - void cc(cairo_t* c, bool own=true) { - if (cc_ && own_cc_) cairo_destroy(cc_); - cc_=c; - if (!cc_) window_=0; - own_cc_=own; - } - void autolink(bool b); ///< Sets the autolink option, only available with --enable-cairoext - void window(void* w) {window_=w;} ///< Sets the window \p w to keep track on - void* window() const {return window_;} ///< Gets the last window attached to a cc - void gc(void* c) {gc_=c;} ///< Sets the gc \p c to keep track on - void* gc() const {return gc_;} ///< Gets the last gc attached to a cc - -private: - cairo_t * cc_; // contains the unique autoupdated cairo context - bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup - bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows - // for custom cairo implementations. - void* window_, *gc_; // for keeping track internally of last win+gc treated -}; - -/** @} */ - -# endif // FLTK_HAVE_CAIRO -#endif // FL_CAIRO_H - -// -// End of "$Id$" . -// diff --git a/msvc/fltk/include/FL/Fl_Cairo_Window.H b/msvc/fltk/include/FL/Fl_Cairo_Window.H deleted file mode 100644 index 8f8dac6c..00000000 --- a/msvc/fltk/include/FL/Fl_Cairo_Window.H +++ /dev/null @@ -1,83 +0,0 @@ -// -// "$Id$" -// -// Main header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Cairo_Window Handling transparently a fltk window incorporte a cairo draw callback. -*/ - -#ifndef FL_CAIRO_WINDOW_H -# define FL_CAIRO_WINDOW_H -# ifdef FLTK_HAVE_CAIRO - -// Cairo is currently supported for the following platforms: -// Win32, Apple Quartz, X11 -# include -# include - -/** - \addtogroup group_cairo - @{ -*/ - -/** - This defines a pre-configured cairo fltk window. - This class overloads the virtual draw() method for you, - so that the only thing you have to do is to provide your cairo code. - All cairo context handling is achieved transparently. - \note You can alternatively define your custom cairo fltk window, - and thus at least override the draw() method to provide custom cairo - support. In this case you will probably use Fl::cairo_make_current(Fl_Window*) - to attach a context to your window. You should do it only when your window is - the current window. \see Fl_Window::current() -*/ -class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window { - -public: - Fl_Cairo_Window(int w, int h) : Fl_Double_Window(w,h),draw_cb_(0) {} - -protected: - /** Overloaded to provide cairo callback support */ - void draw() { - Fl_Double_Window::draw(); - // manual method ? if yes explicitly get a cairo_context here - if (!Fl::cairo_autolink_context()) - Fl::cairo_make_current(this); - if (draw_cb_) draw_cb_(this, Fl::cairo_cc()); - } - -public: - /** This defines the cairo draw callback prototype that you must further */ - typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def); - /** - You must provide a draw callback which will implement your cairo rendering. - This method will permit you to set your cairo callback to \p cb. - */ - void set_draw_cb(cairo_draw_cb cb){draw_cb_=cb;} -private: - cairo_draw_cb draw_cb_; -}; - - -/** @} */ - -# endif // FLTK_HAVE_CAIRO -#endif // FL_CAIRO_WINDOW_H - -// -// End of "$Id$" . -// diff --git a/msvc/fltk/include/FL/Fl_Chart.H b/msvc/fltk/include/FL/Fl_Chart.H deleted file mode 100644 index 8664d974..00000000 --- a/msvc/fltk/include/FL/Fl_Chart.H +++ /dev/null @@ -1,151 +0,0 @@ -// -// "$Id$" -// -// Forms chart header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Chart widget . */ - -#ifndef Fl_Chart_H -#define Fl_Chart_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -// values for type() -#define FL_BAR_CHART 0 /**< type() for Bar Chart variant */ -#define FL_HORBAR_CHART 1 /**< type() for Horizontal Bar Chart variant */ -#define FL_LINE_CHART 2 /**< type() for Line Chart variant */ -#define FL_FILL_CHART 3 /**< type() for Fill Line Chart variant */ -#define FL_SPIKE_CHART 4 /**< type() for Spike Chart variant */ -#define FL_PIE_CHART 5 /**< type() for Pie Chart variant */ -#define FL_SPECIALPIE_CHART 6 /**< type() for Special Pie Chart variant */ - -#define FL_FILLED_CHART FL_FILL_CHART /**< for compatibility */ - -#define FL_CHART_MAX 128 /**< max entries per chart */ -#define FL_CHART_LABEL_MAX 18 /**< max label length for entry */ - -/** For internal use only */ -struct FL_CHART_ENTRY { - float val; /**< For internal use only. */ - unsigned col; /**< For internal use only. */ - char str[FL_CHART_LABEL_MAX+1]; /**< For internal use only. */ -}; - -/** - \class Fl_Chart - \brief Fl_Chart displays simple charts. - It is provided for Forms compatibility. - - \image html charts.png - \image latex charts.png "Fl_Chart" width=10cm - \todo Refactor Fl_Chart::type() information. - - The type of an Fl_Chart object can be set using type(uchar t) to: - \li \c FL_BAR_CHART: Each sample value is drawn as a vertical bar. - \li \c FL_FILLED_CHART: The chart is filled from the bottom of the graph - to the sample values. - \li \c FL_HORBAR_CHART: Each sample value is drawn as a horizontal bar. - \li \c FL_LINE_CHART: The chart is drawn as a polyline with vertices at - each sample value. - \li \c FL_PIE_CHART: A pie chart is drawn with each sample value being - drawn as a proportionate slice in the circle. - \li \c FL_SPECIALPIE_CHART: Like \c FL_PIE_CHART, but the first slice is - separated from the pie. - \li \c FL_SPIKE_CHART: Each sample value is drawn as a vertical line. - */ -class FL_EXPORT Fl_Chart : public Fl_Widget { - int numb; - int maxnumb; - int sizenumb; - FL_CHART_ENTRY *entries; - double min,max; - uchar autosize_; - Fl_Font textfont_; - Fl_Fontsize textsize_; - Fl_Color textcolor_; -protected: - void draw(); -public: - Fl_Chart(int X, int Y, int W, int H, const char *L = 0); - - ~Fl_Chart(); - - void clear(); - - void add(double val, const char *str = 0, unsigned col = 0); - - void insert(int ind, double val, const char *str = 0, unsigned col = 0); - - void replace(int ind, double val, const char *str = 0, unsigned col = 0); - - /** - Gets the lower and upper bounds of the chart values. - \param[out] a, b are set to lower, upper - */ - void bounds(double *a,double *b) const {*a = min; *b = max;} - - void bounds(double a,double b); - - /** - Returns the number of data values in the chart. - */ - int size() const {return numb;} - - void size(int W, int H) { Fl_Widget::size(W, H); } - - /** - Gets the maximum number of data values for a chart. - */ - int maxsize() const {return maxnumb;} - - void maxsize(int m); - - /** Gets the chart's text font */ - Fl_Font textfont() const {return textfont_;} - /** Sets the chart's text font to \p s. */ - void textfont(Fl_Font s) {textfont_ = s;} - - /** Gets the chart's text size */ - Fl_Fontsize textsize() const {return textsize_;} - /** gets the chart's text size to \p s. */ - void textsize(Fl_Fontsize s) {textsize_ = s;} - - /** Gets the chart's text color */ - Fl_Color textcolor() const {return textcolor_;} - /** gets the chart's text color to \p n. */ - void textcolor(Fl_Color n) {textcolor_ = n;} - - /** - Get whether the chart will automatically adjust the bounds of the chart. - \returns non-zero if auto-sizing is enabled and zero if disabled. - */ - uchar autosize() const {return autosize_;} - - /** - Set whether the chart will automatically adjust the bounds of the chart. - \param[in] n non-zero to enable automatic resizing, zero to disable. - */ - void autosize(uchar n) {autosize_ = n;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Check_Browser.H b/msvc/fltk/include/FL/Fl_Check_Browser.H deleted file mode 100644 index 9067d757..00000000 --- a/msvc/fltk/include/FL/Fl_Check_Browser.H +++ /dev/null @@ -1,113 +0,0 @@ -// -// "$Id$" -// -// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Check_Browser widget . */ - -#ifndef Fl_Check_Browser_H -#define Fl_Check_Browser_H - -#include "Fl.H" -#include "Fl_Browser_.H" - -/** - The Fl_Check_Browser widget displays a scrolling list of text - lines that may be selected and/or checked by the user. -*/ -class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ { - /* required routines for Fl_Browser_ subclass: */ - - void *item_first() const; - void *item_next(void *) const; - void *item_prev(void *) const; - int item_height(void *) const; - int item_width(void *) const; - void item_draw(void *, int, int, int, int) const; - void item_select(void *, int); - int item_selected(void *) const; - - /* private data */ - - public: // IRIX 5.3 C++ compiler doesn't support private structures... - -#ifndef FL_DOXYGEN - /** For internal use only. */ - struct cb_item { - cb_item *next; /**< For internal use only. */ - cb_item *prev; /**< For internal use only. */ - char checked; /**< For internal use only. */ - char selected; /**< For internal use only. */ - char *text; /**< For internal use only. */ - }; -#endif // !FL_DOXYGEN - - private: - - cb_item *first; - cb_item *last; - cb_item *cache; - int cached_item; - int nitems_; - int nchecked_; - cb_item *find_item(int) const; - int lineno(cb_item *) const; - - public: - - Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0); - /** The destructor deletes all list items and destroys the browser. */ - ~Fl_Check_Browser() { clear(); } - int add(char *s); // add an (unchecked) item - int add(char *s, int b); // add an item and set checked - // both return the new nitems() - int remove(int item); // delete an item. Returns nitems() - - // inline const char * methods to avoid breaking binary compatibility... - /** See int Fl_Check_Browser::add(char *s) */ - int add(const char *s) { return add((char *)s); } - /** See int Fl_Check_Browser::add(char *s) */ - int add(const char *s, int b) { return add((char *)s, b); } - - void clear(); // delete all items - /** - Returns how many lines are in the browser. The last line number is equal to - this. - */ - int nitems() const { return nitems_; } - /** Returns how many items are currently checked. */ - int nchecked() const { return nchecked_; } - int checked(int item) const; - void checked(int item, int b); - /** Equivalent to Fl_Check_Browser::checked(item, 1). */ - void set_checked(int item) { checked(item, 1); } - void check_all(); - void check_none(); - int value() const; // currently selected item - char *text(int item) const; // returns pointer to internal buffer - - protected: - - int handle(int); -}; - -#endif // Fl_Check_Browser_H - -// -// End of "$Id$". -// - diff --git a/msvc/fltk/include/FL/Fl_Check_Button.H b/msvc/fltk/include/FL/Fl_Check_Button.H deleted file mode 100644 index 9c67c73b..00000000 --- a/msvc/fltk/include/FL/Fl_Check_Button.H +++ /dev/null @@ -1,39 +0,0 @@ -// -// "$Id$" -// -// Check button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Check_Button_H -#define Fl_Check_Button_H - -#include "Fl_Light_Button.H" - -/* - class: Fl_Check_Button. - - A button with a "checkmark" to show its status. -*/ - -class FL_EXPORT Fl_Check_Button : public Fl_Light_Button { -public: - Fl_Check_Button(int X, int Y, int W, int H, const char *L = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Choice.H b/msvc/fltk/include/FL/Fl_Choice.H deleted file mode 100644 index 1f93fb40..00000000 --- a/msvc/fltk/include/FL/Fl_Choice.H +++ /dev/null @@ -1,106 +0,0 @@ -// -// "$Id$" -// -// Choice header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Choice widget . */ - -#ifndef Fl_Choice_H -#define Fl_Choice_H - -#include "Fl_Menu_.H" - -/** - \class Fl_Choice - \brief A button that is used to pop up a menu. - - This is a button that, when pushed, pops up a menu (or hierarchy of menus) - defined by an array of Fl_Menu_Item objects. - Motif calls this an OptionButton. - - The only difference between this and a Fl_Menu_Button is that the name of - the most recent chosen menu item is displayed inside the box, while the - label is displayed outside the box. However, since the use of this is most - often to control a single variable rather than do individual callbacks, - some of the Fl_Menu_Button methods are redescribed here in those terms. - - When the user clicks a menu item, value() is set to that item - and then: - - - The item's callback is done if one has been set; the - Fl_Choice is passed as the Fl_Widget* argument, - along with any userdata configured for the callback. - - - If the item does not have a callback, the Fl_Choice widget's - callback is done instead, along with any userdata configured - for it. The callback can determine which item was picked using - value(), mvalue(), item_pathname(), etc. - - All three mouse buttons pop up the menu. The Forms behavior of the first - two buttons to increment/decrement the choice is not implemented. This - could be added with a subclass, however. - - The menu will also pop up in response to shortcuts indicated by putting - a '\&' character in the label(). See Fl_Button::shortcut(int s) for a - description of this. - - Typing the shortcut() of any of the items will do exactly the same as when - you pick the item with the mouse. The '\&' character in item names are - only looked at when the menu is popped up, however. - - \image html choice.png - \image latex choice.png "Fl_Choice" width=4cm - \todo Refactor the doxygen comments for Fl_Choice changed() documentation. - - \li int Fl_Widget::changed() const - This value is true the user picks a different value. It is turned - off by value() and just before doing a callback (the callback can turn - it back on if desired). - \li void Fl_Widget::set_changed() - This method sets the changed() flag. - \li void Fl_Widget::clear_changed() - This method clears the changed() flag. - \li Fl_Boxtype Fl_Choice::down_box() const - Gets the current down box, which is used when the menu is popped up. - The default down box type is \c FL_DOWN_BOX. - \li void Fl_Choice::down_box(Fl_Boxtype b) - Sets the current down box type to \p b. - */ -class FL_EXPORT Fl_Choice : public Fl_Menu_ { -protected: - void draw(); -public: - int handle(int); - - Fl_Choice(int X, int Y, int W, int H, const char *L = 0); - - /** - Gets the index of the last item chosen by the user. - The index is zero initially. - */ - int value() const {return Fl_Menu_::value();} - - int value(int v); - - int value(const Fl_Menu_Item* v); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Clock.H b/msvc/fltk/include/FL/Fl_Clock.H deleted file mode 100644 index 94fe0462..00000000 --- a/msvc/fltk/include/FL/Fl_Clock.H +++ /dev/null @@ -1,128 +0,0 @@ -// -// "$Id$" -// -// Clock header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Clock, Fl_Clock_Output widgets . */ - -#ifndef Fl_Clock_H -#define Fl_Clock_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -// values for type: -#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */ -#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */ -#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */ -#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */ - -// fabien: Please keep the horizontal formatting of both images in class desc, -// don't lose vert. space for nothing! - -/** - \class Fl_Clock_Output - \brief This widget can be used to display a program-supplied time. - - The time shown on the clock is not updated. To display the current time, - use Fl_Clock instead. - - \htmlonly
-
type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK
\endhtmlonly - \image html clock.png - \htmlonly \endhtmlonly - \image html round_clock.png - \htmlonly
\endhtmlonly - \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm - \image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm - */ -class FL_EXPORT Fl_Clock_Output : public Fl_Widget { - int hour_, minute_, second_; - ulong value_; - void drawhands(Fl_Color,Fl_Color); // part of draw -protected: - void draw(); - void draw(int X, int Y, int W, int H); -public: - - Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0); - - void value(ulong v); // set to this Unix time - - void value(int H, int m, int s); - - /** - Returns the displayed time. - Returns the time in seconds since the UNIX epoch (January 1, 1970). - \see value(ulong) - */ - ulong value() const {return value_;} - - /** - Returns the displayed hour (0 to 23). - \see value(), minute(), second() - */ - int hour() const {return hour_;} - - /** - Returns the displayed minute (0 to 59). - \see value(), hour(), second() - */ - int minute() const {return minute_;} - - /** - Returns the displayed second (0 to 60, 60=leap second). - \see value(), hour(), minute() - */ - int second() const {return second_;} -}; - -// a Fl_Clock displays the current time always by using a timeout: - -/** - \class Fl_Clock - \brief This widget provides a round analog clock display. - - Fl_Clock is provided for Forms compatibility. - It installs a 1-second timeout callback using Fl::add_timeout(). - You can choose the rounded or square type of the clock with type(), see below. - \htmlonly
-
type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK
\endhtmlonly - \image html clock.png - \htmlonly \endhtmlonly - \image html round_clock.png - \htmlonly
\endhtmlonly - \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm - \image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm - */ -class FL_EXPORT Fl_Clock : public Fl_Clock_Output { -public: - int handle(int); - - Fl_Clock(int X, int Y, int W, int H, const char *L = 0); - - Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L); - - ~Fl_Clock(); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Color_Chooser.H b/msvc/fltk/include/FL/Fl_Color_Chooser.H deleted file mode 100644 index e9a5c577..00000000 --- a/msvc/fltk/include/FL/Fl_Color_Chooser.H +++ /dev/null @@ -1,190 +0,0 @@ -// -// "$Id$" -// -// Color chooser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl_Color_Chooser widget . */ - -// The color chooser object and the color chooser popup. The popup -// is just a window containing a single color chooser and some boxes -// to indicate the current and cancelled color. - -#ifndef Fl_Color_Chooser_H -#define Fl_Color_Chooser_H - -#include -#include -#include -#include -#include - -#ifndef FL_DOXYGEN - -/** For internal use only */ -class FL_EXPORT Flcc_HueBox : public Fl_Widget { - int px, py; -protected: - void draw(); - int handle_key(int); -public: - int handle(int); - Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) { - px = py = 0;} -}; - -/** For internal use only */ -class FL_EXPORT Flcc_ValueBox : public Fl_Widget { - int py; -protected: - void draw(); - int handle_key(int); -public: - int handle(int); - Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) { - py = 0;} -}; - -/** For internal use only */ -class FL_EXPORT Flcc_Value_Input : public Fl_Value_Input { -public: - int format(char*); - Flcc_Value_Input(int X, int Y, int W, int H) : Fl_Value_Input(X,Y,W,H) {} -}; - -#endif // !FL_DOXYGEN - -/** \addtogroup group_comdlg - @{ */ - -/** - \class Fl_Color_Chooser - \brief The Fl_Color_Chooser widget provides a standard RGB color chooser. - - \image html fl_color_chooser.jpg - \image latex fl_color_chooser.jpg "fl_color_chooser()" width=5cm - - You can place any number of the widgets into a panel of your own design. - The diagram shows the widget as part of a color chooser dialog created by - the fl_color_chooser() function. The Fl_Color_Chooser widget contains the - hue box, value slider, and rgb input fields from the above diagram (it - does not have the color chips or the Cancel or OK buttons). - The callback is done every time the user changes the rgb value. It is not - done if they move the hue control in a way that produces the \e same rgb - value, such as when saturation or value is zero. - - The fl_color_chooser() function pops up a window to let the user pick an - arbitrary RGB color. They can pick the hue and saturation in the "hue box" - on the left (hold down CTRL to just change the saturation), and the - brightness using the vertical slider. Or they can type the 8-bit numbers - into the RGB Fl_Value_Input fields, or drag the mouse across them to adjust - them. The pull-down menu lets the user set the input fields to show RGB, - HSV, or 8-bit RGB (0 to 255). - - fl_color_chooser() returns non-zero if the user picks ok, and updates the - RGB values. If the user picks cancel or closes the window this returns - zero and leaves RGB unchanged. - - If you use the color chooser on an 8-bit screen, it will allocate all the - available colors, leaving you no space to exactly represent the color the - user picks! You can however use fl_rectf() to fill a region with a simulated - color using dithering. - */ -/** @} */ -class FL_EXPORT Fl_Color_Chooser : public Fl_Group { - Flcc_HueBox huebox; - Flcc_ValueBox valuebox; - Fl_Choice choice; - Flcc_Value_Input rvalue; - Flcc_Value_Input gvalue; - Flcc_Value_Input bvalue; - Fl_Box resize_box; - double hue_, saturation_, value_; - double r_, g_, b_; - void set_valuators(); - static void rgb_cb(Fl_Widget*, void*); - static void mode_cb(Fl_Widget*, void*); -public: - - /** - Returns which Fl_Color_Chooser variant is currently active - \return color modes are rgb(0), byte(1), hex(2), or hsv(3) - */ - int mode() {return choice.value();} - - /** - Set which Fl_Color_Chooser variant is currently active - \param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3) - */ - void mode(int newMode); - - /** - Returns the current hue. - 0 <= hue < 6. Zero is red, one is yellow, two is green, etc. - This value is convenient for the internal calculations - some other - systems consider hue to run from zero to one, or from 0 to 360. - */ - double hue() const {return hue_;} - - /** - Returns the saturation. - 0 <= saturation <= 1. - */ - double saturation() const {return saturation_;} - - /** - Returns the value/brightness. - 0 <= value <= 1. - */ - double value() const {return value_;} - - /** - Returns the current red value. - 0 <= r <= 1. - */ - double r() const {return r_;} - - /** - Returns the current green value. - 0 <= g <= 1. - */ - double g() const {return g_;} - - /** - Returns the current blue value. - 0 <= b <= 1. - */ - double b() const {return b_;} - - int hsv(double H, double S, double V); - - int rgb(double R, double G, double B); - - static void hsv2rgb(double H, double S, double V, double& R, double& G, double& B); - - static void rgb2hsv(double R, double G, double B, double& H, double& S, double& V); - - Fl_Color_Chooser(int X, int Y, int W, int H, const char *L = 0); -}; - -FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b, int m=-1); -FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m=-1); - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Copy_Surface.H b/msvc/fltk/include/FL/Fl_Copy_Surface.H deleted file mode 100644 index 6b3f5079..00000000 --- a/msvc/fltk/include/FL/Fl_Copy_Surface.H +++ /dev/null @@ -1,137 +0,0 @@ -// -// "$Id$" -// -// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Copy_Surface_H -#define Fl_Copy_Surface_H - -#include -#include -#include - -/** Supports copying of graphical data to the clipboard. - -
After creation of an Fl_Copy_Surface object, call set_current() on it, and all subsequent graphics requests - will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw() - ) or to use any of the \ref fl_drawings or the \ref fl_attributes. - Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data. -
Fl_GL_Window 's can be copied to the clipboard as well. -
Usage example: - \code - Fl_Widget *g = ...; // a widget you want to copy to the clipboard - Fl_Copy_Surface *copy_surf = new Fl_Copy_Surface(g->w(), g->h()); // create an Fl_Copy_Surface object - copy_surf->set_current(); // direct graphics requests to the clipboard - fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background - copy_surf->draw(g); // draw the g widget in the clipboard - delete copy_surf; // after this, the clipboard is loaded - Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display - \endcode - Platform details: - \li MSWindows: Transparent RGB images copy without transparency. - The graphical data are copied to the clipboard as an 'enhanced metafile'. - \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. - 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. -*/ -class FL_EXPORT Fl_Copy_Surface : public Fl_Surface_Device { -private: - int width; - int height; - Fl_Paged_Device *helper; -#ifdef __APPLE__ - CFMutableDataRef pdfdata; - CGContextRef oldgc; - CGContextRef gc; - void prepare_copy_pdf_and_tiff(int w, int h); - void complete_copy_pdf_and_tiff(); - void init_PDF_context(int w, int h); - static size_t MyPutBytes(void* info, const void* buffer, size_t count); -#elif defined(WIN32) - HDC oldgc; - HDC gc; -#else // Xlib - Fl_Offscreen xid; - Window oldwindow; - Fl_Surface_Device *_ss; -#endif -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_Copy_Surface(int w, int h); - ~Fl_Copy_Surface(); - void set_current(); - void draw(Fl_Widget* widget, int delta_x = 0, int delta_y = 0); - void draw_decorated_window(Fl_Window* win, int delta_x = 0, int delta_y = 0); - /** Returns the pixel width of the copy surface */ - int w() { return width; } - /** Returns the pixel height of the copy surface */ - int h() { return height; } -}; - -#if defined(__APPLE__) - -/* Mac class to reimplement Fl_Paged_Device::printable_rect() */ -class FL_EXPORT Fl_Quartz_Surface_ : public Fl_System_Printer { -protected: - int width; - int height; -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_Quartz_Surface_(int w, int h); - virtual int printable_rect(int *w, int *h); - virtual ~Fl_Quartz_Surface_() {}; -}; - -#elif defined(WIN32) - -/* Win class to implement translate()/untranslate() */ -class FL_EXPORT Fl_GDI_Surface_ : public Fl_Paged_Device { - int width; - int height; - unsigned depth; - POINT origins[10]; -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_GDI_Surface_(); - virtual void translate(int x, int y); - virtual void untranslate(); - virtual ~Fl_GDI_Surface_(); -}; - -#elif !defined(FL_DOXYGEN) - -/* Xlib class to implement translate()/untranslate() */ -class FL_EXPORT Fl_Xlib_Surface_ : public Fl_Paged_Device { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_Xlib_Surface_(); - virtual void translate(int x, int y); - virtual void untranslate(); - virtual ~Fl_Xlib_Surface_(); -}; - -#endif - -#endif // Fl_Copy_Surface_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Counter.H b/msvc/fltk/include/FL/Fl_Counter.H deleted file mode 100644 index 62ef3886..00000000 --- a/msvc/fltk/include/FL/Fl_Counter.H +++ /dev/null @@ -1,115 +0,0 @@ -// -// "$Id$" -// -// Counter header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Counter widget . */ - -// A numerical value with up/down step buttons. From Forms. - -#ifndef Fl_Counter_H -#define Fl_Counter_H - -#ifndef Fl_Valuator_H -#include "Fl_Valuator.H" -#endif - -// values for type(): -#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */ -#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */ - -/** - Controls a single floating point value with button (or keyboard) arrows. - Double arrows buttons achieve larger steps than simple arrows. - \see Fl_Spinner for value input with vertical step arrows. -

\image html counter.png

- \image latex counter.png "Fl_Counter" width=4cm - - \todo Refactor the doxygen comments for Fl_Counter type() documentation. - - The type of an Fl_Counter object can be set using type(uchar t) to: - \li \c FL_NORMAL_COUNTER: Displays a counter with 4 arrow buttons. - \li \c FL_SIMPLE_COUNTER: Displays a counter with only 2 arrow buttons. -*/ -class FL_EXPORT Fl_Counter : public Fl_Valuator { - - Fl_Font textfont_; - Fl_Fontsize textsize_; - Fl_Color textcolor_; - double lstep_; - uchar mouseobj; - static void repeat_callback(void *); - int calc_mouseobj(); - void increment_cb(); - -protected: - - void draw(); - -public: - - int handle(int); - - Fl_Counter(int X, int Y, int W, int H, const char* L = 0); - ~Fl_Counter(); - - /** - Sets the increment for the large step buttons. - The default value is 1.0. - \param[in] a large step increment. - */ - void lstep(double a) {lstep_ = a;} - - /** - Sets the increments for the normal and large step buttons. - \param[in] a, b normal and large step increments. - */ - void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;} - - /** - Sets the increment for the normal step buttons. - \param[in] a normal step increment. - */ - void step(double a) {Fl_Valuator::step(a);} - - /** - Returns the increment for normal step buttons. - */ - double step() const {return Fl_Valuator::step();} - - /** Gets the text font */ - Fl_Font textfont() const {return textfont_;} - /** Sets the text font to \p s */ - void textfont(Fl_Font s) {textfont_ = s;} - - /** Gets the font size */ - Fl_Fontsize textsize() const {return textsize_;} - /** Sets the font size to \p s */ - void textsize(Fl_Fontsize s) {textsize_ = s;} - - /** Gets the font color */ - Fl_Color textcolor() const {return textcolor_;} - /** Sets the font color to \p s */ - void textcolor(Fl_Color s) {textcolor_ = s;} - -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Device.H b/msvc/fltk/include/FL/Fl_Device.H deleted file mode 100644 index a476a91d..00000000 --- a/msvc/fltk/include/FL/Fl_Device.H +++ /dev/null @@ -1,636 +0,0 @@ -// -// "$Id$" -// -// Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device -// for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file Fl_Device.H - \brief declaration of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, - Fl_Display_Device, Fl_Device_Plugin. -*/ - -#ifndef Fl_Device_H -#define Fl_Device_H - -#include -#include -#include -#include -#include -#include -#include - -class Fl_Graphics_Driver; -class Fl_Font_Descriptor; -/** \brief Points to the driver that currently receives all graphics requests */ -FL_EXPORT extern Fl_Graphics_Driver *fl_graphics_driver; - -/** - signature of image generation callback function. - \param[in] data user data passed to function - \param[in] x,y,w position and width of scan line in image - \param[out] buf buffer for generated image data. You must copy \p w - pixels from scanline \p y, starting at pixel \p x - to this buffer. - */ -typedef void (*Fl_Draw_Image_Cb)(void* data,int x,int y,int w,uchar* buf); - -// typedef what the x,y fields in a point are: -#ifdef WIN32 -typedef int COORD_T; -# define XPOINT XPoint -#elif defined(__APPLE__) -typedef float COORD_T; -typedef struct { float x; float y; } QPoint; -# define XPOINT QPoint -extern float fl_quartz_line_width_; -#else -typedef short COORD_T; -# define XPOINT XPoint -#endif - -/** - All graphical output devices and all graphics systems. - This class supports a rudimentary system of run-time type information. - */ -class FL_EXPORT Fl_Device { -public: - /** A string that identifies each subclass of Fl_Device. - Function class_name() applied to a device of this class returns this string. - */ - static const char *class_id; - /** - Returns the name of the class of this object. - Use of the class_name() function is discouraged because it will be removed from future FLTK versions. - - The class of an instance of an Fl_Device subclass can be checked with code such as: - \code - if ( instance->class_name() == Fl_Printer::class_id ) { ... } - \endcode - */ - virtual const char *class_name() {return class_id;}; - /** - Virtual destructor. - - The destructor of Fl_Device must be virtual to make the destructors of - derived classes being called correctly on destruction. - */ - virtual ~Fl_Device() {}; -}; - -#define FL_REGION_STACK_SIZE 10 -#define FL_MATRIX_STACK_SIZE 32 -/** - \brief A virtual class subclassed for each graphics driver FLTK uses. - Typically, FLTK applications do not use directly objects from this class. Rather, they perform - drawing operations (e.g., fl_rectf()) that operate on the current drawing surface (see Fl_Surface_Device). - Drawing operations are functionally presented in \ref drawing and as function lists - in the \ref fl_drawings and \ref fl_attributes modules. The \ref fl_graphics_driver global variable - gives at any time the graphics driver used by all drawing operations. Its value changes when - drawing operations are directed to another drawing surface by Fl_Surface_Device::set_current(). - - \p The Fl_Graphics_Driver class is of interest if one wants to perform new kinds of drawing operations. - An example would be to draw to a PDF file. This would involve creating a new Fl_Graphics_Driver derived - class. This new class should implement all virtual methods of the Fl_Graphics_Driver class - to support all FLTK drawing functions. - */ -class FL_EXPORT Fl_Graphics_Driver : public Fl_Device { -public: - /** A 2D coordinate transformation matrix - */ - struct matrix {double a, b, c, d, x, y;}; -private: - static const matrix m0; - Fl_Font font_; // current font - Fl_Fontsize size_; // current font size - Fl_Color color_; // current color - int sptr; - static const int matrix_stack_size = FL_MATRIX_STACK_SIZE; - matrix stack[FL_MATRIX_STACK_SIZE]; - matrix m; - int n, p_size, gap_; - XPOINT *p; - int what; - int fl_clip_state_number; - int rstackptr; - static const int region_stack_max = FL_REGION_STACK_SIZE - 1; - Fl_Region rstack[FL_REGION_STACK_SIZE]; -#ifdef WIN32 - int numcount; - int counts[20]; -#endif - Fl_Font_Descriptor *font_descriptor_; - void transformed_vertex0(COORD_T x, COORD_T y); - void fixloop(); - -protected: -#ifndef FL_DOXYGEN - enum {LINE, LOOP, POLYGON, POINT_}; - inline int vertex_no() { return n; } - inline XPOINT *vertices() {return p;} - inline int vertex_kind() {return what;} -#endif -/* ** \brief red color for background and/or mixing if device does not support masking or alpha * - uchar bg_r_; - ** \brief green color for background and/or mixing if device does not support masking or alpha * - uchar bg_g_; - ** \brief blue color for background and/or mixing if device does not support masking or alpha * - uchar bg_b_; */ - friend class Fl_Pixmap; - friend class Fl_Bitmap; - friend class Fl_RGB_Image; - friend void fl_rect(int x, int y, int w, int h); - friend void fl_rectf(int x, int y, int w, int h); - friend void fl_line_style(int style, int width, char* dashes); - friend void fl_xyline(int x, int y, int x1); - friend void fl_xyline(int x, int y, int x1, int y2); - friend void fl_xyline(int x, int y, int x1, int y2, int x3); - friend void fl_yxline(int x, int y, int y1); - friend void fl_yxline(int x, int y, int y1, int x2); - friend void fl_yxline(int x, int y, int y1, int x2, int y3); - friend void fl_line(int x, int y, int x1, int y1); - friend void fl_line(int x, int y, int x1, int y1, int x2, int y2); - friend void fl_draw(const char *str, int n, int x, int y); -#ifdef __APPLE__ - friend void fl_draw(const char *str, int n, float x, float y); -#endif - friend void fl_draw(int angle, const char *str, int n, int x, int y); - friend void fl_rtl_draw(const char *str, int n, int x, int y); - friend void fl_font(Fl_Font face, Fl_Fontsize size); - friend void fl_color(Fl_Color c); - friend void fl_color(uchar r, uchar g, uchar b); - friend void fl_point(int x, int y); - friend void fl_loop(int x0, int y0, int x1, int y1, int x2, int y2); - friend void fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - friend void fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2); - friend void fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - friend void fl_begin_points(); - friend void fl_begin_line(); - friend void fl_begin_loop(); - friend void fl_begin_polygon(); - friend void fl_vertex(double x, double y); - friend void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3); - friend void fl_circle(double x, double y, double r); - friend void fl_arc(double x, double y, double r, double start, double end); - friend void fl_arc(int x, int y, int w, int h, double a1, double a2); - friend void fl_pie(int x, int y, int w, int h, double a1, double a2); - friend void fl_end_points(); - friend void fl_end_line(); - friend void fl_end_loop(); - friend void fl_end_polygon(); - friend void fl_transformed_vertex(double xf, double yf); - friend void fl_push_clip(int x, int y, int w, int h); - friend int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - friend int fl_not_clipped(int x, int y, int w, int h); - friend void fl_push_no_clip(); - friend void fl_pop_clip(); - friend void fl_begin_complex_polygon(); - friend void fl_gap(); - friend void fl_end_complex_polygon(); - friend void fl_push_matrix(); - friend void fl_pop_matrix(); - friend void fl_mult_matrix(double a, double b, double c, double d, double x, double y); - friend void fl_scale(double x, double y); - friend void fl_scale(double x); - friend void fl_translate(double x, double y); - friend void fl_rotate(double d); - friend double fl_transform_x(double x, double y); - friend double fl_transform_y(double x, double y); - friend double fl_transform_dx(double x, double y); - friend double fl_transform_dy(double x, double y); - friend Fl_Region fl_clip_region(); - friend void fl_clip_region(Fl_Region r); - friend void fl_restore_clip(); - - friend void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L); - friend void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L); - friend void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D); - friend FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D); - friend FL_EXPORT void gl_start(); - friend FL_EXPORT void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); - matrix *fl_matrix; /**< Points to the current coordinate transformation matrix */ - - /** \brief The constructor. */ - Fl_Graphics_Driver(); - /** \brief see fl_rect(int x, int y, int w, int h). */ - virtual void rect(int x, int y, int w, int h); - /** \brief see fl_rectf(int x, int y, int w, int h). */ - virtual void rectf(int x, int y, int w, int h); - /** \brief see fl_line_style(int style, int width, char* dashes). */ - virtual void line_style(int style, int width=0, char* dashes=0); - /** \brief see fl_xyline(int x, int y, int x1). */ - virtual void xyline(int x, int y, int x1); - /** \brief see fl_xyline(int x, int y, int x1, int y2). */ - virtual void xyline(int x, int y, int x1, int y2); - /** \brief see fl_xyline(int x, int y, int x1, int y2, int x3). */ - virtual void xyline(int x, int y, int x1, int y2, int x3); - /** \brief see fl_yxline(int x, int y, int y1). */ - virtual void yxline(int x, int y, int y1); - /** \brief see fl_yxline(int x, int y, int y1, int x2). */ - virtual void yxline(int x, int y, int y1, int x2); - /** \brief see fl_yxline(int x, int y, int y1, int x2, int y3). */ - virtual void yxline(int x, int y, int y1, int x2, int y3); - /** \brief see fl_line(int x, int y, int x1, int y1). */ - virtual void line(int x, int y, int x1, int y1); - /** \brief see fl_line(int x, int y, int x1, int y1, int x2, int y2). */ - virtual void line(int x, int y, int x1, int y1, int x2, int y2); - /** \brief see fl_draw(const char *str, int n, int x, int y). */ - virtual void draw(const char *str, int n, int x, int y) {} -#ifdef __APPLE__ - virtual void draw(const char *str, int n, float x, float y) { draw(str, n, (int)(x+0.5), (int)(y+0.5));} -#endif - /** \brief see fl_draw(int angle, const char *str, int n, int x, int y). */ - virtual void draw(int angle, const char *str, int n, int x, int y) {} - /** \brief see fl_rtl_draw(const char *str, int n, int x, int y). */ - virtual void rtl_draw(const char *str, int n, int x, int y) {}; - /** \brief see fl_color(Fl_Color c). */ - virtual void color(Fl_Color c) {color_ = c;} - /** \brief see fl_color(uchar r, uchar g, uchar b). */ - virtual void color(uchar r, uchar g, uchar b) {} - /** \brief see fl_point(int x, int y). */ - virtual void point(int x, int y); - /** \brief see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2). */ - virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2); - /** \brief see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3). */ - virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - /** \brief see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2). */ - virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - /** \brief see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3). */ - virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - /** \brief see fl_begin_points(). */ - virtual void begin_points(); - /** \brief see fl_begin_line(). */ - virtual void begin_line(); - /** \brief see fl_begin_loop(). */ - virtual void begin_loop(); - /** \brief see fl_begin_polygon(). */ - virtual void begin_polygon(); - /** \brief see fl_vertex(double x, double y). */ - virtual void vertex(double x, double y); - /** \brief see fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3). */ - virtual void curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3); - /** \brief see fl_circle(double x, double y, double r). */ - virtual void circle(double x, double y, double r); - /** \brief see fl_arc(double x, double y, double r, double start, double end). */ - virtual void arc(double x, double y, double r, double start, double end); - /** \brief see fl_arc(int x, int y, int w, int h, double a1, double a2). */ - virtual void arc(int x, int y, int w, int h, double a1, double a2); - /** \brief see fl_pie(int x, int y, int w, int h, double a1, double a2). */ - virtual void pie(int x, int y, int w, int h, double a1, double a2); - /** \brief see fl_end_points(). */ - virtual void end_points(); - /** \brief see fl_end_line(). */ - virtual void end_line(); - /** \brief see fl_end_loop(). */ - virtual void end_loop(); - /** \brief see fl_end_polygon(). */ - virtual void end_polygon(); - /** \brief see fl_begin_complex_polygon(). */ - virtual void begin_complex_polygon(); - /** \brief see fl_gap(). */ - virtual void gap(); - /** \brief see fl_end_complex_polygon(). */ - virtual void end_complex_polygon(); - /** \brief see fl_transformed_vertex(double xf, double yf). */ - virtual void transformed_vertex(double xf, double yf); - /** \brief see fl_push_clip(int x, int y, int w, int h). */ - virtual void push_clip(int x, int y, int w, int h); - /** \brief see fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H). */ - virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - /** \brief see fl_not_clipped(int x, int y, int w, int h). */ - virtual int not_clipped(int x, int y, int w, int h); - /** \brief see fl_push_no_clip(). */ - virtual void push_no_clip(); - /** \brief see fl_pop_clip(). */ - virtual void pop_clip(); - - /** \brief see fl_push_matrix(). */ - void push_matrix(); - /** \brief see fl_pop_matrix(). */ - void pop_matrix(); - /** \brief see fl_mult_matrix(double a, double b, double c, double d, double x, double y). */ - void mult_matrix(double a, double b, double c, double d, double x, double y); - /** \brief see fl_scale(double x, double y). */ - inline void scale(double x, double y) { mult_matrix(x,0,0,y,0,0); } - /** \brief see fl_scale(double x). */ - inline void scale(double x) { mult_matrix(x,0,0,x,0,0); } - /** \brief see fl_translate(double x, double y). */ - inline void translate(double x,double y) { mult_matrix(1,0,0,1,x,y); } - /** \brief see fl_rotate(double d). */ - void rotate(double d); - /** \brief see fl_transform_x(double x, double y). */ - double transform_x(double x, double y); - /** \brief see fl_transform_y(double x, double y). */ - double transform_y(double x, double y); - /** \brief see fl_transform_dx(double x, double y). */ - double transform_dx(double x, double y); - /** \brief see fl_transform_dy(double x, double y). */ - double transform_dy(double x, double y); - /** \brief see fl_clip_region(). */ - Fl_Region clip_region(); - /** \brief see fl_clip_region(Fl_Region r). */ - void clip_region(Fl_Region r); - /** \brief see fl_restore_clip(). */ - void restore_clip(); - - // Images - /** \brief see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L). */ - virtual void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) {} - /** \brief see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L). */ - virtual void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) {} - /** \brief see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D). */ - virtual void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) {} - /** \brief see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D). */ - virtual void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) {} - // Image classes - /** \brief Draws an Fl_RGB_Image object to the device. - * - Specifies a bounding box for the image, with the origin (upper left-hand corner) of - the image offset by the cx and cy arguments. - */ - virtual void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) {} - /** \brief Draws an Fl_Pixmap object to the device. - * - Specifies a bounding box for the image, with the origin (upper left-hand corner) of - the image offset by the cx and cy arguments. - */ - virtual void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) {} - /** \brief Draws an Fl_Bitmap object to the device. - * - Specifies a bounding box for the image, with the origin (upper left-hand corner) of - the image offset by the cx and cy arguments. - */ - virtual void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {} -#if FLTK_ABI_VERSION >= 10301 - virtual -#endif - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); - -public: - static const char *class_id; - virtual const char *class_name() {return class_id;}; - /** \brief see fl_font(Fl_Font face, Fl_Fontsize size). */ - virtual void font(Fl_Font face, Fl_Fontsize fsize) {font_ = face; size_ = fsize;} - /** \brief see fl_font(void). */ - Fl_Font font() {return font_; } - /** \brief see fl_size(). */ - Fl_Fontsize size() {return size_; } - /** \brief see fl_width(const char *str, int n). */ - virtual double width(const char *str, int n) {return 0;} - /** \brief see fl_width(unsigned int n). */ - virtual inline double width(unsigned int c) { char ch = (char)c; return width(&ch, 1); } - /** \brief see fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h). */ - virtual void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - /** \brief see fl_height(). */ - virtual int height() {return size();} - /** \brief see fl_descent(). */ - virtual int descent() {return 0;} - /** \brief see fl_color(void). */ - Fl_Color color() {return color_;} - /** Returns a pointer to the current Fl_Font_Descriptor for the graphics driver */ - inline Fl_Font_Descriptor *font_descriptor() { return font_descriptor_;} - /** Sets the current Fl_Font_Descriptor for the graphics driver */ - inline void font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;} -#if FLTK_ABI_VERSION >= 10304 || defined(FL_DOXYGEN) - virtual -#endif - int draw_scaled(Fl_Image *img, int X, int Y, int W, int H); - /** \brief The destructor */ - virtual ~Fl_Graphics_Driver() { if (p) free(p); } -}; - -#if defined(__APPLE__) || defined(FL_DOXYGEN) -/** - \brief The Mac OS X-specific graphics class. - * - This class is implemented only on the Mac OS X platform. - */ -class FL_EXPORT Fl_Quartz_Graphics_Driver : public Fl_Graphics_Driver { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - void color(Fl_Color c); - void color(uchar r, uchar g, uchar b); - void draw(const char* str, int n, int x, int y); -#ifdef __APPLE__ - void draw(const char *str, int n, float x, float y); -#endif - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* str, int n, int x, int y); - void font(Fl_Font face, Fl_Fontsize size); - void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy); - int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP); - void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - double width(const char *str, int n); - double width(unsigned int c); - void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - int height(); - int descent(); -#if ! defined(FL_DOXYGEN) - static Fl_Offscreen create_offscreen_with_alpha(int w, int h); -#endif - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); -}; -#endif -#if defined(WIN32) || defined(FL_DOXYGEN) -/** - \brief The MSWindows-specific graphics class. - * - This class is implemented only on the MSWindows platform. - */ -class FL_EXPORT Fl_GDI_Graphics_Driver : public Fl_Graphics_Driver { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - void color(Fl_Color c); - void color(uchar r, uchar g, uchar b); - void draw(const char* str, int n, int x, int y); - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* str, int n, int x, int y); - void font(Fl_Font face, Fl_Fontsize size); - void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - double width(const char *str, int n); - double width(unsigned int c); - void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - int height(); - int descent(); -#if ! defined(FL_DOXYGEN) - void copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy); -#endif - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); -}; - -/** - The graphics driver used when printing on MSWindows. - * - This class is implemented only on the MSWindows platform. It 's extremely similar to Fl_GDI_Graphics_Driver. - */ -class FL_EXPORT Fl_GDI_Printer_Graphics_Driver : public Fl_GDI_Graphics_Driver { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy); - int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP); -}; -#endif -#if !(defined(__APPLE__) || defined(WIN32)) -/** - \brief The Xlib-specific graphics class. - * - This class is implemented only on the Xlib platform. - */ -class FL_EXPORT Fl_Xlib_Graphics_Driver : public Fl_Graphics_Driver { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - void color(Fl_Color c); - void color(uchar r, uchar g, uchar b); - void draw(const char* str, int n, int x, int y); - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* str, int n, int x, int y); - void font(Fl_Font face, Fl_Fontsize size); - void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy); - void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0); - void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); - void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); - void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - double width(const char *str, int n); - double width(unsigned int c); - void text_extents(const char*, int n, int& dx, int& dy, int& w, int& h); - int height(); - int descent(); - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); -#if ! defined(FL_DOXYGEN) - void copy_offscreen_with_alpha(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); -#endif -}; -#endif - -/** - A drawing surface that's susceptible to receive graphical output. - Any FLTK application has at any time a current drawing surface to which all drawing requests are directed. - The current surface is given by Fl_Surface_Device::surface(). - When main() begins running, the current drawing surface has been set to the computer's display, - an instance of the Fl_Display_Device class. - - A drawing surface other than the computer's display, is typically used as follows: -
  1. Create \c surface, an object from a particular Fl_Surface_Device derived class (e.g., Fl_Copy_Surface, Fl_Printer). -
  2. Memorize what is the current drawing surface with Fl_Surface_Device *old_current = Fl_Surface_Device::surface(); -
  3. Call \c surface->set_current(); to redirect all graphics requests to \c surface which becomes the new - current drawing surface (not necessary with class Fl_Printer because it is done by Fl_Printer::start_job()). -
  4. At this point any of the \ref fl_drawings (e.g., fl_rect()) or the \ref fl_attributes or \ref drawing_images functions - (e.g., fl_draw_image(), Fl_Image::draw()) operates on the new current drawing surface. - Certain drawing surfaces allow additional ways to draw to them (e.g., Fl_Printer::print_widget(), Fl_Image_Surface::draw()). -
  5. After all drawing requests have been performed, redirect graphics requests back to their previous destination - with \c old_current->set_current();. -
  6. Delete \c surface. -
- */ -class FL_EXPORT Fl_Surface_Device : public Fl_Device { - /** \brief The graphics driver in use by this surface. */ - Fl_Graphics_Driver *_driver; - static Fl_Surface_Device *_surface; // the surface that currently receives graphics output - static Fl_Surface_Device *default_surface(); // create surface is none exists yet -protected: - /** \brief Constructor that sets the graphics driver to use for the created surface. */ - Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {_driver = graphics_driver; }; -public: - static const char *class_id; - const char *class_name() {return class_id;}; - virtual void set_current(void); - /** \brief Sets the graphics driver of this drawing surface. */ - inline void driver(Fl_Graphics_Driver *graphics_driver) {_driver = graphics_driver;}; - /** \brief Returns the graphics driver of this drawing surface. */ - inline Fl_Graphics_Driver *driver() {return _driver; }; - /** The current drawing surface. - In other words, the Fl_Surface_Device object that currently receives all graphics output */ - static inline Fl_Surface_Device *surface() { - return _surface ? _surface : default_surface(); - }; - /** \brief The destructor. */ - virtual ~Fl_Surface_Device() {} -}; - -/** - A display to which the computer can draw. - When the program begins running, an Fl_Display_Device instance has been created and made the current drawing surface. - There is no need to create any other object of this class. - */ -class FL_EXPORT Fl_Display_Device : public Fl_Surface_Device { - static Fl_Display_Device *_display; // the platform display device -#ifdef __APPLE__ - friend class Fl_X; - friend class Fl_Graphics_Driver; - static bool high_res_window_; //< true when drawing to a window of a retina display (Mac OS X only) - static bool high_resolution() {return high_res_window_;} -#endif -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_Display_Device(Fl_Graphics_Driver *graphics_driver); - static Fl_Display_Device *display_device(); -}; - -/** - This plugin socket allows the integration of new device drivers for special - window or screen types. - This class is not intended for use outside the FLTK library. - It is currently used to provide an automated printing - service and screen capture for OpenGL windows, if linked with fltk_gl. - */ -class FL_EXPORT Fl_Device_Plugin : public Fl_Plugin { -public: - /** \brief The constructor */ - Fl_Device_Plugin(const char *pluginName) - : Fl_Plugin(klass(), pluginName) { } - /** \brief Returns the class name */ - virtual const char *klass() { return "fltk:device"; } - /** \brief Returns the plugin name */ - virtual const char *name() = 0; - /** \brief Prints a widget - \param w the widget - \param x,y offsets where to print relatively to coordinates origin - \param height height of the current drawing area - */ - virtual int print(Fl_Widget* w, int x, int y, int height) = 0; - /** captures a rectangle of a widget as an image - \return The captured pixels as an RGB image - */ -#ifdef FL_LIBRARY - virtual -#endif - Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) {return NULL;} -}; - -#endif // Fl_Device_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Dial.H b/msvc/fltk/include/FL/Fl_Dial.H deleted file mode 100644 index bf0de19c..00000000 --- a/msvc/fltk/include/FL/Fl_Dial.H +++ /dev/null @@ -1,88 +0,0 @@ -// -// "$Id$" -// -// Dial header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Dial widget . */ - -#ifndef Fl_Dial_H -#define Fl_Dial_H - -#ifndef Fl_Valuator_H -#include "Fl_Valuator.H" -#endif - -// values for type(): -#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */ -#define FL_LINE_DIAL 1 /**< type() for dial variant with line */ -#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */ - -/** - The Fl_Dial widget provides a circular dial to control a - single floating point value. -

\image html dial.png - \image latex dial.png "Fl_Dial" width=4cm - Use type() to set the type of the dial to: -

    -
  • FL_NORMAL_DIAL - Draws a normal dial with a knob.
  • -
  • FL_LINE_DIAL - Draws a dial with a line.
  • -
  • FL_FILL_DIAL - Draws a dial with a filled arc.
  • -
- -*/ -class FL_EXPORT Fl_Dial : public Fl_Valuator { - - short a1,a2; - -protected: - - // these allow subclasses to put the dial in a smaller area: - void draw(int X, int Y, int W, int H); - int handle(int event, int X, int Y, int W, int H); - void draw(); - -public: - - int handle(int); - /** - Creates a new Fl_Dial widget using the given position, size, - and label string. The default type is FL_NORMAL_DIAL. - */ - Fl_Dial(int x,int y,int w,int h, const char *l = 0); - /** - Sets Or gets the angles used for the minimum and maximum values. The default - values are 45 and 315 (0 degrees is straight down and the angles - progress clockwise). Normally angle1 is less than angle2, but if you - reverse them the dial moves counter-clockwise. - */ - short angle1() const {return a1;} - /** See short angle1() const */ - void angle1(short a) {a1 = a;} - /** See short angle1() const */ - short angle2() const {return a2;} - /** See short angle1() const */ - void angle2(short a) {a2 = a;} - /** See short angle1() const */ - void angles(short a, short b) {a1 = a; a2 = b;} - -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Double_Window.H b/msvc/fltk/include/FL/Fl_Double_Window.H deleted file mode 100644 index e4ef883f..00000000 --- a/msvc/fltk/include/FL/Fl_Double_Window.H +++ /dev/null @@ -1,73 +0,0 @@ -// -// "$Id$" -// -// Double-buffered window header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Double_Window widget . */ - -#ifndef Fl_Double_Window_H -#define Fl_Double_Window_H - -#include "Fl_Window.H" - -/** - The Fl_Double_Window provides a double-buffered window. - If possible this will use the X double buffering extension (Xdbe). If - not, it will draw the window data into an off-screen pixmap, and then - copy it to the on-screen window. -

It is highly recommended that you put the following code before the - first show() of any window in your program:

- \code - Fl::visual(FL_DOUBLE|FL_INDEX) - \endcode - This makes sure you can use Xdbe on servers where double buffering - does not exist for every visual. -*/ -class FL_EXPORT Fl_Double_Window : public Fl_Window { -protected: - void flush(int eraseoverlay); - /** - Force double buffering, even if the OS already buffers windows - (overlays need that on MacOS and Windows2000) - */ - char force_doublebuffering_; -public: - void show(); - void show(int a, char **b) {Fl_Window::show(a,b);} - void flush(); - void resize(int,int,int,int); - void hide(); - ~Fl_Double_Window(); - - /** - Creates a new Fl_Double_Window widget using the given - position, size, and label (title) string. - */ - Fl_Double_Window(int W, int H, const char *l = 0); - - /** - See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0) - */ - Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0); - -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Export.H b/msvc/fltk/include/FL/Fl_Export.H deleted file mode 100644 index c239910e..00000000 --- a/msvc/fltk/include/FL/Fl_Export.H +++ /dev/null @@ -1,42 +0,0 @@ -/* - * "$Id$" - * - * WIN32 DLL export . - * - * Copyright 1998-2010 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: - * - * http://www.fltk.org/COPYING.php - * - * Please report all bugs and problems on the following page: - * - * http://www.fltk.org/str.php - */ - -#ifndef Fl_Export_H -# define Fl_Export_H - -/* - * The following is only used when building DLLs under WIN32... - */ - -# if defined(FL_DLL) -# ifdef FL_LIBRARY -# define FL_EXPORT __declspec(dllexport) -# else -# define FL_EXPORT __declspec(dllimport) -# endif /* FL_LIBRARY */ -# elif __GNUC__ >= 4 -# define FL_EXPORT __attribute__ ((visibility ("default"))) -# else -# define FL_EXPORT -# endif /* FL_DLL */ - -#endif /* !Fl_Export_H */ - -/* - * End of "$Id$". - */ diff --git a/msvc/fltk/include/FL/Fl_File_Browser.H b/msvc/fltk/include/FL/Fl_File_Browser.H deleted file mode 100644 index 7e41e5e2..00000000 --- a/msvc/fltk/include/FL/Fl_File_Browser.H +++ /dev/null @@ -1,111 +0,0 @@ -// -// "$Id$" -// -// FileBrowser definitions. -// -// Copyright 1999-2010 by Michael Sweet. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_File_Browser widget . */ - -// -// Include necessary header files... -// - -#ifndef _Fl_File_Browser_H_ -# define _Fl_File_Browser_H_ - -# include "Fl_Browser.H" -# include "Fl_File_Icon.H" -# include "filename.H" - - -// -// Fl_File_Browser class... -// - -/** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */ -class FL_EXPORT Fl_File_Browser : public Fl_Browser { - - int filetype_; - const char *directory_; - uchar iconsize_; - const char *pattern_; - - int full_height() const; - int item_height(void *) const; - int item_width(void *) const; - void item_draw(void *, int, int, int, int) const; - int incr_height() const { return (item_height(0)); } - -public: - enum { FILES, DIRECTORIES }; - - /** - The constructor creates the Fl_File_Browser widget at the specified position and size. - The destructor destroys the widget and frees all memory that has been allocated. - */ - Fl_File_Browser(int, int, int, int, const char * = 0); - - /** Sets or gets the size of the icons. The default size is 20 pixels. */ - uchar iconsize() const { return (iconsize_); }; - /** Sets or gets the size of the icons. The default size is 20 pixels. */ - void iconsize(uchar s) { iconsize_ = s; redraw(); }; - - /** - Sets or gets the filename filter. The pattern matching uses - the fl_filename_match() - function in FLTK. - */ - void filter(const char *pattern); - /** - Sets or gets the filename filter. The pattern matching uses - the fl_filename_match() - function in FLTK. - */ - const char *filter() const { return (pattern_); }; - - /** - Loads the specified directory into the browser. If icons have been - loaded then the correct icon is associated with each file in the list. - -

The sort argument specifies a sort function to be used with - fl_filename_list(). - */ - int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort); - - Fl_Fontsize textsize() const { return Fl_Browser::textsize(); }; - void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }; - - /** - Sets or gets the file browser type, FILES or - DIRECTORIES. When set to FILES, both - files and directories are shown. Otherwise only directories are - shown. - */ - int filetype() const { return (filetype_); }; - /** - Sets or gets the file browser type, FILES or - DIRECTORIES. When set to FILES, both - files and directories are shown. Otherwise only directories are - shown. - */ - void filetype(int t) { filetype_ = t; }; -}; - -#endif // !_Fl_File_Browser_H_ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_File_Chooser.H b/msvc/fltk/include/FL/Fl_File_Chooser.H deleted file mode 100644 index ee05ebd8..00000000 --- a/msvc/fltk/include/FL/Fl_File_Chooser.H +++ /dev/null @@ -1,245 +0,0 @@ -// -// "$Id$" -// -// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// -// ======================================================================= -// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!! -// ======================================================================= -// Please use fluid to change src/Fl_File_Chooser.fl interactively -// and then use fluid to "write code" or edit and use fluid -c . -// ======================================================================= -// - -// generated by Fast Light User Interface Designer (fluid) version 1.0305 - -#ifndef Fl_File_Chooser_H -#define Fl_File_Chooser_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class FL_EXPORT Fl_File_Chooser { -public: - enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; -private: - static Fl_Preferences *prefs_; - void (*callback_)(Fl_File_Chooser*, void *); - void *data_; - char directory_[FL_PATH_MAX]; - char pattern_[FL_PATH_MAX]; - char preview_text_[2048]; - int type_; - void favoritesButtonCB(); - void favoritesCB(Fl_Widget *w); - void fileListCB(); - void fileNameCB(); - void newdir(); - static void previewCB(Fl_File_Chooser *fc); - void showChoiceCB(); - void update_favorites(); - void update_preview(); -public: - Fl_File_Chooser(const char *d, const char *p, int t, const char *title); -private: - Fl_Double_Window *window; - inline void cb_window_i(Fl_Double_Window*, void*); - static void cb_window(Fl_Double_Window*, void*); - Fl_Choice *showChoice; - inline void cb_showChoice_i(Fl_Choice*, void*); - static void cb_showChoice(Fl_Choice*, void*); - Fl_Menu_Button *favoritesButton; - inline void cb_favoritesButton_i(Fl_Menu_Button*, void*); - static void cb_favoritesButton(Fl_Menu_Button*, void*); -public: - Fl_Button *newButton; -private: - inline void cb_newButton_i(Fl_Button*, void*); - static void cb_newButton(Fl_Button*, void*); - inline void cb__i(Fl_Tile*, void*); - static void cb_(Fl_Tile*, void*); - Fl_File_Browser *fileList; - inline void cb_fileList_i(Fl_File_Browser*, void*); - static void cb_fileList(Fl_File_Browser*, void*); - Fl_Box *previewBox; -public: - Fl_Check_Button *previewButton; -private: - inline void cb_previewButton_i(Fl_Check_Button*, void*); - static void cb_previewButton(Fl_Check_Button*, void*); -public: - Fl_Check_Button *showHiddenButton; -private: - inline void cb_showHiddenButton_i(Fl_Check_Button*, void*); - static void cb_showHiddenButton(Fl_Check_Button*, void*); - Fl_File_Input *fileName; - inline void cb_fileName_i(Fl_File_Input*, void*); - static void cb_fileName(Fl_File_Input*, void*); - Fl_Return_Button *okButton; - inline void cb_okButton_i(Fl_Return_Button*, void*); - static void cb_okButton(Fl_Return_Button*, void*); - Fl_Button *cancelButton; - inline void cb_cancelButton_i(Fl_Button*, void*); - static void cb_cancelButton(Fl_Button*, void*); - Fl_Double_Window *favWindow; - Fl_File_Browser *favList; - inline void cb_favList_i(Fl_File_Browser*, void*); - static void cb_favList(Fl_File_Browser*, void*); - Fl_Button *favUpButton; - inline void cb_favUpButton_i(Fl_Button*, void*); - static void cb_favUpButton(Fl_Button*, void*); - Fl_Button *favDeleteButton; - inline void cb_favDeleteButton_i(Fl_Button*, void*); - static void cb_favDeleteButton(Fl_Button*, void*); - Fl_Button *favDownButton; - inline void cb_favDownButton_i(Fl_Button*, void*); - static void cb_favDownButton(Fl_Button*, void*); - Fl_Button *favCancelButton; - inline void cb_favCancelButton_i(Fl_Button*, void*); - static void cb_favCancelButton(Fl_Button*, void*); - Fl_Return_Button *favOkButton; - inline void cb_favOkButton_i(Fl_Return_Button*, void*); - static void cb_favOkButton(Fl_Return_Button*, void*); -public: - ~Fl_File_Chooser(); - void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0); - void color(Fl_Color c); - Fl_Color color(); - int count(); - void directory(const char *d); - char * directory(); - void filter(const char *p); - const char * filter(); - int filter_value(); - void filter_value(int f); - void hide(); - void iconsize(uchar s); - uchar iconsize(); - void label(const char *l); - const char * label(); - void ok_label(const char *l); - const char * ok_label(); - void preview(int e); - int preview() const { return previewButton->value(); }; -private: - void showHidden(int e); - void remove_hidden_files(); -public: - void rescan(); - void rescan_keep_filename(); - void show(); - int shown(); - void textcolor(Fl_Color c); - Fl_Color textcolor(); - void textfont(Fl_Font f); - Fl_Font textfont(); - void textsize(Fl_Fontsize s); - Fl_Fontsize textsize(); - void type(int t); - int type(); - void * user_data() const; - void user_data(void *d); - const char *value(int f = 1); - void value(const char *filename); - int visible(); - /** - [standard text may be customized at run-time] - */ - static const char *add_favorites_label; - /** - [standard text may be customized at run-time] - */ - static const char *all_files_label; - /** - [standard text may be customized at run-time] - */ - static const char *custom_filter_label; - /** - [standard text may be customized at run-time] - */ - static const char *existing_file_label; - /** - [standard text may be customized at run-time] - */ - static const char *favorites_label; - /** - [standard text may be customized at run-time] - */ - static const char *filename_label; - /** - [standard text may be customized at run-time] - */ - static const char *filesystems_label; - /** - [standard text may be customized at run-time] - */ - static const char *manage_favorites_label; - /** - [standard text may be customized at run-time] - */ - static const char *new_directory_label; - /** - [standard text may be customized at run-time] - */ - static const char *new_directory_tooltip; - /** - [standard text may be customized at run-time] - */ - static const char *preview_label; - /** - [standard text may be customized at run-time] - */ - static const char *save_label; - /** - [standard text may be customized at run-time] - */ - static const char *show_label; - /** - [standard text may be customized at run-time] - */ - static const char *hidden_label; - /** - the sort function that is used when loading - the contents of a directory. - */ - static Fl_File_Sort_F *sort; -private: - Fl_Widget* ext_group; -public: - Fl_Widget* add_extra(Fl_Widget* gr); -}; -FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0); -FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0); -FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); -FL_EXPORT void fl_file_chooser_ok_label(const char*l); -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_File_Icon.H b/msvc/fltk/include/FL/Fl_File_Icon.H deleted file mode 100644 index 6ca93d28..00000000 --- a/msvc/fltk/include/FL/Fl_File_Icon.H +++ /dev/null @@ -1,159 +0,0 @@ -// -// "$Id$" -// -// Fl_File_Icon definitions. -// -// Copyright 1999-2010 by Michael Sweet. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_File_Icon widget . */ - -// -// Include necessary header files... -// - -#ifndef _Fl_Fl_File_Icon_H_ -# define _Fl_Fl_File_Icon_H_ - -# include "Fl.H" - - -// -// Special color value for the icon color. -// - -# define FL_ICON_COLOR (Fl_Color)0xffffffff /**< icon color [background?]*/ - - -// -// Fl_File_Icon class... -// - -/** - The Fl_File_Icon class manages icon images that can be used - as labels in other widgets and as icons in the FileBrowser widget. -*/ -class FL_EXPORT Fl_File_Icon { //// Icon data - - static Fl_File_Icon *first_; // Pointer to first icon/filetype - Fl_File_Icon *next_; // Pointer to next icon/filetype - const char *pattern_; // Pattern string - int type_; // Match only if directory or file? - int num_data_; // Number of data elements - int alloc_data_; // Number of allocated elements - short *data_; // Icon data - - public: - - enum // File types - { - ANY, // Any kind of file - PLAIN, // Only plain files - FIFO, // Only named pipes - DEVICE, // Only character and block devices - LINK, // Only symbolic links - DIRECTORY // Only directories - }; - - enum // Data opcodes - { - END, // End of primitive/icon - COLOR, // Followed by color value (2 shorts) - LINE, // Start of line - CLOSEDLINE, // Start of closed line - POLYGON, // Start of polygon - OUTLINEPOLYGON, // Followed by outline color (2 shorts) - VERTEX // Followed by scaled X,Y - }; - - Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0); - ~Fl_File_Icon(); - - short *add(short d); - - /** - Adds a color value to the icon array, returning a pointer to it. - \param[in] c color value - */ - short *add_color(Fl_Color c) - { short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); } - - /** - Adds a vertex value to the icon array, returning a pointer to it. - The integer version accepts coordinates from 0 to 10000. - The origin (0.0) is in the lower-lefthand corner of the icon. - \param[in] x, y vertex coordinates - */ - short *add_vertex(int x, int y) - { short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); } - - /** - Adds a vertex value to the icon array, returning a pointer to it. - The floating point version goes from 0.0 to 1.0. - The origin (0.0) is in the lower-lefthand corner of the icon. - \param[in] x, y vertex coordinates - */ - short *add_vertex(float x, float y) - { short *d = add((short)VERTEX); add((short)(x * 10000.0)); - add((short)(y * 10000.0)); return (d); } - - /** Clears all icon data from the icon.*/ - void clear() { num_data_ = 0; } - - void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1); - - void label(Fl_Widget *w); - - static void labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a); - void load(const char *f); - int load_fti(const char *fti); - int load_image(const char *i); - - /** Returns next file icon object. See Fl_File_Icon::first() */ - Fl_File_Icon *next() { return (next_); } - - /** Returns the filename matching pattern for the icon.*/ - const char *pattern() { return (pattern_); } - - /** Returns the number of words of data used by the icon.*/ - int size() { return (num_data_); } - - /** - Returns the filetype associated with the icon, which can be one of the - following: - - \li Fl_File_Icon::ANY, any kind of file. - \li Fl_File_Icon::PLAIN, plain files. - \li Fl_File_Icon::FIFO, named pipes. - \li Fl_File_Icon::DEVICE, character and block devices. - \li Fl_File_Icon::LINK, symbolic links. - \li Fl_File_Icon::DIRECTORY, directories. - */ - int type() { return (type_); } - - /** Returns the data array for the icon.*/ - short *value() { return (data_); } - - static Fl_File_Icon *find(const char *filename, int filetype = ANY); - - /** Returns a pointer to the first icon in the list.*/ - static Fl_File_Icon *first() { return (first_); } - static void load_system_icons(void); -}; - -#endif // !_Fl_Fl_File_Icon_H_ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_File_Input.H b/msvc/fltk/include/FL/Fl_File_Input.H deleted file mode 100644 index 6c8ee578..00000000 --- a/msvc/fltk/include/FL/Fl_File_Input.H +++ /dev/null @@ -1,97 +0,0 @@ -// -// "$Id$" -// -// File_Input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 by Bill Spitzak and others. -// Original version Copyright 1998 by Curtis Edwards. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_File_Input widget . */ - -#ifndef Fl_File_Input_H -# define Fl_File_Input_H - -# include - -/** - \class Fl_File_Input - \brief This widget displays a pathname in a text input field. - - A navigation bar located above the input field allows the user to - navigate upward in the directory tree. - You may want to handle FL_WHEN_CHANGED events for tracking text changes - and also FL_WHEN_RELEASE for button release when changing to parent dir. - FL_WHEN_RELEASE callback won't be called if the directory clicked - is the same as the current one. - -

\image html Fl_File_Input.png

- \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 - when losing focus (see FL_UNFOCUS) to update its state like its cursor shape. - One resulting side effect is that you should call clear_changed() early in your 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 { - - Fl_Color errorcolor_; - char ok_entry_; - uchar down_box_; - short buttons_[200]; - short pressed_; - - void draw_buttons(); - int handle_button(int event); - void update_buttons(); - -public: - - Fl_File_Input(int X, int Y, int W, int H, const char *L=0); - - virtual int handle(int event); - -protected: - virtual void draw(); - -public: - /** Gets the box type used for the navigation bar. */ - Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; } - /** Sets the box type to use for the navigation bar. */ - void down_box(Fl_Boxtype b) { down_box_ = b; } - - /** - Gets the current error color. - \todo Better docs for Fl_File_Input::errorcolor() - is it even used? - */ - Fl_Color errorcolor() const { return errorcolor_; } - /** Sets the current error color to \p c */ - void errorcolor(Fl_Color c) { errorcolor_ = c; } - - int value(const char *str); - int value(const char *str, int len); - - /** - Returns the current value, which is a pointer to an internal buffer - and is valid only until the next event is handled. - */ - const char *value() { return Fl_Input_::value(); } -}; - -#endif // !Fl_File_Input_H - - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Fill_Dial.H b/msvc/fltk/include/FL/Fl_Fill_Dial.H deleted file mode 100644 index dbf2df05..00000000 --- a/msvc/fltk/include/FL/Fl_Fill_Dial.H +++ /dev/null @@ -1,38 +0,0 @@ -// -// "$Id$" -// -// Filled dial header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Fill_Dial widget . */ - -#ifndef Fl_Fill_Dial_H -#define Fl_Fill_Dial_H - -#include "Fl_Dial.H" - -/** Draws a dial with a filled arc */ -class FL_EXPORT Fl_Fill_Dial : public Fl_Dial { -public: - /** Creates a filled dial, also setting its type to FL_FILL_DIAL. */ - Fl_Fill_Dial(int X,int Y,int W,int H, const char *L); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Fill_Slider.H b/msvc/fltk/include/FL/Fl_Fill_Slider.H deleted file mode 100644 index 299c38e6..00000000 --- a/msvc/fltk/include/FL/Fl_Fill_Slider.H +++ /dev/null @@ -1,37 +0,0 @@ -// -// "$Id$" -// -// Filled slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Fill_Slider widget . */ - -#ifndef Fl_Fill_Slider_H -#define Fl_Fill_Slider_H - -#include "Fl_Slider.H" -/** Widget that draws a filled horizontal slider, useful as a progress or value meter*/ -class FL_EXPORT Fl_Fill_Slider : public Fl_Slider { -public: - /** Creates the slider from its position,size and optional title. */ - Fl_Fill_Slider(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Float_Input.H b/msvc/fltk/include/FL/Fl_Float_Input.H deleted file mode 100644 index f60d4a28..00000000 --- a/msvc/fltk/include/FL/Fl_Float_Input.H +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id$" -// -// Floating point input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Float_Input widget . */ - -#ifndef Fl_Float_Input_H -#define Fl_Float_Input_H - -#include "Fl_Input.H" - -/** - The Fl_Float_Input class is a subclass of Fl_Input - that only allows the user to type floating point numbers (sign, - digits, decimal point, more digits, 'E' or 'e', sign, digits). -*/ -class FL_EXPORT Fl_Float_Input : public Fl_Input { -public: - /** - Creates a new Fl_Float_Input widget using the given position, - size, and label string. The default boxtype is FL_DOWN_BOX. - - Inherited destructor destroys the widget and any value associated with it. - */ - Fl_Float_Input(int X,int Y,int W,int H,const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_FormsBitmap.H b/msvc/fltk/include/FL/Fl_FormsBitmap.H deleted file mode 100644 index a0095fe6..00000000 --- a/msvc/fltk/include/FL/Fl_FormsBitmap.H +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id$" -// -// Forms bitmap header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_FormsBitmap widget . */ - -#ifndef Fl_FormsBitmap_H -#define Fl_FormsBitmap_H - -#include "Fl_Bitmap.H" - -/** - Forms compatibility Bitmap Image Widget -*/ -class FL_EXPORT Fl_FormsBitmap : public Fl_Widget { - Fl_Bitmap *b; -protected: - void draw(); -public: - Fl_FormsBitmap(Fl_Boxtype, int, int, int, int, const char * = 0); - void set(int W, int H, const uchar *bits); - /** Sets a new bitmap. */ - void bitmap(Fl_Bitmap *B) {b = B;} - /** Gets a the current associated Fl_Bitmap objects. */ - Fl_Bitmap *bitmap() const {return b;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_FormsPixmap.H b/msvc/fltk/include/FL/Fl_FormsPixmap.H deleted file mode 100644 index 6700adda..00000000 --- a/msvc/fltk/include/FL/Fl_FormsPixmap.H +++ /dev/null @@ -1,54 +0,0 @@ -// -// "$Id$" -// -// Forms pixmap header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_FormsPixmap widget . */ - -#ifndef Fl_FormsPixmap_H -#define Fl_FormsPixmap_H - -#include "Fl_Pixmap.H" - -/** - \class Fl_FormsPixmap - \brief Forms pixmap drawing routines -*/ -class FL_EXPORT Fl_FormsPixmap : public Fl_Widget { - Fl_Pixmap *b; -protected: - void draw(); -public: - Fl_FormsPixmap(Fl_Boxtype t, int X, int Y, int W, int H, const char *L= 0); - - void set(/*const*/char * const * bits); - - /** - Set the internal pixmap pointer to an existing pixmap. - \param[in] B existing pixmap - */ - void Pixmap(Fl_Pixmap *B) {b = B;} - - /** Get the internal pixmap pointer. */ - Fl_Pixmap *Pixmap() const {return b;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Free.H b/msvc/fltk/include/FL/Fl_Free.H deleted file mode 100644 index 2c6e4328..00000000 --- a/msvc/fltk/include/FL/Fl_Free.H +++ /dev/null @@ -1,80 +0,0 @@ -// -// "$Id$" -// -// Forms free header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Free widget . */ - -#ifndef Fl_Free_H -#define Fl_Free_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -#define FL_NORMAL_FREE 1 /**< normal event handling */ -#define FL_SLEEPING_FREE 2 /**< deactivate event handling */ -#define FL_INPUT_FREE 3 /**< accepts FL_FOCUS events */ -#define FL_CONTINUOUS_FREE 4 /**< repeated timeout handling */ -#define FL_ALL_FREE 5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */ - -/** appropriate signature for handle function */ -typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char); - -/** - Emulation of the Forms "free" widget. - - This emulation allows the free demo to run, and appears to be useful for - porting programs written in Forms which use the free widget or make - subclasses of the Forms widgets. - - There are five types of free, which determine when the handle function - is called: - - \li \c FL_NORMAL_FREE normal event handling. - \li \c FL_SLEEPING_FREE deactivates event handling (widget is inactive). - \li \c FL_INPUT_FREE accepts FL_FOCUS events. - \li \c FL_CONTINUOUS_FREE sets a timeout callback 100 times a second and - provides an FL_STEP event. This has obvious - detrimental effects on machine performance. - \li \c FL_ALL_FREE same as FL_INPUT_FREE and FL_CONTINUOUS_FREE. - -*/ -class FL_EXPORT Fl_Free : public Fl_Widget { - FL_HANDLEPTR hfunc; - static void step(void *); -protected: - void draw(); -public: - int handle(int e); - Fl_Free(uchar t,int X,int Y,int W,int H,const char *L,FL_HANDLEPTR hdl); - ~Fl_Free(); -}; - -// old event names for compatibility: -#define FL_MOUSE FL_DRAG /**< for backward compatibility */ -#define FL_DRAW 100 /**< for backward compatibility [UNUSED]*/ -#define FL_STEP 101 /**< for backward compatibility */ -#define FL_FREEMEM 102 /**< for backward compatibility [UNUSED]*/ -#define FL_FREEZE 103 /**< for backward compatibility [UNUSED]*/ -#define FL_THAW 104 /**< for backward compatibility [UNUSED]*/ - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_GIF_Image.H b/msvc/fltk/include/FL/Fl_GIF_Image.H deleted file mode 100644 index a24079a8..00000000 --- a/msvc/fltk/include/FL/Fl_GIF_Image.H +++ /dev/null @@ -1,42 +0,0 @@ -// -// "$Id$" -// -// GIF image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_GIF_Image widget . */ - -#ifndef Fl_GIF_Image_H -#define Fl_GIF_Image_H -# include "Fl_Pixmap.H" - -/** - The Fl_GIF_Image class supports loading, caching, - and drawing of Compuserve GIFSM images. The class - loads the first image and supports transparency. - */ -class FL_EXPORT Fl_GIF_Image : public Fl_Pixmap { - - public: - - Fl_GIF_Image(const char* filename); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Gl_Window.H b/msvc/fltk/include/FL/Fl_Gl_Window.H deleted file mode 100644 index ceb71046..00000000 --- a/msvc/fltk/include/FL/Fl_Gl_Window.H +++ /dev/null @@ -1,284 +0,0 @@ -// -// "$Id$" -// -// OpenGL header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Gl_Window widget . */ - -#ifndef Fl_Gl_Window_H -#define Fl_Gl_Window_H - -#include "Fl_Window.H" - -#ifndef GLContext -/** - Opaque pointer type to hide system specific implementation. -*/ -typedef void* GLContext; // actually a GLXContext or HGLDC -#endif - -class Fl_Gl_Choice; // structure to hold result of glXChooseVisual - -/** - The Fl_Gl_Window widget sets things up so OpenGL works. - - It also keeps an OpenGL "context" for that window, so that changes to the - lighting and projection may be reused between redraws. Fl_Gl_Window - also flushes the OpenGL streams and swaps buffers after draw() returns. - - OpenGL hardware typically provides some overlay bit planes, which - are very useful for drawing UI controls atop your 3D graphics. If the - overlay hardware is not provided, FLTK tries to simulate the overlay. - This works pretty well if your graphics are double buffered, but not - very well for single-buffered. - - Please note that the FLTK drawing and clipping functions - will not work inside an Fl_Gl_Window. All drawing - should be done using OpenGL calls exclusively. - Even though Fl_Gl_Window is derived from Fl_Group, - it is not useful to add other FLTK Widgets as children, - unless those widgets are modified to draw using OpenGL calls. -*/ -class FL_EXPORT Fl_Gl_Window : public Fl_Window { - - int mode_; - const int *alist; - Fl_Gl_Choice *g; - GLContext context_; - char valid_f_; - char damage1_; // damage() of back buffer - virtual void draw_overlay(); - void init(); - - void *overlay; - void make_overlay(); - friend class _Fl_Gl_Overlay; - - static int can_do(int, const int *); - int mode(int, const int *); - static int gl_plugin_linkage(); - -public: - - void show(); - void show(int a, char **b) {Fl_Window::show(a,b);} - void flush(); - void hide(); - void resize(int,int,int,int); - int handle(int); - - /** - Is turned off when FLTK creates a new context for this window or - when the window resizes, and is turned on \e after draw() is called. - You can use this inside your draw() method to avoid unnecessarily - initializing the OpenGL context. Just do this: - \code - void mywindow::draw() { - if (!valid()) { - glViewport(0,0,pixel_w(),pixel_h()); - glFrustum(...); - ...other initialization... - } - if (!context_valid()) { - ...load textures, etc. ... - } - ... draw your geometry here ... - } - \endcode - - You can turn valid() on by calling valid(1). You - should only do this after fixing the transformation inside a draw() - or after make_current(). This is done automatically after - draw() returns. - */ - char valid() const {return valid_f_ & 1;} - /** - See char Fl_Gl_Window::valid() const - */ - void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;} - void invalidate(); - - /** - Will only be set if the - OpenGL context is created or recreated. It differs from - Fl_Gl_Window::valid() which is also set whenever the context - changes size. - */ - char context_valid() const {return valid_f_ & 2;} - /** - See char Fl_Gl_Window::context_valid() const - */ - void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;} - - /** Returns non-zero if the hardware supports the given OpenGL mode. */ - static int can_do(int m) {return can_do(m,0);} - /** Returns non-zero if the hardware supports the given OpenGL mode. - \see Fl_Gl_Window::mode(const int *a) */ - static int can_do(const int *m) {return can_do(0, m);} - /** Returns non-zero if the hardware supports the current OpenGL mode. */ - int can_do() {return can_do(mode_,alist);} - /** Returns the current OpenGL capabilites of the window. - Don't use this if capabilities were set through Fl_Gl_Window::mode(const int *a). - */ - Fl_Mode mode() const {return (Fl_Mode)mode_;} - /** - Set or change the OpenGL capabilites of the window. The value can be - any of the following OR'd together: - - - \c FL_RGB - RGB color (not indexed) - - \c FL_RGB8 - RGB color with at least 8 bits of each color - - \c FL_INDEX - Indexed mode - - \c FL_SINGLE - not double buffered - - \c FL_DOUBLE - double buffered - - \c FL_ACCUM - accumulation buffer - - \c FL_ALPHA - alpha channel in color - - \c FL_DEPTH - depth buffer - - \c FL_STENCIL - stencil buffer - - \c FL_MULTISAMPLE - multisample antialiasing - - \c FL_OPENGL3 - use OpenGL version 3.0 or more. - - FL_RGB and FL_SINGLE have a value of zero, so they - are "on" unless you give FL_INDEX or FL_DOUBLE. - - If the desired combination cannot be done, FLTK will try turning off - FL_MULTISAMPLE. If this also fails the show() will call - Fl::error() and not show the window. - - You can change the mode while the window is displayed. This is most - useful for turning double-buffering on and off. Under X this will - cause the old X window to be destroyed and a new one to be created. If - this is a top-level window this will unfortunately also cause the - window to blink, raise to the top, and be de-iconized, and the xid() - will change, possibly breaking other code. It is best to make the GL - window a child of another window if you wish to do this! - - mode() must not be called within draw() since it - changes the current context. - - The FL_OPENGL3 flag is required to access OpenGL version 3 or more - under the X11 and MacOS platforms; it's optional under Windows. - See more details in \ref opengl3. - - \version the FL_OPENGL3 flag appeared in version 1.3.4 - */ - int mode(int a) {return mode(a,0);} - /** Set the OpenGL capabilites of the window using platform-specific data. - \param a zero-ending array of platform-specific attributes and attribute values -

Unix/Linux platform: attributes are GLX attributes adequate for the 3rd argument of - the glXChooseVisual() function (e.g., GLX_DOUBLEBUFFER, defined by including ). - \note What attributes are adequate here is subject to change. - The preferred, stable public API is Fl_Gl_Window::mode(int a). -

MSWindows platform: this member function is of no use. -

Mac OS X platform: attributes belong to the CGLPixelFormatAttribute enumeration - (defined by including , e.g., kCGLPFADoubleBuffer) - and may be followed by adequate attribute values. - */ - int mode(const int *a) {return mode(0, a);} - /** Returns a pointer to the GLContext that this window is using. - \see void context(void* v, int destroy_flag) */ - void* context() const {return context_;} - void context(void*, int destroy_flag = 0); - void make_current(); - void swap_buffers(); - void ortho(); - - /** - Returns true if the hardware overlay is possible. If this is false, - FLTK will try to simulate the overlay, with significant loss of update - speed. Calling this will cause FLTK to open the display. - */ - int can_do_overlay(); - /** - This method causes draw_overlay() to be called at a later time. - Initially the overlay is clear. If you want the window to display - something in the overlay when it first appears, you must call this - immediately after you show() your window. - */ - void redraw_overlay(); - void hide_overlay(); - /** - The make_overlay_current() method selects the OpenGL context - for the widget's overlay. It is called automatically prior to the - draw_overlay() method being called and can also be used to - implement feedback and/or selection within the handle() - method. - */ - void make_overlay_current(); - - // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Gl_Window* as_gl_window() {return this;} - - /** The number of pixels per FLTK unit of length for the window. - Returns 1, except for a window mapped to - an Apple 'retina' display, and if Fl::use_high_res_GL(bool) is set to true, - when it returns 2. This method dynamically adjusts its value when the window - is moved to/from a retina display. This method is useful, e.g., to convert, - in a window's handle() method, the FLTK units returned by Fl::event_x() and - Fl::event_y() to the pixel units used by the OpenGL source code. - \version 1.3.4 - */ -#ifdef __APPLE__ - float pixels_per_unit(); -#else - float pixels_per_unit() { return 1; } -#endif - /** Gives the window width in OpenGL pixels. - Generally identical with the result of the w() function, but for a window mapped to - an Apple 'retina' display, and if Fl::use_high_res_GL(bool) is set to true, - pixel_w() returns 2 * w(). This method detects when the window has been moved - between low and high resolution displays and automatically adjusts the returned value. - \version 1.3.4 - */ - int pixel_w() { return int(pixels_per_unit() * w() + 0.5); } - /** Gives the window height in OpenGL pixels. - Generally identical with the result of the h() function, but for a window mapped to - an Apple 'retina' display, and if Fl::use_high_res_GL(bool) is set to true, - pixel_h() returns 2 * h(). This method detects when the window has been moved - between low and high resolution displays and automatically adjusts the returned value. - \version 1.3.4 - */ - int pixel_h() { return int(pixels_per_unit() * h() + 0.5); } - - ~Fl_Gl_Window(); - /** - Creates a new Fl_Gl_Window widget using the given size, and label string. - The default boxtype is FL_NO_BOX. The default mode is FL_RGB|FL_DOUBLE|FL_DEPTH. - */ - Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();} - /** - Creates a new Fl_Gl_Window widget using the given position, - size, and label string. The default boxtype is FL_NO_BOX. The - default mode is FL_RGB|FL_DOUBLE|FL_DEPTH. - */ - - Fl_Gl_Window(int X, int Y, int W, int H, const char *l=0) - : Fl_Window(X,Y,W,H,l) {init();} - -protected: - /** - Draws the Fl_Gl_Window. - - You \e \b must override the draw() method. - */ - virtual void draw(); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Group.H b/msvc/fltk/include/FL/Fl_Group.H deleted file mode 100644 index 8a6f8f6e..00000000 --- a/msvc/fltk/include/FL/Fl_Group.H +++ /dev/null @@ -1,228 +0,0 @@ -// -// "$Id$" -// -// Group header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Group, Fl_End classes . */ - -#ifndef Fl_Group_H -#define Fl_Group_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -/** - The Fl_Group class is the FLTK container widget. It maintains - an array of child widgets. These children can themselves be any widget - including Fl_Group. The most important subclass of Fl_Group - is Fl_Window, however groups can also be used to control radio buttons - or to enforce resize behavior. - - The tab and arrow keys are used to move the focus between widgets of - this group, and to other groups. The only modifier grabbed is shift - (for shift-tab), so that ctrl-tab, alt-up, and such are free - for the app to use as shortcuts. -*/ -class FL_EXPORT Fl_Group : public Fl_Widget { - - Fl_Widget** array_; - Fl_Widget* savedfocus_; - Fl_Widget* resizable_; - int children_; - int *sizes_; // remembered initial sizes of children - - int navigation(int); - static Fl_Group *current_; - - // unimplemented copy ctor and assignment operator - Fl_Group(const Fl_Group&); - Fl_Group& operator=(const Fl_Group&); - -protected: - void draw(); - void draw_child(Fl_Widget& widget) const; - void draw_children(); - void draw_outside_label(const Fl_Widget& widget) const ; - void update_child(Fl_Widget& widget) const; - int *sizes(); - -public: - - int handle(int); - void begin(); - void end(); - static Fl_Group *current(); - static void current(Fl_Group *g); - - /** - Returns how many child widgets the group has. - */ - int children() const {return children_;} - /** - Returns array()[n]. No range checking is done! - */ - Fl_Widget* child(int n) const {return array()[n];} - int find(const Fl_Widget*) const; - /** - See int Fl_Group::find(const Fl_Widget *w) const - */ - int find(const Fl_Widget& o) const {return find(&o);} - Fl_Widget* const* array() const; - - void resize(int,int,int,int); - /** - Creates a new Fl_Group widget using the given position, size, - and label string. The default boxtype is FL_NO_BOX. - */ - Fl_Group(int,int,int,int, const char * = 0); - virtual ~Fl_Group(); - void add(Fl_Widget&); - /** - See void Fl_Group::add(Fl_Widget &w) - */ - void add(Fl_Widget* o) {add(*o);} - void insert(Fl_Widget&, int i); - /** - This does insert(w, find(before)). This will append the - widget if \p before is not in the group. - */ - void insert(Fl_Widget& o, Fl_Widget* before) {insert(o,find(before));} - void remove(int index); - void remove(Fl_Widget&); - /** - Removes the widget \p o from the group. - \sa void remove(Fl_Widget&) - */ - void remove(Fl_Widget* o) {remove(*o);} - void clear(); - - /** - See void Fl_Group::resizable(Fl_Widget *box) - */ - void resizable(Fl_Widget& o) {resizable_ = &o;} - /** - The resizable widget defines the resizing box for the group. When the - group is resized it calculates a new size and position for all of its - children. Widgets that are horizontally or vertically inside the - dimensions of the box are scaled to the new size. Widgets outside the - box are moved. - - In these examples the gray area is the resizable: - - \image html resizebox1.png - -
- - \image html resizebox2.png - - \image latex resizebox1.png "before resize" width=4cm - - \image latex resizebox2.png "after resize" width=4.85cm - - The resizable may be set to the group itself, in which case all the - contents are resized. This is the default value for Fl_Group, - although NULL is the default for Fl_Window and Fl_Pack. - - If the resizable is NULL then all widgets remain a fixed size - and distance from the top-left corner. - - It is possible to achieve any type of resize behavior by using an - invisible Fl_Box as the resizable and/or by using a hierarchy - of child Fl_Group's. - */ - void resizable(Fl_Widget* o) {resizable_ = o;} - /** - See void Fl_Group::resizable(Fl_Widget *box) - */ - Fl_Widget* resizable() const {return resizable_;} - /** - Adds a widget to the group and makes it the resizable widget. - */ - void add_resizable(Fl_Widget& o) {resizable_ = &o; add(o);} - void init_sizes(); - - /** - Controls whether the group widget clips the drawing of - child widgets to its bounding box. - - Set \p c to 1 if you want to clip the child widgets to the - bounding box. - - The default is to not clip (0) the drawing of child widgets. - */ - void clip_children(int c) { if (c) set_flag(CLIP_CHILDREN); else clear_flag(CLIP_CHILDREN); } - /** - Returns the current clipping mode. - - \return true, if clipping is enabled, false otherwise. - - \see void Fl_Group::clip_children(int c) - */ - unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } - - // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Group* as_group() { return this; } - - // back compatibility functions: - - /** - \deprecated This is for backwards compatibility only. You should use - \e W->%take_focus() instead. - \sa Fl_Widget::take_focus(); - */ - void focus(Fl_Widget* W) {W->take_focus();} - - /** This is for forms compatibility only */ - Fl_Widget* & _ddfdesign_kludge() {return resizable_;} - - /** This is for forms compatibility only */ - void forms_end(); -}; - -// dummy class used to end child groups in constructors for complex -// subclasses of Fl_Group: -/** - This is a dummy class that allows you to end a Fl_Group in a constructor list of a - class: - \code - class MyClass { - Fl_Group group; - Fl_Button button_in_group; - Fl_End end; - Fl_Button button_outside_group; - MyClass(); - }; - MyClass::MyClass() : - group(10,10,100,100), - button_in_group(20,20,60,30), - end(), - button_outside_group(10,120,60,30) - {} - \endcode -*/ -class FL_EXPORT Fl_End { -public: - /** All it does is calling Fl_Group::current()->end() */ - Fl_End() {Fl_Group::current()->end();} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Help_Dialog.H b/msvc/fltk/include/FL/Fl_Help_Dialog.H deleted file mode 100644 index f1a876f5..00000000 --- a/msvc/fltk/include/FL/Fl_Help_Dialog.H +++ /dev/null @@ -1,90 +0,0 @@ -// -// "$Id$" -// -// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// -// ======================================================================== -// DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!! -// ======================================================================== -// Please use fluid to change src/Fl_Help_Dialog.fl interactively -// and then use fluid to "write code" or edit and use fluid -c . -// ======================================================================== -// - -// generated by Fast Light User Interface Designer (fluid) version 1.0305 - -#ifndef Fl_Help_Dialog_H -#define Fl_Help_Dialog_H -#include -#include -#include -#include -#include -#include -#include - -class FL_EXPORT Fl_Help_Dialog { - int index_; - int max_; - int line_[100]; // FIXME: we must remove those static numbers - char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers - int find_pos_; -public: - Fl_Help_Dialog(); -private: - Fl_Double_Window *window_; - Fl_Button *back_; - inline void cb_back__i(Fl_Button*, void*); - static void cb_back_(Fl_Button*, void*); - Fl_Button *forward_; - inline void cb_forward__i(Fl_Button*, void*); - static void cb_forward_(Fl_Button*, void*); - Fl_Button *smaller_; - inline void cb_smaller__i(Fl_Button*, void*); - static void cb_smaller_(Fl_Button*, void*); - Fl_Button *larger_; - inline void cb_larger__i(Fl_Button*, void*); - static void cb_larger_(Fl_Button*, void*); - Fl_Input *find_; - inline void cb_find__i(Fl_Input*, void*); - static void cb_find_(Fl_Input*, void*); - Fl_Help_View *view_; - inline void cb_view__i(Fl_Help_View*, void*); - static void cb_view_(Fl_Help_View*, void*); -public: - ~Fl_Help_Dialog(); - int h(); - void hide(); - void load(const char *f); - void position(int xx, int yy); - void resize(int xx, int yy, int ww, int hh); - void show(); - void show(int argc, char **argv); - void textsize(Fl_Fontsize s); - Fl_Fontsize textsize(); - void topline(const char *n); - void topline(int n); - void value(const char *f); - const char * value() const; - int visible(); - int w(); - int x(); - int y(); -}; -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Help_View.H b/msvc/fltk/include/FL/Fl_Help_View.H deleted file mode 100644 index 64c876ac..00000000 --- a/msvc/fltk/include/FL/Fl_Help_View.H +++ /dev/null @@ -1,399 +0,0 @@ -// -// "$Id$" -// -// Help Viewer widget definitions. -// -// Copyright 1997-2010 by Easy Software Products. -// Image support by Matthias Melcher, Copyright 2000-2009. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Help_View widget . */ - -#ifndef Fl_Help_View_H -# define Fl_Help_View_H - -// -// Include necessary header files... -// - -# include -# include "Fl.H" -# include "Fl_Group.H" -# include "Fl_Scrollbar.H" -# include "fl_draw.H" -# include "Fl_Shared_Image.H" -# include "filename.H" - - -// -// Fl_Help_Func type - link callback function for files... -// - - -typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *); - - -// -// Fl_Help_Block structure... -// - -struct Fl_Help_Block { - const char *start, // Start of text - *end; // End of text - uchar border; // Draw border? - Fl_Color bgcolor; // Background color - int x, // Indentation/starting X coordinate - y, // Starting Y coordinate - w, // Width - h; // Height - int line[32]; // Left starting position for each line -}; - -// -// Fl_Help_Link structure... -// -/** Definition of a link for the html viewer. */ -struct Fl_Help_Link { - char filename[192], ///< Reference filename - name[32]; ///< Link target (blank if none) - int x, ///< X offset of link text - y, ///< Y offset of link text - w, ///< Width of link text - h; ///< Height of link text -}; - -/* - * Fl_Help_View font stack opaque implementation - */ - -/** Fl_Help_View font stack element definition. */ -struct FL_EXPORT Fl_Help_Font_Style { - Fl_Font f; ///< Font - Fl_Fontsize s; ///< Font Size - Fl_Color c; ///< Font Color - void get(Fl_Font &afont, Fl_Fontsize &asize, Fl_Color &acolor) {afont=f; asize=s; acolor=c;} ///< Gets current font attributes - void set(Fl_Font afont, Fl_Fontsize asize, Fl_Color acolor) {f=afont; s=asize; c=acolor;} ///< Sets current font attributes - Fl_Help_Font_Style(Fl_Font afont, Fl_Fontsize asize, Fl_Color acolor) {set(afont, asize, acolor);} - Fl_Help_Font_Style(){} // For in table use -}; - -/** Fl_Help_View font stack definition. */ -const size_t MAX_FL_HELP_FS_ELTS = 100; - -struct FL_EXPORT Fl_Help_Font_Stack { - /** font stack construction, initialize attributes. */ - Fl_Help_Font_Stack() { - nfonts_ = 0; - } - - void init(Fl_Font f, Fl_Fontsize s, Fl_Color c) { - nfonts_ = 0; - elts_[nfonts_].set(f, s, c); - fl_font(f, s); - fl_color(c); - } - /** Gets the top (current) element on the stack. */ - void top(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { elts_[nfonts_].get(f, s, c); } - /** Pushes the font style triplet on the stack, also calls fl_font() & fl_color() adequately */ - void push(Fl_Font f, Fl_Fontsize s, Fl_Color c) { - if (nfonts_ < MAX_FL_HELP_FS_ELTS-1) nfonts_ ++; - elts_[nfonts_].set(f, s, c); - fl_font(f, s); fl_color(c); - } - /** Pops from the stack the font style triplet and calls fl_font() & fl_color() adequately */ - void pop(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { - if (nfonts_ > 0) nfonts_ --; - top(f, s, c); - fl_font(f, s); fl_color(c); - } - /** Gets the current count of font style elements in the stack. */ - size_t count() const {return nfonts_;} // Gets the current number of fonts in the stack - -protected: - size_t nfonts_; ///< current number of fonts in stack - Fl_Help_Font_Style elts_[100]; ///< font elements -}; - -/** Fl_Help_Target structure */ - -struct Fl_Help_Target { - char name[32]; ///< Target name - int y; ///< Y offset of target -}; - -/** - The Fl_Help_View widget displays HTML text. Most HTML 2.0 - elements are supported, as well as a primitive implementation of tables. - GIF, JPEG, and PNG images are displayed inline. - - Supported HTML tags: - - A: HREF/NAME - - B - - BODY: BGCOLOR/TEXT/LINK - - BR - - CENTER - - CODE - - DD - - DL - - DT - - EM - - FONT: COLOR/SIZE/FACE=(helvetica/arial/sans/times/serif/symbol/courier) - - H1/H2/H3/H4/H5/H6 - - HEAD - - HR - - I - - IMG: SRC/WIDTH/HEIGHT/ALT - - KBD - - LI - - OL - - P - - PRE - - STRONG - - TABLE: TH/TD/TR/BORDER/BGCOLOR/COLSPAN/ALIGN=CENTER|RIGHT|LEFT - - TITLE - - TT - - U - - UL - - VAR - - Supported color names: - - black,red,green,yellow,blue,magenta,fuchsia,cyan,aqua,white,gray,grey,lime,maroon,navy,olive,purple,silver,teal. - - Supported urls: - - Internal: file: - - External: http: ftp: https: ipp: mailto: news: - - Quoted char names: - - Aacute aacute Acirc acirc acute AElig aelig Agrave agrave amp Aring aring Atilde atilde Auml auml - - brvbar bull - - Ccedil ccedil cedil cent copy curren - - deg divide - - Eacute eacute Ecirc ecirc Egrave egrave ETH eth Euml euml euro - - frac12 frac14 frac34 - - gt - - Iacute iacute Icirc icirc iexcl Igrave igrave iquest Iuml iuml - - laquo lt - - macr micro middot - - nbsp not Ntilde ntilde - - Oacute oacute Ocirc ocirc Ograve ograve ordf ordm Oslash oslash Otilde otilde Ouml ouml - - para permil plusmn pound - - quot - - raquo reg - - sect shy sup1 sup2 sup3 szlig - - THORN thorn times trade - - Uacute uacute Ucirc ucirc Ugrave ugrave uml Uuml uuml - - Yacute yacute - - yen Yuml yuml - -*/ -class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget - - enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments - - char title_[1024]; ///< Title string - Fl_Color defcolor_, ///< Default text color - bgcolor_, ///< Background color - textcolor_, ///< Text color - linkcolor_; ///< Link color - Fl_Font textfont_; ///< Default font for text - Fl_Fontsize textsize_; ///< Default font size - const char *value_; ///< HTML text value - Fl_Help_Font_Stack fstack_; ///< font stack management - int nblocks_, ///< Number of blocks/paragraphs - ablocks_; ///< Allocated blocks - Fl_Help_Block *blocks_; ///< Blocks - - Fl_Help_Func *link_; ///< Link transform function - - int nlinks_, ///< Number of links - alinks_; ///< Allocated links - Fl_Help_Link *links_; ///< Links - - int ntargets_, ///< Number of targets - atargets_; ///< Allocated targets - Fl_Help_Target *targets_; ///< Targets - - char directory_[FL_PATH_MAX];///< Directory for current file - char filename_[FL_PATH_MAX]; ///< Current filename - int topline_, ///< Top line in document - leftline_, ///< Lefthand position - size_, ///< Total document length - hsize_, ///< Maximum document width - scrollbar_size_; ///< Size for both scrollbars - Fl_Scrollbar scrollbar_, ///< Vertical scrollbar for document - hscrollbar_; ///< Horizontal scrollbar - - static int selection_first; - static int selection_last; - static int selection_push_first; - static int selection_push_last; - static int selection_drag_first; - static int selection_drag_last; - static int selected; - static int draw_mode; - static int mouse_x; - static int mouse_y; - static int current_pos; - static Fl_Help_View *current_view; - static Fl_Color hv_selection_color; - static Fl_Color hv_selection_text_color; - - - void initfont(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) { f = textfont_; s = textsize_; c = textcolor_; fstack_.init(f, s, c); } - void pushfont(Fl_Font f, Fl_Fontsize s) {fstack_.push(f, s, textcolor_);} - void pushfont(Fl_Font f, Fl_Fontsize s, Fl_Color c) {fstack_.push(f, s, c);} - void popfont(Fl_Font &f, Fl_Fontsize &s, Fl_Color &c) {fstack_.pop(f, s, c);} - - Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0); - void add_link(const char *n, int xx, int yy, int ww, int hh); - void add_target(const char *n, int yy); - static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1); - int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l); -#if FLTK_ABI_VERSION >= 10303 -protected: -#endif - void draw(); -#if FLTK_ABI_VERSION >= 10303 -private: -#endif - void format(); - void format_table(int *table_width, int *columns, const char *table); - void free_data(); - int get_align(const char *p, int a); - const char *get_attr(const char *p, const char *n, char *buf, int bufsize); - Fl_Color get_color(const char *n, Fl_Color c); - Fl_Shared_Image *get_image(const char *name, int W, int H); - int get_length(const char *l); -#if FLTK_ABI_VERSION >= 10303 -public: -#endif - int handle(int); -#if FLTK_ABI_VERSION >= 10303 -private: -#endif - - void hv_draw(const char *t, int x, int y, int entity_extra_length = 0); - char begin_selection(); - char extend_selection(); - void end_selection(int c=0); - void clear_global_selection(); - Fl_Help_Link *find_link(int, int); - void follow_link(Fl_Help_Link*); - -public: - - Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0); - ~Fl_Help_View(); - /** Returns the current directory for the text in the buffer. */ - const char *directory() const { if (directory_[0]) return (directory_); - else return ((const char *)0); } - /** Returns the current filename for the text in the buffer. */ - const char *filename() const { if (filename_[0]) return (filename_); - else return ((const char *)0); } - int find(const char *s, int p = 0); - /** - This method assigns a callback function to use when a link is - followed or a file is loaded (via Fl_Help_View::load()) that - requires a different file or path. - - The callback function receives a pointer to the Fl_Help_View - widget and the URI or full pathname for the file in question. - It must return a pathname that can be opened as a local file or NULL: - - \code - const char *fn(Fl_Widget *w, const char *uri); - \endcode - - The link function can be used to retrieve remote or virtual - documents, returning a temporary file that contains the actual - data. If the link function returns NULL, the value of - the Fl_Help_View widget will remain unchanged. - - If the link callback cannot handle the URI scheme, it should - return the uri value unchanged or set the value() of the widget - before returning NULL. - */ - void link(Fl_Help_Func *fn) { link_ = fn; } - int load(const char *f); - void resize(int,int,int,int); - /** Gets the size of the help view. */ - int size() const { return (size_); } - void size(int W, int H) { Fl_Widget::size(W, H); } - /** Sets the default text color. */ - void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; } - /** Returns the current default text color. */ - Fl_Color textcolor() const { return (defcolor_); } - /** Sets the default text font. */ - void textfont(Fl_Font f) { textfont_ = f; format(); } - /** Returns the current default text font. */ - Fl_Font textfont() const { return (textfont_); } - /** Sets the default text size. */ - void textsize(Fl_Fontsize s) { textsize_ = s; format(); } - /** Gets the default text size. */ - Fl_Fontsize textsize() const { return (textsize_); } - /** Returns the current document title, or NULL if there is no title. */ - const char *title() { return (title_); } - void topline(const char *n); - void topline(int); - /** Returns the current top line in pixels. */ - int topline() const { return (topline_); } - void leftline(int); - /** Gets the left position in pixels. */ - int leftline() const { return (leftline_); } - void value(const char *val); - /** Returns the current buffer contents. */ - const char *value() const { return (value_); } - void clear_selection(); - void select_all(); - /** - Gets the current size of the scrollbars' troughs, in pixels. - - If this value is zero (default), this widget will use the - Fl::scrollbar_size() value as the scrollbar's width. - - \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. - \see Fl::scrollbar_size(int) - */ - int scrollbar_size() const { - return(scrollbar_size_); - } - /** - Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. - - Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL - your widgets' scrollbars. This ensures your application - has a consistent UI, is the default behavior, and is normally - what you want. - - Only use THIS method if you really need to override the global - scrollbar size. The need for this should be rare. - - Setting \p newSize to the special value of 0 causes the widget to - track the global Fl::scrollbar_size(), which is the default. - - \param[in] newSize Sets the scrollbar size in pixels.\n - If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() - \see Fl::scrollbar_size() - */ - void scrollbar_size(int newSize) { - scrollbar_size_ = newSize; - } -}; - -#endif // !Fl_Help_View_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Hold_Browser.H b/msvc/fltk/include/FL/Fl_Hold_Browser.H deleted file mode 100644 index 7922b6ca..00000000 --- a/msvc/fltk/include/FL/Fl_Hold_Browser.H +++ /dev/null @@ -1,51 +0,0 @@ -// -// "$Id$" -// -// Hold browser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Hold_Browser widget . */ - -#ifndef Fl_Hold_Browser_H -#define Fl_Hold_Browser_H - -#include "Fl_Browser.H" - -/** - The Fl_Hold_Browser is a subclass of Fl_Browser - which lets the user select a single item, or no items by clicking on - the empty space. As long as the mouse button is held down the item - pointed to by it is highlighted, and this highlighting remains on when - the mouse button is released. Normally the callback is done when the - user releases the mouse, but you can change this with when(). -

See Fl_Browser for methods to add and remove lines from the browser. -*/ -class FL_EXPORT Fl_Hold_Browser : public Fl_Browser { -public: - /** - Creates a new Fl_Hold_Browser widget using the given - position, size, and label string. The default boxtype is FL_DOWN_BOX. - The constructor specializes Fl_Browser() by setting the type to FL_HOLD_BROWSER. - The destructor destroys the widget and frees all memory that has been allocated. - */ - Fl_Hold_Browser(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Hor_Fill_Slider.H b/msvc/fltk/include/FL/Fl_Hor_Fill_Slider.H deleted file mode 100644 index 934bc059..00000000 --- a/msvc/fltk/include/FL/Fl_Hor_Fill_Slider.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Horizontal fill slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Hor_Fill_Slider widget . */ - -#ifndef Fl_Hor_Fill_Slider_H -#define Fl_Hor_Fill_Slider_H - -#include "Fl_Slider.H" - -class FL_EXPORT Fl_Hor_Fill_Slider : public Fl_Slider { -public: - Fl_Hor_Fill_Slider(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Hor_Nice_Slider.H b/msvc/fltk/include/FL/Fl_Hor_Nice_Slider.H deleted file mode 100644 index c862f8bf..00000000 --- a/msvc/fltk/include/FL/Fl_Hor_Nice_Slider.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Horizontal "nice" slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Hor_Nice_Slider widget . */ - -#ifndef Fl_Hor_Nice_Slider_H -#define Fl_Hor_Nice_Slider_H - -#include "Fl_Slider.H" - -class FL_EXPORT Fl_Hor_Nice_Slider : public Fl_Slider { -public: - Fl_Hor_Nice_Slider(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Hor_Slider.H b/msvc/fltk/include/FL/Fl_Hor_Slider.H deleted file mode 100644 index 415cdb76..00000000 --- a/msvc/fltk/include/FL/Fl_Hor_Slider.H +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id$" -// -// Horizontal slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Hor_Slider widget . */ - -#ifndef Fl_Hor_Slider_H -#define Fl_Hor_Slider_H - -#include "Fl_Slider.H" - -/** Horizontal Slider class. - - \see class Fl_Slider. -*/ -class FL_EXPORT Fl_Hor_Slider : public Fl_Slider { -public: - - /** - Creates a new Fl_Hor_Slider widget using the given position, - size, and label string. - */ - Fl_Hor_Slider(int X,int Y,int W,int H,const char *l=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Hor_Value_Slider.H b/msvc/fltk/include/FL/Fl_Hor_Value_Slider.H deleted file mode 100644 index 183a1cfc..00000000 --- a/msvc/fltk/include/FL/Fl_Hor_Value_Slider.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Horizontal value slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Hor_Value_Slider widget . */ - -#ifndef Fl_Hor_Value_Slider_H -#define Fl_Hor_Value_Slider_H - -#include "Fl_Value_Slider.H" - -class FL_EXPORT Fl_Hor_Value_Slider : public Fl_Value_Slider { -public: - Fl_Hor_Value_Slider(int X,int Y,int W,int H,const char *l=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Image.H b/msvc/fltk/include/FL/Fl_Image.H deleted file mode 100644 index af092614..00000000 --- a/msvc/fltk/include/FL/Fl_Image.H +++ /dev/null @@ -1,262 +0,0 @@ -// -// "$Id$" -// -// Image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl_Image, Fl_RGB_Image classes. */ - -#ifndef Fl_Image_H -# define Fl_Image_H - -# include "Enumerations.H" -#include - -class Fl_Widget; -class Fl_Pixmap; -struct Fl_Menu_Item; -struct Fl_Label; - - -/** \enum Fl_RGB_Scaling - The scaling algorithm to use for RGB images. -*/ -enum Fl_RGB_Scaling { - FL_RGB_SCALING_NEAREST = 0, ///< default RGB image scaling algorithm - FL_RGB_SCALING_BILINEAR ///< more accurate, but slower RGB image scaling algorithm -}; - - -/** - \brief Base class for image caching and drawing. - - Fl_Image is the base class used for caching and drawing all kinds of images - in FLTK. This class keeps track of common image data such as the pixels, - colormap, width, height, and depth. Virtual methods are used to provide - type-specific image handling. - - Since the Fl_Image class does not support image - drawing by itself, calling the draw() method results in - a box with an X in it being drawn instead. -*/ -class FL_EXPORT Fl_Image { - -public: - static const int ERR_NO_IMAGE = -1; - static const int ERR_FILE_ACCESS = -2; - static const int ERR_FORMAT = -3; - -private: - int w_, h_, d_, ld_, count_; - const char * const *data_; - static Fl_RGB_Scaling RGB_scaling_; - - // Forbid use of copy constructor and assign operator - Fl_Image & operator=(const Fl_Image &); - Fl_Image(const Fl_Image &); - -protected: - - /** - Sets the current image width in pixels. - */ - void w(int W) {w_ = W;} - /** - Sets the current image height in pixels. - */ - void h(int H) {h_ = H;} - /** - Sets the current image depth. - */ - void d(int D) {d_ = D;} - /** - Sets the current line data size in bytes. - - Color images may contain extra data that is included after every - line of color image data and is normally not present. - - If \p LD is zero, then line data size is assumed to be w() * d() bytes. - - If \p LD is non-zero, then it must be positive and larger than w() * d() - to account for the extra data per line. - */ - void ld(int LD) {ld_ = LD;} - /** - Sets the current array pointer and count of pointers in the array. - */ - void data(const char * const *p, int c) {data_ = p; count_ = c;} - void draw_empty(int X, int Y); - - static void labeltype(const Fl_Label *lo, int lx, int ly, int lw, int lh, Fl_Align la); - static void measure(const Fl_Label *lo, int &lw, int &lh); - -public: - - /** - Returns the current image width in pixels. - */ - int w() const {return w_;} - /** - Returns the current image height in pixels. - */ - int h() const {return h_;} - /** - Returns the current image depth. - The return value will be 0 for bitmaps, 1 for - pixmaps, and 1 to 4 for color images.

- */ - int d() const {return d_;} - /** - Returns the current line data size in bytes. - \see ld(int) - */ - int ld() const {return ld_;} - /** - The count() method returns the number of data values - associated with the image. The value will be 0 for images with - no associated data, 1 for bitmap and color images, and greater - than 2 for pixmap images. - */ - int count() const {return count_;} - /** - Returns a pointer to the current image data array. - Use the count() method to find the size of the data array. - */ - const char * const *data() const {return data_;} - int fail(); - Fl_Image(int W, int H, int D); - virtual ~Fl_Image(); - virtual Fl_Image *copy(int W, int H); - /** - The copy() method creates a copy of the specified - image. If the width and height are provided, the image is - resized to the specified size. The image should be deleted (or in - the case of Fl_Shared_Image, released) when you are done - with it. - */ - Fl_Image *copy() { return copy(w(), h()); } - virtual void color_average(Fl_Color c, float i); - /** - The inactive() method calls - color_average(FL_BACKGROUND_COLOR, 0.33f) to produce - an image that appears grayed out. - - An internal copy is made of the original image before - changes are applied, to avoid modifying the original image. - */ - void inactive() { color_average(FL_GRAY, .33f); } - virtual void desaturate(); - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - /** - Draws the image with a bounding box. - Arguments X,Y,W,H specify - a bounding box for the image, with the origin - (upper-left corner) of the image offset by the \c cx - and \c cy arguments. - - In other words: fl_push_clip(X,Y,W,H) is applied, - the image is drawn with its upper-left corner at X-cx,Y-cy and its own width and height, - fl_pop_clip() is applied. - */ - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); // platform dependent - /** - Draws the image. - This form specifies the upper-lefthand corner of the image. - */ - void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} // platform dependent - virtual void uncache(); - - // set RGB image scaling method - static void RGB_scaling(Fl_RGB_Scaling); - - // get RGB image scaling method - static Fl_RGB_Scaling RGB_scaling(); -}; - - -/** - The Fl_RGB_Image class supports caching and drawing - of full-color images with 1 to 4 channels of color information. - Images with an even number of channels are assumed to contain - alpha information, which is used to blend the image with the - contents of the screen. - - Fl_RGB_Image is defined in - <FL/Fl_Image.H>, however for compatibility reasons - <FL/Fl_RGB_Image.H> should be included. -*/ -class FL_EXPORT Fl_RGB_Image : public Fl_Image { - friend class Fl_Quartz_Graphics_Driver; - friend class Fl_GDI_Graphics_Driver; - friend class Fl_GDI_Printer_Graphics_Driver; - friend class Fl_Xlib_Graphics_Driver; - static size_t max_size_; -public: - - /** Points to the start of the object's data array - */ - const uchar *array; - /** If non-zero, the object's data array is delete[]'d when deleting the object. - */ - int alloc_array; - - private: - -#if defined(__APPLE__) || defined(WIN32) - void *id_; // for internal use - void *mask_; // for internal use (mask bitmap) -#else - unsigned id_; // for internal use - unsigned mask_; // for internal use (mask bitmap) -#endif // __APPLE__ || WIN32 - -public: - - Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0); - Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY); - virtual ~Fl_RGB_Image(); - virtual Fl_Image *copy(int W, int H); - Fl_Image *copy() { return copy(w(), h()); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); - void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - virtual void uncache(); - /** Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object. - - The image size in bytes of an Fl_RGB_Image object is the value of the product w() * h() * d(). - If this product exceeds size, the created object of a derived class of Fl_RGB_Image - won't be loaded with the image data. - This does not apply to direct RGB image creation with - Fl_RGB_Image::Fl_RGB_Image(const uchar *bits, int W, int H, int D, int LD). - The default max_size() value is essentially infinite. - */ - static void max_size(size_t size) { max_size_ = size;} - /** Returns the maximum allowed image size in bytes when creating an Fl_RGB_Image object. - - \sa void Fl_RGB_Image::max_size(size_t) - */ - static size_t max_size() {return max_size_;} -}; - -#endif // !Fl_Image_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Image_Surface.H b/msvc/fltk/include/FL/Fl_Image_Surface.H deleted file mode 100644 index fd056210..00000000 --- a/msvc/fltk/include/FL/Fl_Image_Surface.H +++ /dev/null @@ -1,99 +0,0 @@ -// -// "$Id$" -// -// Draw-to-image code for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Image_Surface_H -#define Fl_Image_Surface_H - -#include -#include -#include - - -/** Directs all graphics requests to an Fl_Image. - - After creation of an Fl_Image_Surface object, call set_current() on it, and all subsequent graphics requests - will be recorded in the image. It's possible to draw widgets (using Fl_Image_Surface::draw()) - or to use any of the \ref fl_drawings or the \ref fl_attributes. - Finally, call image() on the object to obtain a newly allocated Fl_RGB_Image object. -
Fl_GL_Window objects can be drawn in the image as well. - -
Usage example: - \code - Fl_Widget *g = ...; // a widget you want to draw in an image - Fl_Image_Surface *img_surf = new Fl_Image_Surface(g->w(), g->h()); // create an Fl_Image_Surface object - img_surf->set_current(); // direct graphics requests to the image - fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background - img_surf->draw(g); // draw the g widget in the image - Fl_RGB_Image* image = img_surf->image(); // get the resulting image - delete img_surf; // delete the img_surf object - Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display - \endcode -*/ -class FL_EXPORT Fl_Image_Surface : public Fl_Surface_Device { -private: - void prepare_(int w, int h, int highres); - Fl_Offscreen offscreen; - int width; - int height; - Fl_Paged_Device *helper; -#ifdef __APPLE__ -#elif defined(WIN32) - HDC _sgc; - Window _sw; - Fl_Surface_Device *_ss; - int _savedc; -#else - Fl_Surface_Device *previous; - Window pre_window; - GC gc; -#endif -public: - static const char *class_id; - const char *class_name() {return class_id;}; -#if FLTK_ABI_VERSION >= 10304 || defined(FL_DOXYGEN) - Fl_Image_Surface(int w, int h, int highres = 0); -#else - Fl_Image_Surface(int w, int h, int highres); - Fl_Image_Surface(int w, int h); -#endif - ~Fl_Image_Surface(); - void set_current(); - void draw(Fl_Widget*, int delta_x = 0, int delta_y = 0); - void draw_decorated_window(Fl_Window* win, int delta_x = 0, int delta_y = 0); - Fl_RGB_Image *image(); - Fl_Shared_Image *highres_image(); -}; - -#ifdef __APPLE__ -/* Mac class to implement translate()/untranslate() for a flipped bitmap graphics context */ -class FL_EXPORT Fl_Quartz_Flipped_Surface_ : public Fl_Quartz_Surface_ { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_Quartz_Flipped_Surface_(int w, int h); - void translate(int x, int y); - void untranslate(); - virtual ~Fl_Quartz_Flipped_Surface_() {}; -}; -#endif - -#endif // Fl_Image_Surface_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Input.H b/msvc/fltk/include/FL/Fl_Input.H deleted file mode 100644 index 4967935e..00000000 --- a/msvc/fltk/include/FL/Fl_Input.H +++ /dev/null @@ -1,269 +0,0 @@ -// -// "$Id$" -// -// Input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Input widget . */ - -#ifndef Fl_Input_H -#define Fl_Input_H - -#include "Fl_Input_.H" - -/** - This is the FLTK text input widget. It displays a single line - of text and lets the user edit it. Normally it is drawn with an - inset box and a white background. The text may contain any - characters, and will correctly display any UTF text, using - ^X notation for unprintable control characters. It assumes the - font can draw any characters of the used scripts, which is true - for standard fonts under MSWindows and Mac OS X. - Characters can be input using the keyboard or the character palette/map. - Character composition is done using dead keys and/or a compose - key as defined by the operating system. -

- - - -
Keyboard and mouse bindings.
- Mouse button 1 - - Moves the cursor to this point. - Drag selects characters. - Double click selects words. - Triple click selects all line. - Shift+click extends the selection. - When you select text it is automatically copied to the selection buffer. -
- Mouse button 2 - - Insert the selection buffer at the point clicked. - You can also select a region and replace it with the selection buffer - by selecting the region with mouse button 2. -
- Mouse button 3 - - Currently acts like button 1. -
- Backspace - - Deletes one character to the left, or deletes the selected region. -
- Delete - - Deletes one character to the right, or deletes the selected region. - Combine with Shift for equivalent of ^X (copy+cut). -
- Enter - - May cause the callback, see when(). -
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Platform specific keyboard bindings.
Windows/Linux Mac Function
^A Command-A - Selects all text in the widget. - -
^C Command-C - Copy the current selection to the clipboard. - -
^I ^I - Insert a tab. - -
^J ^J - Insert a Line Feed.
- (Similar to literal 'Enter' character) - -
^L ^L - Insert a Form Feed. - -
^M ^M - Insert a Carriage Return. - -
^V,
Shift-Insert
Command-V - Paste the clipboard.
- (Macs keyboards don't have "Insert" keys, - but if they did, Shift-Insert would work) - -
^X,
Shift-Delete
Command-X,
Shift-Delete
- Cut.
- Copy the selection to the clipboard and delete it. - (If there's no selection, Shift-Delete acts like Delete) - -
^Z Command-Z - Undo.
- This is a single-level undo mechanism, but all adjacent - deletions and insertions are concatenated into a single "undo". - Often this will undo a lot more than you expected. - -
Shift-^Z Shift-Command-Z - Redo.
- Currently same behavior as ^Z. - Reserved for future multilevel undo/redo. - -
Arrow Keys Arrow Keys - Standard cursor movement.
- Can be combined with Shift to extend selection. - -
Home Command-Up,
Command-Left
- Move to start of line.
- Can be combined with Shift to extend selection. - -
End Command-Down,
Command-Right
- Move to end of line.
- Can be combined with Shift to extend selection. - -
Ctrl-HomeCommand-Up,
Command-PgUp,
Ctrl-Left
- Move to top of document/field.
- In single line input, moves to start of line. - In multiline input, moves to start of top line. - Can be combined with Shift to extend selection. - -
Ctrl-End Command-End,
Command-PgDn,
Ctrl-Right
- Move to bottom of document/field.
- In single line input, moves to end of line. - In multiline input, moves to end of last line. - Can be combined with Shift to extend selection. - -
Ctrl-Left Alt-Left - Word left.
- Can be combined with Shift to extend selection. - -
Ctrl-Right Alt-Right - Word right.
- Can be combined with Shift to extend selection. - -
Ctrl-Backspace Alt-Backspace - Delete word left. - -
Ctrl-Delete Alt-Delete - Delete word right. - -
- */ -class FL_EXPORT Fl_Input : public Fl_Input_ { - int handle_key(); - int shift_position(int p); - int shift_up_down_position(int p); - void handle_mouse(int keepmark=0); - - // Private keyboard functions - int kf_lines_up(int repeat_num); - int kf_lines_down(int repeat_num); - int kf_page_up(); - int kf_page_down(); - int kf_insert_toggle(); - int kf_delete_word_right(); - int kf_delete_word_left(); - int kf_delete_sol(); - int kf_delete_eol(); - int kf_delete_char_right(); - int kf_delete_char_left(); - int kf_move_sol(); - int kf_move_eol(); - int kf_clear_eol(); - int kf_move_char_left(); - int kf_move_char_right(); - int kf_move_word_left(); - int kf_move_word_right(); - int kf_move_up_and_sol(); - int kf_move_down_and_eol(); - int kf_top(); - int kf_bottom(); - int kf_select_all(); - int kf_undo(); - int kf_redo(); - int kf_copy(); - int kf_paste(); - int kf_copy_cut(); - -protected: - void draw(); -public: - int handle(int); - Fl_Input(int,int,int,int,const char * = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Input_.H b/msvc/fltk/include/FL/Fl_Input_.H deleted file mode 100644 index 99a39650..00000000 --- a/msvc/fltk/include/FL/Fl_Input_.H +++ /dev/null @@ -1,499 +0,0 @@ -// -// "$Id$" -// -// Input base class header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Input_ widget . */ - -#ifndef Fl_Input__H -#define Fl_Input__H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -#define FL_NORMAL_INPUT 0 -#define FL_FLOAT_INPUT 1 -#define FL_INT_INPUT 2 -#define FL_HIDDEN_INPUT 3 -#define FL_MULTILINE_INPUT 4 -#define FL_SECRET_INPUT 5 -#define FL_INPUT_TYPE 7 -#define FL_INPUT_READONLY 8 -#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) -#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) -#define FL_INPUT_WRAP 16 -#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) -#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP) - -/** - This class provides a low-overhead text input field. - - This is a virtual base class below Fl_Input. It has all - the same interfaces, but lacks the handle() and - draw() method. You may want to subclass it if you are - one of those people who likes to change how the editing keys - work. It may also be useful for adding scrollbars - to the input field. - - This can act like any of the subclasses of Fl_Input, by - setting type() to one of the following values: - - \code - #define FL_NORMAL_INPUT 0 - #define FL_FLOAT_INPUT 1 - #define FL_INT_INPUT 2 - #define FL_MULTILINE_INPUT 4 - #define FL_SECRET_INPUT 5 - #define FL_INPUT_TYPE 7 - #define FL_INPUT_READONLY 8 - #define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) - #define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) - #define FL_INPUT_WRAP 16 - #define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) - #define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP) - \endcode - - All variables that represent an index into a text buffer are byte-oriented, - not character oriented, counting from 0 (at or before the first character) - to size() (at the end of the buffer, after the last byte). Since UTF-8 - characters can be up to six bytes long, simply incrementing such an index - will not reliably advance to the next character in the text buffer. - - Indices and pointers into the text buffer should always point at a 7 bit ASCII - character or the beginning of a UTF-8 character sequence. Behavior for false - UTF-8 sequences and pointers into the middle of a sequence are undefined. - - \see Fl_Text_Display, Fl_Text_Editor for more powerful text handling widgets - - \internal - When porting this widget from ASCII to UTF-8, previously legal pointers into - the text of this widget can become illegal by pointing into the middle of - a UTF-8 sequence. This is not a big problem for Fl_Input_ because all code - in this module is quite tolerant. It could be problematic though when deriving - from this class because no feedback for illegal pointers is given. Additionally, - a careless "copy" call can put partial UTF-8 sequences into the clipboard. - - None of these issues should be disastrous. Nevertheless, we should - discuss how FLTK should handle false UTF-8 sequences and pointers. -*/ -class FL_EXPORT Fl_Input_ : public Fl_Widget { - - /** \internal Storage for the text field. */ - const char* value_; - - /** \internal Buffer memory for expanded text. \see expand() */ - char* buffer; - - /** \internal Size of text in bytes in the \p value_ field. */ - int size_; - - /** \internal Current size of internal value() buffer in bytes. */ - int bufsize; - - /** \internal Position of the cursor in the document. */ - int position_; - - /** \internal Position of the other end of the selected text. - If \p position_ equals \p mark_, no text is selected */ - int mark_; - - /** \internal Behavior of Tab key in multiline input widget. - If enabled (default) Tab causes focus nav, otherwise Tab is inserted - as a character. */ - int tab_nav_; - - /** \internal Offset to text origin within widget bounds */ - int xscroll_, yscroll_; - - /** \internal Minimal update pointer. Display requires redraw from here to the end - of the buffer. */ - int mu_p; - - /** \internal Maximum number of (UTF-8) characters a user can input. */ - int maximum_size_; - - /** \internal Shortcut key that will fetch focus for this widget. */ - int shortcut_; - - /** \internal This is set if no text but only the cursor needs updating. */ - uchar erase_cursor_only; - - /** \internal The font used for the entire text. */ - Fl_Font textfont_; - - /** \internal Height of the font used for the entire text. */ - Fl_Fontsize textsize_; - - /** \internal color of the entire text */ - Fl_Color textcolor_; - - /** \internal color of the text cursor */ - Fl_Color cursor_color_; - - /** \internal Horizontal cursor position in pixels while moving up or down. */ - static double up_down_pos; - - /** \internal Flag to remember last cursor move. */ - static int was_up_down; - - /* Convert a given text segment into the text that will be rendered on screen. */ - const char* expand(const char*, char*) const; - - /* Calculates the width in pixels of part of a text buffer. */ - double expandpos(const char*, const char*, const char*, int*) const; - - /* Mark a range of characters for update. */ - void minimal_update(int, int); - - /* Mark a range of characters for update. */ - void minimal_update(int p); - - /* Copy the value from a possibly static entry into the internal buffer. */ - void put_in_buffer(int newsize); - - /* Set the current font and font size. */ - void setfont() const; - -protected: - - /* Find the start of a word. */ - int word_start(int i) const; - - /* Find the end of a word. */ - int word_end(int i) const; - - /* Find the start of a line. */ - int line_start(int i) const; - - /* Find the end of a line. */ - int line_end(int i) const; - - /* Draw the text in the passed bounding box. */ - void drawtext(int, int, int, int); - - /* Move the cursor to the column given by up_down_pos. */ - int up_down_position(int, int keepmark=0); - - /* Handle mouse clicks and mouse moves. */ - void handle_mouse(int, int, int, int, int keepmark=0); - - /* Handle all kinds of text field related events. */ - int handletext(int e, int, int, int, int); - - /* Check the when() field and do a callback if indicated. */ - void maybe_do_callback(); - - /** \internal Horizontal offset of text to left edge of widget. */ - int xscroll() const {return xscroll_;} - - /** \internal Vertical offset of text to top edge of widget. */ - int yscroll() const {return yscroll_;} - void yscroll(int yOffset) { yscroll_ = yOffset; damage(FL_DAMAGE_EXPOSE);} - - /* Return the number of lines displayed on a single page. */ - int linesPerPage(); - -public: - - /* Change the size of the widget. */ - void resize(int, int, int, int); - - /* Constructor */ - Fl_Input_(int, int, int, int, const char* = 0); - - /* Destructor */ - ~Fl_Input_(); - - /* Changes the widget text. */ - int value(const char*); - - /* Changes the widget text. */ - int value(const char*, int); - - /* Changes the widget text. */ - int static_value(const char*); - - /* Changes the widget text. */ - int static_value(const char*, int); - - /** - Returns the text displayed in the widget. - - This function returns the current value, which is a pointer - to the internal buffer and is valid only until the next event is - handled. - - \return pointer to an internal buffer - do not free() this - \see Fl_Input_::value(const char*) - */ - const char* value() const {return value_;} - - /* Returns the character at index \p i. */ - Fl_Char index(int i) const; - - /** - Returns the number of bytes in value(). - - This may be greater than strlen(value()) if there are - \c nul characters in the text. - - \return number of bytes in the text - */ - int size() const {return size_;} - - /** Sets the width and height of this widget. - \param [in] W, H new width and height - \see Fl_Widget::size(int, int) */ - void size(int W, int H) { Fl_Widget::size(W, H); } - - /** Gets the maximum length of the input field in characters. - \see maximum_size(int). */ - int maximum_size() const {return maximum_size_;} - - /** Sets the maximum length of the input field in characters. - - This limits the number of characters that can be inserted - in the widget. - - Since FLTK 1.3 this is different than the buffer size, since one - character can be more than one byte in UTF-8 encoding. In FLTK 1.1 - this was the same (one byte = one character). - */ - void maximum_size(int m) {maximum_size_ = m;} - - /** Gets the position of the text cursor. - \return the cursor position as an index in the range 0..size() - \see position(int, int) - */ - int position() const {return position_;} - - /** Gets the current selection mark. - \return index into the text */ - int mark() const {return mark_;} - - /* Sets the index for the cursor and mark. */ - int position(int p, int m); - - /** Sets the cursor position and mark. - position(n) is the same as position(n, n). - \param p new index for cursor and mark - \return 0 if no positions changed - \see position(int, int), position(), mark(int) - */ - int position(int p) {return position(p, p);} - - /** Sets the current selection mark. - mark(n) is the same as position(position(),n). - \param m new index of the mark - \return 0 if the mark did not change - \see position(), position(int, int) */ - int mark(int m) {return position(position(), m);} - - /* Deletes text from \p b to \p e and inserts the new string \p text. */ - int replace(int b, int e, const char *text, int ilen=0); - - /** - Deletes the current selection. - - This function deletes the currently selected text - \e without storing it in the clipboard. To use the clipboard, - you may call copy() first or copy_cuts() after - this call. - - \return 0 if no data was copied - */ - int cut() {return replace(position(), mark(), 0);} - - /** - Deletes the next \p n bytes rounded to characters before or after the cursor. - - This function deletes the currently selected text - \e without storing it in the clipboard. To use the clipboard, - you may call copy() first or copy_cuts() after - this call. - - \param n number of bytes rounded to full characters and clamped to the buffer. - A negative number will cut characters to the left of the cursor. - \return 0 if no data was copied - */ - int cut(int n) {return replace(position(), position()+n, 0);} - - /** - Deletes all characters between index \p a and \p b. - - This function deletes the currently selected text - \e without storing it in the clipboard. To use the clipboard, - you may call copy() first or copy_cuts() after - this call. - - \param a, b range of bytes rounded to full characters and clamped to the buffer - \return 0 if no data was copied - */ - int cut(int a, int b) {return replace(a, b, 0);} - - /** - Inserts text at the cursor position. - - This function inserts the string in \p t at the cursor - position() and moves the new position and mark to - the end of the inserted text. - - \param [in] t text that will be inserted - \param [in] l length of text, or 0 if the string is terminated by \c nul. - \return 0 if no text was inserted - */ - int insert(const char* t, int l=0){return replace(position_, mark_, t, l);} - - /* Put the current selection into the clipboard. */ - int copy(int clipboard); - - /* Undo previous changes to the text buffer. */ - int undo(); - - /* Copy the yank buffer to the clipboard. */ - int copy_cuts(); - - /** Return the shortcut key associated with this widget. - \return shortcut keystroke - \see Fl_Button::shortcut() */ - int shortcut() const {return shortcut_;} - - /** - Sets the shortcut key associated with this widget. - Pressing the shortcut key gives text editing focus to this widget. - \param [in] s new shortcut keystroke - \see Fl_Button::shortcut() - */ - void shortcut(int s) {shortcut_ = s;} - - /** Gets the font of the text in the input field. - \return the current Fl_Font index */ - Fl_Font textfont() const {return textfont_;} - - /** Sets the font of the text in the input field. - The text font defaults to \c FL_HELVETICA. - \param [in] s the new text font */ - void textfont(Fl_Font s) {textfont_ = s;} - - /** Gets the size of the text in the input field. - \return the text height in pixels */ - Fl_Fontsize textsize() const {return textsize_;} - - /** Sets the size of the text in the input field. - The text height defaults to \c FL_NORMAL_SIZE. - \param [in] s the new font height in pixel units */ - void textsize(Fl_Fontsize s) {textsize_ = s;} - - /** Gets the color of the text in the input field. - \return the text color - \see textcolor(Fl_Color) */ - Fl_Color textcolor() const {return textcolor_;} - - /** Sets the color of the text in the input field. - The text color defaults to \c FL_FOREGROUND_COLOR. - \param [in] n new text color - \see textcolor() */ - void textcolor(Fl_Color n) {textcolor_ = n;} - - /** Gets the color of the cursor. - \return the current cursor color */ - Fl_Color cursor_color() const {return cursor_color_;} - - /** Sets the color of the cursor. - The default color for the cursor is \c FL_BLACK. - \param [in] n the new cursor color */ - void cursor_color(Fl_Color n) {cursor_color_ = n;} - - /** Gets the input field type. - \return the current input type */ - int input_type() const {return type() & FL_INPUT_TYPE; } - - /** Sets the input field type. - A redraw() is required to reformat the input field. - \param [in] t new input type */ - void input_type(int t) { type((uchar)(t | readonly())); } - - /** Gets the read-only state of the input field. - \return non-zero if this widget is read-only */ - int readonly() const { return type() & FL_INPUT_READONLY; } - - /** Sets the read-only state of the input field. - \param [in] b if \p b is 0, the text in this widget can be edited by the user */ - void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY)); - else type((uchar)(type() & ~FL_INPUT_READONLY)); } - - /** - Gets the word wrapping state of the input field. - Word wrap is only functional with multi-line input fields. - */ - int wrap() const { return type() & FL_INPUT_WRAP; } - - /** - Sets the word wrapping state of the input field. - Word wrap is only functional with multi-line input fields. - */ - void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP)); - else type((uchar)(type() & ~FL_INPUT_WRAP)); } - - /** - Sets whether the Tab key does focus navigation, - or inserts tab characters into Fl_Multiline_Input. - - By default this flag is enabled to provide the 'normal' behavior - most users expect; Tab navigates focus to the next widget. - To inserting an actual Tab character, users can use Ctrl-I - or copy/paste. - - Disabling this flag gives the old FLTK behavior where Tab - inserts a tab character into the text field, in which case - only the mouse can be used to navigate to the next field. - - History: This flag was provided for backwards support of FLTK's old 1.1.x - behavior where Tab inserts a tab character instead of navigating - focus to the next widget. This behavior was unique to Fl_Multiline_Input. - With the advent of Fl_Text_Editor, this old behavior has been deprecated. - - \param [in] val If \p val is 1, Tab advances focus (default).
- If \p val is 0, Tab inserts a tab character (old FLTK behavior). - - \see tab_nav(), Fl::OPTION_ARROW_FOCUS. - */ - void tab_nav(int val) { - tab_nav_ = val; - } - - /** - Gets whether the Tab key causes focus navigation in multiline input fields or not. - - If enabled (default), hitting Tab causes focus navigation to the next widget. - - If disabled, hitting Tab inserts a tab character into the text field. - \returns 1 if Tab advances focus (default), 0 if Tab inserts tab characters. - - \see tab_nav(int), Fl::OPTION_ARROW_FOCUS. - */ - int tab_nav() const { - return tab_nav_; - } -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Input_Choice.H b/msvc/fltk/include/FL/Fl_Input_Choice.H deleted file mode 100644 index efcbf8e9..00000000 --- a/msvc/fltk/include/FL/Fl_Input_Choice.H +++ /dev/null @@ -1,268 +0,0 @@ -// -// "$Id$" -// -// An input/chooser widget. -// ______________ ____ -// | || __ | -// | input area || \/ | -// |______________||____| -// -// Copyright 1998-2010 by Bill Spitzak and others. -// Copyright 2004 by Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Input_Choice widget . */ - -#ifndef Fl_Input_Choice_H -#define Fl_Input_Choice_H - -#include -#include -#include -#include -#include -#include - -/** - A combination of the input widget and a menu button. - - \image html input_choice.jpg - \image latex input_choice.jpg "Fl_Input_Choice widget" width=6cm - - The user can either type into the input area, or use the - menu button chooser on the right to choose an item which loads - the input area with the selected text. - - The application can directly access both the internal Fl_Input - and Fl_Menu_Button widgets respectively using the input() and menubutton() - accessor methods. - - The default behavior is to invoke the Fl_Input_Choice::callback() - if the user changes the input field's contents, either by typing, - pasting, or clicking a different item in the choice menu. - - The callback can determine if an item was picked vs. typing - into the input field by checking the value of menubutton()->changed(), - which will be: - - - 1: the user picked a different item in the choice menu - - 0: the user typed or pasted directly into the input field - - Example use: - \code - #include - #include - #include - #include - void choice_cb(Fl_Widget *w, void *userdata) { - // Show info about the picked item - Fl_Input_Choice *choice = (Fl_Input_Choice*)w; - const Fl_Menu_Item *item = choice->menubutton()->mvalue(); - printf("*** Choice Callback:\n"); - printf(" item label()='%s'\n", item ? item->label() : "(No item)"); - printf(" item value()=%d\n", choice->menubutton()->value()); - printf(" input value()='%s'\n", choice->input()->value()); - printf(" The user %s\n", choice->menubutton()->changed() - ? "picked a menu item" - : "typed text"); - } - int main() { - Fl_Double_Window win(200,100,"Input Choice"); - win.begin(); - Fl_Input_Choice choice(10,10,100,30); - choice.callback(choice_cb, 0); - choice.add("Red"); - choice.add("Orange"); - choice.add("Yellow"); - //choice.value("Red"); // uncomment to make "Red" default - win.end(); - win.show(); - return Fl::run(); - } - \endcode -*/ -class FL_EXPORT Fl_Input_Choice : public Fl_Group { - // Private class to handle slightly 'special' behavior of menu button - class InputMenuButton : public Fl_Menu_Button { - void draw() { - draw_box(FL_UP_BOX, color()); - fl_color(active_r() ? labelcolor() : fl_inactive(labelcolor())); - int xc = x()+w()/2, yc=y()+h()/2; - fl_polygon(xc-5,yc-3,xc+5,yc-3,xc,yc+3); - if (Fl::focus() == this) draw_focus(); - } - public: - InputMenuButton(int X,int Y,int W,int H,const char*L=0) : - Fl_Menu_Button(X, Y, W, H, L) { box(FL_UP_BOX); } - }; - - Fl_Input *inp_; - InputMenuButton *menu_; - - // note: this is used by the Fl_Input_Choice ctor defined in Fl_Group. - static void menu_cb(Fl_Widget*, void *data) { - Fl_Input_Choice *o=(Fl_Input_Choice *)data; - Fl_Widget_Tracker wp(o); - const Fl_Menu_Item *item = o->menubutton()->mvalue(); - if (item && item->flags & (FL_SUBMENU|FL_SUBMENU_POINTER)) return; // ignore submenus - if (!strcmp(o->inp_->value(), o->menu_->text())) - { - o->Fl_Widget::clear_changed(); - if (o->when() & FL_WHEN_NOT_CHANGED) - o->do_callback(); - } - else - { - o->inp_->value(o->menu_->text()); - o->inp_->set_changed(); - o->Fl_Widget::set_changed(); - if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) - o->do_callback(); - } - - if (wp.deleted()) return; - - if (o->callback() != default_callback) - { - o->Fl_Widget::clear_changed(); - o->inp_->clear_changed(); - } - } - - // note: this is used by the Fl_Input_Choice ctor defined in Fl_Group. - static void inp_cb(Fl_Widget*, void *data) { - Fl_Input_Choice *o=(Fl_Input_Choice *)data; - Fl_Widget_Tracker wp(o); - if (o->inp_->changed()) { - o->Fl_Widget::set_changed(); - if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) - o->do_callback(); - } else { - o->Fl_Widget::clear_changed(); - if (o->when() & FL_WHEN_NOT_CHANGED) - o->do_callback(); - } - - if (wp.deleted()) return; - - if (o->callback() != default_callback) - o->Fl_Widget::clear_changed(); - } - - // Custom resize behavior -- input stretches, menu button doesn't - inline int inp_x() { return(x() + Fl::box_dx(box())); } - inline int inp_y() { return(y() + Fl::box_dy(box())); } - inline int inp_w() { return(w() - Fl::box_dw(box()) - 20); } - inline int inp_h() { return(h() - Fl::box_dh(box())); } - - inline int menu_x() { return(x() + w() - 20 - Fl::box_dx(box())); } - inline int menu_y() { return(y() + Fl::box_dy(box())); } - inline int menu_w() { return(20); } - inline int menu_h() { return(h() - Fl::box_dh(box())); } - -public: - /** - Creates a new Fl_Input_Choice widget using the given position, size, - and label string. - Inherited destructor destroys the widget and any values associated with it. - */ - Fl_Input_Choice(int X,int Y,int W,int H,const char*L=0); - - /** Adds an item to the menu. - You can access the more complex Fl_Menu_Button::add() methods - (setting callbacks, userdata, etc), via menubutton(). Example: - \code - Fl_Input_Choice *choice = new Fl_Input_Choice(100,10,120,25,"Fonts"); - Fl_Menu_Button *mb = choice->menubutton(); // use Fl_Input_Choice's Fl_Menu_Button - mb->add("Helvetica", 0, MyFont_CB, (void*)mydata); // use Fl_Menu_Button's add() methods - mb->add("Courier", 0, MyFont_CB, (void*)mydata); - mb->add("More..", 0, FontDialog_CB, (void*)mydata); - \endcode - */ - void add(const char *s) { menu_->add(s); } - /** Returns the combined changed() state of the input and menu button widget. */ - int changed() const { return inp_->changed() | Fl_Widget::changed(); } - /** Clears the changed() state of both input and menu button widgets. */ - void clear_changed() { - inp_->clear_changed(); - Fl_Widget::clear_changed(); - } - /** Sets the changed() state of both input and menu button widgets - to the specfied value.*/ - void set_changed() { - inp_->set_changed(); - // no need to call Fl_Widget::set_changed() - } - /** Removes all items from the menu. */ - void clear() { menu_->clear(); } - /** Gets the box type of the menu button */ - Fl_Boxtype down_box() const { return (menu_->down_box()); } - /** Sets the box type of the menu button */ - void down_box(Fl_Boxtype b) { menu_->down_box(b); } - /** Gets the Fl_Menu_Item array used for the menu. */ - const Fl_Menu_Item *menu() { return (menu_->menu()); } - /** Sets the Fl_Menu_Item array used for the menu. */ - void menu(const Fl_Menu_Item *m) { menu_->menu(m); } - void resize(int X, int Y, int W, int H) { - Fl_Group::resize(X,Y,W,H); - inp_->resize(inp_x(), inp_y(), inp_w(), inp_h()); - menu_->resize(menu_x(), menu_y(), menu_w(), menu_h()); - } - /// Gets the Fl_Input text field's text color. - Fl_Color textcolor() const { return (inp_->textcolor());} - /// Sets the Fl_Input text field's text color to \p c. - void textcolor(Fl_Color c) { inp_->textcolor(c);} - /// Gets the Fl_Input text field's font style. - Fl_Font textfont() const { return (inp_->textfont());} - /// Sets the Fl_Input text field's font style to \p f. - void textfont(Fl_Font f) { inp_->textfont(f);} - /// Gets the Fl_Input text field's font size - Fl_Fontsize textsize() const { return (inp_->textsize()); } - /// Sets the Fl_Input text field's font size to \p s. - void textsize(Fl_Fontsize s) { inp_->textsize(s); } - /// Returns the Fl_Input text field's current contents. - const char* value() const { return (inp_->value()); } - /** Sets the Fl_Input text field's contents to \p val. - Does not affect the menu selection.*/ - void value(const char *val) { inp_->value(val); } - /** Chooses item# \p val in the menu, and sets the Fl_Input text field - to that value. Any previous text is cleared.*/ - void value(int val) { - menu_->value(val); - inp_->value(menu_->text(val)); - } - /** Returns a pointer to the internal Fl_Menu_Button widget. - This can be used to access any of the methods of the menu button, e.g. - \code - Fl_Input_Choice *choice = new Fl_Input_Choice(100,10,120,25,"Choice:"); - [..] - // Print all the items in the choice menu - for ( int t=0; tmenubutton()->size(); t++ ) { - const Fl_Menu_Item &item = choice->menubutton()->menu()[t]; - printf("item %d -- label=%s\n", t, item.label() ? item.label() : "(Null)"); - } - \endcode - */ - Fl_Menu_Button *menubutton() { return menu_; } - /** Returns a pointer to the internal Fl_Input widget. - This can be used to directly access all of the Fl_Input widget's - methods.*/ - Fl_Input *input() { return inp_; } -}; - -#endif // !Fl_Input_Choice_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Int_Input.H b/msvc/fltk/include/FL/Fl_Int_Input.H deleted file mode 100644 index cb6e8141..00000000 --- a/msvc/fltk/include/FL/Fl_Int_Input.H +++ /dev/null @@ -1,46 +0,0 @@ -// -// "$Id$" -// -// Integer input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Int_Input widget . */ - -#ifndef Fl_Int_Input_H -#define Fl_Int_Input_H - -#include "Fl_Input.H" - -/** - The Fl_Int_Input class is a subclass of Fl_Input that only allows - the user to type decimal digits (or hex numbers of the form 0xaef). -*/ -class FL_EXPORT Fl_Int_Input : public Fl_Input { -public: - /** - Creates a new Fl_Int_Input widget using the given position, - size, and label string. The default boxtype is FL_DOWN_BOX. - - Inherited destructor destroys the widget and any value associated with it. - */ - Fl_Int_Input(int X,int Y,int W,int H,const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_JPEG_Image.H b/msvc/fltk/include/FL/Fl_JPEG_Image.H deleted file mode 100644 index d9b162c1..00000000 --- a/msvc/fltk/include/FL/Fl_JPEG_Image.H +++ /dev/null @@ -1,44 +0,0 @@ -// -// "$Id$" -// -// JPEG image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_JPEG_Image class . */ - -#ifndef Fl_JPEG_Image_H -#define Fl_JPEG_Image_H -# include "Fl_Image.H" - -/** - The Fl_JPEG_Image class supports loading, caching, - and drawing of Joint Photographic Experts Group (JPEG) File - Interchange Format (JFIF) images. The class supports grayscale - and color (RGB) JPEG image files. - */ -class FL_EXPORT Fl_JPEG_Image : public Fl_RGB_Image { - -public: - - Fl_JPEG_Image(const char *filename); - Fl_JPEG_Image(const char *name, const unsigned char *data); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Light_Button.H b/msvc/fltk/include/FL/Fl_Light_Button.H deleted file mode 100644 index 8735f3dc..00000000 --- a/msvc/fltk/include/FL/Fl_Light_Button.H +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id$" -// -// Lighted button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Light_Button widget . */ - -#ifndef Fl_Light_Button_H -#define Fl_Light_Button_H - -#include "Fl_Button.H" - -/** - This subclass displays the "on" state by turning on a light, - rather than drawing pushed in. The shape of the "light" - is initially set to FL_DOWN_BOX. The color of the light when - on is controlled with selection_color(), which defaults to FL_YELLOW. - - Buttons generate callbacks when they are clicked by the user. You - control exactly when and how by changing the values for type() and when(). -

\image html Fl_Light_Button.png

- \image latex Fl_Light_Button.png "Fl_Light_Button" width=4cm -*/ -class FL_EXPORT Fl_Light_Button : public Fl_Button { -protected: - virtual void draw(); -public: - virtual int handle(int); - Fl_Light_Button(int x,int y,int w,int h,const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Line_Dial.H b/msvc/fltk/include/FL/Fl_Line_Dial.H deleted file mode 100644 index 150a05df..00000000 --- a/msvc/fltk/include/FL/Fl_Line_Dial.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Line dial header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Line_Dial widget . */ - -#ifndef Fl_Line_Dial_H -#define Fl_Line_Dial_H - -#include "Fl_Dial.H" - -class FL_EXPORT Fl_Line_Dial : public Fl_Dial { -public: - Fl_Line_Dial(int X,int Y,int W,int H, const char *L = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Menu.H b/msvc/fltk/include/FL/Fl_Menu.H deleted file mode 100644 index a0f2545d..00000000 --- a/msvc/fltk/include/FL/Fl_Menu.H +++ /dev/null @@ -1,24 +0,0 @@ -// -// "$Id$" -// -// Old menu header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// this include file is for back compatibility only -#include "Fl_Menu_Item.H" - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Menu_.H b/msvc/fltk/include/FL/Fl_Menu_.H deleted file mode 100644 index 23925866..00000000 --- a/msvc/fltk/include/FL/Fl_Menu_.H +++ /dev/null @@ -1,188 +0,0 @@ -// -// "$Id$" -// -// Menu base class header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Menu_ widget . */ - -#ifndef Fl_Menu__H -#define Fl_Menu__H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif -#include "Fl_Menu_Item.H" - -/** - Base class of all widgets that have a menu in FLTK. - - Currently FLTK provides you with Fl_Menu_Button, Fl_Menu_Bar, and Fl_Choice. - - The class contains a pointer to an array of structures of type Fl_Menu_Item. - The array may either be supplied directly by the user program, or it may - be "private": a dynamically allocated array managed by the Fl_Menu_. - - When the user clicks a menu item, value() is set to that item - and then: - - - If the Fl_Menu_Item has a callback set, that callback - is invoked with any userdata configured for it. - (The Fl_Menu_ widget's callback is NOT invoked.) - - - For any Fl_Menu_Items that \b don't have a callback set, - the Fl_Menu_ widget's callback is invoked with any userdata - configured for it. The callback can determine which item - was picked using value(), mvalue(), item_pathname(), etc. -*/ -class FL_EXPORT Fl_Menu_ : public Fl_Widget { - - Fl_Menu_Item *menu_; - const Fl_Menu_Item *value_; - -protected: - - uchar alloc; // flag indicates if menu_ is a dynamic copy (=1) or not (=0) - uchar down_box_; - Fl_Font textfont_; - Fl_Fontsize textsize_; - Fl_Color textcolor_; - - int item_pathname_(char *name, int namelen, const Fl_Menu_Item *finditem, - const Fl_Menu_Item *menu=0) const; -public: - Fl_Menu_(int,int,int,int,const char * =0); - ~Fl_Menu_(); - - int item_pathname(char *name, int namelen, const Fl_Menu_Item *finditem=0) const; - const Fl_Menu_Item* picked(const Fl_Menu_Item*); - const Fl_Menu_Item* find_item(const char *name); - const Fl_Menu_Item* find_item(Fl_Callback*); - int find_index(const char *name) const; - int find_index(const Fl_Menu_Item *item) const; - int find_index(Fl_Callback *cb) const; - - /** - Returns the menu item with the entered shortcut (key value). - - This searches the complete menu() for a shortcut that matches the - entered key value. It must be called for a FL_KEYBOARD or FL_SHORTCUT - event. - - If a match is found, the menu's callback will be called. - - \return matched Fl_Menu_Item or NULL. - */ - const Fl_Menu_Item* test_shortcut() {return picked(menu()->test_shortcut());} - void global(); - - /** - Returns a pointer to the array of Fl_Menu_Items. This will either be - the value passed to menu(value) or the private copy. - \sa size() -- returns the size of the Fl_Menu_Item array. - - \b Example: How to walk the array: - \code - for ( int t=0; tsize(); t++ ) { // walk array of items - const Fl_Menu_Item &item = menubar->menu()[t]; // get each item - fprintf(stderr, "item #%d -- label=%s, value=%s type=%s\n", - t, - item.label() ? item.label() : "(Null)", // menu terminators have NULL labels - (item.flags & FL_MENU_VALUE) ? "set" : "clear", // value of toggle or radio items - (item.flags & FL_SUBMENU) ? "Submenu" : "Item"); // see if item is a submenu or actual item - } - \endcode - - */ - const Fl_Menu_Item *menu() const {return menu_;} - void menu(const Fl_Menu_Item *m); - void copy(const Fl_Menu_Item *m, void* user_data = 0); - int insert(int index, const char*, int shortcut, Fl_Callback*, void* = 0, int = 0); - int add(const char*, int shortcut, Fl_Callback*, void* = 0, int = 0); // see src/Fl_Menu_add.cxx - /** See int Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0) */ - int add(const char* a, const char* b, Fl_Callback* c, void* d = 0, int e = 0) { - return add(a,fl_old_shortcut(b),c,d,e); - } - /** See int Fl_Menu_::insert(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0) */ - int insert(int index, const char* a, const char* b, Fl_Callback* c, void* d = 0, int e = 0) { - return insert(index,a,fl_old_shortcut(b),c,d,e); - } - int add(const char *); - int size() const ; - void size(int W, int H) { Fl_Widget::size(W, H); } - void clear(); - int clear_submenu(int index); - void replace(int,const char *); - void remove(int); - /** Changes the shortcut of item \p i to \p s. */ - void shortcut(int i, int s) {menu_[i].shortcut(s);} - /** Sets the flags of item i. For a list of the flags, see Fl_Menu_Item. */ - void mode(int i,int fl) {menu_[i].flags = fl;} - /** Gets the flags of item i. For a list of the flags, see Fl_Menu_Item. */ - int mode(int i) const {return menu_[i].flags;} - - /** Returns a pointer to the last menu item that was picked. */ - const Fl_Menu_Item *mvalue() const {return value_;} - /** Returns the index into menu() of the last item chosen by the user. It is zero initially. */ - int value() const {return value_ ? (int)(value_-menu_) : -1;} - int value(const Fl_Menu_Item*); - /** - The value is the index into menu() of the last item chosen by - the user. It is zero initially. You can set it as an integer, or set - it with a pointer to a menu item. The set routines return non-zero if - the new value is different than the old one. - */ - int value(int i) {return value(menu_+i);} - /** Returns the title of the last item chosen. */ - const char *text() const {return value_ ? value_->text : 0;} - /** Returns the title of item i. */ - const char *text(int i) const {return menu_[i].text;} - - /** Gets the current font of menu item labels. */ - Fl_Font textfont() const {return textfont_;} - /** Sets the current font of menu item labels. */ - void textfont(Fl_Font c) {textfont_=c;} - /** Gets the font size of menu item labels. */ - Fl_Fontsize textsize() const {return textsize_;} - /** Sets the font size of menu item labels. */ - void textsize(Fl_Fontsize c) {textsize_=c;} - /** Get the current color of menu item labels. */ - Fl_Color textcolor() const {return textcolor_;} - /** Sets the current color of menu item labels. */ - void textcolor(Fl_Color c) {textcolor_=c;} - - /** - This box type is used to surround the currently-selected items in the - menus. If this is FL_NO_BOX then it acts like - FL_THIN_UP_BOX and selection_color() acts like - FL_WHITE, for back compatibility. - */ - Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;} - /** See Fl_Boxtype Fl_Menu_::down_box() const */ - void down_box(Fl_Boxtype b) {down_box_ = b;} - - /** For back compatibility, same as selection_color() */ - Fl_Color down_color() const {return selection_color();} - /** For back compatibility, same as selection_color() */ - void down_color(unsigned c) {selection_color(c);} - void setonly(Fl_Menu_Item* item); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Menu_Bar.H b/msvc/fltk/include/FL/Fl_Menu_Bar.H deleted file mode 100644 index dcb76652..00000000 --- a/msvc/fltk/include/FL/Fl_Menu_Bar.H +++ /dev/null @@ -1,97 +0,0 @@ -// -// "$Id$" -// -// Menu bar header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Menu_Bar widget . */ - -#ifndef Fl_Menu_Bar_H -#define Fl_Menu_Bar_H - -#include "Fl_Menu_.H" - -/** - This widget provides a standard menubar interface. Usually you will - put this widget along the top edge of your window. The height of the - widget should be 30 for the menu titles to draw correctly with the - default font. - - The items on the bar and the menus they bring up are defined by a - single Fl_Menu_Item array. - Because a Fl_Menu_Item array defines a hierarchy, the - top level menu defines the items in the menubar, while the submenus - define the pull-down menus. Sub-sub menus and lower pop up to the right - of the submenus. - - \image html menubar.png - \image latex menubar.png " menubar" width=12cm - - If there is an item in the top menu that is not a title of a - submenu, then it acts like a "button" in the menubar. Clicking on it - will pick it. - - When the user clicks a menu item, value() is set to that item - and then: - - - The item's callback is done if one has been set; the - Fl_Menu_Bar is passed as the Fl_Widget* argument, - along with any userdata configured for the callback. - - - If the item does not have a callback, the Fl_Menu_Bar's callback - is done instead, along with any userdata configured for the callback. - The callback can determine which item was picked using - value(), mvalue(), item_pathname(), etc. - - Submenus will also pop up in response to shortcuts indicated by - putting a '&' character in the name field of the menu item. If you put a - '&' character in a top-level "button" then the shortcut picks it. The - '&' character in submenus is ignored until the menu is popped up. - - Typing the shortcut() of any of the menu items will cause - callbacks exactly the same as when you pick the item with the mouse. -*/ -class FL_EXPORT Fl_Menu_Bar : public Fl_Menu_ { -protected: - void draw(); -public: - int handle(int); - /** - Creates a new Fl_Menu_Bar widget using the given position, - size, and label string. The default boxtype is FL_UP_BOX. - - The constructor sets menu() to NULL. See - Fl_Menu_ for the methods to set or change the menu. - - labelsize(), labelfont(), and labelcolor() - are used to control how the menubar items are drawn. They are - initialized from the Fl_Menu static variables, but you can - change them if desired. - - label() is ignored unless you change align() to - put it outside the menubar. - - The destructor removes the Fl_Menu_Bar widget and all of its - menu items. - */ - Fl_Menu_Bar(int X, int Y, int W, int H, const char *l=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Menu_Button.H b/msvc/fltk/include/FL/Fl_Menu_Button.H deleted file mode 100644 index 7f18eab6..00000000 --- a/msvc/fltk/include/FL/Fl_Menu_Button.H +++ /dev/null @@ -1,85 +0,0 @@ -// -// "$Id$" -// -// Menu button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Menu_Button widget . */ - -#ifndef Fl_Menu_Button_H -#define Fl_Menu_Button_H - -#include "Fl_Menu_.H" - -/** - This is a button that when pushed pops up a menu (or hierarchy of - menus) defined by an array of - Fl_Menu_Item objects. -

\image html menu_button.png

- \image latex menu_button.png " menu_button" width=5cm -

Normally any mouse button will pop up a menu and it is lined up - below the button as shown in the picture. However an Fl_Menu_Button - may also control a pop-up menu. This is done by setting the type(). - If type() is zero a normal menu button is produced. - If it is nonzero then this is a pop-up menu. The bits in type() indicate - what mouse buttons pop up the menu (see Fl_Menu_Button::popup_buttons).

-

The menu will also pop up in response to shortcuts indicated by - putting a '&' character in the label().

-

Typing the shortcut() of any of the menu items will cause - callbacks exactly the same as when you pick the item with the mouse. - The '&' character in menu item names are only looked at when the menu is - popped up, however.

- - When the user clicks a menu item, value() is set to that item - and then: - - - The item's callback is done if one has been set; the - Fl_Menu_Button is passed as the Fl_Widget* argument, - along with any userdata configured for the callback. - - - If the item does not have a callback, the Fl_Menu_Button's callback - is done instead, along with any userdata configured for it. - The callback can determine which item was picked using - value(), mvalue(), item_pathname(), etc. -*/ -class FL_EXPORT Fl_Menu_Button : public Fl_Menu_ { -protected: - void draw(); -public: - /** - \brief indicate what mouse buttons pop up the menu. - - Values for type() used to indicate what mouse buttons pop up the menu. - Fl_Menu_Button::POPUP3 is usually what you want. - */ - enum popup_buttons {POPUP1 = 1, /**< pops up with the mouse 1st button. */ - POPUP2, /**< pops up with the mouse 2nd button. */ - POPUP12, /**< pops up with the mouse 1st or 2nd buttons. */ - POPUP3, /**< pops up with the mouse 3rd button. */ - POPUP13, /**< pops up with the mouse 1st or 3rd buttons. */ - POPUP23, /**< pops up with the mouse 2nd or 3rd buttons. */ - POPUP123 /**< pops up with any mouse button. */ - }; - int handle(int); - const Fl_Menu_Item* popup(); - Fl_Menu_Button(int,int,int,int,const char * =0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Menu_Item.H b/msvc/fltk/include/FL/Fl_Menu_Item.H deleted file mode 100644 index 8b19a798..00000000 --- a/msvc/fltk/include/FL/Fl_Menu_Item.H +++ /dev/null @@ -1,443 +0,0 @@ -// -// "$Id$" -// -// Menu item header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Menu_Item_H -#define Fl_Menu_Item_H - -# include "Fl_Widget.H" -# include "Fl_Image.H" - -# if defined(__APPLE__) && defined(check) -# undef check -# endif - -// doxygen needs the following line to enable e.g. ::FL_MENU_TOGGLE to link to the enums -/// @file - -enum { // values for flags: - FL_MENU_INACTIVE = 1, ///< Deactivate menu item (gray out) - FL_MENU_TOGGLE= 2, ///< Item is a checkbox toggle (shows checkbox for on/off state) - FL_MENU_VALUE = 4, ///< The on/off state for checkbox/radio buttons (if set, state is 'on') - FL_MENU_RADIO = 8, ///< Item is a radio button (one checkbox of many can be on) - FL_MENU_INVISIBLE = 0x10, ///< Item will not show up (shortcut will work) - FL_SUBMENU_POINTER = 0x20, ///< Indicates user_data() is a pointer to another menu array - FL_SUBMENU = 0x40, ///< This item is a submenu to other items - FL_MENU_DIVIDER = 0x80, ///< Creates divider line below this item. Also ends a group of radio buttons. - FL_MENU_HORIZONTAL = 0x100 ///< ??? -- reserved -}; - -extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*); - -class Fl_Menu_; - -/** - The Fl_Menu_Item structure defines a single menu item that - is used by the Fl_Menu_ class. - \code - struct Fl_Menu_Item { - const char* text; // label() - ulong shortcut_; - Fl_Callback* callback_; - void* user_data_; - int flags; - uchar labeltype_; - uchar labelfont_; - uchar labelsize_; - uchar labelcolor_; - }; - - enum { // values for flags: - FL_MENU_INACTIVE = 1, // Deactivate menu item (gray out) - FL_MENU_TOGGLE = 2, // Item is a checkbox toggle (shows checkbox for on/off state) - FL_MENU_VALUE = 4, // The on/off state for checkbox/radio buttons (if set, state is 'on') - FL_MENU_RADIO = 8, // Item is a radio button (one checkbox of many can be on) - FL_MENU_INVISIBLE = 0x10, // Item will not show up (shortcut will work) - FL_SUBMENU_POINTER = 0x20, // Indicates user_data() is a pointer to another menu array - FL_SUBMENU = 0x40, // This item is a submenu to other items - FL_MENU_DIVIDER = 0x80, // Creates divider line below this item. Also ends a group of radio buttons. - FL_MENU_HORIZONTAL = 0x100 // ??? -- reserved - }; - \endcode - Typically menu items are statically defined; for example: - \code - Fl_Menu_Item popup[] = { - {"&alpha", FL_ALT+'a', the_cb, (void*)1}, - {"&beta", FL_ALT+'b', the_cb, (void*)2}, - {"gamma", FL_ALT+'c', the_cb, (void*)3, FL_MENU_DIVIDER}, - {"&strange", 0, strange_cb}, - {"&charm", 0, charm_cb}, - {"&truth", 0, truth_cb}, - {"b&eauty", 0, beauty_cb}, - {"sub&menu", 0, 0, 0, FL_SUBMENU}, - {"one"}, - {"two"}, - {"three"}, - {0}, - {"inactive", FL_ALT+'i', 0, 0, FL_MENU_INACTIVE|FL_MENU_DIVIDER}, - {"invisible",FL_ALT+'i', 0, 0, FL_MENU_INVISIBLE}, - {"check", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE|FL_MENU_VALUE}, - {"box", FL_ALT+'i', 0, 0, FL_MENU_TOGGLE}, - {0}}; - \endcode - produces: - - \image html menu.png - \image latex menu.png "menu" width=10cm - - A submenu title is identified by the bit FL_SUBMENU in the - flags field, and ends with a label() that is NULL. - You can nest menus to any depth. A pointer to the first item in the - submenu can be treated as an Fl_Menu array itself. It is also - possible to make separate submenu arrays with FL_SUBMENU_POINTER flags. - - You should use the method functions to access structure members and - not access them directly to avoid compatibility problems with future - releases of FLTK. -*/ -struct FL_EXPORT Fl_Menu_Item { - const char *text; ///< menu item text, returned by label() - int shortcut_; ///< menu item shortcut - Fl_Callback *callback_; ///< menu item callback - void *user_data_; ///< menu item user_data for the menu's callback - int flags; ///< menu item flags like FL_MENU_TOGGLE, FL_MENU_RADIO - uchar labeltype_; ///< how the menu item text looks like - Fl_Font labelfont_; ///< which font for this menu item text - Fl_Fontsize labelsize_; ///< size of menu item text - Fl_Color labelcolor_; ///< menu item text color - - // advance N items, skipping submenus: - const Fl_Menu_Item *next(int=1) const; - - /** - Advances a pointer by n items through a menu array, skipping - the contents of submenus and invisible items. There are two calls so - that you can advance through const and non-const data. - */ - Fl_Menu_Item *next(int i=1) { - return (Fl_Menu_Item*)(((const Fl_Menu_Item*)this)->next(i));} - - /** Returns the first menu item, same as next(0). */ - const Fl_Menu_Item *first() const { return next(0); } - - /** Returns the first menu item, same as next(0). */ - Fl_Menu_Item *first() { return next(0); } - - // methods on menu items: - /** - Returns the title of the item. - A NULL here indicates the end of the menu (or of a submenu). - A '&' in the item will print an underscore under the next letter, - and if the menu is popped up that letter will be a "shortcut" to pick - that item. To get a real '&' put two in a row. - */ - const char* label() const {return text;} - - /** See const char* Fl_Menu_Item::label() const */ - void label(const char* a) {text=a;} - - /** See const char* Fl_Menu_Item::label() const */ - void label(Fl_Labeltype a,const char* b) {labeltype_ = a; text = b;} - - /** - Returns the menu item's labeltype. - A labeltype identifies a routine that draws the label of the - widget. This can be used for special effects such as emboss, or to use - the label() pointer as another form of data such as a bitmap. - The value FL_NORMAL_LABEL prints the label as text. - */ - Fl_Labeltype labeltype() const {return (Fl_Labeltype)labeltype_;} - - /** - Sets the menu item's labeltype. - A labeltype identifies a routine that draws the label of the - widget. This can be used for special effects such as emboss, or to use - the label() pointer as another form of data such as a bitmap. - The value FL_NORMAL_LABEL prints the label as text. - */ - void labeltype(Fl_Labeltype a) {labeltype_ = a;} - - /** - Gets the menu item's label color. - This color is passed to the labeltype routine, and is typically the - color of the label text. This defaults to FL_BLACK. If this - color is not black fltk will \b not use overlay bitplanes to draw - the menu - this is so that images put in the menu draw correctly. - */ - Fl_Color labelcolor() const {return labelcolor_;} - - /** - Sets the menu item's label color. - \see Fl_Color Fl_Menu_Item::labelcolor() const - */ - void labelcolor(Fl_Color a) {labelcolor_ = a;} - /** - Gets the menu item's label font. - Fonts are identified by small 8-bit indexes into a table. See the - enumeration list for predefined fonts. The default value is a - Helvetica font. The function Fl::set_font() can define new fonts. - */ - Fl_Font labelfont() const {return labelfont_;} - - /** - Sets the menu item's label font. - Fonts are identified by small 8-bit indexes into a table. See the - enumeration list for predefined fonts. The default value is a - Helvetica font. The function Fl::set_font() can define new fonts. - */ - void labelfont(Fl_Font a) {labelfont_ = a;} - - /** Gets the label font pixel size/height. */ - Fl_Fontsize labelsize() const {return labelsize_;} - - /** Sets the label font pixel size/height.*/ - void labelsize(Fl_Fontsize a) {labelsize_ = a;} - - /** - Returns the callback function that is set for the menu item. - Each item has space for a callback function and an argument for that - function. Due to back compatibility, the Fl_Menu_Item itself - is not passed to the callback, instead you have to get it by calling - ((Fl_Menu_*)w)->mvalue() where w is the widget argument. - */ - Fl_Callback_p callback() const {return callback_;} - - /** - Sets the menu item's callback function and userdata() argument. - \see Fl_Callback_p Fl_MenuItem::callback() const - */ - void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;} - - /** - Sets the menu item's callback function. - This method does not set the userdata() argument. - \see Fl_Callback_p Fl_MenuItem::callback() const - */ - void callback(Fl_Callback* c) {callback_=c;} - - /** - Sets the menu item's callback function. - This method does not set the userdata() argument. - \see Fl_Callback_p Fl_MenuItem::callback() const - */ - void callback(Fl_Callback0*c) {callback_=(Fl_Callback*)c;} - - /** - Sets the menu item's callback function and userdata() argument. - This method does not set the userdata() argument. - The argument \p is cast to void* and stored as the userdata() - for the menu item's callback function. - \see Fl_Callback_p Fl_MenuItem::callback() const - */ - void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)(fl_intptr_t)p;} - - /** - Gets the user_data() argument that is sent to the callback function. - */ - void* user_data() const {return user_data_;} - /** - Sets the user_data() argument that is sent to the callback function. - */ - void user_data(void* v) {user_data_ = v;} - /** - Gets the user_data() argument that is sent to the callback function. - For convenience you can also define the callback as taking a long - argument. This method casts the stored userdata() argument to long - and returns it as a \e long value. - */ - long argument() const {return (long)(fl_intptr_t)user_data_;} - /** - Sets the user_data() argument that is sent to the callback function. - For convenience you can also define the callback as taking a long - argument. This method casts the given argument \p v to void* - and stores it in the menu item's userdata() member. - This may not be portable to some machines. - */ - void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;} - - /** Gets what key combination shortcut will trigger the menu item. */ - int shortcut() const {return shortcut_;} - - /** - Sets exactly what key combination will trigger the menu item. The - value is a logical 'or' of a key and a set of shift flags, for instance - FL_ALT+'a' or FL_ALT+FL_F+10 or just 'a'. A value of - zero disables the shortcut. - - The key can be any value returned by Fl::event_key(), but will usually - be an ASCII letter. Use a lower-case letter unless you require the shift - key to be held down. - - The shift flags can be any set of values accepted by Fl::event_state(). - If the bit is on that shift key must be pushed. Meta, Alt, Ctrl, - and Shift must be off if they are not in the shift flags (zero for the - other bits indicates a "don't care" setting). - */ - void shortcut(int s) {shortcut_ = s;} - /** - Returns true if either FL_SUBMENU or FL_SUBMENU_POINTER - is on in the flags. FL_SUBMENU indicates an embedded submenu - that goes from the next item through the next one with a NULL - label(). FL_SUBMENU_POINTER indicates that user_data() - is a pointer to another menu array. - */ - int submenu() const {return flags&(FL_SUBMENU|FL_SUBMENU_POINTER);} - /** - Returns true if a checkbox will be drawn next to this item. - This is true if FL_MENU_TOGGLE or FL_MENU_RADIO is set in the flags. - */ - int checkbox() const {return flags&FL_MENU_TOGGLE;} - /** - Returns true if this item is a radio item. - When a radio button is selected all "adjacent" radio buttons are - turned off. A set of radio items is delimited by an item that has - radio() false, or by an item with FL_MENU_DIVIDER turned on. - */ - int radio() const {return flags&FL_MENU_RADIO;} - /** Returns the current value of the check or radio item. - This is zero (0) if the menu item is not checked and - non-zero otherwise. You should not rely on a particular value, - only zero or non-zero. - \note The returned value for a checked menu item as of FLTK 1.3.2 - is FL_MENU_VALUE (4), but may be 1 in a future version. - */ - int value() const {return flags&FL_MENU_VALUE;} - /** - Turns the check or radio item "on" for the menu item. Note that this - does not turn off any adjacent radio items like set_only() does. - */ - void set() {flags |= FL_MENU_VALUE;} - - /** Turns the check or radio item "off" for the menu item. */ - void clear() {flags &= ~FL_MENU_VALUE;} - - void setonly(); - - /** Gets the visibility of an item. */ - int visible() const {return !(flags&FL_MENU_INVISIBLE);} - - /** Makes an item visible in the menu. */ - void show() {flags &= ~FL_MENU_INVISIBLE;} - - /** Hides an item in the menu. */ - void hide() {flags |= FL_MENU_INVISIBLE;} - - /** Gets whether or not the item can be picked. */ - int active() const {return !(flags&FL_MENU_INACTIVE);} - - /** Allows a menu item to be picked. */ - void activate() {flags &= ~FL_MENU_INACTIVE;} - /** - Prevents a menu item from being picked. Note that this will also cause - the menu item to appear grayed-out. - */ - void deactivate() {flags |= FL_MENU_INACTIVE;} - /** Returns non 0 if FL_INACTIVE and FL_INVISIBLE are cleared, 0 otherwise. */ - int activevisible() const {return !(flags & (FL_MENU_INACTIVE|FL_MENU_INVISIBLE));} - - // compatibility for FLUID so it can set the image of a menu item... - - /** compatibility api for FLUID, same as a->label(this) */ - void image(Fl_Image* a) {a->label(this);} - - /** compatibility api for FLUID, same as a.label(this) */ - void image(Fl_Image& a) {a.label(this);} - - // used by menubar: - int measure(int* h, const Fl_Menu_*) const; - void draw(int x, int y, int w, int h, const Fl_Menu_*, int t=0) const; - - // popup menus without using an Fl_Menu_ widget: - const Fl_Menu_Item* popup( - int X, int Y, - const char *title = 0, - const Fl_Menu_Item* picked=0, - const Fl_Menu_* = 0) const; - const Fl_Menu_Item* pulldown( - int X, int Y, int W, int H, - const Fl_Menu_Item* picked = 0, - const Fl_Menu_* = 0, - const Fl_Menu_Item* title = 0, - int menubar=0) const; - const Fl_Menu_Item* test_shortcut() const; - const Fl_Menu_Item* find_shortcut(int *ip=0, const bool require_alt = false) const; - - /** - Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument. - The callback is called with the stored user_data() as its second argument. - You must first check that callback() is non-zero before calling this. - */ - void do_callback(Fl_Widget* o) const {callback_(o, user_data_);} - - /** - Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument. - This call overrides the callback's second argument with the given value \p arg. - You must first check that callback() is non-zero before calling this. - */ - void do_callback(Fl_Widget* o,void* arg) const {callback_(o, arg);} - - /** - Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument. - This call overrides the callback's second argument with the - given value \p arg. long \p arg is cast to void* when calling - the callback. - You must first check that callback() is non-zero before calling this. - */ - void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)(fl_intptr_t)arg);} - - // back-compatibility, do not use: - - /** back compatibility only \deprecated. */ - int checked() const {return flags&FL_MENU_VALUE;} - - /** back compatibility only \deprecated. */ - void check() {flags |= FL_MENU_VALUE;} - - /** back compatibility only \deprecated. */ - void uncheck() {flags &= ~FL_MENU_VALUE;} - - int insert(int,const char*,int,Fl_Callback*,void* =0, int =0); - int add(const char*, int shortcut, Fl_Callback*, void* =0, int = 0); - - /** See int add(const char*, int shortcut, Fl_Callback*, void*, int) */ - int add(const char*a, const char* b, Fl_Callback* c, - void* d = 0, int e = 0) { - return add(a,fl_old_shortcut(b),c,d,e);} - - int size() const ; -}; - -typedef Fl_Menu_Item Fl_Menu; // back compatibility - -enum { // back-compatibility enum: - FL_PUP_NONE = 0, - FL_PUP_GREY = FL_MENU_INACTIVE, - FL_PUP_GRAY = FL_MENU_INACTIVE, - FL_MENU_BOX = FL_MENU_TOGGLE, - FL_PUP_BOX = FL_MENU_TOGGLE, - FL_MENU_CHECK = FL_MENU_VALUE, - FL_PUP_CHECK = FL_MENU_VALUE, - FL_PUP_RADIO = FL_MENU_RADIO, - FL_PUP_INVISIBLE = FL_MENU_INVISIBLE, - FL_PUP_SUBMENU = FL_SUBMENU_POINTER -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Menu_Window.H b/msvc/fltk/include/FL/Fl_Menu_Window.H deleted file mode 100644 index 90e6426b..00000000 --- a/msvc/fltk/include/FL/Fl_Menu_Window.H +++ /dev/null @@ -1,57 +0,0 @@ -// -// "$Id$" -// -// Menu window header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Menu_Window widget . */ - -#ifndef Fl_Menu_Window_H -#define Fl_Menu_Window_H - -#include "Fl_Single_Window.H" - -/** - The Fl_Menu_Window widget is a window type used for menus. By - default the window is drawn in the hardware overlay planes if they are - available so that the menu don't force the rest of the window to - redraw. -*/ -class FL_EXPORT Fl_Menu_Window : public Fl_Single_Window { -public: - void show(); - void erase(); - void flush(); - void hide(); - /** Tells if hardware overlay mode is set */ - unsigned int overlay() {return !(flags()&NO_OVERLAY);} - /** Tells FLTK to use hardware overlay planes if they are available. */ - void set_overlay() {clear_flag(NO_OVERLAY);} - /** Tells FLTK to use normal drawing planes instead of overlay planes. - This is usually necessary if your menu contains multi-color pixmaps. */ - void clear_overlay() {set_flag(NO_OVERLAY);} - ~Fl_Menu_Window(); - /** Creates a new Fl_Menu_Window widget using the given size, and label string. */ - Fl_Menu_Window(int W, int H, const char *l = 0); - /** Creates a new Fl_Menu_Window widget using the given position, size, and label string. */ - Fl_Menu_Window(int X, int Y, int W, int H, const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Multi_Browser.H b/msvc/fltk/include/FL/Fl_Multi_Browser.H deleted file mode 100644 index 8774fd71..00000000 --- a/msvc/fltk/include/FL/Fl_Multi_Browser.H +++ /dev/null @@ -1,54 +0,0 @@ -// -// "$Id$" -// -// Multi browser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Multi_Browser widget . */ - -#ifndef Fl_Multi_Browser_H -#define Fl_Multi_Browser_H - -#include "Fl_Browser.H" - -/** - The Fl_Multi_Browser class is a subclass of Fl_Browser - which lets the user select any set of the lines. The user interface - is Macintosh style: clicking an item turns off all the others and - selects that one, dragging selects all the items the mouse moves over, - and ctrl + click (Cmd+click on the Mac OS platform) toggles the items. - Shift + click extends the selection until the clicked item. - This is different from how forms did it. - Normally the callback is done when the user releases the - mouse, but you can change this with when(). -

See Fl_Browser for methods to add and remove lines from the browser. -*/ -class FL_EXPORT Fl_Multi_Browser : public Fl_Browser { -public: - /** - Creates a new Fl_Multi_Browser widget using the given - position, size, and label string. The default boxtype is FL_DOWN_BOX. - The constructor specializes Fl_Browser() by setting the type to FL_MULTI_BROWSER. - The destructor destroys the widget and frees all memory that has been allocated. - */ - Fl_Multi_Browser(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Multi_Label.H b/msvc/fltk/include/FL/Fl_Multi_Label.H deleted file mode 100644 index 63d0ef2f..00000000 --- a/msvc/fltk/include/FL/Fl_Multi_Label.H +++ /dev/null @@ -1,78 +0,0 @@ -// -// "$Id$" -// -// Multi-label header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Multi_Label_H -#define Fl_Multi_Label_H - -class Fl_Widget; -struct Fl_Menu_Item; - -/** This struct allows multiple labels to be added to objects that might normally have only one label. - - This struct allows a mixed text and/or graphics label to be applied to an object that - would normally only have a single (usually text only) label. - - Most regular FLTK widgets now support the ability to associate both images and text - with a label but some special cases, notably the non-widget Fl_Menu_Item objects, do not. - Fl_Multi_Label may be used to create menu items that have an icon and text, which would - not normally be possible for an Fl_Menu_Item. - For example, Fl_Multi_Label is used in the New->Code submenu in fluid, and others. - - Each Fl_Multi_Label holds two elements, labela and labelb; each may hold either a - text label (const char*) or an image (Fl_Image*). When displayed, labela is drawn first - and labelb is drawn immediately to its right. - - More complex labels might be constructed by setting labelb as another Fl_Multi_Label and - thus chaining up a series of label elements. - - When assigning a label element to one of labela or labelb, they should be explicitly cast - to (const char*) if they are not of that type already. - - \see Fl_Label and Fl_Labeltype - */ -struct FL_EXPORT Fl_Multi_Label { - /** Holds the "leftmost" of the two elements in the composite label. - Typically this would be assigned either a text string (const char*), - a (Fl_Image*) or a (Fl_Multi_Label*). */ - const char* labela; - /** Holds the "rightmost" of the two elements in the composite label. - Typically this would be assigned either a text string (const char*), - a (Fl_Image*) or a (Fl_Multi_Label*). */ - const char* labelb; - /** Holds the "type" of labela. - Typically this is set to FL_NORMAL_LABEL for a text label, - _FL_IMAGE_LABEL for an image (based on Fl_image) or _FL_MULTI_LABEL - if "chaining" multiple Fl_Multi_Label elements together. */ - uchar typea; - /** Holds the "type" of labelb. - Typically this is set to FL_NORMAL_LABEL for a text label, - _FL_IMAGE_LABEL for an image (based on Fl_image) or _FL_MULTI_LABEL - if "chaining" multiple Fl_Multi_Label elements together. */ - uchar typeb; - - /** This method is used to associate a Fl_Multi_Label with a Fl_Widget. */ - void label(Fl_Widget*); - /** This method is used to associate a Fl_Multi_Label with a Fl_Menu_Item. */ - void label(Fl_Menu_Item*); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Multiline_Input.H b/msvc/fltk/include/FL/Fl_Multiline_Input.H deleted file mode 100644 index 4ac3441e..00000000 --- a/msvc/fltk/include/FL/Fl_Multiline_Input.H +++ /dev/null @@ -1,60 +0,0 @@ -// -// "$Id$" -// -// Multiline input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Multiline_Input widget . */ - -#ifndef Fl_Multiline_Input_H -#define Fl_Multiline_Input_H - -#include "Fl_Input.H" - -/** - This input field displays '\\n' characters as new lines rather than ^J, - and accepts the Return, Tab, and up and down arrow keys. This is for - editing multiline text. - - This is far from the nirvana of text editors, and is probably only - good for small bits of text, 10 lines at most. Note that this widget - does not support scrollbars or per-character color control. - - If you are presenting large amounts of text and need scrollbars - or full color control of characters, you probably want Fl_Text_Editor - instead. - - In FLTK 1.3.x, the default behavior of the 'Tab' key was changed - to support consistent focus navigation. To get the older FLTK 1.1.x - behavior, set Fl_Input_::tab_nav() to 0. Newer programs should consider using - Fl_Text_Editor. -*/ -class FL_EXPORT Fl_Multiline_Input : public Fl_Input { -public: - /** - Creates a new Fl_Multiline_Input widget using the given - position, size, and label string. The default boxtype is FL_DOWN_BOX. - - Inherited destructor destroys the widget and any value associated with it. - */ - Fl_Multiline_Input(int X,int Y,int W,int H,const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Multiline_Output.H b/msvc/fltk/include/FL/Fl_Multiline_Output.H deleted file mode 100644 index d5ffdc5d..00000000 --- a/msvc/fltk/include/FL/Fl_Multiline_Output.H +++ /dev/null @@ -1,56 +0,0 @@ -// -// "$Id$" -// -// Multi line output header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Multiline_Output widget . */ - -#ifndef Fl_Multiline_Output_H -#define Fl_Multiline_Output_H - -#include "Fl_Output.H" - -/** - This widget is a subclass of Fl_Output that displays multiple - lines of text. It also displays tab characters as whitespace to the - next column. - - Note that this widget does not support scrollbars, or per-character - color control. - - If you are presenting large amounts of read-only text - and need scrollbars, or full color control of characters, - then use Fl_Text_Display. If you want to display HTML text, - use Fl_Help_View. -*/ -class FL_EXPORT Fl_Multiline_Output : public Fl_Output { -public: - - /** - Creates a new Fl_Multiline_Output widget using the given position, - size, and label string. The default boxtype is FL_DOWN_BOX. - - Inherited destructor destroys the widget and any value associated with it. - */ - Fl_Multiline_Output(int X,int Y,int W,int H,const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Native_File_Chooser.H b/msvc/fltk/include/FL/Fl_Native_File_Chooser.H deleted file mode 100644 index b025f69c..00000000 --- a/msvc/fltk/include/FL/Fl_Native_File_Chooser.H +++ /dev/null @@ -1,348 +0,0 @@ -// -// "$Id$" -// -// FLTK native OS file chooser widget -// -// Copyright 1998-2014 by Bill Spitzak and others. -// Copyright 2004 Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl_Native_File_Chooser widget. */ - -#ifndef FL_NATIVE_FILE_CHOOSER_H -#define FL_NATIVE_FILE_CHOOSER_H - -// Use Windows' chooser -#ifdef WIN32 -// #define _WIN32_WINNT 0x0501 // needed for OPENFILENAME's 'FlagsEx' -#if defined(FL_LIBRARY) || FLTK_ABI_VERSION < 10304 -# include -# include // OPENFILENAMEW, GetOpenFileName() -# include // BROWSEINFOW, SHBrowseForFolder() -typedef OPENFILENAMEW fl_OPENFILENAMEW; -typedef BROWSEINFOW fl_BROWSEINFOW; -#else -typedef void fl_OPENFILENAMEW; -typedef void fl_BROWSEINFOW; -#endif -#endif - -// Use Apple's chooser -#ifdef __APPLE__ -# define MAXFILTERS 80 -#endif - -// All else falls back to FLTK's own chooser -#if ! defined(__APPLE__) && !defined(WIN32) -# include -#else -# include // FL_EXPORT -#endif - -class Fl_FLTK_File_Chooser; -class Fl_GTK_File_Chooser; - -/** - This class lets an FLTK application easily and consistently access - the operating system's native file chooser. Some operating systems - have very complex and specific file choosers that many users want - access to specifically, instead of FLTK's default file chooser(s). - - In cases where there is no native file browser, FLTK's own file browser - is used instead. - - To use this widget, use the following include in your code: - \code - #include - \endcode - - The following example shows how to pick a single file: - \code - // Create and post the local native file chooser - #include - [..] - Fl_Native_File_Chooser fnfc; - fnfc.title("Pick a file"); - fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE); - fnfc.filter("Text\t*.txt\n" - "C Files\t*.{cxx,h,c}"); - fnfc.directory("/var/tmp"); // default directory to use - // Show native chooser - switch ( fnfc.show() ) { - case -1: printf("ERROR: %s\n", fnfc.errmsg()); break; // ERROR - case 1: printf("CANCEL\n"); break; // CANCEL - default: printf("PICKED: %s\n", fnfc.filename()); break; // FILE CHOSEN - } - \endcode - - The Fl_Native_File_Chooser widget transmits UTF-8 encoded filenames to its user. It is - recommended to open files that may have non-ASCII names with the fl_fopen() or - fl_open() utility functions that handle these names in a cross-platform way - (whereas the standard fopen()/open() functions fail on the MSWindows platform - to open files with a non-ASCII name). - - Platform Specific Caveats - - - Under X windows, and if Fl::OPTION_FNFC_USES_GTK has not been switched off, - the widget attempts to use standard GTK file chooser dialogs if they are - available at run-time on the platform, and falls back to use FLTK's Fl_File_Chooser if they are not. - In the latter case, it's best if you call Fl_File_Icon::load_system_icons() - at the start of main(), to enable the nicer looking file browser widgets. - Use the static public attributes of class Fl_File_Chooser to localize - the browser. - - Some operating systems support certain OS specific options; see - Fl_Native_File_Chooser::options() for a list. - - \image html Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms." - \image latex Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms" width=14cm - - */ -class FL_EXPORT Fl_Native_File_Chooser { -public: - enum Type { - BROWSE_FILE = 0, ///< browse files (lets user choose one file) - BROWSE_DIRECTORY, ///< browse directories (lets user choose one directory) - BROWSE_MULTI_FILE, ///< browse files (lets user choose multiple files) - BROWSE_MULTI_DIRECTORY, ///< browse directories (lets user choose multiple directories) - BROWSE_SAVE_FILE, ///< browse to save a file - BROWSE_SAVE_DIRECTORY ///< browse to save a directory - }; - enum Option { - NO_OPTIONS = 0x0000, ///< no options enabled - SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog - NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported) - PREVIEW = 0x0004, ///< enable preview mode (if supported) - USE_FILTER_EXT = 0x0008 ///< Chooser filter pilots the output file extension (if supported) - }; - /** Localizable message */ - static const char *file_exists_message; - -public: - Fl_Native_File_Chooser(int val=BROWSE_FILE); - ~Fl_Native_File_Chooser(); - - // Public methods - void type(int t); - int type() const ; - void options(int o); - int options() const; - int count() const; - const char *filename() const ; - const char *filename(int i) const ; - void directory(const char *val) ; - const char *directory() const; - void title(const char *t); - const char* title() const; - const char *filter() const ; - void filter(const char *f); - int filters() const ; - void filter_value(int i) ; - int filter_value() const ; - void preset_file(const char*f) ; - const char* preset_file() const; - const char *errmsg() const ; - int show() ; - -#ifdef WIN32 -private: - int _btype; // kind-of browser to show() - int _options; // general options -#if FLTK_ABI_VERSION >= 10304 - fl_OPENFILENAMEW *_ofn_ptr; // GetOpenFileName() & GetSaveFileName() struct - fl_BROWSEINFOW *_binf_ptr; // SHBrowseForFolder() struct - WCHAR *_wpattern; // pattern buffer for filter -#else - fl_OPENFILENAMEW _ofn; - fl_BROWSEINFOW _binf; -#endif - char **_pathnames; // array of pathnames - int _tpathnames; // total pathnames - char *_directory; // default pathname to use - char *_title; // title for window - char *_filter; // user-side search filter - char *_parsedfilt; // filter parsed for Windows dialog - int _nfilters; // number of filters parse_filter counted - char *_preset_file; // the file to preselect - char *_errmsg; // error message - - // Private methods - void errmsg(const char *msg); - - void clear_pathnames(); - void set_single_pathname(const char *s); - void add_pathname(const char *s); - - void ClearOFN(); - void ClearBINF(); - void Win2Unix(char *s); - void Unix2Win(char *s); - int showfile(); - int showdir(); - - void parse_filter(const char *); - void clear_filters(); - void add_filter(const char *, const char *); -#endif - -#ifdef __APPLE__ -private: - int _btype; // kind-of browser to show() - int _options; // general options - void *_panel; - char **_pathnames; // array of pathnames - int _tpathnames; // total pathnames - char *_directory; // default pathname to use - char *_title; // title for window - char *_preset_file; // the 'save as' filename - - char *_filter; // user-side search filter, eg: - // C Files\t*.[ch]\nText Files\t*.txt" - - char *_filt_names; // filter names (tab delimited) - // eg. "C Files\tText Files" - - char *_filt_patt[MAXFILTERS]; - // array of filter patterns, eg: - // _filt_patt[0]="*.{cxx,h}" - // _filt_patt[1]="*.txt" - - int _filt_total; // parse_filter() # of filters loaded - int _filt_value; // index of the selected filter - char *_errmsg; // error message - - // Private methods - void errmsg(const char *msg); - void clear_pathnames(); - void set_single_pathname(const char *s); - int get_saveas_basename(void); - void clear_filters(); - void add_filter(const char *, const char *); - void parse_filter(const char *from); - int post(); - int runmodal(); -#endif - -#if ! defined(__APPLE__) && !defined(WIN32) -private: -#if FLTK_ABI_VERSION <= 10302 - int _btype; // kind-of browser to show() - int _options; // general options - int _nfilters; - char *_filter; // user supplied filter - char *_parsedfilt; // parsed filter - int _filtvalue; // selected filter - char *_preset_file; - char *_prevvalue; // Returned filename - char *_directory; - char *_errmsg; // error message -#endif - static int have_looked_for_GTK_libs; - union { - Fl_FLTK_File_Chooser *_x11_file_chooser; - Fl_GTK_File_Chooser *_gtk_file_chooser; - }; -#endif -}; - -#if !defined(__APPLE__) && !defined(WIN32) -class FL_EXPORT Fl_FLTK_File_Chooser { - friend class Fl_Native_File_Chooser; -protected: - int _btype; // kind-of browser to show() - int _options; // general options - int _nfilters; - char *_filter; // user supplied filter - char *_parsedfilt; // parsed filter - int _filtvalue; // selected filter - char *_preset_file; - char *_prevvalue; // Returned filename - char *_directory; - char *_errmsg; // error message - Fl_FLTK_File_Chooser(int val); - virtual ~Fl_FLTK_File_Chooser(); - void errmsg(const char *msg); - int type_fl_file(int); - void parse_filter(); - int exist_dialog(); - Fl_File_Chooser *_file_chooser; - virtual void type(int); - int type() const; - void options(int); - int options() const; - virtual int count() const; - virtual const char *filename() const; - virtual const char *filename(int i) const; - void directory(const char *val); - const char *directory() const; - virtual void title(const char *); - virtual const char* title() const; - const char *filter() const; - void filter(const char *); - int filters() const; - void filter_value(int i); - int filter_value() const; - void preset_file(const char*); - const char* preset_file() const; - const char *errmsg() const; - virtual int show(); -}; - - -class FL_EXPORT Fl_GTK_File_Chooser : public Fl_FLTK_File_Chooser { - friend class Fl_Native_File_Chooser; -private: - typedef struct _GtkWidget GtkWidget; - typedef struct _GtkFileFilterInfo GtkFileFilterInfo; - struct pair { - Fl_GTK_File_Chooser* running; // the running Fl_GTK_File_Chooser - const char *filter; // a filter string of the chooser - pair(Fl_GTK_File_Chooser* c, const char *f) { - running = c; - filter = strdup(f); - }; - ~pair() { - free((char*)filter); - }; - }; - GtkWidget *gtkw_ptr; // used to hold a GtkWidget* without pulling GTK into everything... - void *gtkw_slist; // used to hold a GLib GSList... - unsigned gtkw_count; // number of files read back - if any - mutable char *gtkw_filename; // last name we read back - char *gtkw_title; // the title to be applied to the dialog - const char *previous_filter; - - int fl_gtk_chooser_wrapper(); // method that wraps the GTK widget - Fl_GTK_File_Chooser(int val); - virtual ~Fl_GTK_File_Chooser(); - static int did_find_GTK_libs; - static void probe_for_GTK_libs(void); - virtual void type(int); - virtual int count() const; - virtual const char *filename() const; - virtual const char *filename(int i) const; - virtual void title(const char *); - virtual const char* title() const; - virtual int show(); - void changed_output_type(const char *filter); - - static int custom_gtk_filter_function(const GtkFileFilterInfo*, Fl_GTK_File_Chooser::pair*); - static void free_pair(pair *p); -}; -#endif // !defined(__APPLE__) && !defined(WIN32) - -#endif /*FL_NATIVE_FILE_CHOOSER_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Nice_Slider.H b/msvc/fltk/include/FL/Fl_Nice_Slider.H deleted file mode 100644 index febeb940..00000000 --- a/msvc/fltk/include/FL/Fl_Nice_Slider.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// "Nice" slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Nice_Slider widget . */ - -#ifndef Fl_Nice_Slider_H -#define Fl_Nice_Slider_H - -#include "Fl_Slider.H" - -class FL_EXPORT Fl_Nice_Slider : public Fl_Slider { -public: - Fl_Nice_Slider(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Object.H b/msvc/fltk/include/FL/Fl_Object.H deleted file mode 100644 index 9cbbcca3..00000000 --- a/msvc/fltk/include/FL/Fl_Object.H +++ /dev/null @@ -1,27 +0,0 @@ -// -// "$Id$" -// -// Old Fl_Object header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// This file is provided for back compatibility only. Please use Fl_Widget -#ifndef Fl_Object -#define Fl_Object Fl_Widget -#endif -#include "Fl_Widget.H" - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Output.H b/msvc/fltk/include/FL/Fl_Output.H deleted file mode 100644 index 5d182716..00000000 --- a/msvc/fltk/include/FL/Fl_Output.H +++ /dev/null @@ -1,63 +0,0 @@ -// -// "$Id$" -// -// Output header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Output widget . */ - -#ifndef Fl_Output_H -#define Fl_Output_H - -#include "Fl_Input.H" -/** - This widget displays a piece of text. - - When you set the value() , Fl_Output does a strcpy() to its own storage, - which is useful for program-generated values. The user may select - portions of the text using the mouse and paste the contents into other - fields or programs. - -

\image html text.png

- \image latex text.png "Fl_Output" width=8cm - - There is a single subclass, Fl_Multiline_Output, which allows you to - display multiple lines of text. Fl_Multiline_Output does not provide - scroll bars. If a more complete text editing widget is needed, use - Fl_Text_Display instead. - - The text may contain any characters except \\0, and will correctly - display anything, using ^X notation for unprintable control characters - and \\nnn notation for unprintable characters with the high bit set. It - assumes the font can draw any characters in the ISO-Latin1 character set. -*/ -class FL_EXPORT Fl_Output : public Fl_Input { -public: - /** - Creates a new Fl_Output widget using the given position, - size, and label string. The default boxtype is FL_DOWN_BOX. - - Inherited destructor destroys the widget and any value associated with it. - */ - - Fl_Output(int X,int Y,int W,int H, const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Overlay_Window.H b/msvc/fltk/include/FL/Fl_Overlay_Window.H deleted file mode 100644 index de45b6c1..00000000 --- a/msvc/fltk/include/FL/Fl_Overlay_Window.H +++ /dev/null @@ -1,81 +0,0 @@ -// -// "$Id$" -// -// Overlay window header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Overlay_Window class . */ - -#ifndef Fl_Overlay_Window_H -#define Fl_Overlay_Window_H - -#include "Fl_Double_Window.H" - -/** - This window provides double buffering and also the ability to draw the - "overlay" which is another picture placed on top of the main image. The - overlay is designed to be a rapidly-changing but simple graphic such as - a mouse selection box. Fl_Overlay_Window uses the overlay - planes provided by your graphics hardware if they are available. -

If no hardware support is found the overlay is simulated by drawing - directly into the on-screen copy of the double-buffered window, and - "erased" by copying the backbuffer over it again. This means the - overlay will blink if you change the image in the window. -*/ -class FL_EXPORT Fl_Overlay_Window : public Fl_Double_Window { -#ifndef FL_DOXYGEN - friend class _Fl_Overlay; -#endif -protected: - /** - You must subclass Fl_Overlay_Window and provide this method. - It is just like a draw() method, except it draws the overlay. - The overlay will have already been "cleared" when this is called. You - can use any of the routines described in <FL/fl_draw.H>. - */ - virtual void draw_overlay() = 0; -private: - Fl_Window *overlay_; -public: - void show(); - void flush(); - void hide(); - void resize(int,int,int,int); - ~Fl_Overlay_Window(); - /** Returns non-zero if there's hardware overlay support */ - int can_do_overlay(); - void redraw_overlay(); -protected: - /** - See Fl_Overlay_Window::Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0) - */ - Fl_Overlay_Window(int W, int H, const char *l=0); - /** - Creates a new Fl_Overlay_Window widget using the given - position, size, and label (title) string. If the - positions (x,y) are not given, then the window manager - will choose them. - */ - Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0); -public: - void show(int a, char **b) {Fl_Double_Window::show(a,b);} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_PNG_Image.H b/msvc/fltk/include/FL/Fl_PNG_Image.H deleted file mode 100644 index 84c24692..00000000 --- a/msvc/fltk/include/FL/Fl_PNG_Image.H +++ /dev/null @@ -1,46 +0,0 @@ -// -// "$Id$" -// -// PNG image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_PNG_Image class . */ - -#ifndef Fl_PNG_Image_H -#define Fl_PNG_Image_H -# include "Fl_Image.H" - -/** - The Fl_PNG_Image class supports loading, caching, - and drawing of Portable Network Graphics (PNG) image files. The - class loads colormapped and full-color images and handles color- - and alpha-based transparency. -*/ -class FL_EXPORT Fl_PNG_Image : public Fl_RGB_Image { - -public: - - Fl_PNG_Image(const char* filename); - Fl_PNG_Image (const char *name_png, const unsigned char *buffer, int datasize); -private: - void load_png_(const char *name_png, const unsigned char *buffer_png, int datasize); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_PNM_Image.H b/msvc/fltk/include/FL/Fl_PNM_Image.H deleted file mode 100644 index e5b05885..00000000 --- a/msvc/fltk/include/FL/Fl_PNM_Image.H +++ /dev/null @@ -1,43 +0,0 @@ -// -// "$Id$" -// -// PNM image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_PNM_Image class . */ - -#ifndef Fl_PNM_Image_H -#define Fl_PNM_Image_H -# include "Fl_Image.H" - -/** - The Fl_PNM_Image class supports loading, caching, - and drawing of Portable Anymap (PNM, PBM, PGM, PPM) image files. The class - loads bitmap, grayscale, and full-color images in both ASCII and - binary formats. -*/ -class FL_EXPORT Fl_PNM_Image : public Fl_RGB_Image { - - public: - - Fl_PNM_Image(const char* filename); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Pack.H b/msvc/fltk/include/FL/Fl_Pack.H deleted file mode 100644 index 6a7e2be0..00000000 --- a/msvc/fltk/include/FL/Fl_Pack.H +++ /dev/null @@ -1,75 +0,0 @@ -// -// "$Id$" -// -// Pack header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Pack widget . */ - -#ifndef Fl_Pack_H -#define Fl_Pack_H - -#include - -/** - This widget was designed to add the functionality of compressing and - aligning widgets. -

If type() is Fl_Pack::HORIZONTAL all the children are - resized to the height of the Fl_Pack, and are moved next to - each other horizontally. If type() is not Fl_Pack::HORIZONTAL - then the children are resized to the width and are stacked below each - other. Then the Fl_Pack resizes itself to surround the child - widgets. -

This widget is needed for the Fl_Tabs. - In addition you may want to put the Fl_Pack inside an - Fl_Scroll. - -

The resizable for Fl_Pack is set to NULL by default.

-

See also: Fl_Group::resizable() -*/ -class FL_EXPORT Fl_Pack : public Fl_Group { - int spacing_; - -public: - enum { // values for type(int) - VERTICAL = 0, - HORIZONTAL = 1 - }; - -protected: - void draw(); - -public: - Fl_Pack(int x,int y,int w ,int h,const char *l = 0); - /** - Gets the number of extra pixels of blank space that are added - between the children. - */ - int spacing() const {return spacing_;} - /** - Sets the number of extra pixels of blank space that are added - between the children. - */ - void spacing(int i) {spacing_ = i;} - /** Same as Fl_Group::type() */ - uchar horizontal() const {return type();} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Paged_Device.H b/msvc/fltk/include/FL/Fl_Paged_Device.H deleted file mode 100644 index 4f47e075..00000000 --- a/msvc/fltk/include/FL/Fl_Paged_Device.H +++ /dev/null @@ -1,155 +0,0 @@ -// -// "$Id$" -// -// Printing support for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file Fl_Paged_Device.H - \brief declaration of class Fl_Paged_Device. - */ - -#ifndef Fl_Paged_Device_H -#define Fl_Paged_Device_H - -#include -#include - -/** \brief Number of elements in enum Page_Format */ -#define NO_PAGE_FORMATS 30 /* MSVC6 compilation fix */ - -/** - \brief Represents page-structured drawing surfaces. - * - This class has no public constructor: don't instantiate it; use Fl_Printer - or Fl_PostScript_File_Device instead. - */ -class FL_EXPORT Fl_Paged_Device : public Fl_Surface_Device { -#ifndef __APPLE__ - friend class Fl_Copy_Surface; - friend class Fl_Image_Surface; - void draw_decorated_window(Fl_Window *win, int x_offset, int y_offset, Fl_Surface_Device *toset); -#endif -public: - /** - \brief Possible page formats. - - All paper formats with pre-defined width and height. - */ - enum Page_Format { - A0 = 0, /**< A0 format */ - A1, - A2, - A3, - A4, /**< A4 format */ - A5, - A6, - A7, - A8, - A9, - B0, - B1, - B2, - B3, - B4, - B5, - B6, - B7, - B8, - B9, - B10, - C5E, - DLE, - EXECUTIVE, - FOLIO, - LEDGER, - LEGAL, - LETTER, /**< Letter format */ - TABLOID, - ENVELOPE, - MEDIA = 0x1000 - }; - /** - \brief Possible page layouts. - */ - enum Page_Layout { - PORTRAIT = 0, /**< Portrait orientation */ - LANDSCAPE = 0x100, /**< Landscape orientation */ - REVERSED = 0x200, /**< Reversed orientation */ - ORIENTATION = 0x300 /**< orientation */ - }; - - /** \brief width, height and name of a page format - */ - typedef struct { - /** \brief width in points */ - int width; - /** \brief height in points */ - int height; - /** \brief format name */ - const char *name; - } page_format; - /** \brief width, height and name of all elements of the enum \ref Page_Format. - */ - static const page_format page_formats[NO_PAGE_FORMATS]; -private: - void traverse(Fl_Widget *widget); // finds subwindows of widget and prints them -protected: - /** \brief horizontal offset to the origin of graphics coordinates */ - int x_offset; - /** \brief vertical offset to the origin of graphics coordinates */ - int y_offset; - /** \brief The constructor */ - Fl_Paged_Device() : Fl_Surface_Device(NULL), x_offset(0), y_offset(0) {}; -#if FLTK_ABI_VERSION >= 10301 -public: - /** \brief The destructor */ - virtual ~Fl_Paged_Device() {}; -#else - /** \brief The destructor */ - virtual ~Fl_Paged_Device() {}; -public: -#endif // FLTK_ABI_VERSION - static const char *class_id; - const char *class_name() {return class_id;}; - virtual int start_job(int pagecount, int *frompage = NULL, int *topage = NULL); - virtual int start_page(void); - virtual int printable_rect(int *w, int *h); - virtual void margins(int *left, int *top, int *right, int *bottom); - virtual void origin(int x, int y); - virtual void origin(int *x, int *y); - virtual void scale(float scale_x, float scale_y = 0.); - virtual void rotate(float angle); - virtual void translate(int x, int y); - virtual void untranslate(void); - virtual void print_widget(Fl_Widget* widget, int delta_x = 0, int delta_y = 0); - /** Prints a window with its title bar and frame if any. - - \p x_offset and \p y_offset are optional coordinates of where to position the window top left. - Equivalent to print_widget() if \p win is a subwindow or has no border. - Use Fl_Window::decorated_w() and Fl_Window::decorated_h() to get the size of the - printed window. - */ - void print_window(Fl_Window *win, int x_offset = 0, int y_offset = 0); - virtual void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0); - virtual int end_page (void); - virtual void end_job (void); -}; - -#endif // Fl_Paged_Device_H - -// -// End of "$Id$" -// - diff --git a/msvc/fltk/include/FL/Fl_Pixmap.H b/msvc/fltk/include/FL/Fl_Pixmap.H deleted file mode 100644 index 6f93da7e..00000000 --- a/msvc/fltk/include/FL/Fl_Pixmap.H +++ /dev/null @@ -1,102 +0,0 @@ -// -// "$Id$" -// -// Pixmap header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2012 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Pixmap widget . */ - -#ifndef Fl_Pixmap_H -#define Fl_Pixmap_H -# include "Fl_Image.H" -#if defined(WIN32) -# include "x.H" -#endif - -class Fl_Widget; -struct Fl_Menu_Item; - -// Older C++ compilers don't support the explicit keyword... :( -# if defined(__sgi) && !defined(_COMPILER_VERSION) -# define explicit -# endif // __sgi && !_COMPILER_VERSION - -/** - The Fl_Pixmap class supports caching and drawing of colormap - (pixmap) images, including transparency. -*/ -class FL_EXPORT Fl_Pixmap : public Fl_Image { - friend class Fl_Quartz_Graphics_Driver; - friend class Fl_GDI_Graphics_Driver; - friend class Fl_GDI_Printer_Graphics_Driver; - friend class Fl_Xlib_Graphics_Driver; - void copy_data(); - void delete_data(); - void set_data(const char * const *p); - int prepare(int XP, int YP, int WP, int HP, int &cx, int &cy, - int &X, int &Y, int &W, int &H); - - protected: - - void measure(); - - public: - - int alloc_data; // Non-zero if data was allocated - - private: - -#if defined(WIN32) -#if FLTK_ABI_VERSION < 10301 - static // a static member is needed for ABI compatibility -#endif - UINT pixmap_bg_color; // RGB color used for pixmap background -#endif // WIN32 -#if defined(__APPLE__) || defined(WIN32) - void *id_; // for internal use - void *mask_; // for internal use (mask bitmap) -#else - unsigned id_; // for internal use - unsigned mask_; // for internal use (mask bitmap) -#endif // __APPLE__ || WIN32 - - public: - - /** The constructors create a new pixmap from the specified XPM data. */ - explicit Fl_Pixmap(char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id_(0), mask_(0) {set_data((const char*const*)D); measure();} - /** The constructors create a new pixmap from the specified XPM data. */ - explicit Fl_Pixmap(uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id_(0), mask_(0) {set_data((const char*const*)D); measure();} - /** The constructors create a new pixmap from the specified XPM data. */ - explicit Fl_Pixmap(const char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id_(0), mask_(0) {set_data((const char*const*)D); measure();} - /** The constructors create a new pixmap from the specified XPM data. */ - explicit Fl_Pixmap(const uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id_(0), mask_(0) {set_data((const char*const*)D); measure();} - virtual ~Fl_Pixmap(); - virtual Fl_Image *copy(int W, int H); - Fl_Image *copy() { return copy(w(), h()); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0); - void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} - virtual void label(Fl_Widget*w); - virtual void label(Fl_Menu_Item*m); - virtual void uncache(); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Plugin.H b/msvc/fltk/include/FL/Fl_Plugin.H deleted file mode 100644 index 71ffc799..00000000 --- a/msvc/fltk/include/FL/Fl_Plugin.H +++ /dev/null @@ -1,95 +0,0 @@ -// -// "$Id: Fl_Plugin.H 6995 2010-01-12 08:48:55Z matt $" -// -// A Plugin system for FLTK, implemented in Fl_Preferences.cxx. -// -// Copyright 2002-2010 by Matthias Melcher. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Plugin class . */ - -#ifndef Fl_Plugin_H -# define Fl_Plugin_H - -# include "Fl_Preferences.H" - - -/** - \brief Fl_Plugin allows link-time and run-time integration of binary modules. - - Fl_Plugin and Fl_Plugin_Manager provide a small and simple solution for - linking C++ classes at run-time, or optionally linking modules at compile - time without the need to change the main application. - - Fl_Plugin_Manager uses static initialisation to create the plugin interface - early during startup. Plugins are stored in a temporary database, organized - in classes. - - Plugins should derive a new class from Fl_Plugin as a base: - \code - class My_Plugin : public Fl_Plugin { - public: - My_Plugin() : Fl_Plugin("effects", "blur") { } - void do_something(...); - }; - My_Plugin blur_plugin(); - \endcode - - Plugins can be put into modules and either linked before distribution, or loaded - from dynamically linkable files. An Fl_Plugin_Manager is used to list and - access all currently loaded plugins. - \code - Fl_Plugin_Manager mgr("effects"); - int i, n = mgr.plugins(); - for (i=0; ido_something(); - } - \endcode - */ -class FL_EXPORT Fl_Plugin { - Fl_Preferences::ID id; -public: - Fl_Plugin(const char *klass, const char *name); - virtual ~Fl_Plugin(); -}; - - -/** - \brief Fl_Plugin_Manager manages link-time and run-time plugin binaries. - \see Fl_Plugin - */ -class FL_EXPORT Fl_Plugin_Manager : public Fl_Preferences { -public: - Fl_Plugin_Manager(const char *klass); - ~Fl_Plugin_Manager(); - - /** \brief Return the number of plugins in the klass. - */ - int plugins() { return groups(); } - Fl_Plugin *plugin(int index); - Fl_Plugin *plugin(const char *name); - Fl_Preferences::ID addPlugin(const char *name, Fl_Plugin *plugin); - - static void removePlugin(Fl_Preferences::ID id); - static int load(const char *filename); - static int loadAll(const char *filepath, const char *pattern=0); -}; - - -#endif // !Fl_Preferences_H - -// -// End of "$Id: Fl_Preferences.H 6995 2010-01-12 08:48:55Z matt $". -// diff --git a/msvc/fltk/include/FL/Fl_Positioner.H b/msvc/fltk/include/FL/Fl_Positioner.H deleted file mode 100644 index a47e64cd..00000000 --- a/msvc/fltk/include/FL/Fl_Positioner.H +++ /dev/null @@ -1,94 +0,0 @@ -// -// "$Id$" -// -// Positioner header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Positioner widget . */ - -#ifndef Fl_Positioner_H -#define Fl_Positioner_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -/** - This class is provided for Forms compatibility. It provides 2D input. - It would be useful if this could be put atop another widget so that the - crosshairs are on top, but this is not implemented. The color of the - crosshairs is selection_color(). -

\image html positioner.png

- \image latex positioner.png " Fl_Positioner" width=4cm -*/ -class FL_EXPORT Fl_Positioner : public Fl_Widget { - - double xmin, ymin; - double xmax, ymax; - double xvalue_, yvalue_; - double xstep_, ystep_; - -protected: - - // these allow subclasses to put the dial in a smaller area: - void draw(int, int, int, int); - int handle(int, int, int, int, int); - void draw(); - -public: - - int handle(int); - /** - Creates a new Fl_Positioner widget using the given position, - size, and label string. The default boxtype is FL_NO_BOX. - */ - Fl_Positioner(int x,int y,int w,int h, const char *l=0); - /** Gets the X axis coordinate.*/ - double xvalue() const {return xvalue_;} - /** Gets the Y axis coordinate.*/ - double yvalue() const {return yvalue_;} - int xvalue(double); - int yvalue(double); - int value(double,double); - void xbounds(double, double); - /** Gets the X axis minimum */ - double xminimum() const {return xmin;} - /** Same as xbounds(a, xmaximum()) */ - void xminimum(double a) {xbounds(a,xmax);} - /** Gets the X axis maximum */ - double xmaximum() const {return xmax;} - /** Same as xbounds(xminimum(), a) */ - void xmaximum(double a) {xbounds(xmin,a);} - void ybounds(double, double); - /** Gets the Y axis minimum */ - double yminimum() const {return ymin;} - /** Same as ybounds(a, ymaximum()) */ - void yminimum(double a) {ybounds(a, ymax);} - /** Gets the Y axis maximum */ - double ymaximum() const {return ymax;} - /** Same as ybounds(ymininimum(), a) */ - void ymaximum(double a) {ybounds(ymin, a);} - /** Sets the stepping value for the X axis.*/ - void xstep(double a) {xstep_ = a;} - /** Sets the stepping value for the Y axis.*/ - void ystep(double a) {ystep_ = a;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_PostScript.H b/msvc/fltk/include/FL/Fl_PostScript.H deleted file mode 100644 index c635e88e..00000000 --- a/msvc/fltk/include/FL/Fl_PostScript.H +++ /dev/null @@ -1,264 +0,0 @@ -// -// "$Id$" -// -// Support for graphics output to PostScript file for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file Fl_PostScript.H - \brief declaration of classes Fl_PostScript_Graphics_Driver, Fl_PostScript_File_Device. - */ - -#ifndef Fl_PostScript_H -#define Fl_PostScript_H - -#include -#include -#include - -/* Signature of Fl_PostScript::close_command() functions passed as parameters. */ -extern "C" { - typedef int (Fl_PostScript_Close_Command)(FILE *); -} - -/** - \brief PostScript graphical backend. - * - PostScript text uses vectorial fonts when using the FLTK standard fonts - and the latin alphabet or a few other characters listed in the following table. - The latin alphabet means all unicode characters between U+0020 and U+017F, or, in other words, - the ASCII, Latin-1 Supplement and Latin Extended-A charts. - - - - - - - - - - - - - - - -
CharCodepointName CharCodepointName CharCodepointName
ƒU+0192florinU+201AquotesinglbaseU+2122trademark
ˆU+02C6circumflexU+201CquotedblleftU+2202partialdiff
ˇU+02C7caronU+201DquotedblrightΔU+2206Delta
˘U+02D8breveU+201EquotedblbaseU+2211summation
˙U+02D9dotaccentU+2020daggerU+221Aradical
˚U+02DAringU+2021daggerdblU+221Einfinity
˛U+02DBogonekU+2022bulletU+2260notequal
˜U+02DCtildeU+2026ellipsisU+2264lessequal
˝U+02DDhungarumlautU+2030perthousandU+2265greaterequal
U+2013endashU+2039guilsinglleftU+25CAlozenge
U+2014emdashU+203AguilsinglrightU+FB01fi
U+2018quoteleft/U+2044fractionU+FB02fl
U+2019quoterightU+20ACEuroU+F8FFapple (Mac OS only)
-
All other unicode characters or all other fonts (FL_FREE_FONT and above) are output as a bitmap. -
FLTK standard fonts are output using the corresponding PostScript standard fonts. - */ -class FL_EXPORT Fl_PostScript_Graphics_Driver : public Fl_Graphics_Driver { -private: - void transformed_draw_extra(const char* str, int n, double x, double y, int w, bool rtl); - void *prepare_rle85(); - void write_rle85(uchar b, void *data); - void close_rle85(void *data); - void *prepare85(); - void write85(void *data, const uchar *p, int len); - void close85(void *data); -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_PostScript_Graphics_Driver(); -#ifndef FL_DOXYGEN - enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS}; - -class Clip { - public: - int x, y, w, h; - Clip *prev; - }; - Clip * clip_; - - int lang_level_; - int gap_; - int pages_; - - double width_; - double height_; - - int shape_; - int linewidth_;// need for clipping, lang level 1-2 - int linestyle_;// - int interpolate_; //interpolation of images - unsigned char cr_,cg_,cb_; - char linedash_[256];//should be enough - void concat(); // transform ror scalable dradings... - void reconcat(); //invert - void recover(); //recovers the state after grestore (such as line styles...) - void reset(); - - uchar * mask; - int mx; // width of mask; - int my; // mask lines - //Fl_Color bg_; - Fl_PostScript_Close_Command* close_cmd_; - int page_policy_; - int nPages; - int orientation_; - - float scale_x; - float scale_y; - float angle; - int left_margin; - int top_margin; - - FILE *output; - double pw_, ph_; - - uchar bg_r, bg_g, bg_b; - int start_postscript (int pagecount, enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout); - /* int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); - */ - void transformed_draw(const char* s, int n, double x, double y); //precise text placing - void transformed_draw(const char* s, double x, double y); - int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); - - enum Fl_Paged_Device::Page_Format page_format_; - char *ps_filename_; - - void page_policy(int p); - int page_policy(){return page_policy_;}; - void close_command(Fl_PostScript_Close_Command* cmd){close_cmd_=cmd;}; - FILE * file() {return output;}; - //void orientation (int o); - //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor - //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int x, int y, int w, int h); //eps constructor - void interpolate(int i){interpolate_=i;}; - int interpolate(){return interpolate_;} - - void page(double pw, double ph, int media = 0); - void page(int format); -#endif // FL_DOXYGEN - - // implementation of drawing methods - void color(Fl_Color c); - void color(uchar r, uchar g, uchar b); - - void push_clip(int x, int y, int w, int h); - int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); - int not_clipped(int x, int y, int w, int h); - void push_no_clip(); - void pop_clip(); - - void line_style(int style, int width=0, char* dashes=0); - - void rect(int x, int y, int w, int h); - void rectf(int x, int y, int w, int h); - - void xyline(int x, int y, int x1); - void xyline(int x, int y, int x1, int y2); - void xyline(int x, int y, int x1, int y2, int x3); - - void yxline(int x, int y, int y1); - void yxline(int x, int y, int y1, int x2); - void yxline(int x, int y, int y1, int x2, int y3); - - void line(int x1, int y1, int x2, int y2); - void line(int x1, int y1, int x2, int y2, int x3, int y3); - - void loop(int x0, int y0, int x1, int y1, int x2, int y2); - void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2); - void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); - void point(int x, int y); - - void begin_points(); - void begin_line(); - void begin_loop(); - void begin_polygon(); - void vertex(double x, double y); - void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3); - void circle(double x, double y, double r); - void arc(double x, double y, double r, double start, double a); - void arc(int x, int y, int w, int h, double a1, double a2); - void pie(int x, int y, int w, int h, double a1, double a2); - void end_points(); - void end_line(); - void end_loop(); - void end_polygon(); - void begin_complex_polygon(){begin_polygon();}; - void gap(){gap_=1;}; - void end_complex_polygon(){end_polygon();}; - void transformed_vertex(double x, double y); - - void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0); - void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0); - void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3); - void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1); - - void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); }; -#ifdef __APPLE__ - void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); }; -#endif - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* s, int n, int x, int y); - void font(int face, int size); - double width(const char *, int); - double width(unsigned int u); - void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); - int height(); - int descent(); - void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy); - void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy); - int draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP); - int clocale_printf(const char *format, ...); - ~Fl_PostScript_Graphics_Driver(); -}; - -/** - To send graphical output to a PostScript file. - This class is used exactly as the Fl_Printer class except for the start_job() call, - two variants of which are usable and allow to specify what page format and layout are desired. - */ -class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device { -#ifdef __APPLE__ - CGContextRef gc; -#endif -protected: - Fl_PostScript_Graphics_Driver *driver(); -public: - static const char *class_id; - const char *class_name() {return class_id;}; - Fl_PostScript_File_Device(); - ~Fl_PostScript_File_Device(); - int start_job(int pagecount, int* from, int* to); - int start_job(int pagecount, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4, - enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT); - int start_job(FILE *ps_output, int pagecount, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4, - enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT); - int start_page (void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale (float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); - void end_job(void); -#ifdef __APPLE__ - void set_current() { fl_gc = gc; Fl_Paged_Device::set_current(); } -#endif - - static const char *file_chooser_title; -}; - -#endif // Fl_PostScript_H - -// -// End of "$Id$" -// diff --git a/msvc/fltk/include/FL/Fl_Preferences.H b/msvc/fltk/include/FL/Fl_Preferences.H deleted file mode 100644 index f7d193e5..00000000 --- a/msvc/fltk/include/FL/Fl_Preferences.H +++ /dev/null @@ -1,269 +0,0 @@ -// -// "$Id$" -// -// Preferences . -// -// Copyright 2002-2010 by Matthias Melcher. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Preferences class . */ - -#ifndef Fl_Preferences_H -# define Fl_Preferences_H - -# include -# include "Fl_Export.H" - -/** - \brief Fl_Preferences provides methods to store user - settings between application starts. - - It is similar to the - Registry on WIN32 and Preferences on MacOS, and provides a - simple configuration mechanism for UNIX. - - Fl_Preferences uses a hierarchy to store data. It - bundles similar data into groups and manages entries into those - groups as name/value pairs. - - Preferences are stored in text files that can be edited - manually. The file format is easy to read and relatively - forgiving. Preferences files are the same on all platforms. User - comments in preference files are preserved. Filenames are unique - for each application by using a vendor/application naming - scheme. The user must provide default values for all entries to - ensure proper operation should preferences be corrupted or not - yet exist. - - Entries can be of any length. However, the size of each - preferences file should be kept small for performance - reasons. One application can have multiple preferences files. - Extensive binary data however should be stored in separate - files: see getUserdataPath(). - - \note Starting with FLTK 1.3, preference databases are expected to - be in UTF-8 encoding. Previous databases were stored in the - current character set or code page which renders them incompatible - for text entries using international characters. - */ -class FL_EXPORT Fl_Preferences { - -public: - /** - Define the scope of the preferences. - */ - enum Root { - SYSTEM=0, ///< Preferences are used system-wide - USER ///< Preferences apply only to the current user - }; - - /** - Every Fl_Preferences-Group has a uniqe ID. - - ID's can be retrieved from an Fl_Preferences-Group and can then be used - to create more Fl_Preference references to the same data set, as long as the - database remains open. - */ - typedef void *ID; - - static const char *newUUID(); - - Fl_Preferences( Root root, const char *vendor, const char *application ); - Fl_Preferences( const char *path, const char *vendor, const char *application ); - Fl_Preferences( Fl_Preferences &parent, const char *group ); - Fl_Preferences( Fl_Preferences *parent, const char *group ); - Fl_Preferences( Fl_Preferences &parent, int groupIndex ); - Fl_Preferences( Fl_Preferences *parent, int groupIndex ); - Fl_Preferences(const Fl_Preferences&); - Fl_Preferences( ID id ); - virtual ~Fl_Preferences(); - - /** Return an ID that can later be reused to open more references to this dataset. - */ - ID id() { return (ID)node; } - - /** Remove the group with this ID from a database. - */ - static char remove(ID id_) { return ((Node*)id_)->remove(); } - - /** Return the name of this entry. - */ - const char *name() { return node->name(); } - - /** Return the full path to this entry. - */ - const char *path() { return node->path(); } - - int groups(); - const char *group( int num_group ); - char groupExists( const char *key ); - char deleteGroup( const char *group ); - char deleteAllGroups(); - - int entries(); - const char *entry( int index ); - char entryExists( const char *key ); - char deleteEntry( const char *entry ); - char deleteAllEntries(); - - char clear(); - - char set( const char *entry, int value ); - char set( const char *entry, float value ); - char set( const char *entry, float value, int precision ); - char set( const char *entry, double value ); - char set( const char *entry, double value, int precision ); - char set( const char *entry, const char *value ); - char set( const char *entry, const void *value, int size ); - - char get( const char *entry, int &value, int defaultValue ); - char get( const char *entry, float &value, float defaultValue ); - char get( const char *entry, double &value, double defaultValue ); - char get( const char *entry, char *&value, const char *defaultValue ); - char get( const char *entry, char *value, const char *defaultValue, int maxSize ); - char get( const char *entry, void *&value, const void *defaultValue, int defaultSize ); - char get( const char *entry, void *value, const void *defaultValue, int defaultSize, int maxSize ); - - int size( const char *entry ); - - char getUserdataPath( char *path, int pathlen ); - - void flush(); - - // char export( const char *filename, Type fileFormat ); - // char import( const char *filename ); - - /** - 'Name' provides a simple method to create numerical or more complex - procedural names for entries and groups on the fly. - - Example: prefs.set(Fl_Preferences::Name("File%d",i),file[i]);. - - See test/preferences.cxx as a sample for writing arrays into preferences. - - 'Name' is actually implemented as a class inside Fl_Preferences. It casts - into const char* and gets automatically destroyed after the enclosing call - ends. - */ - class FL_EXPORT Name { - - char *data_; - - public: - Name( unsigned int n ); - Name( const char *format, ... ); - - /** - Return the Name as a "C" string. - \internal - */ - operator const char *() { return data_; } - ~Name(); - }; - - /** \internal An entry associates a preference name to its corresponding value */ - struct Entry { - char *name, *value; - }; - -private: - Fl_Preferences() : node(0), rootNode(0) { } - Fl_Preferences &operator=(const Fl_Preferences&); - - static char nameBuffer[128]; - static char uuidBuffer[40]; - static Fl_Preferences *runtimePrefs; - -public: // older Sun compilers need this (public definition of the following classes) - class RootNode; - - class FL_EXPORT Node { // a node contains a list to all its entries - // and all means to manage the tree structure - Node *child_, *next_; - union { // these two are mutually exclusive - Node *parent_; // top_ bit clear - RootNode *root_; // top_ bit set - }; - char *path_; - Entry *entry_; - int nEntry_, NEntry_; - unsigned char dirty_:1; - unsigned char top_:1; - unsigned char indexed_:1; - // indexing routines - Node **index_; - int nIndex_, NIndex_; - void createIndex(); - void updateIndex(); - void deleteIndex(); - public: - static int lastEntrySet; - public: - Node( const char *path ); - ~Node(); - // node methods - int write( FILE *f ); - const char *name(); - const char *path() { return path_; } - Node *find( const char *path ); - Node *search( const char *path, int offset=0 ); - Node *childNode( int ix ); - Node *addChild( const char *path ); - void setParent( Node *parent ); - Node *parent() { return top_?0L:parent_; } - void setRoot(RootNode *r) { root_ = r; top_ = 1; } - RootNode *findRoot(); - char remove(); - char dirty(); - void deleteAllChildren(); - // entry methods - int nChildren(); - const char *child( int ix ); - void set( const char *name, const char *value ); - void set( const char *line ); - void add( const char *line ); - const char *get( const char *name ); - int getEntry( const char *name ); - char deleteEntry( const char *name ); - void deleteAllEntries(); - int nEntry() { return nEntry_; } - Entry &entry(int i) { return entry_[i]; } - }; - friend class Node; - - class FL_EXPORT RootNode { // the root node manages file paths and basic reading and writing - Fl_Preferences *prefs_; - char *filename_; - char *vendor_, *application_; - public: - RootNode( Fl_Preferences *, Root root, const char *vendor, const char *application ); - RootNode( Fl_Preferences *, const char *path, const char *vendor, const char *application ); - RootNode( Fl_Preferences * ); - ~RootNode(); - int read(); - int write(); - char getPath( char *path, int pathlen ); - }; - friend class RootNode; - -protected: - Node *node; - RootNode *rootNode; -}; - -#endif // !Fl_Preferences_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Printer.H b/msvc/fltk/include/FL/Fl_Printer.H deleted file mode 100644 index 7ff255f2..00000000 --- a/msvc/fltk/include/FL/Fl_Printer.H +++ /dev/null @@ -1,236 +0,0 @@ -// -// "$Id$" -// -// Printing support for the Fast Light Tool Kit (FLTK). -// -// Copyright 2010-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file Fl_Printer.H - \brief declaration of classes Fl_Printer, Fl_System_Printer and Fl_PostScript_Printer. - */ - -#ifndef Fl_Printer_H -#define Fl_Printer_H - -#include -#include -#include -#include -#include -#include -#include -#if !(defined(__APPLE__) || defined(WIN32)) -#include -#elif defined(WIN32) -#include -#endif - -#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN) -/** - Print support under MSWindows and Mac OS. - - Class Fl_System_Printer is implemented only on the MSWindows and Mac OS platforms. - It has no public constructor. - Use Fl_Printer instead that is cross-platform and has the same API. - */ -class Fl_System_Printer : public Fl_Paged_Device { - friend class Fl_Printer; -private: - /** \brief the printer's graphics context, if there's one, NULL otherwise */ - void *gc; - void set_current(void); -#ifdef __APPLE__ - float scale_x; - float scale_y; - float angle; // rotation angle in radians - PMPrintSession printSession; - PMPageFormat pageFormat; - PMPrintSettings printSettings; -#elif defined(WIN32) - int abortPrint; - PRINTDLG pd; - HDC hPr; - int prerr; - int left_margin; - int top_margin; - void absolute_printable_rect(int *x, int *y, int *w, int *h); -#endif -protected: - /** \brief The constructor */ - Fl_System_Printer(void); -public: - static const char *class_id; - const char *class_name() {return class_id;}; - int start_job(int pagecount, int *frompage = NULL, int *topage = NULL); - int start_page (void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale (float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); - void end_job (void); -#ifdef __APPLE__ - void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y); -#endif - /** \brief The destructor */ - ~Fl_System_Printer(void); -}; // class Fl_System_Printer - -#endif - -#if !(defined(__APPLE__) || defined(WIN32) ) -/** - Print support under Unix/Linux. - - Class Fl_PostScript_Printer is implemented only on the Unix/Linux platform. - It has no public constructor. - Use Fl_Printer instead that is cross-platform and has the same API. - */ -class Fl_PostScript_Printer : public Fl_PostScript_File_Device { - friend class Fl_Printer; -protected: - /** The constructor */ - Fl_PostScript_Printer(void) {}; -public: - static const char *class_id; - const char *class_name() {return class_id;}; - int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL); -}; - -#endif - -/** - * \brief OS-independent print support. - * - Fl_Printer allows to use all drawing, color, text, image, and clip FLTK functions, and to have them operate - on printed page(s). There are two main, non exclusive, ways to use it. -
  • Print any widget (standard, custom, Fl_Window, Fl_Gl_Window) as it appears - on screen, with optional translation, scaling and rotation. This is done by calling print_widget(), - print_window() or print_window_part(). -
  • Use a series of FLTK graphics commands (e.g., font, text, lines, colors, clip, image) to - compose a page appropriately shaped for printing. -
- In both cases, begin by start_job(), start_page(), printable_rect() and origin() calls - and finish by end_page() and end_job() calls. -

Example of use: print a widget centered in a page - \code - #include - #include - int width, height; - Fl_Widget *widget = ... // a widget we want printed - Fl_Printer *printer = new Fl_Printer(); - if (printer->start_job(1) == 0) { - printer->start_page(); - printer->printable_rect(&width, &height); - fl_color(FL_BLACK); - fl_line_style(FL_SOLID, 2); - fl_rect(0, 0, width, height); - fl_font(FL_COURIER, 12); - time_t now; time(&now); fl_draw(ctime(&now), 0, fl_height()); - printer->origin(width/2, height/2); - printer->print_widget(widget, -widget->w()/2, -widget->h()/2); - printer->end_page(); - printer->end_job(); - } - delete printer; - \endcode - Platform specifics -

    -
  • Unix/Linux platforms: - Unless it has been previously changed, the default paper size is A4. - To change that, press the "Properties" button of the "Print" dialog window - opened by an Fl_Printer::start_job() call. This opens a "Printer Properties" window where it's - possible to select the adequate paper size. Finally press the "Save" button therein to assign - the chosen paper size to the chosen printer for this and all further print operations. -
    Class Fl_RGB_Image prints but loses its transparency if it has one. - See class Fl_PostScript_Graphics_Driver for a description of how UTF-8 strings appear in print. - Use the static public attributes of this class to set the print dialog to other languages - than English. For example, the "Printer:" dialog item Fl_Printer::dialog_printer can be set to French with: - \code - Fl_Printer::dialog_printer = "Imprimante:"; - \endcode - before creation of the Fl_Printer object. - Use Fl_PostScript_File_Device::file_chooser_title to customize the title of the file chooser dialog that opens - when using the "Print To File" option of the print dialog. -
  • MSWindows platform: Transparent Fl_RGB_Image 's don't print with exact transparency on most printers. - Fl_RGB_Image 's don't rotate() well. - A workaround is to use the print_window_part() call. -
  • Mac OS X platform: all graphics requests print as on display. -
- */ -class FL_EXPORT Fl_Printer : public Fl_Paged_Device { -public: - static const char *class_id; - const char *class_name() {return class_id;}; - /** \brief The constructor */ - Fl_Printer(void); - int start_job(int pagecount, int *frompage = NULL, int *topage = NULL); - int start_page(void); - int printable_rect(int *w, int *h); - void margins(int *left, int *top, int *right, int *bottom); - void origin(int *x, int *y); - void origin(int x, int y); - void scale(float scale_x, float scale_y = 0.); - void rotate(float angle); - void translate(int x, int y); - void untranslate(void); - int end_page (void); - void end_job (void); - void print_widget(Fl_Widget* widget, int delta_x=0, int delta_y=0); - void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x=0, int delta_y=0); - void set_current(void); - Fl_Graphics_Driver* driver(void); - /** \brief The destructor */ - ~Fl_Printer(void); - - /** \name These attributes are effective under the Xlib platform only. - \{ - */ - static const char *dialog_title; - static const char *dialog_printer; - static const char *dialog_range; - static const char *dialog_copies; - static const char *dialog_all; - static const char *dialog_pages; - static const char *dialog_from; - static const char *dialog_to; - static const char *dialog_properties; - static const char *dialog_copyNo; - static const char *dialog_print_button; - static const char *dialog_cancel_button; - static const char *dialog_print_to_file; - static const char *property_title; - static const char *property_pagesize; - static const char *property_mode; - static const char *property_use; - static const char *property_save; - static const char *property_cancel; - /** \} */ -private: -#if defined(WIN32) || defined(__APPLE__) - Fl_System_Printer *printer; -#else - Fl_PostScript_Printer *printer; -#endif -}; - -#endif // Fl_Printer_H - -// -// End of "$Id$" -// diff --git a/msvc/fltk/include/FL/Fl_Progress.H b/msvc/fltk/include/FL/Fl_Progress.H deleted file mode 100644 index 769028f2..00000000 --- a/msvc/fltk/include/FL/Fl_Progress.H +++ /dev/null @@ -1,72 +0,0 @@ -// -// "$Id$" -// -// Progress bar widget definitions. -// -// Copyright 2000-2010 by Michael Sweet. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Progress widget . */ - -#ifndef _Fl_Progress_H_ -# define _Fl_Progress_H_ - -// -// Include necessary headers. -// - -#include "Fl_Widget.H" - - -// -// Progress class... -// -/** - Displays a progress bar for the user. -*/ -class FL_EXPORT Fl_Progress : public Fl_Widget { - - float value_, - minimum_, - maximum_; - - protected: - - virtual void draw(); - - public: - - Fl_Progress(int x, int y, int w, int h, const char *l = 0); - - /** Sets the maximum value in the progress widget. */ - void maximum(float v) { maximum_ = v; redraw(); } - /** Gets the maximum value in the progress widget. */ - float maximum() const { return (maximum_); } - - /** Sets the minimum value in the progress widget. */ - void minimum(float v) { minimum_ = v; redraw(); } - /** Gets the minimum value in the progress widget. */ - float minimum() const { return (minimum_); } - - /** Sets the current value in the progress widget. */ - void value(float v) { value_ = v; redraw(); } - /** Gets the current value in the progress widget. */ - float value() const { return (value_); } -}; - -#endif // !_Fl_Progress_H_ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_RGB_Image.H b/msvc/fltk/include/FL/Fl_RGB_Image.H deleted file mode 100644 index 056d4145..00000000 --- a/msvc/fltk/include/FL/Fl_RGB_Image.H +++ /dev/null @@ -1,26 +0,0 @@ -// -// "$Id$" -// -// RGB Image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_RGB_Image_H -# define Fl_RGB_Image_H -# include "Fl_Image.H" -#endif // !Fl_RGB_Image_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Radio_Button.H b/msvc/fltk/include/FL/Fl_Radio_Button.H deleted file mode 100644 index 5dafe42a..00000000 --- a/msvc/fltk/include/FL/Fl_Radio_Button.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Radio button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Radio_Button widget . */ - -#ifndef Fl_Radio_Button_H -#define Fl_Radio_Button_H - -#include "Fl_Button.H" - -class FL_EXPORT Fl_Radio_Button : public Fl_Button { -public: - Fl_Radio_Button(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Radio_Light_Button.H b/msvc/fltk/include/FL/Fl_Radio_Light_Button.H deleted file mode 100644 index 5945be11..00000000 --- a/msvc/fltk/include/FL/Fl_Radio_Light_Button.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Radio light button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Radio_Light_Button widget . */ - -#ifndef Fl_Radio_Light_Button_H -#define Fl_Radio_Light_Button_H - -#include "Fl_Light_Button.H" - -class FL_EXPORT Fl_Radio_Light_Button : public Fl_Light_Button { -public: - Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Radio_Round_Button.H b/msvc/fltk/include/FL/Fl_Radio_Round_Button.H deleted file mode 100644 index 91f53481..00000000 --- a/msvc/fltk/include/FL/Fl_Radio_Round_Button.H +++ /dev/null @@ -1,36 +0,0 @@ -// -// "$Id$" -// -// Radio round button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Radio_Round_Button widget . */ - -#ifndef Fl_Radio_Round_Button_H -#define Fl_Radio_Round_Button_H - -#include "Fl_Round_Button.H" - -class FL_EXPORT Fl_Radio_Round_Button : public Fl_Round_Button { -public: - Fl_Radio_Round_Button(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Repeat_Button.H b/msvc/fltk/include/FL/Fl_Repeat_Button.H deleted file mode 100644 index f22df889..00000000 --- a/msvc/fltk/include/FL/Fl_Repeat_Button.H +++ /dev/null @@ -1,54 +0,0 @@ -// -// "$Id$" -// -// Repeat button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Repeat_Button widget . */ - -#ifndef Fl_Repeat_Button_H -#define Fl_Repeat_Button_H -#include "Fl.H" -#include "Fl_Button.H" - -/** - The Fl_Repeat_Button is a subclass of Fl_Button that - generates a callback when it is pressed and then repeatedly generates - callbacks as long as it is held down. The speed of the repeat is fixed - and depends on the implementation. -*/ -class FL_EXPORT Fl_Repeat_Button : public Fl_Button { - static void repeat_callback(void *); -public: - int handle(int); - /** - Creates a new Fl_Repeat_Button widget using the given - position, size, and label string. The default boxtype is FL_UP_BOX. - Deletes the button. - */ - Fl_Repeat_Button(int X,int Y,int W,int H,const char *l=0); - - void deactivate() { - Fl::remove_timeout(repeat_callback,this); - Fl_Button::deactivate(); - } -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Return_Button.H b/msvc/fltk/include/FL/Fl_Return_Button.H deleted file mode 100644 index 54b4ab5e..00000000 --- a/msvc/fltk/include/FL/Fl_Return_Button.H +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id$" -// -// Return button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Return_Button widget . */ - -#ifndef Fl_Return_Button_H -#define Fl_Return_Button_H -#include "Fl_Button.H" - -/** - The Fl_Return_Button is a subclass of Fl_Button that - generates a callback when it is pressed or when the user presses the - Enter key. A carriage-return symbol is drawn next to the button label. -

\image html Fl_Return_Button.png - \image latex Fl_Return_Button.png "Fl_Return_Button" width=4cm -*/ -class FL_EXPORT Fl_Return_Button : public Fl_Button { -protected: - void draw(); -public: - int handle(int); - /** - Creates a new Fl_Return_Button widget using the given - position, size, and label string. The default boxtype is FL_UP_BOX. -

The inherited destructor deletes the button. - */ - Fl_Return_Button(int X, int Y, int W, int H,const char *l=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Roller.H b/msvc/fltk/include/FL/Fl_Roller.H deleted file mode 100644 index b96e9263..00000000 --- a/msvc/fltk/include/FL/Fl_Roller.H +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id$" -// -// Roller header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Roller widget . */ - -#ifndef Fl_Roller_H -#define Fl_Roller_H - -#ifndef Fl_Valuator_H -#include "Fl_Valuator.H" -#endif - -/** - The Fl_Roller widget is a "dolly" control commonly used to - move 3D objects. -

\image html Fl_Roller.png - \image latex Fl_Roller.png "Fl_Roller" width=4cm -*/ -class FL_EXPORT Fl_Roller : public Fl_Valuator { -protected: - void draw(); -public: - int handle(int); - Fl_Roller(int X,int Y,int W,int H,const char* L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Round_Button.H b/msvc/fltk/include/FL/Fl_Round_Button.H deleted file mode 100644 index f5cb0332..00000000 --- a/msvc/fltk/include/FL/Fl_Round_Button.H +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id$" -// -// Round button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2014 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Round_Button_H -#define Fl_Round_Button_H - -#include "Fl_Light_Button.H" - -/** - Buttons generate callbacks when they are clicked by the user. You - control exactly when and how by changing the values for type() - and when(). -

\image html Fl_Round_Button.png

- \image latex Fl_Round_Button.png " Fl_Round_Button" width=4cm -

The Fl_Round_Button subclass display the "on" state by - turning on a light, rather than drawing pushed in. The shape of the - "light" is initially set to FL_ROUND_DOWN_BOX. The color of the light - when on is controlled with selection_color(), which defaults to - FL_FOREGROUND_COLOR. -*/ -class FL_EXPORT Fl_Round_Button : public Fl_Light_Button { -public: - Fl_Round_Button(int x,int y,int w,int h,const char *l = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Round_Clock.H b/msvc/fltk/include/FL/Fl_Round_Clock.H deleted file mode 100644 index 3ae74825..00000000 --- a/msvc/fltk/include/FL/Fl_Round_Clock.H +++ /dev/null @@ -1,38 +0,0 @@ -// -// "$Id$" -// -// Round clock header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Round_Clock widget . */ - -#ifndef Fl_Round_Clock_H -#define Fl_Round_Clock_H - -#include "Fl_Clock.H" - -/** A clock widget of type FL_ROUND_CLOCK. Has no box. */ -class FL_EXPORT Fl_Round_Clock : public Fl_Clock { -public: - /** Creates the clock widget, setting his type and box. */ - Fl_Round_Clock(int X,int Y,int W,int H, const char *L = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Scroll.H b/msvc/fltk/include/FL/Fl_Scroll.H deleted file mode 100644 index f1c2deca..00000000 --- a/msvc/fltk/include/FL/Fl_Scroll.H +++ /dev/null @@ -1,209 +0,0 @@ -// -// "$Id$" -// -// Scroll header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Scroll widget . */ - -#ifndef Fl_Scroll_H -#define Fl_Scroll_H - -#include "Fl_Group.H" -#include "Fl_Scrollbar.H" - -/** - This container widget lets you maneuver around a set of widgets much - larger than your window. If the child widgets are larger than the size - of this object then scrollbars will appear so that you can scroll over - to them: - \image html Fl_Scroll.png - \image latex Fl_Scroll.png "Fl_Scroll" width=4cm - - If all of the child widgets are packed together into a solid - rectangle then you want to set box() to FL_NO_BOX or - one of the _FRAME types. This will result in the best output. - However, if the child widgets are a sparse arrangement you must - set box() to a real _BOX type. This can result in some - blinking during redrawing, but that can be solved by using a - Fl_Double_Window. - - By default you can scroll in both directions, and the scrollbars - disappear if the data will fit in the area of the scroll. - - Use Fl_Scroll::type() to change this as follows : - - - 0 - No scrollbars - - Fl_Scroll::HORIZONTAL - Only a horizontal scrollbar. - - Fl_Scroll::VERTICAL - Only a vertical scrollbar. - - Fl_Scroll::BOTH - The default is both scrollbars. - - Fl_Scroll::HORIZONTAL_ALWAYS - Horizontal scrollbar always on, vertical always off. - - Fl_Scroll::VERTICAL_ALWAYS - Vertical scrollbar always on, horizontal always off. - - Fl_Scroll::BOTH_ALWAYS - Both always on. - - Use scrollbar.align(int) ( see void Fl_Widget::align(Fl_Align) ) : - to change what side the scrollbars are drawn on. - - If the FL_ALIGN_LEFT bit is on, the vertical scrollbar is on the left. - If the FL_ALIGN_TOP bit is on, the horizontal scrollbar is on - the top. Note that only the alignment flags in scrollbar are - considered. The flags in hscrollbar however are ignored. - - This widget can also be used to pan around a single child widget - "canvas". This child widget should be of your own class, with a - draw() method that draws the contents. The scrolling is done by - changing the x() and y() of the widget, so this child - must use the x() and y() to position its drawing. - To speed up drawing it should test fl_not_clipped(int x,int y,int w,int h) - to find out if a particular area of the widget must be drawn. - - Another very useful child is a single Fl_Pack, which is itself a group - that packs its children together and changes size to surround them. - Filling the Fl_Pack with Fl_Tabs groups (and then putting - normal widgets inside those) gives you a very powerful scrolling list - of individually-openable panels. - - Fluid lets you create these, but you can only lay out objects that - fit inside the Fl_Scroll without scrolling. Be sure to leave - space for the scrollbars, as Fluid won't show these either. - - You cannot use Fl_Window as a child of this since the - clipping is not conveyed to it when drawn, and it will draw over the - scrollbars and neighboring objects. -*/ -class FL_EXPORT Fl_Scroll : public Fl_Group { - - int xposition_, yposition_; - int oldx, oldy; - int scrollbar_size_; - static void hscrollbar_cb(Fl_Widget*, void*); - static void scrollbar_cb(Fl_Widget*, void*); - void fix_scrollbar_order(); - static void draw_clip(void*,int,int,int,int); - -#if FLTK_ABI_VERSION >= 10303 -protected: // NEW (STR#1895) -#else -private: // OLD -#endif - /** - Structure to manage scrollbar and widget interior sizes. - This is filled out by recalc_scrollbars() for use in calculations - that need to know the visible scroll area size, etc. - \note Availability in FLTK_ABI_VERSION 10303 or higher. - */ - typedef struct { - /// A local struct to manage a region defined by xywh - typedef struct { int x,y,w,h; } Fl_Region_XYWH; - /// A local struct to manage a region defined by left/right/top/bottom - typedef struct { - int l; ///< (l)eft "x" position, aka x1 - int r; ///< (r)ight "x" position, aka x2 - int t; ///< (t)op "y" position, aka y1 - int b; ///< (b)ottom "y" position, aka y2 - } Fl_Region_LRTB; - /// A local struct to manage a scrollbar's xywh region and tab values - typedef struct { - int x,y,w,h; - int pos; ///< scrollbar tab's "position of first line displayed" - int size; ///< scrollbar tab's "size of window in lines" - int first; ///< scrollbar tab's "number of first line" - int total; ///< scrollbar tab's "total number of lines" - } Fl_Scrollbar_Data; - int scrollsize; ///< the effective scrollbar thickness (local or global) - Fl_Region_XYWH innerbox; ///< widget's inner box, excluding scrollbars - Fl_Region_XYWH innerchild; ///< widget's inner box, including scrollbars - Fl_Region_LRTB child; ///< child bounding box: left/right/top/bottom - int hneeded; ///< horizontal scrollbar visibility - int vneeded; ///< vertical scrollbar visibility - Fl_Scrollbar_Data hscroll; ///< horizontal scrollbar region + values - Fl_Scrollbar_Data vscroll; ///< vertical scrollbar region + values - } ScrollInfo; - void recalc_scrollbars(ScrollInfo &si); - -protected: - - void bbox(int&,int&,int&,int&); - void draw(); - -public: - - Fl_Scrollbar scrollbar; - Fl_Scrollbar hscrollbar; - - void resize(int X, int Y, int W, int H); - int handle(int); - - Fl_Scroll(int X,int Y,int W,int H,const char*l=0); - - enum { // values for type() - HORIZONTAL = 1, - VERTICAL = 2, - BOTH = 3, - ALWAYS_ON = 4, - HORIZONTAL_ALWAYS = 5, - VERTICAL_ALWAYS = 6, - BOTH_ALWAYS = 7 - }; - - /** Gets the current horizontal scrolling position. */ - int xposition() const {return xposition_;} - /** Gets the current vertical scrolling position. */ - int yposition() const {return yposition_;} - void scroll_to(int, int); - void clear(); - /** - Gets the current size of the scrollbars' troughs, in pixels. - - If this value is zero (default), this widget will use the - Fl::scrollbar_size() value as the scrollbar's width. - - \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. - \see Fl::scrollbar_size(int) - */ - int scrollbar_size() const { - return(scrollbar_size_); - } - /** - Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. - - Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL - your widgets' scrollbars. This ensures your application - has a consistent UI, is the default behavior, and is normally - what you want. - - Only use THIS method if you really need to override the global - scrollbar size. The need for this should be rare. - - Setting \p newSize to the special value of 0 causes the widget to - track the global Fl::scrollbar_size(), which is the default. - - \param[in] newSize Sets the scrollbar size in pixels.\n - If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() - \see Fl::scrollbar_size() - */ - void scrollbar_size(int newSize) { - if ( newSize != scrollbar_size_ ) redraw(); - scrollbar_size_ = newSize; - } -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Scrollbar.H b/msvc/fltk/include/FL/Fl_Scrollbar.H deleted file mode 100644 index c2b9abe0..00000000 --- a/msvc/fltk/include/FL/Fl_Scrollbar.H +++ /dev/null @@ -1,111 +0,0 @@ -// -// "$Id$" -// -// Scroll bar header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Scrollbar widget . */ - -#ifndef Fl_Scrollbar_H -#define Fl_Scrollbar_H - -#include "Fl_Slider.H" - -/** - The Fl_Scrollbar widget displays a slider with arrow buttons at - the ends of the scrollbar. Clicking on the arrows move up/left and - down/right by linesize(). Scrollbars also accept FL_SHORTCUT events: - the arrows move by linesize(), and vertical scrollbars take Page - Up/Down (they move by the page size minus linesize()) and Home/End - (they jump to the top or bottom). - - Scrollbars have step(1) preset (they always return integers). If - desired you can set the step() to non-integer values. You will then - have to use casts to get at the floating-point versions of value() - from Fl_Slider. - - \image html scrollbar.png - \image latex scrollbar.png "Fl_Scrollbar" width=4cm -*/ -class FL_EXPORT Fl_Scrollbar : public Fl_Slider { - - int linesize_; - int pushed_; - static void timeout_cb(void*); - void increment_cb(); -protected: - void draw(); - -public: - - Fl_Scrollbar(int X,int Y,int W,int H, const char *L = 0); - ~Fl_Scrollbar(); - int handle(int); - - /** - Gets the integer value (position) of the slider in the scrollbar. - You can get the floating point value with Fl_Slider::value(). - - \see Fl_Scrollbar::value(int p) - \see Fl_Scrollbar::value(int pos, int size, int first, int total) - */ - int value() const {return int(Fl_Slider::value());} - - /** - Sets the value (position) of the slider in the scrollbar. - - \see Fl_Scrollbar::value() - \see Fl_Scrollbar::value(int pos, int size, int first, int total) - */ - int value(int p) {return int(Fl_Slider::value((double)p));} - - /** - Sets the position, size and range of the slider in the scrollbar. - \param[in] pos position, first line displayed - \param[in] windowSize number of lines displayed - \param[in] first number of first line - \param[in] total total number of lines - - You should call this every time your window changes size, your data - changes size, or your scroll position changes (even if in response - to a callback from this scrollbar). - All necessary calls to redraw() are done. - - Calls Fl_Slider::scrollvalue(int pos, int size, int first, int total). - */ - int value(int pos, int windowSize, int first, int total) { - return scrollvalue(pos, windowSize, first, total); - } - - /** - Get the size of step, in lines, that the arror keys move. - */ - int linesize() const {return linesize_;} - - /** - This number controls how big the steps are that the arrow keys do. - In addition page up/down move by the size last sent to value() - minus one linesize(). The default is 16. - */ - void linesize(int i) {linesize_ = i;} - -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Secret_Input.H b/msvc/fltk/include/FL/Fl_Secret_Input.H deleted file mode 100644 index de9621c7..00000000 --- a/msvc/fltk/include/FL/Fl_Secret_Input.H +++ /dev/null @@ -1,51 +0,0 @@ -// -// "$Id$" -// -// Secret input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Secret_Input widget . */ - -#ifndef Fl_Secret_Input_H -#define Fl_Secret_Input_H - -#include "Fl_Input.H" - -/** - The Fl_Secret_Input class is a subclass of Fl_Input that displays its - input as a string of placeholders. Depending on the platform this - placeholder is either the asterisk ('*') or the Unicode bullet - character (U+2022). - - This subclass is usually used to receive passwords and other "secret" information. -*/ -class FL_EXPORT Fl_Secret_Input : public Fl_Input { -public: - /** - Creates a new Fl_Secret_Input widget using the given - position, size, and label string. The default boxtype is FL_DOWN_BOX. - - Inherited destructor destroys the widget and any value associated with it. - */ - Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0); - int handle(int); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Select_Browser.H b/msvc/fltk/include/FL/Fl_Select_Browser.H deleted file mode 100644 index 123e24cf..00000000 --- a/msvc/fltk/include/FL/Fl_Select_Browser.H +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id$" -// -// Select browser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Select_Browser widget . */ - -#ifndef Fl_Select_Browser_H -#define Fl_Select_Browser_H - -#include "Fl_Browser.H" - -/** - The class is a subclass of Fl_Browser - which lets the user select a single item, or no items by clicking on - the empty space. As long as the mouse button is held down on an - unselected item it is highlighted. Normally the callback is done when the - user presses the mouse, but you can change this with when(). -

See Fl_Browser for methods to add and remove lines from the browser. -*/ -class FL_EXPORT Fl_Select_Browser : public Fl_Browser { -public: - /** - Creates a new Fl_Select_Browser widget using the given - position, size, and label string. The default boxtype is FL_DOWN_BOX. - The constructor specializes Fl_Browser() by setting the type to FL_SELECT_BROWSER. - The destructor destroys the widget and frees all memory that has been allocated. - */ - Fl_Select_Browser(int X,int Y,int W,int H,const char *L=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Shared_Image.H b/msvc/fltk/include/FL/Fl_Shared_Image.H deleted file mode 100644 index d32e7470..00000000 --- a/msvc/fltk/include/FL/Fl_Shared_Image.H +++ /dev/null @@ -1,144 +0,0 @@ -// -// "$Id$" -// -// Shared image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2017 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl_Shared_Image class. */ - -#ifndef Fl_Shared_Image_H -# define Fl_Shared_Image_H - -# include "Fl_Image.H" - - -// Test function for adding new formats -typedef Fl_Image *(*Fl_Shared_Handler)(const char *name, uchar *header, - int headerlen); - -// Shared images class. -/** - This class supports caching, loading, scaling, and drawing of image files. - - Most applications will also want to link against the fltk_images library - and call the fl_register_images() function to support standard image - formats such as BMP, GIF, JPEG, and PNG. - - Images can be requested (loaded) with Fl_Shared_Image::get(), find(), - and some other methods. All images are cached in an internal list of - shared images and should be released when they are no longer needed. - A refcount is used to determine if a released image is to be destroyed - with delete. - - \see Fl_Shared_Image::get() - \see Fl_Shared_Image::find() - \see Fl_Shared_Image::release() -*/ -class FL_EXPORT Fl_Shared_Image : public Fl_Image { - - friend class Fl_JPEG_Image; - friend class Fl_PNG_Image; - -private: - static Fl_RGB_Scaling scaling_algorithm_; // method used to rescale RGB source images -#if FLTK_ABI_VERSION >= 10304 - Fl_Image *scaled_image_; -#endif -protected: - - static Fl_Shared_Image **images_; // Shared images - static int num_images_; // Number of shared images - static int alloc_images_; // Allocated shared images - static Fl_Shared_Handler *handlers_; // Additional format handlers - static int num_handlers_; // Number of format handlers - static int alloc_handlers_; // Allocated format handlers - - const char *name_; // Name of image file - int original_; // Original image? - int refcount_; // Number of times this image has been used - Fl_Image *image_; // The image that is shared - int alloc_image_; // Was the image allocated? - - static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1); - - // Use get() and release() to load/delete images in memory... - Fl_Shared_Image(); - Fl_Shared_Image(const char *n, Fl_Image *img = 0); - virtual ~Fl_Shared_Image(); - void add(); - void update(); - -public: - /** Returns the filename of the shared image */ - const char *name() { return name_; } - - /** Returns the number of references of this shared image. - When reference is below 1, the image is deleted. - */ - int refcount() { return refcount_; } - - /** Returns whether this is an original image. - Images loaded from a file or from memory are marked \p original as - opposed to images created as a copy of another image with different - size (width or height). - \note This is useful for debugging (rarely used in user code). - \since FLTK 1.4.0 - */ - int original() { return original_; } - - void release(); - void reload(); - - virtual Fl_Image *copy(int W, int H); - Fl_Image *copy() { return copy(w(), h()); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx, int cy); - void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } - void scale(int width, int height, int proportional = 1, int can_expand = 0); - virtual void uncache(); - - static Fl_Shared_Image *find(const char *name, int W = 0, int H = 0); - static Fl_Shared_Image *get(const char *name, int W = 0, int H = 0); - static Fl_Shared_Image *get(Fl_RGB_Image *rgb, int own_it = 1); - static Fl_Shared_Image **images(); - static int num_images(); - static void add_handler(Fl_Shared_Handler f); - static void remove_handler(Fl_Shared_Handler f); - /** Sets what algorithm is used when resizing a source image. - The default algorithm is FL_RGB_SCALING_BILINEAR. - Drawing an Fl_Shared_Image is sometimes performed by first resizing the source image - and then drawing the resized copy. This occurs, e.g., when drawing to screen under Linux or MSWindows - after having called Fl_Shared_Image::scale(). - This function controls what method is used when the image to be resized is an Fl_RGB_Image. - \version 1.3.4 and requires compiling with FLTK_ABI_VERSION = 10304 - */ - static void scaling_algorithm(Fl_RGB_Scaling algorithm) {scaling_algorithm_ = algorithm; } -}; - -// -// The following function is provided in the fltk_images library and -// registers all of the "extra" image file formats that are not part -// of the core FLTK library... -// - -FL_EXPORT extern void fl_register_images(); - -#endif // !Fl_Shared_Image_H - -// -// End of "$Id$" -// diff --git a/msvc/fltk/include/FL/Fl_Simple_Counter.H b/msvc/fltk/include/FL/Fl_Simple_Counter.H deleted file mode 100644 index 8edc907a..00000000 --- a/msvc/fltk/include/FL/Fl_Simple_Counter.H +++ /dev/null @@ -1,40 +0,0 @@ -// -// "$Id$" -// -// Simple counter header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Simple_Counter widget . */ - -#ifndef Fl_Simple_Counter_H -#define Fl_Simple_Counter_H - -#include "Fl_Counter.H" -/** - This widget creates a counter with only 2 arrow buttons -

\image html counter.png

- \image latex counter.png "Fl_Simple_Counter" width=4cm -*/ -class FL_EXPORT Fl_Simple_Counter : public Fl_Counter { -public: - Fl_Simple_Counter(int X,int Y,int W,int H, const char *L = 0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Single_Window.H b/msvc/fltk/include/FL/Fl_Single_Window.H deleted file mode 100644 index fc8eb484..00000000 --- a/msvc/fltk/include/FL/Fl_Single_Window.H +++ /dev/null @@ -1,58 +0,0 @@ -// -// "$Id$" -// -// Single-buffered window header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Single_Window class . */ - -#ifndef Fl_Single_Window_H -#define Fl_Single_Window_H - -#include "Fl_Window.H" - -/** - This is the same as Fl_Window. However, it is possible that - some implementations will provide double-buffered windows by default. - This subclass can be used to force single-buffering. This may be - useful for modifying existing programs that use incremental update, or - for some types of image data, such as a movie flipbook. -*/ -class FL_EXPORT Fl_Single_Window : public Fl_Window { -public: - void show(); - void show(int a, char **b) {Fl_Window::show(a,b);} - void flush(); - /** - Creates a new Fl_Single_Window widget using the given - size, and label (title) string. - */ - Fl_Single_Window(int W, int H, const char *l=0); - - /** - Creates a new Fl_Single_Window widget using the given - position, size, and label (title) string. - */ - Fl_Single_Window(int X, int Y, int W, int H, const char *l=0); - - int make_current(); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Slider.H b/msvc/fltk/include/FL/Fl_Slider.H deleted file mode 100644 index aceb62d5..00000000 --- a/msvc/fltk/include/FL/Fl_Slider.H +++ /dev/null @@ -1,111 +0,0 @@ -// -// "$Id$" -// -// Slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Slider widget . */ - -#ifndef Fl_Slider_H -#define Fl_Slider_H - -#ifndef Fl_Valuator_H -#include "Fl_Valuator.H" -#endif - -// values for type(), lowest bit indicate horizontal: -#define FL_VERT_SLIDER 0 -#define FL_HOR_SLIDER 1 -#define FL_VERT_FILL_SLIDER 2 -#define FL_HOR_FILL_SLIDER 3 -#define FL_VERT_NICE_SLIDER 4 -#define FL_HOR_NICE_SLIDER 5 - -/** - The Fl_Slider widget contains a sliding knob inside a box. It is - often used as a scrollbar. Moving the box all the way to the - top/left sets it to the minimum(), and to the bottom/right to the - maximum(). The minimum() may be greater than the maximum() to - reverse the slider direction. - - Use void Fl_Widget::type(int) to set how the slider is drawn, - which can be one of the following: - - \li FL_VERTICAL - Draws a vertical slider (this is the default). - \li FL_HORIZONTAL - Draws a horizontal slider. - \li FL_VERT_FILL_SLIDER - Draws a filled vertical slider, - useful as a progress or value meter. - \li FL_HOR_FILL_SLIDER - Draws a filled horizontal slider, - useful as a progress or value meter. - \li FL_VERT_NICE_SLIDER - Draws a vertical slider with a nice - looking control knob. - \li FL_HOR_NICE_SLIDER - Draws a horizontal slider with a - nice looking control knob. - - \image html slider.png - \image latex slider.png "Fl_Slider" width=4cm -*/ -class FL_EXPORT Fl_Slider : public Fl_Valuator { - - float slider_size_; - uchar slider_; - void _Fl_Slider(); - void draw_bg(int, int, int, int); - -protected: - - // these allow subclasses to put the slider in a smaller area: - void draw(int, int, int, int); - int handle(int, int, int, int, int); - void draw(); - -public: - - int handle(int); - Fl_Slider(int X,int Y,int W,int H, const char *L = 0); - Fl_Slider(uchar t,int X,int Y,int W,int H, const char *L); - - int scrollvalue(int pos,int size,int first,int total); - void bounds(double a, double b); - - /** - Get the dimensions of the moving piece of slider. - */ - float slider_size() const {return slider_size_;} - - /** - Set the dimensions of the moving piece of slider. This is - the fraction of the size of the entire widget. If you set this - to 1 then the slider cannot move. The default value is .08. - - For the "fill" sliders this is the size of the area around the - end that causes a drag effect rather than causing the slider to - jump to the mouse. - */ - void slider_size(double v); - - /** Gets the slider box type. */ - Fl_Boxtype slider() const {return (Fl_Boxtype)slider_;} - - /** Sets the slider box type. */ - void slider(Fl_Boxtype c) {slider_ = c;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Spinner.H b/msvc/fltk/include/FL/Fl_Spinner.H deleted file mode 100644 index 22da7886..00000000 --- a/msvc/fltk/include/FL/Fl_Spinner.H +++ /dev/null @@ -1,259 +0,0 @@ -// -// "$Id$" -// -// Spinner widget for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Spinner widget . */ - -#ifndef Fl_Spinner_H -# define Fl_Spinner_H - -// -// Include necessary headers... -// - -# include -# include -# include -# include -# include -# include - - -/** - This widget is a combination of the input - widget and repeat buttons. The user can either type into the - input area or use the buttons to change the value. - - \image html Fl_Spinner.png "Fl_Spinner widget" - \image latex Fl_Spinner.png "Fl_Spinner widget" width=6cm -*/ -class FL_EXPORT Fl_Spinner : public Fl_Group { - - double value_; // Current value - double minimum_; // Minimum value - double maximum_; // Maximum value - double step_; // Amount to add/subtract for up/down - const char *format_; // Format string - -#if FLTK_ABI_VERSION >= 10301 -// NEW -protected: -#endif - Fl_Input input_; // Input field for the value - Fl_Repeat_Button - up_button_, // Up button - down_button_; // Down button - -private: - static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) { - double v; // New value - - if (w == &(sb->input_)) { - // Something changed in the input field... - v = atof(sb->input_.value()); - - if (v < sb->minimum_) { - sb->value_ = sb->minimum_; - sb->update(); - } else if (v > sb->maximum_) { - sb->value_ = sb->maximum_; - sb->update(); - } else sb->value_ = v; - } else if (w == &(sb->up_button_)) { - // Up button pressed... - v = sb->value_ + sb->step_; - - if (v > sb->maximum_) sb->value_ = sb->minimum_; - else sb->value_ = v; - - sb->update(); - } else if (w == &(sb->down_button_)) { - // Down button pressed... - v = sb->value_ - sb->step_; - - if (v < sb->minimum_) sb->value_ = sb->maximum_; - else sb->value_ = v; - - sb->update(); - } - - sb->set_changed(); - sb->do_callback(); - } - void update() { - char s[255]; // Value string - - if (format_[0]=='%'&&format_[1]=='.'&&format_[2]=='*') { // precision argument - // this code block is a simplified version of - // Fl_Valuator::format() and works well (but looks ugly) - int c = 0; - char temp[64], *sp = temp; - sprintf(temp, "%.12f", step_); - while (*sp) sp++; - sp--; - while (sp>temp && *sp=='0') sp--; - while (sp>temp && (*sp>='0' && *sp<='9')) { sp--; c++; } - sprintf(s, format_, c, value_); - } else { - sprintf(s, format_, value_); - } - input_.value(s); - } - - public: - - /** - Creates a new Fl_Spinner widget using the given position, size, - and label string. -

Inherited destructor Destroys the widget and any value associated with it. - */ - Fl_Spinner(int X, int Y, int W, int H, const char *L = 0); - - /** Sets or returns the format string for the value. */ - const char *format() { return (format_); } - /** Sets or returns the format string for the value. */ - void format(const char *f) { format_ = f; update(); } - - int handle(int event) { - switch (event) { - case FL_KEYDOWN : - case FL_SHORTCUT : - if (Fl::event_key() == FL_Up) { - up_button_.do_callback(); - return 1; - } else if (Fl::event_key() == FL_Down) { - down_button_.do_callback(); - return 1; - } else return 0; - - case FL_FOCUS : - if (input_.take_focus()) return 1; - else return 0; - } - - return Fl_Group::handle(event); - } - - /** Speling mistakes retained for source compatibility \deprecated */ - double maxinum() const { return (maximum_); } - /** Gets the maximum value of the widget. */ - double maximum() const { return (maximum_); } - /** Sets the maximum value of the widget. */ - void maximum(double m) { maximum_ = m; } - /** Speling mistakes retained for source compatibility \deprecated */ - double mininum() const { return (minimum_); } - /** Gets the minimum value of the widget. */ - double minimum() const { return (minimum_); } - /** Sets the minimum value of the widget. */ - void minimum(double m) { minimum_ = m; } - /** Sets the minimum and maximum values for the widget. */ - void range(double a, double b) { minimum_ = a; maximum_ = b; } - void resize(int X, int Y, int W, int H) { - Fl_Group::resize(X,Y,W,H); - - input_.resize(X, Y, W - H / 2 - 2, H); - up_button_.resize(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2); - down_button_.resize(X + W - H / 2 - 2, Y + H - H / 2, - H / 2 + 2, H / 2); - } - /** - Sets or returns the amount to change the value when the user clicks a button. - Before setting step to a non-integer value, the spinner - type() should be changed to floating point. - */ - double step() const { return (step_); } - /** See double Fl_Spinner::step() const */ - void step(double s) { - step_ = s; - if (step_ != (int)step_) input_.type(FL_FLOAT_INPUT); - else input_.type(FL_INT_INPUT); - update(); - } - /** Gets the color of the text in the input field. */ - Fl_Color textcolor() const { - return (input_.textcolor()); - } - /** Sets the color of the text in the input field. */ - void textcolor(Fl_Color c) { - input_.textcolor(c); - } - /** Gets the font of the text in the input field. */ - Fl_Font textfont() const { - return (input_.textfont()); - } - /** Sets the font of the text in the input field. */ - void textfont(Fl_Font f) { - input_.textfont(f); - } - /** Gets the size of the text in the input field. */ - Fl_Fontsize textsize() const { - return (input_.textsize()); - } - /** Sets the size of the text in the input field. */ - void textsize(Fl_Fontsize s) { - input_.textsize(s); - } - /** Gets the numeric representation in the input field. - \see Fl_Spinner::type(uchar) - */ - uchar type() const { return (input_.type()); } - /** Sets the numeric representation in the input field. - Valid values are FL_INT_INPUT and FL_FLOAT_INPUT. - Also changes the format() template. - Setting a new spinner type via a superclass pointer will not work. - \note type is not a virtual function. - */ - void type(uchar v) { - if (v==FL_FLOAT_INPUT) { - format("%.*f"); - } else { - format("%.0f"); - } - input_.type(v); - } - /** Gets the current value of the widget. */ - double value() const { return (value_); } - /** - Sets the current value of the widget. - Before setting value to a non-integer value, the spinner - type() should be changed to floating point. - */ - void value(double v) { value_ = v; update(); } - /** - Change the background color of the spinner widget's input field. - */ - void color(Fl_Color v) { input_.color(v); } - /** - Return the background color of the spinner widget's input field. - */ - Fl_Color color() const { return(input_.color()); } - /** - Change the selection color of the spinner widget's input field. - */ - void selection_color(Fl_Color val) { input_.selection_color(val); } - /** - Return the selection color of the spinner widget's input field. - */ - Fl_Color selection_color() const { return input_.selection_color(); } -}; - -#endif // !Fl_Spinner_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Sys_Menu_Bar.H b/msvc/fltk/include/FL/Fl_Sys_Menu_Bar.H deleted file mode 100644 index be47a340..00000000 --- a/msvc/fltk/include/FL/Fl_Sys_Menu_Bar.H +++ /dev/null @@ -1,134 +0,0 @@ -// -// "$Id$" -// -// MacOS system menu bar header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Sys_Menu_Bar_H -#define Fl_Sys_Menu_Bar_H - -#include "Fl_Menu_Bar.H" -#include "x.H" - -#if defined(__APPLE__) || defined(FL_DOXYGEN) - -/** - A class to create, modify and delete menus that appear on Mac OS X in the menu bar at the top of the screen. - - On other than Mac OS X platforms, Fl_Sys_Menu_Bar is a synonym of class Fl_Menu_Bar. - \n To use this class, just replace Fl_Menu_Bar by Fl_Sys_Menu_Bar, and, on the Mac platform, - a system menu at the top of the screen will be available. This menu will match an array - of Fl_Menu_Item's exactly as with standard FLTK menus. - - Changes to the menu state are immediately visible in the menubar when they are made - using member functions of the Fl_Sys_Menu_Bar class. Other changes (e.g., by a call to - Fl_Menu_Item::set()) should be followed by a call to Fl_Sys_Menu_Bar::update() to be - visible in the menubar across all platforms. - - A few FLTK features are not supported by the Mac System menu: - - \li no symbolic labels - \li no embossed labels - \li no font sizes - - You can configure a callback for the 'About' menu item to invoke your own code with fl_mac_set_about(). - */ -class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar { - -#if FLTK_ABI_VERSION >= 10304 - // NEW -- update() public (STR#3317) -public: - void update(); -protected: - void draw(); -#else - // OLD -- update() protected -protected: - void update(); - void draw(); -#endif - -public: - Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0); - ~Fl_Sys_Menu_Bar(); - /** Return the system menu's array of Fl_Menu_Item's - */ - const Fl_Menu_Item *menu() const {return Fl_Menu_::menu();} - void menu(const Fl_Menu_Item *m); - int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0); - /** Adds a new menu item. - \see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0) - */ - int add(const char* label, const char* shortcut, Fl_Callback* cb, void *user_data=0, int flags=0) { - return add(label, fl_old_shortcut(shortcut), cb, user_data, flags); - } - int add(const char* str); - int insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data=0, int flags=0); - /** Insert a new menu item. - \see Fl_Menu_::insert(int index, const char* label, const char* shortcut, Fl_Callback *cb, void *user_data=0, int flags=0) - */ - int insert(int index, const char* label, const char* shortcut, Fl_Callback *cb, void *user_data=0, int flags=0) { - return insert(index, label, fl_old_shortcut(shortcut), cb, user_data, flags); - } - void remove(int n); - void replace(int index, const char *name); - /** Set the Fl_Menu_Item array pointer to null, indicating a zero-length menu. - \see Fl_Menu_::clear() - */ - void clear(); - /** Clears the specified submenu pointed to by index of all menu items. - \see Fl_Menu_::clear_submenu(int index) - */ - int clear_submenu(int index); - /** Make the shortcuts for this menu work no matter what window has the focus when you type it. - */ - void global() {}; - /** Sets the flags of item i - \see Fl_Menu_::mode(int i, int fl) */ - void mode (int i, int fl) { - Fl_Menu_::mode(i, fl); - update(); - } - /** Gets the flags of item i. - */ - int mode(int i) const { return Fl_Menu_::mode(i); } - /** Changes the shortcut of item i to n. - */ - void shortcut (int i, int s) { Fl_Menu_::shortcut(i, s); update(); } - /** Turns the radio item "on" for the menu item and turns "off" adjacent radio items of the same group.*/ - void setonly (Fl_Menu_Item *item) { Fl_Menu_::setonly(item); update(); } -}; - -#else - -#if FLTK_ABI_VERSION >= 10304 -// NEW -- small class for update() -class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar { -public: - Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0) : Fl_Menu_Bar(x,y,w,h,l) {} - inline void update() {} -}; -#else -// OLD -- simple typedef -typedef Fl_Menu_Bar Fl_Sys_Menu_Bar; -#endif - -#endif // defined(__APPLE__) || defined(FL_DOXYGEN) - -#endif // Fl_Sys_Menu_Bar_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Table.H b/msvc/fltk/include/FL/Fl_Table.H deleted file mode 100644 index 341f878b..00000000 --- a/msvc/fltk/include/FL/Fl_Table.H +++ /dev/null @@ -1,1155 +0,0 @@ -// -// "$Id$" -// -// Fl_Table -- A table widget -// -// Copyright 2002 by Greg Ercolano. -// Copyright (c) 2004 O'ksi'D -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef _FL_TABLE_H -#define _FL_TABLE_H - -#include -#include // memcpy -#ifdef WIN32 -#include // WINDOWS: malloc/realloc -#else /*WIN32*/ -#include // UNIX: malloc/realloc -#endif /*WIN32*/ - -#include -#include -#include -#include -#include - -/** - A table of widgets or other content. - - This is the base class for table widgets. - - To be useful it must be subclassed and several virtual functions defined. - Normally applications use widgets derived from this widget, and do not use this - widget directly; this widget is usually too low level to be used directly by - applications. - - This widget does \em not handle the data in the table. The draw_cell() - method must be overridden by a subclass to manage drawing the contents of - the cells. - - This widget can be used in several ways: - - - As a custom widget; see examples/table-simple.cxx and test/table.cxx. - Very optimal for even extremely large tables. - - As a table made up of a single FLTK widget instanced all over the table, - simulating a numeric spreadsheet. See examples/table-spreadsheet.cxx and - examples/table-spreadsheet-with-keyboard-nav.cxx. Optimal for large tables. - - As a regular container of FLTK widgets, one widget per cell. - See examples/table-as-container.cxx. \em Not recommended for large tables. - - \image html table-simple.png - \image latex table-simple.png "table-simple example" width=6cm - - \image html table-as-container.png - \image latex table-as-container.png "table-as-container example" width=6cm - - When acting as part of a custom widget, events on the cells and/or headings - generate callbacks when they are clicked by the user. You control when events - are generated based on the setting for Fl_Table::when(). - - When acting as a container for FLTK widgets, the FLTK widgets maintain - themselves. Although the draw_cell() method must be overridden, its contents - can be very simple. See the draw_cell() code in examples/table-simple.cxx. - - The following variables are available to classes deriving from Fl_Table: - - \image html table-dimensions.png - \image latex table-dimensions.png "Fl_Table Dimensions" width=6cm - - - - - - - - - - - - -
x()/y()/w()/h()Fl_Table widget's outer dimension. The outer edge of the border of the - Fl_Table. (Red in the diagram above)
wix/wiy/wiw/wihFl_Table widget's inner dimension. The inner edge of the border of the - Fl_Table. eg. if the Fl_Table's box() is FL_NO_BOX, these values are the same - as x()/y()/w()/h(). (Yellow in the diagram above)
tox/toy/tow/tohThe table's outer dimension. The outer edge of the border around the cells, - but inside the row/col headings and scrollbars. (Green in the diagram above) -
tix/tiy/tiw/tihThe table's inner dimension. The inner edge of the border around the cells, - but inside the row/col headings and scrollbars. AKA the table's clip region. - eg. if the table_box() is FL_NO_BOX, these values are the same as - tox/toy/tow/toh. (Blue in the diagram above) -
- - CORE DEVELOPERS - - - Greg Ercolano : 12/16/2002 - initial implementation 12/16/02. Fl_Table, Fl_Table_Row, docs. - - Jean-Marc Lienher : 02/22/2004 - added keyboard nav + mouse selection, and ported Fl_Table into fltk-utf8-1.1.4 - - OTHER CONTRIBUTORS - - - Inspired by the Feb 2000 version of FLVW's Flvw_Table widget. Mucho thanks to those folks. - - Mister Satan : 04/07/2003 - MinGW porting mods, and singleinput.cxx; a cool Fl_Input oriented spreadsheet example - - Marek Paliwoda : 01/08/2003 - Porting mods for Borland - - Ori Berger : 03/16/2006 - Optimizations for >500k rows/cols - - LICENSE - - Greg added the following license to the original distribution of Fl_Table. He - kindly gave his permission to integrate Fl_Table and Fl_Table_Row into FLTK, - allowing FLTK license to apply while his widgets are part of the library. - - If used on its own, this is the license that applies: - - \verbatim - Fl_Table License - December 16, 2002 - - The Fl_Table library and included programs are provided under the terms - of the GNU Library General Public License (LGPL) with the following - exceptions: - - 1. Modifications to the Fl_Table configure script, config - header file, and makefiles by themselves to support - a specific platform do not constitute a modified or - derivative work. - - The authors do request that such modifications be - contributed to the Fl_Table project - send all - contributions to "erco at seriss dot com". - - 2. Widgets that are subclassed from Fl_Table widgets do not - constitute a derivative work. - - 3. Static linking of applications and widgets to the - Fl_Table library does not constitute a derivative work - and does not require the author to provide source - code for the application or widget, use the shared - Fl_Table libraries, or link their applications or - widgets against a user-supplied version of Fl_Table. - - If you link the application or widget to a modified - version of Fl_Table, then the changes to Fl_Table must be - provided under the terms of the LGPL in sections - 1, 2, and 4. - - 4. You do not have to provide a copy of the Fl_Table license - with programs that are linked to the Fl_Table library, nor - do you have to identify the Fl_Table license in your - program or documentation as required by section 6 - of the LGPL. - - However, programs must still identify their use of Fl_Table. - The following example statement can be included in user - documentation to satisfy this requirement: - - [program/widget] is based in part on the work of - the Fl_Table project http://seriss.com/people/erco/fltk/Fl_Table/ - \endverbatim - - - */ -class FL_EXPORT Fl_Table : public Fl_Group { -public: - /** - The context bit flags for Fl_Table related callbacks. - - Used in draw_cell(), callback(), etc. - */ - enum TableContext { - CONTEXT_NONE = 0, ///< no known context - CONTEXT_STARTPAGE = 0x01, ///< before a page is redrawn - CONTEXT_ENDPAGE = 0x02, ///< after a page is redrawn - CONTEXT_ROW_HEADER = 0x04, ///< in the row header - CONTEXT_COL_HEADER = 0x08, ///< in the col header - CONTEXT_CELL = 0x10, ///< in one of the cells - CONTEXT_TABLE = 0x20, ///< in a dead zone of table - CONTEXT_RC_RESIZE = 0x40 ///< column or row being resized - }; - -private: - int _rows, _cols; // total rows/cols - int _row_header_w; // width of row header - int _col_header_h; // height of column header - int _row_position; // last row_position set (not necessarily == toprow!) - int _col_position; // last col_position set (not necessarily == leftcol!) - - char _row_header; // row header enabled? - char _col_header; // col header enabled? - char _row_resize; // row resizing enabled? - char _col_resize; // col resizing enabled? - int _row_resize_min; // row minimum resizing height (default=1) - int _col_resize_min; // col minimum resizing width (default=1) - - // OPTIMIZATION: partial row/column redraw variables - int _redraw_toprow; - int _redraw_botrow; - int _redraw_leftcol; - int _redraw_rightcol; - Fl_Color _row_header_color; - Fl_Color _col_header_color; - - int _auto_drag; - int _selecting; -#if FLTK_ABI_VERSION >= 10301 - int _scrollbar_size; -#endif -#if FLTK_ABI_VERSION >= 10303 - enum { - TABCELLNAV = 1<<0, ///> tab cell navigation flag - }; - unsigned int flags_; -#endif - - // An STL-ish vector without templates - class FL_EXPORT IntVector { - int *arr; - unsigned int _size; - void init() { - arr = NULL; - _size = 0; - } - void copy(int *newarr, unsigned int newsize) { - size(newsize); - memcpy(arr, newarr, newsize * sizeof(int)); - } - public: - IntVector() { init(); } // CTOR - ~IntVector() { if ( arr ) free(arr); arr = NULL; } // DTOR - IntVector(IntVector&o) { init(); copy(o.arr, o._size); } // COPY CTOR - IntVector& operator=(IntVector&o) { // ASSIGN - init(); - copy(o.arr, o._size); - return(*this); - } - int operator[](int x) const { return(arr[x]); } - int& operator[](int x) { return(arr[x]); } - unsigned int size() { return(_size); } - void size(unsigned int count) { - if ( count != _size ) { - arr = (int*)realloc(arr, count * sizeof(int)); - _size = count; - } - } - int pop_back() { int tmp = arr[_size-1]; _size--; return(tmp); } - void push_back(int val) { unsigned int x = _size; size(_size+1); arr[x] = val; } - int back() { return(arr[_size-1]); } - }; - - IntVector _colwidths; // column widths in pixels - IntVector _rowheights; // row heights in pixels - - Fl_Cursor _last_cursor; // last mouse cursor before changed to 'resize' cursor - - // EVENT CALLBACK DATA - TableContext _callback_context; // event context - int _callback_row, _callback_col; // event row/col - - // handle() state variables. - // Put here instead of local statics in handle(), so more - // than one Fl_Table can exist without crosstalk between them. - // - int _resizing_col; // column being dragged - int _resizing_row; // row being dragged - int _dragging_x; // starting x position for horiz drag - int _dragging_y; // starting y position for vert drag - int _last_row; // last row we FL_PUSH'ed - - // Redraw single cell - void _redraw_cell(TableContext context, int R, int C); - - void _start_auto_drag(); - void _stop_auto_drag(); - void _auto_drag_cb(); - static void _auto_drag_cb2(void *d); - -protected: - enum ResizeFlag { - RESIZE_NONE = 0, - RESIZE_COL_LEFT = 1, - RESIZE_COL_RIGHT = 2, - RESIZE_ROW_ABOVE = 3, - RESIZE_ROW_BELOW = 4 - }; - - int table_w, table_h; // table's virtual size (in pixels) - int toprow, botrow, leftcol, rightcol; // four corners of viewable table - - // selection - int current_row, current_col; - int select_row, select_col; - - // OPTIMIZATION: Precomputed scroll positions for the toprow/leftcol - int toprow_scrollpos; - int leftcol_scrollpos; - - // Dimensions - int tix, tiy, tiw, tih; // data table inner dimension xywh - int tox, toy, tow, toh; // data table outer dimension xywh - int wix, wiy, wiw, wih; // widget inner dimension xywh - - Fl_Scroll *table; // container for child fltk widgets (if any) - Fl_Scrollbar *vscrollbar; // vertical scrollbar - Fl_Scrollbar *hscrollbar; // horizontal scrollbar - - // Fltk - int handle(int e); // fltk handle() override - - // Class maintenance - void recalc_dimensions(); - void table_resized(); // table resized; recalc - void table_scrolled(); // table scrolled; recalc - void get_bounds(TableContext context, // return x/y/w/h bounds for context - int &X, int &Y, int &W, int &H); - void change_cursor(Fl_Cursor newcursor); // change mouse cursor to some other shape - TableContext cursor2rowcol(int &R, int &C, ResizeFlag &resizeflag); - // find r/c given current x/y event - int find_cell(TableContext context, // find cell's x/y/w/h given r/c - int R, int C, int &X, int &Y, int &W, int &H); - int row_col_clamp(TableContext context, int &R, int &C); - // clamp r/c to known universe - - /** - Subclass should override this method to handle drawing the cells. - - This method will be called whenever the table is redrawn, once per cell. - - Only cells that are completely (or partially) visible will be told to draw. - - \p context will be one of the following: - - - - - - - - - - - - - - - - - - - - - -
\p Fl_Table::CONTEXT_STARTPAGEWhen table, or parts of the table, are about to be redrawn.
- Use to initialize static data, such as font selections.

- R/C will be zero,
- X/Y/W/H will be the dimensions of the table's entire data area.
- (Useful for locking a database before accessing; see - also visible_cells())

\p Fl_Table::CONTEXT_ENDPAGEWhen table has completed being redrawn.
- R/C will be zero, X/Y/W/H dimensions of table's data area.
- (Useful for unlocking a database after accessing)
\p Fl_Table::CONTEXT_ROW_HEADERWhenever a row header cell needs to be drawn.
- R will be the row number of the header being redrawn,
- C will be zero,
- X/Y/W/H will be the fltk drawing area of the row header in the window
\p Fl_Table::CONTEXT_COL_HEADERWhenever a column header cell needs to be drawn.
- R will be zero,
- C will be the column number of the header being redrawn,
- X/Y/W/H will be the fltk drawing area of the column header in the window
\p Fl_Table::CONTEXT_CELLWhenever a data cell in the table needs to be drawn.
- R/C will be the row/column of the cell to be drawn,
- X/Y/W/H will be the fltk drawing area of the cell in the window
\p Fl_Table::CONTEXT_RC_RESIZEWhenever table or row/column is resized or scrolled, - either interactively or via col_width() or row_height().
- R/C/X/Y/W/H will all be zero. -

- Useful for fltk containers that need to resize or move - the child fltk widgets.

- - \p row and \p col will be set to the row and column number - of the cell being drawn. In the case of row headers, \p col will be \a 0. - In the case of column headers, \p row will be \a 0. - - x/y/w/h will be the position and dimensions of where the cell - should be drawn. - - In the case of custom widgets, a minimal draw_cell() override might - look like the following. With custom widgets it is up to the caller to handle - drawing everything within the dimensions of the cell, including handling the - selection color. Note all clipping must be handled as well; this allows drawing - outside the dimensions of the cell if so desired for 'custom effects'. - - \code - // This is called whenever Fl_Table wants you to draw a cell - void MyTable::draw_cell(TableContext context, int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0) { - static char s[40]; - sprintf(s, "%d/%d", R, C); // text for each cell - switch ( context ) { - case CONTEXT_STARTPAGE: // Fl_Table telling us it's starting to draw page - fl_font(FL_HELVETICA, 16); - return; - - case CONTEXT_ROW_HEADER: // Fl_Table telling us to draw row/col headers - case CONTEXT_COL_HEADER: - fl_push_clip(X, Y, W, H); - { - fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, color()); - fl_color(FL_BLACK); - fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER); - } - fl_pop_clip(); - return; - - case CONTEXT_CELL: // Fl_Table telling us to draw cells - fl_push_clip(X, Y, W, H); - { - // BG COLOR - fl_color( row_selected(R) ? selection_color() : FL_WHITE); - fl_rectf(X, Y, W, H); - - // TEXT - fl_color(FL_BLACK); - fl_draw(s, X, Y, W, H, FL_ALIGN_CENTER); - - // BORDER - fl_color(FL_LIGHT2); - fl_rect(X, Y, W, H); - } - fl_pop_clip(); - return; - - default: - return; - } - //NOTREACHED - } - \endcode - */ - virtual void draw_cell(TableContext context, int R=0, int C=0, - int X=0, int Y=0, int W=0, int H=0) - { } // overridden by deriving class - - long row_scroll_position(int row); // find scroll position of row (in pixels) - long col_scroll_position(int col); // find scroll position of col (in pixels) - - int is_fltk_container() { // does table contain fltk widgets? - return( Fl_Group::children() > 3 ); // (ie. more than box and 2 scrollbars?) - } - - static void scroll_cb(Fl_Widget*,void*); // h/v scrollbar callback - - void damage_zone(int r1, int c1, int r2, int c2, int r3 = 0, int c3 = 0); - - void redraw_range(int topRow, int botRow, int leftCol, int rightCol) { - if ( _redraw_toprow == -1 ) { - // Initialize redraw range - _redraw_toprow = topRow; - _redraw_botrow = botRow; - _redraw_leftcol = leftCol; - _redraw_rightcol = rightCol; - } else { - // Extend redraw range - if ( topRow < _redraw_toprow ) _redraw_toprow = topRow; - if ( botRow > _redraw_botrow ) _redraw_botrow = botRow; - if ( leftCol < _redraw_leftcol ) _redraw_leftcol = leftCol; - if ( rightCol > _redraw_rightcol ) _redraw_rightcol = rightCol; - } - - // Indicate partial redraw needed of some cells - damage(FL_DAMAGE_CHILD); - } - -public: - /** - The constructor for the Fl_Table. - This creates an empty table with no rows or columns, - with headers and row/column resize behavior disabled. - */ - Fl_Table(int X, int Y, int W, int H, const char *l=0); - - /** - The destructor for the Fl_Table. - Destroys the table and its associated widgets. - */ - ~Fl_Table(); - - /** - Clears the table to zero rows (rows(0)), zero columns (cols(0)), and clears - any widgets (table->clear()) that were added with begin()/end() or add()/insert()/etc. - \see rows(int), cols(int) - */ - virtual void clear() { rows(0); cols(0); table->clear(); } - - // \todo: add topline(), middleline(), bottomline() - - /** - Sets the kind of box drawn around the data table, - the default being FL_NO_BOX. Changing this value will cause the table - to redraw. - */ - inline void table_box(Fl_Boxtype val) { - table->box(val); - table_resized(); - } - - /** - Returns the current box type used for the data table. - */ - inline Fl_Boxtype table_box( void ) { - return(table->box()); - } - - /** - Sets the number of rows in the table, and the table is redrawn. - */ - virtual void rows(int val); // set/get number of rows - - /** - Returns the number of rows in the table. - */ - inline int rows() { - return(_rows); - } - - /** - Set the number of columns in the table and redraw. - */ - virtual void cols(int val); // set/get number of columns - - /** - Get the number of columns in the table. - */ - inline int cols() { - return(_cols); - } - - /** - Returns the range of row and column numbers for all visible - and partially visible cells in the table. - - These values can be used e.g. by your draw_cell() routine during - CONTEXT_STARTPAGE to figure out what cells are about to be redrawn - for the purposes of locking the data from a database before it's drawn. - - \code - leftcol rightcol - : : - toprow .. .-------------------. - | | - | V I S I B L E | - | | - | T A B L E | - | | - botrow .. '-------------------` - \endcode - - e.g. in a table where the visible rows are 5-20, and the - visible columns are 100-120, then those variables would be: - - - toprow = 5 - - botrow = 20 - - leftcol = 100 - - rightcol = 120 - */ - inline void visible_cells(int& r1, int& r2, int& c1, int& c2) { - r1 = toprow; - r2 = botrow; - c1 = leftcol; - c2 = rightcol; - } - - /** - Returns 1 if someone is interactively resizing a row or column. - You can currently call this only from within your callback(). - */ - int is_interactive_resize() { - return(_resizing_row != -1 || _resizing_col != -1); - } - - /** - Returns if row resizing by the user is allowed. - */ - inline int row_resize() { - return(_row_resize); - } - - /** - Allows/disallows row resizing by the user. - 1=allow interactive resizing, 0=disallow interactive resizing. - Since interactive resizing is done via the row headers, - row_header() must also be enabled to allow resizing. - */ - void row_resize(int flag) { // enable row resizing - _row_resize = flag; - } - - /** - Returns if column resizing by the user is allowed. - */ - inline int col_resize() { - return(_col_resize); - } - /** - Allows/disallows column resizing by the user. - 1=allow interactive resizing, 0=disallow interactive resizing. - Since interactive resizing is done via the column headers, - \p col_header() must also be enabled to allow resizing. - */ - void col_resize(int flag) { // enable col resizing - _col_resize = flag; - } - - /** - Returns the current column minimum resize value. - */ - inline int col_resize_min() { // column minimum resizing width - return(_col_resize_min); - } - - /** - Sets the current column minimum resize value. - This is used to prevent the user from interactively resizing - any column to be smaller than 'pixels'. Must be a value >=1. - */ - void col_resize_min(int val) { - _col_resize_min = ( val < 1 ) ? 1 : val; - } - - /** - Returns the current row minimum resize value. - */ - inline int row_resize_min() { // column minimum resizing width - return(_row_resize_min); - } - - /** - Sets the current row minimum resize value. - This is used to prevent the user from interactively resizing - any row to be smaller than 'pixels'. Must be a value >=1. - */ - void row_resize_min(int val) { - _row_resize_min = ( val < 1 ) ? 1 : val; - } - - /** - Returns if row headers are enabled or not. - */ - inline int row_header() { // set/get row header enable flag - return(_row_header); - } - - /** - Enables/disables showing the row headers. 1=enabled, 0=disabled. - If changed, the table is redrawn. - */ - void row_header(int flag) { - _row_header = flag; - table_resized(); - redraw(); - } - - /** - Returns if column headers are enabled or not. - */ - inline int col_header() { // set/get col header enable flag - return(_col_header); - } - - /** - Enable or disable column headers. - If changed, the table is redrawn. - */ - void col_header(int flag) { - _col_header = flag; - table_resized(); - redraw(); - } - - /** - Sets the height in pixels for column headers and redraws the table. - */ - inline void col_header_height(int height) { // set/get col header height - _col_header_h = height; - table_resized(); - redraw(); - } - - /** - Gets the column header height. - */ - inline int col_header_height() { - return(_col_header_h); - } - - /** - Sets the row header width to n and causes the screen to redraw. - */ - inline void row_header_width(int width) { // set/get row header width - _row_header_w = width; - table_resized(); - redraw(); - } - - /** - Returns the current row header width (in pixels). - */ - inline int row_header_width() { - return(_row_header_w); - } - - /** - Sets the row header color and causes the screen to redraw. - */ - inline void row_header_color(Fl_Color val) { // set/get row header color - _row_header_color = val; - redraw(); - } - - /** - Returns the current row header color. - */ - inline Fl_Color row_header_color() { - return(_row_header_color); - } - - /** - Sets the color for column headers and redraws the table. - */ - inline void col_header_color(Fl_Color val) { // set/get col header color - _col_header_color = val; - redraw(); - } - - /** - Gets the color for column headers. - */ - inline Fl_Color col_header_color() { - return(_col_header_color); - } - - /** - Sets the height of the specified row in pixels, - and the table is redrawn. - callback() will be invoked with CONTEXT_RC_RESIZE - if the row's height was actually changed, and when() is FL_WHEN_CHANGED. - */ - void row_height(int row, int height); // set/get row height - - /** - Returns the current height of the specified row as a value in pixels. - */ - inline int row_height(int row) { - return((row<0 || row>=(int)_rowheights.size()) ? 0 : _rowheights[row]); - } - - /** - Sets the width of the specified column in pixels, and the table is redrawn. - callback() will be invoked with CONTEXT_RC_RESIZE - if the column's width was actually changed, and when() is FL_WHEN_CHANGED. - */ - void col_width(int col, int width); // set/get a column's width - - /** - Returns the current width of the specified column in pixels. - */ - inline int col_width(int col) { - return((col<0 || col>=(int)_colwidths.size()) ? 0 : _colwidths[col]); - } - - /** - Convenience method to set the height of all rows to the - same value, in pixels. The screen is redrawn. - */ - void row_height_all(int height) { // set all row/col heights - for ( int r=0; rinit_sizes(); - table->redraw(); - } - void add(Fl_Widget& wgt) { - table->add(wgt); - if ( table->children() > 2 ) { - table->show(); - } else { - table->hide(); - } - } - void add(Fl_Widget* wgt) { - add(*wgt); - } - void insert(Fl_Widget& wgt, int n) { - table->insert(wgt,n); - } - void insert(Fl_Widget& wgt, Fl_Widget* w2) { - table->insert(wgt,w2); - } - void remove(Fl_Widget& wgt) { - table->remove(wgt); - } - void begin() { - table->begin(); - } - void end() { - table->end(); - // HACK: Avoid showing Fl_Scroll; seems to erase screen - // causing unnecessary flicker, even if its box() is FL_NO_BOX. - // - if ( table->children() > 2 ) { - table->show(); - } else { - table->hide(); - } - Fl_Group::current(Fl_Group::parent()); - } - Fl_Widget * const *array() { - return(table->array()); - } - - /** - Returns the child widget by an index. - - When using the Fl_Table as a container for FLTK widgets, this method returns - the widget pointer from the internal array of widgets in the container. - - Typically used in loops, eg: - \code - for ( int i=0; ichild(n)); - } - - /** - Returns the number of children in the table. - - When using the Fl_Table as a container for FLTK widgets, this method returns - how many child widgets the table has. - - \see child(int) - */ - int children() const { - return(table->children()-2); // -2: skip Fl_Scroll's h/v scrollbar widgets - } - int find(const Fl_Widget *wgt) const { - return(table->find(wgt)); - } - int find(const Fl_Widget &wgt) const { - return(table->find(wgt)); - } - // CALLBACKS - - /** - * Returns the current row the event occurred on. - * - * This function should only be used from within the user's callback function. - */ - int callback_row() { - return(_callback_row); - } - - /** - * Returns the current column the event occurred on. - * - * This function should only be used from within the user's callback function. - */ - int callback_col() { - return(_callback_col); - } - - /** - * Returns the current 'table context'. - * - * This function should only be used from within the user's callback function. - */ - TableContext callback_context() { - return(_callback_context); - } - - void do_callback(TableContext context, int row, int col) { - _callback_context = context; - _callback_row = row; - _callback_col = col; - Fl_Widget::do_callback(); - } - -#ifdef FL_DOXYGEN - /** - The Fl_Widget::when() function is used to set a group of flags, determining - when the widget callback is called: - - - - - - - - - -
\p FL_WHEN_CHANGED - callback() will be called when rows or columns are resized (interactively or - via col_width() or row_height()), passing CONTEXT_RC_RESIZE via - callback_context(). -
\p FL_WHEN_RELEASE - callback() will be called during FL_RELEASE events, such as when someone - releases a mouse button somewhere on the table. -
- - The callback() routine is sent a TableContext that indicates the context the - event occurred in, such as in a cell, in a header, or elsewhere on the table. - When an event occurs in a cell or header, callback_row() and - callback_col() can be used to determine the row and column. The callback - can also look at the regular fltk event values (ie. Fl::event() and - Fl::event_button()) to determine what kind of event is occurring. - */ - void when(Fl_When flags); -#endif - -#ifdef FL_DOXYGEN - /** - Callbacks will be called depending on the setting of Fl_Widget::when(). - - Callback functions should use the following functions to determine the - context/row/column: - - - Fl_Table::callback_row() returns current row - - Fl_Table::callback_col() returns current column - - Fl_Table::callback_context() returns current table context - - callback_row() and callback_col() will be set to the row and column number the - event occurred on. If someone clicked on a row header, \p col will be \a 0. - If someone clicked on a column header, \p row will be \a 0. - - callback_context() will return one of the following: - - - - - - - - - - - - - - -
Fl_Table::CONTEXT_ROW_HEADERSomeone clicked on a row header. Excludes resizing.
Fl_Table::CONTEXT_COL_HEADERSomeone clicked on a column header. Excludes resizing.
Fl_Table::CONTEXT_CELL - Someone clicked on a cell. - - To receive callbacks for FL_RELEASE events, you must set - when(FL_WHEN_RELEASE). -
Fl_Table::CONTEXT_RC_RESIZE - Someone is resizing rows/columns either interactively, - or via the col_width() or row_height() API. - - Use is_interactive_resize() - to determine interactive resizing. - - If resizing a column, R=0 and C=column being resized. - - If resizing a row, C=0 and R=row being resized. - - NOTE: To receive resize events, you must set when(FL_WHEN_CHANGED). -
- - \code - class MyTable : public Fl_Table { - [..] - private: - // Handle events that happen on the table - void event_callback2() { - int R = callback_row(), // row where event occurred - C = callback_col(); // column where event occurred - TableContext context = callback_context(); // which part of table - fprintf(stderr, "callback: Row=%d Col=%d Context=%d Event=%d\n", - R, C, (int)context, (int)Fl::event()); - } - - // Actual static callback - static void event_callback(Fl_Widget*, void* data) { - MyTable *o = (MyTable*)data; - o->event_callback2(); - } - - public: - // Constructor - MyTable() { - [..] - table.callback(&event_callback, (void*)this); // setup callback - table.when(FL_WHEN_CHANGED|FL_WHEN_RELEASE); // when to call it - } - }; - \endcode - */ - void callback(Fl_Widget*, void*); -#endif - -#if FLTK_ABI_VERSION >= 10301 - // NEW - /** - Gets the current size of the scrollbars' troughs, in pixels. - - If this value is zero (default), this widget will use the - Fl::scrollbar_size() value as the scrollbar's width. - - \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used. - \see Fl::scrollbar_size(int) - */ - int scrollbar_size() const { - return(_scrollbar_size); - } - /** - Sets the pixel size of the scrollbars' troughs to \p newSize, in pixels. - - Normally you should not need this method, and should use - Fl::scrollbar_size(int) instead to manage the size of ALL your - widgets' scrollbars. This ensures your application has a consistent - UI, is the default behavior, and is normally what you want. - - Only use THIS method if you really need to override the global - scrollbar size. The need for this should be rare. - - Setting \p newSize to the special value of 0 causes the widget to - track the global Fl::scrollbar_size(), which is the default. - - \param[in] newSize Sets the scrollbar size in pixels.\n - If 0 (default), scrollbar size tracks the global Fl::scrollbar_size() - \see Fl::scrollbar_size() - */ - void scrollbar_size(int newSize) { - if ( newSize != _scrollbar_size ) redraw(); - _scrollbar_size = newSize; - } -#endif -#if FLTK_ABI_VERSION >= 10303 - /** - Flag to control if Tab navigates table cells or not. - - If on, Tab key navigates table cells. - If off, Tab key navigates fltk widget focus. (default) - - As of fltk 1.3, the default behavior of the Tab key is to navigate focus off - of the current widget, and on to the next one. But in some applications, - it's useful for Tab to be used to navigate cells in the Fl_Table. - - \param [in] val If \p val is 1, Tab key navigates cells in table, not fltk widgets.
- If \p val is 0, Tab key will advance focus to the next fltk widget (default), and does not navigate cells in table. - */ - void tab_cell_nav(int val) { - if ( val ) flags_ |= TABCELLNAV; - else flags_ &= ~TABCELLNAV; - } - - /** - Get state of table's 'Tab' key cell navigation flag. - - \returns 1 if Tab configured to navigate cells in table
0 to navigate widget focus (default) - - \see tab_cell_nav(int) - */ - int tab_cell_nav() const { - return(flags_ & TABCELLNAV ? 1 : 0); - } -#endif -}; - -#endif /*_FL_TABLE_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Table_Row.H b/msvc/fltk/include/FL/Fl_Table_Row.H deleted file mode 100644 index 891c5852..00000000 --- a/msvc/fltk/include/FL/Fl_Table_Row.H +++ /dev/null @@ -1,201 +0,0 @@ -// -// "$Id$" -// - -#ifndef _FL_TABLE_ROW_H -#define _FL_TABLE_ROW_H - -// -// Fl_Table_Row -- A row oriented table widget -// -// A class specializing in a table of rows. -// Handles row-specific selection behavior. -// -// Copyright 2002 by Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems to "erco at seriss dot com". -// - -#include "Fl_Table.H" - -/** - A table with row selection capabilities. - - This class implements a simple table with the ability to select - rows. This widget is similar to an Fl_Browser with columns. Most - methods of importance will be found in the Fl_Table widget, such - as Fl_Table::rows() and Fl_Table::cols(). - - To be useful it must be subclassed and at minimum the draw_cell() - method must be overridden to provide the content of the cells. This widget - does \em not manage the cell's data content; it is up to the parent - class's draw_cell() method override to provide this. - - Events on the cells and/or headings generate callbacks when they are - clicked by the user. You control when events are generated based on - the values you supply for Fl_Table::when(). - */ -class FL_EXPORT Fl_Table_Row : public Fl_Table { -public: - enum TableRowSelectMode { - SELECT_NONE, // no selection allowed - SELECT_SINGLE, // single row selection - SELECT_MULTI // multiple row selection (default) - }; -private: - // An STL-ish vector without templates - class FL_EXPORT CharVector { - char *arr; - int _size; - void init() { - arr = NULL; - _size = 0; - } - void copy(char *newarr, int newsize) { - size(newsize); - memcpy(arr, newarr, newsize * sizeof(char)); - } - public: - CharVector() { // CTOR - init(); - } - ~CharVector() { // DTOR - if ( arr ) free(arr); - arr = NULL; - } - CharVector(CharVector&o) { // COPY CTOR - init(); - copy(o.arr, o._size); - } - CharVector& operator=(CharVector&o) { // ASSIGN - init(); - copy(o.arr, o._size); - return(*this); - } - char operator[](int x) const { - return(arr[x]); - } - char& operator[](int x) { - return(arr[x]); - } - int size() { - return(_size); - } - void size(int count) { - if ( count != _size ) { - arr = (char*)realloc(arr, count * sizeof(char)); - _size = count; - } - } - char pop_back() { - char tmp = arr[_size-1]; - _size--; - return(tmp); - } - void push_back(char val) { - int x = _size; - size(_size+1); - arr[x] = val; - } - char back() { - return(arr[_size-1]); - } - }; - CharVector _rowselect; // selection flag for each row - - // handle() state variables. - // Put here instead of local statics in handle(), so more - // than one instance can exist without crosstalk between. - // - int _dragging_select; // dragging out a selection? - int _last_row; - int _last_y; // last event's Y position - int _last_push_x; // last PUSH event's X position - int _last_push_y; // last PUSH event's Y position - - TableRowSelectMode _selectmode; - -protected: - int handle(int event); - int find_cell(TableContext context, // find cell's x/y/w/h given r/c - int R, int C, int &X, int &Y, int &W, int &H) { - return(Fl_Table::find_cell(context, R, C, X, Y, W, H)); - } - -public: - /** - The constructor for the Fl_Table_Row. - This creates an empty table with no rows or columns, - with headers and row/column resize behavior disabled. - */ - Fl_Table_Row(int X, int Y, int W, int H, const char *l=0) : Fl_Table(X,Y,W,H,l) { - _dragging_select = 0; - _last_row = -1; - _last_y = -1; - _last_push_x = -1; - _last_push_y = -1; - _selectmode = SELECT_MULTI; - } - - /** - The destructor for the Fl_Table_Row. - Destroys the table and its associated widgets. - */ - ~Fl_Table_Row() { } - - void rows(int val); // set number of rows - int rows() { // get number of rows - return(Fl_Table::rows()); - } - - /** - Sets the table selection mode. - - - \p Fl_Table_Row::SELECT_NONE - No selection allowed - - \p Fl_Table_Row::SELECT_SINGLE - Only single rows can be selected - - \p Fl_Table_Row::SELECT_MULTI - Multiple rows can be selected - */ - void type(TableRowSelectMode val); // set selection mode - - TableRowSelectMode type() const { // get selection mode - return(_selectmode); - } - - /** - Checks to see if 'row' is selected. Returns 1 if selected, 0 if not. You can - change the selection of a row by clicking on it, or by using - select_row(row, flag) - */ - int row_selected(int row); // is row selected? (0=no, 1=yes, -1=range err) - - /** - Changes the selection state for 'row', depending on the value - of 'flag'. 0=deselected, 1=select, 2=toggle existing state. - */ - int select_row(int row, int flag=1); // select state for row: flag:0=off, 1=on, 2=toggle - // returns: 0=no change, 1=changed, -1=range err - - /** - This convenience function changes the selection state - for \em all rows based on 'flag'. 0=deselect, 1=select, 2=toggle existing state. - */ - void select_all_rows(int flag=1); // all rows to a known state - - void clear() { - rows(0); // implies clearing selection - cols(0); - Fl_Table::clear(); // clear the table - } -}; - -#endif /*_FL_TABLE_ROW_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tabs.H b/msvc/fltk/include/FL/Fl_Tabs.H deleted file mode 100644 index 756b550c..00000000 --- a/msvc/fltk/include/FL/Fl_Tabs.H +++ /dev/null @@ -1,246 +0,0 @@ -// -// "$Id$" -// -// Tab header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Tabs widget . */ - -#ifndef Fl_Tabs_H -#define Fl_Tabs_H - -#include "Fl_Group.H" - -/** - The Fl_Tabs widget is the "file card tabs" - interface that allows you to put lots and lots of buttons and - switches in a panel, as popularized by many toolkits. - - \image html tabs.png - \image latex tabs.png "Fl_Tabs" width=8cm - - Clicking the tab makes a child visible() by calling - show() on it, and all other children are made invisible - by calling hide() on them. Usually the children are Fl_Group widgets - containing several widgets themselves. - - Each child makes a card, and its label() is printed - on the card tab, including the label font and style. The - selection color of that child is used to color the tab, while - the color of the child determines the background color of the pane. - - The size of the tabs is controlled by the bounding box of the - children (there should be some space between the children and - the edge of the Fl_Tabs), and the tabs may be placed - "inverted" on the bottom - this is determined by which - gap is larger. It is easiest to lay this out in fluid, using the - fluid browser to select each child group and resize them until - the tabs look the way you want them to. - - The background area behind and to the right of the tabs is - "transparent", exposing the background detail of the parent. The - value of Fl_Tabs::box() does not affect this area. So if Fl_Tabs is - resized by itself without the parent, force the appropriate parent - (visible behind the tabs) to redraw() to prevent artifacts. - - See "Resizing Caveats" below on how to keep tab heights constant. - See "Callback's Use Of when()" on how to control the details - of how clicks invoke the callback(). - - A typical use of the Fl_Tabs widget: - - \par - \code - // Typical use of Fl_Tabs - Fl_Tabs *tabs = new Fl_Tabs(10,10,300,200); - { - Fl_Group *grp1 = new Fl_Group(20,30,280,170,"Tab1"); - { - ..widgets that go in tab#1.. - } - grp1->end(); - Fl_Group *grp2 = new Fl_Group(20,30,280,170,"Tab2"); - { - ..widgets that go in tab#2.. - } - grp2->end(); - } - tabs->end(); - \endcode - - \b Default \b Appearance - - The appearance of each "tab" is taken from the label() and color() of the - child group corresponding to that "tab" and panel. Where the "tabs" appear - depends on the position and size of the child groups that make up the - panels within the Fl_Tab, i.e. whether there is more space above or - below them. The height of the "tabs" depends on how much free space - is available. - - \image html tabs_default.png "Fl_Tabs Default Appearance" - \image latex tabs_default.png "Fl_Tabs Default Appearance" width=8cm - - \b Highlighting \b The \b Selected \b Tab - - The selected "tab" can be highlighted further by setting the - selection_color() of the Fl_Tab itself, e.g. - - \par - \code - .. - tabs = new Fl_Tabs(..); - tabs->selection_color(FL_DARK3); - .. - \endcode - - The result of the above looks like: - \image html tabs_selection.png "Highlighting the selected tab" - \image latex tabs_selection.png "Highlighting the selected tab" width=8cm - - \b Uniform \b Tab \b and \b Panel \b Appearance - - In order to have uniform tab and panel appearance, not only must the color() - and selection_color() for each child group be set, but also the - selection_color() of the Fl_Tab itself any time a new "tab" is selected. - This can be achieved within the Fl_Tab callback, e.g. - - \par - \code - void MyTabCallback(Fl_Widget *w, void*) { - Fl_Tabs *tabs = (Fl_Tabs*)w; - // When tab changed, make sure it has same color as its group - tabs->selection_color( (tab->value())->color() ); - } - .. - int main(..) { - // Define tabs widget - tabs = new Fl_Tabs(..); - tabs->callback(MyTabCallback); - - // Create three tabs each colored differently - grp1 = new Fl_Group(.. "One"); - grp1->color(9); - grp1->selection_color(9); - grp1->end(); - - grp2 = new Fl_Group(.. "Two"); - grp2->color(10); - grp2->selection_color(10); - grp2->end(); - - grp3 = new Fl_Group(.. "Three"); - grp3->color(14); - grp3->selection_color(14); - grp3->end(); - .. - // Make sure default tab has same color as its group - tabs->selection_color( (tab->value())->color() ); - .. - return Fl::run(); - } - \endcode - - The result of the above looks like: - \image html tabs_uniform.png "Fl_Tabs with uniform colors" - \image latex tabs_uniform.png "Fl_Tabs with uniform colors" width=8cm - - \b Resizing \b Caveats - - When Fl_Tabs is resized vertically, the default behavior scales the - tab's height as well as its children. To keep the tab height constant - during resizing, set the tab widget's resizable() to one of the tab's - child groups, i.e. - - \par - \code - tabs = new Fl_Tabs(..); - grp1 = new Fl_Group(..); - .. - grp2 = new Fl_Group(..); - .. - tabs->end(); - tabs->resizable(grp1); // keeps tab height constant - \endcode - - \par Callback's Use Of when() - - As of FLTK 1.3.3, Fl_Tabs() supports the following flags for when(): - - - \ref FL_WHEN_NEVER -- callback never invoked (all flags off) - - \ref FL_WHEN_CHANGED -- if flag set, invokes callback when a tab has been changed (on click or keyboard navigation) - - \ref FL_WHEN_NOT_CHANGED -- if flag set, invokes callback when the tabs remain unchanged (on click or keyboard navigation) - - \ref FL_WHEN_RELEASE -- if flag set, invokes callback on RELEASE of mouse button or keyboard navigation - - Notes: - - -# The above flags can be logically OR-ed (|) or added (+) to combine behaviors. - -# The default value for when() is \ref FL_WHEN_RELEASE (inherited from Fl_Widget). - -# If \ref FL_WHEN_RELEASE is the \em only flag specified, - the behavior will be as if (\ref FL_WHEN_RELEASE|\ref FL_WHEN_CHANGED) was specified. - -# The value of changed() will be valid during the callback. - -# If both \ref FL_WHEN_CHANGED and \ref FL_WHEN_NOT_CHANGED are specified, - the callback is invoked whether the tab has been changed or not. - The changed() method can be used to determine the cause. - -# \ref FL_WHEN_NOT_CHANGED can happen if someone clicks on an already selected tab, - or if a keyboard navigation attempt results in no change to the tabs, - such as using the arrow keys while at the left or right end of the tabs. -*/ -class FL_EXPORT Fl_Tabs : public Fl_Group { -#if FLTK_ABI_VERSION >= 10304 - // NEW (nothing) -#else - // OLD (maintained for ABI compat) - Fl_Widget *value_; // NOTE: this member no longer used -- STR #3169 -#endif - Fl_Widget *push_; - int *tab_pos; // array of x-offsets of tabs per child + 1 - int *tab_width; // array of widths of tabs per child + 1 - int tab_count; // array size - int tab_positions(); // allocate and calculate tab positions - void clear_tab_positions(); - int tab_height(); - void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0); -protected: - void redraw_tabs(); - void draw(); - -public: - int handle(int); - Fl_Widget *value(); - int value(Fl_Widget *); - /** - Returns the tab group for the tab the user has currently down-clicked on - and remains over until FL_RELEASE. Otherwise, returns NULL. - - While the user is down-clicked on a tab, the return value is the tab group - for that tab. But as soon as the user releases, or drags off the tab with - the button still down, the return value will be NULL. - - \see push(Fl_Widget*). - */ - Fl_Widget *push() const {return push_;} - int push(Fl_Widget *); - Fl_Tabs(int,int,int,int,const char * = 0); - Fl_Widget *which(int event_x, int event_y); - ~Fl_Tabs(); - void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Text_Buffer.H b/msvc/fltk/include/FL/Fl_Text_Buffer.H deleted file mode 100644 index 4c6cf31a..00000000 --- a/msvc/fltk/include/FL/Fl_Text_Buffer.H +++ /dev/null @@ -1,805 +0,0 @@ -// -// "$Id$" -// -// Header file for Fl_Text_Buffer class. -// -// Copyright 2001-2016 by Bill Spitzak and others. -// Original code Copyright Mark Edel. Permission to distribute under -// the LGPL for the FLTK library granted by Mark Edel. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Text_Buffer, Fl_Text_Selection widget . */ - -#ifndef FL_TEXT_BUFFER_H -#define FL_TEXT_BUFFER_H - - -#undef ASSERT_UTF8 - -#ifdef ASSERT_UTF8 -# include -# define IS_UTF8_ALIGNED(a) if (a && *a) assert(fl_utf8len(*(a))>0); -# define IS_UTF8_ALIGNED2(a, b) if (b>=0 && blength()) assert(fl_utf8len(a->byte_at(b))>0); -#else -# define IS_UTF8_ALIGNED(a) -# define IS_UTF8_ALIGNED2(a, b) -#endif - - -/* - "character size" is the size of a UTF-8 character in bytes - "character width" is the width of a Unicode character in pixels - "column" was orginally defined as a character offset from the left margin. - It was identical to the byte offset. In UTF-8, we have neither a byte offset - nor truly fixed width fonts (*). Column could be a pixel value multiplied with - an average character width (which is a bearable approximation). - - * in Unicode, there are no fixed width fonts! Even if the ASCII characters may - happen to be all the same width in pixels, Chinese characters surely are not. - There are plenty of exceptions, like ligatures, that make special handling of - "fixed" character widths a nightmare. I decided to remove all references to - fixed fonts and see "columns" as a multiple of the average width of a - character in the main font. - - Matthias - */ - - -/* Maximum length in characters of a tab or control character expansion - of a single buffer character */ -#define FL_TEXT_MAX_EXP_CHAR_LEN 20 - -#include "Fl_Export.H" - - -/** - \class Fl_Text_Selection - \brief This is an internal class for Fl_Text_Buffer to manage text selections. - This class works correctly with UTF-8 strings assuming that the parameters - for all calls are on character boundaries. - */ -class FL_EXPORT Fl_Text_Selection { - friend class Fl_Text_Buffer; - -public: - - /** - \brief Set the selection range. - \param start byte offset to first selected character - \param end byte offset pointing after last selected character - */ - void set(int start, int end); - - /** - \brief Updates a selection after text was modified. - - Updates an individual selection for changes in the corresponding text - \param pos byte offset into text buffer at which the change occurred - \param nDeleted number of bytes deleted from the buffer - \param nInserted number of bytes inserted into the buffer - */ - void update(int pos, int nDeleted, int nInserted); - - /** - \brief Return the byte offset to the first selected character. - \return byte offset - */ - int start() const { return mStart; } - - /** - \brief Return the byte offset to the character after the last selected character. - \return byte offset - */ - int end() const { return mEnd; } - - /** - \brief Returns true if any text is selected. - \return a non-zero number if any text has been selected, or 0 - if no text is selected. - */ - bool selected() const { return mSelected; } - - /** - \brief Modify the 'selected' flag. - \param b new flag - */ - void selected(bool b) { mSelected = b; } - - /** - Return true if position \p pos with indentation \p dispIndex is in - the Fl_Text_Selection. - */ - int includes(int pos) const; - - /** - \brief Return the positions of this selection. - \param start return byte offset to first selected character - \param end return byte offset pointing after last selected character - \return true if selected - */ - int position(int* start, int* end) const; - -protected: - - int mStart; ///< byte offset to the first selected character - int mEnd; ///< byte offset to the character after the last selected character - bool mSelected; ///< this flag is set if any text is selected -}; - - -typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, - int nRestyled, const char* deletedText, - void* cbArg); - - -typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); - - -/** - \brief This class manages Unicode text displayed in one or more Fl_Text_Display widgets. - - All text in Fl_Text_Buffer must be encoded in UTF-8. All indices used in the - function calls must be aligned to the start of a UTF-8 sequence. All indices - and pointers returned will be aligned. All functions that return a single - character will return that in an unsiged int in UCS-4 encoding. - - The Fl_Text_Buffer class is used by the Fl_Text_Display - and Fl_Text_Editor to manage complex text data and is based upon the - excellent NEdit text editor engine - see http://www.nedit.org/. - */ -class FL_EXPORT Fl_Text_Buffer { -public: - - /** - Create an empty text buffer of a pre-determined size. - \param requestedSize use this to avoid unnecessary re-allocation - if you know exactly how much the buffer will need to hold - \param preferredGapSize Initial size for the buffer gap (empty space - in the buffer where text might be inserted - if the user is typing sequential characters) - */ - Fl_Text_Buffer(int requestedSize = 0, int preferredGapSize = 1024); - - /** - Frees a text buffer - */ - ~Fl_Text_Buffer(); - - /** - \brief Returns the number of bytes in the buffer. - \return size of text in bytes - */ - int length() const { return mLength; } - - /** - \brief Get a copy of the entire contents of the text buffer. - Memory is allocated to contain the returned string, which the caller - must free. - \return newly allocated text buffer - must be free'd, text is UTF-8 - */ - char* text() const; - - /** - Replaces the entire contents of the text buffer. - \param text Text must be valid UTF-8. If null, an empty string is substituted. - */ - void text(const char* text); - - /** - \brief Get a copy of a part of the text buffer. - Return a copy of the text between \p start and \p end character positions - from text buffer \p buf. Positions start at 0, and the range does not - include the character pointed to by \p end. - When you are done with the text, free it using the free() function. - \param start byte offset to first character - \param end byte offset after last character in range - \return newly allocated text buffer - must be free'd, text is UTF-8 - */ - char* text_range(int start, int end) const; - - /** - Returns the character at the specified position \p pos in the buffer. - Positions start at 0. - \param pos byte offset into buffer, \p pos must be at a UTF-8 character boundary - \return Unicode UCS-4 encoded character - */ - unsigned int char_at(int pos) const; - - /** - Returns the raw byte at the specified position pos in the buffer. - Positions start at 0. - \param pos byte offset into buffer - \return unencoded raw byte - */ - char byte_at(int pos) const; - - /** - Convert a byte offset in buffer into a memory address. - \param pos byte offset into buffer - \return byte offset converted to a memory address - */ - const char *address(int pos) const - { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } - - /** - Convert a byte offset in buffer into a memory address. - \param pos byte offset into buffer - \return byte offset converted to a memory address - */ - char *address(int pos) - { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } - - /** - Inserts null-terminated string \p text at position \p pos. - \param pos insertion position as byte offset (must be UTF-8 character aligned) - \param text UTF-8 encoded and nul terminated text - */ - void insert(int pos, const char* text); - - /** - Appends the text string to the end of the buffer. - \param t UTF-8 encoded and nul terminated text - */ - void append(const char* t) { insert(length(), t); } - - /** - Deletes a range of characters in the buffer. - \param start byte offset to first character to be removed - \param end byte offset to character after last character to be removed - */ - void remove(int start, int end); - - /** - Deletes the characters between \p start and \p end, and inserts the - null-terminated string \p text in their place in the buffer. - \param start byte offset to first character to be removed and new insert position - \param end byte offset to character after last character to be removed - \param text UTF-8 encoded and nul terminated text - */ - void replace(int start, int end, const char *text); - - /** - Copies text from another Fl_Text_Buffer to this one. - \param fromBuf source text buffer, may be the same as this - \param fromStart byte offset into buffer - \param fromEnd byte offset into buffer - \param toPos destination byte offset into buffer - */ - void copy(Fl_Text_Buffer* fromBuf, int fromStart, int fromEnd, int toPos); - - /** - Undo text modification according to the undo variables or insert text - from the undo buffer - */ - int undo(int *cp=0); - - /** - Lets the undo system know if we can undo changes - */ - void canUndo(char flag=1); - - /** - Inserts a file at the specified position. - Returns - - 0 on success - - non-zero on error (strerror() contains reason) - - 1 indicates open for read failed (no data loaded) - - 2 indicates error occurred while reading data (data was partially loaded) - - File can be UTF-8 or CP1252 encoded. - If the input file is not UTF-8 encoded, the Fl_Text_Buffer widget will - contain data transcoded to UTF-8. By default, the message - Fl_Text_Buffer::file_encoding_warning_message - will warn the user about this. - \see input_file_was_transcoded and transcoding_warning_action. - */ - int insertfile(const char *file, int pos, int buflen = 128*1024); - - /** - Appends the named file to the end of the buffer. See also insertfile(). - */ - int appendfile(const char *file, int buflen = 128*1024) - { return insertfile(file, length(), buflen); } - - /** - Loads a text file into the buffer. See also insertfile(). - */ - int loadfile(const char *file, int buflen = 128*1024) - { select(0, length()); remove_selection(); return appendfile(file, buflen); } - - /** - Writes the specified portions of the text buffer to a file. - Returns - - 0 on success - - non-zero on error (strerror() contains reason) - - 1 indicates open for write failed (no data saved) - - 2 indicates error occurred while writing data (data was partially saved) - - \see savefile(const char *file, int buflen) - */ - int outputfile(const char *file, int start, int end, int buflen = 128*1024); - - /** - Saves a text file from the current buffer. - Returns - - 0 on success - - non-zero on error (strerror() contains reason) - - 1 indicates open for write failed (no data saved) - - 2 indicates error occurred while writing data (data was partially saved) - - \see outputfile(const char *file, int start, int end, int buflen) - */ - int savefile(const char *file, int buflen = 128*1024) - { return outputfile(file, 0, length(), buflen); } - - /** - Gets the tab width. - - The tab width is measured in characters. The pixel position is - calculated using an average character width. - */ - int tab_distance() const { return mTabDist; } - - /** - Set the hardware tab distance (width) used by all displays for this buffer, - and used in computing offsets for rectangular selection operations. - */ - void tab_distance(int tabDist); - - /** - Selects a range of characters in the buffer. - */ - void select(int start, int end); - - /** - Returns a non-zero value if text has been selected, 0 otherwise. - */ - int selected() const { return mPrimary.selected(); } - - /** - Cancels any previous selection on the primary text selection object. - */ - void unselect(); - - /** - Gets the selection position. - */ - int selection_position(int* start, int* end); - - /** - Returns the currently selected text. - - When you are done with the text, free it using the free() function. - */ - char* selection_text(); - - /** - Removes the text in the primary selection. - */ - void remove_selection(); - - /** - Replaces the text in the primary selection. - */ - void replace_selection(const char* text); - - /** - Selects a range of characters in the secondary selection. - */ - void secondary_select(int start, int end); - - /** - Returns a non-zero value if text has been selected in the secondary - text selection, 0 otherwise. - */ - int secondary_selected() { return mSecondary.selected(); } - - /** - Clears any selection in the secondary text selection object. - */ - void secondary_unselect(); - - /** - Returns the current selection in the secondary text selection object. - */ - int secondary_selection_position(int* start, int* end); - - /** - Returns the text in the secondary selection. - - When you are done with the text, free it using the free() function. - */ - char* secondary_selection_text(); - - /** - Removes the text from the buffer corresponding to the secondary text - selection object. - */ - void remove_secondary_selection(); - - /** - Replaces the text from the buffer corresponding to the secondary - text selection object with the new string \p text. - */ - void replace_secondary_selection(const char* text); - - /** - Highlights the specified text within the buffer. - */ - void highlight(int start, int end); - - /** - Returns the highlighted text. - - When you are done with the text, free it using the free() function. - */ - int highlight() { return mHighlight.selected(); } - - /** - Unhighlights text in the buffer. - */ - void unhighlight(); - - /** - Highlights the specified text between \p start and \p end within the buffer. - */ - int highlight_position(int* start, int* end); - - /** - Returns the highlighted text. - - When you are done with the text, free it using the free() function. - */ - char* highlight_text(); - - /** - Adds a callback function that is called whenever the text buffer is modified. - - The callback function is declared as follows: - - \code - typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, - int nRestyled, const char* deletedText, - void* cbArg); - \endcode - */ - void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); - - /** - Removes a modify callback. - */ - void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); - - /** - Calls all modify callbacks that have been registered using - the add_modify_callback() method. - */ - void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } - - /** - Adds a callback routine to be called before text is deleted from the buffer. - */ - void add_predelete_callback(Fl_Text_Predelete_Cb bufPredelCB, void* cbArg); - - /** - Removes a callback routine \p bufPreDeleteCB associated with argument \p cbArg - to be called before text is deleted from the buffer. - */ - void remove_predelete_callback(Fl_Text_Predelete_Cb predelCB, void* cbArg); - - /** - Calls the stored pre-delete callback procedure(s) for this buffer to update - the changed area(s) on the screen and any other listeners. - */ - void call_predelete_callbacks() { call_predelete_callbacks(0, 0); } - - /** - Returns the text from the entire line containing the specified - character position. - - When you are done with the text, free it using the free() function. - \param pos byte index into buffer - \return copy of UTF-8 text, must be free'd - */ - char* line_text(int pos) const; - - /** - Returns the position of the start of the line containing position \p pos. - \param pos byte index into buffer - \return byte offset to line start - */ - int line_start(int pos) const; - - /** - Finds and returns the position of the end of the line containing position - \p pos (which is either a pointer to the newline character ending the line - or a pointer to one character beyond the end of the buffer). - \param pos byte index into buffer - \return byte offset to line end - */ - int line_end(int pos) const; - - /** - Returns the position corresponding to the start of the word. - \param pos byte index into buffer - \return byte offset to word start - */ - int word_start(int pos) const; - - /** - Returns the position corresponding to the end of the word. - \param pos byte index into buffer - \return byte offset to word end - */ - int word_end(int pos) const; - - /** - Count the number of displayed characters between buffer position - \p lineStartPos and \p targetPos. - - Displayed characters are the characters shown on the screen to represent - characters in the buffer, where tabs and control characters are expanded. - */ - int count_displayed_characters(int lineStartPos, int targetPos) const; - - /** - Count forward from buffer position \p startPos in displayed characters. - - Displayed characters are the characters shown on the screen to represent - characters in the buffer, where tabs and control characters are expanded. - \param lineStartPos byte offset into buffer - \param nChars number of bytes that are sent to the display - \return byte offset in input after all output bytes are sent - */ - int skip_displayed_characters(int lineStartPos, int nChars); - - /** - Counts the number of newlines between \p startPos and \p endPos in buffer. - The character at position \p endPos is not counted. - */ - int count_lines(int startPos, int endPos) const; - - /** - Finds the first character of the line \p nLines forward from \p startPos - in the buffer and returns its position. - */ - int skip_lines(int startPos, int nLines); - - /** - Finds and returns the position of the first character of the line \p nLines - backwards from \p startPos (not counting the character pointed to by - \p startpos if that is a newline) in the buffer. - \p nLines == 0 means find the beginning of the line. - */ - int rewind_lines(int startPos, int nLines); - - /** - Finds the next occurrence of the specified character. - Search forwards in buffer for character \p searchChar, starting - with the character \p startPos, and returning the result in \p foundPos. - Returns 1 if found, 0 if not. - The difference between this and search_forward() is that it's optimized - for single characters. The overall performance of the text widget is - dependent on its ability to count lines quickly, hence searching for a - single character: newline. - \param startPos byte offset to start position - \param searchChar UCS-4 character that we want to find - \param foundPos byte offset where the character was found - \return 1 if found, 0 if not - */ - int findchar_forward(int startPos, unsigned searchChar, int* foundPos) const; - - /** - Search backwards in buffer \p buf for character \p searchChar, starting - with the character \e before \p startPos, returning the result in \p foundPos. - - Returns 1 if found, 0 if not. The difference between this and - search_backward() is that it's optimized for single characters. The - overall performance of the text widget is dependent on its ability to - count lines quickly, hence searching for a single character: newline. - \param startPos byte offset to start position - \param searchChar UCS-4 character that we want to find - \param foundPos byte offset where the character was found - \return 1 if found, 0 if not - */ - int findchar_backward(int startPos, unsigned int searchChar, int* foundPos) const; - - /** - Search forwards in buffer for string \p searchString, starting with the - character \p startPos, and returning the result in \p foundPos. - - Returns 1 if found, 0 if not. - \param startPos byte offset to start position - \param searchString UTF-8 string that we want to find - \param foundPos byte offset where the string was found - \param matchCase if set, match character case - \return 1 if found, 0 if not - */ - int search_forward(int startPos, const char* searchString, int* foundPos, - int matchCase = 0) const; - - /** - Search backwards in buffer for string \p searchString, starting with - the character \e at \p startPos, returning the result in \p foundPos. - - Returns 1 if found, 0 if not. - \param startPos byte offset to start position - \param searchString UTF-8 string that we want to find - \param foundPos byte offset where the string was found - \param matchCase if set, match character case - \return 1 if found, 0 if not - */ - int search_backward(int startPos, const char* searchString, int* foundPos, - int matchCase = 0) const; - - /** - Returns the primary selection. - */ - const Fl_Text_Selection* primary_selection() const { return &mPrimary; } - - /** - Returns the primary selection. - */ - Fl_Text_Selection* primary_selection() { return &mPrimary; } - - /** - Returns the secondary selection. - */ - const Fl_Text_Selection* secondary_selection() const { return &mSecondary; } - - /** - Returns the current highlight selection. - */ - const Fl_Text_Selection* highlight_selection() const { return &mHighlight; } - - /** - Returns the index of the previous character. - \param ix index to the current character - */ - int prev_char(int ix) const; - int prev_char_clipped(int ix) const; - - /** - Returns the index of the next character. - \param ix index to the current character - */ - int next_char(int ix) const; - int next_char_clipped(int ix) const; - - /** - Align an index into the buffer to the current or previous UTF-8 boundary. - */ - int utf8_align(int) const; - - /** - \brief true if the loaded file has been transcoded to UTF-8. - */ - int input_file_was_transcoded; - - /** This message may be displayed using the fl_alert() function when a file - which was not UTF-8 encoded is input. - */ - static const char* file_encoding_warning_message; - - /** - \brief Pointer to a function called after reading a non UTF-8 encoded file. - - This function is called after reading a file if the file content - was transcoded to UTF-8. Its default implementation calls fl_alert() - with the text of \ref file_encoding_warning_message. No warning message is - displayed if this pointer is set to NULL. Use \ref input_file_was_transcoded - to be informed if file input required transcoding to UTF-8. - */ - void (*transcoding_warning_action)(Fl_Text_Buffer*); - -protected: - - /** - Calls the stored modify callback procedure(s) for this buffer to update the - changed area(s) on the screen and any other listeners. - */ - void call_modify_callbacks(int pos, int nDeleted, int nInserted, - int nRestyled, const char* deletedText) const; - - /** - Calls the stored pre-delete callback procedure(s) for this buffer to update - the changed area(s) on the screen and any other listeners. - */ - void call_predelete_callbacks(int pos, int nDeleted) const; - - /** - Internal (non-redisplaying) version of insert(). - - Returns the length of text inserted (this is just strlen(\p text), however - this calculation can be expensive and the length will be required by any - caller who will continue on to call redisplay). \p pos must be contiguous - with the existing text in the buffer (i.e. not past the end). - \return the number of bytes inserted - */ - int insert_(int pos, const char* text); - - /** - Internal (non-redisplaying) version of remove(). - - Removes the contents of the buffer between \p start and \p end (and moves - the gap to the site of the delete). - */ - void remove_(int start, int end); - - /** - Calls the stored redisplay procedure(s) for this buffer to update the - screen for a change in a selection. - */ - void redisplay_selection(Fl_Text_Selection* oldSelection, - Fl_Text_Selection* newSelection) const; - - /** - Move the gap to start at a new position. - */ - void move_gap(int pos); - - /** - Reallocates the text storage in the buffer to have a gap starting at \p newGapStart - and a gap size of \p newGapLen, preserving the buffer's current contents. - */ - void reallocate_with_gap(int newGapStart, int newGapLen); - - char* selection_text_(Fl_Text_Selection* sel) const; - - /** - Removes the text from the buffer corresponding to \p sel. - */ - void remove_selection_(Fl_Text_Selection* sel); - - /** - Replaces the \p text in selection \p sel. - */ - void replace_selection_(Fl_Text_Selection* sel, const char* text); - - /** - Updates all of the selections in the buffer for changes in the buffer's text - */ - void update_selections(int pos, int nDeleted, int nInserted); - - Fl_Text_Selection mPrimary; /**< highlighted areas */ - Fl_Text_Selection mSecondary; /**< highlighted areas */ - Fl_Text_Selection mHighlight; /**< highlighted areas */ - int mLength; /**< length of the text in the buffer (the length - of the buffer itself must be calculated: - gapEnd - gapStart + length) */ - char* mBuf; /**< allocated memory where the text is stored */ - int mGapStart; /**< points to the first character of the gap */ - int mGapEnd; /**< points to the first character after the gap */ - // The hardware tab distance used by all displays for this buffer, - // and used in computing offsets for rectangular selection operations. - int mTabDist; /**< equiv. number of characters in a tab */ - int mNModifyProcs; /**< number of modify-redisplay procs attached */ - Fl_Text_Modify_Cb *mModifyProcs;/**< procedures to call when buffer is - modified to redisplay contents */ - void** mCbArgs; /**< caller arguments for modifyProcs above */ - int mNPredeleteProcs; /**< number of pre-delete procs attached */ - Fl_Text_Predelete_Cb *mPredeleteProcs; /**< procedure to call before text is deleted - from the buffer; at most one is supported. */ - void **mPredeleteCbArgs; /**< caller argument for pre-delete proc above */ - int mCursorPosHint; /**< hint for reasonable cursor position after - a buffer modification operation */ - char mCanUndo; /**< if this buffer is used for attributes, it must - not do any undo calls */ - int mPreferredGapSize; /**< the default allocation for the text gap is 1024 - bytes and should only be increased if frequent - and large changes in buffer size are expected */ -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Text_Display.H b/msvc/fltk/include/FL/Fl_Text_Display.H deleted file mode 100644 index 31288446..00000000 --- a/msvc/fltk/include/FL/Fl_Text_Display.H +++ /dev/null @@ -1,543 +0,0 @@ -// -// "$Id$" -// -// Header file for Fl_Text_Display class. -// -// Copyright 2001-2016 by Bill Spitzak and others. -// Original code Copyright Mark Edel. Permission to distribute under -// the LGPL for the FLTK library granted by Mark Edel. -// -// This library is free software. 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Text_Display widget . */ - -#ifndef FL_TEXT_DISPLAY_H -#define FL_TEXT_DISPLAY_H - -#include "fl_draw.H" -#include "Fl_Group.H" -#include "Fl_Widget.H" -#include "Fl_Scrollbar.H" -#include "Fl_Text_Buffer.H" - -/** - \brief Rich text display widget. - - This is the FLTK text display widget. It allows the user to view - multiple lines of text and supports highlighting, word wrap, mixes - of font faces and colors, line numbers and scrolling. The buffer - that is displayed in the widget is managed by the Fl_Text_Buffer - class. A single Text Buffer can be displayed by multiple Text - Displays. - - \image html editor.png "Fl_Text_Display widget" - \image latex editor.png "Fl_Text_Display widget" width=6cm -

- \image html editor-linenumbers.png "Fl_Text_Display widget with line numbers enabled" - \image latex editor-linenumbers.png "Fl_Text_Display widget with line numbers enabled" width=6cm - - \b Example \b Use - \code - #include - .. - int main() { - .. - Fl_Text_Buffer *buff = new Fl_Text_Buffer(); - Fl_Text_Display *disp = new Fl_Text_Display(10, 10, 640, 480); - disp->buffer(buff); // attach text buffer to display widget - buff->text("line one\nline two"); // add some text to buffer - .. - } - \endcode - - \b Features - - - Word wrap: wrap_mode(), wrapped_column(), wrapped_row() - - Font control: textfont(), textsize(), textcolor() - - Font styling: highlight_data() - - Cursor: cursor_style(), show_cursor(), hide_cursor(), cursor_color() - - Line numbers: linenumber_width(), linenumber_font(), - linenumber_size(), linenumber_fgcolor(), linenumber_bgcolor(), - linenumber_align(), linenumber_format() - - Note that other features may be available via Fl_Text_Editor - and Fl_Text_Buffer classes. - - \note Line numbers were added in 1.3.3. To avoid breaking ABI, - many of its options are read only. To adjust these features - in 1.3.x, you must build FLTK with FLTK_ABI_VERSION set to 10303 - or higher. - - */ -class FL_EXPORT Fl_Text_Display: public Fl_Group { - -public: - - /** - text display cursor shapes enumeration - */ - enum { - NORMAL_CURSOR, /**< I-beam */ - CARET_CURSOR, /**< caret under the text */ - DIM_CURSOR, /**< dim I-beam */ - BLOCK_CURSOR, /**< unfille box under the current character */ - HEAVY_CURSOR, /**< thick I-beam */ - SIMPLE_CURSOR /**< as cursor as Fl_Input cursor */ - }; - - /** - the character position is the left edge of a character, whereas - the cursor is thought to be between the centers of two consecutive - characters. - */ - enum { - CURSOR_POS, - CHARACTER_POS - }; - - /** - drag types - they match Fl::event_clicks() so that single clicking to - start a collection selects by character, double clicking selects by - word and triple clicking selects by line. - */ - enum { - DRAG_NONE = -2, - DRAG_START_DND = -1, - DRAG_CHAR = 0, - DRAG_WORD = 1, - DRAG_LINE = 2 - }; - - /** - wrap types - used in wrap_mode() - */ - enum { - WRAP_NONE, /**< don't wrap text at all */ - WRAP_AT_COLUMN, /**< wrap text at the given text column */ - WRAP_AT_PIXEL, /**< wrap text at a pixel position */ - WRAP_AT_BOUNDS /**< wrap text so that it fits into the widget width */ - }; - - friend void fl_text_drag_me(int pos, Fl_Text_Display* d); - - typedef void (*Unfinished_Style_Cb)(int, void *); - - /** - This structure associates the color, font, and font size of a string to draw - with an attribute mask matching attr. - - There must be one entry for each style that can be used in an - Fl_Text_Display for displaying text. The style table is an array of - struct Style_Table_Entry. - - The style table is associated with an Fl_Text_Display by using - Fl_Text_Display::highlight_data(). - - \see Fl_Text_Display::highlight_data() - */ - struct Style_Table_Entry { - Fl_Color color; ///< text color - Fl_Font font; ///< text font - Fl_Fontsize size; ///< text font size - unsigned attr; ///< currently unused (this may be change in the future) - }; - - Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0); - ~Fl_Text_Display(); - - virtual int handle(int e); - - void buffer(Fl_Text_Buffer* buf); - - /** - Sets the current text buffer associated with the text widget. - Multiple text widgets can be associated with the same text buffer. - \param buf new text buffer - */ - void buffer(Fl_Text_Buffer& buf) { buffer(&buf); } - - /** - Gets the current text buffer associated with the text widget. - Multiple text widgets can be associated with the same text buffer. - \return current text buffer - */ - Fl_Text_Buffer* buffer() const { return mBuffer; } - - void redisplay_range(int start, int end); - void scroll(int topLineNum, int horizOffset); - void insert(const char* text); - void overstrike(const char* text); - void insert_position(int newPos); - - /** - Gets the position of the text insertion cursor for text display. - \return insert position index into text buffer - */ - int insert_position() const { return mCursorPos; } - int position_to_xy(int pos, int* x, int* y) const; - - int in_selection(int x, int y) const; - void show_insert_position(); - - int move_right(); - int move_left(); - int move_up(); - int move_down(); - int count_lines(int start, int end, bool start_pos_is_line_start) const; - int line_start(int pos) const; - int line_end(int startPos, bool startPosIsLineStart) const; - int skip_lines(int startPos, int nLines, bool startPosIsLineStart); - int rewind_lines(int startPos, int nLines); - void next_word(void); - void previous_word(void); - - void show_cursor(int b = 1); - - /** - Hides the text cursor. - */ - void hide_cursor() { show_cursor(0); } - - void cursor_style(int style); - - /** - Gets the text cursor color. - \return cursor color - */ - Fl_Color cursor_color() const {return mCursor_color;} - - /** - Sets the text cursor color. - \param n new cursor color - */ - void cursor_color(Fl_Color n) {mCursor_color = n;} - - /** - Gets the width/height of the scrollbars. - \return width of scrollbars - */ - int scrollbar_width() const { return scrollbar_width_; } - - /** - Sets the width/height of the scrollbars. - \param W width of scrollbars - */ - void scrollbar_width(int W) { scrollbar_width_ = W; } - - /** - Gets the scrollbar alignment type. - \return scrollbar alignment - */ - Fl_Align scrollbar_align() const { return scrollbar_align_; } - - /** - Sets the scrollbar alignment type. - \param a new scrollbar alignment - */ - void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; } - - /** - Moves the insert position to the beginning of the current word. - \param pos start calculation at this index - \return beginning of the words - */ - int word_start(int pos) const { return buffer()->word_start(pos); } - - /** - Moves the insert position to the end of the current word. - \param pos start calculation at this index - \return index of first character after the end of the word - */ - int word_end(int pos) const { return buffer()->word_end(pos); } - - - void highlight_data(Fl_Text_Buffer *styleBuffer, - const Style_Table_Entry *styleTable, - int nStyles, char unfinishedStyle, - Unfinished_Style_Cb unfinishedHighlightCB, - void *cbArg); - - int position_style(int lineStartPos, int lineLen, int lineIndex) const; - - /** - \todo FIXME : get set methods pointing on shortcut_ - have no effects as shortcut_ is unused in this class and derived! - \return the current shortcut key - */ - int shortcut() const {return shortcut_;} - - /** - \todo FIXME : get set methods pointing on shortcut_ - have no effects as shortcut_ is unused in this class and derived! - \param s the new shortcut key - */ - void shortcut(int s) {shortcut_ = s;} - - /** - Gets the default font used when drawing text in the widget. - \return current text font face unless overridden by a style - */ - Fl_Font textfont() const {return textfont_;} - - /** - Sets the default font used when drawing text in the widget. - \param s default text font face - */ - void textfont(Fl_Font s) {textfont_ = s; mColumnScale = 0;} - - /** - Gets the default size of text in the widget. - \return current text height unless overridden by a style - */ - Fl_Fontsize textsize() const {return textsize_;} - - /** - Sets the default size of text in the widget. - \param s new text size - */ - void textsize(Fl_Fontsize s) {textsize_ = s; mColumnScale = 0;} - - /** - Gets the default color of text in the widget. - \return text color unless overridden by a style - */ - Fl_Color textcolor() const {return textcolor_;} - - /** - Sets the default color of text in the widget. - \param n new text color - */ - void textcolor(Fl_Color n) {textcolor_ = n;} - - int wrapped_column(int row, int column) const; - int wrapped_row(int row) const; - void wrap_mode(int wrap, int wrap_margin); - - virtual void resize(int X, int Y, int W, int H); - - /** - Convert an x pixel position into a column number. - \param x number of pixels from the left margin - \return an approximate column number based on the main font - */ - double x_to_col(double x) const; - - /** - Convert a column number into an x pixel position. - \param col an approximate column number based on the main font - \return number of pixels from the left margin to the left of an - average sized character - */ - double col_to_x(double col) const; - - void linenumber_width(int width); - int linenumber_width() const; - void linenumber_font(Fl_Font val); - Fl_Font linenumber_font() const; - void linenumber_size(Fl_Fontsize val); - Fl_Fontsize linenumber_size() const; - void linenumber_fgcolor(Fl_Color val); - Fl_Color linenumber_fgcolor() const; - void linenumber_bgcolor(Fl_Color val); - Fl_Color linenumber_bgcolor() const; - void linenumber_align(Fl_Align val); - Fl_Align linenumber_align() const; - void linenumber_format(const char* val); - const char* linenumber_format() const; - -protected: - // Most (all?) of this stuff should only be called from resize() or - // draw(). - // Anything with "vline" indicates thats it deals with currently - // visible lines. - - virtual void draw(); - void draw_text(int X, int Y, int W, int H); - void draw_range(int start, int end); - void draw_cursor(int, int); - - void draw_string(int style, int x, int y, int toX, const char *string, - int nChars) const; - - void draw_vline(int visLineNum, int leftClip, int rightClip, - int leftCharIndex, int rightCharIndex); - - int find_x(const char *s, int len, int style, int x) const; - - enum { - DRAW_LINE, - FIND_INDEX, - FIND_INDEX_FROM_ZERO, - GET_WIDTH - }; - - int handle_vline(int mode, - int lineStart, int lineLen, int leftChar, int rightChar, - int topClip, int bottomClip, - int leftClip, int rightClip) const; - - void draw_line_numbers(bool clearAll); - - void clear_rect(int style, int x, int y, int width, int height) const; - void display_insert(); - - void offset_line_starts(int newTopLineNum); - - void calc_line_starts(int startLine, int endLine); - - void update_line_starts(int pos, int charsInserted, int charsDeleted, - int linesInserted, int linesDeleted, int *scrolled); - - void calc_last_char(); - - int position_to_line( int pos, int* lineNum ) const; - double string_width(const char* string, int length, int style) const; - - static void scroll_timer_cb(void*); - - static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); - static void buffer_modified_cb(int pos, int nInserted, int nDeleted, - int nRestyled, const char* deletedText, - void* cbArg); - - static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display* d); - static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display* d); - void update_v_scrollbar(); - void update_h_scrollbar(); - int measure_vline(int visLineNum) const; - int longest_vline() const; - int empty_vlines() const; - int vline_length(int visLineNum) const; - int xy_to_position(int x, int y, int PosType = CHARACTER_POS) const; - - void xy_to_rowcol(int x, int y, int* row, int* column, - int PosType = CHARACTER_POS) const; - void maintain_absolute_top_line_number(int state); - int get_absolute_top_line_number() const; - void absolute_top_line_number(int oldFirstChar); - int maintaining_absolute_top_line_number() const; - void reset_absolute_top_line_number(); - int position_to_linecol(int pos, int* lineNum, int* column) const; - int scroll_(int topLineNum, int horizOffset); - - void extend_range_for_styles(int* start, int* end); - - void find_wrap_range(const char *deletedText, int pos, int nInserted, - int nDeleted, int *modRangeStart, int *modRangeEnd, - int *linesInserted, int *linesDeleted); - void measure_deleted_lines(int pos, int nDeleted); - void wrapped_line_counter(Fl_Text_Buffer *buf, int startPos, int maxPos, - int maxLines, bool startPosIsLineStart, - int styleBufOffset, int *retPos, int *retLines, - int *retLineStart, int *retLineEnd, - bool countLastLineMissingNewLine = true) const; - void find_line_end(int pos, bool start_pos_is_line_start, int *lineEnd, - int *nextLineStart) const; - double measure_proportional_character(const char *s, int colNum, int pos) const; - int wrap_uses_character(int lineEndPos) const; - - int damage_range1_start, damage_range1_end; - int damage_range2_start, damage_range2_end; - int mCursorPos; - int mCursorOn; - int mCursorOldY; /* Y pos. of cursor for blanking */ - int mCursorToHint; /* Tells the buffer modified callback - where to move the cursor, to reduce - the number of redraw calls */ - int mCursorStyle; /* One of enum cursorStyles above */ - int mCursorPreferredXPos; /* Pixel position for vert. cursor movement */ - int mNVisibleLines; /* # of visible (displayed) lines */ - int mNBufferLines; /* # of newlines in the buffer */ - Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */ - Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing - color and font information */ - int mFirstChar, mLastChar; /* Buffer positions of first and last - displayed character (lastChar points - either to a newline or one character - beyond the end of the buffer) */ - int mContinuousWrap; /* Wrap long lines when displaying */ - int mWrapMarginPix; /* Margin in # of pixels for - wrapping in continuousWrap mode */ - int* mLineStarts; - int mTopLineNum; /* Line number of top displayed line - of file (first line of file is 1) */ - int mAbsTopLineNum; /* In continuous wrap mode, the line - number of the top line if the text - were not wrapped (note that this is - only maintained as needed). */ - int mNeedAbsTopLineNum; /* Externally settable flag to continue - maintaining absTopLineNum even if - it isn't needed for line # display */ - int mHorizOffset; /* Horizontal scroll pos. in pixels */ - int mTopLineNumHint; /* Line number of top displayed line - of file (first line of file is 1) */ - int mHorizOffsetHint; /* Horizontal scroll pos. in pixels */ - int mNStyles; /* Number of entries in styleTable */ - const Style_Table_Entry *mStyleTable; /* Table of fonts and colors for - coloring/syntax-highlighting */ - char mUnfinishedStyle; /* Style buffer entry which triggers - on-the-fly reparsing of region */ - Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */ - /* regions */ - void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */ - - int mMaxsize; - - int mSuppressResync; /* Suppress resynchronization of line - starts during buffer updates */ - int mNLinesDeleted; /* Number of lines deleted during - buffer modification (only used - when resynchronization is suppressed) */ - int mModifyingTabDistance; /* Whether tab distance is being - modified */ - - mutable double mColumnScale; /* Width in pixels of an average character. This - value is calculated as needed (lazy eval); it - needs to be mutable so that it can be calculated - within a method marked as "const" */ - - Fl_Color mCursor_color; - - Fl_Scrollbar* mHScrollBar; - Fl_Scrollbar* mVScrollBar; - int scrollbar_width_; - Fl_Align scrollbar_align_; - int dragPos, dragType, dragging; - int display_insert_position_hint; - struct { int x, y, w, h; } text_area; - - int shortcut_; - - Fl_Font textfont_; - Fl_Fontsize textsize_; - Fl_Color textcolor_; - - // Line number margin and width - int mLineNumLeft, mLineNumWidth; - - // Line number font/colors -#if FLTK_ABI_VERSION >= 10303 - Fl_Font linenumber_font_; - Fl_Fontsize linenumber_size_; - Fl_Color linenumber_fgcolor_; - Fl_Color linenumber_bgcolor_; - Fl_Align linenumber_align_; - const char* linenumber_format_; -#endif -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Text_Editor.H b/msvc/fltk/include/FL/Fl_Text_Editor.H deleted file mode 100644 index 4e6eb52d..00000000 --- a/msvc/fltk/include/FL/Fl_Text_Editor.H +++ /dev/null @@ -1,157 +0,0 @@ -// -// "$Id$" -// -// Header file for Fl_Text_Editor class. -// -// Copyright 2001-2010 by Bill Spitzak and others. -// Original code Copyright Mark Edel. Permission to distribute under -// the LGPL for the FLTK library granted by Mark Edel. -// -// This library is free software. 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Text_Editor widget . */ - - -#ifndef FL_TEXT_EDITOR_H -#define FL_TEXT_EDITOR_H - -#include "Fl_Text_Display.H" - -// key will match in any state -#define FL_TEXT_EDITOR_ANY_STATE (-1L) - -/** - This is the FLTK text editor widget. - - It allows the user to edit multiple lines of text and supports highlighting - and scrolling. The buffer that is displayed in the widget is managed - by the Fl_Text_Buffer class. -*/ -class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { - public: - /** Key function binding callback type. */ - typedef int (*Key_Func)(int key, Fl_Text_Editor* editor); - - /** Simple linked list item associating a key/state to a function. */ - struct Key_Binding { - int key; ///< the key pressed - int state; ///< the state of key modifiers - Key_Func function; ///< associated function - Key_Binding* next; ///< next key binding in the list - }; - - Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0); - ~Fl_Text_Editor() { remove_all_key_bindings(); } - virtual int handle(int e); - /** - Sets the current insert mode; if non-zero, new text - is inserted before the current cursor position. Otherwise, new - text replaces text at the current cursor position. - */ - void insert_mode(int b) { insert_mode_ = b; } - /** - Gets the current insert mode; if non-zero, new text - is inserted before the current cursor position. Otherwise, new - text replaces text at the current cursor position. - */ - int insert_mode() { return insert_mode_; } - -#if FLTK_ABI_VERSION >= 10304 - void tab_nav(int val); - int tab_nav() const; -#endif - - void add_key_binding(int key, int state, Key_Func f, Key_Binding** list); - /** Adds a \p key of state \p state with the function \p f. */ - void add_key_binding(int key, int state, Key_Func f) - { add_key_binding(key, state, f, &key_bindings); } - void remove_key_binding(int key, int state, Key_Binding** list); - /** Removes the key binding associated with the key "key" of state "state". */ - void remove_key_binding(int key, int state) - { remove_key_binding(key, state, &key_bindings); } - void remove_all_key_bindings(Key_Binding** list); - /** Removes all of the key bindings associated with the text editor or list. */ - void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } - void add_default_key_bindings(Key_Binding** list); -#if FLTK_ABI_VERSION < 10304 - // OLD: non-const - Key_Func bound_key_function(int key, int state, Key_Binding* list); - /** Returns the function associated with a key binding. */ - Key_Func bound_key_function(int key, int state) - { return bound_key_function(key, state, key_bindings); } -#else - // NEW: const (STR#3306) - Key_Func bound_key_function(int key, int state, Key_Binding* list) const; - /** Returns the function associated with a key binding. */ - Key_Func bound_key_function(int key, int state) const - { return bound_key_function(key, state, key_bindings); } -#endif - /** Sets the default key function for unassigned keys. */ - void default_key_function(Key_Func f) { default_key_function_ = f; } - - // functions for the built in default bindings - static int kf_default(int c, Fl_Text_Editor* e); - static int kf_ignore(int c, Fl_Text_Editor* e); - static int kf_backspace(int c, Fl_Text_Editor* e); - static int kf_enter(int c, Fl_Text_Editor* e); - static int kf_move(int c, Fl_Text_Editor* e); - static int kf_shift_move(int c, Fl_Text_Editor* e); - static int kf_ctrl_move(int c, Fl_Text_Editor* e); - static int kf_c_s_move(int c, Fl_Text_Editor* e); - static int kf_meta_move(int c, Fl_Text_Editor* e); - static int kf_m_s_move(int c, Fl_Text_Editor* e); - static int kf_home(int, Fl_Text_Editor* e); - static int kf_end(int c, Fl_Text_Editor* e); - static int kf_left(int c, Fl_Text_Editor* e); - static int kf_up(int c, Fl_Text_Editor* e); - static int kf_right(int c, Fl_Text_Editor* e); - static int kf_down(int c, Fl_Text_Editor* e); - static int kf_page_up(int c, Fl_Text_Editor* e); - static int kf_page_down(int c, Fl_Text_Editor* e); - static int kf_insert(int c, Fl_Text_Editor* e); - static int kf_delete(int c, Fl_Text_Editor* e); - static int kf_copy(int c, Fl_Text_Editor* e); - static int kf_cut(int c, Fl_Text_Editor* e); - static int kf_paste(int c, Fl_Text_Editor* e); - static int kf_select_all(int c, Fl_Text_Editor* e); - static int kf_undo(int c, Fl_Text_Editor* e); - - protected: - int handle_key(); - void maybe_do_callback(); - -#ifndef FL_DOXYGEN - int insert_mode_; - Key_Binding* key_bindings; -#endif - - /** Global key binding list. - - Derived classes can add key bindings for all Fl_Text_Editor widgets - by adding a Key_Binding to this list. - - \see add_key_binding(int key, int state, Key_Func f, Key_Binding** list); - */ - static Key_Binding* global_key_bindings; - -#ifndef FL_DOXYGEN - Key_Func default_key_function_; -#endif -}; - -#endif - -// -// End of "$Id$". -// - diff --git a/msvc/fltk/include/FL/Fl_Tile.H b/msvc/fltk/include/FL/Fl_Tile.H deleted file mode 100644 index c5a8e170..00000000 --- a/msvc/fltk/include/FL/Fl_Tile.H +++ /dev/null @@ -1,41 +0,0 @@ -// -// "$Id$" -// -// Tile header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef Fl_Tile_H -#define Fl_Tile_H - -#include "Fl_Group.H" - -/* - The Fl_Tile class lets you resize its children by dragging - the border between them. -*/ - -class FL_EXPORT Fl_Tile : public Fl_Group { -public: - int handle(int event); - Fl_Tile(int X, int Y, int W, int H, const char *L=0); - void resize(int X, int Y, int W, int H); - void position(int oldx, int oldy, int newx, int newy); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tiled_Image.H b/msvc/fltk/include/FL/Fl_Tiled_Image.H deleted file mode 100644 index a2718a7b..00000000 --- a/msvc/fltk/include/FL/Fl_Tiled_Image.H +++ /dev/null @@ -1,59 +0,0 @@ -// -// "$Id$" -// -// Tiled image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Tiled_Image widget . */ - -#ifndef Fl_Tiled_Image_H -# define Fl_Tiled_Image_H - -# include "Fl_Image.H" - - -/** - This class supports tiling of images over a specified area. - - The source (tile) image is \b not copied unless you call the - color_average(), desaturate(), or inactive() methods. -*/ -class FL_EXPORT Fl_Tiled_Image : public Fl_Image { - protected: - - Fl_Image *image_; // The image that is tiled - int alloc_image_; // Did we allocate this image? - - public: - - Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0); - virtual ~Fl_Tiled_Image(); - - virtual Fl_Image *copy(int W, int H); - Fl_Image *copy() { return copy(w(), h()); } - virtual void color_average(Fl_Color c, float i); - virtual void desaturate(); - virtual void draw(int X, int Y, int W, int H, int cx, int cy); - void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } - /** Gets The image that is tiled */ - Fl_Image *image() { return image_; } -}; - -#endif // !Fl_Tiled_Image_H - -// -// End of "$Id$" -// diff --git a/msvc/fltk/include/FL/Fl_Timer.H b/msvc/fltk/include/FL/Fl_Timer.H deleted file mode 100644 index 3000615d..00000000 --- a/msvc/fltk/include/FL/Fl_Timer.H +++ /dev/null @@ -1,78 +0,0 @@ -// -// "$Id$" -// -// Timer header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Timer widget . */ - -#ifndef Fl_Timer_H -#define Fl_Timer_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -// values for type(): -#define FL_NORMAL_TIMER 0 -#define FL_VALUE_TIMER 1 -#define FL_HIDDEN_TIMER 2 - -/** - This is provided only to emulate the Forms Timer widget. It works by - making a timeout callback every 1/5 second. This is wasteful and - inaccurate if you just want something to happen a fixed time in the - future. You should directly call - Fl::add_timeout() instead. -*/ -class FL_EXPORT Fl_Timer : public Fl_Widget { - static void stepcb(void *); - void step(); - char on, direction_; - double delay, total; - long lastsec,lastusec; -protected: - void draw(); -public: - int handle(int); - Fl_Timer(uchar t,int x,int y,int w,int h, const char *l); - ~Fl_Timer(); - void value(double); - /** See void Fl_Timer::value(double) */ - double value() const {return delay>0.0?delay:0.0;} - /** - Gets or sets the direction of the timer. If the direction is zero - then the timer will count up, otherwise it will count down from the - initial value(). - */ - char direction() const {return direction_;} - /** - Gets or sets the direction of the timer. If the direction is zero - then the timer will count up, otherwise it will count down from the - initial value(). - */ - void direction(char d) {direction_ = d;} - /** Gets or sets whether the timer is suspended. */ - char suspended() const {return !on;} - void suspended(char d); -}; - -#endif - -// -// End of "$Id$". -// - diff --git a/msvc/fltk/include/FL/Fl_Toggle_Button.H b/msvc/fltk/include/FL/Fl_Toggle_Button.H deleted file mode 100644 index 00856556..00000000 --- a/msvc/fltk/include/FL/Fl_Toggle_Button.H +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id$" -// -// Toggle button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Toggle_Button widget . */ - -#ifndef Fl_Toggle_Button_H -#define Fl_Toggle_Button_H - -#include "Fl_Button.H" - -/** - The toggle button is a push button that needs to be clicked once - to toggle on, and one more time to toggle off. - The Fl_Toggle_Button subclass displays the "on" state by - drawing a pushed-in button.

-

Buttons generate callbacks when they are clicked by the user. You - control exactly when and how by changing the values for type() - and when(). -*/ -class FL_EXPORT Fl_Toggle_Button : public Fl_Button { -public: - /** - Creates a new Fl_Toggle_Button widget using the given - position, size, and label string. -

The inherited destructor deletes the toggle button. - */ - Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0); -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Toggle_Light_Button.H b/msvc/fltk/include/FL/Fl_Toggle_Light_Button.H deleted file mode 100644 index 8dd6e39f..00000000 --- a/msvc/fltk/include/FL/Fl_Toggle_Light_Button.H +++ /dev/null @@ -1,28 +0,0 @@ -// -// "$Id$" -// -// Toggle light button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// provided for back-compatibility only - -#ifndef Fl_Toggle_Light_Button -#include "Fl_Light_Button.H" -#define Fl_Toggle_Light_Button Fl_Light_Button -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Toggle_Round_Button.H b/msvc/fltk/include/FL/Fl_Toggle_Round_Button.H deleted file mode 100644 index ab87d167..00000000 --- a/msvc/fltk/include/FL/Fl_Toggle_Round_Button.H +++ /dev/null @@ -1,28 +0,0 @@ -// -// "$Id$" -// -// Toggle round button header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// provided for back-compatibility only - -#ifndef Fl_Toggle_Round_Button -#include "Fl_Round_Button.H" -#define Fl_Toggle_Round_Button Fl_Round_Button -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tooltip.H b/msvc/fltk/include/FL/Fl_Tooltip.H deleted file mode 100644 index 300c921d..00000000 --- a/msvc/fltk/include/FL/Fl_Tooltip.H +++ /dev/null @@ -1,133 +0,0 @@ -// -// "$Id$" -// -// Tooltip header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Tooltip widget . */ - -#ifndef Fl_Tooltip_H -#define Fl_Tooltip_H - -#include -#include - -/** - The Fl_Tooltip class provides tooltip support for - all FLTK widgets. It contains only static methods. - - \image html tooltip-options.png "Fl_Tooltip Options" - \image latex src/tooltip-options.png "Fl_Tooltip Options" width=6cm - -*/ -class FL_EXPORT Fl_Tooltip { -public: - /** Gets the tooltip delay. The default delay is 1.0 seconds. */ - static float delay() { return delay_; } - /** Sets the tooltip delay. The default delay is 1.0 seconds. */ - static void delay(float f) { delay_ = f; } - /** - Gets the tooltip hover delay, the delay between tooltips. - The default delay is 0.2 seconds. - */ - static float hoverdelay() { return hoverdelay_; } - /** - Sets the tooltip hover delay, the delay between tooltips. - The default delay is 0.2 seconds. - */ - static void hoverdelay(float f) { hoverdelay_ = f; } - /** Returns non-zero if tooltips are enabled. */ - static int enabled() { return Fl::option(Fl::OPTION_SHOW_TOOLTIPS); } - /** Enables tooltips on all widgets (or disables if b is false). */ - static void enable(int b = 1) { Fl::option(Fl::OPTION_SHOW_TOOLTIPS, (b!=0));} - /** Same as enable(0), disables tooltips on all widgets. */ - static void disable() { enable(0); } - static void (*enter)(Fl_Widget* w); - static void enter_area(Fl_Widget* w, int X, int Y, int W, int H, const char* tip); - static void (*exit)(Fl_Widget *w); - /** Gets the current widget target */ - static Fl_Widget* current() {return widget_;} - static void current(Fl_Widget*); - - /** Gets the typeface for the tooltip text. */ - static Fl_Font font() { return font_; } - /** Sets the typeface for the tooltip text. */ - static void font(Fl_Font i) { font_ = i; } - /** Gets the size of the tooltip text. */ - static Fl_Fontsize size() { return (size_ == -1 ? FL_NORMAL_SIZE : size_); } - /** Sets the size of the tooltip text. */ - static void size(Fl_Fontsize s) { size_ = s; } - /** Gets the background color for tooltips. The default background color is a pale yellow. */ - static Fl_Color color() { return color_; } - /** Sets the background color for tooltips. The default background color is a pale yellow. */ - static void color(Fl_Color c) { color_ = c; } - /** Gets the color of the text in the tooltip. The default is black. */ - static Fl_Color textcolor() { return textcolor_; } - /** Sets the color of the text in the tooltip. The default is black. */ - static void textcolor(Fl_Color c) { textcolor_ = c; } -#if FLTK_ABI_VERSION >= 10301 - /** Gets the amount of extra space left/right of the tooltip's text. Default is 3. */ - static int margin_width() { return margin_width_; } - /** Sets the amount of extra space left/right of the tooltip's text. Default is 3. */ - static void margin_width(int v) { margin_width_ = v; } - /** Gets the amount of extra space above and below the tooltip's text. Default is 3. */ - static int margin_height() { return margin_height_; } - /** Sets the amount of extra space above and below the tooltip's text. Default is 3. */ - static void margin_height(int v) { margin_height_ = v; } - /** Gets the maximum width for tooltip's text before it word wraps. Default is 400. */ - static int wrap_width() { return wrap_width_; } - /** Sets the maximum width for tooltip's text before it word wraps. Default is 400. */ - static void wrap_width(int v) { wrap_width_ = v; } -#else - static int margin_width() { return 3; } - static int margin_height() { return 3; } - static int wrap_width() { return 400; } -#endif - -#ifdef __APPLE__ - // the unique tooltip window - static Fl_Window* current_window(void); -#endif - - // These should not be public, but Fl_Widget::tooltip() needs them... - // fabien: made it private with only a friend function access -private: - friend void Fl_Widget::tooltip(const char *); - friend void Fl_Widget::copy_tooltip(const char *); - static void enter_(Fl_Widget* w); - static void exit_(Fl_Widget *w); - static void set_enter_exit_once_(); - -private: - static float delay_; //!< delay before a tooltip is shown - static float hoverdelay_; //!< delay between tooltips - static Fl_Color color_; - static Fl_Color textcolor_; - static Fl_Font font_; - static Fl_Fontsize size_; - static Fl_Widget* widget_; //!< Keeps track of the current target widget -#if FLTK_ABI_VERSION >= 10301 - static int margin_width_; //!< distance around tooltip text left+right - static int margin_height_; //!< distance around tooltip text top+bottom - static int wrap_width_; //!< maximum width of tooltip text before it word wraps -#endif -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tree.H b/msvc/fltk/include/FL/Fl_Tree.H deleted file mode 100644 index 9f4c685c..00000000 --- a/msvc/fltk/include/FL/Fl_Tree.H +++ /dev/null @@ -1,578 +0,0 @@ -// -// "$Id$" -// - -#ifndef FL_TREE_H -#define FL_TREE_H - -#include -#include -#include -#include - -#include -#include - -////////////////////// -// FL/Fl_Tree.H -////////////////////// -// -// Fl_Tree -- This file is part of the Fl_Tree widget for FLTK -// Copyright (C) 2009-2010 by Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/// -/// \file -/// \brief This file contains the definitions of the Fl_Tree class -/// - -/// \class Fl_Tree -/// -/// \brief Tree widget. -/// -/// \image html tree-simple.png "Fl_Tree example program" -/// \image latex tree-simple.png "Fl_Tree example program" width=4cm -/// -/// \code -/// Fl_Tree // Top level widget -/// |--- Fl_Tree_Item // Items in the tree -/// |--- Fl_Tree_Prefs // Preferences for the tree -/// |--- Fl_Tree_Connector (enum) // Connection modes -/// |--- Fl_Tree_Select (enum) // Selection modes -/// |--- Fl_Tree_Sort (enum) // Sort behavior -/// \endcode -/// Similar to Fl_Browser, Fl_Tree is a browser of Fl_Tree_Item's arranged -/// in a parented hierarchy, or 'tree'. Subtrees can be expanded or closed. -/// Items can be added, deleted, inserted, sorted and re-ordered. -/// -/// The tree items may also contain other FLTK widgets, like buttons, input fields, -/// or even "custom" widgets. -/// -/// The callback() is invoked depending on the value of when(): -/// -/// - FL_WHEN_RELEASE -- callback invoked when left mouse button is released on an item -/// - FL_WHEN_CHANGED -- callback invoked when left mouse changes selection state -/// -/// The simple way to define a tree: -/// \code -/// #include -/// [..] -/// Fl_Tree tree(X,Y,W,H); -/// tree.begin(); -/// tree.add("Flintstones/Fred"); -/// tree.add("Flintstones/Wilma"); -/// tree.add("Flintstones/Pebbles"); -/// tree.add("Simpsons/Homer"); -/// tree.add("Simpsons/Marge"); -/// tree.add("Simpsons/Bart"); -/// tree.add("Simpsons/Lisa"); -/// tree.end(); -/// \endcode -/// -/// \par FEATURES -/// Items can be added with add(),
-/// removed with remove(),
-/// completely cleared with clear(),
-/// inserted with insert() and insert_above(),
-/// selected/deselected with select() and deselect(),
-/// open/closed with open() and close(),
-/// positioned on the screen with show_item_top(), show_item_middle() and -/// show_item_bottom(),
-/// item children can be swapped around with Fl_Tree_Item::swap_children(),
-/// sorting can be controlled when items are add()ed via sortorder().
-/// You can walk the entire tree with first() and next().
-/// You can walk visible items with first_visible_item() -/// and next_visible_item().
-/// You can walk selected items with first_selected_item() and -/// next_selected_item().
-/// Items can be found by their pathname using find_item(const char*), -/// and an item's pathname can be found with item_pathname().
-/// The selected items' colors are controlled by selection_color() -/// (inherited from Fl_Widget).
-/// A hook is provided to allow you to redefine how item's labels are drawn -/// via Fl_Tree::item_draw_callback().
-/// -/// \par SELECTION OF ITEMS -/// The tree can have different selection behaviors controlled by selectmode(). -/// The background color used for selected items is the Fl_Tree::selection_color(). -/// The foreground color for selected items is controlled internally with fl_contrast(). -/// -/// \par CHILD WIDGETS -/// FLTK widgets (including custom widgets) can be assigned to tree items via -/// Fl_Tree_Item::widget(). -/// \par -/// When an Fl_Tree_Item::widget() is defined, the default behavior is for the -/// widget() to be shown in place of the item's label (if it has one). -/// Only the widget()'s width will be used; the widget()'s x() and y() position -/// will be managed by the tree, and the h() will track the item's height. -/// This default behavior can be altered (ABI 1.3.1): -/// Setting Fl_Tree::item_draw_mode()'s FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET flag -/// causes the label + widget to be displayed together in that order, and -/// adding the FL_TREE_ITEM_HEIGHT_FROM_WIDGET flag causes widget's height -/// to define the widget()'s height. -/// -/// \par ICONS -/// The tree's open/close icons can be redefined with -/// Fl_Tree::openicon(), Fl_Tree::closeicon(). User icons -/// can either be changed globally with Fl_Tree::usericon(), -/// or on a per-item basis with Fl_Tree_Item::usericon(). -/// \par -/// Various default preferences can be globally manipulated via Fl_Tree_Prefs, -/// including colors, margins, icons, connection lines, etc. -/// -/// \par FONTS AND COLORS -/// When adding new items to the tree, the new items get the -/// defaults for fonts and colors from: -/// \par -/// - Fl_Tree::item_labelfont() -- The default item label font (default: FL_HELVETICA) -/// - Fl_Tree::item_labelsize() -- The default item label size (default: FL_NORMAL_SIZE) -/// - Fl_Tree::item_labelfgcolor() -- The default item label foreground color (default: FL_FOREGROUND_COLOR) -/// - Fl_Tree::item_labelbgcolor() -- The default item label background color (default: 0xffffffff, which tree uses as 'transparent') -/// \par -/// Each item (Fl_Tree_Item) inherits a copy of these font/color attributes when created, -/// and each item has its own methods to let the app change these values on a per-item basis -/// using methods of the same name: -/// \par -/// - Fl_Tree_Item::labelfont() -- The item's label font (default: FL_HELVETICA) -/// - Fl_Tree_Item::labelsize() -- The item's label size (default: FL_NORMAL_SIZE) -/// - Fl_Tree_Item::labelfgcolor() -- The item's label foreground color (default: FL_FOREGROUND_COLOR) -/// - Fl_Tree_Item::labelbgcolor() -- The item's label background color (default: 0xffffffff, which uses the tree's own bg color) -/// -/// \par CALLBACKS -/// The tree's callback() will be invoked when items change state or are open/closed. -/// when() controls when mouse/keyboard events invoke the callback. -/// callback_item() and callback_reason() can be used to determine the cause of the callback. e.g. -/// \par -/// \code -/// void MyTreeCallback(Fl_Widget *w, void *data) { -/// Fl_Tree *tree = (Fl_Tree*)w; -/// Fl_Tree_Item *item = (Fl_Tree_Item*)tree->callback_item(); // get selected item -/// switch ( tree->callback_reason() ) { -/// case FL_TREE_REASON_SELECTED: [..] -/// case FL_TREE_REASON_DESELECTED: [..] -/// case FL_TREE_REASON_RESELECTED: [..] -/// case FL_TREE_REASON_OPENED: [..] -/// case FL_TREE_REASON_CLOSED: [..] -/// } -/// \endcode -/// -/// \par SIMPLE EXAMPLES -/// To find all the selected items: -/// \code -/// for ( Fl_Tree_Item *i=first_selected_item(); i; i=next_selected_item(i) ) -/// printf("Item %s is selected\n", i->label()); -/// \endcode -/// To get an item's full menu pathname, use Fl_Tree::item_pathname(), e.g. -/// \code -/// char pathname[256] = "???"; -/// tree->item_pathname(pathname, sizeof(pathname), item); // eg. "Parent/Child/Item" -/// \endcode -/// \par -/// To walk all the items of the tree from top to bottom: -/// \code -/// // Walk all the items in the tree, and print their labels -/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->next(item) ) { -/// printf("Item: %s\n", item->label()); -/// } -/// \endcode -/// \par -/// To recursively walk all the children of a particular item, -/// define a function that uses recursion: -/// \code -/// // Find all of the item's children and print an indented report of their labels -/// void my_print_all_children(Fl_Tree_Item *item, int indent=0) { -/// for ( int t=0; tchildren(); t++ ) { -/// printf("%*s Item: %s\n", indent, "", item->child(t)->label()); -/// my_print_all_children(item->child(t), indent+4); // recurse -/// } -/// } -/// \endcode -/// \par -/// To change the default label font and color when creating new items: -/// \code -/// tree = new Fl_Tree(..); -/// tree->item_labelfont(FL_COURIER); // Use Courier font for all new items -/// tree->item_labelfgcolor(FL_RED); // Use red color for labels of all new items -/// [..] -/// // Now create the items in the tree using the above defaults. -/// tree->add("Aaa"); -/// tree->add("Bbb"); -/// [..] -/// \endcode -/// \par -/// To change the font and color of all existing items in the tree: -/// \code -/// // Change the font and color of all items currently in the tree -/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->next(item) ) { -/// item->labelfont(FL_COURIER); -/// item->labelcolor(FL_RED); -/// } -/// \endcode -/// -/// \par DISPLAY DESCRIPTION -/// The following image shows the tree's various visual elements -/// and the methods that control them: -/// \par -/// \image html tree-elements.png -/// \image latex tree-elements.png "Fl_Tree elements" width=6cm -/// \par -/// The following shows the protected dimension variables 'tree inner' (tix..) -/// and 'tree outer' (tox..): -/// \image html tree-dimensions.png "Fl_Tree inner/outer dimensions" width=6cm -/// \image latex tree-dimensions.png "Fl_Tree inner/outer dimensions" width=6cm -/// -/// \par KEYBOARD BINDINGS -/// The following table lists keyboard bindings for navigating the tree: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Keyboard bindings.
KeyboardFL_TREE_SELECT_MULTIFL_TREE_SELECT_SINGLEFL_TREE_SELECT_NONE
Ctrl-A (Linux/Windows)
Command-A (Mac)
Select all items.N/AN/A
Space Selects item.Selects item.N/A
Ctrl-Space Toggle item.Toggle item.N/A
Shift-Space Extends selection
from last item.
Selects item.N/A
Enter,
Ctrl-Enter,
Shift-Enter
Toggles open/closeToggles open/closeToggles open/close
Right / LeftOpen/Close item.Open/Close item.Open/Close item.
Up / DownMove focus box up/down.Move focus box up/down.N/A
Shift-Up / Shift-DownExtend selection up/down.Move focus up/down.N/A
Home / EndMove to top/bottom of tree.Move to top/bottom of tree.Move to top/bottom of tree.
PageUp / PageDownPage up/down.Page up/down.Page up/down.
-/// - -/// \enum Fl_Tree_Reason -/// The reason the callback was invoked. -/// -enum Fl_Tree_Reason { - FL_TREE_REASON_NONE=0, ///< unknown reason - FL_TREE_REASON_SELECTED, ///< an item was selected - FL_TREE_REASON_DESELECTED, ///< an item was de-selected -#if FLTK_ABI_VERSION >= 10301 - FL_TREE_REASON_RESELECTED, ///< an item was re-selected (e.g. double-clicked) -#endif /*FLTK_ABI_VERSION*/ - FL_TREE_REASON_OPENED, ///< an item was opened - FL_TREE_REASON_CLOSED, ///< an item was closed - FL_TREE_REASON_DRAGGED ///< an item was dragged into a new place -}; - -class FL_EXPORT Fl_Tree : public Fl_Group { - friend class Fl_Tree_Item; - Fl_Tree_Item *_root; // can be null! - Fl_Tree_Item *_item_focus; // item that has focus box - Fl_Tree_Item *_callback_item; // item invoked during callback (can be NULL) - Fl_Tree_Reason _callback_reason; // reason for the callback - Fl_Tree_Prefs _prefs; // all the tree's settings - int _scrollbar_size; // size of scrollbar trough -#if FLTK_ABI_VERSION >= 10301 - // NEW: - Fl_Tree_Item *_lastselect; // used to extend selections -#else /*FLTK_ABI_VERSION*/ - // OLD: static data inside handle() method -#endif /*FLTK_ABI_VERSION*/ - void fix_scrollbar_order(); - -protected: - Fl_Scrollbar *_vscroll; ///< Vertical scrollbar -#if FLTK_ABI_VERSION >= 10303 - Fl_Scrollbar *_hscroll; ///< Horizontal scrollbar - int _tox,_toy,_tow,_toh; ///< Tree widget outer xywh dimension: outside scrollbars, inside widget border - int _tix,_tiy,_tiw,_tih; ///< Tree widget inner xywh dimension: inside borders + scrollbars - - /// the calculated width of the entire tree hierarchy. See calc_tree() - int _tree_w; - /// the calculated height of the entire tree hierarchy. See calc_tree() - int _tree_h; -#endif - void item_clicked(Fl_Tree_Item* val); - void do_callback_for_item(Fl_Tree_Item* item, Fl_Tree_Reason reason); -#if FLTK_ABI_VERSION >= 10303 -// next_visible_item() and extend_selection() moved to 'public' in ABI 1.3.3 -// undocmented draw_tree() dropped -- draw() does all the work now -#else - Fl_Tree_Item *next_visible_item(Fl_Tree_Item *start, int dir); - void extend_selection(Fl_Tree_Item *from, Fl_Tree_Item *to); - int draw_tree(); -#endif - -public: - Fl_Tree(int X, int Y, int W, int H, const char *L=0); - ~Fl_Tree(); - int handle(int e); - void draw(); - void show_self(); - void resize(int,int,int,int); - - /////////////////////// - // root methods - /////////////////////// - void root_label(const char *new_label); - Fl_Tree_Item* root(); - void root(Fl_Tree_Item *newitem); - const Fl_Tree_Prefs& prefs() const { return _prefs; } - - //////////////////////////////// - // Item creation/removal methods - //////////////////////////////// -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree_Item *add(const char *path, Fl_Tree_Item *newitem=0); -#else - Fl_Tree_Item *add(const char *path); - Fl_Tree_Item *add(const char *path, Fl_Tree_Item *newitem); -#endif - Fl_Tree_Item* add(Fl_Tree_Item *parent_item, const char *name); - Fl_Tree_Item *insert_above(Fl_Tree_Item *above, const char *name); - Fl_Tree_Item* insert(Fl_Tree_Item *item, const char *name, int pos); - int remove(Fl_Tree_Item *item); - void clear(); - void clear_children(Fl_Tree_Item *item); - - //////////////////////// - // Item lookup methods - //////////////////////// - Fl_Tree_Item *find_item(const char *path); - const Fl_Tree_Item *find_item(const char *path) const; - int item_pathname(char *pathname, int pathnamelen, const Fl_Tree_Item *item) const; -#if FLTK_ABI_VERSION >= 10303 - const Fl_Tree_Item* find_clicked(int yonly=0) const; - Fl_Tree_Item* find_clicked(int yonly=0); -#else - const Fl_Tree_Item *find_clicked() const; - Fl_Tree_Item *find_clicked(); -#endif - Fl_Tree_Item *item_clicked(); - Fl_Tree_Item *first(); - Fl_Tree_Item *first_visible(); // deprecated in ABI 10303 - Fl_Tree_Item *first_visible_item(); - Fl_Tree_Item *next(Fl_Tree_Item *item=0); - Fl_Tree_Item *prev(Fl_Tree_Item *item=0); - Fl_Tree_Item *last(); - Fl_Tree_Item *last_visible(); // deprecated in ABI 10303 - Fl_Tree_Item *last_visible_item(); -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree_Item *next_visible_item(Fl_Tree_Item *start, int dir); // made public in 1.3.3 ABI -#endif - Fl_Tree_Item *first_selected_item(); - Fl_Tree_Item *last_selected_item(); - Fl_Tree_Item *next_item(Fl_Tree_Item *item, int dir=FL_Down, bool visible=false); -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item=0, int dir=FL_Down); - int get_selected_items(Fl_Tree_Item_Array &ret_items); -#else - Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item=0); - Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item, int dir); -#endif - - ////////////////////////// - // Item open/close methods - ////////////////////////// - int open(Fl_Tree_Item *item, int docallback=1); - int open(const char *path, int docallback=1); - void open_toggle(Fl_Tree_Item *item, int docallback=1); - int close(Fl_Tree_Item *item, int docallback=1); - int close(const char *path, int docallback=1); - int is_open(Fl_Tree_Item *item) const; - int is_open(const char *path) const; - int is_close(Fl_Tree_Item *item) const; - int is_close(const char *path) const; - - ///////////////////////// - // Item selection methods - ///////////////////////// - int select(Fl_Tree_Item *item, int docallback=1); - int select(const char *path, int docallback=1); - void select_toggle(Fl_Tree_Item *item, int docallback=1); - int deselect(Fl_Tree_Item *item, int docallback=1); - int deselect(const char *path, int docallback=1); - int deselect_all(Fl_Tree_Item *item=0, int docallback=1); - int select_only(Fl_Tree_Item *selitem, int docallback=1); - int select_all(Fl_Tree_Item *item=0, int docallback=1); - int extend_selection_dir(Fl_Tree_Item *from, - Fl_Tree_Item *to, - int dir, - int val, - bool visible); -#if FLTK_ABI_VERSION >= 10303 - int extend_selection(Fl_Tree_Item *from, - Fl_Tree_Item *to, - int val=1, - bool visible=false); -#else -private: - // Adding overload if not at least one overload breaks ABI, so avoid - // by keeping private until we can break ABI. ref: http://www.ros.org/reps/rep-0009.html - int extend_selection__(Fl_Tree_Item *from, - Fl_Tree_Item *to, - int val, - bool visible); -public: -#endif - void set_item_focus(Fl_Tree_Item *item); - Fl_Tree_Item *get_item_focus() const; - int is_selected(Fl_Tree_Item *item) const; - int is_selected(const char *path); - - ///////////////////////////////// - // Item attribute related methods - ///////////////////////////////// - Fl_Font item_labelfont() const; - void item_labelfont(Fl_Font val); - Fl_Fontsize item_labelsize() const; - void item_labelsize(Fl_Fontsize val); - Fl_Color item_labelfgcolor(void) const; - void item_labelfgcolor(Fl_Color val); - Fl_Color item_labelbgcolor(void) const; - void item_labelbgcolor(Fl_Color val); - Fl_Color connectorcolor() const; - void connectorcolor(Fl_Color val); - int marginleft() const; - void marginleft(int val); - int margintop() const; - void margintop(int val); -#if FLTK_ABI_VERSION >= 10301 - int marginbottom() const; - void marginbottom(int val); -#endif /*FLTK_ABI_VERSION*/ - int linespacing() const; - void linespacing(int val); - int openchild_marginbottom() const; - void openchild_marginbottom(int val); - int usericonmarginleft() const; - void usericonmarginleft(int val); - int labelmarginleft() const; - void labelmarginleft(int val); -#if FLTK_ABI_VERSION >= 10301 - int widgetmarginleft() const; - void widgetmarginleft(int val); -#endif /*FLTK_ABI_VERSION*/ - int connectorwidth() const; - void connectorwidth(int val); - Fl_Image* usericon() const; - void usericon(Fl_Image *val); - Fl_Image* openicon() const; - void openicon(Fl_Image *val); - Fl_Image* closeicon() const; - void closeicon(Fl_Image *val); - int showcollapse() const; - void showcollapse(int val); - int showroot() const; - void showroot(int val); - Fl_Tree_Connector connectorstyle() const; - void connectorstyle(Fl_Tree_Connector val); - Fl_Tree_Sort sortorder() const; - void sortorder(Fl_Tree_Sort val); - Fl_Boxtype selectbox() const; - void selectbox(Fl_Boxtype val); - Fl_Tree_Select selectmode() const; - void selectmode(Fl_Tree_Select val); -#if FLTK_ABI_VERSION >= 10301 - Fl_Tree_Item_Reselect_Mode item_reselect_mode() const; - void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode); - Fl_Tree_Item_Draw_Mode item_draw_mode() const; - void item_draw_mode(Fl_Tree_Item_Draw_Mode mode); - void item_draw_mode(int mode); -#endif -#if FLTK_ABI_VERSION >= 10303 - void calc_dimensions(); - void calc_tree(); -#endif - void recalc_tree(); - int displayed(Fl_Tree_Item *item); - void show_item(Fl_Tree_Item *item, int yoff); - void show_item(Fl_Tree_Item *item); - void show_item_top(Fl_Tree_Item *item); - void show_item_middle(Fl_Tree_Item *item); - void show_item_bottom(Fl_Tree_Item *item); - void display(Fl_Tree_Item *item); - int vposition() const; - void vposition(int pos); - int hposition() const; - void hposition(int pos); - - int is_scrollbar(Fl_Widget *w); - int scrollbar_size() const; - void scrollbar_size(int size); - int is_vscroll_visible() const; - int is_hscroll_visible() const; - - /////////////////////// - // callback related - /////////////////////// - void callback_item(Fl_Tree_Item* item); - Fl_Tree_Item* callback_item(); - void callback_reason(Fl_Tree_Reason reason); - Fl_Tree_Reason callback_reason() const; - - /// Load FLTK preferences - void load(class Fl_Preferences&); -}; - -#endif /*FL_TREE_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tree_Item.H b/msvc/fltk/include/FL/Fl_Tree_Item.H deleted file mode 100644 index feddcf61..00000000 --- a/msvc/fltk/include/FL/Fl_Tree_Item.H +++ /dev/null @@ -1,549 +0,0 @@ -// -// "$Id$" -// - -#ifndef FL_TREE_ITEM_H -#define FL_TREE_ITEM_H - -#include -#include -#include -#include - -#include -#include - -////////////////////// -// FL/Fl_Tree_Item.H -////////////////////// -// -// Fl_Tree -- This file is part of the Fl_Tree widget for FLTK -// Copyright (C) 2009-2010 by Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/// -/// \file -/// \brief This file contains the definitions for Fl_Tree_Item -/// - -/// \class Fl_Tree_Item -/// \brief Tree widget item. -/// -/// This class is a single tree item, and manages all of the item's attributes. -/// Fl_Tree_Item is used by Fl_Tree, which is comprised of many instances of Fl_Tree_Item. -/// -/// Fl_Tree_Item is hierarchical; it dynamically manages an Fl_Tree_Item_Array of children -/// that are themselves instances of Fl_Tree_Item. Each item can have zero or more children. -/// When an item has children, close() and open() can be used to hide or show them. -/// -/// Items have their own attributes; font size, face, color. -/// Items maintain their own hierarchy of children. -/// -/// When you make changes to items, you'll need to tell the tree to redraw() -/// for the changes to show up. -/// -/// New 1.3.3 ABI feature: -/// You can define custom items by either adding a custom widget to the item -/// with Fl_Tree_Item::widget(), or override the draw_item_content() method -/// if you want to just redefine how the label is drawn. -/// -/// The following shows the Fl_Tree_Item's dimensions, useful when overriding -/// the draw_item_content() method: -/// -/// \image html Fl_Tree_Item-dimensions.png "Fl_Tree_Item's internal dimensions." width=6cm -/// \image latex Fl_Tree_Item-dimensions.png "Fl_Tree_Item's internal dimensions." width=6cm -/// -class Fl_Tree; -class FL_EXPORT Fl_Tree_Item { -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree *_tree; // parent tree -#endif - const char *_label; // label (memory managed) - Fl_Font _labelfont; // label's font face - Fl_Fontsize _labelsize; // label's font size - Fl_Color _labelfgcolor; // label's fg color - Fl_Color _labelbgcolor; // label's bg color (0xffffffff is 'transparent') -#if FLTK_ABI_VERSION >= 10303 - /// \enum Fl_Tree_Item_Flags - enum Fl_Tree_Item_Flags { -#else - /// \enum - enum { -#endif - OPEN = 1<<0, ///> item is open - VISIBLE = 1<<1, ///> item is visible - ACTIVE = 1<<2, ///> item is active - SELECTED = 1<<3 ///> item is selected - }; -#if FLTK_ABI_VERSION >= 10301 - // NEW - unsigned short _flags; // misc flags -#else /*FLTK_ABI_VERSION*/ - // OLD: this will go away after 1.3.x - char _open; // item is open? - char _visible; // item is visible? - char _active; // item activated? - char _selected; // item selected? -#endif /*FLTK_ABI_VERSION*/ - int _xywh[4]; // xywh of this widget (if visible) - int _collapse_xywh[4]; // xywh of collapse icon (if visible) - int _label_xywh[4]; // xywh of label - Fl_Widget *_widget; // item's label widget (optional) - Fl_Image *_usericon; // item's user-specific icon (optional) -#if FLTK_ABI_VERSION >= 10304 - Fl_Image *_userdeicon; // deactivated usericon -#endif - Fl_Tree_Item_Array _children; // array of child items - Fl_Tree_Item *_parent; // parent item (=0 if root) - void *_userdata; // user data that can be associated with an item -#if FLTK_ABI_VERSION >= 10301 - Fl_Tree_Item *_prev_sibling; // previous sibling (same level) - Fl_Tree_Item *_next_sibling; // next sibling (same level) -#endif /*FLTK_ABI_VERSION*/ - // Protected methods -protected: - void _Init(const Fl_Tree_Prefs &prefs, Fl_Tree *tree); - void show_widgets(); - void hide_widgets(); - void draw_vertical_connector(int x, int y1, int y2, const Fl_Tree_Prefs &prefs); - void draw_horizontal_connector(int x1, int x2, int y, const Fl_Tree_Prefs &prefs); - void recalc_tree(); - int calc_item_height(const Fl_Tree_Prefs &prefs) const; -#if FLTK_ABI_VERSION >= 10303 - Fl_Color drawfgcolor() const; - Fl_Color drawbgcolor() const; -#endif - -public: - Fl_Tree_Item(const Fl_Tree_Prefs &prefs); // CTOR -- backwards compatible -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree_Item(Fl_Tree *tree); // CTOR -- ABI 1.3.3+ - virtual ~Fl_Tree_Item(); // DTOR -- ABI 1.3.3+ -#else - ~Fl_Tree_Item(); // DTOR -- backwards compatible -#endif - Fl_Tree_Item(const Fl_Tree_Item *o); // COPY CTOR - /// The item's x position relative to the window - int x() const { return(_xywh[0]); } - /// The item's y position relative to the window - int y() const { return(_xywh[1]); } - /// The entire item's width to right edge of Fl_Tree's inner width - /// within scrollbars. - int w() const { return(_xywh[2]); } - /// The item's height - int h() const { return(_xywh[3]); } - /// The item's label x position relative to the window - /// \version 1.3.3 - int label_x() const { return(_label_xywh[0]); } - /// The item's label y position relative to the window - /// \version 1.3.3 - int label_y() const { return(_label_xywh[1]); } - /// The item's maximum label width to right edge of Fl_Tree's inner width - /// within scrollbars. - /// \version 1.3.3 - int label_w() const { return(_label_xywh[2]); } - /// The item's label height - /// \version 1.3.3 - int label_h() const { return(_label_xywh[3]); } -#if FLTK_ABI_VERSION >= 10303 - virtual int draw_item_content(int render); - void draw(int X, int &Y, int W, Fl_Tree_Item *itemfocus, - int &tree_item_xmax, int lastchild=1, int render=1); -#else - void draw(int X, int &Y, int W, Fl_Widget *tree, - Fl_Tree_Item *itemfocus, const Fl_Tree_Prefs &prefs, int lastchild=1); -#endif - void show_self(const char *indent = "") const; - void label(const char *val); - const char *label() const; - - /// Set a user-data value for the item. - inline void user_data( void* data ) { _userdata = data; } - - /// Retrieve the user-data value that has been assigned to the item. - inline void* user_data() const { return _userdata; } - - /// Set item's label font face. - void labelfont(Fl_Font val) { - _labelfont = val; - recalc_tree(); // may change tree geometry - } - /// Get item's label font face. - Fl_Font labelfont() const { - return(_labelfont); - } - /// Set item's label font size. - void labelsize(Fl_Fontsize val) { - _labelsize = val; - recalc_tree(); // may change tree geometry - } - /// Get item's label font size. - Fl_Fontsize labelsize() const { - return(_labelsize); - } - /// Set item's label foreground text color. - void labelfgcolor(Fl_Color val) { - _labelfgcolor = val; - } - /// Return item's label foreground text color. - Fl_Color labelfgcolor() const { - return(_labelfgcolor); - } - /// Set item's label text color. Alias for labelfgcolor(Fl_Color)). - void labelcolor(Fl_Color val) { - labelfgcolor(val); - } - /// Return item's label text color. Alias for labelfgcolor() const). - Fl_Color labelcolor() const { - return labelfgcolor(); - } - /// Set item's label background color. - /// A special case is made for color 0xffffffff which uses the parent tree's bg color. - void labelbgcolor(Fl_Color val) { - _labelbgcolor = val; - } - /// Return item's label background text color. - /// If the color is 0xffffffff, the default behavior is the parent tree's - /// bg color will be used. (An overloaded draw_item_content() can override - /// this behavior.) - Fl_Color labelbgcolor() const { - return(_labelbgcolor); - } - /// Assign an FLTK widget to this item. - void widget(Fl_Widget *val) { - _widget = val; - recalc_tree(); // may change tree geometry - } - /// Return FLTK widget assigned to this item. - Fl_Widget *widget() const { - return(_widget); - } - /// Return the number of children this item has. - int children() const { - return(_children.total()); - } - /// Return the child item for the given 'index'. - Fl_Tree_Item *child(int index) { - return(_children[index]); - } - /// Return the const child item for the given 'index'. - const Fl_Tree_Item *child(int t) const; - /// See if this item has children. - int has_children() const { - return(children()); - } - int find_child(const char *name); - int find_child(Fl_Tree_Item *item); - int remove_child(Fl_Tree_Item *item); - int remove_child(const char *new_label); - void clear_children(); - void swap_children(int ax, int bx); - int swap_children(Fl_Tree_Item *a, Fl_Tree_Item *b); - const Fl_Tree_Item *find_child_item(const char *name) const; - Fl_Tree_Item *find_child_item(const char *name); - const Fl_Tree_Item *find_child_item(char **arr) const; - Fl_Tree_Item *find_child_item(char **arr); - const Fl_Tree_Item *find_item(char **arr) const; - Fl_Tree_Item *find_item(char **arr); - ////////////////// - // Adding items - ////////////////// - Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - const char *new_label, - Fl_Tree_Item *newitem); - Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - const char *new_label); - Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - char **arr, - Fl_Tree_Item *newitem); - Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, - char **arr); -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree_Item *replace(Fl_Tree_Item *new_item); - Fl_Tree_Item *replace_child(Fl_Tree_Item *olditem, Fl_Tree_Item *newitem); -#endif - Fl_Tree_Item *insert(const Fl_Tree_Prefs &prefs, const char *new_label, int pos=0); - Fl_Tree_Item *insert_above(const Fl_Tree_Prefs &prefs, const char *new_label); - Fl_Tree_Item* deparent(int index); - int reparent(Fl_Tree_Item *newchild, int index); - int move(int to, int from); - int move(Fl_Tree_Item *item, int op=0, int pos=0); - int move_above(Fl_Tree_Item *item); - int move_below(Fl_Tree_Item *item); - int move_into(Fl_Tree_Item *item, int pos=0); - int depth() const; - Fl_Tree_Item *prev(); - Fl_Tree_Item *next(); - Fl_Tree_Item *next_sibling(); - Fl_Tree_Item *prev_sibling(); - void update_prev_next(int index); - Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs); // deprecated - Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs); // deprecated - Fl_Tree_Item *next_visible(Fl_Tree_Prefs &prefs); - Fl_Tree_Item *prev_visible(Fl_Tree_Prefs &prefs); - - /// Return the parent for this item. Returns NULL if we are the root. - Fl_Tree_Item *parent() { - return(_parent); - } - /// Return the const parent for this item. Returns NULL if we are the root. - const Fl_Tree_Item *parent() const { - return(_parent); - } - /// Set the parent for this item. - /// Should only be used by Fl_Tree's internals. - /// - void parent(Fl_Tree_Item *val) { - _parent = val; - } -#if FLTK_ABI_VERSION >= 10303 - const Fl_Tree_Prefs& prefs() const; - /// Return the tree for this item. - /// \version 1.3.3 (ABI feature) - const Fl_Tree *tree() const { - return(_tree); - } -#endif -#if FLTK_ABI_VERSION >= 10304 - /// Return the tree for this item. - /// \version 1.3.4 (ABI feature) - Fl_Tree *tree() { - return(_tree); - } -#endif - ////////////////// - // State - ////////////////// - void open(); - void close(); - /// See if the item is 'open'. - int is_open() const { - return(is_flag(OPEN)); - } - /// See if the item is 'closed'. - int is_close() const { - return(is_flag(OPEN)?0:1); - } - /// Toggle the item's open/closed state. - void open_toggle() { - is_open()?close():open(); // handles calling recalc_tree() - } - /// Change the item's selection state to the optionally specified 'val'. - /// If 'val' is not specified, the item will be selected. - /// - void select(int val=1) { - set_flag(SELECTED, val); - } - /// Toggle the item's selection state. - void select_toggle() { - if ( is_selected() ) { - deselect(); // deselect if selected - } else { - select(); // select if deselected - } - } - /// Select item and all its children. - /// Returns count of how many items were in the 'deselected' state, - /// ie. how many items were "changed". - /// - int select_all() { - int count = 0; - if ( ! is_selected() ) { - select(); - ++count; - } - for ( int t=0; tselect_all(); - } - return(count); - } - /// Disable the item's selection state. - void deselect() { - set_flag(SELECTED, 0); - } - /// Deselect item and all its children. - /// Returns count of how many items were in the 'selected' state, - /// ie. how many items were "changed". - /// - int deselect_all() { - int count = 0; - if ( is_selected() ) { - deselect(); - ++count; - } - for ( int t=0; tdeselect_all(); - } - return(count); - } - /// See if the item is selected. - char is_selected() const { - return(is_flag(SELECTED)); - } - /// Change the item's activation state to the optionally specified 'val'. - /// - /// When deactivated, the item will be 'grayed out'; the callback() - /// won't be invoked if the user clicks on the label. If a widget() - /// is associated with the item, its activation state will be changed as well. - /// - /// If 'val' is not specified, the item will be activated. - /// - void activate(int val=1) { - set_flag(ACTIVE,val); - if ( _widget && val != (int)_widget->active() ) { - if ( val ) { - _widget->activate(); - } else { - _widget->deactivate(); - } - _widget->redraw(); - } - } - /// Deactivate the item; the callback() won't be invoked when clicked. - /// Same as activate(0) - /// - void deactivate() { - activate(0); - } - /// See if the item is activated. - char is_activated() const { - return(is_flag(ACTIVE)); - } - /// See if the item is activated. Alias for is_activated(). - char is_active() const { - return(is_activated()); - } - /// See if the item is visible. Alias for is_visible(). - int visible() const { - return(is_visible()); - } - /// See if the item is visible. - int is_visible() const { - return(is_flag(VISIBLE)); - } - int visible_r() const; - - /// Set the item's user icon to an Fl_Image. Use '0' to disable. - /// No internal copy is made, caller must manage icon's memory. - /// - /// Note, if you expect your items to be deactivated(), - /// use userdeicon(Fl_Image*) to set up a 'grayed out' version of your icon - /// to be used for display. - /// - /// \see userdeicon(Fl_Image*) - /// - void usericon(Fl_Image *val) { - _usericon = val; - recalc_tree(); // may change tree geometry - } - /// Get the item's user icon as an Fl_Image. Returns '0' if disabled. - Fl_Image *usericon() const { - return(_usericon); - } - /// Set the usericon to draw when the item is deactivated. Use '0' to disable. - /// No internal copy is made; caller must manage icon's memory. - /// - /// To create a typical 'grayed out' version of your usericon image, - /// you can do the following: - /// - /// \code - /// // Create tree + usericon for items - /// Fl_Tree *tree = new Fl_Tree(..); - /// Fl_Image *usr_icon = new Fl_Pixmap(..); // your usericon - /// Fl_Image *de_icon = usr_icon->copy(); // make a copy, and.. - /// de_icon->inactive(); // make it 'grayed out' - /// ... - /// for ( .. ) { // item loop.. - /// item = tree->add("..."); // create new item - /// item->usericon(usr_icon); // assign usericon to items - /// item->userdeicon(de_icon); // assign userdeicon to items - /// .. - /// } - /// \endcode - /// - /// In the above example, the app should 'delete' the two icons - /// when they're no longer needed (e.g. after the tree is destroyed) - /// - /// \version 1.3.4 - /// -#if FLTK_ABI_VERSION >= 10304 - void userdeicon(Fl_Image* val) { - _userdeicon = val; - } - /// Return the deactivated version of the user icon, if any. - /// Returns 0 if none. - Fl_Image* userdeicon() const { - return _userdeicon; - } -#endif - ////////////////// - // Events - ////////////////// -#if FLTK_ABI_VERSION >= 10303 - const Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs, int yonly=0) const; - Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs, int yonly=0); -#else - const Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs) const; - Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs); -#endif - int event_on_collapse_icon(const Fl_Tree_Prefs &prefs) const; - int event_on_label(const Fl_Tree_Prefs &prefs) const; - /// Is this item the root of the tree? - int is_root() const { - return(_parent==0?1:0); - } - - // Protected methods - // TODO: move these to top 'protected:' section -protected: -#if FLTK_ABI_VERSION >= 10301 - /// Set a flag to an on or off value. val is 0 or 1. - inline void set_flag(unsigned short flag,int val) { - if ( flag==OPEN || flag==VISIBLE ) { - recalc_tree(); // may change tree geometry - } - if ( val ) _flags |= flag; else _flags &= ~flag; - } - /// See if flag set. Returns 0 or 1. - inline int is_flag(unsigned short val) const { - return(_flags & val ? 1 : 0); - } -#else /*FLTK_ABI_VERSION*/ - /// Set a flag to an on or off value. val is 0 or 1. - void set_flag(unsigned short flag,int val) { - switch (flag) { - case OPEN: _open = val; break; - case VISIBLE: _visible = val; break; - case ACTIVE: _active = val; break; - case SELECTED: _selected = val; break; - } - } - /// See if flag set. Returns 0 or 1. - int is_flag(unsigned short flag) const { - switch (flag) { - case OPEN: return(_open ? 1 : 0); - case VISIBLE: return(_visible ? 1 : 0); - case ACTIVE: return(_active ? 1 : 0); - case SELECTED: return(_selected ? 1 : 0); - default: return(0); - } - } -#endif /*FLTK_ABI_VERSION*/ - -}; - -#endif /*FL_TREE_ITEM_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tree_Item_Array.H b/msvc/fltk/include/FL/Fl_Tree_Item_Array.H deleted file mode 100644 index 786dce84..00000000 --- a/msvc/fltk/include/FL/Fl_Tree_Item_Array.H +++ /dev/null @@ -1,113 +0,0 @@ -// -// "$Id$" -// - -#ifndef _FL_TREE_ITEM_ARRAY_H -#define _FL_TREE_ITEM_ARRAY_H - -#include -#include "Fl_Export.H" - -class Fl_Tree_Item; // forward decl must *precede* first doxygen comment block - // or doxygen will not document our class.. - -////////////////////////// -// FL/Fl_Tree_Item_Array.H -////////////////////////// -// -// Fl_Tree -- This file is part of the Fl_Tree widget for FLTK -// Copyright (C) 2009-2010 by Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/// -/// \file -/// \brief This file defines a class that manages an array of Fl_Tree_Item pointers. -/// - -/// \brief Manages an array of Fl_Tree_Item pointers. -/// -/// Because FLTK 1.x.x. has mandated that templates and STL not be used, -/// we use this class to dynamically manage the arrays. -/// -/// None of the methods do range checking on index values; the caller -/// must be sure that index values are within the range 0= 10303 - enum { - MANAGE_ITEM = 1, ///> manage the Fl_Tree_Item's internals (internal use only) - }; - char _flags; // flags to control behavior -#endif - void enlarge(int count); -public: - Fl_Tree_Item_Array(int new_chunksize = 10); // CTOR - ~Fl_Tree_Item_Array(); // DTOR - Fl_Tree_Item_Array(const Fl_Tree_Item_Array *o); // COPY CTOR - /// Return the item and index \p i. - Fl_Tree_Item *operator[](int i) { - return(_items[i]); - } - /// Const version of operator[](int i) - const Fl_Tree_Item *operator[](int i) const { - return(_items[i]); - } - /// Return the total items in the array, or 0 if empty. - int total() const { - return(_total); - } - /// Swap the two items at index positions \p ax and \p bx. -#if FLTK_ABI_VERSION >= 10301 - // NEW -- code moved to .cxx - void swap(int ax, int bx); -#else /*FLTK_ABI_VERSION*/ - // OLD - void swap(int ax, int bx) { - Fl_Tree_Item *asave = _items[ax]; - _items[ax] = _items[bx]; - _items[bx] = asave; - } -#endif /*FLTK_ABI_VERSION*/ - int move(int to, int from); - int deparent(int pos); - int reparent(Fl_Tree_Item *item, Fl_Tree_Item *newparent, int pos); - void clear(); - void add(Fl_Tree_Item *val); - void insert(int pos, Fl_Tree_Item *new_item); - void replace(int pos, Fl_Tree_Item *new_item); - void remove(int index); - int remove(Fl_Tree_Item *item); -#if FLTK_ABI_VERSION >= 10303 - /// Option to control if Fl_Tree_Item_Array's destructor will also destroy the Fl_Tree_Item's. - /// If set: items and item array is destroyed. - /// If clear: only the item array is destroyed, not items themselves. - void manage_item_destroy(int val) { - if ( val ) _flags |= MANAGE_ITEM; else _flags &= ~MANAGE_ITEM; - } - int manage_item_destroy() const { - return _flags & MANAGE_ITEM ? 1 : 0; - } -#endif -}; - -#endif /*_FL_TREE_ITEM_ARRAY_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Tree_Prefs.H b/msvc/fltk/include/FL/Fl_Tree_Prefs.H deleted file mode 100644 index 7c080a31..00000000 --- a/msvc/fltk/include/FL/Fl_Tree_Prefs.H +++ /dev/null @@ -1,484 +0,0 @@ -// -// "$Id$" -// - -#ifndef FL_TREE_PREFS_H -#define FL_TREE_PREFS_H - -#include // needed for ABI version features (via Enumerations.H) - -////////////////////// -// FL/Fl_Tree_Prefs.H -////////////////////// -// -// Fl_Tree_Prefs -- This file is part of the Fl_Tree widget for FLTK -// Copyright (C) 2009-2010 by Greg Ercolano. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/// -/// \file -/// \brief This file contains the definitions for Fl_Tree's preferences. -/// -/// \code -/// Fl_Tree_Prefs -/// : -/// .....:....... -/// : : -/// Fl_Tree : -/// |_____ Fl_Tree_Item -/// -/// \endcode -/// - -/// \class Fl_Tree_Prefs -/// \brief Tree widget's preferences. - -/// \enum Fl_Tree_Sort -/// Sort order options for items added to the tree -/// -enum Fl_Tree_Sort { - FL_TREE_SORT_NONE=0, ///< No sorting; items are added in the order defined (default). - FL_TREE_SORT_ASCENDING=1, ///< Add items in ascending sort order. - FL_TREE_SORT_DESCENDING=2 ///< Add items in descending sort order. -}; - -/// \enum Fl_Tree_Connector -/// Defines the style of connection lines between items. -/// -enum Fl_Tree_Connector { - FL_TREE_CONNECTOR_NONE=0, ///< Use no lines connecting items - FL_TREE_CONNECTOR_DOTTED=1, ///< Use dotted lines connecting items (default) - FL_TREE_CONNECTOR_SOLID=2 ///< Use solid lines connecting items -}; - -/// \enum Fl_Tree_Select -/// Tree selection style. -/// -enum Fl_Tree_Select { - FL_TREE_SELECT_NONE=0, ///< Nothing selected when items are clicked - FL_TREE_SELECT_SINGLE=1, ///< Single item selected when item is clicked (default) - FL_TREE_SELECT_MULTI=2, ///< Multiple items can be selected by clicking - ///< with SHIFT, CTRL or mouse drags. - FL_TREE_SELECT_SINGLE_DRAGGABLE=3 ///< Single items may be selected, and they may be - ///< reordered by mouse drag. -}; - -#if FLTK_ABI_VERSION >= 10301 -/// \enum Fl_Tree_Item_Reselect_Mode -/// Defines the ways an item can be (re) selected -/// via item_reselect_mode(). -/// -enum Fl_Tree_Item_Reselect_Mode { - FL_TREE_SELECTABLE_ONCE=0, ///< Item can only be selected once (default) - FL_TREE_SELECTABLE_ALWAYS, ///< Enables FL_TREE_REASON_RESELECTED events for callbacks -}; - -/// \enum Fl_Tree_Item_Draw_Mode -/// Bit flags that control how item's labels and widget()s are drawn in the tree -/// via item_draw_mode(). -/// -enum Fl_Tree_Item_Draw_Mode { - FL_TREE_ITEM_DRAW_DEFAULT=0, ///< If widget() defined, draw in place of label, - ///< and widget() tracks item height (default) - FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET=1, ///< If widget() defined, include label to the left of the widget - FL_TREE_ITEM_HEIGHT_FROM_WIDGET=2 ///< If widget() defined, widget()'s height controls item's height -}; -#endif /*FLTK_ABI_VERSION*/ - -#if FLTK_ABI_VERSION >= 10303 -class Fl_Tree_Item; -typedef void (Fl_Tree_Item_Draw_Callback)(Fl_Tree_Item*, void*); -#endif - -/// \class Fl_Tree_Prefs -/// -/// \brief Fl_Tree's Preferences class. -/// -/// This class manages the Fl_Tree's defaults. -/// You should probably be using the methods in Fl_Tree -/// instead of trying to accessing tree's preferences settings directly. -/// -class FL_EXPORT Fl_Tree_Prefs { - Fl_Font _labelfont; // label's font face - Fl_Fontsize _labelsize; // label's font size - int _margintop; // -- - int _marginleft; // |- tree's controllable margins -#if FLTK_ABI_VERSION >= 10301 - int _marginbottom; // -- -#endif - int _openchild_marginbottom; // extra space below an open child tree - int _usericonmarginleft; // space to left of user icon (if any) - int _labelmarginleft; // space to left of label -#if FLTK_ABI_VERSION >= 10301 - int _widgetmarginleft; // space to left of widget -#endif - int _connectorwidth; // connector width (right of open/close icon) - int _linespacing; // vertical space between lines - // Colors - Fl_Color _labelfgcolor; // label's foreground color - Fl_Color _labelbgcolor; // label's background color - Fl_Color _connectorcolor; // connector dotted line color - Fl_Tree_Connector _connectorstyle; // connector line style - Fl_Image *_openimage; // the 'open' icon [+] - Fl_Image *_closeimage; // the 'close' icon [-] - Fl_Image *_userimage; // user's own icon -#if FLTK_ABI_VERSION >= 10304 - Fl_Image *_opendeimage; // deactivated 'open' icon - Fl_Image *_closedeimage; // deactivated 'close' icon - Fl_Image *_userdeimage; // deactivated user icon -#endif - char _showcollapse; // 1=show collapse icons, 0=don't - char _showroot; // show the root item as part of the tree - Fl_Tree_Sort _sortorder; // none, ascening, descending, etc. - Fl_Boxtype _selectbox; // selection box type - Fl_Tree_Select _selectmode; // selection mode -#if FLTK_ABI_VERSION >= 10301 - Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior - Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget() -#endif /*FLTK_ABI_VERSION*/ -#if FLTK_ABI_VERSION >= 10303 - Fl_Tree_Item_Draw_Callback *_itemdrawcallback; // callback to handle drawing items (0=none) - void *_itemdrawuserdata; // data for drawing items (0=none) -#endif -public: - Fl_Tree_Prefs(); -#if FLTK_ABI_VERSION >= 10304 - ~Fl_Tree_Prefs(); -#endif - - //////////////////////////// - // Labels - //////////////////////////// - /// Return the label's font. - inline Fl_Font item_labelfont() const { return(_labelfont); } - /// Set the label's font to \p val. - inline void item_labelfont(Fl_Font val) { _labelfont = val; } - /// Return the label's size in pixels. - inline Fl_Fontsize item_labelsize() const { return(_labelsize); } - /// Set the label's size in pixels to \p val. - inline void item_labelsize(Fl_Fontsize val) { _labelsize = val; } - /// Get the default label foreground color - inline Fl_Color item_labelfgcolor() const { return(_labelfgcolor); } - /// Set the default label foreground color - inline void item_labelfgcolor(Fl_Color val) { _labelfgcolor = val; } -#if FLTK_ABI_VERSION >= 10301 - /// Get the default label background color. - /// This returns the Fl_Tree::color() unless item_labelbgcolor() - /// has been set explicitly. - /// - inline Fl_Color item_labelbgcolor() const { - return _labelbgcolor; - } - /// Set the default label background color. - /// Once set, overrides the default behavior of using Fl_Tree::color(). - /// - inline void item_labelbgcolor(Fl_Color val) { - _labelbgcolor = val; - } -#else /*FLTK_ABI_VERSION*/ - /// Get the default label background color - inline Fl_Color item_labelbgcolor() const { - return(_labelbgcolor); - } - /// Set the default label background color - inline void item_labelbgcolor(Fl_Color val) { - _labelbgcolor = val; - } -#endif /*FLTK_ABI_VERSION*/ - - ///////////////// - // Obsolete names - for 1.3.0 backwards compat - ///////////////// - /// Obsolete: Return the label's font. Please use item_labelfont() instead. - inline Fl_Font labelfont() const { return(_labelfont); } - /// Obsolete: Set the label's font to \p val. Please use item_labelfont(Fl_Font) instead. - inline void labelfont(Fl_Font val) { _labelfont = val; } - /// Obsolete: Return the label's size in pixels. Please use item_labelsize() instead. - inline Fl_Fontsize labelsize() const { return(_labelsize); } - /// Obsolete: Set the label's size in pixels to \p val. Please use item_labelsize(Fl_Fontsize) instead. - inline void labelsize(Fl_Fontsize val) { _labelsize = val; } - /// Obsolete: Get the default label foreground color. Please use item_labelfgcolor() instead. - inline Fl_Color labelfgcolor() const { return(_labelfgcolor); } - /// Obsolete: Set the default label foreground color. Please use item_labelfgcolor(Fl_Color) instead. - inline void labelfgcolor(Fl_Color val) { _labelfgcolor = val; } - /// Obsolete: Get the default label background color. Please use item_labelbgcolor() instead. - inline Fl_Color labelbgcolor() const { return(item_labelbgcolor()); } - /// Obsolete: Set the default label background color. Please use item_labelbgcolor(Fl_Color) instead. - inline void labelbgcolor(Fl_Color val) { item_labelbgcolor(val); } - - //////////////////////////// - // Margins - //////////////////////////// - /// Get the left margin's value in pixels - inline int marginleft() const { - return(_marginleft); - } - /// Set the left margin's value in pixels - inline void marginleft(int val) { - _marginleft = val; - } - /// Get the top margin's value in pixels - inline int margintop() const { - return(_margintop); - } - /// Set the top margin's value in pixels - inline void margintop(int val) { - _margintop = val; - } -#if FLTK_ABI_VERSION >= 10301 - /// Get the bottom margin's value in pixels. - /// This is the extra distance the vertical scroller lets you travel. - inline int marginbottom() const { - return(_marginbottom); - } - /// Set the bottom margin's value in pixels - /// This is the extra distance the vertical scroller lets you travel. - inline void marginbottom(int val) { - _marginbottom = val; - } -#endif /*FLTK_ABI_VERSION*/ - /// Get the margin below an open child in pixels - inline int openchild_marginbottom() const { - return(_openchild_marginbottom); - } - /// Set the margin below an open child in pixels - inline void openchild_marginbottom(int val) { - _openchild_marginbottom = val; - } - /// Get the user icon's left margin value in pixels - inline int usericonmarginleft() const { - return(_usericonmarginleft); - } - /// Set the user icon's left margin value in pixels - inline void usericonmarginleft(int val) { - _usericonmarginleft = val; - } - /// Get the label's left margin value in pixels - inline int labelmarginleft() const { - return(_labelmarginleft); - } - /// Set the label's left margin value in pixels - inline void labelmarginleft(int val) { - _labelmarginleft = val; - } -#if FLTK_ABI_VERSION >= 10301 - /// Get the widget()'s left margin value in pixels - inline int widgetmarginleft() const { - return(_widgetmarginleft); - } - /// Set the widget's left margin value in pixels - inline void widgetmarginleft(int val) { - _widgetmarginleft = val; - } -#endif /*FLTK_ABI_VERSION*/ - /// Get the line spacing value in pixels - inline int linespacing() const { - return(_linespacing); - } - /// Set the line spacing value in pixels - inline void linespacing(int val) { - _linespacing = val; - } - - //////////////////////////// - // Colors and Styles - //////////////////////////// - /// Get the connector color used for tree connection lines. - inline Fl_Color connectorcolor() const { - return(_connectorcolor); - } - /// Set the connector color used for tree connection lines. - inline void connectorcolor(Fl_Color val) { - _connectorcolor = val; - } - /// Get the connector style. - inline Fl_Tree_Connector connectorstyle() const { - return(_connectorstyle); - } - /// Set the connector style. - inline void connectorstyle(Fl_Tree_Connector val) { - _connectorstyle = val; - } - /// Set the connector style [integer]. - inline void connectorstyle(int val) { - _connectorstyle = Fl_Tree_Connector(val); - } - /// Get the tree connection line's width. - inline int connectorwidth() const { - return(_connectorwidth); - } - /// Set the tree connection line's width. - inline void connectorwidth(int val) { - _connectorwidth = val; - } - - //////////////////////////// - // Icons - //////////////////////////// - /// Get the current default 'open' icon. - /// Returns the Fl_Image* of the icon, or 0 if none. - /// - inline Fl_Image *openicon() const { - return(_openimage); - } - void openicon(Fl_Image *val); - /// Gets the default 'close' icon - /// Returns the Fl_Image* of the icon, or 0 if none. - /// - inline Fl_Image *closeicon() const { - return(_closeimage); - } - void closeicon(Fl_Image *val); - /// Gets the default 'user icon' (default is 0) - inline Fl_Image *usericon() const { - return(_userimage); - } - /// Sets the default 'user icon' - /// Returns the Fl_Image* of the icon, or 0 if none (default). - /// - inline void usericon(Fl_Image *val) { - _userimage = val; -#if FLTK_ABI_VERSION >= 10304 - // Update deactivated version of icon.. - if ( _userdeimage ) delete _userdeimage; - if ( _userimage ) { - _userdeimage = _userimage->copy(); - _userdeimage->inactive(); - } else { - _userdeimage = 0; - } -#endif - } - -#if FLTK_ABI_VERSION >= 10304 - /// Return the deactivated version of the open icon, if any. - /// Returns 0 if none. - inline Fl_Image *opendeicon() const { - return _opendeimage; - } - /// Return the deactivated version of the close icon, if any. - /// Returns 0 if none. - inline Fl_Image *closedeicon() const { - return _closedeimage; - } - /// Return the deactivated version of the user icon, if any. - /// Returns 0 if none. - inline Fl_Image *userdeicon() const { - return _userdeimage; - } -#endif - - //////////////////////////// - // Options - //////////////////////////// - /// Returns 1 if the collapse icon is enabled, 0 if not. - inline char showcollapse() const { - return(_showcollapse); - } - /// Set if we should show the collapse icon or not. - /// If collapse icons are disabled, the user will not be able - /// to interactively collapse items in the tree, unless the application - /// provides some other means via open() and close(). - /// - /// \param[in] val 1: shows collapse icons (default),\n - /// 0: hides collapse icons. - /// - inline void showcollapse(int val) { - _showcollapse = val; - } - /// Get the default sort order value - inline Fl_Tree_Sort sortorder() const { - return(_sortorder); - } - /// Set the default sort order value. - /// Defines the order new items appear when add()ed to the tree. - /// See Fl_Tree_Sort for possible values. - /// - inline void sortorder(Fl_Tree_Sort val) { - _sortorder = val; - } - /// Get the default selection box's box drawing style as an Fl_Boxtype. - inline Fl_Boxtype selectbox() const { - return(_selectbox); - } - /// Set the default selection box's box drawing style to \p val. - inline void selectbox(Fl_Boxtype val) { - _selectbox = val; - } - /// Returns 1 if the root item is to be shown, or 0 if not. - inline int showroot() const { - return(int(_showroot)); - } - /// Set if the root item should be shown or not. - /// \param[in] val 1 -- show the root item (default)\n - /// 0 -- hide the root item. - /// - inline void showroot(int val) { - _showroot = char(val); - } - /// Get the selection mode used for the tree - inline Fl_Tree_Select selectmode() const { - return(_selectmode); - } - /// Set the selection mode used for the tree to \p val. - /// This affects how items in the tree are selected - /// when clicked on and dragged over by the mouse. - /// See Fl_Tree_Select for possible values. - /// - inline void selectmode(Fl_Tree_Select val) { - _selectmode = val; - } -#if FLTK_ABI_VERSION >= 10301 - /// Returns the current item re/selection mode - Fl_Tree_Item_Reselect_Mode item_reselect_mode() const { - return _itemreselectmode; - } - /// Sets the item re/selection mode - void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode) { - _itemreselectmode = mode; - } - /// Get the 'item draw mode' used for the tree - inline Fl_Tree_Item_Draw_Mode item_draw_mode() const { - return(_itemdrawmode); - } - /// Set the 'item draw mode' used for the tree to \p val. - /// This affects how items in the tree are drawn, - /// such as when a widget() is defined. - /// See Fl_Tree_Item_Draw_Mode for possible values. - /// - inline void item_draw_mode(Fl_Tree_Item_Draw_Mode val) { - _itemdrawmode = val; - } -#endif -#if FLTK_ABI_VERSION >= 10303 - void item_draw_callback(Fl_Tree_Item_Draw_Callback *cb, void *data=0) { - _itemdrawcallback = cb; - _itemdrawuserdata = data; - } - Fl_Tree_Item_Draw_Callback* item_draw_callback() const { - return(_itemdrawcallback); - } - void* item_draw_user_data() const { - return(_itemdrawuserdata); - } - void do_item_draw_callback(Fl_Tree_Item *o) const { - _itemdrawcallback(o, _itemdrawuserdata); - } -#endif -}; - -#endif /*FL_TREE_PREFS_H*/ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Valuator.H b/msvc/fltk/include/FL/Fl_Valuator.H deleted file mode 100644 index 9fc36f7b..00000000 --- a/msvc/fltk/include/FL/Fl_Valuator.H +++ /dev/null @@ -1,138 +0,0 @@ -// -// "$Id$" -// -// Valuator header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Valuator widget . */ - -#ifndef Fl_Valuator_H -#define Fl_Valuator_H - -#ifndef Fl_Widget_H -#include "Fl_Widget.H" -#endif - -// shared type() values for classes that work in both directions: -#define FL_VERTICAL 0 ///< The valuator can work vertically -#define FL_HORIZONTAL 1 ///< The valuator can work horizontally - -/** - The Fl_Valuator class controls a single floating-point value - and provides a consistent interface to set the value, range, and step, - and insures that callbacks are done the same for every object. - - There are probably more of these classes in FLTK than any others: - -

\image html valuators.png

- \image latex valuators.png "Valuators derived from Fl_Valuators" width=10cm - - In the above diagram each box surrounds an actual subclass. These - are further differentiated by setting the type() of the widget to - the symbolic value labeling the widget. - The ones labelled "0" are the default versions with a type(0). - For consistency the symbol FL_VERTICAL is defined as zero. -*/ -class FL_EXPORT Fl_Valuator : public Fl_Widget { - - double value_; - double previous_value_; - double min, max; // truncates to this range *after* rounding - double A; int B; // rounds to multiples of A/B, or no rounding if A is zero - -protected: - /** Tells if the valuator is an FL_HORIZONTAL one */ - int horizontal() const {return type()& FL_HORIZONTAL;} - Fl_Valuator(int X, int Y, int W, int H, const char* L); - - /** Gets the previous floating point value before an event changed it */ - double previous_value() const {return previous_value_;} - /** Stores the current value in the previous value */ - void handle_push() {previous_value_ = value_;} - double softclamp(double); - void handle_drag(double newvalue); - void handle_release(); // use drag() value - virtual void value_damage(); // cause damage() due to value() changing - /** Sets the current floating point value. */ - void set_value(double v) {value_ = v;} - -public: - - /** Sets the minimum (a) and maximum (b) values for the valuator widget. */ - void bounds(double a, double b) {min=a; max=b;} - /** Gets the minimum value for the valuator. */ - double minimum() const {return min;} - /** Sets the minimum value for the valuator. */ - void minimum(double a) {min = a;} - /** Gets the maximum value for the valuator. */ - double maximum() const {return max;} - /** Sets the maximum value for the valuator. */ - void maximum(double a) {max = a;} - /** - Sets the minimum and maximum values for the valuator. When - the user manipulates the widget, the value is limited to this - range. This clamping is done after rounding to the step - value (this makes a difference if the range is not a multiple of - the step). - - The minimum may be greater than the maximum. This has the - effect of "reversing" the object so the larger values - are in the opposite direction. This also switches which end of - the filled sliders is filled. - - Some widgets consider this a "soft" range. This - means they will stop at the range, but if the user releases and - grabs the control again and tries to move it further, it is - allowed. - - The range may affect the display. You must redraw() - the widget after changing the range. - */ - void range(double a, double b) {min = a; max = b;} - /** See double Fl_Valuator::step() const */ - void step(int a) {A = a; B = 1;} - /** See double Fl_Valuator::step() const */ - void step(double a, int b) {A = a; B = b;} - void step(double s); - /** - Gets or sets the step value. As the user moves the mouse the - value is rounded to the nearest multiple of the step value. This - is done \e before clamping it to the range. For most widgets - the default step is zero. - - For precision the step is stored as the ratio of a double \p A and - an integer \p B = A/B. You can set these values directly. Currently - setting a floating point value sets the nearest A/1 or 1/B value - possible. - */ - double step() const {return A/B;} - void precision(int digits); - - /** Gets the floating point(double) value. See int value(double) */ - double value() const {return value_;} - int value(double); - - virtual int format(char*); - double round(double); // round to nearest multiple of step - double clamp(double); // keep in range - double increment(double, int); // add n*step to value -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Value_Input.H b/msvc/fltk/include/FL/Fl_Value_Input.H deleted file mode 100644 index e3753204..00000000 --- a/msvc/fltk/include/FL/Fl_Value_Input.H +++ /dev/null @@ -1,130 +0,0 @@ -// -// "$Id$" -// -// Value input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Value_Input widget . */ - -#ifndef Fl_Value_Input_H -#define Fl_Value_Input_H - -#include "Fl_Valuator.H" -#include "Fl_Input.H" - -/** - The Fl_Value_Input widget displays a numeric value. - The user can click in the text field and edit it - there is in - fact a hidden Fl_Input widget with - type(FL_FLOAT_INPUT) or type(FL_INT_INPUT) in - there - and when they hit return or tab the value updates to - what they typed and the callback is done. - -

If step() is non-zero and integral, then the range of numbers - is limited to integers instead of floating point numbers. As - well as displaying the value as an integer, typed input is also - limited to integer values, even if the hidden Fl_Input widget - is of type(FL_FLOAT_INPUT).

- -

If step() is non-zero, the user can also drag the - mouse across the object and thus slide the value. The left - button moves one step() per pixel, the middle by 10 - * step(), and the right button by 100 * step(). It - is therefore impossible to select text by dragging across it, - although clicking can still move the insertion cursor.

- -

If step() is non-zero and integral, then the range - of numbers are limited to integers instead of floating point - values. - -

\image html Fl_Value_Input.png - \image latex Fl_Value_Input.png "Fl_Value_Input" width=4cm -*/ -class FL_EXPORT Fl_Value_Input : public Fl_Valuator { -public: - /* This is the encapsulated Fl_input attribute to which - this class delegates the value font, color and shortcut */ - Fl_Input input; -private: - char soft_; - static void input_cb(Fl_Widget*,void*); - virtual void value_damage(); // cause damage() due to value() changing -public: - int handle(int); -protected: - void draw(); -public: - void resize(int,int,int,int); - Fl_Value_Input(int x,int y,int w,int h,const char *l=0); - ~Fl_Value_Input(); - - /** See void Fl_Value_Input::soft(char s) */ - void soft(char s) {soft_ = s;} - /** - If "soft" is turned on, the user is allowed to drag - the value outside the range. If they drag the value to one of - the ends, let go, then grab again and continue to drag, they can - get to any value. The default is true. - */ - char soft() const {return soft_;} - /** - Returns the current shortcut key for the Input. - \see Fl_Value_Input::shortcut(int) - */ - int shortcut() const {return input.shortcut();} - /** - Sets the shortcut key to \p s. Setting this - overrides the use of '&' in the label(). The value is a bitwise - OR of a key and a set of shift flags, for example FL_ALT | 'a' - , FL_ALT | (FL_F + 10), or just 'a'. A value - of 0 disables the shortcut. - - The key can be any value returned by - Fl::event_key(), but will usually be an ASCII letter. Use - a lower-case letter unless you require the shift key to be held down. - - The shift flags can be any set of values accepted by - Fl::event_state(). If the bit is on that shift key must - be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in - the shift flags (zero for the other bits indicates a "don't care" - setting). - */ - void shortcut(int s) {input.shortcut(s);} - - /** Gets the typeface of the text in the value box. */ - Fl_Font textfont() const {return input.textfont();} - /** Sets the typeface of the text in the value box. */ - void textfont(Fl_Font s) {input.textfont(s);} - /** Gets the size of the text in the value box. */ - Fl_Fontsize textsize() const {return input.textsize();} - /** Sets the size of the text in the value box. */ - void textsize(Fl_Fontsize s) {input.textsize(s);} - /** Gets the color of the text in the value box. */ - Fl_Color textcolor() const {return input.textcolor();} - /** Sets the color of the text in the value box.*/ - void textcolor(Fl_Color n) {input.textcolor(n);} - /** Gets the color of the text cursor. The text cursor is black by default. */ - Fl_Color cursor_color() const {return input.cursor_color();} - /** Sets the color of the text cursor. The text cursor is black by default. */ - void cursor_color(Fl_Color n) {input.cursor_color(n);} - -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Value_Output.H b/msvc/fltk/include/FL/Fl_Value_Output.H deleted file mode 100644 index 2d817f57..00000000 --- a/msvc/fltk/include/FL/Fl_Value_Output.H +++ /dev/null @@ -1,86 +0,0 @@ -// -// "$Id$" -// -// Value output header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Value_Output widget . */ - -#ifndef Fl_Value_Output_H -#define Fl_Value_Output_H - -#ifndef Fl_Valuator_H -#include "Fl_Valuator.H" -#endif - -/** - The Fl_Value_Output widget displays a floating point value. - If step() is not zero, the user can adjust the value by - dragging the mouse left and right. The left button moves one step() - per pixel, the middle by 10 * step(), and the right button by - 100 * step(). -

This is much lighter-weight than - Fl_Value_Input because it contains no text editing code or - character buffer.

-

\image html Fl_Value_Output.png - \image latex Fl_Value_Output.png "Fl_Value_Output" width=4cm -*/ -class FL_EXPORT Fl_Value_Output : public Fl_Valuator { - Fl_Font textfont_; - Fl_Fontsize textsize_; - uchar soft_; - Fl_Color textcolor_; - -protected: - void draw(); - -public: - int handle(int); - Fl_Value_Output(int x,int y,int w,int h,const char *l=0); - - /** - If "soft" is turned on, the user is allowed to drag the value outside - the range. If they drag the value to one of the ends, let go, then - grab again and continue to drag, they can get to any value. Default is - one. - */ - void soft(uchar s) {soft_ = s;} - /** - If "soft" is turned on, the user is allowed to drag the value outside - the range. If they drag the value to one of the ends, let go, then - grab again and continue to drag, they can get to any value. Default is - one. - */ - uchar soft() const {return soft_;} - - /** Gets the typeface of the text in the value box. */ - Fl_Font textfont() const {return textfont_;} - /** Sets the typeface of the text in the value box. */ - void textfont(Fl_Font s) {textfont_ = s;} - /** Gets the size of the text in the value box. */ - Fl_Fontsize textsize() const {return textsize_;} - void textsize(Fl_Fontsize s) {textsize_ = s;} - /** Sets the color of the text in the value box. */ - Fl_Color textcolor() const {return textcolor_;} - /** Gets the color of the text in the value box. */ - void textcolor(Fl_Color s) {textcolor_ = s;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Value_Slider.H b/msvc/fltk/include/FL/Fl_Value_Slider.H deleted file mode 100644 index 462cdb42..00000000 --- a/msvc/fltk/include/FL/Fl_Value_Slider.H +++ /dev/null @@ -1,60 +0,0 @@ -// -// "$Id$" -// -// Value slider header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Value_Slider widget . */ - -#ifndef Fl_Value_Slider_H -#define Fl_Value_Slider_H - -#include "Fl_Slider.H" - -/** - The Fl_Value_Slider widget is a Fl_Slider widget - with a box displaying the current value. -

\image html value_slider.png - \image latex value_slider.png "Fl_Value_Slider" width=4cm -*/ -class FL_EXPORT Fl_Value_Slider : public Fl_Slider { - Fl_Font textfont_; - Fl_Fontsize textsize_; - Fl_Color textcolor_; -protected: - void draw(); -public: - int handle(int); - Fl_Value_Slider(int x,int y,int w,int h, const char *l = 0); - /** Gets the typeface of the text in the value box. */ - Fl_Font textfont() const {return textfont_;} - /** Sets the typeface of the text in the value box. */ - void textfont(Fl_Font s) {textfont_ = s;} - /** Gets the size of the text in the value box. */ - Fl_Fontsize textsize() const {return textsize_;} - /** Sets the size of the text in the value box. */ - void textsize(Fl_Fontsize s) {textsize_ = s;} - /** Gets the color of the text in the value box. */ - Fl_Color textcolor() const {return textcolor_;} - /** Sets the color of the text in the value box. */ - void textcolor(Fl_Color s) {textcolor_ = s;} -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Widget.H b/msvc/fltk/include/FL/Fl_Widget.H deleted file mode 100644 index cf57b373..00000000 --- a/msvc/fltk/include/FL/Fl_Widget.H +++ /dev/null @@ -1,1040 +0,0 @@ -// -// "$Id$" -// -// Widget header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl_Widget, Fl_Label classes . */ - -#ifndef Fl_Widget_H -#define Fl_Widget_H - -#include "Enumerations.H" - -/** - \todo typedef's fl_intptr_t and fl_uintptr_t should be documented. -*/ -#ifdef _WIN64 -#if defined(__GNUC__) || defined(__clang__) -#include -#else -#include // M$VC -#endif -typedef intptr_t fl_intptr_t; -typedef uintptr_t fl_uintptr_t; -#else -typedef long fl_intptr_t; -typedef unsigned long fl_uintptr_t; -#endif - -class Fl_Widget; -class Fl_Window; -class Fl_Group; -class Fl_Image; - -/** Default callback type definition for all fltk widgets (by far the most used) */ -typedef void (Fl_Callback )(Fl_Widget*, void*); -/** Default callback type pointer definition for all fltk widgets */ -typedef Fl_Callback* Fl_Callback_p; // needed for BORLAND -/** One parameter callback type definition passing only the widget */ -typedef void (Fl_Callback0)(Fl_Widget*); -/** Callback type definition passing the widget and a long data value */ -typedef void (Fl_Callback1)(Fl_Widget*, long); - -/** This struct stores all information for a text or mixed graphics label. - - \todo There is an aspiration that the Fl_Label type will become a widget by itself. - That way we will be avoiding a lot of code duplication by handling labels in - a similar fashion to widgets containing text. We also provide an easy - interface for very complex labels, containing html or vector graphics. - However, this re-factoring is not in place in this release. - */ -struct FL_EXPORT Fl_Label { - /** label text */ - const char* value; - /** optional image for an active label */ - Fl_Image* image; - /** optional image for a deactivated label */ - Fl_Image* deimage; - /** label font used in text */ - Fl_Font font; - /** size of label font */ - Fl_Fontsize size; - /** text color */ - Fl_Color color; - /** alignment of label */ - Fl_Align align_; - /** type of label. \see Fl_Labeltype */ - uchar type; - - /** Draws the label aligned to the given box */ - void draw(int,int,int,int, Fl_Align) const ; - void measure(int &w, int &h) const ; -}; - - -/** Fl_Widget is the base class for all widgets in FLTK. - - You can't create one of these because the constructor is not public. - However you can subclass it. - - All "property" accessing methods, such as color(), parent(), or argument() - are implemented as trivial inline functions and thus are as fast and small - as accessing fields in a structure. Unless otherwise noted, the property - setting methods such as color(n) or label(s) are also trivial inline - functions, even if they change the widget's appearance. It is up to the - user code to call redraw() after these. - */ -class FL_EXPORT Fl_Widget { - friend class Fl_Group; - - Fl_Group* parent_; - Fl_Callback* callback_; - void* user_data_; - int x_,y_,w_,h_; - Fl_Label label_; - unsigned int flags_; - Fl_Color color_; - Fl_Color color2_; - uchar type_; - uchar damage_; - uchar box_; - uchar when_; - - const char *tooltip_; - - /** unimplemented copy ctor */ - Fl_Widget(const Fl_Widget &); - /** unimplemented assignment operator */ - Fl_Widget& operator=(const Fl_Widget &); - -protected: - - /** Creates a widget at the given position and size. - - The Fl_Widget is a protected constructor, but all derived widgets have a - matching public constructor. It takes a value for x(), y(), w(), h(), and - an optional value for label(). - - \param[in] x, y the position of the widget relative to the enclosing window - \param[in] w, h size of the widget in pixels - \param[in] label optional text for the widget label - */ - Fl_Widget(int x, int y, int w, int h, const char *label=0L); - - /** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */ - void x(int v) {x_ = v;} - /** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */ - void y(int v) {y_ = v;} - /** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */ - void w(int v) {w_ = v;} - /** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */ - void h(int v) {h_ = v;} - /** Gets the widget flags mask */ - unsigned int flags() const {return flags_;} - /** Sets a flag in the flags mask */ - void set_flag(unsigned int c) {flags_ |= c;} - /** Clears a flag in the flags mask */ - void clear_flag(unsigned int c) {flags_ &= ~c;} - /** flags possible values enumeration. - See activate(), output(), visible(), changed(), set_visible_focus() - */ - enum { - INACTIVE = 1<<0, ///< the widget can't receive focus, and is disabled but potentially visible - INVISIBLE = 1<<1, ///< the widget is not drawn, but can receive a few special events - OUTPUT = 1<<2, ///< for output only - NOBORDER = 1<<3, ///< don't draw a decoration (Fl_Window) - FORCE_POSITION = 1<<4, ///< don't let the window manager position the window (Fl_Window) - NON_MODAL = 1<<5, ///< this is a hovering toolbar window (Fl_Window) - SHORTCUT_LABEL = 1<<6, ///< the label contains a shortcut we need to draw - CHANGED = 1<<7, ///< the widget value changed - OVERRIDE = 1<<8, ///< position window on top (Fl_Window) - VISIBLE_FOCUS = 1<<9, ///< accepts keyboard focus navigation if the widget can have the focus - COPIED_LABEL = 1<<10, ///< the widget label is internally copied, its destruction is handled by the widget - CLIP_CHILDREN = 1<<11, ///< all drawing within this widget will be clipped (Fl_Group) - MENU_WINDOW = 1<<12, ///< a temporary popup window, dismissed by clicking outside (Fl_Window) - TOOLTIP_WINDOW = 1<<13, ///< a temporary popup, transparent to events, and dismissed easily (Fl_Window) - MODAL = 1<<14, ///< a window blocking input to all other winows (Fl_Window) - NO_OVERLAY = 1<<15, ///< window not using a hardware overlay plane (Fl_Menu_Window) - GROUP_RELATIVE = 1<<16, ///< Reserved, not implemented. DO NOT USE. - COPIED_TOOLTIP = 1<<17, ///< the widget tooltip is internally copied, its destruction is handled by the widget - FULLSCREEN = 1<<18, ///< a fullscreen window (Fl_Window) - MAC_USE_ACCENTS_MENU = 1<<19, ///< On the Mac OS platform, pressing and holding a key on the keyboard opens an accented-character menu window (Fl_Input_, Fl_Text_Editor) - // (space for more flags) - USERFLAG3 = 1<<29, ///< reserved for 3rd party extensions - USERFLAG2 = 1<<30, ///< reserved for 3rd party extensions - USERFLAG1 = 1<<31 ///< reserved for 3rd party extensions - }; - void draw_box() const; - void draw_box(Fl_Boxtype t, Fl_Color c) const; - void draw_box(Fl_Boxtype t, int x,int y,int w,int h, Fl_Color c) const; - void draw_backdrop() const; - /** draws a focus rectangle around the widget */ - void draw_focus() {draw_focus(box(),x(),y(),w(),h());} - void draw_focus(Fl_Boxtype t, int x,int y,int w,int h) const; - void draw_label() const; - void draw_label(int, int, int, int) const; - -public: - - /** Destroys the widget. - Destroying single widgets is not very common. You almost always want to - destroy the parent group instead, which will destroy all of the child widgets - and groups in that group. - - \since FLTK 1.3, the widget's destructor removes the widget from its parent - group, if it is member of a group. - */ - virtual ~Fl_Widget(); - - /** Draws the widget. - Never call this function directly. FLTK will schedule redrawing whenever - needed. If your widget must be redrawn as soon as possible, call redraw() - instead. - - Override this function to draw your own widgets. - - If you ever need to call another widget's draw method from within your - own draw() method, e.g. for an embedded scrollbar, you can do it - (because draw() is virtual) like this: - - \code - Fl_Widget *s = &scroll; // scroll is an embedded Fl_Scrollbar - s->draw(); // calls Fl_Scrollbar::draw() - \endcode - */ - virtual void draw() = 0; - - /** Handles the specified event. - You normally don't call this method directly, but instead let FLTK do - it when the user interacts with the widget. - - When implemented in a widget, this function must return 0 if the - widget does not use the event or 1 otherwise. - - Most of the time, you want to call the inherited handle() method in - your overridden method so that you don't short-circuit events that you - don't handle. In this last case you should return the callee retval. - - \param[in] event the kind of event received - \retval 0 if the event was not used or understood - \retval 1 if the event was used and can be deleted - \see Fl_Event - */ - virtual int handle(int event); - - /** Returns whether the current label was assigned with copy_label(). - - This can be useful for temporarily overwriting the widget's label - and restoring it later. - - \retval 0 current label was assigned with label(). - \retval 1 current label was assigned with copy_label(). - */ - int is_label_copied() const {return ((flags_ & COPIED_LABEL) ? 1 : 0);} - - /** Returns a pointer to the parent widget. - Usually this is a Fl_Group or Fl_Window. - \retval NULL if the widget has no parent - \see Fl_Group::add(Fl_Widget*) - */ - Fl_Group* parent() const {return parent_;} - - /** Internal use only - "for hacks only". - - It is \em \b STRONGLY recommended not to use this method, because it - short-circuits Fl_Group's normal widget adding and removing methods, - if the widget is already a child widget of another Fl_Group. - - Use Fl_Group::add(Fl_Widget*) and/or Fl_Group::remove(Fl_Widget*) instead. - */ - void parent(Fl_Group* p) {parent_ = p;} // for hacks only, use Fl_Group::add() - - /** Gets the widget type. - Returns the widget type value, which is used for Forms compatibility - and to simulate RTTI. - - \todo Explain "simulate RTTI" (currently only used to decide if a widget - is a window, i.e. type()>=FL_WINDOW ?). Is type() really used in a way - that ensures "Forms compatibility" ? - */ - uchar type() const {return type_;} - - /** Sets the widget type. - This is used for Forms compatibility. - */ - void type(uchar t) {type_ = t;} - - /** Gets the widget position in its window. - \return the x position relative to the window - */ - int x() const {return x_;} - - /** Gets the widget position in its window. - \return the y position relative to the window - */ - int y() const {return y_;} - - /** Gets the widget width. - \return the width of the widget in pixels. - */ - int w() const {return w_;} - - /** Gets the widget height. - \return the height of the widget in pixels. - */ - int h() const {return h_;} - - /** Changes the size or position of the widget. - - This is a virtual function so that the widget may implement its - own handling of resizing. The default version does \e not - call the redraw() method, but instead relies on the parent widget - to do so because the parent may know a faster way to update the - display, such as scrolling from the old position. - - Some window managers under X11 call resize() a lot more often - than needed. Please verify that the position or size of a widget - did actually change before doing any extensive calculations. - - position(X, Y) is a shortcut for resize(X, Y, w(), h()), - and size(W, H) is a shortcut for resize(x(), y(), W, H). - - \param[in] x, y new position relative to the parent window - \param[in] w, h new size - \see position(int,int), size(int,int) - */ - virtual void resize(int x, int y, int w, int h); - - /** Internal use only. */ - int damage_resize(int,int,int,int); - - /** Repositions the window or widget. - - position(X, Y) is a shortcut for resize(X, Y, w(), h()). - - \param[in] X, Y new position relative to the parent window - \see resize(int,int,int,int), size(int,int) - */ - void position(int X,int Y) {resize(X,Y,w_,h_);} - - /** Changes the size of the widget. - - size(W, H) is a shortcut for resize(x(), y(), W, H). - - \param[in] W, H new size - \see position(int,int), resize(int,int,int,int) - */ - void size(int W,int H) {resize(x_,y_,W,H);} - - /** Gets the label alignment. - - \return label alignment - \see label(), align(Fl_Align), Fl_Align - */ - Fl_Align align() const {return label_.align_;} - - /** Sets the label alignment. - This controls how the label is displayed next to or inside the widget. - The default value is FL_ALIGN_CENTER, which centers the label inside - the widget. - \param[in] alignment new label alignment - \see align(), Fl_Align - */ - void align(Fl_Align alignment) {label_.align_ = alignment;} - - /** Gets the box type of the widget. - \return the current box type - \see box(Fl_Boxtype), Fl_Boxtype - */ - Fl_Boxtype box() const {return (Fl_Boxtype)box_;} - - /** Sets the box type for the widget. - This identifies a routine that draws the background of the widget. - See Fl_Boxtype for the available types. The default depends on the - widget, but is usually FL_NO_BOX or FL_UP_BOX. - \param[in] new_box the new box type - \see box(), Fl_Boxtype - */ - void box(Fl_Boxtype new_box) {box_ = new_box;} - - /** Gets the background color of the widget. - \return current background color - \see color(Fl_Color), color(Fl_Color, Fl_Color) - */ - Fl_Color color() const {return color_;} - - /** Sets the background color of the widget. - The color is passed to the box routine. The color is either an index into - an internal table of RGB colors or an RGB color value generated using - fl_rgb_color(). - - The default for most widgets is FL_BACKGROUND_COLOR. Use Fl::set_color() - to redefine colors in the color map. - \param[in] bg background color - \see color(), color(Fl_Color, Fl_Color), selection_color(Fl_Color) - */ - void color(Fl_Color bg) {color_ = bg;} - - /** Gets the selection color. - \return the current selection color - \see selection_color(Fl_Color), color(Fl_Color, Fl_Color) - */ - Fl_Color selection_color() const {return color2_;} - - /** Sets the selection color. - The selection color is defined for Forms compatibility and is usually - used to color the widget when it is selected, although some widgets - use this color for other purposes. You can set both colors at once - with color(Fl_Color bg, Fl_Color sel). - \param[in] a the new selection color - \see selection_color(), color(Fl_Color, Fl_Color) - */ - void selection_color(Fl_Color a) {color2_ = a;} - - /** Sets the background and selection color of the widget. - - The two color form sets both the background and selection colors. - \param[in] bg background color - \param[in] sel selection color - \see color(unsigned), selection_color(unsigned) - */ - void color(Fl_Color bg, Fl_Color sel) {color_=bg; color2_=sel;} - - /** Gets the current label text. - \return a pointer to the current label text - \see label(const char *), copy_label(const char *) - */ - const char* label() const {return label_.value;} - - /** Sets the current label pointer. - - The label is shown somewhere on or next to the widget. The passed pointer - is stored unchanged in the widget (the string is \em not copied), so if - you need to set the label to a formatted value, make sure the buffer is - static, global, or allocated. The copy_label() method can be used - to make a copy of the label string automatically. - \param[in] text pointer to new label text - \see copy_label() - */ - void label(const char* text); - - /** Sets the current label. - Unlike label(), this method allocates a copy of the label - string instead of using the original string pointer. - - The internal copy will automatically be freed whenever you assign - a new label or when the widget is destroyed. - - \param[in] new_label the new label text - \see label() - */ - void copy_label(const char *new_label); - - /** Shortcut to set the label text and type in one call. - \see label(const char *), labeltype(Fl_Labeltype) - */ - void label(Fl_Labeltype a, const char* b) {label_.type = a; label_.value = b;} - - /** Gets the label type. - \return the current label type. - \see Fl_Labeltype - */ - Fl_Labeltype labeltype() const {return (Fl_Labeltype)label_.type;} - - /** Sets the label type. - The label type identifies the function that draws the label of the widget. - This is generally used for special effects such as embossing or for using - the label() pointer as another form of data such as an icon. The value - FL_NORMAL_LABEL prints the label as plain text. - \param[in] a new label type - \see Fl_Labeltype - */ - void labeltype(Fl_Labeltype a) {label_.type = a;} - - /** Gets the label color. - The default color is FL_FOREGROUND_COLOR. - \return the current label color - */ - Fl_Color labelcolor() const {return label_.color;} - - /** Sets the label color. - The default color is FL_FOREGROUND_COLOR. - \param[in] c the new label color - */ - void labelcolor(Fl_Color c) {label_.color=c;} - - /** Gets the font to use. - Fonts are identified by indexes into a table. The default value - uses a Helvetica typeface (Arial for Microsoft® Windows®). - The function Fl::set_font() can define new typefaces. - \return current font used by the label - \see Fl_Font - */ - Fl_Font labelfont() const {return label_.font;} - - /** Sets the font to use. - Fonts are identified by indexes into a table. The default value - uses a Helvetica typeface (Arial for Microsoft® Windows®). - The function Fl::set_font() can define new typefaces. - \param[in] f the new font for the label - \see Fl_Font - */ - void labelfont(Fl_Font f) {label_.font=f;} - - /** Gets the font size in pixels. - The default size is 14 pixels. - \return the current font size - */ - Fl_Fontsize labelsize() const {return label_.size;} - - /** Sets the font size in pixels. - \param[in] pix the new font size - \see Fl_Fontsize labelsize() - */ - void labelsize(Fl_Fontsize pix) {label_.size=pix;} - - /** Gets the image that is used as part of the widget label. - This image is used when drawing the widget in the active state. - \return the current image - */ - Fl_Image* image() {return label_.image;} - const Fl_Image* image() const {return label_.image;} - - /** Sets the image to use as part of the widget label. - This image is used when drawing the widget in the active state. - \param[in] img the new image for the label - */ - void image(Fl_Image* img) {label_.image=img;} - - /** Sets the image to use as part of the widget label. - This image is used when drawing the widget in the active state. - \param[in] img the new image for the label - */ - void image(Fl_Image& img) {label_.image=&img;} - - /** Gets the image that is used as part of the widget label. - This image is used when drawing the widget in the inactive state. - \return the current image for the deactivated widget - */ - Fl_Image* deimage() {return label_.deimage;} - const Fl_Image* deimage() const {return label_.deimage;} - - /** Sets the image to use as part of the widget label. - This image is used when drawing the widget in the inactive state. - \param[in] img the new image for the deactivated widget - */ - void deimage(Fl_Image* img) {label_.deimage=img;} - - /** Sets the image to use as part of the widget label. - This image is used when drawing the widget in the inactive state. - \param[in] img the new image for the deactivated widget - */ - void deimage(Fl_Image& img) {label_.deimage=&img;} - - /** Gets the current tooltip text. - \return a pointer to the tooltip text or NULL - \see tooltip(const char*), copy_tooltip(const char*) - */ - const char *tooltip() const {return tooltip_;} - - void tooltip(const char *text); // see Fl_Tooltip - void copy_tooltip(const char *text); // see Fl_Tooltip - - /** Gets the current callback function for the widget. - Each widget has a single callback. - \return current callback - */ - Fl_Callback_p callback() const {return callback_;} - - /** Sets the current callback function for the widget. - Each widget has a single callback. - \param[in] cb new callback - \param[in] p user data - */ - void callback(Fl_Callback* cb, void* p) {callback_=cb; user_data_=p;} - - /** Sets the current callback function for the widget. - Each widget has a single callback. - \param[in] cb new callback - */ - void callback(Fl_Callback* cb) {callback_=cb;} - - /** Sets the current callback function for the widget. - Each widget has a single callback. - \param[in] cb new callback - */ - void callback(Fl_Callback0*cb) {callback_=(Fl_Callback*)cb;} - - /** Sets the current callback function for the widget. - Each widget has a single callback. - \param[in] cb new callback - \param[in] p user data - */ - void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)(fl_intptr_t)p;} - - /** Gets the user data for this widget. - Gets the current user data (void *) argument that is passed to the callback function. - \return user data as a pointer - */ - void* user_data() const {return user_data_;} - - /** Sets the user data for this widget. - Sets the new user data (void *) argument that is passed to the callback function. - \param[in] v new user data - */ - void user_data(void* v) {user_data_ = v;} - - /** Gets the current user data (long) argument that is passed to the callback function. - \todo The user data value must be implemented using \em intptr_t or similar - to avoid 64-bit machine incompatibilities. - */ - long argument() const {return (long)(fl_intptr_t)user_data_;} - - /** Sets the current user data (long) argument that is passed to the callback function. - \todo The user data value must be implemented using \em intptr_t or similar - to avoid 64-bit machine incompatibilities. - */ - void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;} - - /** Returns the conditions under which the callback is called. - - You can set the flags with when(uchar), the default value is - FL_WHEN_RELEASE. - - \return set of flags - \see when(uchar) - */ - Fl_When when() const {return (Fl_When)when_;} - - /** Sets the flags used to decide when a callback is called. - - This controls when callbacks are done. The following values are useful, - the default value is FL_WHEN_RELEASE: - - \li 0: The callback is not done, but changed() is turned on. - \li FL_WHEN_CHANGED: The callback is done each time the text is - changed by the user. - \li FL_WHEN_RELEASE: The callback will be done when this widget loses - the focus, including when the window is unmapped. This is a useful - value for text fields in a panel where doing the callback on every - change is wasteful. However the callback will also happen if the - mouse is moved out of the window, which means it should not do - anything visible (like pop up an error message). - You might do better setting this to zero, and scanning all the - items for changed() when the OK button on a panel is pressed. - \li FL_WHEN_ENTER_KEY: If the user types the Enter key, the entire - text is selected, and the callback is done if the text has changed. - Normally the Enter key will navigate to the next field (or insert - a newline for a Fl_Multiline_Input) - this changes the behavior. - \li FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED: The Enter key will do the - callback even if the text has not changed. Useful for command fields. - Fl_Widget::when() is a set of bitflags used by subclasses of - Fl_Widget to decide when to do the callback. - - If the value is zero then the callback is never done. Other values - are described in the individual widgets. This field is in the base - class so that you can scan a panel and do_callback() on all the ones - that don't do their own callbacks in response to an "OK" button. - \param[in] i set of flags - */ - void when(uchar i) {when_ = i;} - - /** Returns whether a widget is visible. - \retval 0 if the widget is not drawn and hence invisible. - \see show(), hide(), visible_r() - */ - unsigned int visible() const {return !(flags_&INVISIBLE);} - - /** Returns whether a widget and all its parents are visible. - \retval 0 if the widget or any of its parents are invisible. - \see show(), hide(), visible() - */ - int visible_r() const; - - /** Makes a widget visible. - - An invisible widget never gets redrawn and does not get keyboard - or mouse events, but can receive a few other events like FL_SHOW. - - The visible() method returns true if the widget is set to be - visible. The visible_r() method returns true if the widget and - all of its parents are visible. A widget is only visible if - visible() is true on it and all of its parents. - - Changing it will send FL_SHOW or FL_HIDE events to the widget. - Do not change it if the parent is not visible, as this - will send false FL_SHOW or FL_HIDE events to the widget. - redraw() is called if necessary on this or the parent. - - \see hide(), visible(), visible_r() - */ - virtual void show(); - - /** Makes a widget invisible. - \see show(), visible(), visible_r() - */ - virtual void hide(); - - /** Makes the widget visible. - You must still redraw the parent widget to see a change in the - window. Normally you want to use the show() method instead. - */ - void set_visible() {flags_ &= ~INVISIBLE;} - - /** Hides the widget. - You must still redraw the parent to see a change in the window. - Normally you want to use the hide() method instead. - */ - void clear_visible() {flags_ |= INVISIBLE;} - - /** Returns whether the widget is active. - \retval 0 if the widget is inactive - \see active_r(), activate(), deactivate() - */ - unsigned int active() const {return !(flags_&INACTIVE);} - - /** Returns whether the widget and all of its parents are active. - \retval 0 if this or any of the parent widgets are inactive - \see active(), activate(), deactivate() - */ - int active_r() const; - - /** Activates the widget. - Changing this value will send FL_ACTIVATE to the widget if - active_r() is true. - \see active(), active_r(), deactivate() - */ - void activate(); - - /** Deactivates the widget. - Inactive widgets will be drawn "grayed out", e.g. with less contrast - than the active widget. Inactive widgets will not receive any keyboard - or mouse button events. Other events (including FL_ENTER, FL_MOVE, - FL_LEAVE, FL_SHORTCUT, and others) will still be sent. A widget is - only active if active() is true on it and all of its parents. - - Changing this value will send FL_DEACTIVATE to the widget if - active_r() is true. - - Currently you cannot deactivate Fl_Window widgets. - - \see activate(), active(), active_r() - */ - void deactivate(); - - /** Returns if a widget is used for output only. - output() means the same as !active() except it does not change how the - widget is drawn. The widget will not receive any events. This is useful - for making scrollbars or buttons that work as displays rather than input - devices. - \retval 0 if the widget is used for input and output - \see set_output(), clear_output() - */ - unsigned int output() const {return (flags_&OUTPUT);} - - /** Sets a widget to output only. - \see output(), clear_output() - */ - void set_output() {flags_ |= OUTPUT;} - - /** Sets a widget to accept input. - \see set_output(), output() - */ - void clear_output() {flags_ &= ~OUTPUT;} - - /** Returns if the widget is able to take events. - This is the same as (active() && !output() && visible()) - but is faster. - \retval 0 if the widget takes no events - */ - unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));} - - /** - Checks if the widget value changed since the last callback. - - "Changed" is a flag that is turned on when the user changes the value - stored in the widget. This is only used by subclasses of Fl_Widget that - store values, but is in the base class so it is easier to scan all the - widgets in a panel and do_callback() on the changed ones in response - to an "OK" button. - - Most widgets turn this flag off when they do the callback, and when - the program sets the stored value. - - \retval 0 if the value did not change - \see set_changed(), clear_changed() - */ - unsigned int changed() const {return flags_&CHANGED;} - - /** Marks the value of the widget as changed. - \see changed(), clear_changed() - */ - void set_changed() {flags_ |= CHANGED;} - - /** Marks the value of the widget as unchanged. - \see changed(), set_changed() - */ - void clear_changed() {flags_ &= ~CHANGED;} - - /** Marks the widget as inactive without sending events or changing focus. - This is mainly for specialized use, for normal cases you want deactivate(). - \see deactivate() - */ - void clear_active() {flags_ |= INACTIVE;} - - /** Marks the widget as active without sending events or changing focus. - This is mainly for specialized use, for normal cases you want activate(). - \see activate() - */ - void set_active() {flags_ &= ~INACTIVE;} - - /** Gives the widget the keyboard focus. - Tries to make this widget be the Fl::focus() widget, by first sending - it an FL_FOCUS event, and if it returns non-zero, setting - Fl::focus() to this widget. You should use this method to - assign the focus to a widget. - \return true if the widget accepted the focus. - */ - int take_focus(); - - /** Enables keyboard focus navigation with this widget. - Note, however, that this will not necessarily mean that the widget - will accept focus, but for widgets that can accept focus, this method - enables it if it has been disabled. - \see visible_focus(), clear_visible_focus(), visible_focus(int) - */ - void set_visible_focus() { flags_ |= VISIBLE_FOCUS; } - - /** Disables keyboard focus navigation with this widget. - Normally, all widgets participate in keyboard focus navigation. - \see set_visible_focus(), visible_focus(), visible_focus(int) - */ - void clear_visible_focus() { flags_ &= ~VISIBLE_FOCUS; } - - /** Modifies keyboard focus navigation. - \param[in] v set or clear visible focus - \see set_visible_focus(), clear_visible_focus(), visible_focus() - */ - void visible_focus(int v) { if (v) set_visible_focus(); else clear_visible_focus(); } - - /** Checks whether this widget has a visible focus. - \retval 0 if this widget has no visible focus. - \see visible_focus(int), set_visible_focus(), clear_visible_focus() - */ - unsigned int visible_focus() { return flags_ & VISIBLE_FOCUS; } - - /** The default callback for all widgets that don't set a callback. - - This callback function puts a pointer to the widget on the queue - returned by Fl::readqueue(). - - Relying on the default callback and reading the callback queue with - Fl::readqueue() is not recommended. If you need a callback, you should - set one with Fl_Widget::callback(Fl_Callback *cb, void *data) - or one of its variants. - - \param[in] cb the widget given to the callback - \param[in] d user data associated with that callback - - \see callback(), do_callback(), Fl::readqueue() - */ - static void default_callback(Fl_Widget *cb, void *d); - - /** Calls the widget callback. - Causes a widget to invoke its callback function with default arguments. - \see callback() - */ - void do_callback() {do_callback(this,user_data_);} - - /** Calls the widget callback. - Causes a widget to invoke its callback function with arbitrary arguments. - \param[in] o call the callback with \p o as the widget argument - \param[in] arg call the callback with \p arg as the user data argument - \see callback() - */ - void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)(fl_intptr_t)arg);} - - // Causes a widget to invoke its callback function with arbitrary arguments. - // Documentation and implementation in Fl_Widget.cxx - void do_callback(Fl_Widget* o,void* arg=0); - - /* Internal use only. */ - int test_shortcut(); - /* Internal use only. */ - static unsigned int label_shortcut(const char *t); - /* Internal use only. */ - static int test_shortcut(const char*, const bool require_alt = false); - /* Internal use only. */ - void _set_fullscreen() {flags_ |= FULLSCREEN;} - void _clear_fullscreen() {flags_ &= ~FULLSCREEN;} - - /** Checks if w is a child of this widget. - \param[in] w potential child widget - \return Returns 1 if \p w is a child of this widget, or is - equal to this widget. Returns 0 if \p w is NULL. - */ - int contains(const Fl_Widget *w) const ; - - /** Checks if this widget is a child of \p wgt. - Returns 1 if this widget is a child of \p wgt, or is - equal to \p wgt. Returns 0 if \p wgt is NULL. - \param[in] wgt the possible parent widget. - \see contains() - */ - int inside(const Fl_Widget* wgt) const {return wgt ? wgt->contains(this) : 0;} - - /** Schedules the drawing of the widget. - Marks the widget as needing its draw() routine called. - */ - void redraw(); - - /** Schedules the drawing of the label. - Marks the widget or the parent as needing a redraw for the label area - of a widget. - */ - void redraw_label(); - - /** Returns non-zero if draw() needs to be called. - The damage value is actually a bit field that the widget - subclass can use to figure out what parts to draw. - \return a bitmap of flags describing the kind of damage to the widget - \see damage(uchar), clear_damage(uchar) - */ - uchar damage() const {return damage_;} - - /** Clears or sets the damage flags. - Damage flags are cleared when parts of the widget drawing is repaired. - - The optional argument \p c specifies the bits that are set - after the call (default: 0) and \b not the bits that are cleared! - - \note Therefore it is possible to set damage bits with this method, but - this should be avoided. Use damage(uchar) instead. - - \param[in] c new bitmask of damage flags (default: 0) - \see damage(uchar), damage() - */ - void clear_damage(uchar c = 0) {damage_ = c;} - - /** Sets the damage bits for the widget. - Setting damage bits will schedule the widget for the next redraw. - \param[in] c bitmask of flags to set - \see damage(), clear_damage(uchar) - */ - void damage(uchar c); - - /** Sets the damage bits for an area inside the widget. - Setting damage bits will schedule the widget for the next redraw. - \param[in] c bitmask of flags to set - \param[in] x, y, w, h size of damaged area - \see damage(), clear_damage(uchar) - */ - void damage(uchar c, int x, int y, int w, int h); - - void draw_label(int, int, int, int, Fl_Align) const; - - /** Sets width ww and height hh accordingly with the label size. - Labels with images will return w() and h() of the image. - - This calls fl_measure() internally. For more information about - the arguments \p ww and \p hh and word wrapping - \see fl_measure(const char*, int&, int&, int) - */ - void measure_label(int& ww, int& hh) const {label_.measure(ww, hh);} - - Fl_Window* window() const ; - Fl_Window* top_window() const; - Fl_Window* top_window_offset(int& xoff, int& yoff) const; - - /** Returns an Fl_Group pointer if this widget is an Fl_Group. - - Use this method if you have a widget (pointer) and need to - know whether this widget is derived from Fl_Group. If it returns - non-NULL, then the widget in question is derived from Fl_Group, - and you can use the returned pointer to access its children - or other Fl_Group-specific methods. - - Example: - \code - void my_callback (Fl_Widget *w, void *) { - Fl_Group *g = w->as_group(); - if (g) - printf ("This group has %d children\n",g->children()); - else - printf ("This widget is not a group!\n"); - } - \endcode - - \retval NULL if this widget is not derived from Fl_Group. - \note This method is provided to avoid dynamic_cast. - \see Fl_Widget::as_window(), Fl_Widget::as_gl_window() - */ - virtual Fl_Group* as_group() {return 0;} - - /** Returns an Fl_Window pointer if this widget is an Fl_Window. - - Use this method if you have a widget (pointer) and need to - know whether this widget is derived from Fl_Window. If it returns - non-NULL, then the widget in question is derived from Fl_Window, - and you can use the returned pointer to access its children - or other Fl_Window-specific methods. - - \retval NULL if this widget is not derived from Fl_Window. - \note This method is provided to avoid dynamic_cast. - \see Fl_Widget::as_group(), Fl_Widget::as_gl_window() - */ - virtual Fl_Window* as_window() {return 0;} - - /** Returns an Fl_Gl_Window pointer if this widget is an Fl_Gl_Window. - - Use this method if you have a widget (pointer) and need to - know whether this widget is derived from Fl_Gl_Window. If it returns - non-NULL, then the widget in question is derived from Fl_Gl_Window. - - \retval NULL if this widget is not derived from Fl_Gl_Window. - \note This method is provided to avoid dynamic_cast. - \see Fl_Widget::as_group(), Fl_Widget::as_window() - */ - virtual class Fl_Gl_Window* as_gl_window() {return 0;} - - /** Returns non zero if MAC_USE_ACCENTS_MENU flag is set, 0 otherwise. - */ - int use_accents_menu() { return flags() & MAC_USE_ACCENTS_MENU; } - - /** For back compatibility only. - \deprecated Use selection_color() instead. - */ - Fl_Color color2() const {return (Fl_Color)color2_;} - - /** For back compatibility only. - \deprecated Use selection_color(unsigned) instead. - */ - void color2(unsigned a) {color2_ = a;} -}; - -/** - Reserved type numbers (necessary for my cheapo RTTI) start here. - Grep the header files for "RESERVED_TYPE" to find the next available - number. -*/ -#define FL_RESERVED_TYPE 100 - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Window.H b/msvc/fltk/include/FL/Fl_Window.H deleted file mode 100644 index f84ab1c9..00000000 --- a/msvc/fltk/include/FL/Fl_Window.H +++ /dev/null @@ -1,652 +0,0 @@ -// -// "$Id$" -// -// Window header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2012 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - Fl_Window widget . */ - -#ifndef Fl_Window_H -#define Fl_Window_H - -#ifdef WIN32 -#include -#endif - -#include "Fl_Group.H" -#include "Fl_Bitmap.H" -#include - -#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this -#define FL_DOUBLE_WINDOW 0xF1 ///< double window type id - -class Fl_X; -class Fl_RGB_Image; - - -/** - This widget produces an actual window. This can either be a main - window, with a border and title and all the window management controls, - or a "subwindow" inside a window. This is controlled by whether or not - the window has a parent(). - - Once you create a window, you usually add children Fl_Widget - 's to it by using window->add(child) for each new widget. - See Fl_Group for more information on how to add and remove children. - - There are several subclasses of Fl_Window that provide - double-buffering, overlay, menu, and OpenGL support. - - The window's callback is done if the user tries to close a window - using the window manager and Fl::modal() is zero or equal to the - window. Fl_Window has a default callback that calls Fl_Window::hide(). -*/ -class FL_EXPORT Fl_Window : public Fl_Group { - - static char *default_xclass_; - // Note: we must use separate statements for each of the following 8 variables, - // with the static attribute, otherwise MS VC++ 2008/2010 complains :-( - // AlbrechtS 04/2012 -#if FLTK_ABI_VERSION < 10301 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int no_fullscreen_x; -#if FLTK_ABI_VERSION < 10301 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int no_fullscreen_y; -#if FLTK_ABI_VERSION < 10301 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int no_fullscreen_w; -#if FLTK_ABI_VERSION < 10301 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int no_fullscreen_h; -#if FLTK_ABI_VERSION < 10303 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int fullscreen_screen_top; -#if FLTK_ABI_VERSION < 10303 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int fullscreen_screen_bottom; -#if FLTK_ABI_VERSION < 10303 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int fullscreen_screen_left; -#if FLTK_ABI_VERSION < 10303 - static // when these members are static, ABI compatibility with 1.3.0 is respected -#endif - int fullscreen_screen_right; - - friend class Fl_X; - Fl_X *i; // points at the system-specific stuff - - struct icon_data { - const void *legacy_icon; - Fl_RGB_Image **icons; - int count; -#ifdef WIN32 - HICON big_icon; - HICON small_icon; -#endif - }; - - const char* iconlabel_; - char* xclass_; - struct icon_data *icon_; - // size_range stuff: - int minw, minh, maxw, maxh; - int dw, dh, aspect; - uchar size_range_set; - // cursor stuff - Fl_Cursor cursor_default; -#if FLTK_ABI_VERSION < 10303 - // legacy, not used - Fl_Color cursor_fg, cursor_bg; -#endif - -protected: - /** Data supporting a non-rectangular window shape */ - struct shape_data_type { - int lw_; ///< width of shape image - int lh_; ///< height of shape image - Fl_Image* shape_; ///< shape image -#if defined(__APPLE__) - typedef struct CGImage* CGImageRef; - CGImageRef mask; -#endif - Fl_Bitmap *todelete_; ///< auxiliary bitmap image - }; - -#if FLTK_ABI_VERSION < 10303 && !defined(FL_DOXYGEN) - static -#endif - shape_data_type *shape_data_; ///< non-null means the window has a non-rectangular shape -private: - void shape_bitmap_(Fl_Image* b); - void shape_alpha_(Fl_Image* img, int offset); - void shape_pixmap_(Fl_Image* pixmap); -public: - void shape(const Fl_Image* img); - /** Set the window's shape with an Fl_Image. - \see void shape(const Fl_Image* img) - */ - inline void shape(const Fl_Image& b) { shape(&b); } -#if ! (defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN)) - void combine_mask(void); -#endif -private: - - - void size_range_(); - void _Fl_Window(); // constructor innards - void fullscreen_x(); // platform-specific part of sending a window to full screen - void fullscreen_off_x(int X, int Y, int W, int H);// platform-specific part of leaving full screen - - // unimplemented copy ctor and assignment operator - Fl_Window(const Fl_Window&); - Fl_Window& operator=(const Fl_Window&); - -protected: - - /** Stores the last window that was made current. See current() const */ - static Fl_Window *current_; - virtual void draw(); - /** Forces the window to be drawn, this window is also made current and calls draw(). */ - virtual void flush(); - - /** - Sets an internal flag that tells FLTK and the window manager to - honor position requests. - - This is used internally and should not be needed by user code. - - \param[in] force 1 to set the FORCE_POSITION flag, 0 to clear it - */ - void force_position(int force) { - if (force) set_flag(FORCE_POSITION); - else clear_flag(FORCE_POSITION); - } - /** - Returns the internal state of the window's FORCE_POSITION flag. - - \retval 1 if flag is set - \retval 0 otherwise - - \see force_position(int) - */ - int force_position() const { return ((flags() & FORCE_POSITION)?1:0); } - - void free_icons(); - -public: - - /** - Creates a window from the given size and title. - If Fl_Group::current() is not NULL, the window is created as a - subwindow of the parent window. - - The (w,h) form of the constructor creates a top-level window - and asks the window manager to position the window. The (x,y,w,h) - form of the constructor either creates a subwindow or a - top-level window at the specified location (x,y) , subject to window - manager configuration. If you do not specify the position of the - window, the window manager will pick a place to show the window - or allow the user to pick a location. Use position(x,y) - or hotspot() before calling show() to request a - position on the screen. See Fl_Window::resize() - for some more details on positioning windows. - - Top-level windows initially have visible() set to 0 - and parent() set to NULL. Subwindows initially - have visible() set to 1 and parent() set to - the parent window pointer. - - Fl_Widget::box() defaults to FL_FLAT_BOX. If you plan to - completely fill the window with children widgets you should - change this to FL_NO_BOX. If you turn the window border off - you may want to change this to FL_UP_BOX. - - \see Fl_Window(int x, int y, int w, int h, const char* title) - */ - Fl_Window(int w, int h, const char* title= 0); - /** Creates a window from the given position, size and title. - - \see Fl_Window(int w, int h, const char *title) - */ - Fl_Window(int x, int y, int w, int h, const char* title = 0); - /** - The destructor also deletes all the children. This allows a - whole tree to be deleted at once, without having to keep a pointer to - all the children in the user code. A kludge has been done so the - Fl_Window and all of its children can be automatic (local) - variables, but you must declare the Fl_Window first so - that it is destroyed last. - */ - virtual ~Fl_Window(); - - virtual int handle(int); - - /** - Changes the size and position of the window. If shown() is true, - these changes are communicated to the window server (which may - refuse that size and cause a further resize). If shown() is - false, the size and position are used when show() is called. - See Fl_Group for the effect of resizing on the child widgets. - - You can also call the Fl_Widget methods size(x,y) and position(w,h), - which are inline wrappers for this virtual function. - - A top-level window can not force, but merely suggest a position and - size to the operating system. The window manager may not be willing or - able to display a window at the desired position or with the given - dimensions. It is up to the application developer to verify window - parameters after the resize request. - */ - virtual void resize(int X,int Y,int W,int H); - /** - Sets whether or not the window manager border is around the - window. The default value is true. void border(int) can be - used to turn the border on and off. Under most X window - managers this does not work after show() has been called, - although SGI's 4DWM does work. - */ - void border(int b); - /** - Fast inline function to turn the window manager border - off. It only works before show() is called. - */ - void clear_border() {set_flag(NOBORDER);} - /** See void Fl_Window::border(int) */ - unsigned int border() const {return !(flags() & NOBORDER);} - /** Activates the flags NOBORDER|FL_OVERRIDE */ - void set_override() {set_flag(NOBORDER|OVERRIDE);} - /** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */ - unsigned int override() const { return flags()&OVERRIDE; } - /** - A "modal" window, when shown(), will prevent any events from - being delivered to other windows in the same program, and will also - remain on top of the other windows (if the X window manager supports - the "transient for" property). Several modal windows may be shown at - once, in which case only the last one shown gets events. You can see - which window (if any) is modal by calling Fl::modal(). - */ - void set_modal() {set_flag(MODAL);} - /** Returns true if this window is modal. */ - unsigned int modal() const {return flags() & MODAL;} - /** - A "non-modal" window (terminology borrowed from Microsoft Windows) - acts like a modal() one in that it remains on top, but it has - no effect on event delivery. There are three states for a - window: modal, non-modal, and normal. - */ - void set_non_modal() {set_flag(NON_MODAL);} - /** Returns true if this window is modal or non-modal. */ - unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);} - - /** - Clears the "modal" flags and converts a "modal" or "non-modal" - window back into a "normal" window. - - Note that there are three states for a window: modal, - non-modal, and normal. - - You can not change the "modality" of a window whilst - it is shown, so it is necessary to first hide() the window, - change its "modality" as required, then re-show the window - for the new state to take effect. - - This method can also be used to change a "modal" window into a - "non-modal" one. On several supported platforms, the "modal" state - over-rides the "non-modal" state, so the "modal" state must be - cleared before the window can be set into the "non-modal" - state. - In general, the following sequence should work: - - \code - win->hide(); - win->clear_modal_states(); - //Set win to new state as desired, or leave "normal", e.g... - win->set_non_modal(); - win->show(); - \endcode - - \note Under some window managers, the sequence of hiding the - window and changing its modality will often cause it to be - re-displayed at a different position when it is subsequently - shown. This is an irritating feature but appears to be - unavoidable at present. - As a result we would advise to use this method only when - absolutely necessary. - - \see void set_modal(), void set_non_modal() - */ - void clear_modal_states() {clear_flag(NON_MODAL | MODAL);} - - /** - Marks the window as a menu window. - - This is intended for internal use, but it can also be used if you - write your own menu handling. However, this is not recommended. - - This flag is used for correct "parenting" of windows in communication - with the windowing system. Modern X window managers can use different - flags to distinguish menu and tooltip windows from normal windows. - - This must be called before the window is shown and cannot be changed - later. - */ - void set_menu_window() {set_flag(MENU_WINDOW);} - - /** Returns true if this window is a menu window. */ - unsigned int menu_window() const {return flags() & MENU_WINDOW;} - - /** - Marks the window as a tooltip window. - - This is intended for internal use, but it can also be used if you - write your own tooltip handling. However, this is not recommended. - - This flag is used for correct "parenting" of windows in communication - with the windowing system. Modern X window managers can use different - flags to distinguish menu and tooltip windows from normal windows. - - This must be called before the window is shown and cannot be changed - later. - - \note Since Fl_Tooltip_Window is derived from Fl_Menu_Window, this - also \b clears the menu_window() state. - */ - void set_tooltip_window() { set_flag(TOOLTIP_WINDOW); - clear_flag(MENU_WINDOW); } - /** Returns true if this window is a tooltip window. */ - unsigned int tooltip_window() const {return flags() & TOOLTIP_WINDOW;} - - /** - Positions the window so that the mouse is pointing at the given - position, or at the center of the given widget, which may be the - window itself. If the optional offscreen parameter is - non-zero, then the window is allowed to extend off the screen (this - does not work with some X window managers). \see position() - */ - void hotspot(int x, int y, int offscreen = 0); - /** See void Fl_Window::hotspot(int x, int y, int offscreen = 0) */ - void hotspot(const Fl_Widget*, int offscreen = 0); - /** See void Fl_Window::hotspot(int x, int y, int offscreen = 0) */ - void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);} - - /** - Undoes the effect of a previous resize() or show() so that the next time - show() is called the window manager is free to position the window. - - This is for Forms compatibility only. - - \deprecated please use force_position(0) instead - */ - void free_position() {clear_flag(FORCE_POSITION);} - /** - Sets the allowable range the user can resize this window to. - This only works for top-level windows. -

    -
  • \p minw and \p minh are the smallest the window can be. - Either value must be greater than 0.
  • -
  • \p maxw and \p maxh are the largest the window can be. If either is - equal to the minimum then you cannot resize in that direction. - If either is zero then FLTK picks a maximum size in that direction - such that the window will fill the screen.
  • -
  • \p dw and \p dh are size increments. The window will be constrained - to widths of minw + N * dw, where N is any non-negative integer. - If these are less or equal to 1 they are ignored (this is ignored - on WIN32).
  • -
  • \p aspect is a flag that indicates that the window should preserve its - aspect ratio. This only works if both the maximum and minimum have - the same aspect ratio (ignored on WIN32 and by many X window managers). -
  • -
- - If this function is not called, FLTK tries to figure out the range - from the setting of resizable(): -
    -
  • If resizable() is NULL (this is the default) then the window cannot - be resized and the resize border and max-size control will not be - displayed for the window.
  • -
  • If either dimension of resizable() is less than 100, then that is - considered the minimum size. Otherwise the resizable() has a minimum - size of 100.
  • -
  • If either dimension of resizable() is zero, then that is also the - maximum size (so the window cannot resize in that direction).
  • -
- - It is undefined what happens if the current size does not fit in the - constraints passed to size_range(). - */ - void size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0) { - this->minw = minw; - this->minh = minh; - this->maxw = maxw; - this->maxh = maxh; - this->dw = dw; - this->dh = dh; - this->aspect = aspect; - size_range_(); - } - - /** See void Fl_Window::label(const char*) */ - const char* label() const {return Fl_Widget::label();} - /** See void Fl_Window::iconlabel(const char*) */ - const char* iconlabel() const {return iconlabel_;} - /** Sets the window title bar label. */ - void label(const char*); - /** Sets the icon label. */ - void iconlabel(const char*); - /** Sets the icon label. */ - void label(const char* label, const char* iconlabel); // platform dependent - void copy_label(const char* a); - - static void default_xclass(const char*); - static const char *default_xclass(); - const char* xclass() const; - void xclass(const char* c); - - static void default_icon(const Fl_RGB_Image*); - static void default_icons(const Fl_RGB_Image*[], int); - void icon(const Fl_RGB_Image*); - void icons(const Fl_RGB_Image*[], int); - -#ifdef WIN32 - static void default_icons(HICON big_icon, HICON small_icon); - void icons(HICON big_icon, HICON small_icon); -#endif - - /* for legacy compatibility */ - const void* icon() const; - void icon(const void * ic); - - /** - Returns non-zero if show() has been called (but not hide() - ). You can tell if a window is iconified with (w->shown() - && !w->visible()). - */ - int shown() {return i != 0;} - /** - Puts the window on the screen. Usually (on X) this has the side - effect of opening the display. - - If the window is already shown then it is restored and raised to the - top. This is really convenient because your program can call show() - at any time, even if the window is already up. It also means that - show() serves the purpose of raise() in other toolkits. - - Fl_Window::show(int argc, char **argv) is used for top-level - windows and allows standard arguments to be parsed from the - command-line. - - \note For some obscure reasons Fl_Window::show() resets the current - group by calling Fl_Group::current(0). The comments in the code - say "get rid of very common user bug: forgot end()". Although - this is true it may have unwanted side effects if you show() an - unrelated window (maybe for an error message or warning) while - building a window or any other group widget. - - \todo Check if we can remove resetting the current group in a later - FLTK version (after 1.3.x). This may break "already broken" programs - though if they rely on this "feature". - - \see Fl_Window::show(int argc, char **argv) - */ - virtual void show(); - /** - Removes the window from the screen. If the window is already hidden or - has not been shown then this does nothing and is harmless. - */ - virtual void hide(); - /** - Puts the window on the screen and parses command-line arguments. - - Usually (on X) this has the side effect of opening the display. - - This form should be used for top-level windows, at least for the - first (main) window. It allows standard arguments to be parsed - from the command-line. You can use \p argc and \p argv from - main(int argc, char **argv) for this call. - - The first call also sets up some system-specific internal - variables like the system colors. - - \todo explain which system parameters are set up. - - \param argc command-line argument count, usually from main() - \param argv command-line argument vector, usually from main() - - \see virtual void Fl_Window::show() - */ - void show(int argc, char **argv); - - // Enables synchronous show(), docs in Fl_Window.cxx - void wait_for_expose(); - - /** - Makes the window completely fill one or more screens, without any - window manager border visible. You must use fullscreen_off() to - undo this. - - \note On some platforms, this can result in the keyboard being - grabbed. The window may also be recreated, meaning hide() and - show() will be called. - - \see void Fl_Window::fullscreen_screens() - */ - void fullscreen(); - /** - Turns off any side effects of fullscreen() - */ - void fullscreen_off(); - /** - Turns off any side effects of fullscreen() and does - resize(x,y,w,h). - */ - void fullscreen_off(int X,int Y,int W,int H); - /** - Returns non zero if FULLSCREEN flag is set, 0 otherwise. - */ - unsigned int fullscreen_active() const { return flags() & FULLSCREEN; } - /** - Sets which screens should be used when this window is in fullscreen - mode. The window will be resized to the top of the screen with index - \p top, the bottom of the screen with index \p bottom, etc. - - If this method is never called, or if any argument is < 0, then the - window will be resized to fill the screen it is currently on. - - \see void Fl_Window::fullscreen() - */ - void fullscreen_screens(int top, int bottom, int left, int right); - /** - Iconifies the window. If you call this when shown() is false - it will show() it as an icon. If the window is already - iconified this does nothing. - - Call show() to restore the window. - - When a window is iconified/restored (either by these calls or by the - user) the handle() method is called with FL_HIDE and - FL_SHOW events and visible() is turned on and off. - - There is no way to control what is drawn in the icon except with the - string passed to Fl_Window::xclass(). You should not rely on - window managers displaying the icons. - */ - void iconize(); - - int x_root() const ; - int y_root() const ; - - static Fl_Window *current(); - /** - Sets things up so that the drawing functions in will go - into this window. This is useful for incremental update of windows, such - as in an idle callback, which will make your program behave much better - if it draws a slow graphic. Danger: incremental update is very hard to - debug and maintain! - - This method only works for the Fl_Window and Fl_Gl_Window derived classes. - */ - void make_current(); - - // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Window* as_window() { return this; } - - /** - Changes the cursor for this window. This always calls the system, if - you are changing the cursor a lot you may want to keep track of how - you set it in a static variable and call this only if the new cursor - is different. - - The type Fl_Cursor is an enumeration defined in . - - \see cursor(const Fl_RGB_Image*, int, int), default_cursor() - */ - void cursor(Fl_Cursor); - void cursor(const Fl_RGB_Image*, int, int); - void default_cursor(Fl_Cursor); - - /* for legacy compatibility */ - void cursor(Fl_Cursor c, Fl_Color, Fl_Color=FL_WHITE); - void default_cursor(Fl_Cursor c, Fl_Color, Fl_Color=FL_WHITE); - - static void default_callback(Fl_Window*, void* v); - - /** Returns the window width including any frame added by the window manager. - - Same as w() if applied to a subwindow. - */ - int decorated_w(); - /** Returns the window height including any window title bar and any frame - added by the window manager. - - Same as h() if applied to a subwindow. - */ - int decorated_h(); - -}; - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_Wizard.H b/msvc/fltk/include/FL/Fl_Wizard.H deleted file mode 100644 index 3bac57f8..00000000 --- a/msvc/fltk/include/FL/Fl_Wizard.H +++ /dev/null @@ -1,61 +0,0 @@ -// -// "$Id$" -// -// Fl_Wizard widget definitions. -// -// Copyright 1999-2010 by Easy Software Products. -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_Wizard widget . */ - -// -// Include necessary header files... -// - -#ifndef _Fl_Wizard_H_ -# define _Fl_Wizard_H_ - -# include - - -/** - This widget is based off the Fl_Tabs - widget, but instead of displaying tabs it only changes "tabs" under - program control. Its primary purpose is to support "wizards" that - step a user through configuration or troubleshooting tasks. - -

As with Fl_Tabs, wizard panes are composed of child (usually - Fl_Group) widgets. Navigation buttons must be added separately. -*/ -class FL_EXPORT Fl_Wizard : public Fl_Group { - - Fl_Widget *value_; - - void draw(); - - public: - - Fl_Wizard(int, int, int, int, const char * = 0); - - void next(); - void prev(); - Fl_Widget *value(); - void value(Fl_Widget *); -}; - -#endif // !_Fl_Wizard_H_ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_XBM_Image.H b/msvc/fltk/include/FL/Fl_XBM_Image.H deleted file mode 100644 index 13938e26..00000000 --- a/msvc/fltk/include/FL/Fl_XBM_Image.H +++ /dev/null @@ -1,41 +0,0 @@ -// -// "$Id$" -// -// XBM image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - Fl_XBM_Image class . */ - -#ifndef Fl_XBM_Image_H -#define Fl_XBM_Image_H -# include "Fl_Bitmap.H" - -/** - The Fl_XBM_Image class supports loading, caching, - and drawing of X Bitmap (XBM) bitmap files. -*/ -class FL_EXPORT Fl_XBM_Image : public Fl_Bitmap { - - public: - - Fl_XBM_Image(const char* filename); -}; - -#endif // !Fl_XBM_Image_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/Fl_XPM_Image.H b/msvc/fltk/include/FL/Fl_XPM_Image.H deleted file mode 100644 index c910fbff..00000000 --- a/msvc/fltk/include/FL/Fl_XPM_Image.H +++ /dev/null @@ -1,42 +0,0 @@ -// -// "$Id$" -// -// XPM image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/* \file - - Fl_XPM_Image class . */ - -#ifndef Fl_XPM_Image_H -#define Fl_XPM_Image_H -# include "Fl_Pixmap.H" - -/** - The Fl_XPM_Image class supports loading, caching, - and drawing of X Pixmap (XPM) images, including transparency. -*/ -class FL_EXPORT Fl_XPM_Image : public Fl_Pixmap { - - public: - - Fl_XPM_Image(const char* filename); -}; - -#endif // !Fl_XPM_Image - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/abi-version.h b/msvc/fltk/include/FL/abi-version.h deleted file mode 100644 index f07ddac5..00000000 --- a/msvc/fltk/include/FL/abi-version.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - ABI Configuration file for the Fast Light Tool Kit (FLTK). - - ============================================================================ - Edit with care! This source file (abi-version.ide) is used to - generate FL/abi-version.h by your IDE (Visual C++) build system ! - ---------------------------------------------------------------------------- - If you need to change the ABI configuration, edit abi-version.ide - in the FLTK source (root) directory and "Rebuild Solution". - This will copy abi-version.ide to FL/abi-version.h. - DO NOT edit FL/abi-version.h directly ! - ---------------------------------------------------------------------------- - See below for instructions how to edit abi-version.ide. - The default ABI version (#undef FL_ABI_VERSION) is 1.x.0 (1xx00). - ============================================================================ - - Define FL_ABI_VERSION as 1xxyy for FLTK ABI version 1.x.y. - - Use leading zeroes in xx and yy - don't use a leading zero for - the major version number (currently 1). - Replace the line below (#undef FL_ABI_VERSION) with your definition. - - Example: - - #define FL_ABI_VERSION 10302 -*/ - -#undef FL_ABI_VERSION diff --git a/msvc/fltk/include/FL/dirent.h b/msvc/fltk/include/FL/dirent.h deleted file mode 100644 index f99f44ea..00000000 --- a/msvc/fltk/include/FL/dirent.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// "$Id$" -// -// Directory header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - - -// this file is for back-compatibility only -#include "filename.H" - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/filename.H b/msvc/fltk/include/FL/filename.H deleted file mode 100644 index f5c87bc6..00000000 --- a/msvc/fltk/include/FL/filename.H +++ /dev/null @@ -1,176 +0,0 @@ -/* - * "$Id$" - * - * Filename header file for the Fast Light Tool Kit (FLTK). - * - * Copyright 1998-2010 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: - * - * http://www.fltk.org/COPYING.php - * - * Please report all bugs and problems on the following page: - * - * http://www.fltk.org/str.php - */ -/** \file - File names and URI utility functions. - */ - -/* Xcode on OS X includes files by recursing down into directories. - * This code catches the cycle and directly includes the required file. - */ -#ifdef fl_dirent_h_cyclic_include -# include "/usr/include/dirent.h" -#endif - -#ifndef FL_FILENAME_H -# define FL_FILENAME_H - -# include "Fl_Export.H" - -/** \addtogroup filenames File names and URI utility functions - File names and URI functions defined in - @{ */ - -# define FL_PATH_MAX 2048 /**< all path buffers should use this length */ -/** Gets the file name from a path. - Similar to basename(3), exceptions shown below. - \code - #include - [..] - const char *out; - out = fl_filename_name("/usr/lib"); // out="lib" - out = fl_filename_name("/usr/"); // out="" (basename(3) returns "usr" instead) - out = fl_filename_name("/usr"); // out="usr" - out = fl_filename_name("/"); // out="" (basename(3) returns "/" instead) - out = fl_filename_name("."); // out="." - out = fl_filename_name(".."); // out=".." - \endcode - \return a pointer to the char after the last slash, or to \p filename if there is none. - */ -FL_EXPORT const char *fl_filename_name(const char * filename); -FL_EXPORT const char *fl_filename_ext(const char *buf); -FL_EXPORT char *fl_filename_setext(char *to, int tolen, const char *ext); -FL_EXPORT int fl_filename_expand(char *to, int tolen, const char *from); -FL_EXPORT int fl_filename_absolute(char *to, int tolen, const char *from); -FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from); -FL_EXPORT int fl_filename_match(const char *name, const char *pattern); -FL_EXPORT int fl_filename_isdir(const char *name); - -# if defined(__cplusplus) && !defined(FL_DOXYGEN) -/* - * Under WIN32, we include filename.H from numericsort.c; this should probably change... - */ - -inline char *fl_filename_setext(char *to, const char *ext) { return fl_filename_setext(to, FL_PATH_MAX, ext); } -inline int fl_filename_expand(char *to, const char *from) { return fl_filename_expand(to, FL_PATH_MAX, from); } -inline int fl_filename_absolute(char *to, const char *from) { return fl_filename_absolute(to, FL_PATH_MAX, from); } -FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from, const char *cwd); -inline int fl_filename_relative(char *to, const char *from) { return fl_filename_relative(to, FL_PATH_MAX, from); } -# endif /* __cplusplus */ - - -# if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WATCOMC__) - -struct dirent {char d_name[1];}; - -# elif defined(__WATCOMC__) -# include -# include - -# else -/* - * WARNING: on some systems (very few nowadays?) may not exist. - * The correct information is in one of these files: - * - * #include - * #include - * #include - * - * plus you must do the following #define: - * - * #define dirent direct - * - * It would be best to create a file that does this... - */ -# include -# define fl_dirent_h_cyclic_include -# include -# undef fl_dirent_h_cyclic_include -# endif - -# if defined (__cplusplus) -extern "C" { -# endif /* __cplusplus */ - -# if !defined(FL_DOXYGEN) -FL_EXPORT int fl_alphasort(struct dirent **, struct dirent **); -FL_EXPORT int fl_casealphasort(struct dirent **, struct dirent **); -FL_EXPORT int fl_casenumericsort(struct dirent **, struct dirent **); -FL_EXPORT int fl_numericsort(struct dirent **, struct dirent **); -# endif - - typedef int (Fl_File_Sort_F)(struct dirent **, struct dirent **); /**< File sorting function. \see fl_filename_list() */ - -# if defined(__cplusplus) -} - -/* - * Portable "scandir" function. Ugly but necessary... - */ - -FL_EXPORT int fl_filename_list(const char *d, struct dirent ***l, - Fl_File_Sort_F *s = fl_numericsort); -FL_EXPORT void fl_filename_free_list(struct dirent ***l, int n); - -/* - * Generic function to open a Uniform Resource Identifier (URI) using a - * system-defined program (added in FLTK 1.1.8) - */ - -FL_EXPORT int fl_open_uri(const char *uri, char *msg = (char *)0, - int msglen = 0); - -FL_EXPORT void fl_decode_uri(char *uri); - -# ifndef FL_DOXYGEN -/* - * _fl_filename_isdir_quick() is a private function that checks for a - * trailing slash and assumes that the passed name is a directory if - * it finds one. This function is used by Fl_File_Browser and - * Fl_File_Chooser to avoid extra stat() calls, but is not supported - * outside of FLTK... - */ -int _fl_filename_isdir_quick(const char *name); -# endif - -# endif /* __cplusplus */ - -/* - * FLTK 1.0.x compatibility definitions... - */ - -# ifdef FLTK_1_0_COMPAT -# define filename_absolute fl_filename_absolute -# define filename_expand fl_filename_expand -# define filename_ext fl_filename_ext -# define filename_isdir fl_filename_isdir -# define filename_list fl_filename_list -# define filename_match fl_filename_match -# define filename_name fl_filename_name -# define filename_relative fl_filename_relative -# define filename_setext fl_filename_setext -# define numericsort fl_numericsort -# endif /* FLTK_1_0_COMPAT */ - - -#endif /* FL_FILENAME_H */ - -/** @} */ - -/* - * End of "$Id$". - */ diff --git a/msvc/fltk/include/FL/fl_ask.H b/msvc/fltk/include/FL/fl_ask.H deleted file mode 100644 index ad1b7b23..00000000 --- a/msvc/fltk/include/FL/fl_ask.H +++ /dev/null @@ -1,82 +0,0 @@ -// -// "$Id$" -// -// Standard dialog header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file fl_ask.H - API for common dialogs. - */ - -#ifndef fl_ask_H -# define fl_ask_H - -# include "Enumerations.H" - -class Fl_Widget; - -/** Different system beeps available. - \sa fl_beep(int) */ -enum Fl_Beep { - FL_BEEP_DEFAULT = 0, ///< Default beep. - FL_BEEP_MESSAGE, ///< Message beep. - FL_BEEP_ERROR, ///< Error beep. - FL_BEEP_QUESTION, ///< Question beep. - FL_BEEP_PASSWORD, ///< Password beep. - FL_BEEP_NOTIFICATION ///< Notification beep. -}; - -# ifdef __GNUC__ -/* the GNUC-specific attribute appearing below in prototypes with a variable list of arguments - helps detection of mismatches between format string and argument list at compilation time */ -# define __fl_attr(x) __attribute__ (x) -# else -# define __fl_attr(x) -# endif // __GNUC__ - -FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT); -FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2))); -FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2))); -// fl_ask() is deprecated since it uses "Yes" and "No" for the buttons, -// which does not conform to the current FLTK Human Interface Guidelines. -// Use fl_choice() instead with the appropriate verbs instead. -FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__)); -FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5))); -FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3))); -FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3))); - -FL_EXPORT Fl_Widget *fl_message_icon(); -extern FL_EXPORT Fl_Font fl_message_font_; -extern FL_EXPORT Fl_Fontsize fl_message_size_; -inline void fl_message_font(Fl_Font f, Fl_Fontsize s) { - fl_message_font_ = f; fl_message_size_ = s;} - -FL_EXPORT void fl_message_hotspot(int enable); -FL_EXPORT int fl_message_hotspot(void); - -FL_EXPORT void fl_message_title(const char *title); -FL_EXPORT void fl_message_title_default(const char *title); - -// pointers you can use to change FLTK to a foreign language: -extern FL_EXPORT const char* fl_no; -extern FL_EXPORT const char* fl_yes; -extern FL_EXPORT const char* fl_ok; -extern FL_EXPORT const char* fl_cancel; -extern FL_EXPORT const char* fl_close; -#endif // !fl_ask_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/fl_draw.H b/msvc/fltk/include/FL/fl_draw.H deleted file mode 100644 index 7e867610..00000000 --- a/msvc/fltk/include/FL/fl_draw.H +++ /dev/null @@ -1,805 +0,0 @@ -// -// "$Id$" -// -// Portable drawing function header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** - \file fl_draw.H - \brief utility header to pull drawing functions together -*/ - -#ifndef fl_draw_H -#define fl_draw_H - -#include // for Fl_Region -#include // for the color names -#include // for fl_set_spot() -#include // for fl_graphics_driver - -// Image class... -class Fl_Image; - -// Label flags... -FL_EXPORT extern char fl_draw_shortcut; - -/** \addtogroup fl_attributes - @{ -*/ - -// Colors: -/** - Sets the color for all subsequent drawing operations. - For colormapped displays, a color cell will be allocated out of - \p fl_colormap the first time you use a color. If the colormap fills up - then a least-squares algorithm is used to find the closest color. - If no valid graphical context (fl_gc) is available, - the foreground is not set for the current window. - \param[in] c color - */ -inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); } // select indexed color -/** for back compatibility - use fl_color(Fl_Color c) instead */ -inline void fl_color(int c) {fl_color((Fl_Color)c);} -/** - Sets the color for all subsequent drawing operations. - The closest possible match to the RGB color is used. - The RGB color is used directly on TrueColor displays. - For colormap visuals the nearest index in the gray - ramp or color cube is used. - If no valid graphical context (fl_gc) is available, - the foreground is not set for the current window. - \param[in] r,g,b color components - */ -inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); } // select actual color -/** - Returns the last fl_color() that was set. - This can be used for state save/restore. -*/ -inline Fl_Color fl_color() {return fl_graphics_driver->color();} -/** @} */ - -/** \addtogroup fl_drawings - @{ -*/ -// clip: -/** - Intersects the current clip region with a rectangle and pushes this - new region onto the stack. - \param[in] x,y,w,h position and size - */ -inline void fl_push_clip(int x, int y, int w, int h) {fl_graphics_driver->push_clip(x,y,w,h); } -/** - Intersects the current clip region with a rectangle and pushes this - new region onto the stack (deprecated). - \param[in] x,y,w,h position and size - \deprecated - fl_clip(int, int, int, int) is deprecated and will be removed from future releases. - Please use fl_push_clip(int x, int y, int w, int h) instead. - */ -#define fl_clip fl_push_clip -/** - Pushes an empty clip region onto the stack so nothing will be clipped. - */ -inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); } -/** - Restores the previous clip region. - - You must call fl_pop_clip() once for every time you call fl_push_clip(). - Unpredictable results may occur if the clip stack is not empty when - you return to FLTK. - */ -inline void fl_pop_clip() {fl_graphics_driver->pop_clip(); } -/** - Does the rectangle intersect the current clip region? - \param[in] x,y,w,h position and size of rectangle - \returns non-zero if any of the rectangle intersects the current clip - region. If this returns 0 you don't have to draw the object. - - \note - Under X this returns 2 if the rectangle is partially clipped, - and 1 if it is entirely inside the clip region. - */ -inline int fl_not_clipped(int x, int y, int w, int h) {return fl_graphics_driver->not_clipped(x,y,w,h); } -/** - Intersects the rectangle with the current clip region and returns the - bounding box of the result. - - Returns non-zero if the resulting rectangle is different to the original. - This can be used to limit the necessary drawing to a rectangle. - \p W and \p H are set to zero if the rectangle is completely outside the region. - \param[in] x,y,w,h position and size of rectangle - \param[out] X,Y,W,H position and size of resulting bounding box. - \returns Non-zero if the resulting rectangle is different to the original. - */ -inline int fl_clip_box(int x , int y, int w, int h, int& X, int& Y, int& W, int& H) - {return fl_graphics_driver->clip_box(x,y,w,h,X,Y,W,H); } -/** Undoes any clobbering of clip done by your program */ -inline void fl_restore_clip() { fl_graphics_driver->restore_clip(); } -/** - Replaces the top of the clipping stack with a clipping region of any shape. - - Fl_Region is an operating system specific type. - \param[in] r clipping region - */ -inline void fl_clip_region(Fl_Region r) { fl_graphics_driver->clip_region(r); } -/** - Returns the current clipping region. - */ -inline Fl_Region fl_clip_region() { return fl_graphics_driver->clip_region(); } - - -// points: -/** - Draws a single pixel at the given coordinates - */ -inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); } - -// line type: -/** - Sets how to draw lines (the "pen"). - If you change this it is your responsibility to set it back to the default - using \c fl_line_style(0). - - \param[in] style A bitmask which is a bitwise-OR of a line style, a cap - style, and a join style. If you don't specify a dash type you - will get a solid line. If you don't specify a cap or join type - you will get a system-defined default of whatever value is - fastest. - \param[in] width The thickness of the lines in pixels. Zero results in the - system defined default, which on both X and Windows is somewhat - different and nicer than 1. - \param[in] dashes A pointer to an array of dash lengths, measured in pixels. - The first location is how long to draw a solid portion, the next - is how long to draw the gap, then the solid, etc. It is terminated - with a zero-length entry. A \c NULL pointer or a zero-length - array results in a solid line. Odd array sizes are not supported - and result in undefined behavior. - - \note Because of how line styles are implemented on Win32 systems, - you \e must set the line style \e after setting the drawing - color. If you set the color after the line style you will lose - the line style settings. - \note The \p dashes array does not work under Windows 95, 98 or Me, - since those operating systems do not support complex line styles. - */ -inline void fl_line_style(int style, int width=0, char* dashes=0) {fl_graphics_driver->line_style(style,width,dashes); } -enum { - FL_SOLID = 0, ///< line style: ___________ - FL_DASH = 1, ///< line style: _ _ _ _ _ _ - FL_DOT = 2, ///< line style: . . . . . . - FL_DASHDOT = 3, ///< line style: _ . _ . _ . - FL_DASHDOTDOT = 4, ///< line style: _ . . _ . . - - FL_CAP_FLAT = 0x100, ///< cap style: end is flat - FL_CAP_ROUND = 0x200, ///< cap style: end is round - FL_CAP_SQUARE = 0x300, ///< cap style: end wraps end point - - FL_JOIN_MITER = 0x1000, ///< join style: line join extends to a point - FL_JOIN_ROUND = 0x2000, ///< join style: line join is rounded - FL_JOIN_BEVEL = 0x3000 ///< join style: line join is tidied -}; - -// rectangles tweaked to exactly fill the pixel rectangle: - -/** - Draws a 1-pixel border \e inside the given bounding box. - This function is meant for quick drawing of simple boxes. The behavior is - undefined for line widths that are not 1. - */ -inline void fl_rect(int x, int y, int w, int h) { fl_graphics_driver->rect(x,y,w,h); } - -/** Draws with passed color a 1-pixel border \e inside the given bounding box */ -inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);} -/** Colors with current color a rectangle that exactly fills the given bounding box */ -inline void fl_rectf(int x, int y, int w, int h) { fl_graphics_driver->rectf(x,y,w,h); } -/** Colors with passed color a rectangle that exactly fills the given bounding box */ -inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);} - -/** - Colors a rectangle with "exactly" the passed r,g,b color. - On screens with less than 24 bits of color this is done by drawing a - solid-colored block using fl_draw_image() so that the correct color - shade is produced. - */ -/* note: doxygen comment here to avoid triplication in os-speciic files */ -FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b); - -// line segments: -/** - Draws a line from (x,y) to (x1,y1) - */ -inline void fl_line(int x, int y, int x1, int y1) {fl_graphics_driver->line(x,y,x1,y1); } -/** - Draws a line from (x,y) to (x1,y1) and another from (x1,y1) to (x2,y2) - */ -inline void fl_line(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->line(x,y,x1,y1,x2,y2); } - -// closed line segments: -/** - Outlines a 3-sided polygon with lines - */ -inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->loop(x,y,x1,y1,x2,y2); } -/** - Outlines a 4-sided polygon with lines - */ -inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) - {fl_graphics_driver->loop(x,y,x1,y1,x2,y2,x3,y3); } - -// filled polygons -/** - Fills a 3-sided polygon. The polygon must be convex. - */ -inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->polygon(x,y,x1,y1,x2,y2); } -/** - Fills a 4-sided polygon. The polygon must be convex. - */ -inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3) - { fl_graphics_driver->polygon(x,y,x1,y1,x2,y2,x3,y3); } - -// draw rectilinear lines, horizontal segment first: -/** - Draws a horizontal line from (x,y) to (x1,y) - */ -inline void fl_xyline(int x, int y, int x1) {fl_graphics_driver->xyline(x,y,x1);} -/** - Draws a horizontal line from (x,y) to (x1,y), then vertical from (x1,y) to (x1,y2) - */ -inline void fl_xyline(int x, int y, int x1, int y2) {fl_graphics_driver->xyline(x,y,x1,y2);} -/** - Draws a horizontal line from (x,y) to (x1,y), then a vertical from (x1,y) to (x1,y2) - and then another horizontal from (x1,y2) to (x3,y2) - */ -inline void fl_xyline(int x, int y, int x1, int y2, int x3) {fl_graphics_driver->xyline(x,y,x1,y2,x3);} - -// draw rectilinear lines, vertical segment first: -/** - Draws a vertical line from (x,y) to (x,y1) - */ -inline void fl_yxline(int x, int y, int y1) {fl_graphics_driver->yxline(x,y,y1);} -/** - Draws a vertical line from (x,y) to (x,y1), then a horizontal from (x,y1) to (x2,y1) - */ -inline void fl_yxline(int x, int y, int y1, int x2) {fl_graphics_driver->yxline(x,y,y1,x2);} -/** - Draws a vertical line from (x,y) to (x,y1) then a horizontal from (x,y1) - to (x2,y1), then another vertical from (x2,y1) to (x2,y3) - */ -inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver->yxline(x,y,y1,x2,y3);} - -// circular lines and pie slices (code in fl_arci.C): -/** - Draw ellipse sections using integer coordinates. - - These functions match the rather limited circle drawing code provided by X - and WIN32. The advantage over using fl_arc with floating point coordinates - is that they are faster because they often use the hardware, and they draw - much nicer small circles, since the small sizes are often hard-coded bitmaps. - - If a complete circle is drawn it will fit inside the passed bounding box. - The two angles are measured in degrees counter-clockwise from 3 o'clock and - are the starting and ending angle of the arc, \p a2 must be greater or equal - to \p a1. - - fl_arc() draws a series of lines to approximate the arc. Notice that the - integer version of fl_arc() has a different number of arguments than the - double version fl_arc(double x, double y, double r, double start, double end) - - \param[in] x,y,w,h bounding box of complete circle - \param[in] a1,a2 start and end angles of arc measured in degrees - counter-clockwise from 3 o'clock. \p a2 must be greater - than or equal to \p a1. - */ -inline void fl_arc(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->arc(x,y,w,h,a1,a2); } -/** - Draw filled ellipse sections using integer coordinates. - - Like fl_arc(), but fl_pie() draws a filled-in pie slice. - This slice may extend outside the line drawn by fl_arc(); - to avoid this use w - 1 and h - 1. - - \param[in] x,y,w,h bounding box of complete circle - \param[in] a1,a2 start and end angles of arc measured in degrees - counter-clockwise from 3 o'clock. \p a2 must be greater - than or equal to \p a1. - */ -inline void fl_pie(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->pie(x,y,w,h,a1,a2); } -/** fl_chord declaration is a place holder - the function does not yet exist */ -FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // nyi - -// scalable drawing code (code in fl_vertex.C and fl_arc.C): -/** - Saves the current transformation matrix on the stack. - The maximum depth of the stack is 32. - */ -inline void fl_push_matrix() { fl_graphics_driver->push_matrix(); } -/** - Restores the current transformation matrix from the stack. - */ -inline void fl_pop_matrix() { fl_graphics_driver->pop_matrix(); } -/** - Concatenates scaling transformation onto the current one. - \param[in] x,y scale factors in x-direction and y-direction - */ -inline void fl_scale(double x, double y) { fl_graphics_driver->scale(x, y); } -/** - Concatenates scaling transformation onto the current one. - \param[in] x scale factor in both x-direction and y-direction - */ -inline void fl_scale(double x) { fl_graphics_driver->scale(x, x); } -/** - Concatenates translation transformation onto the current one. - \param[in] x,y translation factor in x-direction and y-direction - */ -inline void fl_translate(double x, double y) { fl_graphics_driver->translate(x, y); } -/** - Concatenates rotation transformation onto the current one. - \param[in] d - rotation angle, counter-clockwise in degrees (not radians) - */ -inline void fl_rotate(double d) { fl_graphics_driver->rotate(d); } -/** - Concatenates another transformation onto the current one. - - \param[in] a,b,c,d,x,y transformation matrix elements such that - X' = aX + cY + x and Y' = bX +dY + y - */ -inline void fl_mult_matrix(double a, double b, double c, double d, double x,double y) - { fl_graphics_driver->mult_matrix(a, b, c, d, x, y); } -/** - Starts drawing a list of points. Points are added to the list with fl_vertex() - */ -inline void fl_begin_points() {fl_graphics_driver->begin_points(); } -/** - Starts drawing a list of lines. - */ -inline void fl_begin_line() {fl_graphics_driver->begin_line(); } -/** - Starts drawing a closed sequence of lines. - */ -inline void fl_begin_loop() {fl_graphics_driver->begin_loop(); } -/** - Starts drawing a convex filled polygon. - */ -inline void fl_begin_polygon() {fl_graphics_driver->begin_polygon(); } -/** - Adds a single vertex to the current path. - \param[in] x,y coordinate - */ -inline void fl_vertex(double x, double y) {fl_graphics_driver->vertex(x,y); } -/** - Adds a series of points on a Bezier curve to the path. - The curve ends (and two of the points) are at X0,Y0 and X3,Y3. - \param[in] X0,Y0 curve start point - \param[in] X1,Y1 curve control point - \param[in] X2,Y2 curve control point - \param[in] X3,Y3 curve end point - */ -inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3) - {fl_graphics_driver->curve(X0,Y0,X1,Y1,X2,Y2,X3,Y3); } -/** - Adds a series of points to the current path on the arc of a circle. - You can get elliptical paths by using scale and rotate before calling fl_arc(). - \param[in] x,y,r center and radius of circular arc - \param[in] start,end angles of start and end of arc measured in degrees - counter-clockwise from 3 o'clock. If \p end is less than \p start - then it draws the arc in a clockwise direction. - - Examples: - \code - // Draw an arc of points - fl_begin_points(); - fl_arc(100.0, 100.0, 50.0, 0.0, 180.0); - fl_end_points(); - - // Draw arc with a line - fl_begin_line(); - fl_arc(200.0, 100.0, 50.0, 0.0, 180.0); - fl_end_line(); - - // Draw filled arc - fl_begin_polygon(); - fl_arc(300.0, 100.0, 50.0, 0.0, 180.0); - fl_end_polygon(); - \endcode - */ -inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); } -/** - fl_circle() is equivalent to fl_arc(x,y,r,0,360), but may be faster. - - It must be the \e only thing in the path: if you want a circle as part of - a complex polygon you must use fl_arc() - \param[in] x,y,r center and radius of circle - */ -inline void fl_circle(double x, double y, double r) {fl_graphics_driver->circle(x,y,r); } -/** - Ends list of points, and draws. - */ -inline void fl_end_points() {fl_graphics_driver->end_points(); } -/** - Ends list of lines, and draws. - */ -inline void fl_end_line() {fl_graphics_driver->end_line(); } -/** - Ends closed sequence of lines, and draws. - */ -inline void fl_end_loop() {fl_graphics_driver->end_loop(); } -/** - Ends convex filled polygon, and draws. - */ -inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); } -/** - Starts drawing a complex filled polygon. - - The polygon may be concave, may have holes in it, or may be several - disconnected pieces. Call fl_gap() to separate loops of the path. - - To outline the polygon, use fl_begin_loop() and replace each fl_gap() - with fl_end_loop();fl_begin_loop() pairs. - - \note - For portability, you should only draw polygons that appear the same - whether "even/odd" or "non-zero" winding rules are used to fill them. - Holes should be drawn in the opposite direction to the outside loop. - */ -inline void fl_begin_complex_polygon() {fl_graphics_driver->begin_complex_polygon(); } -/** - Call fl_gap() to separate loops of the path. - - It is unnecessary but harmless to call fl_gap() before the first vertex, - after the last vertex, or several times in a row. - */ -inline void fl_gap() {fl_graphics_driver->gap(); } -/** - Ends complex filled polygon, and draws. - */ -inline void fl_end_complex_polygon() {fl_graphics_driver->end_complex_polygon(); } -// get and use transformed positions: -/** - Transforms coordinate using the current transformation matrix. - \param[in] x,y coordinate - */ -inline double fl_transform_x(double x, double y) {return fl_graphics_driver->transform_x(x, y); } -/** - Transforms coordinate using the current transformation matrix. - \param[in] x,y coordinate - */ -inline double fl_transform_y(double x, double y) {return fl_graphics_driver->transform_y(x, y); } -/** - Transforms distance using current transformation matrix. - \param[in] x,y coordinate - */ -inline double fl_transform_dx(double x, double y) {return fl_graphics_driver->transform_dx(x, y); } -/** - Transforms distance using current transformation matrix. - \param[in] x,y coordinate - */ -inline double fl_transform_dy(double x, double y) {return fl_graphics_driver->transform_dy(x, y); } -/** - Adds coordinate pair to the vertex list without further transformations. - \param[in] xf,yf transformed coordinate - */ -inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->transformed_vertex(xf,yf); } -/** @} */ - -/** \addtogroup fl_attributes - @{ */ -/* NOTE: doxygen comments here to avoid triplication in os-specific sources */ - -// Fonts: -/** - Sets the current font, which is then used in various drawing routines. - You may call this outside a draw context if necessary to call fl_width(), - but on X this will open the display. - - The font is identified by a \p face and a \p size. - The size of the font is measured in pixels and not "points". - Lines should be spaced \p size pixels apart or more. -*/ -inline void fl_font(Fl_Font face, Fl_Fontsize fsize) { fl_graphics_driver->font(face,fsize); } - -/** - Returns the \p face set by the most recent call to fl_font(). - This can be used to save/restore the font. -*/ -inline Fl_Font fl_font() {return fl_graphics_driver->font();} -/** - Returns the \p size set by the most recent call to fl_font(). - This can be used to save/restore the font. -*/ -inline Fl_Fontsize fl_size() {return fl_graphics_driver->size();} - -// information you can get about the current font: -/** - Returns the recommended minimum line spacing for the current font. - You can also use the value of \p size passed to fl_font() -*/ -inline int fl_height() {return fl_graphics_driver->height();} -FL_EXPORT int fl_height(int font, int size); -/** - Returns the recommended distance above the bottom of a fl_height() tall box to - draw the text at so it looks centered vertically in that box. -*/ -inline int fl_descent() {return fl_graphics_driver->descent();} -/** Returns the typographical width of a nul-terminated string - using the current font face and size. */ -FL_EXPORT double fl_width(const char* txt); -/** Returns the typographical width of a sequence of \p n characters - using the current font face and size. */ -inline double fl_width(const char* txt, int n) {return fl_graphics_driver->width(txt, n);} -/** Returns the typographical width of a single character - using the current font face and size. - \note if a valid fl_gc is NOT found then it uses the first window gc, - or the screen gc if no fltk window is available when called. */ -inline double fl_width(unsigned int c) {return fl_graphics_driver->width(c);} -/** Determines the minimum pixel dimensions of a nul-terminated string. - - Usage: given a string "txt" drawn using fl_draw(txt, x, y) you would determine - its pixel extents on the display using fl_text_extents(txt, dx, dy, wo, ho) - such that a bounding box that exactly fits around the text could be drawn with - fl_rect(x+dx, y+dy, wo, ho). Note the dx, dy values hold the offset of the first - "colored in" pixel of the string, from the draw origin. - - No FLTK symbol expansion will be performed. -*/ -FL_EXPORT void fl_text_extents(const char*, int& dx, int& dy, int& w, int& h); // NO fltk symbol expansion will be performed -/** Determines the minimum pixel dimensions of a sequence of \p n characters. -\see fl_text_extents(const char*, int& dx, int& dy, int& w, int& h) -*/ -inline void fl_text_extents(const char *t, int n, int& dx, int& dy, int& w, int& h) - {fl_graphics_driver->text_extents(t, n, dx, dy, w, h);} - -// font encoding: -// Note: doxygen comments here to avoid duplication for os-sepecific cases -/** - Converts text from Windows/X11 latin1 character set to local encoding. - \param[in] t character string (latin1 encoding) - \param[in] n optional number of characters to convert (default is all) - \returns pointer to internal buffer containing converted characters - */ -FL_EXPORT const char *fl_latin1_to_local(const char *t, int n=-1); -/** - Converts text from local encoding to Windowx/X11 latin1 character set. - \param[in] t character string (local encoding) - \param[in] n optional number of characters to convert (default is all) - \returns pointer to internal buffer containing converted characters - */ -FL_EXPORT const char *fl_local_to_latin1(const char *t, int n=-1); -/** - Converts text from Mac Roman character set to local encoding. - \param[in] t character string (Mac Roman encoding) - \param[in] n optional number of characters to convert (default is all) - \returns pointer to internal buffer containing converted characters - */ -FL_EXPORT const char *fl_mac_roman_to_local(const char *t, int n=-1); -/** - Converts text from local encoding to Mac Roman character set. - \param[in] t character string (local encoding) - \param[in] n optional number of characters to convert (default is all) - \returns pointer to internal buffer containing converted characters - */ -FL_EXPORT const char *fl_local_to_mac_roman(const char *t, int n=-1); -/** @} */ - -/** \addtogroup fl_drawings - @{ */ -/** - Draws a nul-terminated UTF-8 string starting at the given \p x, \p y location. - - Text is aligned to the left and to the baseline of the font. - To align to the bottom, subtract fl_descent() from \p y. - To align to the top, subtract fl_descent() and add fl_height(). - This version of fl_draw provides direct access to the text drawing - function of the underlying OS. It does not apply any special handling - to control characters. -*/ -FL_EXPORT void fl_draw(const char* str, int x, int y); -/** - Draws a nul-terminated UTF-8 string starting at the given \p x, \p y - location and rotating \p angle degrees counter-clockwise. - This version of fl_draw provides direct access to the text drawing - function of the underlying OS and is supported by Xft, Win32 and MacOS - fltk subsets. -*/ -FL_EXPORT void fl_draw(int angle, const char* str, int x, int y); -/** - Draws starting at the given \p x, \p y location a UTF-8 string of length \p n bytes. -*/ -inline void fl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->draw(str,n,x,y); } -/** - Draws at the given \p x, \p y location a UTF-8 string of length \p n bytes - rotating \p angle degrees counter-clockwise. - - \note When using X11 (Unix, Linux, Cygwin et al.) this needs Xft to work. - Under plain X11 (w/o Xft) rotated text is not supported by FLTK. - A warning will be issued to stderr at runtime (only once) if you - use this method with an angle other than 0. -*/ -inline void fl_draw(int angle, const char* str, int n, int x, int y) {fl_graphics_driver->draw(angle,str,n,x,y); } -/** - Draws a UTF-8 string of length \p n bytes right to left starting at the given \p x, \p y location. -*/ -inline void fl_rtl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->rtl_draw(str,n,x,y); } -FL_EXPORT void fl_measure(const char* str, int& x, int& y, - int draw_symbols = 1); -FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h, - Fl_Align align, - Fl_Image* img=0, int draw_symbols = 1); -FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h, - Fl_Align align, - void (*callthis)(const char *,int,int,int), - Fl_Image* img=0, int draw_symbols = 1); - -// boxtypes: -FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h); -FL_EXPORT void fl_frame2(const char* s, int x, int y, int w, int h); -FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color); - -// images: - -/** - Draws an 8-bit per color RGB or luminance image. - \param[in] buf points at the "r" data of the top-left pixel. - Color data must be in r,g,b order. - Luminance data is only one gray byte. - \param[in] X,Y position where to put top-left corner of image - \param[in] W,H size of the image - \param[in] D delta to add to the pointer between pixels. It may be - any value greater than or equal to 1, or it can be - negative to flip the image horizontally - \param[in] L delta to add to the pointer between lines (if 0 is - passed it uses \p W * \p D), and may be larger than - \p W * \p D to crop data, or negative to flip the - image vertically - - It is highly recommended that you put the following code before the - first show() of \e any window in your program to get rid of - the dithering if possible: - \code - Fl::visual(FL_RGB); - \endcode - - Gray scale (1-channel) images may be drawn. This is done if - abs(D) is less than 3, or by calling fl_draw_image_mono(). - Only one 8-bit sample is used for each pixel, and on screens with - different numbers of bits for red, green, and blue only gray colors - are used. Setting \p D greater than 1 will let you display one channel - of a color image. - - \par Note: - The X version does not support all possible visuals. If FLTK cannot - draw the image in the current visual it will abort. FLTK supports - any visual of 8 bits or less, and all common TrueColor visuals up - to 32 bits. - */ -inline void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) - { fl_graphics_driver->draw_image(buf, X, Y, W, H, D, L); } - -/** - Draws a gray-scale (1 channel) image. - \see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L) - */ -inline void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) - { fl_graphics_driver->draw_image_mono(buf, X, Y, W, H, D, L); } - -/** - Draws an image using a callback function to generate image data. - - You can generate the image as it is being drawn, or do arbitrary - decompression of stored data, provided it can be decompressed to - individual scan lines easily. - \param[in] cb callback function to generate scan line data - \param[in] data user data passed to callback function - \param[in] X,Y screen position of top left pixel - \param[in] W,H image width and height - \param[in] D data size in bytes (must be greater than 0) - \see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L) - - The callback function \p cb is called with the void* \p data - user data pointer to allow access to a structure of information about - the image, and the \p x, \p y, and \p w of the scan line desired from - the image. 0,0 is the upper-left corner of the image, not \p x, \p y. - A pointer to a buffer to put the data into is passed. You must copy - \p w pixels from scanline \p y, starting at pixel \p x, to this buffer. - - Due to cropping, less than the whole image may be requested. So \p x - may be greater than zero, the first \p y may be greater than zero, - and \p w may be less than \p W. The buffer is long enough to store - the entire \p W * \p D pixels, this is for convenience with some - decompression schemes where you must decompress the entire line at - once: decompress it into the buffer, and then if \p x is not zero, - copy the data over so the \p x'th pixel is at the start of the buffer. - - You can assume the \p y's will be consecutive, except the first one - may be greater than zero. - - If \p D is 4 or more, you must fill in the unused bytes with zero. - */ -inline void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) - { fl_graphics_driver->draw_image(cb, data, X, Y, W, H, D); } - -/** - Draws a gray-scale image using a callback function to generate image data. - \see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D) - */ -inline void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) - { fl_graphics_driver->draw_image_mono(cb, data, X, Y, W, H, D); } - -/** - Checks whether platform supports true alpha blending for RGBA images. - \returns 1 if true alpha blending supported by platform - \returns 0 not supported so FLTK will use screen door transparency - */ -/* note: doxygen comment here to avoid triplication in os-speciic files */ -FL_EXPORT char fl_can_do_alpha_blending(); - -/** - Reads an RGB(A) image from the current window or off-screen buffer. - \param[in] p pixel buffer, or NULL to allocate one - \param[in] X,Y position of top-left of image to read - \param[in] W,H width and height of image to read - \param[in] alpha alpha value for image (0 for none) - \returns pointer to pixel buffer, or NULL if allocation failed. - - The \p p argument points to a buffer that can hold the image and must - be at least \p W*H*3 bytes when reading RGB images, or \p W*H*4 bytes - when reading RGBA images. If NULL, fl_read_image() will create an - array of the proper size which can be freed using delete[]. - - The \p alpha parameter controls whether an alpha channel is created - and the value that is placed in the alpha channel. If 0, no alpha - channel is generated. - */ -/* note: doxygen comment here to avoid triplication in os-speciic files */ -FL_EXPORT uchar *fl_read_image(uchar *p,int X,int Y,int W,int H,int alpha=0); - -// pixmaps: -FL_EXPORT int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color=FL_GRAY); -FL_EXPORT int fl_draw_pixmap(const char* const* cdata, int x,int y,Fl_Color=FL_GRAY); -FL_EXPORT int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h); -FL_EXPORT int fl_measure_pixmap(const char* const* cdata, int &w, int &h); - -// other: -FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy, - void (*draw_area)(void*, int,int,int,int), void* data); -FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut); -FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut, const char **eom); -FL_EXPORT unsigned int fl_old_shortcut(const char* s); -FL_EXPORT void fl_overlay_rect(int x,int y,int w,int h); -FL_EXPORT void fl_overlay_clear(); -FL_EXPORT void fl_cursor(Fl_Cursor); -FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg, Fl_Color bg=FL_WHITE); -FL_EXPORT const char* fl_expand_text(const char* from, char* buf, int maxbuf, - double maxw, int& n, double &width, - int wrap, int draw_symbols = 0); - -// XIM: -/** \todo provide user documentation for fl_set_status function */ -FL_EXPORT void fl_set_status(int X, int Y, int W, int H); -/** \todo provide user documentation for fl_set_spot function */ -FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0); -/** \todo provide user documentation for fl_reset_spot function*/ -FL_EXPORT void fl_reset_spot(void); - - - -// XForms symbols: -FL_EXPORT int fl_draw_symbol(const char* label,int x,int y,int w,int h, Fl_Color); -FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable); -/** @} */ - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/fl_message.H b/msvc/fltk/include/FL/fl_message.H deleted file mode 100644 index b83f13c6..00000000 --- a/msvc/fltk/include/FL/fl_message.H +++ /dev/null @@ -1,23 +0,0 @@ -// -// "$Id$" -// -// Standard message header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#include "fl_ask.H" - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/fl_show_colormap.H b/msvc/fltk/include/FL/fl_show_colormap.H deleted file mode 100644 index 49dfaf0f..00000000 --- a/msvc/fltk/include/FL/fl_show_colormap.H +++ /dev/null @@ -1,49 +0,0 @@ -// -// "$Id$" -// -// Colormap picker header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file - The fl_show_colormap() function hides the implementation classes used - to provide the popup window and color selection mechanism. -*/ - -#ifndef fl_show_colormap_H -#define fl_show_colormap_H - -/* doxygen comment here to avoid exposing ColorMenu in fl_show_colormap.cxx -*/ - -/** \addtogroup fl_attributes - @{ */ - -/** - \brief Pops up a window to let the user pick a colormap entry. - \image html fl_show_colormap.png - \image latex fl_show_colormap.png "fl_show_colormap" height=10cm - \param[in] oldcol color to be highlighted when grid is shown. - \retval Fl_Color value of the chosen colormap entry. - \see Fl_Color_Chooser -*/ -FL_EXPORT Fl_Color fl_show_colormap(Fl_Color oldcol); - -/** @} */ - -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/fl_show_input.H b/msvc/fltk/include/FL/fl_show_input.H deleted file mode 100644 index 622cb22d..00000000 --- a/msvc/fltk/include/FL/fl_show_input.H +++ /dev/null @@ -1,23 +0,0 @@ -// -// "$Id$" -// -// Standard input dialog header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#include "fl_ask.H" - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/fl_types.h b/msvc/fltk/include/FL/fl_types.h deleted file mode 100644 index 51caf1a0..00000000 --- a/msvc/fltk/include/FL/fl_types.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * "$Id$" - * - * Simple "C"-style types for the Fast Light Tool Kit (FLTK). - * - * Copyright 1998-2015 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: - * - * http://www.fltk.org/COPYING.php - * - * Please report all bugs and problems on the following page: - * - * http://www.fltk.org/str.php - */ - -/** \file - * This file contains simple "C"-style type definitions. - */ - -#ifndef FL_TYPES_H -#define FL_TYPES_H - -/** \name Miscellaneous */ -/*@{*/ /* group: Miscellaneous */ - -/** unsigned char */ -typedef unsigned char uchar; -/** unsigned long */ -typedef unsigned long ulong; - -/** Flexible length UTF-8 Unicode text. - * - * \todo FIXME: temporary (?) typedef to mark UTF-8 and Unicode conversions - */ -typedef char *Fl_String; - -/** Flexible length UTF-8 Unicode read-only string. - * \sa Fl_String - */ -typedef const char *Fl_CString; - -/** 24-bit Unicode character + 8-bit indicator for keyboard flags */ -typedef unsigned int Fl_Shortcut; - -/** 24-bit Unicode character - upper 8 bits are unused */ -typedef unsigned int Fl_Char; - -/*@}*/ /* group: Miscellaneous */ - -#endif - -/* - * End of "$Id$". - */ diff --git a/msvc/fltk/include/FL/fl_utf8.h b/msvc/fltk/include/FL/fl_utf8.h deleted file mode 100644 index 2121198d..00000000 --- a/msvc/fltk/include/FL/fl_utf8.h +++ /dev/null @@ -1,248 +0,0 @@ -/* - * "$Id$" - * - * Author: Jean-Marc Lienher ( http://oksid.ch ) - * Copyright 2000-2010 by O'ksi'D. - * - * 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: - * - * http://www.fltk.org/COPYING.php - * - * Please report all bugs and problems on the following page: - * - * http://www.fltk.org/str.php - */ - -/* Merged in some functionality from the fltk-2 version. IMM. - * The following code is an attempt to merge the functions incorporated in FLTK2 - * with the functions provided in OksiD's fltk-1.1.6-utf8 port - */ - -/** - \file fl_utf8.h - \brief header for Unicode and UTF-8 character handling -*/ - -#ifndef _HAVE_FL_UTF8_HDR_ -#define _HAVE_FL_UTF8_HDR_ - -#include "Fl_Export.H" -#include "fl_types.h" - -#include -#include -#include - -#ifdef WIN32 -# include -# include -# include -# include -# define xchar wchar_t -# if !defined(FL_DLL) && !defined(__CYGWIN__) -# undef strdup -# define strdup _strdup -# undef putenv -# define putenv _putenv -# undef stricmp -# define stricmp _stricmp -# undef strnicmp -# define strnicmp _strnicmp -# undef chdir -# define chdir _chdir -# endif -#elif defined(__APPLE__) -# include -# include -# define xchar wchar_t -#else /* X11 */ -# include -# include -# if defined(FL_LIBRARY) /* don't expose X11 headers in user space */ -# include -# include -# endif /* defined(FL_LIBRARY) -- don't expose X11 headers in user space */ -# include -# define xchar unsigned short -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** \addtogroup fl_unicode - @{ -*/ - -/* F2: comes from FLTK2 */ -/* OD: comes from OksiD */ - -/** - Return the number of bytes needed to encode the given UCS4 character in UTF-8. - \param [in] ucs UCS4 encoded character - \return number of bytes required - */ -FL_EXPORT int fl_utf8bytes(unsigned ucs); - -/* OD: returns the byte length of the first UTF-8 char sequence (returns -1 if not valid) */ -FL_EXPORT int fl_utf8len(char c); - -/* OD: returns the byte length of the first UTF-8 char sequence (returns +1 if not valid) */ -FL_EXPORT int fl_utf8len1(char c); - -/* OD: returns the number of Unicode chars in the UTF-8 string */ -FL_EXPORT int fl_utf_nb_char(const unsigned char *buf, int len); - -/* F2: Convert the next UTF-8 char-sequence into a Unicode value (and say how many bytes were used) */ -FL_EXPORT unsigned fl_utf8decode(const char* p, const char* end, int* len); - -/* F2: Encode a Unicode value into a UTF-8 sequence, return the number of bytes used */ -FL_EXPORT int fl_utf8encode(unsigned ucs, char* buf); - -/* F2: Move forward to the next valid UTF-8 sequence start betwen start and end */ -FL_EXPORT const char* fl_utf8fwd(const char* p, const char* start, const char* end); - -/* F2: Move backward to the previous valid UTF-8 sequence start */ -FL_EXPORT const char* fl_utf8back(const char* p, const char* start, const char* end); - -/* XX: Convert a single 32-bit Unicode value into UTF16 */ -FL_EXPORT unsigned fl_ucs_to_Utf16(const unsigned ucs, unsigned short *dst, const unsigned dstlen); - -/* F2: Convert a UTF-8 string into UTF16 */ -FL_EXPORT unsigned fl_utf8toUtf16(const char* src, unsigned srclen, unsigned short* dst, unsigned dstlen); - -/* F2: Convert a UTF-8 string into a wide character string - makes UTF16 on win32, "UCS4" elsewhere */ -FL_EXPORT unsigned fl_utf8towc(const char *src, unsigned srclen, wchar_t *dst, unsigned dstlen); - -/* F2: Convert a wide character string to UTF-8 - takes in UTF16 on win32, "UCS4" elsewhere */ -FL_EXPORT unsigned fl_utf8fromwc(char *dst, unsigned dstlen, const wchar_t *src, unsigned srclen); - -/* F2: Convert a UTF-8 string into ASCII, eliding untranslatable glyphs */ -FL_EXPORT unsigned fl_utf8toa (const char *src, unsigned srclen, char *dst, unsigned dstlen); - -/* F2: Convert 8859-1 string to UTF-8 */ -FL_EXPORT unsigned fl_utf8froma (char *dst, unsigned dstlen, const char *src, unsigned srclen); - -/* F2: Returns true if the current O/S locale is UTF-8 */ -FL_EXPORT int fl_utf8locale(void); - -/* F2: Examine the first len characters of src, to determine if the input text is UTF-8 or not - * NOTE: The value returned is not simply boolean - it contains information about the probable - * type of the src text. */ -FL_EXPORT int fl_utf8test(const char *src, unsigned len); - -/* XX: return width of "raw" ucs character in columns. - * for internal use only */ -FL_EXPORT int fl_wcwidth_(unsigned int ucs); - -/* XX: return width of utf-8 character string in columns. - * NOTE: this may also do C1 control character (0x80 to 0x9f) to CP1252 mapping, - * depending on original build options */ -FL_EXPORT int fl_wcwidth(const char *src); - -/* OD: Return true if the character is non-spacing */ -FL_EXPORT unsigned int fl_nonspacing(unsigned int ucs); - -/* F2: Convert UTF-8 to a local multi-byte encoding - mainly for win32? */ -FL_EXPORT unsigned fl_utf8to_mb(const char *src, unsigned srclen, char *dst, unsigned dstlen); -/* OD: Convert UTF-8 to a local multi-byte encoding */ -FL_EXPORT char* fl_utf2mbcs(const char *src); - -/* F2: Convert a local multi-byte encoding to UTF-8 - mainly for win32? */ -FL_EXPORT unsigned fl_utf8from_mb(char *dst, unsigned dstlen, const char *src, unsigned srclen); - -/*****************************************************************************/ -#ifdef WIN32 -/* OD: Attempt to convert the UTF-8 string to the current locale */ -FL_EXPORT char *fl_utf8_to_locale(const char *s, int len, unsigned int codepage); - -/* OD: Attempt to convert a string in the current locale to UTF-8 */ -FL_EXPORT char *fl_locale_to_utf8(const char *s, int len, unsigned int codepage); -#endif - -/***************************************************************************** - * The following functions are intended to provide portable, UTF-8 aware - * versions of standard functions - */ - -/* OD: UTF-8 aware strncasecmp - converts to lower case Unicode and tests */ -FL_EXPORT int fl_utf_strncasecmp(const char *s1, const char *s2, int n); - -/* OD: UTF-8 aware strcasecmp - converts to Unicode and tests */ -FL_EXPORT int fl_utf_strcasecmp(const char *s1, const char *s2); - -/* OD: return the Unicode lower case value of ucs */ -FL_EXPORT int fl_tolower(unsigned int ucs); - -/* OD: return the Unicode upper case value of ucs */ -FL_EXPORT int fl_toupper(unsigned int ucs); - -/* OD: converts the UTF-8 string to the lower case equivalent */ -FL_EXPORT int fl_utf_tolower(const unsigned char *str, int len, char *buf); - -/* OD: converts the UTF-8 string to the upper case equivalent */ -FL_EXPORT int fl_utf_toupper(const unsigned char *str, int len, char *buf); - -/* OD: Portable UTF-8 aware chmod wrapper */ -FL_EXPORT int fl_chmod(const char* f, int mode); - -/* OD: Portable UTF-8 aware access wrapper */ -FL_EXPORT int fl_access(const char* f, int mode); - -/* OD: Portable UTF-8 aware stat wrapper */ -FL_EXPORT int fl_stat( const char *path, struct stat *buffer ); - -/* OD: Portable UTF-8 aware getcwd wrapper */ -FL_EXPORT char* fl_getcwd( char *buf, int maxlen); - -/* OD: Portable UTF-8 aware fopen wrapper */ -FL_EXPORT FILE *fl_fopen(const char *f, const char *mode); - -/* OD: Portable UTF-8 aware system wrapper */ -FL_EXPORT int fl_system(const char* f); - -/* OD: Portable UTF-8 aware execvp wrapper */ -FL_EXPORT int fl_execvp(const char *file, char *const *argv); - -/* OD: Portable UTF-8 aware open wrapper */ -FL_EXPORT int fl_open(const char* f, int o, ...); - -/* OD: Portable UTF-8 aware unlink wrapper */ -FL_EXPORT int fl_unlink(const char *f); - -/* OD: Portable UTF-8 aware rmdir wrapper */ -FL_EXPORT int fl_rmdir(const char *f); - -/* OD: Portable UTF-8 aware getenv wrapper */ -FL_EXPORT char* fl_getenv(const char *name); - -/* OD: Portable UTF-8 aware execvp wrapper */ -FL_EXPORT int fl_mkdir(const char* f, int mode); - -/* OD: Portable UTF-8 aware rename wrapper */ -FL_EXPORT int fl_rename(const char* f, const char *t); - - -/* OD: Given a full pathname, this will create the directory path needed to hold the file named */ -FL_EXPORT void fl_make_path_for_file( const char *path ); - -/* OD: recursively create a path in the file system */ -FL_EXPORT char fl_make_path( const char *path ); - - -/** @} */ - -/*****************************************************************************/ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* _HAVE_FL_UTF8_HDR_ */ - -/* - * End of "$Id$". - */ diff --git a/msvc/fltk/include/FL/forms.H b/msvc/fltk/include/FL/forms.H deleted file mode 100644 index f14be6ab..00000000 --- a/msvc/fltk/include/FL/forms.H +++ /dev/null @@ -1,836 +0,0 @@ -// -// "$Id$" -// -// Forms emulation header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef __FORMS_H__ -#define __FORMS_H__ - -#include "Fl.H" -#include "Fl_Group.H" -#include "Fl_Window.H" -#include "fl_draw.H" - -typedef Fl_Widget FL_OBJECT; -typedef Fl_Window FL_FORM; - -//////////////////////////////////////////////////////////////// -// Random constants & symbols defined by forms.h file: - -#ifndef NULL -#define NULL 0 -#endif -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#define FL_ON 1 -#define FL_OK 1 -#define FL_VALID 1 -#define FL_PREEMPT 1 -#define FL_AUTO 2 -#define FL_WHEN_NEEDED FL_AUTO -#define FL_OFF 0 -#define FL_NONE 0 -#define FL_CANCEL 0 -#define FL_INVALID 0 -#define FL_IGNORE -1 -//#define FL_CLOSE -2 // this variable is never used in FLTK Forms. It is removed becaus it conflicts with the window FL_CLOSE event - -#define FL_LCOL FL_BLACK -#define FL_COL1 FL_GRAY -#define FL_MCOL FL_LIGHT1 -#define FL_LEFT_BCOL FL_LIGHT3 // 53 is better match -#define FL_TOP_BCOL FL_LIGHT2 // 51 -#define FL_BOTTOM_BCOL FL_DARK2 // 40 -#define FL_RIGHT_BCOL FL_DARK3 // 36 -#define FL_INACTIVE FL_INACTIVE_COLOR -#define FL_INACTIVE_COL FL_INACTIVE_COLOR -#define FL_FREE_COL1 FL_FREE_COLOR -#define FL_FREE_COL2 ((Fl_Color)(FL_FREE_COLOR+1)) -#define FL_FREE_COL3 ((Fl_Color)(FL_FREE_COLOR+2)) -#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3)) -#define FL_FREE_COL5 ((Fl_Color)(FL_FREE_COLOR+4)) -#define FL_FREE_COL6 ((Fl_Color)(FL_FREE_COLOR+5)) -#define FL_FREE_COL7 ((Fl_Color)(FL_FREE_COLOR+6)) -#define FL_FREE_COL8 ((Fl_Color)(FL_FREE_COLOR+7)) -#define FL_FREE_COL9 ((Fl_Color)(FL_FREE_COLOR+8)) -#define FL_FREE_COL10 ((Fl_Color)(FL_FREE_COLOR+9)) -#define FL_FREE_COL11 ((Fl_Color)(FL_FREE_COLOR+10)) -#define FL_FREE_COL12 ((Fl_Color)(FL_FREE_COLOR+11)) -#define FL_FREE_COL13 ((Fl_Color)(FL_FREE_COLOR+12)) -#define FL_FREE_COL14 ((Fl_Color)(FL_FREE_COLOR+13)) -#define FL_FREE_COL15 ((Fl_Color)(FL_FREE_COLOR+14)) -#define FL_FREE_COL16 ((Fl_Color)(FL_FREE_COLOR+15)) -#define FL_TOMATO ((Fl_Color)(131)) -#define FL_INDIANRED ((Fl_Color)(164)) -#define FL_SLATEBLUE ((Fl_Color)(195)) -#define FL_DARKGOLD ((Fl_Color)(84)) -#define FL_PALEGREEN ((Fl_Color)(157)) -#define FL_ORCHID ((Fl_Color)(203)) -#define FL_DARKCYAN ((Fl_Color)(189)) -#define FL_DARKTOMATO ((Fl_Color)(113)) -#define FL_WHEAT ((Fl_Color)(174)) - -#define FL_ALIGN_BESIDE FL_ALIGN_INSIDE - -#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE -#define FL_PUP_INACTIVE 1 // FL_MENU_INACTIVE -#define FL_NO_FRAME FL_NO_BOX -#define FL_ROUNDED3D_UPBOX FL_ROUND_UP_BOX -#define FL_ROUNDED3D_DOWNBOX FL_ROUND_DOWN_BOX -#define FL_OVAL3D_UPBOX FL_ROUND_UP_BOX -#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX - -#define FL_MBUTTON1 1 -#define FL_LEFTMOUSE 1 -#define FL_MBUTTON2 2 -#define FL_MIDDLEMOUSE 2 -#define FL_MBUTTON3 3 -#define FL_RIGHTMOUSE 3 -#define FL_MBUTTON4 4 -#define FL_MBUTTON5 5 - -#define FL_INVALID_STYLE 255 -#define FL_NORMAL_STYLE FL_HELVETICA -#define FL_BOLD_STYLE FL_HELVETICA_BOLD -#define FL_ITALIC_STYLE FL_HELVETICA_ITALIC -#define FL_BOLDITALIC_STYLE FL_HELVETICA_BOLD_ITALIC -#define FL_FIXED_STYLE FL_COURIER -#define FL_FIXEDBOLD_STYLE FL_COURIER_BOLD -#define FL_FIXEDITALIC_STYLE FL_COURIER_ITALIC -#define FL_FIXEDBOLDITALIC_STYLE FL_COURIER_BOLD_ITALIC -#define FL_TIMES_STYLE FL_TIMES -#define FL_TIMESBOLD_STYLE FL_TIMES_BOLD -#define FL_TIMESITALIC_STYLE FL_TIMES_ITALIC -#define FL_TIMESBOLDITALIC_STYLE FL_TIMES_BOLD_ITALIC - -// hacks to change the labeltype() when passed to fl_set_object_lstyle(): -#define FL_SHADOW_STYLE (FL_SHADOW_LABEL<<8) -#define FL_ENGRAVED_STYLE (FL_ENGRAVED_LABEL<<8) -#define FL_EMBOSSED_STYLE (FL_EMBOSSED_LABEL<<0) - -// size values are different from XForms, match older Forms: -#define FL_TINY_SIZE 8 -#define FL_SMALL_SIZE 11 // 10 -//#define FL_NORMAL_SIZE 14 // 12 -#define FL_MEDIUM_SIZE 18 // 14 -#define FL_LARGE_SIZE 24 // 18 -#define FL_HUGE_SIZE 32 // 24 -#define FL_DEFAULT_SIZE FL_SMALL_SIZE -#define FL_TINY_FONT FL_TINY_SIZE -#define FL_SMALL_FONT FL_SMALL_SIZE -#define FL_NORMAL_FONT FL_NORMAL_SIZE -#define FL_MEDIUM_FONT FL_MEDIUM_SIZE -#define FL_LARGE_FONT FL_LARGE_SIZE -#define FL_HUGE_FONT FL_HUGE_SIZE -#define FL_NORMAL_FONT1 FL_SMALL_FONT -#define FL_NORMAL_FONT2 FL_NORMAL_FONT -#define FL_DEFAULT_FONT FL_SMALL_FONT - -#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE -#define FL_RETURN_CHANGED FL_WHEN_CHANGED -#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS -#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED) - -#define FL_BOUND_WIDTH 3 - -typedef int FL_Coord; -typedef int FL_COLOR; - -//////////////////////////////////////////////////////////////// -// fltk interaction: - -#define FL_CMD_OPT void -extern FL_EXPORT void fl_initialize(int*, char*[], const char*, FL_CMD_OPT*, int); -inline void fl_finish() {} - -typedef void (*FL_IO_CALLBACK) (FL_SOCKET, void*); -inline void fl_add_io_callback(int fd, short w, FL_IO_CALLBACK cb, void* v) { - Fl::add_fd(fd, w, cb, v);} -inline void fl_remove_io_callback(int fd, short, FL_IO_CALLBACK) { - Fl::remove_fd(fd);} // removes all the callbacks! - -// type of callback is different and no "id" number is returned: -inline void fl_add_timeout(long msec, void (*cb)(void*), void* v) { - Fl::add_timeout(msec*.001, cb, v);} -inline void fl_remove_timeout(int) {} - -// type of callback is different! -inline void fl_set_idle_callback(void (*cb)()) {Fl::set_idle(cb);} - -FL_EXPORT Fl_Widget* fl_do_forms(void); -FL_EXPORT Fl_Widget* fl_check_forms(); -inline Fl_Widget* fl_do_only_forms(void) {return fl_do_forms();} -inline Fl_Widget* fl_check_only_forms(void) {return fl_check_forms();} - -// because of new redraw behavior, these are no-ops: -inline void fl_freeze_object(Fl_Widget*) {} -inline void fl_unfreeze_object(Fl_Widget*) {} -inline void fl_freeze_form(Fl_Window*) {} -inline void fl_unfreeze_form(Fl_Window*) {} -inline void fl_freeze_all_forms() {} -inline void fl_unfreeze_all_forms() {} - -inline void fl_set_focus_object(Fl_Window*, Fl_Widget* o) {Fl::focus(o);} -inline void fl_reset_focus_object(Fl_Widget* o) {Fl::focus(o);} -#define fl_set_object_focus fl_set_focus_object - -// void fl_set_form_atclose(Fl_Window*w,int (*cb)(Fl_Window*,void*),void* v) -// void fl_set_atclose(int (*cb)(Fl_Window*,void*),void*) -// fl_set_form_atactivate/atdeactivate not implemented! - -//////////////////////////////////////////////////////////////// -// Fl_Widget: - -inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);} -inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->labelsize(s);} - -/* forms lib font indexes must be byte sized - extract correct byte from style word */ -inline void fl_set_object_lstyle(Fl_Widget* o,int a) { - o->labelfont((Fl_Font)(a&0xff)); o->labeltype((Fl_Labeltype)(a>>8));} -inline void fl_set_object_lcol(Fl_Widget* o, Fl_Color a) {o->labelcolor(a);} -#define fl_set_object_lcolor fl_set_object_lcol -inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) {o->align(a);} -#define fl_set_object_align fl_set_object_lalign -inline void fl_set_object_color(Fl_Widget* o,Fl_Color a,Fl_Color b) {o->color(a,b);} -inline void fl_set_object_label(Fl_Widget* o, const char* a) {o->label(a); o->redraw();} -inline void fl_set_object_position(Fl_Widget*o,int x,int y) {o->position(x,y);} -inline void fl_set_object_size(Fl_Widget* o, int w, int h) {o->size(w,h);} -inline void fl_set_object_geometry(Fl_Widget* o,int x,int y,int w,int h) {o->resize(x,y,w,h);} - -inline void fl_get_object_geometry(Fl_Widget* o,int*x,int*y,int*w,int*h) { - *x = o->x(); *y = o->y(); *w = o->w(); *h = o->h();} -inline void fl_get_object_position(Fl_Widget* o,int*x,int*y) { - *x = o->x(); *y = o->y();} - -typedef void (*Forms_CB)(Fl_Widget*, long); -inline void fl_set_object_callback(Fl_Widget*o,Forms_CB c,long a) {o->callback(c,a);} -#define fl_set_call_back fl_set_object_callback -inline void fl_call_object_callback(Fl_Widget* o) {o->do_callback();} -inline void fl_trigger_object(Fl_Widget* o) {o->do_callback();} -inline void fl_set_object_return(Fl_Widget* o, int v) { - o->when((Fl_When)(v|FL_WHEN_RELEASE));} - -inline void fl_redraw_object(Fl_Widget* o) {o->redraw();} -inline void fl_show_object(Fl_Widget* o) {o->show();} -inline void fl_hide_object(Fl_Widget* o) {o->hide();} -inline void fl_free_object(Fl_Widget* x) {delete x;} -inline void fl_delete_object(Fl_Widget* o) {o->parent()->remove(*o);} -inline void fl_activate_object(Fl_Widget* o) {o->activate();} -inline void fl_deactivate_object(Fl_Widget* o) {o->deactivate();} - -inline void fl_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);} -inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) {b->parent()->insert(*o,b);} - -inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();} - -//////////////////////////////////////////////////////////////// -// things that appered in the demos a lot that I don't emulate, but -// I did not want to edit out of all the demos... - -inline int fl_get_border_width() {return 3;} -inline void fl_set_border_width(int) {} -inline void fl_set_object_dblbuffer(Fl_Widget*, int) {} -inline void fl_set_form_dblbuffer(Fl_Window*, int) {} - -//////////////////////////////////////////////////////////////// -// Fl_Window: - -inline void fl_free_form(Fl_Window* x) {delete x;} -inline void fl_redraw_form(Fl_Window* f) {f->redraw();} - -inline Fl_Window* fl_bgn_form(Fl_Boxtype b,int w,int h) { - Fl_Window* g = new Fl_Window(w,h,0); - g->box(b); - return g; -} -FL_EXPORT void fl_end_form(); -inline void fl_addto_form(Fl_Window* f) {f->begin();} -inline Fl_Group* fl_bgn_group() {return new Fl_Group(0,0,0,0,0);} -inline void fl_end_group() {Fl_Group::current()->forms_end();} -inline void fl_addto_group(Fl_Widget* o) {((Fl_Group* )o)->begin();} -#define resizebox _ddfdesign_kludge() - -inline void fl_scale_form(Fl_Window* f, double x, double y) { - f->resizable(f); f->size(int(f->w()*x),int(f->h()*y));} -inline void fl_set_form_position(Fl_Window* f,int x,int y) {f->position(x,y);} -inline void fl_set_form_size(Fl_Window* f, int w, int h) {f->size(w,h);} -inline void fl_set_form_geometry(Fl_Window* f,int x,int y,int w,int h) { - f->resize(x,y,w,h);} -#define fl_set_initial_placement fl_set_form_geometry -inline void fl_adjust_form_size(Fl_Window*) {} - -FL_EXPORT void fl_show_form(Fl_Window* f,int p,int b,const char* n); -enum { // "p" argument values: - FL_PLACE_FREE = 0, // make resizable - FL_PLACE_MOUSE = 1, // mouse centered on form - FL_PLACE_CENTER = 2, // center of the screen - FL_PLACE_POSITION = 4,// fixed position, resizable - FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior - FL_PLACE_GEOMETRY =16,// fixed size and position - FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored) - FL_PLACE_FULLSCREEN=64,// fill screen - FL_PLACE_HOTSPOT = 128,// enables hotspot - FL_PLACE_ICONIC = 256,// iconic (ignored) - FL_FREE_SIZE=(1<<14), // force resizable - FL_FIX_SIZE =(1<<15) // force off resizable -}; -#define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE) -#define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE) -enum { // "b" arguement values: - FL_NOBORDER = 0, - FL_FULLBORDER, - FL_TRANSIENT -//FL_MODAL = (1<<8) // not implemented yet in Forms -}; -inline void fl_set_form_hotspot(Fl_Window* w,int x,int y) {w->hotspot(x,y);} -inline void fl_set_form_hotobject(Fl_Window* w, Fl_Widget* o) {w->hotspot(o);} -extern FL_EXPORT char fl_flip; // in forms.C -inline void fl_flip_yorigin() {fl_flip = 1;} - -#define fl_prepare_form_window fl_show_form -inline void fl_show_form_window(Fl_Window*) {} - -inline void fl_raise_form(Fl_Window* f) {f->show();} - -inline void fl_hide_form(Fl_Window* f) {f->hide();} -inline void fl_pop_form(Fl_Window* f) {f->show();} - -extern FL_EXPORT char fl_modal_next; // in forms.C -inline void fl_activate_all_forms() {} -inline void fl_deactivate_all_forms() {fl_modal_next = 1;} -inline void fl_deactivate_form(Fl_Window*w) {w->deactivate();} -inline void fl_activate_form(Fl_Window*w) {w->activate();} - -inline void fl_set_form_title(Fl_Window* f, const char* s) {f->label(s);} -inline void fl_title_form(Fl_Window* f, const char* s) {f->label(s);} - -typedef void (*Forms_FormCB)(Fl_Widget*); -inline void fl_set_form_callback(Fl_Window* f,Forms_FormCB c) {f->callback(c);} -#define fl_set_form_call_back fl_set_form_callback - -inline void fl_init() {} -FL_EXPORT void fl_set_graphics_mode(int,int); - -inline int fl_form_is_visible(Fl_Window* f) {return f->visible();} - -inline int fl_mouse_button() {return Fl::event_button();} -#define fl_mousebutton fl_mouse_button - -#define fl_free free -#define fl_malloc malloc -#define fl_calloc calloc -#define fl_realloc realloc - -//////////////////////////////////////////////////////////////// -// Drawing functions. Only usable inside an Fl_Free object? - -inline void fl_drw_box(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { - fl_draw_box(b,x,y,w,h,bgc);} -inline void fl_drw_frame(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { - fl_draw_box(b,x,y,w,h,bgc);} - -inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { - fl_font(style,size); - fl_color(fgcolor); - fl_draw(s,x,y,w,h,align); -} - -// this does not work except for CENTER... -inline void fl_drw_text_beside(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { - fl_font(style,size); - fl_color(fgcolor); - fl_draw(s,x,y,w,h,align); -} - -inline void fl_set_font_name(Fl_Font n,const char* s) {Fl::set_font(n,s);} - -inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);} - -#define fl_set_clipping(x,y,w,h) fl_push_clip(x,y,w,h) -#define fl_unset_clipping() fl_pop_clip() - -//////////////////////////////////////////////////////////////// -// Forms classes: - -inline Fl_Widget* fl_add_new(Fl_Widget* p) {return p;} -inline Fl_Widget* fl_add_new(uchar t,Fl_Widget* p) {p->type(t); return p;} - -#define forms_constructor(type,name) \ -inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(t, new type(x,y,w,h,l)));} -#define forms_constructort(type,name) \ -inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} -#define forms_constructorb(type,name) \ -inline type* name(Fl_Boxtype t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} - -#include "Fl_FormsBitmap.H" -#define FL_NORMAL_BITMAP FL_NO_BOX -forms_constructorb(Fl_FormsBitmap, fl_add_bitmap) -inline void fl_set_bitmap_data(Fl_Widget* o, int w, int h, const uchar* b) { - ((Fl_FormsBitmap*)o)->set(w,h,b); -} - -#include "Fl_FormsPixmap.H" -#define FL_NORMAL_PIXMAP FL_NO_BOX -forms_constructorb(Fl_FormsPixmap, fl_add_pixmap) -inline void fl_set_pixmap_data(Fl_Widget* o, char*const* b) { - ((Fl_FormsPixmap*)o)->set(b); -} -//inline void fl_set_pixmap_file(Fl_Widget*, const char*); -inline void fl_set_pixmap_align(Fl_Widget* o,Fl_Align a,int,int) {o->align(a);} -//inline void fl_set_pixmap_colorcloseness(int, int, int); - -#include "Fl_Box.H" -forms_constructorb(Fl_Box, fl_add_box) - -#include "Fl_Browser.H" -forms_constructor(Fl_Browser, fl_add_browser) - -inline void fl_clear_browser(Fl_Widget* o) { - ((Fl_Browser*)o)->clear();} -inline void fl_add_browser_line(Fl_Widget* o, const char* s) { - ((Fl_Browser*)o)->add(s);} -inline void fl_addto_browser(Fl_Widget* o, const char* s) { - ((Fl_Browser*)o)->add(s);} /* should also scroll to bottom */ -//inline void fl_addto_browser_chars(Fl_Widget*, const char*) -//#define fl_append_browser fl_addto_browser_chars -inline void fl_insert_browser_line(Fl_Widget* o, int n, const char* s) { - ((Fl_Browser*)o)->insert(n,s);} -inline void fl_delete_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->remove(n);} -inline void fl_replace_browser_line(Fl_Widget* o, int n, const char* s) { - ((Fl_Browser*)o)->replace(n,s);} -inline char* fl_get_browser_line(Fl_Widget* o, int n) { - return (char*)(((Fl_Browser*)o)->text(n));} -inline int fl_load_browser(Fl_Widget* o, const char* f) { - return ((Fl_Browser*)o)->load(f);} -inline void fl_select_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->select(n,1);} -inline void fl_deselect_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->select(n,0);} -inline void fl_deselect_browser(Fl_Widget* o) { - ((Fl_Browser*)o)->deselect();} -inline int fl_isselected_browser_line(Fl_Widget* o, int n) { - return ((Fl_Browser*)o)->selected(n);} -inline int fl_get_browser_topline(Fl_Widget* o) { - return ((Fl_Browser*)o)->topline();} -inline int fl_get_browser(Fl_Widget* o) { - return ((Fl_Browser*)o)->value();} -inline int fl_get_browser_maxline(Fl_Widget* o) { - return ((Fl_Browser*)o)->size();} -//linline int fl_get_browser_screenlines(Fl_Widget*); -inline void fl_set_browser_topline(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->topline(n);} -inline void fl_set_browser_fontsize(Fl_Widget* o, int s) { - ((Fl_Browser*)o)->textsize(s);} -inline void fl_set_browser_fontstyle(Fl_Widget* o, Fl_Font s) { - ((Fl_Browser*)o)->textfont(s);} -inline void fl_set_browser_specialkey(Fl_Widget* o, char c) { - ((Fl_Browser*)o)->format_char(c);} -//inline void fl_set_browser_vscrollbar(Fl_Widget*, int); -//inline void fl_set_browser_hscrollbar(Fl_Widget*, int); -//inline void fl_set_browser_leftslider(Fl_Widget*, int); -//#define fl_set_browser_leftscrollbar fl_set_browser_leftslider -//inline void fl_set_browser_line_selectable(Fl_Widget*, int, int); -//inline void fl_get_browser_dimension(Fl_Widget*,int*,int*,int*,int*); -//inline void fl_set_browser_dblclick_callback(Fl_Widget*,FL_CALLBACKPTR,long); -//inline void fl_set_browser_xoffset(Fl_Widget*, FL_Coord); -//inline void fl_set_browser_scrollbarsize(Fl_Widget*, int, int); -inline void fl_setdisplayed_browser_line(Fl_Widget* o, int n, int i) { - ((Fl_Browser*)o)->display(n,i);} -inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) { - return ((Fl_Browser*)o)->displayed(n);} - -#include "Fl_Button.H" - -#define FL_NORMAL_BUTTON 0 -#define FL_TOUCH_BUTTON 4 -#define FL_INOUT_BUTTON 5 -#define FL_RETURN_BUTTON 6 -#define FL_HIDDEN_RET_BUTTON 7 -#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON -#define FL_MENU_BUTTON 9 - -FL_EXPORT Fl_Button* fl_add_button(uchar t,int x,int y,int w,int h,const char* l); -inline int fl_get_button(Fl_Widget* b) {return ((Fl_Button*)b)->value();} -inline void fl_set_button(Fl_Widget* b, int v) {((Fl_Button*)b)->value(v);} -inline int fl_get_button_numb(Fl_Widget*) {return Fl::event_button();} -inline void fl_set_button_shortcut(Fl_Widget* b, const char* s,int=0) { - ((Fl_Button*)b)->shortcut(s);} -//#define fl_set_object_shortcut(b,s) fl_set_button_shortcut(b,s) - -#include "Fl_Light_Button.H" -forms_constructor(Fl_Light_Button, fl_add_lightbutton) - -#include "Fl_Round_Button.H" -forms_constructor(Fl_Round_Button, fl_add_roundbutton) -forms_constructor(Fl_Round_Button, fl_add_round3dbutton) - -#include "Fl_Check_Button.H" -forms_constructor(Fl_Check_Button, fl_add_checkbutton) - -inline Fl_Widget* fl_add_bitmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;} -inline void fl_set_bitmapbutton_data(Fl_Widget* o,int a,int b,uchar* c) { - (new Fl_Bitmap(c,a,b))->label(o);} // does not delete old Fl_Bitmap! - -inline Fl_Widget* fl_add_pixmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;} -inline void fl_set_pixmapbutton_data(Fl_Widget* o, const char*const* c) { - (new Fl_Pixmap(c))->label(o);} // does not delete old Fl_Pixmap! - -// Fl_Canvas object not yet implemented! - -#include "Fl_Chart.H" - -forms_constructor(Fl_Chart, fl_add_chart) -inline void fl_clear_chart(Fl_Widget* o) { - ((Fl_Chart*)o)->clear();} -inline void fl_add_chart_value(Fl_Widget* o,double v,const char* s,uchar c){ - ((Fl_Chart*)o)->add(v,s,c);} -inline void fl_insert_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) { - ((Fl_Chart*)o)->insert(i,v,s,c);} -inline void fl_replace_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) { - ((Fl_Chart*)o)->replace(i,v,s,c);} -inline void fl_set_chart_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Chart*)o)->bounds(a,b);} -inline void fl_set_chart_maxnumb(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->maxsize(v);} -inline void fl_set_chart_autosize(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->autosize(v);} -inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) { - ((Fl_Chart*)o)->textfont(v);} -inline void fl_set_chart_lsize(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->textsize(v);} -inline void fl_set_chart_lcolor(Fl_Widget* o, Fl_Color v) { - ((Fl_Chart*)o)->textcolor(v);} -#define fl_set_chart_lcol fl_set_chart_lcolor - -#include "Fl_Choice.H" - -#define FL_NORMAL_CHOICE 0 -#define FL_NORMAL_CHOICE2 0 -#define FL_DROPLIST_CHOICE 0 - -forms_constructor(Fl_Choice, fl_add_choice) -inline void fl_clear_choice(Fl_Widget* o) { - ((Fl_Choice*)o)->clear();} -inline void fl_addto_choice(Fl_Widget* o, const char* s) { - ((Fl_Choice*)o)->add(s);} -inline void fl_replace_choice(Fl_Widget* o, int i, const char* s) { - ((Fl_Choice*)o)->replace(i-1,s);} -inline void fl_delete_choice(Fl_Widget* o, int i) { - ((Fl_Choice*)o)->remove(i-1);} -inline void fl_set_choice(Fl_Widget* o, int i) { - ((Fl_Choice*)o)->value(i-1);} -// inline void fl_set_choice_text(Fl_Widget*, const char*); -inline int fl_get_choice(Fl_Widget* o) { - return ((Fl_Choice*)o)->value()+1;} -// inline const char* fl_get_choice_item_text(Fl_Widget*, int); -// inline int fl_get_choice_maxitems(Fl_Widget*); -inline const char* fl_get_choice_text(Fl_Widget* o) { - return ((Fl_Choice*)o)->text();} -inline void fl_set_choice_fontsize(Fl_Widget* o, int x) { - ((Fl_Choice*)o)->textsize(x);} -inline void fl_set_choice_fontstyle(Fl_Widget* o, Fl_Font x) { - ((Fl_Choice*)o)->textfont(x);} -// inline void fl_set_choice_item_mode(Fl_Widget*, int, unsigned); -// inline void fl_set_choice_item_shortcut(Fl_Widget*, int, const char*); - -#include "Fl_Clock.H" -forms_constructort(Fl_Clock, fl_add_clock) -inline void fl_get_clock(Fl_Widget* o, int* h, int* m, int* s) { - *h = ((Fl_Clock*)o)->hour(); - *m = ((Fl_Clock*)o)->minute(); - *s = ((Fl_Clock*)o)->second(); -} - -#include "Fl_Counter.H" -forms_constructor(Fl_Counter, fl_add_counter) -inline void fl_set_counter_value(Fl_Widget* o, double v) { - ((Fl_Counter*)o)->value(v);} -inline void fl_set_counter_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Counter*)o)->bounds(a,b);} -inline void fl_set_counter_step(Fl_Widget* o, double a, double b) { - ((Fl_Counter*)o)->step(a,b);} -inline void fl_set_counter_precision(Fl_Widget* o, int v) { - ((Fl_Counter*)o)->precision(v);} -inline void fl_set_counter_return(Fl_Widget* o, int v) { - ((Fl_Counter*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));} -inline double fl_get_counter_value(Fl_Widget* o) { - return ((Fl_Counter*)o)->value();} -inline void fl_get_counter_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Counter*)o)->minimum()); - *b = float(((Fl_Counter*)o)->maximum()); -} -//inline void fl_set_counter_filter(Fl_Widget*,const char* (*)(Fl_Widget*,double,int)); - -// Cursor stuff cannot be emulated because it uses X stuff -inline void fl_set_cursor(Fl_Window* w, Fl_Cursor c) {w->cursor(c);} -#define FL_INVISIBLE_CURSOR FL_CURSOR_NONE -#define FL_DEFAULT_CURSOR FL_CURSOR_DEFAULT - -#include "Fl_Dial.H" - -#define FL_DIAL_COL1 FL_GRAY -#define FL_DIAL_COL2 37 - -forms_constructor(Fl_Dial, fl_add_dial) -inline void fl_set_dial_value(Fl_Widget* o, double v) { - ((Fl_Dial*)o)->value(v);} -inline double fl_get_dial_value(Fl_Widget* o) { - return ((Fl_Dial*)o)->value();} -inline void fl_set_dial_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Dial*)o)->bounds(a, b);} -inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Dial*)o)->minimum()); - *b = float(((Fl_Dial*)o)->maximum()); -} -inline void fl_set_dial_return(Fl_Widget* o, int i) { - ((Fl_Dial*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));} -inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) { - ((Fl_Dial*)o)->angles((short)a, (short)b);} -//inline void fl_set_dial_cross(Fl_Widget* o, int); -// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) { -// ((Fl_Dial*)o)->direction(d);} -inline void fl_set_dial_step(Fl_Widget* o, double v) { - ((Fl_Dial*)o)->step(v);} - -// Frames: - -inline Fl_Widget* fl_add_frame(Fl_Boxtype i,int x,int y,int w,int h,const char* l) { - return fl_add_box(i,x-3,y-3,w+6,h+6,l);} - -// labelframe nyi -inline Fl_Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const char* l) { - Fl_Widget* o = fl_add_box(i,x-3,y-3,w+6,h+6,l); - o->align(FL_ALIGN_TOP_LEFT); - return o; -} - -#include "Fl_Free.H" -inline Fl_Free* -fl_add_free(int t,double x,double y,double w,double h,const char* l, - FL_HANDLEPTR hdl) { - return (Fl_Free*)(fl_add_new( - new Fl_Free(t,int(x),int(y),int(w),int(h),l,hdl))); -} - -#include "fl_ask.H" -#include "fl_show_colormap.H" - -inline int fl_show_question(const char* c, int = 0) {return fl_choice("%s",fl_no,fl_yes,0L,c);} -FL_EXPORT void fl_show_message(const char *,const char *,const char *); -FL_EXPORT void fl_show_alert(const char *,const char *,const char *,int=0); -FL_EXPORT int fl_show_question(const char *,const char *,const char *); -inline const char *fl_show_input(const char *l,const char*d=0) {return fl_input("%s",d,l);} -FL_EXPORT /*const*/ char *fl_show_simple_input(const char *label, const char *deflt = 0); -FL_EXPORT int fl_show_choice( - const char *m1, - const char *m2, - const char *m3, - int numb, - const char *b0, - const char *b1, - const char *b2); - -inline void fl_set_goodies_font(Fl_Font a, Fl_Fontsize b) {fl_message_font(a,b);} -#define fl_show_messages fl_message -inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, - const char* b3, int) { - return fl_show_choice(0,c,0,n,b1,b2,b3); -} - -#include "filename.H" -#include "Fl_File_Chooser.H" -inline int do_matching(char* a, const char* b) {return fl_filename_match(a,b);} - -// Forms-compatible file chooser (implementation in fselect.C): -FL_EXPORT char* fl_show_file_selector(const char* message,const char* dir, - const char* pat,const char* fname); -FL_EXPORT char* fl_get_directory(); -FL_EXPORT char* fl_get_pattern(); -FL_EXPORT char* fl_get_filename(); - -#include "Fl_Input.H" -forms_constructor(Fl_Input, fl_add_input) -inline void fl_set_input(Fl_Widget* o, const char* v) { - ((Fl_Input*)o)->value(v);} -inline void fl_set_input_return(Fl_Widget* o, int x) { - ((Fl_Input*)o)->when((Fl_When)(x | FL_WHEN_RELEASE));} -inline void fl_set_input_color(Fl_Widget* o, Fl_Color a, Fl_Color b) { - ((Fl_Input*)o)->textcolor(a); - ((Fl_Input*)o)->cursor_color(b); -} -// inline void fl_set_input_scroll(Fl_Widget*, int); -inline void fl_set_input_cursorpos(Fl_Widget* o, int x, int /*y*/) { - ((Fl_Input*)o)->position(x);} -// inline void fl_set_input_selected(Fl_Widget*, int); -// inline void fl_set_input_selected_range(Fl_Widget*, int, int); -// inline void fl_set_input_maxchars(Fl_Widget*, int); -// inline void fl_set_input_format(Fl_Widget*, int, int); -// inline void fl_set_input_hscrollbar(Fl_Widget*, int); -// inline void fl_set_input_vscrollbar(Fl_Widget*, int); -// inline void fl_set_input_xoffset(Fl_Widget*, int); -// inline void fl_set_input_topline(Fl_Widget*, int); -// inline void fl_set_input_scrollbarsize(Fl_Widget*, int, int); -// inline int fl_get_input_topline(Fl_Widget*); -// inline int fl_get_input_screenlines(Fl_Widget*); -inline int fl_get_input_cursorpos(Fl_Widget* o, int*x, int*y) { - *x = ((Fl_Input*)o)->position(); *y = 0; return *x;} -// inline int fl_get_input_numberoflines(Fl_Widget*); -// inline void fl_get_input_format(Fl_Widget*, int*, int*); -inline const char* fl_get_input(Fl_Widget* o) {return ((Fl_Input*)o)->value();} - -#include "Fl_Menu_Button.H" - -// types are not implemented, they all act like FL_PUSH_MENU: -#define FL_TOUCH_MENU 0 -#define FL_PUSH_MENU 1 -#define FL_PULLDOWN_MENU 2 -forms_constructor(Fl_Menu_Button, fl_add_menu) - -inline void fl_clear_menu(Fl_Widget* o) { - ((Fl_Menu_Button*)o)->clear();} -inline void fl_set_menu(Fl_Widget* o, const char* s) { - ((Fl_Menu_Button*)o)->clear(); ((Fl_Menu_Button*)o)->add(s);} -inline void fl_addto_menu(Fl_Widget* o, const char* s) { - ((Fl_Menu_Button*)o)->add(s);} -inline void fl_replace_menu_item(Fl_Widget* o, int i, const char* s) { - ((Fl_Menu_Button*)o)->replace(i-1,s);} -inline void fl_delete_menu_item(Fl_Widget* o, int i) { - ((Fl_Menu_Button*)o)->remove(i-1);} -inline void fl_set_menu_item_shortcut(Fl_Widget* o, int i, const char* s) { - ((Fl_Menu_Button*)o)->shortcut(i-1,fl_old_shortcut(s));} -inline void fl_set_menu_item_mode(Fl_Widget* o, int i, long x) { - ((Fl_Menu_Button*)o)->mode(i-1,x);} -inline void fl_show_menu_symbol(Fl_Widget*, int ) { -/* ((Fl_Menu_Button*)o)->show_menu_symbol(i); */} -// inline void fl_set_menu_popup(Fl_Widget*, int); -inline int fl_get_menu(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->value()+1;} -inline const char* fl_get_menu_item_text(Fl_Widget* o, int i) { - return ((Fl_Menu_Button*)o)->text(i);} -inline int fl_get_menu_maxitems(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->size();} -inline int fl_get_menu_item_mode(Fl_Widget* o, int i) { - return ((Fl_Menu_Button*)o)->mode(i);} -inline const char* fl_get_menu_text(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->text();} - -#include "Fl_Positioner.H" -#define FL_NORMAL_POSITIONER 0 -forms_constructor(Fl_Positioner, fl_add_positioner) -inline void fl_set_positioner_xvalue(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->xvalue(v);} -inline double fl_get_positioner_xvalue(Fl_Widget* o) { - return ((Fl_Positioner*)o)->xvalue();} -inline void fl_set_positioner_xbounds(Fl_Widget* o, double a, double b) { - ((Fl_Positioner*)o)->xbounds(a,b);} -inline void fl_get_positioner_xbounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Positioner*)o)->xminimum()); - *b = float(((Fl_Positioner*)o)->xmaximum()); -} -inline void fl_set_positioner_yvalue(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->yvalue(v);} -inline double fl_get_positioner_yvalue(Fl_Widget* o) { - return ((Fl_Positioner*)o)->yvalue();} -inline void fl_set_positioner_ybounds(Fl_Widget* o, double a, double b) { - ((Fl_Positioner*)o)->ybounds(a,b);} -inline void fl_get_positioner_ybounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Positioner*)o)->yminimum()); - *b = float(((Fl_Positioner*)o)->ymaximum()); -} -inline void fl_set_positioner_xstep(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->xstep(v);} -inline void fl_set_positioner_ystep(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->ystep(v);} -inline void fl_set_positioner_return(Fl_Widget* o, int v) { - ((Fl_Positioner*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));} - -#include "Fl_Slider.H" - -#define FL_HOR_BROWSER_SLIDER FL_HOR_SLIDER -#define FL_VERT_BROWSER_SLIDER FL_VERT_SLIDER - -forms_constructort(Fl_Slider, fl_add_slider) -#define FL_SLIDER_COL1 FL_GRAY -inline void fl_set_slider_value(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->value(v);} -inline double fl_get_slider_value(Fl_Widget* o) { - return ((Fl_Slider*)o)->value();} -inline void fl_set_slider_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Slider*)o)->bounds(a, b);} -inline void fl_get_slider_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Slider*)o)->minimum()); - *b = float(((Fl_Slider*)o)->maximum()); -} -inline void fl_set_slider_return(Fl_Widget* o, int i) { - ((Fl_Slider*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));} -inline void fl_set_slider_step(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->step(v);} -// inline void fl_set_slider_increment(Fl_Widget* o, double v, double); -inline void fl_set_slider_size(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->slider_size(v);} - -#include "Fl_Value_Slider.H" -forms_constructor(Fl_Value_Slider, fl_add_valslider) - -inline void fl_set_slider_precision(Fl_Widget* o, int i) { - ((Fl_Value_Slider*)o)->precision(i);} -// filter function! - -// The forms text object was the same as an Fl_Box except it inverted the -// meaning of FL_ALIGN_INSIDE. Implementation in forms.cxx -class FL_EXPORT Fl_FormsText : public Fl_Widget { -protected: - void draw(); -public: - Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0) - : Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);} -}; -#define FL_NORMAL_TEXT FL_NO_BOX -forms_constructorb(Fl_FormsText, fl_add_text) - -#include "Fl_Timer.H" -forms_constructort(Fl_Timer, fl_add_timer) -inline void fl_set_timer(Fl_Widget* o, double v) {((Fl_Timer*)o)->value(v);} -inline double fl_get_timer(Fl_Widget* o) {return ((Fl_Timer*)o)->value();} -inline void fl_suspend_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(1);} -inline void fl_resume_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(0);} -inline void fl_set_timer_countup(Fl_Widget* o,char d) {((Fl_Timer*)o)->direction(d);} -void FL_EXPORT fl_gettime(long* sec, long* usec); - -// Fl_XYPlot nyi - - -// stuff from DDForms: - -inline int fl_double_click() {return Fl::event_clicks();} -inline void fl_draw() {Fl::flush();} - -#endif /* define __FORMS_H__ */ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/gl.h b/msvc/fltk/include/FL/gl.h deleted file mode 100644 index bb0881df..00000000 --- a/msvc/fltk/include/FL/gl.h +++ /dev/null @@ -1,103 +0,0 @@ -// -// "$Id$" -// -// OpenGL header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2011 by Bill Spitzak and others. -// -// You must include this instead of GL/gl.h to get the Microsoft -// APIENTRY stuff included (from ) prior to the OpenGL -// header files. -// -// This file also provides "missing" OpenGL functions, and -// gl_start() and gl_finish() to allow OpenGL to be used in any window -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -/** \file gl.h - * This file defines wrapper functions for OpenGL in FLTK - * - * To use OpenGL from within an FLTK application you MUST use gl_visual() - * to select the default visual before doing show() on any windows. Mesa - * will crash if yoy try to use a visual not returned by glxChooseVidual. - * - * This does not work with Fl_Double_Window's! It will try to draw - * into the front buffer. Depending on the system this will either - * crash or do nothing (when pixmaps are being used as back buffer - * and GL is being done by hardware), work correctly (when GL is done - * with software, such as Mesa), or draw into the front buffer and - * be erased when the buffers are swapped (when double buffer hardware - * is being used) - */ - -#ifndef FL_gl_H -# define FL_gl_H - -# include "Enumerations.H" // for color names -# ifdef WIN32 -# include -# endif -# ifndef APIENTRY -# if defined(__CYGWIN__) -# define APIENTRY __attribute__ ((__stdcall__)) -# else -# define APIENTRY -# endif -# endif - -# ifdef __APPLE__ -# include -# else -# include -# endif // __APPLE__ - -FL_EXPORT void gl_start(); -FL_EXPORT void gl_finish(); - -FL_EXPORT void gl_color(Fl_Color i); -/** back compatibility */ -inline void gl_color(int c) {gl_color((Fl_Color)c);} - -FL_EXPORT void gl_rect(int x,int y,int w,int h); -/** - Fills the given rectangle with the current color. - \see gl_rect(int x, int y, int w, int h) - */ -inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);} - -FL_EXPORT void gl_font(int fontid, int size); -FL_EXPORT int gl_height(); -FL_EXPORT int gl_descent(); -FL_EXPORT double gl_width(const char *); -FL_EXPORT double gl_width(const char *, int n); -FL_EXPORT double gl_width(uchar); - -FL_EXPORT void gl_draw(const char*); -FL_EXPORT void gl_draw(const char*, int n); -FL_EXPORT void gl_draw(const char*, int x, int y); -FL_EXPORT void gl_draw(const char*, float x, float y); -FL_EXPORT void gl_draw(const char*, int n, int x, int y); -FL_EXPORT void gl_draw(const char*, int n, float x, float y); -FL_EXPORT void gl_draw(const char*, int x, int y, int w, int h, Fl_Align); -FL_EXPORT void gl_measure(const char*, int& x, int& y); -#ifdef __APPLE__ -extern FL_EXPORT void gl_texture_pile_height(int max); -extern FL_EXPORT int gl_texture_pile_height(); -#endif - -FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0); - -#endif // !FL_gl_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/gl2opengl.h b/msvc/fltk/include/FL/gl2opengl.h deleted file mode 100644 index b89614e0..00000000 --- a/msvc/fltk/include/FL/gl2opengl.h +++ /dev/null @@ -1,35 +0,0 @@ -/* gl.h - - GL to OpenGL translator. - If you include this, you might be able to port old GL programs. - There are also much better emulators available on the net. - -*/ - -#include -#include "gl_draw.H" - -inline void clear() {glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);} -#define RGBcolor(r,g,b) glColor3ub(r,g,b) -#define bgnline() glBegin(GL_LINE_STRIP) -#define bgnpolygon() glBegin(GL_POLYGON) -#define bgnclosedline() glBegin(GL_LINE_LOOP) -#define endline() glEnd() -#define endpolygon() glEnd() -#define endclosedline() glEnd() -#define v2f(v) glVertex2fv(v) -#define v2s(v) glVertex2sv(v) -#define cmov(x,y,z) glRasterPos3f(x,y,z) -#define charstr(s) gl_draw(s) -#define fmprstr(s) gl_draw(s) -typedef float Matrix[4][4]; -inline void pushmatrix() {glPushMatrix();} -inline void popmatrix() {glPopMatrix();} -inline void multmatrix(Matrix m) {glMultMatrixf((float *)m);} -inline void color(int n) {glIndexi(n);} -inline void rect(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} -inline void rectf(int x,int y,int r,int t) {glRectf(x,y,r+1,t+1);} -inline void recti(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} -inline void rectfi(int x,int y,int r,int t) {glRecti(x,y,r+1,t+1);} -inline void rects(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} -inline void rectfs(int x,int y,int r,int t) {glRects(x,y,r+1,t+1);} diff --git a/msvc/fltk/include/FL/gl_draw.H b/msvc/fltk/include/FL/gl_draw.H deleted file mode 100644 index 52c57fd4..00000000 --- a/msvc/fltk/include/FL/gl_draw.H +++ /dev/null @@ -1,26 +0,0 @@ -// -// "$Id$" -// -// OpenGL header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#include "gl.h" - -extern FL_EXPORT void gl_remove_displaylist_fonts(); - - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/glu.h b/msvc/fltk/include/FL/glu.h deleted file mode 100644 index 6795b762..00000000 --- a/msvc/fltk/include/FL/glu.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// "$Id$" -// -// GLu header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 by Bill Spitzak and others. -// -// You must include this instead of GL/gl.h to get the Microsoft -// APIENTRY stuff included (from ) prior to the OpenGL -// header files. -// -// This file also provides "missing" OpenGL functions, and -// gl_start() and gl_finish() to allow OpenGL to be used in any window -// -// 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef FL_glu_H -# define FL_glu_H - -# include "Enumerations.H" // for color names -# ifdef WIN32 -# include -# endif -# ifndef APIENTRY -# if defined(__CYGWIN__) -# define APIENTRY __attribute__ ((__stdcall__)) -# else -# define APIENTRY -# endif -# endif - -# ifdef __APPLE__ -# include -# else -# include -# endif - -#endif // !FL_glu_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/glut.H b/msvc/fltk/include/FL/glut.H deleted file mode 100644 index 99471885..00000000 --- a/msvc/fltk/include/FL/glut.H +++ /dev/null @@ -1,481 +0,0 @@ -// -// "$Id$" -// -// GLUT emulation header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2015 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// Emulation of GLUT using fltk. - -// GLUT is Copyright (c) Mark J. Kilgard, 1994, 1995, 1996: -// "This program is freely distributable without licensing fees and is -// provided without guarantee or warrantee expressed or implied. This -// program is -not- in the public domain." - -// Although I have copied the GLUT API, none of my code is based on -// any GLUT implementation details and is therefore covered by the LGPL. - -// Commented out lines indicate parts of GLUT that are not emulated. - -#ifndef Fl_glut_H -# define Fl_glut_H - -# include "gl.h" - - -# include "Fl.H" -# include "Fl_Gl_Window.H" - -/** - GLUT is emulated using this window class and these static variables - (plus several more static variables hidden in glut_compatability.cxx): -*/ -class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window { - void _init(); - int mouse_down; -protected: - void draw(); - void draw_overlay(); - int handle(int); -public: // so the inline functions work - int number; - int menu[3]; - void make_current(); - void (*display)(); - void (*overlaydisplay)(); - void (*reshape)(int w, int h); - void (*keyboard)(uchar, int x, int y); - void (*mouse)(int b, int state, int x, int y); - void (*motion)(int x, int y); - void (*passivemotion)(int x, int y); - void (*entry)(int); - void (*visibility)(int); - void (*special)(int, int x, int y); - Fl_Glut_Window(int w, int h, const char *); - Fl_Glut_Window(int x, int y, int w, int h, const char *); - ~Fl_Glut_Window(); -}; - -extern FL_EXPORT Fl_Glut_Window *glut_window; // the current window -extern FL_EXPORT int glut_menu; // the current menu - -// function pointers that are not per-window: -extern FL_EXPORT void (*glut_idle_function)(); -extern FL_EXPORT void (*glut_menustate_function)(int); -extern FL_EXPORT void (*glut_menustatus_function)(int,int,int); - -//////////////////////////////////////////////////////////////// - -//# define GLUT_API_VERSION This does not match any version of GLUT exactly... - -FL_EXPORT void glutInit(int *argcp, char **argv); // creates first window - -FL_EXPORT void glutInitDisplayMode(unsigned int mode); -// the FL_ symbols have the same value as the GLUT ones: -# define GLUT_RGB FL_RGB -# define GLUT_RGBA FL_RGB -# define GLUT_INDEX FL_INDEX -# define GLUT_SINGLE FL_SINGLE -# define GLUT_DOUBLE FL_DOUBLE -# define GLUT_ACCUM FL_ACCUM -# define GLUT_ALPHA FL_ALPHA -# define GLUT_DEPTH FL_DEPTH -# define GLUT_STENCIL FL_STENCIL -# define GLUT_MULTISAMPLE FL_MULTISAMPLE -# define GLUT_STEREO FL_STEREO -// # define GLUT_LUMINANCE 512 - -FL_EXPORT void glutInitWindowPosition(int x, int y); - -FL_EXPORT void glutInitWindowSize(int w, int h); - -FL_EXPORT void glutMainLoop(); - -FL_EXPORT int glutCreateWindow(char *title); -FL_EXPORT int glutCreateWindow(const char *title); - -FL_EXPORT int glutCreateSubWindow(int win, int x, int y, int width, int height); - -FL_EXPORT void glutDestroyWindow(int win); - -inline void glutPostRedisplay() {glut_window->redraw();} - -FL_EXPORT void glutPostWindowRedisplay(int win); - -FL_EXPORT void glutSwapBuffers(); - -inline int glutGetWindow() {return glut_window->number;} - -FL_EXPORT void glutSetWindow(int win); - -inline void glutSetWindowTitle(char *t) {glut_window->label(t);} - -inline void glutSetIconTitle(char *t) {glut_window->iconlabel(t);} - -inline void glutPositionWindow(int x, int y) {glut_window->position(x,y);} - -inline void glutReshapeWindow(int w, int h) {glut_window->size(w,h);} - -inline void glutPopWindow() {glut_window->show();} - -inline void glutPushWindow() { /* do nothing */ } - -inline void glutIconifyWindow() {glut_window->iconize();} - -inline void glutShowWindow() {glut_window->show();} - -inline void glutHideWindow() {glut_window->hide();} - -inline void glutFullScreen() {glut_window->fullscreen();} - -inline void glutSetCursor(Fl_Cursor cursor) {glut_window->cursor(cursor);} -// notice that the numeric values are different than glut: -# define GLUT_CURSOR_RIGHT_ARROW ((Fl_Cursor)2) -# define GLUT_CURSOR_LEFT_ARROW ((Fl_Cursor)67) -# define GLUT_CURSOR_INFO FL_CURSOR_HAND -# define GLUT_CURSOR_DESTROY ((Fl_Cursor)45) -# define GLUT_CURSOR_HELP FL_CURSOR_HELP -# define GLUT_CURSOR_CYCLE ((Fl_Cursor)26) -# define GLUT_CURSOR_SPRAY ((Fl_Cursor)63) -# define GLUT_CURSOR_WAIT FL_CURSOR_WAIT -# define GLUT_CURSOR_TEXT FL_CURSOR_INSERT -# define GLUT_CURSOR_CROSSHAIR FL_CURSOR_CROSS -# define GLUT_CURSOR_UP_DOWN FL_CURSOR_NS -# define GLUT_CURSOR_LEFT_RIGHT FL_CURSOR_WE -# define GLUT_CURSOR_TOP_SIDE FL_CURSOR_N -# define GLUT_CURSOR_BOTTOM_SIDE FL_CURSOR_S -# define GLUT_CURSOR_LEFT_SIDE FL_CURSOR_W -# define GLUT_CURSOR_RIGHT_SIDE FL_CURSOR_E -# define GLUT_CURSOR_TOP_LEFT_CORNER FL_CURSOR_NW -# define GLUT_CURSOR_TOP_RIGHT_CORNER FL_CURSOR_NE -# define GLUT_CURSOR_BOTTOM_RIGHT_CORNER FL_CURSOR_SE -# define GLUT_CURSOR_BOTTOM_LEFT_CORNER FL_CURSOR_SW -# define GLUT_CURSOR_INHERIT FL_CURSOR_DEFAULT -# define GLUT_CURSOR_NONE FL_CURSOR_NONE -# define GLUT_CURSOR_FULL_CROSSHAIR FL_CURSOR_CROSS - -inline void glutWarpPointer(int, int) { /* do nothing */ } - -inline void glutEstablishOverlay() {glut_window->make_overlay_current();} - -inline void glutRemoveOverlay() {glut_window->hide_overlay();} - -inline void glutUseLayer(GLenum layer) { - layer ? glut_window->make_overlay_current() : glut_window->make_current();} -enum {GLUT_NORMAL, GLUT_OVERLAY}; - -inline void glutPostOverlayRedisplay() {glut_window->redraw_overlay();} - -inline void glutShowOverlay() {glut_window->redraw_overlay();} - -inline void glutHideOverlay() {glut_window->hide_overlay();} - -FL_EXPORT int glutCreateMenu(void (*)(int)); - -FL_EXPORT void glutDestroyMenu(int menu); - -inline int glutGetMenu() {return glut_menu;} - -inline void glutSetMenu(int m) {glut_menu = m;} - -FL_EXPORT void glutAddMenuEntry(char *label, int value); - -FL_EXPORT void glutAddSubMenu(char *label, int submenu); - -FL_EXPORT void glutChangeToMenuEntry(int item, char *labela, int value); - -FL_EXPORT void glutChangeToSubMenu(int item, char *label, int submenu); - -FL_EXPORT void glutRemoveMenuItem(int item); - -inline void glutAttachMenu(int b) {glut_window->menu[b] = glut_menu;} - -inline void glutDetachMenu(int b) {glut_window->menu[b] = 0;} - -inline void glutDisplayFunc(void (*f)()) {glut_window->display = f;} - -inline void glutReshapeFunc(void (*f)(int w, int h)) {glut_window->reshape=f;} - -inline void glutKeyboardFunc(void (*f)(uchar key, int x, int y)) { - glut_window->keyboard = f;} - -inline void glutMouseFunc(void (*f)(int b, int state, int x, int y)) { - glut_window->mouse = f;} -# define GLUT_LEFT_BUTTON 0 -# define GLUT_MIDDLE_BUTTON 1 -# define GLUT_RIGHT_BUTTON 2 -# define GLUT_DOWN 0 -# define GLUT_UP 1 - -inline void glutMotionFunc(void (*f)(int x, int y)) {glut_window->motion= f;} - -inline void glutPassiveMotionFunc(void (*f)(int x, int y)) { - glut_window->passivemotion= f;} - -inline void glutEntryFunc(void (*f)(int s)) {glut_window->entry = f;} -enum {GLUT_LEFT, GLUT_ENTERED}; - -inline void glutVisibilityFunc(void (*f)(int s)) {glut_window->visibility=f;} -enum {GLUT_NOT_VISIBLE, GLUT_VISIBLE}; - -FL_EXPORT void glutIdleFunc(void (*f)()); - -inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) { - Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)(fl_intptr_t)value); -} - -inline void glutMenuStateFunc(void (*f)(int state)) { - glut_menustate_function = f;} - -inline void glutMenuStatusFunc(void (*f)(int status, int x, int y)) { - glut_menustatus_function = f;} -enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE}; - -inline void glutSpecialFunc(void (*f)(int key, int x, int y)) { - glut_window->special = f;} -# define GLUT_KEY_F1 1 -# define GLUT_KEY_F2 2 -# define GLUT_KEY_F3 3 -# define GLUT_KEY_F4 4 -# define GLUT_KEY_F5 5 -# define GLUT_KEY_F6 6 -# define GLUT_KEY_F7 7 -# define GLUT_KEY_F8 8 -# define GLUT_KEY_F9 9 -# define GLUT_KEY_F10 10 -# define GLUT_KEY_F11 11 -# define GLUT_KEY_F12 12 -// WARNING: Different values than GLUT uses: -# define GLUT_KEY_LEFT FL_Left -# define GLUT_KEY_UP FL_Up -# define GLUT_KEY_RIGHT FL_Right -# define GLUT_KEY_DOWN FL_Down -# define GLUT_KEY_PAGE_UP FL_Page_Up -# define GLUT_KEY_PAGE_DOWN FL_Page_Down -# define GLUT_KEY_HOME FL_Home -# define GLUT_KEY_END FL_End -# define GLUT_KEY_INSERT FL_Insert - -//inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z)); - -//inline void glutSpaceballRotateFunc(void (*)(int x, int y, int z)); - -//inline void glutSpaceballButtonFunc(void (*)(int button, int state)); - -//inline void glutButtonBoxFunc(void (*)(int button, int state)); - -//inline void glutDialsFunc(void (*)(int dial, int value)); - -//inline void glutTabletMotionFunc(void (*)(int x, int y)); - -//inline void glutTabletButtonFunc(void (*)(int button, int state, int x, int y)); - -inline void glutOverlayDisplayFunc(void (*f)()) { - glut_window->overlaydisplay = f;} - -//inline void glutWindowStatusFunc(void (*)(int state)); -//enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED, -// GLUT_FULLY_COVERED}; - -//inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); - -//inline GLfloat glutGetColor(int ndx, int component); -//#define GLUT_RED 0 -//#define GLUT_GREEN 1 -//#define GLUT_BLUE 2 - -//inline void glutCopyColormap(int win); - -// Warning: values are changed from GLUT! -// Also relies on the GL_ symbols having values greater than 100 -FL_EXPORT int glutGet(GLenum type); -enum { - GLUT_RETURN_ZERO = 0, - GLUT_WINDOW_X, - GLUT_WINDOW_Y, - GLUT_WINDOW_WIDTH, - GLUT_WINDOW_HEIGHT, - GLUT_WINDOW_PARENT, - GLUT_SCREEN_WIDTH, - GLUT_SCREEN_HEIGHT, - GLUT_MENU_NUM_ITEMS, - GLUT_DISPLAY_MODE_POSSIBLE, - GLUT_INIT_WINDOW_X, - GLUT_INIT_WINDOW_Y, - GLUT_INIT_WINDOW_WIDTH, - GLUT_INIT_WINDOW_HEIGHT, - GLUT_INIT_DISPLAY_MODE, - GLUT_WINDOW_BUFFER_SIZE, - GLUT_VERSION -//GLUT_WINDOW_NUM_CHILDREN, -//GLUT_WINDOW_CURSOR, -//GLUT_SCREEN_WIDTH_MM, -//GLUT_SCREEN_HEIGHT_MM, -//GLUT_ELAPSED_TIME, -}; - -# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS -# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS -# define GLUT_WINDOW_RED_SIZE GL_RED_BITS -# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS -# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS -# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS -# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS -# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS -# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS -# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS -# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER -# define GLUT_WINDOW_RGBA GL_RGBA -# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS -# ifdef GL_SAMPLES_SGIS -# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS -# else -# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO -# endif -# define GLUT_WINDOW_STEREO GL_STEREO - -# define GLUT_HAS_KEYBOARD 600 -# define GLUT_HAS_MOUSE 601 -# define GLUT_HAS_SPACEBALL 602 -# define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 -# define GLUT_HAS_TABLET 604 -# define GLUT_NUM_MOUSE_BUTTONS 605 -# define GLUT_NUM_SPACEBALL_BUTTONS 606 -# define GLUT_NUM_BUTTON_BOX_BUTTONS 607 -# define GLUT_NUM_DIALS 608 -# define GLUT_NUM_TABLET_BUTTONS 609 -FL_EXPORT int glutDeviceGet(GLenum type); - -// WARNING: these values are different than GLUT uses: -# define GLUT_ACTIVE_SHIFT FL_SHIFT -# define GLUT_ACTIVE_CTRL FL_CTRL -# define GLUT_ACTIVE_ALT FL_ALT -inline int glutGetModifiers() {return Fl::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);} - -FL_EXPORT int glutLayerGet(GLenum); -# define GLUT_OVERLAY_POSSIBLE 800 -//#define GLUT_LAYER_IN_USE 801 -//#define GLUT_HAS_OVERLAY 802 -# define GLUT_TRANSPARENT_INDEX 803 -# define GLUT_NORMAL_DAMAGED 804 -# define GLUT_OVERLAY_DAMAGED 805 - -extern "C" { -typedef void (*GLUTproc)(); -} - -FL_EXPORT GLUTproc glutGetProcAddress(const char *procName); - -//inline int glutVideoResizeGet(GLenum param); -//#define GLUT_VIDEO_RESIZE_POSSIBLE 900 -//#define GLUT_VIDEO_RESIZE_IN_USE 901 -//#define GLUT_VIDEO_RESIZE_X_DELTA 902 -//#define GLUT_VIDEO_RESIZE_Y_DELTA 903 -//#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 -//#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905 -//#define GLUT_VIDEO_RESIZE_X 906 -//#define GLUT_VIDEO_RESIZE_Y 907 -//#define GLUT_VIDEO_RESIZE_WIDTH 908 -//#define GLUT_VIDEO_RESIZE_HEIGHT 909 - -//inline void glutSetupVideoResizing(); - -//inline void glutStopVideoResizing(); - -//inline void glutVideoResize(int x, int y, int width, int height); - -//inline void glutVideoPan(int x, int y, int width, int height); - -// Font argument must be a void* for compatibility, so... -/** fltk glut font/size attributes used in the glutXXX functions */ -struct Fl_Glut_Bitmap_Font {Fl_Font font; Fl_Fontsize size;}; - -extern FL_EXPORT struct Fl_Glut_Bitmap_Font - glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10, - glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, - glutBitmapHelvetica18; -# define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) -# define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) -# define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) -# define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) -# define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) -# define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) -# define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) - -FL_EXPORT void glutBitmapCharacter(void *font, int character); -FL_EXPORT int glutBitmapHeight(void *font); -FL_EXPORT int glutBitmapLength(void *font, const unsigned char *string); -FL_EXPORT void glutBitmapString(void *font, const unsigned char *string); -FL_EXPORT int glutBitmapWidth(void *font, int character); - -FL_EXPORT int glutExtensionSupported(char *name); - -/* GLUT stroked font sub-API */ -struct Fl_Glut_StrokeVertex { - GLfloat X, Y; -}; - -struct Fl_Glut_StrokeStrip { - int Number; - const Fl_Glut_StrokeVertex* Vertices; -}; - -struct Fl_Glut_StrokeChar { - GLfloat Right; - int Number; - const Fl_Glut_StrokeStrip* Strips; -}; - -struct Fl_Glut_StrokeFont { - char* Name; // The source font name - int Quantity; // Number of chars in font - GLfloat Height; // Height of the characters - const Fl_Glut_StrokeChar** Characters;// The characters mapping -}; -extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeRoman; -extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeMonoRoman; -# define GLUT_STROKE_ROMAN (&glutStrokeRoman) -# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) - -FL_EXPORT void glutStrokeCharacter(void *font, int character); -FL_EXPORT GLfloat glutStrokeHeight(void *font); -FL_EXPORT int glutStrokeLength(void *font, const unsigned char *string); -FL_EXPORT void glutStrokeString(void *font, const unsigned char *string); -FL_EXPORT int glutStrokeWidth(void *font, int character); - -/* GLUT pre-built models sub-API */ -FL_EXPORT void glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -FL_EXPORT void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -FL_EXPORT void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -FL_EXPORT void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -FL_EXPORT void glutWireCube(GLdouble size); -FL_EXPORT void glutSolidCube(GLdouble size); -FL_EXPORT void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -FL_EXPORT void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -FL_EXPORT void glutWireDodecahedron(); -FL_EXPORT void glutSolidDodecahedron(); -FL_EXPORT void glutWireTeapot(GLdouble size); -FL_EXPORT void glutSolidTeapot(GLdouble size); -FL_EXPORT void glutWireOctahedron(); -FL_EXPORT void glutSolidOctahedron(); -FL_EXPORT void glutWireTetrahedron(); -FL_EXPORT void glutSolidTetrahedron(); -FL_EXPORT void glutWireIcosahedron(); -FL_EXPORT void glutSolidIcosahedron(); - -#endif // !Fl_glut_H - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/mac.H b/msvc/fltk/include/FL/mac.H deleted file mode 100644 index 5bf5db67..00000000 --- a/msvc/fltk/include/FL/mac.H +++ /dev/null @@ -1,332 +0,0 @@ -// -// "$Id$" -// -// Mac header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2016 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// Do not directly include this file, instead use . It will -// include this file if "__APPLE__" is defined. This is to encourage -// portability of even the system-specific code... -#ifndef FL_DOXYGEN - -#if !defined(Fl_X_H) -# error "Never use directly; include instead." -#endif // !Fl_X_H - -#ifdef __OBJC__ -@class FLWindow; // a subclass of the NSWindow Cocoa class -typedef FLWindow *Window; -#else -typedef class FLWindow *Window; // pointer to the FLWindow objective-c class -#endif // __OBJC__ - -#if !(defined(FL_LIBRARY) || defined(FL_INTERNALS)) // this part is used when compiling an application program -# include - -typedef struct flCocoaRegion* Fl_Region; -typedef struct CGContext* CGContextRef; -typedef struct OpaquePMPrintSettings* PMPrintSettings; -typedef struct OpaquePMPageFormat* PMPageFormat; -typedef struct OpaquePMPrintSession* PMPrintSession; -typedef struct CGImage* CGImageRef; -typedef struct __CFData* CFMutableDataRef; // used in Fl_Copy_Surface.H -typedef CGContextRef Fl_Offscreen; - -#else // this part must be compiled when building the FLTK libraries - -// Standard MacOS C/C++ includes... -#include -#undef check // because of Fl::check() - -#ifndef MAC_OS_X_VERSION_10_4 -#define MAC_OS_X_VERSION_10_4 1040 -#endif -#ifndef MAC_OS_X_VERSION_10_5 -#define MAC_OS_X_VERSION_10_5 1050 -#endif -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif -#ifndef MAC_OS_X_VERSION_10_7 -#define MAC_OS_X_VERSION_10_7 1070 -#endif -#ifndef MAC_OS_X_VERSION_10_8 -#define MAC_OS_X_VERSION_10_8 1080 -#endif -#ifndef MAC_OS_X_VERSION_10_9 -#define MAC_OS_X_VERSION_10_9 1090 -#endif -#ifndef MAC_OS_X_VERSION_10_10 -#define MAC_OS_X_VERSION_10_10 101000 -#endif -#ifndef MAC_OS_X_VERSION_10_11 -#define MAC_OS_X_VERSION_10_11 101100 -#endif -#ifndef MAC_OS_X_VERSION_10_12 -#define MAC_OS_X_VERSION_10_12 101200 -#endif -#ifndef MAC_OS_X_VERSION_10_13 -#define MAC_OS_X_VERSION_10_13 101300 -#endif -#ifndef MAC_OS_X_VERSION_10_14 -#define MAC_OS_X_VERSION_10_14 101400 -#endif - -#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h -#if defined(__LP64__) && __LP64__ -typedef long NSInteger; -typedef unsigned long NSUInteger; -#else -typedef int NSInteger; -typedef unsigned int NSUInteger; -#endif -#endif - -#ifdef __OBJC__ -@class NSCursor; -@class NSOpenGLPixelFormat; -@class NSOpenGLContext; -#else -class NSCursor; -class NSOpenGLPixelFormat; -class NSOpenGLContext; -#endif // __OBJC__ - -typedef CGContextRef Fl_Offscreen; -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 -typedef CGImageAlphaInfo CGBitmapInfo; -#endif - -typedef struct flCocoaRegion { - int count; - CGRect *rects; -} *Fl_Region; // a region is the union of a series of rectangles - -# include "Fl_Window.H" -# include "../src/Fl_Font.H" - -// Some random X equivalents -struct XPoint { int x, y; }; -struct XRectangle {int x, y, width, height;}; -#ifndef CGFLOAT_DEFINED //appears with 10.5 in CGBase.h -#if defined(__LP64__) && __LP64__ -typedef double CGFloat; -#else -typedef float CGFloat; -#endif -#endif // CGFLOAT_DEFINED - -extern CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h); -inline Fl_Region XRectangleRegion(int x, int y, int w, int h) { - Fl_Region R = (Fl_Region)malloc(sizeof(*R)); - R->count = 1; - R->rects = (CGRect *)malloc(sizeof(CGRect)); - *(R->rects) = fl_cgrectmake_cocoa(x, y, w, h); - return R; -} -inline void XDestroyRegion(Fl_Region r) { - if(r) { - free(r->rects); - free(r); - } -} -extern NSCursor *fl_default_cursor; - -// This object contains all mac-specific stuff about a window: -// WARNING: this object is highly subject to change! -class Fl_X { - -public: - Window xid; // pointer to the Cocoa window object (FLWindow*) - Fl_Offscreen other_xid; // pointer for offscreen bitmaps (overlay window) - Fl_Window *w; // FLTK window for - Fl_Region region; -#if FLTK_ABI_VERSION < 10304 - Fl_Region subRegion; // for ABI compatibility, recycled to replace subRect_ -#endif - Fl_X *next; // chain of mapped windows -#if FLTK_ABI_VERSION < 10304 - Fl_X *xidChildren; // useless with true subwindows, recycled to replace mapped_to_retina_ - Fl_X *xidNext; // useless with true subwindows -#endif - int wait_for_expose; - NSCursor *cursor; - static Fl_X* first; - static Fl_X* i(const Fl_Window* w) {return w->i;} - static int fake_X_wm(const Fl_Window*,int&,int&,int&,int&,int&); - static void make(Fl_Window*); - void flush(); - static void set_high_resolution(bool); -#if FLTK_ABI_VERSION >= 10304 - CGRect* subRect() { return subRect_; } // getter - void subRect(CGRect *r) { subRect_ = r; } // setter -#else - CGRect* subRect() { return (CGRect*)subRegion; } // getter - void subRect(CGRect *r) { subRegion = (Fl_Region)r; } // setter -#endif - bool mapped_to_retina(); // is window mapped to retina display? - void mapped_to_retina(bool); // sets whether window is mapped to retina display - bool changed_resolution(); // did window just moved to display with another resolution? - void changed_resolution(bool);// sets whether window just moved to display with another resolution - bool in_windowDidResize(); // is window performing windowDidResize? - void in_windowDidResize(bool); // sets whether window is performing windowDidResize - // Quartz additions: - CGContextRef gc; // graphics context (NULL when using QD) - static void q_fill_context(); // fill a Quartz context with current FLTK state - static void q_clear_clipping(); // remove all clipping from a Quartz context - static void q_release_context(Fl_X *x=0); // free all resources associated with fl_gc - static void q_begin_image(CGRect&, int x, int y, int w, int h); - static void q_end_image(); - // Cocoa additions - static NSOpenGLPixelFormat *mode_to_NSOpenGLPixelFormat(int mode, const int*); // computes NSOpenGLPixelFormat from Gl window's mode - static NSOpenGLContext* create_GLcontext_for_window(NSOpenGLPixelFormat *pixelformat, NSOpenGLContext *shared_ctx, Fl_Window *window); - static void GLcontext_update(NSOpenGLContext*); - static void GLcontext_flushbuffer(NSOpenGLContext*); - static void GLcontext_release(NSOpenGLContext*); - static void GLcontext_makecurrent(NSOpenGLContext*); - static void GL_cleardrawable(void); - static void gl_start(NSOpenGLContext*); - void destroy(void); - void map(void); - void unmap(void); - void collapse(void); - WindowRef window_ref(void); // useless with cocoa GL windows - void set_key_window(void); - // OS X doesn't have per window icons - static void set_default_icons(const Fl_RGB_Image*[], int) {}; - void set_icons() {}; - int set_cursor(Fl_Cursor); - int set_cursor(const Fl_RGB_Image*, int, int); - static CGImageRef CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, int h); - static unsigned char *bitmap_from_window_rect(Fl_Window *win, int x, int y, int w, int h, int *bytesPerPixel); - static Fl_Region intersect_region_and_rect(Fl_Region current, int x,int y,int w, int h); - static void *get_carbon_function(const char *name); - static void screen_work_area(int &X, int &Y, int &W, int &H, int n); // compute work area of a given screen - static int next_marked_length; // next length of marked text after current marked text will have been replaced - static int insertion_point_location(int *px, int *py, int *pheight); // computes window coordinates & height of insertion point - static const int CoreText_threshold; // Mac OS version from which the Core Text API is used to display text - static Fl_Fontdesc* calc_fl_fonts(void); // computes the fl_fonts global variable - static int dnd(int use_selection); // call Fl_X::dnd(1) to support text dragging - static int calc_mac_os_version(void); // computes the fl_mac_os_version global variable - static void clip_to_rounded_corners(CGContextRef gc, int w, int h); - static void *get_titlebar_layer(Fl_Window *win); - static void draw_layer_to_context(void *layer, CGContextRef ctxt, int w, int h); -private: -#if FLTK_ABI_VERSION >= 10304 - CGRect* subRect_; // makes sure subwindow remains inside its parent window - // stores 3 binary flags: whether window is mapped to retina display; whether resolution just changed; - // whether window is OpenGL and is currently being resized. - unsigned mapped_to_retina_; -#else - bool subwindow; // for ABI compatibility, useless with true subwindows -#endif -}; - -extern Window fl_window; - -#endif // FL_LIBRARY || FL_INTERNALS - -typedef CGImageRef Fl_Bitmask; - -extern CGContextRef fl_gc; - -extern Window fl_xid(const Fl_Window*); -extern Fl_Window* fl_find(Window xid); -void fl_clip_region(Fl_Region); - -extern Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); -extern Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); -extern void fl_delete_bitmask(Fl_Bitmask bm); -extern Fl_Offscreen fl_create_offscreen(int w, int h); -extern void fl_copy_offscreen(int x,int y,int w,int h, Fl_Offscreen gWorld, int srcx,int srcy); -extern void fl_delete_offscreen(Fl_Offscreen gWorld); -extern void fl_begin_offscreen(Fl_Offscreen gWorld); -extern void fl_end_offscreen(); - -extern int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); -extern void fl_open_display(); - -#endif // FL_DOXYGEN -/** \file - Mac OS X-specific symbols. - */ - -/** \defgroup group_macosx Mac OS X-specific symbols - Mac OS X-specific symbols declared in or - \sa \ref osissues_macos - @{ */ - -/** @brief Register a function called for each file dropped onto an application icon. - \e cb will be called with a single Unix-style file name and path. - If multiple files were dropped, \e cb will be called multiple times. - */ -extern void fl_open_callback(void (*cb)(const char *)); - -/** - * \brief Attaches a callback to the "About myprog" item of the system application menu. - * - * \param cb a callback that will be called by "About myprog" menu item - * with NULL 1st argument. - * \param user_data a pointer transmitted as 2nd argument to the callback. - * \param shortcut optional shortcut to attach to the "About myprog" menu item (e.g., FL_META+'a') - */ -extern void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut = 0); - -/** \brief The version number of the running Mac OS X (e.g., 100604 for 10.6.4) - */ -extern int fl_mac_os_version; - -/** Determines whether cmd-Q or the "Quit xxx" item of application menu terminates the app or only the event loop. - By default, fl_mac_quit_early = 1, and cmd-Q or "Quit xxx" terminate the app when all windows are closed - without Fl::run() returning. If fl_mac_quit_early is set to 0, cmd-Q or "Quit xxx" terminate only the event loop - when all windows are closed, and Fl::run() returns. - \note This OS-specific variable will not be part of the API of FLTK 1.4. - */ -extern int fl_mac_quit_early; - -/** The system menu bar. - */ -extern class Fl_Sys_Menu_Bar *fl_sys_menu_bar; - -struct Fl_Menu_Item; - -class Fl_Mac_App_Menu { -public: - /** Localizable text for the "About xxx" application menu item */ - static const char *about; - /** Localizable text for the "Print Front Window" application menu item. - This menu item won't be displayed if Fl_Mac_App_Menu::print - is set to an empty string. - */ - static const char *print; - /** Localizable text for the "Services" application menu item */ - static const char *services; - /** Localizable text for the "Hide xxx" application menu item */ - static const char *hide; - /** Localizable text for the "Hide Others" application menu item */ - static const char *hide_others; - /** Localizable text for the "Show All" application menu item */ - static const char *show; - /** Localizable text for the "Quit xxx" application menu item */ - static const char *quit; - static void custom_application_menu_items(const Fl_Menu_Item *m); -}; - -/** @} */ - -// -// End of "$Id$". -// - diff --git a/msvc/fltk/include/FL/math.h b/msvc/fltk/include/FL/math.h deleted file mode 100644 index b574000c..00000000 --- a/msvc/fltk/include/FL/math.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// "$Id$" -// -// Math header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// Xcode on OS X includes files by recursing down into directories. -// This code catches the cycle and directly includes the required file. -#ifdef fl_math_h_cyclic_include -# include "/usr/include/math.h" -#endif - -#ifndef fl_math_h -# define fl_math_h - -# define fl_math_h_cyclic_include -# include -# undef fl_math_h_cyclic_include - -# ifdef __EMX__ -# include -# endif - - -# ifndef M_PI -# define M_PI 3.14159265358979323846 -# define M_PI_2 1.57079632679489661923 -# define M_PI_4 0.78539816339744830962 -# define M_1_PI 0.31830988618379067154 -# define M_2_PI 0.63661977236758134308 -# endif // !M_PI - -# ifndef M_SQRT2 -# define M_SQRT2 1.41421356237309504880 -# define M_SQRT1_2 0.70710678118654752440 -# endif // !M_SQRT2 - -# if (defined(WIN32) || defined(CRAY)) && !defined(__MINGW32__) && !defined(__MWERKS__) - -inline double rint(double v) {return floor(v+.5);} -inline double copysign(double a, double b) {return b<0 ? -a : a;} - -# endif // (WIN32 || CRAY) && !__MINGW32__ && !__MWERKS__ - -#endif // !fl_math_h - - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/names.h b/msvc/fltk/include/FL/names.h deleted file mode 100644 index cee584b0..00000000 --- a/msvc/fltk/include/FL/names.h +++ /dev/null @@ -1,121 +0,0 @@ -// -// "$Id$" -// -// Event names header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2010 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// Thanks to Greg Ercolano for this addition. - -#ifndef FL_NAMES_H -#define FL_NAMES_H - -/** \defgroup fl_events Events handling functions - @{ - */ - -/** - This is an array of event names you can use to convert event numbers into names. - - The array gets defined inline wherever your '\#include ' appears. - - \b Example: - \code - #include // array will be defined here - int MyClass::handle(int e) { - printf("Event was %s (%d)\n", fl_eventnames[e], e); - // ..resulting output might be e.g. "Event was FL_PUSH (1)".. - [..] - } - \endcode - */ -const char * const fl_eventnames[] = -{ - "FL_NO_EVENT", - "FL_PUSH", - "FL_RELEASE", - "FL_ENTER", - "FL_LEAVE", - "FL_DRAG", - "FL_FOCUS", - "FL_UNFOCUS", - "FL_KEYDOWN", - "FL_KEYUP", - "FL_CLOSE", - "FL_MOVE", - "FL_SHORTCUT", - "FL_DEACTIVATE", - "FL_ACTIVATE", - "FL_HIDE", - "FL_SHOW", - "FL_PASTE", - "FL_SELECTIONCLEAR", - "FL_MOUSEWHEEL", - "FL_DND_ENTER", - "FL_DND_DRAG", - "FL_DND_LEAVE", - "FL_DND_RELEASE", - "FL_SCREEN_CONFIGURATION_CHANGED", - "FL_FULLSCREEN", - "FL_ZOOM_GESTURE", - "FL_EVENT_27", // not yet defined, just in case they /will/ be defined ... - "FL_EVENT_28", - "FL_EVENT_29", - "FL_EVENT_30" -}; - -/** - This is an array of font names you can use to convert font numbers into names. - - The array gets defined inline wherever your '\#include ' appears. - - \b Example: - \code - #include // array will be defined here - int MyClass::my_callback(Fl_Widget *w, void*) { - int fnum = w->labelfont(); - // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)" - printf("Label's font is %s (%d)\n", fl_fontnames[fnum], fnum); - // ..resulting output might be e.g. "Label's font is FL_HELVETICA (0)".. - [..] - } - \endcode - */ -const char * const fl_fontnames[] = -{ - "FL_HELVETICA", - "FL_HELVETICA_BOLD", - "FL_HELVETICA_ITALIC", - "FL_HELVETICA_BOLD_ITALIC", - "FL_COURIER", - "FL_COURIER_BOLD", - "FL_COURIER_ITALIC", - "FL_COURIER_BOLD_ITALIC", - "FL_TIMES", - "FL_TIMES_BOLD", - "FL_TIMES_ITALIC", - "FL_TIMES_BOLD_ITALIC", - "FL_SYMBOL", - "FL_SCREEN", - "FL_SCREEN_BOLD", - "FL_ZAPF_DINGBATS", -}; - -/** @} */ - -#endif /* FL_NAMES_H */ - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/platform.H b/msvc/fltk/include/FL/platform.H deleted file mode 100644 index 69152675..00000000 --- a/msvc/fltk/include/FL/platform.H +++ /dev/null @@ -1,31 +0,0 @@ -// -// "$Id$" -// -// Platform abstraction header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2018 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// This file is present for compatibility with FLTK 1.4 and later. - -// In FLTK 1.4 FL/platform.H replaces FL/x.H. FLTK 1.4 code that -// includes FL/platform.H instead of FL/x.H can now be compiled with -// FLTK 1.3.5 and later versions. - -#if !defined(Fl_X_H) -#include -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/win32.H b/msvc/fltk/include/FL/win32.H deleted file mode 100644 index 657a66d9..00000000 --- a/msvc/fltk/include/FL/win32.H +++ /dev/null @@ -1,163 +0,0 @@ -// -// "$Id$" -// -// WIN32 header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2012 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// Do not directly include this file, instead use . It will -// include this file if WIN32 is defined. This is to encourage -// portability of even the system-specific code... - -#ifndef FL_DOXYGEN -#ifndef Fl_X_H -# error "Never use directly; include instead." -#endif // !Fl_X_H - -#include -typedef HRGN Fl_Region; -typedef HWND Window; -typedef POINT XPoint; - -#include - -// this part is included only when compiling the FLTK library or if requested explicitly -#if defined(FL_LIBRARY) || defined(FL_INTERNALS) - -// In some of the distributions, the gcc header files are missing some stuff: -#ifndef LPMINMAXINFO -#define LPMINMAXINFO MINMAXINFO* -#endif -#ifndef VK_LWIN -#define VK_LWIN 0x5B -#define VK_RWIN 0x5C -#define VK_APPS 0x5D -#endif - -// some random X equivalents -struct XRectangle {int x, y, width, height;}; -extern Fl_Region XRectangleRegion(int x, int y, int w, int h); -inline void XDestroyRegion(Fl_Region r) {DeleteObject(r);} -inline void XClipBox(Fl_Region r,XRectangle* rect) { - RECT win_rect; GetRgnBox(r,&win_rect); - rect->x=win_rect.left; - rect->y=win_rect.top; - rect->width=win_rect.right-win_rect.left; - rect->height=win_rect.bottom-win_rect.top; -} -#define XDestroyWindow(a,b) DestroyWindow(b) -#define XMapWindow(a,b) ShowWindow(b, SW_RESTORE) -#define XUnmapWindow(a,b) ShowWindow(b, SW_HIDE) - -// this object contains all win32-specific stuff about a window: -// Warning: this object is highly subject to change! -class FL_EXPORT Fl_X { -public: - // member variables - add new variables only at the end of this block - Window xid; - HBITMAP other_xid; // for double-buffered windows - Fl_Window* w; - Fl_Region region; - Fl_X *next; - int wait_for_expose; - HDC private_dc; // used for OpenGL - HCURSOR cursor; - int custom_cursor; - HDC saved_hdc; // saves the handle of the DC currently loaded - // static variables, static functions and member functions - static Fl_X* first; - static Fl_X* i(const Fl_Window* w) {return w->i;} - static int fake_X_wm(const Fl_Window* w,int &X, int &Y, - int &bt,int &bx,int &by); - void make_fullscreen(int X, int Y, int W, int H); - void setwindow(Fl_Window* wi) {w=wi; wi->i=this;} - void flush() {w->flush();} - void set_minmax(LPMINMAXINFO minmax); - void mapraise(); - static void set_default_icons(const Fl_RGB_Image*[], int); - static void set_default_icons(HICON, HICON); - void set_icons(); - int set_cursor(Fl_Cursor); - int set_cursor(const Fl_RGB_Image*, int, int); - static Fl_X* make(Fl_Window*); -}; -extern FL_EXPORT UINT fl_wake_msg; -extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid() -extern FL_EXPORT int fl_background_pixel; // hack into Fl_Window::make_xid() -extern FL_EXPORT HPALETTE fl_palette; // non-zero only on 8-bit displays! -extern FL_EXPORT void fl_release_dc(HWND w, HDC dc); -extern FL_EXPORT void fl_save_dc( HWND w, HDC dc); - -inline Window fl_xid(const Fl_Window* w) { Fl_X *temp = Fl_X::i(w); return temp ? temp->xid : 0; } - -extern FL_EXPORT void fl_open_display(); - -#else -FL_EXPORT Window fl_xid_(const Fl_Window* w); -#define fl_xid(w) fl_xid_(w) -#endif // FL_LIBRARY || FL_INTERNALS - -FL_EXPORT Fl_Window* fl_find(Window xid); -void fl_clip_region(Fl_Region); - -// most recent fl_color() or fl_rgbcolor() points at one of these: -extern FL_EXPORT struct Fl_XMap { - COLORREF rgb; // this should be the type the RGB() macro returns - HPEN pen; // pen, 0 if none created yet - int brush; // ref to solid brush, 0 if none created yet -} *fl_current_xmap; -inline COLORREF fl_RGB() {return fl_current_xmap->rgb;} -inline HPEN fl_pen() {return fl_current_xmap->pen;} -FL_EXPORT HBRUSH fl_brush(); // allocates a brush if necessary -FL_EXPORT HBRUSH fl_brush_action(int); // now does the real work - -extern FL_EXPORT HINSTANCE fl_display; -extern FL_EXPORT Window fl_window; -extern FL_EXPORT HDC fl_gc; -extern FL_EXPORT MSG fl_msg; -extern FL_EXPORT HDC fl_GetDC(Window); -extern FL_EXPORT HDC fl_makeDC(HBITMAP); - -// off-screen pixmaps: create, destroy, draw into, copy to window -typedef HBITMAP Fl_Offscreen; -#define fl_create_offscreen(w, h) \ - CreateCompatibleBitmap( (fl_gc ? fl_gc : fl_GetDC(0) ) , w, h) - -# define fl_begin_offscreen(b) \ - HDC _sgc=fl_gc; Window _sw=fl_window; \ - Fl_Surface_Device *_ss = Fl_Surface_Device::surface(); Fl_Display_Device::display_device()->set_current(); \ - fl_gc=fl_makeDC(b); int _savedc = SaveDC(fl_gc); fl_window=(HWND)b; fl_push_no_clip() - -# define fl_end_offscreen() \ - fl_pop_clip(); RestoreDC(fl_gc, _savedc); DeleteDC(fl_gc); _ss->set_current(); fl_window=_sw; fl_gc = _sgc - - -FL_EXPORT void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP pixmap,int srcx,int srcy); -#define fl_delete_offscreen(bitmap) DeleteObject(bitmap) - -// Bitmap masks -typedef HBITMAP Fl_Bitmask; - -extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); -extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); -extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm); - -// Dummy function to register a function for opening files via the window manager... -inline void fl_open_callback(void (*)(const char *)) {} - -extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); -#endif // FL_DOXYGEN -// -// End of "$Id$". -// diff --git a/msvc/fltk/include/FL/x.H b/msvc/fltk/include/FL/x.H deleted file mode 100644 index a15b8acd..00000000 --- a/msvc/fltk/include/FL/x.H +++ /dev/null @@ -1,183 +0,0 @@ -// -// "$Id$" -// -// X11 header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2012 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: -// -// http://www.fltk.org/COPYING.php -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// These are internal fltk symbols that are necessary or useful for -// calling Xlib. You should include this file if (and ONLY if) you -// need to call Xlib directly. These symbols may not exist on non-X -// systems. - -#if !defined(Fl_X_H) && !defined(FL_DOXYGEN) -# define Fl_X_H - -# include "Enumerations.H" - -# ifdef WIN32 -# include "win32.H" -# elif defined(__APPLE__) -# include "mac.H" -# else -# if defined(_ABIN32) || defined(_ABI64) // fix for broken SGI Irix X .h files -# pragma set woff 3322 -# endif -# include -# include -# if defined(_ABIN32) || defined(_ABI64) -# pragma reset woff 3322 -# endif -# include -# include "Fl_Window.H" -// Mirror X definition of Region to Fl_Region, for portability... -typedef Region Fl_Region; - -FL_EXPORT void fl_open_display(); -FL_EXPORT void fl_open_display(Display*); -FL_EXPORT void fl_close_display(); - -// constant info about the X server connection: -extern FL_EXPORT Display *fl_display; -extern FL_EXPORT int fl_screen; -extern FL_EXPORT XVisualInfo *fl_visual; -extern FL_EXPORT Colormap fl_colormap; - - -// drawing functions: -extern FL_EXPORT GC fl_gc; -extern FL_EXPORT Window fl_window; -FL_EXPORT ulong fl_xpixel(Fl_Color i); -FL_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b); -FL_EXPORT void fl_clip_region(Fl_Region); -FL_EXPORT Fl_Region fl_clip_region(); - -// feed events into fltk: -FL_EXPORT int fl_handle(const XEvent&); - -// you can use these in Fl::add_handler() to look at events: -extern FL_EXPORT const XEvent* fl_xevent; -extern FL_EXPORT ulong fl_event_time; - -// off-screen pixmaps: create, destroy, draw into, copy to window: -typedef ulong Fl_Offscreen; -# define fl_create_offscreen(w,h) XCreatePixmap(fl_display, RootWindow(fl_display, fl_screen), w, h, fl_visual->depth) -# define fl_create_offscreen_with_alpha(w,h) XCreatePixmap(fl_display, RootWindow(fl_display, fl_screen), w, h, 32) -// begin/end are macros that save the old state in local variables: -# define fl_begin_offscreen(pixmap) \ - Window _sw=fl_window; fl_window=pixmap; \ - Fl_Surface_Device *_ss = Fl_Surface_Device::surface(); Fl_Display_Device::display_device()->set_current(); \ - fl_push_no_clip() -# define fl_end_offscreen() \ - fl_pop_clip(); fl_window = _sw; _ss->set_current() - -extern FL_EXPORT void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); -# define fl_delete_offscreen(pixmap) XFreePixmap(fl_display, pixmap) - -// Bitmap masks -typedef ulong Fl_Bitmask; - -extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); -extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); -extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm); - -#if defined(FL_LIBRARY) || defined(FL_INTERNALS) -extern FL_EXPORT Window fl_message_window; -extern FL_EXPORT void *fl_xftfont; -FL_EXPORT Fl_Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.cxx - -// access to core fonts: -// This class provides a "smart pointer" that returns a pointer to an XFontStruct. -// The global variable fl_xfont can be called wherever a bitmap "core" font is -// needed, e.g. when rendering to a GL context under X11. -// With Xlib / X11 fonts, fl_xfont will return the current selected font. -// With XFT / X11 fonts, fl_xfont will attempt to return the bitmap "core" font most -// similar to (usually the same as) the current XFT font. -class Fl_XFont_On_Demand -{ -public: - Fl_XFont_On_Demand(XFontStruct* p = NULL) : ptr(p) { } - Fl_XFont_On_Demand& operator=(const Fl_XFont_On_Demand& x) - { ptr = x.ptr; return *this; } - Fl_XFont_On_Demand& operator=(XFontStruct* p) - { ptr = p; return *this; } - XFontStruct* value(); - operator XFontStruct*() { return value(); } - XFontStruct& operator*() { return *value(); } - XFontStruct* operator->() { return value(); } - bool operator==(const Fl_XFont_On_Demand& x) { return ptr == x.ptr; } - bool operator!=(const Fl_XFont_On_Demand& x) { return ptr != x.ptr; } -private: - XFontStruct *ptr; -}; -extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; -extern FL_EXPORT XFontStruct* fl_X_core_font(); - -// this object contains all X-specific stuff about a window: -// Warning: this object is highly subject to change! -// FL_LIBRARY or FL_INTERNALS must be defined to access this class. -class FL_EXPORT Fl_X { -public: - Window xid; - Window other_xid; - Fl_Window *w; - Fl_Region region; - Fl_X *next; - char wait_for_expose; - char backbuffer_bad; // used for XDBE - static Fl_X* first; - static Fl_X* i(const Fl_Window* wi) {return wi->i;} - void setwindow(Fl_Window* wi) {w=wi; wi->i=this;} - void sendxjunk(); - static void set_default_icons(const Fl_RGB_Image*[], int); - void set_icons(); - int set_cursor(Fl_Cursor); - int set_cursor(const Fl_RGB_Image*, int, int); - static void make_xid(Fl_Window*,XVisualInfo* =fl_visual, Colormap=fl_colormap); - static Fl_X* set_xid(Fl_Window*, Window); - // kludges to get around protection: - void flush() {w->flush();} - static void x(Fl_Window* wi, int X) {wi->x(X);} - static void y(Fl_Window* wi, int Y) {wi->y(Y);} - static int ewmh_supported(); - static int xrender_supported(); - static void activate_window(Window w); -}; - -extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid() -extern FL_EXPORT int fl_background_pixel; // hack into Fl_X::make_xid() - -inline Window fl_xid(const Fl_Window* w) { Fl_X *xTemp = Fl_X::i(w); return xTemp ? xTemp->xid : 0; } - -#else - -extern FL_EXPORT Window fl_xid_(const Fl_Window* w); -#define fl_xid(w) fl_xid_(w) - -#endif // FL_LIBRARY || FL_INTERNALS - -FL_EXPORT Fl_Window* fl_find(Window xid); - - -// Dummy function to register a function for opening files via the window manager... -inline void fl_open_callback(void (*)(const char *)) {} - -extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); - -# endif -#endif - -// -// End of "$Id$". -// diff --git a/msvc/fltk/lib/x64/fltk.lib b/msvc/fltk/lib/x64/fltk.lib deleted file mode 100644 index 9ace5247..00000000 Binary files a/msvc/fltk/lib/x64/fltk.lib and /dev/null differ diff --git a/msvc/fltk/lib/x86/fltk.lib b/msvc/fltk/lib/x86/fltk.lib deleted file mode 100644 index bc36995f..00000000 Binary files a/msvc/fltk/lib/x86/fltk.lib and /dev/null differ diff --git a/msvc/freetype/README.md b/msvc/freetype/README.md deleted file mode 100644 index 59b882f7..00000000 --- a/msvc/freetype/README.md +++ /dev/null @@ -1,15 +0,0 @@ -FreeType 2.10.0 -========================= -###### Windows binaries (DLL) of FreeType (win32/win64) - -Compiled with VS Express 2015 -Compatible with Windows XP, Vista, 7, 8, 10 - -> *freetype.dll* uses the *Universal CRT* and therefore **_requires_** Visual C++ 2017 Redistributable to be present on system (*VC++ 2017 Redistributable supersedes VC++ 2015 Redistributable*). - -| filename | sha256 | -| :-- | :-- | -| win32\\**freetype.dll** | `D039F727E82A4570883DBA2069F9DD95518BA580F16F891FCC5FD6C07624BF35` | -| win32\\**freetype.lib** | `28B2D11BC7A4648696C96675771A32AEFE33FC7D13E83A416AB0CCD30CA7B79F` | -| win64\\**freetype.dll** | `58AAE1F69EA5C2ADCA3CF0314D01E14353F674755B9D1098C1EBBF478207B672` | -| win64\\**freetype.lib** | `158C6FEF7BD18028034AE2E5405CA118EA0476B7298935560D7D7A7730D6390E` | diff --git a/msvc/freetype/win64/freetype.lib b/msvc/freetype/win64/freetype.lib deleted file mode 100644 index 7f41f445..00000000 Binary files a/msvc/freetype/win64/freetype.lib and /dev/null differ diff --git a/msvc/msvc2003/CSE2.sln b/msvc2003/CSE2.sln similarity index 100% rename from msvc/msvc2003/CSE2.sln rename to msvc2003/CSE2.sln diff --git a/msvc/msvc2003/CSE2.vcproj b/msvc2003/CSE2.vcproj similarity index 59% rename from msvc/msvc2003/CSE2.vcproj rename to msvc2003/CSE2.vcproj index e49882f0..5e6abf9f 100644 --- a/msvc/msvc2003/CSE2.vcproj +++ b/msvc2003/CSE2.vcproj @@ -21,7 +21,7 @@ + RelativePath="..\src\ArmsItem.cpp"> + RelativePath="..\src\Back.cpp"> + RelativePath="..\src\Boss.cpp"> + RelativePath="..\src\BossAlmo1.cpp"> + RelativePath="..\src\BossAlmo2.cpp"> + RelativePath="..\src\BossBallos.cpp"> + RelativePath="..\src\BossFrog.cpp"> + RelativePath="..\src\BossIronH.cpp"> + RelativePath="..\src\BossLife.cpp"> + RelativePath="..\src\BossOhm.cpp"> + RelativePath="..\src\BossPress.cpp"> + RelativePath="..\src\BossTwinD.cpp"> + RelativePath="..\src\BossX.cpp"> + RelativePath="..\src\BulHit.cpp"> + RelativePath="..\src\Bullet.cpp"> + RelativePath="..\src\Caret.cpp"> + RelativePath="..\src\Config.cpp"> + RelativePath="..\src\Draw.cpp"> + RelativePath="..\src\Ending.cpp"> + RelativePath="..\src\Escape.cpp"> + RelativePath="..\src\Fade.cpp"> + RelativePath="..\src\File.cpp"> + RelativePath="..\src\Flags.cpp"> + RelativePath="..\src\Flash.cpp"> + RelativePath="..\src\Font.cpp"> + RelativePath="..\src\Frame.cpp"> + RelativePath="..\src\Game.cpp"> + RelativePath="..\src\Generic.cpp"> + RelativePath="..\src\GenericLoad.cpp"> + RelativePath="..\src\Input.cpp"> + RelativePath="..\src\KeyControl.cpp"> + RelativePath="..\src\Main.cpp"> + RelativePath="..\src\Map.cpp"> + RelativePath="..\src\MapName.cpp"> + RelativePath="..\src\MiniMap.cpp"> + RelativePath="..\src\MyChar.cpp"> + RelativePath="..\src\MycHit.cpp"> + RelativePath="..\src\MycParam.cpp"> + RelativePath="..\src\NpcAct000.cpp"> + RelativePath="..\src\NpcAct020.cpp"> + RelativePath="..\src\NpcAct040.cpp"> + RelativePath="..\src\NpcAct060.cpp"> + RelativePath="..\src\NpcAct080.cpp"> + RelativePath="..\src\NpcAct100.cpp"> + RelativePath="..\src\NpcAct120.cpp"> + RelativePath="..\src\NpcAct140.cpp"> + RelativePath="..\src\NpcAct160.cpp"> + RelativePath="..\src\NpcAct180.cpp"> + RelativePath="..\src\NpcAct200.cpp"> + RelativePath="..\src\NpcAct220.cpp"> + RelativePath="..\src\NpcAct240.cpp"> + RelativePath="..\src\NpcAct260.cpp"> + RelativePath="..\src\NpcAct280.cpp"> + RelativePath="..\src\NpcAct300.cpp"> + RelativePath="..\src\NpcAct320.cpp"> + RelativePath="..\src\NpcAct340.cpp"> + RelativePath="..\src\NpChar.cpp"> + RelativePath="..\src\NpcHit.cpp"> + RelativePath="..\src\NpcTbl.cpp"> + RelativePath="..\src\Organya.cpp"> + RelativePath="..\src\PixTone.cpp"> + RelativePath="..\src\Profile.cpp"> + RelativePath="..\src\Resource.cpp"> + RelativePath="..\src\SelStage.cpp"> + RelativePath="..\src\Shoot.cpp"> + RelativePath="..\src\Sound.cpp"> + RelativePath="..\src\Stage.cpp"> + RelativePath="..\src\Star.cpp"> + RelativePath="..\src\TextScr.cpp"> + RelativePath="..\src\Triangle.cpp"> + RelativePath="..\src\ValueView.cpp"> + RelativePath="..\src\ArmsItem.h"> + RelativePath="..\src\Back.h"> + RelativePath="..\src\Boss.h"> + RelativePath="..\src\BossAlmo1.h"> + RelativePath="..\src\BossAlmo2.h"> + RelativePath="..\src\BossBallos.h"> + RelativePath="..\src\BossFrog.h"> + RelativePath="..\src\BossIronH.h"> + RelativePath="..\src\BossLife.h"> + RelativePath="..\src\BossOhm.h"> + RelativePath="..\src\BossPress.h"> + RelativePath="..\src\BossTwinD.h"> + RelativePath="..\src\BossX.h"> + RelativePath="..\src\BulHit.h"> + RelativePath="..\src\Bullet.h"> + RelativePath="..\src\Caret.h"> + RelativePath="..\src\CommonDefines.h"> + RelativePath="..\src\Config.h"> + RelativePath="..\src\Draw.h"> + RelativePath="..\src\Ending.h"> + RelativePath="..\src\Escape.h"> + RelativePath="..\src\Fade.h"> + RelativePath="..\src\File.h"> + RelativePath="..\src\Flags.h"> + RelativePath="..\src\Flash.h"> + RelativePath="..\src\Font.h"> + RelativePath="..\src\Frame.h"> + RelativePath="..\src\Game.h"> + RelativePath="..\src\Generic.h"> + RelativePath="..\src\GenericLoad.h"> + RelativePath="..\src\Input.h"> + RelativePath="..\src\KeyControl.h"> + RelativePath="..\src\Main.h"> + RelativePath="..\src\Map.h"> + RelativePath="..\src\MapName.h"> + RelativePath="..\src\MiniMap.h"> + RelativePath="..\src\MyChar.h"> + RelativePath="..\src\MycHit.h"> + RelativePath="..\src\MycParam.h"> + RelativePath="..\src\NpcAct.h"> + RelativePath="..\src\NpChar.h"> + RelativePath="..\src\NpcHit.h"> + RelativePath="..\src\NpcTbl.h"> + RelativePath="..\src\Organya.h"> + RelativePath="..\src\PixTone.h"> + RelativePath="..\src\Profile.h"> + RelativePath="..\src\Resource.h"> + RelativePath="..\src\SelStage.h"> + RelativePath="..\src\Shoot.h"> + RelativePath="..\src\Sound.h"> + RelativePath="..\src\Stage.h"> + RelativePath="..\src\Star.h"> + RelativePath="..\src\Tags.h"> + RelativePath="..\src\TextScr.h"> + RelativePath="..\src\Triangle.h"> + RelativePath="..\src\Types.h"> + RelativePath="..\src\ValueView.h"> + RelativePath="..\src\WindowsWrapper.h"> + RelativePath="..\res\Icon\ICON.rc"> diff --git a/msvc/SDL2/BUGS.txt b/msvc2003/SDL2/BUGS.txt similarity index 100% rename from msvc/SDL2/BUGS.txt rename to msvc2003/SDL2/BUGS.txt diff --git a/msvc/SDL2/COPYING.txt b/msvc2003/SDL2/COPYING.txt similarity index 100% rename from msvc/SDL2/COPYING.txt rename to msvc2003/SDL2/COPYING.txt diff --git a/msvc/SDL2/README-SDL.txt b/msvc2003/SDL2/README-SDL.txt similarity index 100% rename from msvc/SDL2/README-SDL.txt rename to msvc2003/SDL2/README-SDL.txt diff --git a/msvc/SDL2/README.txt b/msvc2003/SDL2/README.txt similarity index 100% rename from msvc/SDL2/README.txt rename to msvc2003/SDL2/README.txt diff --git a/msvc/SDL2/WhatsNew.txt b/msvc2003/SDL2/WhatsNew.txt similarity index 100% rename from msvc/SDL2/WhatsNew.txt rename to msvc2003/SDL2/WhatsNew.txt diff --git a/msvc/SDL2/include/SDL.h b/msvc2003/SDL2/include/SDL.h similarity index 100% rename from msvc/SDL2/include/SDL.h rename to msvc2003/SDL2/include/SDL.h diff --git a/msvc/SDL2/include/SDL_assert.h b/msvc2003/SDL2/include/SDL_assert.h similarity index 100% rename from msvc/SDL2/include/SDL_assert.h rename to msvc2003/SDL2/include/SDL_assert.h diff --git a/msvc/SDL2/include/SDL_atomic.h b/msvc2003/SDL2/include/SDL_atomic.h similarity index 100% rename from msvc/SDL2/include/SDL_atomic.h rename to msvc2003/SDL2/include/SDL_atomic.h diff --git a/msvc/SDL2/include/SDL_audio.h b/msvc2003/SDL2/include/SDL_audio.h similarity index 100% rename from msvc/SDL2/include/SDL_audio.h rename to msvc2003/SDL2/include/SDL_audio.h diff --git a/msvc/SDL2/include/SDL_bits.h b/msvc2003/SDL2/include/SDL_bits.h similarity index 100% rename from msvc/SDL2/include/SDL_bits.h rename to msvc2003/SDL2/include/SDL_bits.h diff --git a/msvc/SDL2/include/SDL_blendmode.h b/msvc2003/SDL2/include/SDL_blendmode.h similarity index 100% rename from msvc/SDL2/include/SDL_blendmode.h rename to msvc2003/SDL2/include/SDL_blendmode.h diff --git a/msvc/SDL2/include/SDL_clipboard.h b/msvc2003/SDL2/include/SDL_clipboard.h similarity index 100% rename from msvc/SDL2/include/SDL_clipboard.h rename to msvc2003/SDL2/include/SDL_clipboard.h diff --git a/msvc/SDL2/include/SDL_config.h b/msvc2003/SDL2/include/SDL_config.h similarity index 100% rename from msvc/SDL2/include/SDL_config.h rename to msvc2003/SDL2/include/SDL_config.h diff --git a/msvc/SDL2/include/SDL_config.h.cmake b/msvc2003/SDL2/include/SDL_config.h.cmake similarity index 100% rename from msvc/SDL2/include/SDL_config.h.cmake rename to msvc2003/SDL2/include/SDL_config.h.cmake diff --git a/msvc/SDL2/include/SDL_config.h.in b/msvc2003/SDL2/include/SDL_config.h.in similarity index 100% rename from msvc/SDL2/include/SDL_config.h.in rename to msvc2003/SDL2/include/SDL_config.h.in diff --git a/msvc/SDL2/include/SDL_config_android.h b/msvc2003/SDL2/include/SDL_config_android.h similarity index 100% rename from msvc/SDL2/include/SDL_config_android.h rename to msvc2003/SDL2/include/SDL_config_android.h diff --git a/msvc/SDL2/include/SDL_config_iphoneos.h b/msvc2003/SDL2/include/SDL_config_iphoneos.h similarity index 100% rename from msvc/SDL2/include/SDL_config_iphoneos.h rename to msvc2003/SDL2/include/SDL_config_iphoneos.h diff --git a/msvc/SDL2/include/SDL_config_macosx.h b/msvc2003/SDL2/include/SDL_config_macosx.h similarity index 100% rename from msvc/SDL2/include/SDL_config_macosx.h rename to msvc2003/SDL2/include/SDL_config_macosx.h diff --git a/msvc/SDL2/include/SDL_config_macosx.h.orig b/msvc2003/SDL2/include/SDL_config_macosx.h.orig similarity index 100% rename from msvc/SDL2/include/SDL_config_macosx.h.orig rename to msvc2003/SDL2/include/SDL_config_macosx.h.orig diff --git a/msvc/SDL2/include/SDL_config_minimal.h b/msvc2003/SDL2/include/SDL_config_minimal.h similarity index 100% rename from msvc/SDL2/include/SDL_config_minimal.h rename to msvc2003/SDL2/include/SDL_config_minimal.h diff --git a/msvc/SDL2/include/SDL_config_pandora.h b/msvc2003/SDL2/include/SDL_config_pandora.h similarity index 100% rename from msvc/SDL2/include/SDL_config_pandora.h rename to msvc2003/SDL2/include/SDL_config_pandora.h diff --git a/msvc/SDL2/include/SDL_config_psp.h b/msvc2003/SDL2/include/SDL_config_psp.h similarity index 100% rename from msvc/SDL2/include/SDL_config_psp.h rename to msvc2003/SDL2/include/SDL_config_psp.h diff --git a/msvc/SDL2/include/SDL_config_windows.h b/msvc2003/SDL2/include/SDL_config_windows.h similarity index 100% rename from msvc/SDL2/include/SDL_config_windows.h rename to msvc2003/SDL2/include/SDL_config_windows.h diff --git a/msvc/SDL2/include/SDL_config_winrt.h b/msvc2003/SDL2/include/SDL_config_winrt.h similarity index 100% rename from msvc/SDL2/include/SDL_config_winrt.h rename to msvc2003/SDL2/include/SDL_config_winrt.h diff --git a/msvc/SDL2/include/SDL_config_wiz.h b/msvc2003/SDL2/include/SDL_config_wiz.h similarity index 100% rename from msvc/SDL2/include/SDL_config_wiz.h rename to msvc2003/SDL2/include/SDL_config_wiz.h diff --git a/msvc/SDL2/include/SDL_copying.h b/msvc2003/SDL2/include/SDL_copying.h similarity index 100% rename from msvc/SDL2/include/SDL_copying.h rename to msvc2003/SDL2/include/SDL_copying.h diff --git a/msvc/SDL2/include/SDL_cpuinfo.h b/msvc2003/SDL2/include/SDL_cpuinfo.h similarity index 100% rename from msvc/SDL2/include/SDL_cpuinfo.h rename to msvc2003/SDL2/include/SDL_cpuinfo.h diff --git a/msvc/SDL2/include/SDL_egl.h b/msvc2003/SDL2/include/SDL_egl.h similarity index 100% rename from msvc/SDL2/include/SDL_egl.h rename to msvc2003/SDL2/include/SDL_egl.h diff --git a/msvc/SDL2/include/SDL_endian.h b/msvc2003/SDL2/include/SDL_endian.h similarity index 100% rename from msvc/SDL2/include/SDL_endian.h rename to msvc2003/SDL2/include/SDL_endian.h diff --git a/msvc/SDL2/include/SDL_error.h b/msvc2003/SDL2/include/SDL_error.h similarity index 100% rename from msvc/SDL2/include/SDL_error.h rename to msvc2003/SDL2/include/SDL_error.h diff --git a/msvc/SDL2/include/SDL_events.h b/msvc2003/SDL2/include/SDL_events.h similarity index 100% rename from msvc/SDL2/include/SDL_events.h rename to msvc2003/SDL2/include/SDL_events.h diff --git a/msvc/SDL2/include/SDL_filesystem.h b/msvc2003/SDL2/include/SDL_filesystem.h similarity index 100% rename from msvc/SDL2/include/SDL_filesystem.h rename to msvc2003/SDL2/include/SDL_filesystem.h diff --git a/msvc/SDL2/include/SDL_gamecontroller.h b/msvc2003/SDL2/include/SDL_gamecontroller.h similarity index 100% rename from msvc/SDL2/include/SDL_gamecontroller.h rename to msvc2003/SDL2/include/SDL_gamecontroller.h diff --git a/msvc/SDL2/include/SDL_gesture.h b/msvc2003/SDL2/include/SDL_gesture.h similarity index 100% rename from msvc/SDL2/include/SDL_gesture.h rename to msvc2003/SDL2/include/SDL_gesture.h diff --git a/msvc/SDL2/include/SDL_haptic.h b/msvc2003/SDL2/include/SDL_haptic.h similarity index 100% rename from msvc/SDL2/include/SDL_haptic.h rename to msvc2003/SDL2/include/SDL_haptic.h diff --git a/msvc/SDL2/include/SDL_hints.h b/msvc2003/SDL2/include/SDL_hints.h similarity index 100% rename from msvc/SDL2/include/SDL_hints.h rename to msvc2003/SDL2/include/SDL_hints.h diff --git a/msvc/SDL2/include/SDL_joystick.h b/msvc2003/SDL2/include/SDL_joystick.h similarity index 100% rename from msvc/SDL2/include/SDL_joystick.h rename to msvc2003/SDL2/include/SDL_joystick.h diff --git a/msvc/SDL2/include/SDL_keyboard.h b/msvc2003/SDL2/include/SDL_keyboard.h similarity index 100% rename from msvc/SDL2/include/SDL_keyboard.h rename to msvc2003/SDL2/include/SDL_keyboard.h diff --git a/msvc/SDL2/include/SDL_keycode.h b/msvc2003/SDL2/include/SDL_keycode.h similarity index 100% rename from msvc/SDL2/include/SDL_keycode.h rename to msvc2003/SDL2/include/SDL_keycode.h diff --git a/msvc/SDL2/include/SDL_loadso.h b/msvc2003/SDL2/include/SDL_loadso.h similarity index 100% rename from msvc/SDL2/include/SDL_loadso.h rename to msvc2003/SDL2/include/SDL_loadso.h diff --git a/msvc/SDL2/include/SDL_log.h b/msvc2003/SDL2/include/SDL_log.h similarity index 100% rename from msvc/SDL2/include/SDL_log.h rename to msvc2003/SDL2/include/SDL_log.h diff --git a/msvc/SDL2/include/SDL_main.h b/msvc2003/SDL2/include/SDL_main.h similarity index 100% rename from msvc/SDL2/include/SDL_main.h rename to msvc2003/SDL2/include/SDL_main.h diff --git a/msvc/SDL2/include/SDL_messagebox.h b/msvc2003/SDL2/include/SDL_messagebox.h similarity index 100% rename from msvc/SDL2/include/SDL_messagebox.h rename to msvc2003/SDL2/include/SDL_messagebox.h diff --git a/msvc/SDL2/include/SDL_mouse.h b/msvc2003/SDL2/include/SDL_mouse.h similarity index 100% rename from msvc/SDL2/include/SDL_mouse.h rename to msvc2003/SDL2/include/SDL_mouse.h diff --git a/msvc/SDL2/include/SDL_mutex.h b/msvc2003/SDL2/include/SDL_mutex.h similarity index 100% rename from msvc/SDL2/include/SDL_mutex.h rename to msvc2003/SDL2/include/SDL_mutex.h diff --git a/msvc/SDL2/include/SDL_name.h b/msvc2003/SDL2/include/SDL_name.h similarity index 100% rename from msvc/SDL2/include/SDL_name.h rename to msvc2003/SDL2/include/SDL_name.h diff --git a/msvc/SDL2/include/SDL_opengl.h b/msvc2003/SDL2/include/SDL_opengl.h similarity index 100% rename from msvc/SDL2/include/SDL_opengl.h rename to msvc2003/SDL2/include/SDL_opengl.h diff --git a/msvc/SDL2/include/SDL_opengl_glext.h b/msvc2003/SDL2/include/SDL_opengl_glext.h similarity index 100% rename from msvc/SDL2/include/SDL_opengl_glext.h rename to msvc2003/SDL2/include/SDL_opengl_glext.h diff --git a/msvc/SDL2/include/SDL_opengles.h b/msvc2003/SDL2/include/SDL_opengles.h similarity index 100% rename from msvc/SDL2/include/SDL_opengles.h rename to msvc2003/SDL2/include/SDL_opengles.h diff --git a/msvc/SDL2/include/SDL_opengles2.h b/msvc2003/SDL2/include/SDL_opengles2.h similarity index 100% rename from msvc/SDL2/include/SDL_opengles2.h rename to msvc2003/SDL2/include/SDL_opengles2.h diff --git a/msvc/SDL2/include/SDL_opengles2_gl2.h b/msvc2003/SDL2/include/SDL_opengles2_gl2.h similarity index 100% rename from msvc/SDL2/include/SDL_opengles2_gl2.h rename to msvc2003/SDL2/include/SDL_opengles2_gl2.h diff --git a/msvc/SDL2/include/SDL_opengles2_gl2ext.h b/msvc2003/SDL2/include/SDL_opengles2_gl2ext.h similarity index 100% rename from msvc/SDL2/include/SDL_opengles2_gl2ext.h rename to msvc2003/SDL2/include/SDL_opengles2_gl2ext.h diff --git a/msvc/SDL2/include/SDL_opengles2_gl2platform.h b/msvc2003/SDL2/include/SDL_opengles2_gl2platform.h similarity index 100% rename from msvc/SDL2/include/SDL_opengles2_gl2platform.h rename to msvc2003/SDL2/include/SDL_opengles2_gl2platform.h diff --git a/msvc/SDL2/include/SDL_opengles2_khrplatform.h b/msvc2003/SDL2/include/SDL_opengles2_khrplatform.h similarity index 100% rename from msvc/SDL2/include/SDL_opengles2_khrplatform.h rename to msvc2003/SDL2/include/SDL_opengles2_khrplatform.h diff --git a/msvc/SDL2/include/SDL_pixels.h b/msvc2003/SDL2/include/SDL_pixels.h similarity index 100% rename from msvc/SDL2/include/SDL_pixels.h rename to msvc2003/SDL2/include/SDL_pixels.h diff --git a/msvc/SDL2/include/SDL_platform.h b/msvc2003/SDL2/include/SDL_platform.h similarity index 100% rename from msvc/SDL2/include/SDL_platform.h rename to msvc2003/SDL2/include/SDL_platform.h diff --git a/msvc/SDL2/include/SDL_power.h b/msvc2003/SDL2/include/SDL_power.h similarity index 100% rename from msvc/SDL2/include/SDL_power.h rename to msvc2003/SDL2/include/SDL_power.h diff --git a/msvc/SDL2/include/SDL_quit.h b/msvc2003/SDL2/include/SDL_quit.h similarity index 100% rename from msvc/SDL2/include/SDL_quit.h rename to msvc2003/SDL2/include/SDL_quit.h diff --git a/msvc/SDL2/include/SDL_rect.h b/msvc2003/SDL2/include/SDL_rect.h similarity index 100% rename from msvc/SDL2/include/SDL_rect.h rename to msvc2003/SDL2/include/SDL_rect.h diff --git a/msvc/SDL2/include/SDL_render.h b/msvc2003/SDL2/include/SDL_render.h similarity index 100% rename from msvc/SDL2/include/SDL_render.h rename to msvc2003/SDL2/include/SDL_render.h diff --git a/msvc/SDL2/include/SDL_revision.h b/msvc2003/SDL2/include/SDL_revision.h similarity index 100% rename from msvc/SDL2/include/SDL_revision.h rename to msvc2003/SDL2/include/SDL_revision.h diff --git a/msvc/SDL2/include/SDL_rwops.h b/msvc2003/SDL2/include/SDL_rwops.h similarity index 100% rename from msvc/SDL2/include/SDL_rwops.h rename to msvc2003/SDL2/include/SDL_rwops.h diff --git a/msvc/SDL2/include/SDL_scancode.h b/msvc2003/SDL2/include/SDL_scancode.h similarity index 100% rename from msvc/SDL2/include/SDL_scancode.h rename to msvc2003/SDL2/include/SDL_scancode.h diff --git a/msvc/SDL2/include/SDL_sensor.h b/msvc2003/SDL2/include/SDL_sensor.h similarity index 100% rename from msvc/SDL2/include/SDL_sensor.h rename to msvc2003/SDL2/include/SDL_sensor.h diff --git a/msvc/SDL2/include/SDL_shape.h b/msvc2003/SDL2/include/SDL_shape.h similarity index 100% rename from msvc/SDL2/include/SDL_shape.h rename to msvc2003/SDL2/include/SDL_shape.h diff --git a/msvc/SDL2/include/SDL_stdinc.h b/msvc2003/SDL2/include/SDL_stdinc.h similarity index 100% rename from msvc/SDL2/include/SDL_stdinc.h rename to msvc2003/SDL2/include/SDL_stdinc.h diff --git a/msvc/SDL2/include/SDL_surface.h b/msvc2003/SDL2/include/SDL_surface.h similarity index 100% rename from msvc/SDL2/include/SDL_surface.h rename to msvc2003/SDL2/include/SDL_surface.h diff --git a/msvc/SDL2/include/SDL_system.h b/msvc2003/SDL2/include/SDL_system.h similarity index 100% rename from msvc/SDL2/include/SDL_system.h rename to msvc2003/SDL2/include/SDL_system.h diff --git a/msvc/SDL2/include/SDL_syswm.h b/msvc2003/SDL2/include/SDL_syswm.h similarity index 100% rename from msvc/SDL2/include/SDL_syswm.h rename to msvc2003/SDL2/include/SDL_syswm.h diff --git a/msvc/SDL2/include/SDL_test.h b/msvc2003/SDL2/include/SDL_test.h similarity index 100% rename from msvc/SDL2/include/SDL_test.h rename to msvc2003/SDL2/include/SDL_test.h diff --git a/msvc/SDL2/include/SDL_test_assert.h b/msvc2003/SDL2/include/SDL_test_assert.h similarity index 100% rename from msvc/SDL2/include/SDL_test_assert.h rename to msvc2003/SDL2/include/SDL_test_assert.h diff --git a/msvc/SDL2/include/SDL_test_common.h b/msvc2003/SDL2/include/SDL_test_common.h similarity index 100% rename from msvc/SDL2/include/SDL_test_common.h rename to msvc2003/SDL2/include/SDL_test_common.h diff --git a/msvc/SDL2/include/SDL_test_compare.h b/msvc2003/SDL2/include/SDL_test_compare.h similarity index 100% rename from msvc/SDL2/include/SDL_test_compare.h rename to msvc2003/SDL2/include/SDL_test_compare.h diff --git a/msvc/SDL2/include/SDL_test_crc32.h b/msvc2003/SDL2/include/SDL_test_crc32.h similarity index 100% rename from msvc/SDL2/include/SDL_test_crc32.h rename to msvc2003/SDL2/include/SDL_test_crc32.h diff --git a/msvc/SDL2/include/SDL_test_font.h b/msvc2003/SDL2/include/SDL_test_font.h similarity index 100% rename from msvc/SDL2/include/SDL_test_font.h rename to msvc2003/SDL2/include/SDL_test_font.h diff --git a/msvc/SDL2/include/SDL_test_fuzzer.h b/msvc2003/SDL2/include/SDL_test_fuzzer.h similarity index 100% rename from msvc/SDL2/include/SDL_test_fuzzer.h rename to msvc2003/SDL2/include/SDL_test_fuzzer.h diff --git a/msvc/SDL2/include/SDL_test_harness.h b/msvc2003/SDL2/include/SDL_test_harness.h similarity index 100% rename from msvc/SDL2/include/SDL_test_harness.h rename to msvc2003/SDL2/include/SDL_test_harness.h diff --git a/msvc/SDL2/include/SDL_test_images.h b/msvc2003/SDL2/include/SDL_test_images.h similarity index 100% rename from msvc/SDL2/include/SDL_test_images.h rename to msvc2003/SDL2/include/SDL_test_images.h diff --git a/msvc/SDL2/include/SDL_test_log.h b/msvc2003/SDL2/include/SDL_test_log.h similarity index 100% rename from msvc/SDL2/include/SDL_test_log.h rename to msvc2003/SDL2/include/SDL_test_log.h diff --git a/msvc/SDL2/include/SDL_test_md5.h b/msvc2003/SDL2/include/SDL_test_md5.h similarity index 100% rename from msvc/SDL2/include/SDL_test_md5.h rename to msvc2003/SDL2/include/SDL_test_md5.h diff --git a/msvc/SDL2/include/SDL_test_memory.h b/msvc2003/SDL2/include/SDL_test_memory.h similarity index 100% rename from msvc/SDL2/include/SDL_test_memory.h rename to msvc2003/SDL2/include/SDL_test_memory.h diff --git a/msvc/SDL2/include/SDL_test_random.h b/msvc2003/SDL2/include/SDL_test_random.h similarity index 100% rename from msvc/SDL2/include/SDL_test_random.h rename to msvc2003/SDL2/include/SDL_test_random.h diff --git a/msvc/SDL2/include/SDL_thread.h b/msvc2003/SDL2/include/SDL_thread.h similarity index 100% rename from msvc/SDL2/include/SDL_thread.h rename to msvc2003/SDL2/include/SDL_thread.h diff --git a/msvc/SDL2/include/SDL_timer.h b/msvc2003/SDL2/include/SDL_timer.h similarity index 100% rename from msvc/SDL2/include/SDL_timer.h rename to msvc2003/SDL2/include/SDL_timer.h diff --git a/msvc/SDL2/include/SDL_touch.h b/msvc2003/SDL2/include/SDL_touch.h similarity index 100% rename from msvc/SDL2/include/SDL_touch.h rename to msvc2003/SDL2/include/SDL_touch.h diff --git a/msvc/SDL2/include/SDL_types.h b/msvc2003/SDL2/include/SDL_types.h similarity index 100% rename from msvc/SDL2/include/SDL_types.h rename to msvc2003/SDL2/include/SDL_types.h diff --git a/msvc/SDL2/include/SDL_version.h b/msvc2003/SDL2/include/SDL_version.h similarity index 100% rename from msvc/SDL2/include/SDL_version.h rename to msvc2003/SDL2/include/SDL_version.h diff --git a/msvc/SDL2/include/SDL_video.h b/msvc2003/SDL2/include/SDL_video.h similarity index 100% rename from msvc/SDL2/include/SDL_video.h rename to msvc2003/SDL2/include/SDL_video.h diff --git a/msvc/SDL2/include/SDL_vulkan.h b/msvc2003/SDL2/include/SDL_vulkan.h similarity index 100% rename from msvc/SDL2/include/SDL_vulkan.h rename to msvc2003/SDL2/include/SDL_vulkan.h diff --git a/msvc/SDL2/include/begin_code.h b/msvc2003/SDL2/include/begin_code.h similarity index 100% rename from msvc/SDL2/include/begin_code.h rename to msvc2003/SDL2/include/begin_code.h diff --git a/msvc/SDL2/include/close_code.h b/msvc2003/SDL2/include/close_code.h similarity index 100% rename from msvc/SDL2/include/close_code.h rename to msvc2003/SDL2/include/close_code.h diff --git a/msvc/SDL2/lib/x86/SDL2.dll b/msvc2003/SDL2/lib/SDL2.dll similarity index 100% rename from msvc/SDL2/lib/x86/SDL2.dll rename to msvc2003/SDL2/lib/SDL2.dll diff --git a/msvc/SDL2/lib/x86/SDL2.lib b/msvc2003/SDL2/lib/SDL2.lib similarity index 100% rename from msvc/SDL2/lib/x86/SDL2.lib rename to msvc2003/SDL2/lib/SDL2.lib diff --git a/msvc/SDL2/lib/x86/SDL2main.lib b/msvc2003/SDL2/lib/SDL2main.lib similarity index 100% rename from msvc/SDL2/lib/x86/SDL2main.lib rename to msvc2003/SDL2/lib/SDL2main.lib diff --git a/msvc/SDL2/lib/x86/SDL2test.lib b/msvc2003/SDL2/lib/SDL2test.lib similarity index 100% rename from msvc/SDL2/lib/x86/SDL2test.lib rename to msvc2003/SDL2/lib/SDL2test.lib diff --git a/msvc/msvc2003/devilution/Doukutsu.exe b/msvc2003/devilution/Doukutsu.exe similarity index 100% rename from msvc/msvc2003/devilution/Doukutsu.exe rename to msvc2003/devilution/Doukutsu.exe diff --git a/msvc/msvc2003/devilution/comparer-config.toml b/msvc2003/devilution/comparer-config.toml similarity index 100% rename from msvc/msvc2003/devilution/comparer-config.toml rename to msvc2003/devilution/comparer-config.toml diff --git a/msvc/msvc2003/devilution/cvdump-LICENSE b/msvc2003/devilution/cvdump-LICENSE similarity index 100% rename from msvc/msvc2003/devilution/cvdump-LICENSE rename to msvc2003/devilution/cvdump-LICENSE diff --git a/msvc/msvc2003/devilution/cvdump.exe b/msvc2003/devilution/cvdump.exe similarity index 100% rename from msvc/msvc2003/devilution/cvdump.exe rename to msvc2003/devilution/cvdump.exe diff --git a/msvc/msvc2003/devilution/devilution-comparer.exe b/msvc2003/devilution/devilution-comparer.exe similarity index 100% rename from msvc/msvc2003/devilution/devilution-comparer.exe rename to msvc2003/devilution/devilution-comparer.exe diff --git a/msvc/freetype/FTL.TXT b/msvc2003/freetype/FTL.TXT similarity index 100% rename from msvc/freetype/FTL.TXT rename to msvc2003/freetype/FTL.TXT diff --git a/msvc/freetype/GPLv2.TXT b/msvc2003/freetype/GPLv2.TXT similarity index 100% rename from msvc/freetype/GPLv2.TXT rename to msvc2003/freetype/GPLv2.TXT diff --git a/msvc/freetype/LICENSE.TXT b/msvc2003/freetype/LICENSE.TXT similarity index 100% rename from msvc/freetype/LICENSE.TXT rename to msvc2003/freetype/LICENSE.TXT diff --git a/msvc2003/freetype/README.txt b/msvc2003/freetype/README.txt new file mode 100644 index 00000000..560dd07f --- /dev/null +++ b/msvc2003/freetype/README.txt @@ -0,0 +1 @@ +FreeType 2.10.0 built with MSVC2003 \ No newline at end of file diff --git a/msvc/freetype/include/freetype/config/ftconfig.h b/msvc2003/freetype/include/freetype/config/ftconfig.h similarity index 100% rename from msvc/freetype/include/freetype/config/ftconfig.h rename to msvc2003/freetype/include/freetype/config/ftconfig.h diff --git a/msvc/freetype/include/freetype/config/ftheader.h b/msvc2003/freetype/include/freetype/config/ftheader.h similarity index 100% rename from msvc/freetype/include/freetype/config/ftheader.h rename to msvc2003/freetype/include/freetype/config/ftheader.h diff --git a/msvc/freetype/include/freetype/config/ftmodule.h b/msvc2003/freetype/include/freetype/config/ftmodule.h similarity index 100% rename from msvc/freetype/include/freetype/config/ftmodule.h rename to msvc2003/freetype/include/freetype/config/ftmodule.h diff --git a/msvc/freetype/include/freetype/config/ftoption.h b/msvc2003/freetype/include/freetype/config/ftoption.h similarity index 100% rename from msvc/freetype/include/freetype/config/ftoption.h rename to msvc2003/freetype/include/freetype/config/ftoption.h diff --git a/msvc/freetype/include/freetype/config/ftstdlib.h b/msvc2003/freetype/include/freetype/config/ftstdlib.h similarity index 100% rename from msvc/freetype/include/freetype/config/ftstdlib.h rename to msvc2003/freetype/include/freetype/config/ftstdlib.h diff --git a/msvc/freetype/include/freetype/freetype.h b/msvc2003/freetype/include/freetype/freetype.h similarity index 100% rename from msvc/freetype/include/freetype/freetype.h rename to msvc2003/freetype/include/freetype/freetype.h diff --git a/msvc/freetype/include/freetype/ftadvanc.h b/msvc2003/freetype/include/freetype/ftadvanc.h similarity index 100% rename from msvc/freetype/include/freetype/ftadvanc.h rename to msvc2003/freetype/include/freetype/ftadvanc.h diff --git a/msvc/freetype/include/freetype/ftbbox.h b/msvc2003/freetype/include/freetype/ftbbox.h similarity index 100% rename from msvc/freetype/include/freetype/ftbbox.h rename to msvc2003/freetype/include/freetype/ftbbox.h diff --git a/msvc/freetype/include/freetype/ftbdf.h b/msvc2003/freetype/include/freetype/ftbdf.h similarity index 100% rename from msvc/freetype/include/freetype/ftbdf.h rename to msvc2003/freetype/include/freetype/ftbdf.h diff --git a/msvc/freetype/include/freetype/ftbitmap.h b/msvc2003/freetype/include/freetype/ftbitmap.h similarity index 100% rename from msvc/freetype/include/freetype/ftbitmap.h rename to msvc2003/freetype/include/freetype/ftbitmap.h diff --git a/msvc/freetype/include/freetype/ftbzip2.h b/msvc2003/freetype/include/freetype/ftbzip2.h similarity index 100% rename from msvc/freetype/include/freetype/ftbzip2.h rename to msvc2003/freetype/include/freetype/ftbzip2.h diff --git a/msvc/freetype/include/freetype/ftcache.h b/msvc2003/freetype/include/freetype/ftcache.h similarity index 100% rename from msvc/freetype/include/freetype/ftcache.h rename to msvc2003/freetype/include/freetype/ftcache.h diff --git a/msvc/freetype/include/freetype/ftchapters.h b/msvc2003/freetype/include/freetype/ftchapters.h similarity index 100% rename from msvc/freetype/include/freetype/ftchapters.h rename to msvc2003/freetype/include/freetype/ftchapters.h diff --git a/msvc/freetype/include/freetype/ftcid.h b/msvc2003/freetype/include/freetype/ftcid.h similarity index 100% rename from msvc/freetype/include/freetype/ftcid.h rename to msvc2003/freetype/include/freetype/ftcid.h diff --git a/msvc/freetype/include/freetype/ftcolor.h b/msvc2003/freetype/include/freetype/ftcolor.h similarity index 100% rename from msvc/freetype/include/freetype/ftcolor.h rename to msvc2003/freetype/include/freetype/ftcolor.h diff --git a/msvc/freetype/include/freetype/ftdriver.h b/msvc2003/freetype/include/freetype/ftdriver.h similarity index 100% rename from msvc/freetype/include/freetype/ftdriver.h rename to msvc2003/freetype/include/freetype/ftdriver.h diff --git a/msvc/freetype/include/freetype/fterrdef.h b/msvc2003/freetype/include/freetype/fterrdef.h similarity index 100% rename from msvc/freetype/include/freetype/fterrdef.h rename to msvc2003/freetype/include/freetype/fterrdef.h diff --git a/msvc/freetype/include/freetype/fterrors.h b/msvc2003/freetype/include/freetype/fterrors.h similarity index 100% rename from msvc/freetype/include/freetype/fterrors.h rename to msvc2003/freetype/include/freetype/fterrors.h diff --git a/msvc/freetype/include/freetype/ftfntfmt.h b/msvc2003/freetype/include/freetype/ftfntfmt.h similarity index 100% rename from msvc/freetype/include/freetype/ftfntfmt.h rename to msvc2003/freetype/include/freetype/ftfntfmt.h diff --git a/msvc/freetype/include/freetype/ftgasp.h b/msvc2003/freetype/include/freetype/ftgasp.h similarity index 100% rename from msvc/freetype/include/freetype/ftgasp.h rename to msvc2003/freetype/include/freetype/ftgasp.h diff --git a/msvc/freetype/include/freetype/ftglyph.h b/msvc2003/freetype/include/freetype/ftglyph.h similarity index 100% rename from msvc/freetype/include/freetype/ftglyph.h rename to msvc2003/freetype/include/freetype/ftglyph.h diff --git a/msvc/freetype/include/freetype/ftgxval.h b/msvc2003/freetype/include/freetype/ftgxval.h similarity index 100% rename from msvc/freetype/include/freetype/ftgxval.h rename to msvc2003/freetype/include/freetype/ftgxval.h diff --git a/msvc/freetype/include/freetype/ftgzip.h b/msvc2003/freetype/include/freetype/ftgzip.h similarity index 100% rename from msvc/freetype/include/freetype/ftgzip.h rename to msvc2003/freetype/include/freetype/ftgzip.h diff --git a/msvc/freetype/include/freetype/ftimage.h b/msvc2003/freetype/include/freetype/ftimage.h similarity index 100% rename from msvc/freetype/include/freetype/ftimage.h rename to msvc2003/freetype/include/freetype/ftimage.h diff --git a/msvc/freetype/include/freetype/ftincrem.h b/msvc2003/freetype/include/freetype/ftincrem.h similarity index 100% rename from msvc/freetype/include/freetype/ftincrem.h rename to msvc2003/freetype/include/freetype/ftincrem.h diff --git a/msvc/freetype/include/freetype/ftlcdfil.h b/msvc2003/freetype/include/freetype/ftlcdfil.h similarity index 100% rename from msvc/freetype/include/freetype/ftlcdfil.h rename to msvc2003/freetype/include/freetype/ftlcdfil.h diff --git a/msvc/freetype/include/freetype/ftlist.h b/msvc2003/freetype/include/freetype/ftlist.h similarity index 100% rename from msvc/freetype/include/freetype/ftlist.h rename to msvc2003/freetype/include/freetype/ftlist.h diff --git a/msvc/freetype/include/freetype/ftlzw.h b/msvc2003/freetype/include/freetype/ftlzw.h similarity index 100% rename from msvc/freetype/include/freetype/ftlzw.h rename to msvc2003/freetype/include/freetype/ftlzw.h diff --git a/msvc/freetype/include/freetype/ftmac.h b/msvc2003/freetype/include/freetype/ftmac.h similarity index 100% rename from msvc/freetype/include/freetype/ftmac.h rename to msvc2003/freetype/include/freetype/ftmac.h diff --git a/msvc/freetype/include/freetype/ftmm.h b/msvc2003/freetype/include/freetype/ftmm.h similarity index 100% rename from msvc/freetype/include/freetype/ftmm.h rename to msvc2003/freetype/include/freetype/ftmm.h diff --git a/msvc/freetype/include/freetype/ftmodapi.h b/msvc2003/freetype/include/freetype/ftmodapi.h similarity index 100% rename from msvc/freetype/include/freetype/ftmodapi.h rename to msvc2003/freetype/include/freetype/ftmodapi.h diff --git a/msvc/freetype/include/freetype/ftmoderr.h b/msvc2003/freetype/include/freetype/ftmoderr.h similarity index 100% rename from msvc/freetype/include/freetype/ftmoderr.h rename to msvc2003/freetype/include/freetype/ftmoderr.h diff --git a/msvc/freetype/include/freetype/ftotval.h b/msvc2003/freetype/include/freetype/ftotval.h similarity index 100% rename from msvc/freetype/include/freetype/ftotval.h rename to msvc2003/freetype/include/freetype/ftotval.h diff --git a/msvc/freetype/include/freetype/ftoutln.h b/msvc2003/freetype/include/freetype/ftoutln.h similarity index 100% rename from msvc/freetype/include/freetype/ftoutln.h rename to msvc2003/freetype/include/freetype/ftoutln.h diff --git a/msvc/freetype/include/freetype/ftparams.h b/msvc2003/freetype/include/freetype/ftparams.h similarity index 100% rename from msvc/freetype/include/freetype/ftparams.h rename to msvc2003/freetype/include/freetype/ftparams.h diff --git a/msvc/freetype/include/freetype/ftpfr.h b/msvc2003/freetype/include/freetype/ftpfr.h similarity index 100% rename from msvc/freetype/include/freetype/ftpfr.h rename to msvc2003/freetype/include/freetype/ftpfr.h diff --git a/msvc/freetype/include/freetype/ftrender.h b/msvc2003/freetype/include/freetype/ftrender.h similarity index 100% rename from msvc/freetype/include/freetype/ftrender.h rename to msvc2003/freetype/include/freetype/ftrender.h diff --git a/msvc/freetype/include/freetype/ftsizes.h b/msvc2003/freetype/include/freetype/ftsizes.h similarity index 100% rename from msvc/freetype/include/freetype/ftsizes.h rename to msvc2003/freetype/include/freetype/ftsizes.h diff --git a/msvc/freetype/include/freetype/ftsnames.h b/msvc2003/freetype/include/freetype/ftsnames.h similarity index 100% rename from msvc/freetype/include/freetype/ftsnames.h rename to msvc2003/freetype/include/freetype/ftsnames.h diff --git a/msvc/freetype/include/freetype/ftstroke.h b/msvc2003/freetype/include/freetype/ftstroke.h similarity index 100% rename from msvc/freetype/include/freetype/ftstroke.h rename to msvc2003/freetype/include/freetype/ftstroke.h diff --git a/msvc/freetype/include/freetype/ftsynth.h b/msvc2003/freetype/include/freetype/ftsynth.h similarity index 100% rename from msvc/freetype/include/freetype/ftsynth.h rename to msvc2003/freetype/include/freetype/ftsynth.h diff --git a/msvc/freetype/include/freetype/ftsystem.h b/msvc2003/freetype/include/freetype/ftsystem.h similarity index 100% rename from msvc/freetype/include/freetype/ftsystem.h rename to msvc2003/freetype/include/freetype/ftsystem.h diff --git a/msvc/freetype/include/freetype/fttrigon.h b/msvc2003/freetype/include/freetype/fttrigon.h similarity index 100% rename from msvc/freetype/include/freetype/fttrigon.h rename to msvc2003/freetype/include/freetype/fttrigon.h diff --git a/msvc/freetype/include/freetype/fttypes.h b/msvc2003/freetype/include/freetype/fttypes.h similarity index 100% rename from msvc/freetype/include/freetype/fttypes.h rename to msvc2003/freetype/include/freetype/fttypes.h diff --git a/msvc/freetype/include/freetype/ftwinfnt.h b/msvc2003/freetype/include/freetype/ftwinfnt.h similarity index 100% rename from msvc/freetype/include/freetype/ftwinfnt.h rename to msvc2003/freetype/include/freetype/ftwinfnt.h diff --git a/msvc/freetype/include/freetype/t1tables.h b/msvc2003/freetype/include/freetype/t1tables.h similarity index 100% rename from msvc/freetype/include/freetype/t1tables.h rename to msvc2003/freetype/include/freetype/t1tables.h diff --git a/msvc/freetype/include/freetype/ttnameid.h b/msvc2003/freetype/include/freetype/ttnameid.h similarity index 100% rename from msvc/freetype/include/freetype/ttnameid.h rename to msvc2003/freetype/include/freetype/ttnameid.h diff --git a/msvc/freetype/include/freetype/tttables.h b/msvc2003/freetype/include/freetype/tttables.h similarity index 100% rename from msvc/freetype/include/freetype/tttables.h rename to msvc2003/freetype/include/freetype/tttables.h diff --git a/msvc/freetype/include/freetype/tttags.h b/msvc2003/freetype/include/freetype/tttags.h similarity index 100% rename from msvc/freetype/include/freetype/tttags.h rename to msvc2003/freetype/include/freetype/tttags.h diff --git a/msvc/freetype/include/ft2build.h b/msvc2003/freetype/include/ft2build.h similarity index 100% rename from msvc/freetype/include/ft2build.h rename to msvc2003/freetype/include/ft2build.h diff --git a/msvc/freetype/win32/freetype.lib b/msvc2003/freetype/lib/freetype.lib similarity index 100% rename from msvc/freetype/win32/freetype.lib rename to msvc2003/freetype/lib/freetype.lib diff --git a/msvc/msvc2003/stdint.h b/msvc2003/stdint.h similarity index 100% rename from msvc/msvc2003/stdint.h rename to msvc2003/stdint.h