From 4dc5732a3e0f376786d1d6b788e5cf601439e890 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 27 Nov 2001 04:55:48 +0000 Subject: Image class docos. Start of text buffer docos. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Bitmap.html | 2 +- documentation/Fl_GIF_Image.html | 28 +- documentation/Fl_Image.html | 517 +++++++++++------------------ documentation/Fl_JPEG_Image.html | 29 +- documentation/Fl_PNG_Image.html | 29 +- documentation/Fl_PNM_Image.html | 29 +- documentation/Fl_Pixmap.html | 29 +- documentation/Fl_RGB_Image.html | 31 +- documentation/Fl_Text_Buffer.html | 681 ++++++++++++++++++++------------------ documentation/Fl_XBM_Image.html | 27 +- documentation/Fl_XPM_Image.html | 27 +- documentation/fltk.book | 3 + 12 files changed, 661 insertions(+), 771 deletions(-) (limited to 'documentation') diff --git a/documentation/Fl_Bitmap.html b/documentation/Fl_Bitmap.html index 010fcc73a..697e2b6b7 100644 --- a/documentation/Fl_Bitmap.html +++ b/documentation/Fl_Bitmap.html @@ -3,7 +3,7 @@ -

class Fl_Bitmap

+

class Fl_Bitmap


Class Hierarchy

diff --git a/documentation/Fl_GIF_Image.html b/documentation/Fl_GIF_Image.html index 010fcc73a..543bfcc30 100644 --- a/documentation/Fl_GIF_Image.html +++ b/documentation/Fl_GIF_Image.html @@ -3,49 +3,47 @@ -

class Fl_Bitmap

+

class Fl_GIF_Image


Class Hierarchy

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_GIF_Image class supports loading, caching, +and drawing of Compuserve GIFSM images. The class +loads the first image and supports transparency.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_GIF_Image::Fl_GIF_Image(const char *filename);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor loads the named GIF image.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_GIF_Image::~Fl_GIF_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/Fl_Image.html b/documentation/Fl_Image.html index e0b27db16..16d95687a 100644 --- a/documentation/Fl_Image.html +++ b/documentation/Fl_Image.html @@ -1,336 +1,199 @@ - -
-

class Fl_Input

+ + + + + +

class Fl_Image

+
+

Class Hierarchy

- + + +

Include Files

- + + +

Description

-

This is the FLTK text input widget. It displays a single line of text -and lets the user edit it. Normally it is drawn with an inset box and -a white background. The text may contain any characters (even 0), and -will correctly display anything, using ^X notation for unprintable -control characters and \nnn notation for unprintable characters with -the high bit set. It assumes the font can draw any characters in the -ISO-8859-1 character set. - -

- - - - - - - - - - - - - - - - - - - - - - - - -
Mouse button 1Moves the cursor to - this point. Drag selects characters. Double click selects words. - Triple click selects all text. Shift+click extends the selection. - When you select text it is automatically copied to the clipboard. -
Mouse button 2Insert the clipboard at -the point clicked. You can also select a region and replace it with the -clipboard by selecting the region with mouse button 2. -
Mouse button 3Currently acts like button 1.
BackspaceDeletes one character to the left, or -deletes the selected region.
EnterMay cause the callback, see when().
^A or HomeGo to start of line.
^B or LeftMove left
^CCopy the selection to the clipboard
^D or DeleteDeletes one character to the right -or deletes the selected region.
^E or EndGo to the end of line.
^F or RightMove right
^KDelete to the end of line (next \n character) -or deletes a single \n character. These deletions are all concatenated -into the clipboard.
^N or DownMove down (for Fl_Multiline_Input -only, otherwise it moves to the next input field).
^P or UpMove up (for Fl_Multiline_Input only, -otherwise it moves to the previous input field).
^UDelete everything.
^V or ^YPaste the clipboard
^X or ^WCopy the region to the clipboard and -delete it.
^Z or ^_Undo. This is a single-level undo -mechanism, but all adjacent deletions and insertions are concatenated -into a single "undo". Often this will undo a lot more than you -expected.
Shift+moveMove the cursor but also extend the -selection.
RightCtrl or -
Compose
Start -a compose-character -sequence. The next one or two keys typed define the character to -insert (see table that follows.) - -

For instance, to type "á" type [compose][a]['] or [compose]['][a]. - -

The character "nbsp" (non-breaking space) is typed by using -[compose][space]. - -

