diff options
| author | Greg Ercolano <erco@seriss.com> | 2010-11-01 00:29:08 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2010-11-01 00:29:08 +0000 |
| commit | 8dac539491311336ed521eb2e62dec5ed3943b87 (patch) | |
| tree | c5a244dbc2d414b98d44796a58ea0e14c3b52f8e /src | |
| parent | 5560a4f0f1f5b4799a8c5162212e7ec22c601ae5 (diff) | |
Fixed docs for fl_color_chooser() function's optional 'm' flag (renamed 'cmode' for clarity).
to prevent doxygen errors. Solves engelsman's comments at bottom of STR#2226.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Color_Chooser.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Fl_Color_Chooser.cxx b/src/Fl_Color_Chooser.cxx index 576618382..f782008b0 100644 --- a/src/Fl_Color_Chooser.cxx +++ b/src/Fl_Color_Chooser.cxx @@ -562,13 +562,14 @@ static void cc_cancel_cb (Fl_Widget *o, void *p) { \brief Pops up a window to let the user pick an arbitrary RGB color. \image html fl_color_chooser.jpg \image latex fl_color_chooser.eps "fl_color_chooser" width=8cm - \param[in] name title label for the window - \param[in,out] r, g, b color components in the range 0.0 to 1.0. + \param[in] name Title label for the window + \param[in,out] r, g, b Color components in the range 0.0 to 1.0. + \param[in] cmode Optional mode for color chooser. See mode(int). Default -1 if none (rgb mode). \retval 1 if user confirms the selection \retval 0 if user cancels the dialog \relates Fl_Color_Chooser */ -int fl_color_chooser(const char* name, double& r, double& g, double& b, int m) { +int fl_color_chooser(const char* name, double& r, double& g, double& b, int cmode) { int ret = 0; Fl_Window window(215,200,name); window.callback(cc_cancel_cb,&ret); @@ -585,7 +586,7 @@ int fl_color_chooser(const char* name, double& r, double& g, double& b, int m) { window.resizable(chooser); chooser.rgb(r,g,b); chooser.callback(chooser_cb, &ok_color); - if (m!=-1) chooser.mode(m); + if (cmode!=-1) chooser.mode(cmode); window.end(); window.set_modal(); window.hotspot(window); @@ -603,17 +604,18 @@ int fl_color_chooser(const char* name, double& r, double& g, double& b, int m) { \brief Pops up a window to let the user pick an arbitrary RGB color. \image html fl_color_chooser.jpg \image latex fl_color_chooser.eps "fl_color_chooser" width=8cm - \param[in] name title label for the window - \param[in,out] r, g, b color components in the range 0 to 255. + \param[in] name Title label for the window + \param[in,out] r, g, b Color components in the range 0 to 255. + \param[in] cmode Optional mode for color chooser. See mode(int). Default -1 if none (rgb mode). \retval 1 if user confirms the selection \retval 0 if user cancels the dialog \relates Fl_Color_Chooser */ -int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m) { +int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int cmode) { double dr = r/255.0; double dg = g/255.0; double db = b/255.0; - if (fl_color_chooser(name,dr,dg,db,m)) { + if (fl_color_chooser(name,dr,dg,db,cmode)) { r = uchar(255*dr+.5); g = uchar(255*dg+.5); b = uchar(255*db+.5); |
