- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
//
|
|
// Menu window code 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:
|
|
//
|
|
// https://www.fltk.org/COPYING.php
|
|
//
|
|
// Please see the following page on how to report bugs and issues:
|
|
//
|
|
// https://www.fltk.org/bugs.php
|
|
//
|
|
|
|
// This is the window type used by Fl_Menu to make the pop-ups.
|
|
// It draws in the overlay planes if possible.
|
|
|
|
// Also here is the implementation of the mouse & keyboard grab,
|
|
// which are used so that clicks outside the program's windows
|
|
// can be used to dismiss the menus.
|
|
|
|
#include <FL/Fl_Menu_Window.H>
|
|
#include "Fl_Window_Driver.H"
|
|
|
|
void Fl_Menu_Window::show() {
|
|
Fl_Window_Driver::driver(this)->show_menu();
|
|
}
|
|
|
|
void Fl_Menu_Window::flush() {
|
|
if (!shown()) return;
|
|
Fl_Window_Driver::driver(this)->flush_menu();
|
|
}
|
|
|
|
/** Erases the window, does nothing if HAVE_OVERLAY is not defined in config.h */
|
|
void Fl_Menu_Window::erase() {
|
|
Fl_Window_Driver::driver(this)->erase_menu();
|
|
}
|
|
|
|
// Fix the colormap flashing on Maximum Impact Graphics by erasing the
|
|
// menu before unmapping it:
|
|
void Fl_Menu_Window::hide() {
|
|
erase();
|
|
Fl_Single_Window::hide();
|
|
}
|
|
|
|
/** Destroys the window and all of its children.*/
|
|
Fl_Menu_Window::~Fl_Menu_Window() {
|
|
hide();
|
|
}
|
|
|
|
|
|
Fl_Menu_Window::Fl_Menu_Window(int W, int H, const char *l)
|
|
: Fl_Single_Window(W,H,l)
|
|
{
|
|
image(0);
|
|
}
|
|
|
|
|
|
Fl_Menu_Window::Fl_Menu_Window(int X, int Y, int W, int H, const char *l)
|
|
: Fl_Single_Window(X,Y,W,H,l) {
|
|
image(0);
|
|
}
|