The single-character sequences may be followed by a space if -necessary to remove ambiguity. For instance, if you really want to -type "ª~" rather than "ã" you must type [compose][a][space][~]. - -

The same key may be used to "quote" control characters into the -text. If you need a ^Q character you can get one by typing -[compose][Control+Q]. - -

X may have a key on the keyboard -defined as XK_Multi_key. If so this key may be used as well -as the right-hand control key. You can set this up with the program -xmodmap. - -

If your keyboard is set to support a foreign language you should -also be able to type "dead key" prefix characters. On X you will -actually be able to see what dead key you typed, and if you then move -the cursor without completing the sequence the accent will remain -inserted. -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Character Composition Table
KeysCharKeysCharKeysCharKeysCharKeysCharKeysChar
spnbsp*°` AÀD -Ð` aàd -ð -
!¡+ -±' AÁ~ NÑ' aá~ nñ -
%¢2²A ^Â` OÒ^ aâ` oò -
#£3³~ AÃ' OÓ~ aã' oó -
$¤'´: AÄ^ OÔ: aä^ oô -
y =¥uµ* AÅ~ OÕ* aå~ oõ -
|¦pA EÆ: OÖa eæ: oö -
&§.·, CÇx×, cç- :÷ -
:¨,¸E `ÈO /Ø` eèo /ø -
c©1¹' EÉ` UÙ' eé` uù -
aªoº^ EÊ' UÚ^ eê' uú -
< <«> >»: EË^ UÛ: eë^ uû -
~¬1 4¼` IÌ: UÜ` iì: uü -
-­1 2½' IÍ' YÝ' ií' yý -
r®3 4¾^ IÎT HÞ^ iît hþ -
_¯?¿: IÏs sß: iï: yÿ -
+

Fl_Image is the base class used for caching and +drawing all kinds of images in FLTK. This class keeps track of +common image data such as the pixels, colormap, width, height, +and depth. Virtual methods are used to provide type-specific +image handling.

+ +

Since the Fl_Image class does not support image +drawing by itself, calling the draw() method results in +a box with an X in it being drawn instead.

Methods

-
- - -
- - - - - - - - - -
-
-

Fl_Input::Fl_Input(int x, int y, int w, -int h, const char *label = 0)

- Creates a new Fl_Input widget using the given position, size, -and label string. The default boxtype is FL_DOWN_BOX. -

virtual Fl_Input::~Fl_Input()

- Destroys the widget and any value associated with it. -

const char *Fl_Input::value() const -
int Fl_Input::value(const char*) -
int Fl_Input::value(const char*, int)

- The first form returns the current value, which is a pointer to the -internal buffer and is valid only until the next event is handled. -

The second two forms change the text and set the mark and the point -to the end of it. The string is copied to the internal buffer. Passing -NULL is the same as "". This returns non-zero if the new value is -different than the current one. You can use the second version to -directly set the length if you know it already or want to put nul's in -the text.

-

int Fl_Input::static_value(const -char*) -
int Fl_Input::static_value(const char*, int)

- Change the text and set the mark and the point to the end of it. The -string is not copied. If the user edits the string it is copied -to the internal buffer then. This can save a great deal of time and -memory if your program is rapidly changing the values of text fields, -but this will only work if the passed string remains unchanged until -either the Fl_Input is destroyed or value() is called -again. -

int Fl_Input::size() const

- Returns the number of characters in value(). This may be -greater than strlen(value()) if there are nul characters in -it. -

char Fl_Input::index(int) const

- Same as value()[n], but may be faster in plausible -implementations. No bounds checking is done. -

Fl_When Fl_Widget::when() const -
void Fl_Widget::when(Fl_When)

- Controls when callbacks are done. The following values are useful, -the default value is FL_WHEN_RELEASE: + -

Fl_Color Fl_Input::textcolor() const -
void Fl_Input::textcolor(Fl_Color)

- Gets or sets the color of the text in the input field. -

Fl_Font Fl_Input::textfont() const -
void Fl_Input::textfont(Fl_Font)

- Gets or sets the font of the text in the input field. -

uchar Fl_Input::textsize() const -
void Fl_Input::textsize(uchar)

- Gets or sets the size of the text in the input field. -

Fl_Color Fl_Input::cursor_color() -const -
void Fl_Input::cursor_color(Fl_Color)

- Get or set the color of the cursor. This is black by default. - - + +

Fl_Image(int W, int H, int D);

+ +

The constructor creates an empty image with the specified +width, height, and depth. The width and height are in pixels. +The depth is 0 for bitmaps, 1 for pixmap (colormap) images, and +1 to 4 for color images.

+ +

virtual ~Fl_Image();

+ +

The destructor is a virtual method that frees all memory used +by the image.

+ +

virtual void color_average(Fl_Color c, float i);

+ +

The color_average() method averages the colors in +the image with the FLTK color value c. The i +argument specifies the amount of the original image to combine +with the color, so a value of 1.0 results in no color blend, and +a value of 0.0 results in a constant image of the specified +color. The original image data is not altered by this +method.

+ +

virtual Fl_Image *copy(int W, int H);
+copy();

+ +

The copy() method creates a copy of the specified +image. If the width and height are provided, the image is +resized to the specified size.

+ +

int count();

+ +

The count() method returns the number of data values +associated with the image. The value will be 0 for images with +no associated data, 1 for bitmap and color images, and greater +than 2 for pixmap images.

+ +

int d();
+protected void d(int D);

+ +

The first form of the d() method returns the current +image depth. The return value will be 0 for bitmaps, 1 for +pixmaps, and 1 to 4 for color images.

+ +

The second form is a protected method that sets the current +image depth.

+ +

const char * const *data();
+protected void data(const char * const *data, int count);

+ +

The first form of the data() method returns a +pointer to the current image data array. Use the +count() method to find the size of the data array.

+ +

The second form is a protected method that sets the current +array pointer and count of pointers in the array.

+ +

virtual void desaturate()

+ +

The desaturate() method converts an image to +grayscale. If the image contains an alpha channel (depth = 4), +the alpha channel is preserved. This method does not alter +the original image data.

+ +

void draw(int X, int Y);
+virtual void draw(int X, int Y, int W, int H, int cx, int cy);

+ +

The draw() methods draw the image. The first form +specifies the upper-lefthand corner of the image. The second +form specifies a bounding box for the image, with the origin +(upper-lefthand corner) of the image offset by the cx +and cy arguments.

+ +

protected void draw_empty(int X, int Y);

+ +

The protected method draw_empty() draws a box with +an X in it. It can be used to draw any image that lacks image +data.

+ +

int h();
+protected void h(int H);

+ +

The first form of the h() method returns the current +image height in pixels.

+ +

The second form is a protected method that sets the current +image height.

+ +

void inactive();

+ +

The inactive() method calls +color_average(FL_GRAY, 0.33f) to produce an image that +appears grayed out. This method does not alter the original +image data.

+ +

virtual void label(Fl_Widget *w); +virtual void label(Fl_Menu_Item *m);

+ +

The label() methods are an obsolete way to set the +image attribute of a widget or menu item. Use the +image() or deimage() methods of the +Fl_Widget and Fl_Menu_Item classes +instead.

+ +

int ld();
+protected void ld(int LD);

+ +

The first form of the ld() method returns the current +line data size in bytes. Line data is extra data that is included +after each line of color image data and is normally not present.

+ +

The second form is a protected method that sets the current +line data size in bytes.

+ +

int w();
+protected void w(int W);

+ +

The first form of the w() method returns the current +image width in pixels.

+ +

The second form is a protected method that sets the current +image width.

+ + + diff --git a/documentation/Fl_JPEG_Image.html b/documentation/Fl_JPEG_Image.html index 010fcc73a..74c609b24 100644 --- a/documentation/Fl_JPEG_Image.html +++ b/documentation/Fl_JPEG_Image.html @@ -3,49 +3,48 @@ -

class Fl_Bitmap

+

class Fl_JPEG_Image


Class Hierarchy

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_JPEG_Image class supports loading, caching, +and drawing of Joint Photographic Experts Group (JPEG) File +Interchange Format (JFIF) images. The class supports grayscale +and color (RGB) JPEG image files.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_JPEG_Image::Fl_JPEG_Image(const char *filename);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor loads the named JPEG image.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_JPEG_Image::~Fl_JPEG_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/Fl_PNG_Image.html b/documentation/Fl_PNG_Image.html index 010fcc73a..a87ac5455 100644 --- a/documentation/Fl_PNG_Image.html +++ b/documentation/Fl_PNG_Image.html @@ -3,49 +3,48 @@ -

class Fl_Bitmap

+

class Fl_PNG_Image


Class Hierarchy

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_PNG_Image class supports loading, caching, +and drawing of Portable Network Graphics (PNG) image files. The +class loads colormapped and full-color images and handles color- +and alpha-based transparency.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_PNG_Image::Fl_PNG_Image(const char *filename);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor loads the named PNG image.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_PNG_Image::~Fl_PNG_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/Fl_PNM_Image.html b/documentation/Fl_PNM_Image.html index 010fcc73a..7b761c5f9 100644 --- a/documentation/Fl_PNM_Image.html +++ b/documentation/Fl_PNM_Image.html @@ -3,49 +3,48 @@ -

class Fl_Bitmap

+

class Fl_PNM_Image


Class Hierarchy

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_PNM_Image class supports loading, caching, +and drawing of Portable Anymap (PNM, PBM, PGM, PPM) image files. The class +loads bitmap, grayscale, and full-color images in both ASCII and +binary formats.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_PNM_Image::Fl_PNM_Image(const char *filename);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor loads the named PNM image.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_PNM_Image::~Fl_PNM_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/Fl_Pixmap.html b/documentation/Fl_Pixmap.html index 010fcc73a..8054e5ffb 100644 --- a/documentation/Fl_Pixmap.html +++ b/documentation/Fl_Pixmap.html @@ -3,7 +3,7 @@ -

class Fl_Bitmap

+

class Fl_Pixmap


Class Hierarchy

@@ -11,41 +11,44 @@

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_Pixmap class supports caching and drawing of colormap +(pixmap) images, including transparency.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_Pixmap::Fl_Pixmap(const char * const *data);
+Fl_Pixmap::Fl_Pixmap(const char **data);
+Fl_Pixmap::Fl_Pixmap(const unsigned char * const *data);
+Fl_Pixmap::Fl_Pixmap(const unsigned char **data);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructors create a new pixmap from the specified XPM data.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_Pixmap::~Fl_Pixmap();

The destructor free all memory and server resources that are used by -the bitmap.

+the pixmap.

diff --git a/documentation/Fl_RGB_Image.html b/documentation/Fl_RGB_Image.html index 010fcc73a..1504a46aa 100644 --- a/documentation/Fl_RGB_Image.html +++ b/documentation/Fl_RGB_Image.html @@ -3,7 +3,7 @@ -

class Fl_Bitmap

+

class Fl_RGB_Image


Class Hierarchy

@@ -11,41 +11,46 @@

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_RGB_Image class supports caching and drawing +of full-color images with 1 to 4 channels of color information. +Images with an even number of channels are assumed to contain +alpha information, which is used to blend the image with the +contents of the screen.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_RGB_Image::Fl_RGB_Image(const unsigned char *array, int W, int H, int D = 3, int LD = 0);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor creates a new image from the specified data.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_RGB_Image::~Fl_RGB_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/Fl_Text_Buffer.html b/documentation/Fl_Text_Buffer.html index e0b27db16..8ae988a6b 100644 --- a/documentation/Fl_Text_Buffer.html +++ b/documentation/Fl_Text_Buffer.html @@ -1,336 +1,363 @@ - -
-

class Fl_Input

+ + + + + +

class Fl_Text_Buffer

+
+

Class Hierarchy

- + + +

Include Files

- + + +

Description

-

This is the FLTK text input widget. It displays a single line of text -and lets the user edit it. Normally it is drawn with an inset box and -a white background. The text may contain any characters (even 0), and -will correctly display anything, using ^X notation for unprintable -control characters and \nnn notation for unprintable characters with -the high bit set. It assumes the font can draw any characters in the -ISO-8859-1 character set. - -

- - - - - - - - - - - - - - - - - - - - - - - - -
Mouse button 1Moves the cursor to - this point. Drag selects characters. Double click selects words. - Triple click selects all text. Shift+click extends the selection. - When you select text it is automatically copied to the clipboard. -
Mouse button 2Insert the clipboard at -the point clicked. You can also select a region and replace it with the -clipboard by selecting the region with mouse button 2. -
Mouse button 3Currently acts like button 1.
BackspaceDeletes one character to the left, or -deletes the selected region.
EnterMay cause the callback, see when().
^A or HomeGo to start of line.
^B or LeftMove left
^CCopy the selection to the clipboard
^D or DeleteDeletes one character to the right -or deletes the selected region.
^E or EndGo to the end of line.
^F or RightMove right
^KDelete to the end of line (next \n character) -or deletes a single \n character. These deletions are all concatenated -into the clipboard.
^N or DownMove down (for Fl_Multiline_Input -only, otherwise it moves to the next input field).
^P or UpMove up (for Fl_Multiline_Input only, -otherwise it moves to the previous input field).
^UDelete everything.
^V or ^YPaste the clipboard
^X or ^WCopy the region to the clipboard and -delete it.
^Z or ^_Undo. This is a single-level undo -mechanism, but all adjacent deletions and insertions are concatenated -into a single "undo". Often this will undo a lot more than you -expected.
Shift+moveMove the cursor but also extend the -selection.
RightCtrl or -
Compose
Start -a compose-character -sequence. The next one or two keys typed define the character to -insert (see table that follows.) - -

For instance, to type "á" type [compose][a]['] or [compose]['][a]. - -

The character "nbsp" (non-breaking space) is typed by using -[compose][space]. - -

The single-character sequences may be followed by a space if -necessary to remove ambiguity. For instance, if you really want to -type "ª~" rather than "ã" you must type [compose][a][space][~]. - -

The same key may be used to "quote" control characters into the -text. If you need a ^Q character you can get one by typing -[compose][Control+Q]. - -

X may have a key on the keyboard -defined as XK_Multi_key. If so this key may be used as well -as the right-hand control key. You can set this up with the program -xmodmap. - -

If your keyboard is set to support a foreign language you should -also be able to type "dead key" prefix characters. On X you will -actually be able to see what dead key you typed, and if you then move -the cursor without completing the sequence the accent will remain -inserted. -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Character Composition Table
KeysCharKeysCharKeysCharKeysCharKeysCharKeysChar
spnbsp*°` AÀD -Ð` aàd -ð -
!¡+ -±' AÁ~ NÑ' aá~ nñ -
%¢2²A ^Â` OÒ^ aâ` oò -
#£3³~ AÃ' OÓ~ aã' oó -
$¤'´: AÄ^ OÔ: aä^ oô -
y =¥uµ* AÅ~ OÕ* aå~ oõ -
|¦pA EÆ: OÖa eæ: oö -
&§.·, CÇx×, cç- :÷ -
:¨,¸E `ÈO /Ø` eèo /ø -
c©1¹' EÉ` UÙ' eé` uù -
aªoº^ EÊ' UÚ^ eê' uú -
< <«> >»: EË^ UÛ: eë^ uû -
~¬1 4¼` IÌ: UÜ` iì: uü -
-­1 2½' IÍ' YÝ' ií' yý -
r®3 4¾^ IÎT HÞ^ iît hþ -
_¯?¿: IÏs sß: iï: yÿ -
+

