STR #1726

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Roadmap 1.1 ]

STR #1726

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Summary:Fl_Browser docs need to document select() and selected() methods
Created By:greg.ercolano
Assigned To:matt
Fix Version:1.1-current (SVN: v6008)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files

Trouble Report Comments:

Name/Time/Date Text top right image
#1 greg.ercolano
16:30 Jul 03, 2007
Fl_Browser::selected() and select() are omitted from the Fl_Browser docs:

This excerpt from Fl_Browser.H shows them to be Fl_Browser class methods:

* * *
int Fl_Browser::select(int line, int v) {
  if (line < 1 || line > lines) return 0;
  return Fl_Browser_::select(find_line(line), v);

int Fl_Browser::selected(int line) const {
  if (line < 1 || line > lines) return 0;
  return find_line(line)->flags & SELECTED;
* * *
#2 vedran
03:23 Jul 11, 2007
Additional problems with Fl_Browser documentation:

* public methods lineno() and find_line() are undocumented
* documentation for Fl_Browser_ (and Fl_Browser) method select() should note that setting "selection status" to 0 will move keyboard focus to item without selecting it
* documentation for selection() says "Returns the item currently selected" while it returns the line with keyboard focus, not the selected line (possibly the method itself needs to be fixed, but then there would be no way to detect the line with keyboard focus).
#3 vedran
04:17 Jul 18, 2007
Sorry, I just noticed that the methods I mentioned are protected. Also Fl_Browser_.H docs list a number of protected methods without specifying that they are protected. From the rest of fltk docs I conclude that the policy is to *not* list protected methods as they are typically invisible to users?  
#4 matt
11:59 Oct 07, 2007
The Fl_Browser::selected method should indeed be docuemnted.

Fl_Browser::select does the same as Fl_Browser_::select and need not be documented again.

The other annotations refer to Fl_Multi_Browser only and are mostly updated at this point.

Unfortunately, the current FLTK 1.1 documentation does not document most of the protected functions. It does mention though that Fl_Browser::item_next() and friends are only used when deriving a new Browser class, which implies their protected state. Not sure if it uses the word "protected" at some point though.

On a different note: the 1.1 documentation is maintined by hand. 1.2 and 2.0 use Doxygen which makes our life so much easier. Please understand that I can not make extensive changes to the 1.1 documentation as they would be lost for 1.2 and 2.0 anyways... .
#5 matt
15:02 Dec 28, 2007
Fixed in Subversion repository.  
bottom left image   bottom right image

Return to Bugs & Features ]


Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.