Remove FLTK port.

It provides no value over the native GTK and Cocoa ports.
pull/3/head
whitequark 2015-03-25 02:38:06 +03:00
parent bbe4999033
commit d0c0a7ae5a
6 changed files with 19 additions and 1437 deletions

View File

@ -20,7 +20,7 @@ set(solvespace_VERSION_MAJOR 2)
set(solvespace_VERSION_MINOR 1)
if(NOT WIN32)
set(GUI gtk2 CACHE STRING "GUI toolkit to use (one of: fltk gtk2 gtk3)")
set(GUI gtk2 CACHE STRING "GUI toolkit to use (one of: gtk2 gtk3)")
endif()
# compiler
@ -76,17 +76,11 @@ elseif(APPLE)
find_package(PNG REQUIRED)
find_library(APPKIT_LIBRARY AppKit REQUIRED)
else() # Linux and compatible systems
find_package(PNG REQUIRED)
find_package(SpaceWare)
if(GUI STREQUAL "fltk")
# Find the packages the old-fashioned way. Doesn't require
# the system to follow freedesktop standards.
find_package(FLTK REQUIRED)
CHECK_INCLUDE_FILE("fontconfig/fontconfig.h" HAVE_FONTCONFIG)
elseif(GUI STREQUAL "gtk3" OR GUI STREQUAL "gtk2")
# Use freedesktop's pkg-config to locate everything.
find_package(PkgConfig REQUIRED)
pkg_check_modules(PNG REQUIRED libpng)
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
pkg_check_modules(JSONC REQUIRED json-c)
pkg_check_modules(GLEW REQUIRED glew)
@ -95,10 +89,9 @@ else() # Linux and compatible systems
if(GUI STREQUAL "gtk3")
set(HAVE_GTK3 TRUE)
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0 pangomm-1.4 x11)
else()
elseif(GUI STREQUAL "gtk2")
set(HAVE_GTK2 TRUE)
pkg_check_modules(GTKMM REQUIRED gtkmm-2.4 pangomm-1.4 x11)
endif()
else()
message(FATAL_ERROR "GUI unrecognized: ${GUI}")
endif()

View File

@ -29,7 +29,6 @@ if(SPACEWARE_FOUND)
endif()
set(HAVE_SPACEWARE ${SPACEWARE_FOUND})
set(HAVE_FLTK ${FLTK_FOUND})
set(HAVE_GTK ${GTKMM_FOUND})
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h")
@ -153,15 +152,6 @@ elseif(APPLE)
set(platform_LIBRARIES
${APPKIT_LIBRARY})
elseif(HAVE_FLTK)
include_directories(${FLTK_INCLUDE_DIR})
set(platform_SOURCES
fltk/fltkmain.cpp)
set(platform_LIBRARIES
${CMAKE_DL_LIBS}
${FLTK_LIBRARIES})
elseif(HAVE_GTK)
include_directories(
${GTKMM_INCLUDE_DIRS}

View File

@ -13,13 +13,4 @@
#cmakedefine HAVE_GTK2
#cmakedefine HAVE_GTK3
#cmakedefine HAVE_FLTK
/* Only relevant for FLTK port. */
#ifdef HAVE_FLTK
#define HAVE_FLTK_FULLSCREEN
#endif
#cmakedefine HAVE_FONTCONFIG
#endif

File diff suppressed because it is too large Load Diff

View File

@ -79,7 +79,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
{ 1, "Show Snap &Grid", MNU_SHOW_GRID, '>', IC, mView },
{ 1, "Use &Perspective Projection", MNU_PERSPECTIVE_PROJ,'`', IC, mView },
{ 1, NULL, 0, 0, IN, NULL },
#if defined(HAVE_FLTK) || defined(__APPLE__)
#if defined(__APPLE__)
{ 1, "Show Menu &Bar", MNU_SHOW_MENU_BAR, C|F(12), IC, mView },
#endif
{ 1, "Show &Toolbar", MNU_SHOW_TOOLBAR, 0, IC, mView },
@ -87,7 +87,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
{ 1, NULL, 0, 0, IN, NULL },
{ 1, "Dimensions in &Inches", MNU_UNITS_INCHES, 0, IR, mView },
{ 1, "Dimensions in &Millimeters", MNU_UNITS_MM, 0, IR, mView },
#if defined(HAVE_FLTK_FULLSCREEN) || defined(HAVE_GTK) || defined(__APPLE__)
#if defined(HAVE_GTK) || defined(__APPLE__)
{ 1, NULL, 0, 0, IN, NULL },
{ 1, "&Full Screen", MNU_FULL_SCREEN, C|F(11), IC, mView },
#endif
@ -628,13 +628,13 @@ void GraphicsWindow::EnsureValidActives(void) {
ShowTextWindow(SS.GW.showTextWindow);
CheckMenuById(MNU_SHOW_TEXT_WND, SS.GW.showTextWindow);
#if defined(HAVE_FLTK) || defined(__APPLE__)
#if defined(__APPLE__)
CheckMenuById(MNU_SHOW_MENU_BAR, MenuBarIsVisible());
#endif
CheckMenuById(MNU_SHOW_TOOLBAR, SS.showToolbar);
CheckMenuById(MNU_PERSPECTIVE_PROJ, SS.usePerspectiveProj);
CheckMenuById(MNU_SHOW_GRID, SS.GW.showSnapGrid);
#if defined(HAVE_FLTK_FULLSCREEN) || defined(HAVE_GTK) || defined(__APPLE__)
#if defined(HAVE_GTK) || defined(__APPLE__)
CheckMenuById(MNU_FULL_SCREEN, FullScreenIsActive());
#endif

View File

@ -134,15 +134,7 @@ void RefreshRecentMenus(void);
#define SAVE_CANCEL (0)
int SaveFileYesNoCancel(void);
#if defined(HAVE_FLTK)
// Selection pattern format for FLTK's file chooser classes:
// "PNG File\t*.png\n"
// "JPEG File\t*.{jpg,jpeg}\n"
// "All Files\t*"
# define PAT1(desc,e1) desc "\t*." e1 "\n"
# define PAT2(desc,e1,e2) desc "\t*.{" e1 "," e2 "}\n"
# define ENDPAT "All Files\t*"
#elif defined(HAVE_GTK)
#if defined(HAVE_GTK)
// Selection pattern format to be parsed by GTK3 glue code:
// "PNG File\t*.png\n"
// "JPEG File\t*.jpg\t*.jpeg\n"