The Fl_Text_Buffer class is used by the Fl_Text_Display +and Fl_Text_Editor to manage complex text data and is based upon the +excellent NEdit text editor engine - see +http://www.nedit.org/.

Methods

-
- - -
- - - - - - - - - -
-
-

Fl_Input::Fl_Input(int x, int y, int w, -int h, const char *label = 0)

- Creates a new Fl_Input widget using the given position, size, -and label string. The default boxtype is FL_DOWN_BOX. -

virtual Fl_Input::~Fl_Input()

- Destroys the widget and any value associated with it. -

const char *Fl_Input::value() const -
int Fl_Input::value(const char*) -
int Fl_Input::value(const char*, int)

- The first form returns the current value, which is a pointer to the -internal buffer and is valid only until the next event is handled. -

The second two forms change the text and set the mark and the point -to the end of it. The string is copied to the internal buffer. Passing -NULL is the same as "". This returns non-zero if the new value is -different than the current one. You can use the second version to -directly set the length if you know it already or want to put nul's in -the text.

-

int Fl_Input::static_value(const -char*) -
int Fl_Input::static_value(const char*, int)

- Change the text and set the mark and the point to the end of it. The -string is not copied. If the user edits the string it is copied -to the internal buffer then. This can save a great deal of time and -memory if your program is rapidly changing the values of text fields, -but this will only work if the passed string remains unchanged until -either the Fl_Input is destroyed or value() is called -again. -

