Fix documentation typos and trailing whitespace
This commit is contained in:
parent
957fa1fe37
commit
d589c05b17
@ -43,7 +43,7 @@
|
||||
in a key name are treated as subgroups, i.e. the key 'window/width' would
|
||||
actually refer to the key 'width' inside the group 'window'.
|
||||
|
||||
Keys have a unique name within their group. A value can be any string includin
|
||||
Keys have a unique name within their group. A value can be any string including
|
||||
control characters 0x00 to 0x1f, 0x7f, and UTF-8 octets.
|
||||
|
||||
Several methods allow setting and getting numerical values and binary data.
|
||||
@ -61,11 +61,11 @@
|
||||
may change at any time. Preferences files are not meant to be created
|
||||
or edited "by hand."
|
||||
|
||||
FLTK preferences are not meant to replace a fully features database. No merging
|
||||
FLTK preferences are not meant to replace a fully featured database. No merging
|
||||
of data takes place. If several instances of an app access the same database at
|
||||
the same time, only the most recent changes will persist.
|
||||
|
||||
Preferences should no be used to store document data. The .prefs file should
|
||||
Preferences should not be used to store document data. The .prefs file should
|
||||
be kept small for performance reasons. One application can have multiple
|
||||
preferences files. Extensive binary data however should be stored in separate
|
||||
files: see \a Fl_Preferences::get_userdata_path() .
|
||||
@ -135,9 +135,9 @@ public:
|
||||
MEMORY, ///< Returned if querying memory mapped preferences
|
||||
ROOT_MASK = 0x00FF, ///< Mask for the values above
|
||||
CORE = 0x0100, ///< OR'd by FLTK to read and write core library preferences and options
|
||||
C_LOCALE = 0x1000, ///< This flag should always be set, it makes sure that floating point
|
||||
C_LOCALE = 0x1000, ///< This flag should always be set to ensure that floating point values
|
||||
///< are written and read correctly independently of the current locale
|
||||
CLEAR = 0x2000, ///< Don't read a possibly existing database. Instead, start with an empty set of preferences.
|
||||
///< values are written correctly independently of the current locale
|
||||
SYSTEM_L = SYSTEM | C_LOCALE, ///< Preferences are used system-wide, locale independent
|
||||
USER_L = USER | C_LOCALE, ///< Preferences apply only to the current user, locale independent
|
||||
CORE_SYSTEM_L = CORE | SYSTEM_L, ///< Same as CORE | SYSTEM | C_LOCALE
|
||||
|
@ -693,7 +693,7 @@ public:
|
||||
|
||||
/** Set the gap between the label and the image in pixels.
|
||||
This value is limited to 0..255.
|
||||
\param[in] gap spacing in pixels
|
||||
\param[in] gap spacing in pixels
|
||||
*/
|
||||
void label_image_spacing(int gap) { label_.spacing = (uchar)gap; }
|
||||
|
||||
|
@ -997,7 +997,7 @@ FL_EXPORT void fl_measure(const char *str, int &x, int &y, int draw_symbols = 1)
|
||||
as graphical symbols
|
||||
\param[in] spacing spacing between text and image
|
||||
*/
|
||||
FL_EXPORT void fl_draw(const char *str, int x, int y, int w, int h,
|
||||
FL_EXPORT void fl_draw(const char *str, int x, int y, int w, int h,
|
||||
Fl_Align align, Fl_Image *img = 0,
|
||||
int draw_symbols = 1, int spacing = 0);
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Event names header file for the Fast Light Tool Kit (FLTK).
|
||||
// Event and other names header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2023 by Bill Spitzak and others.
|
||||
// Copyright 1998-2024 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
|
||||
@ -116,7 +116,7 @@ const char * const fl_fontnames[] =
|
||||
};
|
||||
|
||||
/**
|
||||
This is an array of callback reason names you can use to convert font numbers into names.
|
||||
This is an array of callback reason names you can use to convert callback reasons into names.
|
||||
|
||||
The array gets defined inline wherever your '\#include <FL/names.h>' appears.
|
||||
*/
|
||||
|
@ -122,7 +122,7 @@ void group_cb(Fl_Widget *, void *) {
|
||||
n->o->resize(q->o->x(),q->o->y(),q->o->w(),q->o->h());
|
||||
for (Fl_Type *t = qq->next; t && (t->level > qq->level);) {
|
||||
if (t->level != n->level || t == n || !t->selected) {
|
||||
t = t->next;
|
||||
t = t->next;
|
||||
continue;
|
||||
}
|
||||
Fl_Type *nxt = t->remove();
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Code output routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2023 by Bill Spitzak and others.
|
||||
// Copyright 1998-2024 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
|
||||
@ -1091,7 +1091,7 @@ int Fd_Code_Writer::crc_puts(const char *text) {
|
||||
|
||||
/** Write a single ASCII character to the code file.
|
||||
If MergeBack is enabled, the CRC calculation is continued.
|
||||
\note to wrote UTF8 characters, use Fd_Code_Writer::crc_puts(const char *text)
|
||||
\note to write UTF-8 characters, use Fd_Code_Writer::crc_puts(const char *text)
|
||||
\param[in] c any character between 0 and 127 inclusive
|
||||
\return see fputc(int, FILE*)
|
||||
*/
|
||||
|
@ -405,7 +405,7 @@ Fl_Type *Fd_Project_Reader::read_children(Fl_Type *p, int merge, Strategy strate
|
||||
|
||||
t->layout_widget();
|
||||
}
|
||||
|
||||
|
||||
if (strategy == kAddAsFirstChild) {
|
||||
strategy = kAddAfterCurrent;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Browser widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
// Copyright 1998-2024 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
|
||||
@ -526,9 +526,9 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const {
|
||||
Fl_Color lcol = textcolor();
|
||||
Fl_Align talign = FL_ALIGN_LEFT;
|
||||
// check for all the @-lines recognized by XForms:
|
||||
//#if defined(__GNUC__)
|
||||
//#warning FIXME This maybe needs to be more UTF8 aware now...?
|
||||
//#endif /*__GNUC__*/
|
||||
// #if defined(__GNUC__)
|
||||
// #warning FIXME This maybe needs to be more UTF-8 aware now...?
|
||||
// #endif /*__GNUC__*/
|
||||
if ( format_char() ) { // can be NULL
|
||||
while (*str == format_char() && *++str && *str != format_char()) {
|
||||
switch (*str++) {
|
||||
|
@ -1315,7 +1315,7 @@ Fl_File_Chooser::update_preview()
|
||||
window->cursor(FL_CURSOR_DEFAULT);
|
||||
Fl::check();
|
||||
|
||||
// Scan the buffer for printable UTF8 chars...
|
||||
// Scan the buffer for printable UTF-8 chars...
|
||||
for (ptr = preview_text_; *ptr; ptr++) {
|
||||
uchar c = uchar(*ptr);
|
||||
if ( (c&0x80)==0 ) {
|
||||
|
@ -83,7 +83,7 @@ void Fl_Image::draw_empty(int X, int Y) {
|
||||
It is recommended not to call this member function to reduce the size
|
||||
of an image to the size of the area where this image will be drawn,
|
||||
and to use Fl_Image::scale() instead.
|
||||
|
||||
|
||||
The new image should be released when you are done with it.
|
||||
|
||||
Note: since FLTK 1.4.0 you can use Fl_Image::release() for all types
|
||||
|
@ -328,7 +328,7 @@ int Fl_Input::kf_copy_cut() {
|
||||
handles key combinations for Insert, Enter, and Tab depending on the
|
||||
widget's input_type().
|
||||
|
||||
The method then checks for Ctrl key combinations, such as Ctrl-A, Ctrl-C,
|
||||
The method then checks for Ctrl key combinations, such as Ctrl-A, Ctrl-C,
|
||||
Ctrl-V, Ctrl-X, and Ctrl-Z, which are commonly used for select all, copy,
|
||||
paste, cut, and undo operations.
|
||||
|
||||
|
@ -42,33 +42,33 @@
|
||||
compatible). Preferences files are *not* supposed to be edited manually.
|
||||
Nevertheless, here are the docs:
|
||||
|
||||
A .prefs file contains multiple lines. A line is defined a 0 or more ASCII
|
||||
A .prefs file contains multiple lines. A line is defined by 0 or more ASCII
|
||||
characters in the range from 0x20 to 0x7e, followed by a single '\n' line
|
||||
ending character. Note that there are no tabs, \0 characters, or '\r'
|
||||
characters anywhere in a line. Some parts of a line may allow 0x80 to 0xff
|
||||
to support Unicode UTF8 octets.
|
||||
to support Unicode UTF-8 octets.
|
||||
|
||||
The first line is always "; FLTK preferences file format 1.0", followed by a
|
||||
The first line is always "; FLTK preferences file format 1.0", followed by a
|
||||
'\n' to indicate the end of the line. The version number may change some time
|
||||
in the future if the file format ever changes.
|
||||
|
||||
The second line contains the vendor information when the file was created:
|
||||
The second line contains the vendor information when the file was created:
|
||||
"; vendor: VENDOR\n"
|
||||
|
||||
The third line contains the application name
|
||||
The third line contains the application name
|
||||
"; application: APPLICATION_NAME\n"
|
||||
|
||||
Any following line that starts with a ';' is not relevant for data and seen
|
||||
Any following line that starts with a ';' is not relevant for data and seen
|
||||
as a comment. Fl_Preferences tries to preserve comments, but has no API to set
|
||||
or read comments.
|
||||
|
||||
All data is stored in key/value pairs. All key/value pairs are store inside
|
||||
All data is stored in key/value pairs. All key/value pairs are stored inside
|
||||
their group. There can be multiple groups. Group naming is used to
|
||||
indicate a hierarchy.
|
||||
|
||||
A line starting with a '[' starts a group. Before and after a group line,
|
||||
A line starting with a '[' starts a group. Before and after a group line,
|
||||
there is always an empty line (no characters, just a '\n'). A group line ends
|
||||
in "]\n". Directly between the '[] and ']' is the name of the group. The first
|
||||
in "]\n". Directly between the '[' and ']' is the name of the group. The first
|
||||
("root")-group is always declared with the line "[.]\n".
|
||||
|
||||
Simple group names are written starting with "./", for example "[./name]\n".
|
||||
@ -86,17 +86,17 @@
|
||||
the value. There is no space before or after the ":". The value may contain
|
||||
more ":" characters.
|
||||
|
||||
The value is a text of ASCII characters 0x20 to 0x7e, or UTF8 Unicode octets
|
||||
The value is a text of ASCII characters 0x20 to 0x7e or UTF-8 Unicode octets
|
||||
0x80 to 0xff.
|
||||
|
||||
The key/value line ends in a "\n". Key/value lines wrap before or at column 80
|
||||
with a "/n" and continue in the next line, starting with a "+" which indicates
|
||||
with a "\n" and continue in the next line, starting with a "+" which indicates
|
||||
that this is an overflow line and is furthermore ignored. The type of a value
|
||||
is not stored in a file. It is not an error to call Fl_Preferences::set with a
|
||||
"double" and read back a string.
|
||||
is not stored in the file. It is not an error to call Fl_Preferences::set with
|
||||
a "double" and read back a string.
|
||||
|
||||
* Integers are written as signed int using "%d".
|
||||
* Floating point values are written with decimal points if C_LOCALE is set
|
||||
* Floating point values are written with decimal points if C_LOCALE is set
|
||||
when creating the file.
|
||||
* When text is written, "\r", "\n", and the "\" character are escaped by
|
||||
prepending them with an additional "\", other characters <0x20 and 0x7f
|
||||
@ -241,7 +241,7 @@ unsigned int Fl_Preferences::file_access()
|
||||
}
|
||||
|
||||
/**
|
||||
Determine the file name and path to preferences that would be openend with
|
||||
Determine the file name and path to preferences that would be opened with
|
||||
these parameters.
|
||||
|
||||
Find the possible location of a preference file on disk without touching any
|
||||
@ -327,7 +327,7 @@ Fl_Preferences::Root Fl_Preferences::filename( char *buffer, size_t buffer_size,
|
||||
For backward compatibility, the old \c USER `.prefs` file naming scheme
|
||||
<tt>\$(directory)/.fltk/\$(vendor)/\$(application).prefs</tt> is checked first.
|
||||
If that file does not exist, the environment variable `$XDG_CONFIG_HOME` is
|
||||
read as a base directory. If `$XDG_CONFIG_HOME` not set, the base directory
|
||||
read as a base directory. If `$XDG_CONFIG_HOME` is not set, the base directory
|
||||
defaults to `$HOME/.config/`.
|
||||
|
||||
The user preferences will be stored in
|
||||
|
@ -503,7 +503,7 @@ void Fl_Text_Display::display_needs_recalc() {
|
||||
display_needs_recalc_ = true;
|
||||
redraw(); // ensure draw() gets called
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Recalculate the display's visible lines and scrollbar sizes.
|
||||
Beware calling this directly may cause a lot of CPU if called repeatedly (issue 300).
|
||||
|
@ -1109,7 +1109,7 @@ static int font_sort(Fl_Fontdesc *fa, Fl_Fontdesc *fb) {
|
||||
Fl_Font Fl_Cairo_Graphics_Driver::set_fonts(const char* /*pattern_name*/)
|
||||
{
|
||||
// Return immideatly if the fonts were already counted
|
||||
if (font_count_ != -1)
|
||||
if (font_count_ != -1)
|
||||
return FL_FREE_FONT + font_count_;
|
||||
fl_open_display();
|
||||
int n_families, count = 0;
|
||||
|
@ -32,7 +32,7 @@ static void innards(const char *str, int len, int X, int Y, const int data[][3],
|
||||
fl_color(c);
|
||||
}
|
||||
|
||||
static void dispatch(const Fl_Label* o,
|
||||
static void dispatch(const Fl_Label* o,
|
||||
int x, int y, int w, int h, Fl_Align align,
|
||||
void (*callthis)(const char*,int,int,int))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user