From c78dcd55ec0b09329c509668507922683f90aab4 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 28 Nov 2001 20:43:44 +0000 Subject: More doco updates. Enable tooltips by default, and don't enable them when setting the tooltip value, since that will negate any changes a program might make when displaying the file chooser dialog, etc. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Text_Display.html | 463 ++++++++++++------------------------- 1 file changed, 148 insertions(+), 315 deletions(-) (limited to 'documentation/Fl_Text_Display.html') diff --git a/documentation/Fl_Text_Display.html b/documentation/Fl_Text_Display.html index a99da8d93..68ddd6db9 100644 --- a/documentation/Fl_Text_Display.html +++ b/documentation/Fl_Text_Display.html @@ -1,336 +1,169 @@ - + + + +

class Fl_Input

+
+

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ÿ -
+

This is the FLTK text display widget. It allows the user to +view multiple lines of text and supports highlighting and +scrolling. The buffer that is displayed in the widget is managed +by the Fl_Text_Buffer +class. +

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_Display(int X, int Y, int W, int H, const char *l = 0);

+ + +

~Fl_Text_Display();

+ + +

void buffer(Fl_Text_Buffer* buf);
+void buffer(Fl_Text_Buffer& buf);
+Fl_Text_Buffer* buffer();

+ +

void cursor_style(int style);

+ + +

void hide_cursor();

+ + +

void highlight_data(Fl_Text_Buffer *styleBuffer, +Style_Table_Entry *styleTable, int nStyles, char +unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void +*cbArg);

+ + +

int in_selection(int x, int y);

+ + +

void insert(const char* text);

+ + +

void insert_position(int newPos);
+int insert_position()

+ + +

int move_down();

+ + +

int move_left();

+ + +

int move_right();

+ + +

int move_up();

+ + +

void next_word(void);

+ + +

void overstrike(const char* text);

+ + +

int position_style(int lineStartPos, int lineLen, int lineIndex, +int dispIndex);

+ + +

void previous_word(void);

+ + +

void redisplay_range(int start, int end);

+ + +

void scrollbar_align(Fl_Align a);
+Fl_Align scrollbar_align();

+ + +

void scrollbar_width(int w);
+int scrollbar_width();

+ + +

void scroll(int topLineNum, int horizOffset);

+ + +

void show_cursor(int b = 1);

+ + +

void show_insert_position();

+ + +

void textcolor(unsigned n);
+Fl_Color textcolor() const;

+ + +

void textfont(uchar s);
+Fl_Font textfont() const;

+ + +

void textsize(uchar s);
+uchar textsize() const;

+ + +

int word_end(int pos);

+ + +

int word_start(int pos);

+ + + + -- cgit v1.2.3