int Fl_Input::size() const

- Returns the number of characters in value(). This may be -greater than strlen(value()) if there are nul characters in -it. -

char Fl_Input::index(int) const

- Same as value()[n], but may be faster in plausible -implementations. No bounds checking is done. -

Fl_When Fl_Widget::when() const -
void Fl_Widget::when(Fl_When)

- Controls when callbacks are done. The following values are useful, -the default value is FL_WHEN_RELEASE: + -

Fl_Color Fl_Input::textcolor() const -
void Fl_Input::textcolor(Fl_Color)

- Gets or sets the color of the text in the input field. -

Fl_Font Fl_Input::textfont() const -
void Fl_Input::textfont(Fl_Font)

- Gets or sets the font of the text in the input field. -

uchar Fl_Input::textsize() const -
void Fl_Input::textsize(uchar)

- Gets or sets the size of the text in the input field. -

Fl_Color Fl_Input::cursor_color() -const -
void Fl_Input::cursor_color(Fl_Color)

- Get or set the color of the cursor. This is black by default. - - + +

Fl_Text_Buffer

+ +

~Fl_Text_Buffer

+ +

add_modify_callback

+ +

append

+ +

appendfile

+ +

call_modify_callbacks

+ +

character

+ +

character_width

+ +

clear_rectangular

