diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2008-09-16 06:49:08 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2008-09-16 06:49:08 +0000 |
| commit | e20eeb65413d0cf1a94d682c51d781314beeda6d (patch) | |
| tree | 8d2c124fb6f409a024a8c9a11785d8fdc5008a64 /src/Fl_Button.cxx | |
| parent | 5da1c0f71f3fd299c5bf50df911fc4cdb3ac96c0 (diff) | |
applied Duncan Gibson's documentation patch (WP3).
Docs look good, compiles okay.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6264 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Button.cxx')
| -rw-r--r-- | src/Fl_Button.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index a3f0a8d6a..044d1e443 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -3,7 +3,7 @@ // // Button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2006 by Bill Spitzak and others. +// Copyright 1998-2008 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -34,6 +34,12 @@ // them are implemented by setting the type() value and testing it // here. This includes Fl_Radio_Button and Fl_Toggle_Button +/** + Sets the current value of the button. + A non-zero value sets the button to 1 (ON), and zero sets it to 0 (OFF). + \param[in] v button value. + \see set(), clear() + */ int Fl_Button::value(int v) { v = v ? 1 : 0; oldval = v; @@ -48,6 +54,10 @@ int Fl_Button::value(int v) { } } +/** + Turns on this button and turns off all other radio buttons in the group + (calling \c value(1) or \c set() does not do this). + */ void Fl_Button::setonly() { // set this radio button on, turn others off value(1); Fl_Group* g = (Fl_Group*)parent(); @@ -159,8 +169,13 @@ int Fl_Button::handle(int event) { } } -Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l) -: Fl_Widget(X,Y,W,H,l) { +/** + The constructor creates the button using the given position, size and label. + \param[in] X, Y, W, H position and size of the widget + \param[in] L widget label, default is no label + */ +Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *L) +: Fl_Widget(X,Y,W,H,L) { box(FL_UP_BOX); down_box(FL_NO_BOX); value_ = oldval = 0; |
