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
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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*)
|
||||
*/
|
||||
|
@ -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 ) {
|
||||
|
@ -42,11 +42,11 @@
|
||||
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
|
||||
'\n' to indicate the end of the line. The version number may change some time
|
||||
@ -62,13 +62,13 @@
|
||||
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,
|
||||
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,14 +86,14 @@
|
||||
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
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user