+ +

copy

+ +

count_displayed_characters

+ +

count_lines

+ +

expand_character

+ +

findchar_backward

+ +

findchar_forward

+ +

findchars_backward

+ +

findchars_forward

+ +

highlight

+ +

highlight_position

+ +

highlight_rectangular

+ +

highlight_selection

+ +

highlight_text

+ +

insert_column

+ +

insertfile

+ +

insert

+ +

length

+ +

line_end

+ +

line_start

+ +

line_text

+ +

loadfile

+ +

null_substitution_character

+ +

outputfile

+ +

overlay_rectangular

+ +

primary_selection

+ +

remove_modify_callback

+ +

remove_rectangular

+ +

remove

+ +

remove_secondary_selection

+ +

remove_selection

+ +

replace_rectangular

+ +

replace

+ +

replace_secondary_selection

+ +

replace_selection

+ +

rewind_lines

+ +

savefile

+ +

search_backward

+ +

search_forward

+ +

secondary_selection_position

+ +

secondary_selection

+ +

secondary_selection_text

+ +

secondary_select_rectangular

+ +

secondary_select

+ +

secondary_unselect

+ +

selected

+ +

selection_position

+ +

selection_text

+ +

select_rectangular

+ +

select

+ +

skip_displayed_characters

+ +

