Remove FL_CFG_WIN_COCOA preprocessor variable from Fl_Sys_Menu_Bar.cxx
This commit is contained in:
parent
35812f474b
commit
1298bf00f5
@ -1,7 +1,7 @@
|
||||
//
|
||||
// MacOS system menu bar widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
||||
// Copyright 1998-2021 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
|
||||
@ -42,10 +42,6 @@ static void move_tab_cb(Fl_Widget *, void *data);
|
||||
static void merge_all_windows_cb(Fl_Widget *, void *data);
|
||||
#endif
|
||||
|
||||
Fl_Sys_Menu_Bar_Driver *Fl_Sys_Menu_Bar::driver() {
|
||||
return Fl_MacOS_Sys_Menu_Bar_Driver::driver();
|
||||
}
|
||||
|
||||
|
||||
void Fl_MacOS_Sys_Menu_Bar_Driver::draw() {
|
||||
bar->deactivate(); // prevent Fl_Sys_Menu_Bar object from receiving events
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// system menu bar widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
||||
// Copyright 1998-2021 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
|
||||
@ -15,9 +15,10 @@
|
||||
//
|
||||
|
||||
|
||||
#include "config_lib.h"
|
||||
#include <config.h>
|
||||
#include "Fl_Sys_Menu_Bar_Driver.H"
|
||||
#include <FL/platform.H>
|
||||
#include "Fl_System_Driver.H"
|
||||
|
||||
|
||||
Fl_Sys_Menu_Bar *fl_sys_menu_bar = 0;
|
||||
@ -238,11 +239,9 @@ void Fl_Sys_Menu_Bar::create_window_menu() {
|
||||
}
|
||||
|
||||
#if !defined(FL_DOXYGEN)
|
||||
#if ! defined(FL_CFG_WIN_COCOA)
|
||||
Fl_Sys_Menu_Bar_Driver *Fl_Sys_Menu_Bar::driver() {
|
||||
return NULL;
|
||||
return Fl::system_driver()->sys_menu_bar_driver();
|
||||
}
|
||||
#endif // !FL_CFG_WIN_COCOA
|
||||
|
||||
Fl_Sys_Menu_Bar_Driver *Fl_Sys_Menu_Bar_Driver::driver_ = 0;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// A base class for platform specific system calls
|
||||
// for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 2010-2020 by Bill Spitzak and others.
|
||||
// Copyright 2010-2021 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
|
||||
@ -42,6 +42,7 @@ class Fl_File_Icon;
|
||||
class Fl_File_Browser;
|
||||
class Fl_Pixmap;
|
||||
class Fl_Widget;
|
||||
class Fl_Sys_Menu_Bar_Driver;
|
||||
|
||||
/**
|
||||
\brief A base class for platform-specific system operations.
|
||||
@ -239,6 +240,7 @@ public:
|
||||
virtual const char *meta_name() { return "Meta"; }
|
||||
virtual const char *alt_name() { return "Alt"; }
|
||||
virtual const char *control_name() { return "Ctrl"; }
|
||||
virtual Fl_Sys_Menu_Bar_Driver *sys_menu_bar_driver() { return NULL; }
|
||||
};
|
||||
|
||||
#endif // FL_SYSTEM_DRIVER_H
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Definition of Apple Darwin system driver
|
||||
// for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 2010-2018 by Bill Spitzak and others.
|
||||
// Copyright 2010-2021 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
|
||||
@ -83,6 +83,7 @@ public:
|
||||
virtual const char *meta_name();
|
||||
virtual const char *alt_name();
|
||||
virtual const char *control_name();
|
||||
virtual Fl_Sys_Menu_Bar_Driver *sys_menu_bar_driver();
|
||||
};
|
||||
|
||||
#endif // FL_DARWIN_SYSTEM_DRIVER_H
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Definition of Apple Darwin system driver.
|
||||
//
|
||||
// Copyright 1998-2018 by Bill Spitzak and others.
|
||||
// Copyright 1998-2021 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
|
||||
@ -22,6 +22,7 @@
|
||||
#include <FL/filename.H>
|
||||
#include <FL/Fl_File_Icon.H>
|
||||
#include <FL/Fl_Preferences.H>
|
||||
#include "../Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H"
|
||||
#include <string.h>
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||
#include <xlocale.h>
|
||||
@ -366,3 +367,8 @@ const char *Fl_Darwin_System_Driver::local_to_mac_roman(const char *t, int)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
Fl_Sys_Menu_Bar_Driver *Fl_Darwin_System_Driver::sys_menu_bar_driver()
|
||||
{
|
||||
return Fl_MacOS_Sys_Menu_Bar_Driver::driver();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user