1998-10-19 20:46:58 +00:00
|
|
|
//
|
2005-02-24 21:55:12 +00:00
|
|
|
// "$Id$"
|
1998-10-19 20:46:58 +00:00
|
|
|
//
|
|
|
|
|
// Check button widget for the Fast Light Tool Kit (FLTK).
|
|
|
|
|
//
|
2014-10-19 20:17:17 +00:00
|
|
|
// Copyright 1998-2014 by Bill Spitzak and others.
|
1998-10-19 20:46:58 +00:00
|
|
|
//
|
2011-07-19 04:49:30 +00:00
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
2014-10-19 20:17:17 +00:00
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
2011-07-19 04:49:30 +00:00
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
|
//
|
|
|
|
|
// http://www.fltk.org/COPYING.php
|
1998-10-19 20:46:58 +00:00
|
|
|
//
|
2005-04-16 00:13:17 +00:00
|
|
|
// Please report all bugs and problems on the following page:
|
|
|
|
|
//
|
|
|
|
|
// http://www.fltk.org/str.php
|
1998-10-19 20:46:58 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include <FL/Fl.H>
|
|
|
|
|
#include <FL/Fl_Check_Button.H>
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2014-10-19 20:17:17 +00:00
|
|
|
/**
|
|
|
|
|
\class Fl_Check_Button
|
|
|
|
|
\brief A button with a "checkmark" to show its status.
|
|
|
|
|
|
|
|
|
|
\image html Fl_Check_Button.png
|
|
|
|
|
\image latex Fl_Check_Button.png "Fl_Check_Button" width=4cm
|
|
|
|
|
|
|
|
|
|
Buttons generate callbacks when they are clicked by the user. You control
|
|
|
|
|
exactly when and how by changing the values for type() and when().
|
|
|
|
|
|
|
|
|
|
The Fl_Check_Button subclass displays its "ON" state by showing a "checkmark"
|
|
|
|
|
rather than drawing itself pushed in.
|
|
|
|
|
*/
|
1998-10-06 18:21:25 +00:00
|
|
|
|
2008-09-16 06:49:08 +00:00
|
|
|
/**
|
2014-10-19 20:17:17 +00:00
|
|
|
Creates a new Fl_Check_Button widget using the given position, size, and label string.
|
|
|
|
|
|
|
|
|
|
The default box type is FL_NO_BOX, which draws the label w/o a box
|
|
|
|
|
right of the checkmark.
|
|
|
|
|
|
|
|
|
|
The selection_color() sets the color of the checkmark.
|
|
|
|
|
Default is FL_FOREGROUND_COLOR (usually black).
|
|
|
|
|
|
|
|
|
|
You can use down_box() to change the box type of the checkmark.
|
|
|
|
|
Default is FL_DOWN_BOX.
|
|
|
|
|
|
2008-09-16 06:49:08 +00:00
|
|
|
\param[in] X, Y, W, H position and size of the widget
|
|
|
|
|
\param[in] L widget label, default is no label
|
|
|
|
|
*/
|
|
|
|
|
Fl_Check_Button::Fl_Check_Button(int X, int Y, int W, int H, const char *L)
|
|
|
|
|
: Fl_Light_Button(X, Y, W, H, L) {
|
2001-12-06 18:12:35 +00:00
|
|
|
box(FL_NO_BOX);
|
2001-08-04 16:43:31 +00:00
|
|
|
down_box(FL_DOWN_BOX);
|
2005-11-02 14:18:32 +00:00
|
|
|
selection_color(FL_FOREGROUND_COLOR);
|
1998-10-06 18:21:25 +00:00
|
|
|
}
|