skip_lines

+ +

substitute_null_characters

+ +

tab_distance

+ +

tab_distance

+ +

text_in_rectangle

+ +

text_range

+ +

text

+ +

unhighlight

+ +

unselect

+ +

unsubstitute_null_characters

+ +

word_end

+ +

word_start

+ + + + Fl_Text_Buffer(int requestedSize = 0); + ~Fl_Text_Buffer(); + + int length() { return mLength; } + const char* text(); + void text(const char* text); + const char* text_range(int start, int end); + char character(int pos); + const char* text_in_rectangle(int start, int end, int rectStart, int rectEnd); + void insert(int pos, const char* text); + void append(const char* text) { insert(length(), text); } + void remove(int start, int end); + void replace(int start, int end, const char *text); + void copy(Fl_Text_Buffer* fromBuf, int fromStart, int fromEnd, int toPos); + int insertfile(const char *file, int pos, int buflen = 128*1024); + int appendfile(const char *file, int buflen = 128*1024) + { return insertfile(file, length(), buflen); } + int loadfile(const char *file, int buflen = 128*1024) + { select(0, length()); remove_selection(); return appendfile(file, buflen); } + int outputfile(const char *file, int start, int end, int buflen = 128*1024); + int savefile(const char *file, int buflen = 128*1024) + { return outputfile(file, 0, length(), buflen); } + + void insert_column(int column, int startPos, const char* text, + int* charsInserted, int* charsDeleted); + + void replace_rectangular(int start, int end, int rectStart, int rectEnd, + const char* text); + + void overlay_rectangular(int startPos, int rectStart, int rectEnd, + const char* text, int* charsInserted, + int* charsDeleted); + + void remove_rectangular(int start, int end, int rectStart, int rectEnd); + void clear_rectangular(int start, int end, int rectStart, int rectEnd); + int tab_distance() { return mTabDist; } + void tab_distance(int tabDist); + void select(int start, int end); + int selected() { return mPrimary.selected(); } + void unselect(); + void select_rectangular(int start, int end, int rectStart, int rectEnd); + int selection_position(int* start, int* end); + + int selection_position(int* start, int* end, int* isRect, int* rectStart, + int* rectEnd); + + const char* selection_text(); + void remove_selection(); + void replace_selection(const char* text); + void secondary_select(int start, int end); + void secondary_unselect(); + + void secondary_select_rectangular(int start, int end, int rectStart, + int rectEnd); + + int secondary_selection_position(int* start, int* end, int* isRect, + int* rectStart, int* rectEnd); + + const char* secondary_selection_text(); + void remove_secondary_selection(); + void replace_secondary_selection(const char* text); + void highlight(int start, int end); + void unhighlight(); + void highlight_rectangular(int start, int end, int rectStart, int rectEnd); + + int highlight_position(int* start, int* end, int* isRect, int* rectStart, + int* rectEnd); + + const char* highlight_text(); + void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); + void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); + + void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } + + const char* line_text(int pos); + int line_start(int pos); + int line_end(int pos); + int word_start(int pos); + int word_end(int pos); + int expand_character(int pos, int indent, char *outStr); + + static int expand_character(char c, int indent, char* outStr, int tabDist, + char nullSubsChar); + + static int character_width(char c, int indent, int tabDist, char nullSubsChar); + int count_displayed_characters(int lineStartPos, int targetPos); + int skip_displayed_characters(int lineStartPos, int nChars); + int count_lines(int startPos, int endPos); + int skip_lines(int startPos, int nLines); + int rewind_lines(int startPos, int nLines); + int findchar_forward(int startPos, char searchChar, int* foundPos); + int findchar_backward(int startPos, char searchChar, int* foundPos); + int findchars_forward(int startPos, const char* searchChars, int* foundPos); + int findchars_backward(int startPos, const char* searchChars, int* foundPos); + + int search_forward(int startPos, const char* searchString, int* foundPos, + int matchCase = 0); + + int search_backward(int startPos, const char* searchString, int* foundPos, + int matchCase = 0); + + int substitute_null_characters(char* string, int length); + void unsubstitute_null_characters(char* string); + char null_substitution_character() { return mNullSubsChar; } + Fl_Text_Selection* primary_selection() { return &mPrimary; } + Fl_Text_Selection* secondary_selection() { return &mSecondary; } + Fl_Text_Selection* highlight_selection() { return &mHighlight; } + + + diff --git a/documentation/Fl_XBM_Image.html b/documentation/Fl_XBM_Image.html index 010fcc73a..38a88c28d 100644 --- a/documentation/Fl_XBM_Image.html +++ b/documentation/Fl_XBM_Image.html @@ -3,49 +3,46 @@ -

class Fl_Bitmap

+

class Fl_XBM_Image


Class Hierarchy

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_XBM_Image class supports loading, caching, +and drawing of X Bitmap (XBM) bitmap files.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_XBM_Image::Fl_XBM_Image(const char *filename);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor loads the named XBM file.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_XBM_Image::~Fl_XBM_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/Fl_XPM_Image.html b/documentation/Fl_XPM_Image.html index 010fcc73a..821751937 100644 --- a/documentation/Fl_XPM_Image.html +++ b/documentation/Fl_XPM_Image.html @@ -3,49 +3,46 @@ -

class Fl_Bitmap

+

class Fl_XPM_Image


Class Hierarchy

Include Files

Description

-

The Fl_Bitmap class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.

+

The Fl_XPM_Image class supports loading, caching, +and drawing of X Pixmap (XPM) images, including transparency.

Methods

-

Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);
-Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);

+

Fl_XPM_Image::Fl_XPM_Image(const char *filename);

-

The constructors create a new bitmap from the specified bitmap data.

+

The constructor loads the named XPM image.

-

Fl_Bitmap::~Fl_Bitmap();

+

Fl_XPM_Image::~Fl_XPM_Image();

The destructor free all memory and server resources that are used by -the bitmap.

+the image.

diff --git a/documentation/fltk.book b/documentation/fltk.book index 33ff1c7b5..1d00e2691 100644 --- a/documentation/fltk.book +++ b/documentation/fltk.book @@ -71,6 +71,9 @@ Fl_Select_Browser.html Fl_Single_Window.html Fl_Slider.html Fl_Tabs.html +Fl_Text_Buffer.html +Fl_Text_Display.html +Fl_Text_Editor.html Fl_Tile.html Fl_Tiled_Image.html Fl_Timer.html -- cgit v1.2.3