fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Input_ Class Reference

#include <Fl_Input_.H>

Inheritance diagram for Fl_Input_:
Collaboration diagram for Fl_Input_:

List of all members.

Public Member Functions

void resize (int, int, int, int)
 Fl_Input_ (int, int, int, int, const char *=0)
 ~Fl_Input_ ()
int value (const char *)
int value (const char *, int)
int static_value (const char *)
int static_value (const char *, int)
const char * value () const
Fl_Char index (int i) const
int size () const
void size (int W, int H)
int maximum_size () const
void maximum_size (int m)
int position () const
int mark () const
int position (int p, int m)
int position (int p)
int mark (int m)
int replace (int, int, const char *, int=0)
int cut ()
int cut (int n)
int cut (int a, int b)
int insert (const char *t, int l=0)
int copy (int clipboard)
int undo ()
int copy_cuts ()
int shortcut () const
void shortcut (int s)
Fl_Font textfont () const
void textfont (Fl_Font s)
Fl_Fontsize textsize () const
void textsize (Fl_Fontsize s)
Fl_Color textcolor () const
void textcolor (Fl_Color n)
Fl_Color cursor_color () const
void cursor_color (Fl_Color n)
int input_type () const
void input_type (int t)
int readonly () const
void readonly (int b)
int wrap () const
void wrap (int b)
void tab_nav (int val)
int tab_nav () const

Protected Member Functions

int word_start (int i) const
int word_end (int i) const
int line_start (int i) const
int line_end (int i) const
void drawtext (int, int, int, int)
int up_down_position (int, int keepmark=0)
void handle_mouse (int, int, int, int, int keepmark=0)
int handletext (int e, int, int, int, int)
void maybe_do_callback ()
int xscroll () const
int yscroll () const
void yscroll (int y)
int linesPerPage ()

Detailed Description

This class provides a low-overhead text input field.

This is a virtual base class below Fl_Input. It has all the same interfaces, but lacks the handle() and draw() method. You may want to subclass it if you are one of those people who likes to change how the editing keys work. It may also be useful for adding scrollbars to the input field.

This can act like any of the subclasses of Fl_Input, by setting type() to one of the following values:

  #define FL_NORMAL_INPUT          0
  #define FL_FLOAT_INPUT           1
  #define FL_INT_INPUT             2
  #define FL_MULTILINE_INPUT       4
  #define FL_SECRET_INPUT          5
  #define FL_INPUT_TYPE            7
  #define FL_INPUT_READONLY        8
  #define FL_NORMAL_OUTPUT         (FL_NORMAL_INPUT | FL_INPUT_READONLY)
  #define FL_MULTILINE_OUTPUT      (FL_MULTILINE_INPUT | FL_INPUT_READONLY)
  #define FL_INPUT_WRAP            16
  #define FL_MULTILINE_INPUT_WRAP  (FL_MULTILINE_INPUT | FL_INPUT_WRAP)
  #define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP)

All variables that represent an index into a text buffer are byte-oriented, not character oriented. Since UTF-8 characters can be up to six bytes long, simply incrementing such an index will not reliably advance to the next character in the text buffer.

Indices and pointers into the text buffer should always point at a 7 bit ASCII character or the beginning of a UTF-8 character sequence. Behavior for false UTF-8 sequences and pointers into the middle of a sequence are undefined.

See also:
Fl_Text_Display, Fl_Text_Editor for more powerful text handling widgets

Definition at line 102 of file Fl_Input_.H.


Constructor & Destructor Documentation

Fl_Input_::Fl_Input_ ( int  X,
int  Y,
int  W,
int  H,
const char *  l = 0 
)

Creates a new Fl_Input_ widget.

This function creates a new Fl_Input_ widget and adds it to the current Fl_Group. The value() is set to NULL. The default boxtype is FL_DOWN_BOX.

Parameters:
X,Y,W,Hthe dimensions of the new widget
lan optional label text

Definition at line 1045 of file Fl_Input_.cxx.

References Fl_Widget::align(), Fl_Widget::box(), Fl_Widget::color(), FL_ALIGN_LEFT, FL_BACKGROUND2_COLOR, FL_DOWN_BOX, FL_FOREGROUND_COLOR, FL_HELVETICA, FL_NORMAL_SIZE, FL_SELECTION_COLOR, Fl_Widget::set_flag(), Fl_Widget::SHORTCUT_LABEL, and tab_nav().

Fl_Input_::~Fl_Input_ ( )

Destroys the widget.

The destructor clears all allocated buffers and removes the widget from the parent Fl_Group.

Definition at line 1225 of file Fl_Input_.cxx.


Member Function Documentation

int Fl_Input_::copy ( int  clipboard)

Put the current selection into the clipboard.

This function copies the current selection between mark() and position() into the specified clipboard. This does not replace the old clipboard contents if position() and mark() are equal. Clipboard 0 maps to the current text selection and clipboard 1 maps to the cut/paste clipboard.

Parameters:
clipboardthe clipboard destination 0 or 1
Returns:
0 if no text is selected, 1 if the selection was copied
See also:
Fl::copy(const char *, int, int)

Definition at line 682 of file Fl_Input_.cxx.

References b, FL_SECRET_INPUT, input_type(), mark(), position(), and value().

Referenced by copy_cuts(), Fl_Input::handle(), and handletext().

int Fl_Input_::copy_cuts ( )

Copies the yank buffer to the clipboard.

This method copies all the previous contiguous cuts from the undo information to the clipboard. This function implements the ^K shortcut key.

Returns:
0 if the operation did not change the clipboard
See also:
copy(int), cut()

Definition at line 897 of file Fl_Input_.cxx.

References copy(), FL_SECRET_INPUT, and input_type().

Fl_Color Fl_Input_::cursor_color ( ) const [inline]

Gets the color of the cursor.

Returns:
the current cursor color

Definition at line 416 of file Fl_Input_.H.

Referenced by drawtext().

void Fl_Input_::cursor_color ( Fl_Color  n) [inline]

Sets the color of the cursor. The default color for the cursor is FL_BLACK.

Parameters:
[in]nthe new cursor color

Definition at line 421 of file Fl_Input_.H.

int Fl_Input_::cut ( ) [inline]

Deletes the current selection.

This function deletes the currently selected text without storing it in the clipboard. To use the clipboard, you may call copy() first or copy_cuts() after this call.

Returns:
0 if no data was copied

Definition at line 321 of file Fl_Input_.H.

References Fl_Widget::position().

int Fl_Input_::cut ( int  a,
int  b 
) [inline]

Deletes all characters between index a and b.

This function deletes the currently selected text without storing it in the clipboard. To use the clipboard, you may call copy() first or copy_cuts() after this call.

Parameters:
a,brange of bytes rounded to full characters and clamped to the buffer
Returns:
0 if no data was copied

Definition at line 348 of file Fl_Input_.H.

int Fl_Input_::cut ( int  n) [inline]

Deletes the next n bytes rounded to characters before or after the cursor.

This function deletes the currently selected text without storing it in the clipboard. To use the clipboard, you may call copy() first or copy_cuts() after this call.

Parameters:
nnumber of bytes rounded to full characters and clamped to the buffer. A negative number will cut characters to the left of the cursor.
Returns:
0 if no data was copied

Definition at line 335 of file Fl_Input_.H.

References Fl_Widget::position().

void Fl_Input_::drawtext ( int  X,
int  Y,
int  W,
int  H 
) [protected]

Draws the text in the passed bounding box.

If damage() & FL_DAMAGE_ALL is true, this assumes the area has already been erased to color(). Otherwise it does minimal update and erases the area itself.

Parameters:
X,Y,W,Harea that must be redrawn

Definition at line 215 of file Fl_Input_.cxx.

References Fl_Widget::active_r(), Fl_Widget::box(), Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), Fl_Widget::color(), cursor_color(), Fl_Widget::damage(), Fl_Widget::draw_box(), f, fl_color(), fl_contrast(), FL_DAMAGE_ALL, fl_descent(), fl_draw(), fl_height(), fl_inactive(), fl_line(), FL_MULTILINE_INPUT, fl_pop_clip(), fl_push_clip(), fl_rectf(), fl_set_spot(), Fl::focus(), H, height, input_type(), int, mark(), MAXBUF, position(), Fl::pushed(), readonly(), Fl_Widget::selection_color(), size(), textcolor(), textfont(), textsize(), value(), and Fl_Widget::window().

Referenced by Fl_Input::draw(), and Fl_File_Input::draw().

void Fl_Input_::handle_mouse ( int  X,
int  Y,
int  ,
int  ,
int  drag = 0 
) [protected]

Handles mouse clicks and mouse moves.

Todo:
Add comment and parameters

Definition at line 500 of file Fl_Input_.cxx.

References Fl::event_clicks(), Fl::event_x(), Fl::event_y(), f, fl_height(), FL_MULTILINE_INPUT, fl_utf8len(), input_type(), line_end(), line_start(), mark(), MAXBUF, position(), size(), value(), word_end(), and word_start().

Referenced by Fl_Input::handle(), and handletext().

unsigned int Fl_Input_::index ( int  i) const

Returns the character at index i.

This function returns the UTF-8 character at i as a ucs4 character code.

Parameters:
[in]iindex into the value field
Returns:
the character at index i

Definition at line 1253 of file Fl_Input_.cxx.

References fl_utf8decode().

Referenced by line_end(), line_start(), replace(), undo(), word_end(), and word_start().

int Fl_Input_::input_type ( ) const [inline]

Gets the input field type.

Returns:
the current input type

Definition at line 425 of file Fl_Input_.H.

References FL_INPUT_TYPE, and Fl_Widget::type().

Referenced by copy(), copy_cuts(), Fl_Input::draw(), drawtext(), Fl_Input::handle(), handle_mouse(), handletext(), line_end(), line_start(), linesPerPage(), replace(), word_end(), and word_start().

void Fl_Input_::input_type ( int  t) [inline]

Sets the input field type. A redraw() is required to reformat the input field.

Parameters:
[in]tnew input type

Definition at line 430 of file Fl_Input_.H.

References Fl_Widget::type().

int Fl_Input_::insert ( const char *  t,
int  l = 0 
) [inline]

Inserts text at the cursor position.

This function inserts the string in t at the cursor position() and moves the new position and mark to the end of the inserted text.

Parameters:
[in]ttext that will be inserted
[in]llength of text, or 0 if the string is terminated by nul.
Returns:
0 if no text was inserted

Definition at line 361 of file Fl_Input_.H.

int Fl_Input_::line_end ( int  i) const [protected]

Finds the end of a line.

This call calculates the end of a line based on the given index i.

Parameters:
[in]istarting index for the search
Returns:
end of the line

Definition at line 450 of file Fl_Input_.cxx.

References FL_MULTILINE_INPUT, i, index(), input_type(), MAXBUF, size(), value(), and wrap().

Referenced by handle_mouse().

int Fl_Input_::line_start ( int  i) const [protected]

Finds the start of a line.

This call calculates the start of a line based on the given index i.

Parameters:
[in]istarting index for the search
Returns:
start of the line

Definition at line 480 of file Fl_Input_.cxx.

References FL_MULTILINE_INPUT, i, index(), input_type(), MAXBUF, value(), and wrap().

Referenced by Fl_Input::handle(), and handle_mouse().

int Fl_Input_::linesPerPage ( ) [protected]
int Fl_Input_::mark ( ) const [inline]

Gets the current selection mark.

Returns:
index into the text

Definition at line 288 of file Fl_Input_.H.

Referenced by copy(), drawtext(), Fl_Input::handle(), handle_mouse(), and handletext().

int Fl_Input_::mark ( int  m) [inline]

Sets the current selection mark. mark(n) is the same as position(position(),n).

Parameters:
mnew index of the mark
Returns:
0 if the mark did not change
See also:
position(), position(int, int)

Definition at line 306 of file Fl_Input_.H.

References Fl_Widget::position().

int Fl_Input_::maximum_size ( ) const [inline]

Gets the maximum length of the input field.

Todo:
It is not clear if this function is actually required

Definition at line 274 of file Fl_Input_.H.

void Fl_Input_::maximum_size ( int  m) [inline]

Sets the maximum length of the input field.

Todo:
It is not clear if this function is actually required

Definition at line 278 of file Fl_Input_.H.

References m.

void Fl_Input_::maybe_do_callback ( ) [protected]
int Fl_Input_::position ( ) const [inline]

Gets the position of the text cursor.

Returns:
the cursor position as an index
See also:
position(int, int)

Definition at line 284 of file Fl_Input_.H.

Referenced by copy(), drawtext(), Fl_Input::handle(), handle_mouse(), handletext(), static_value(), up_down_position(), and Fl_File_Chooser::value().

int Fl_Input_::position ( int  p,
int  m 
)

Sets the index for the cursor and mark.

The input widget maintains two pointers into the string. The position (p) is where the cursor is. The mark (m) is the other end of the selected text. If they are equal then there is no selection. Changing this does not affect the clipboard (use copy() to do that).

Changing these values causes a redraw(). The new values are bounds checked.

Parameters:
pindex for the cursor position
mindex for the mark
Returns:
0 if no positions changed
See also:
position(int), position(), mark(int)

Reimplemented from Fl_Widget.

Definition at line 590 of file Fl_Input_.cxx.

References Fl_Widget::damage(), FL_DAMAGE_EXPOSE, fl_utf8len(), Fl::focus(), m, size(), and value().

int Fl_Input_::position ( int  p) [inline]

Set the cursor position and mark. position(n) is the same as position(n, n).

Parameters:
pnew index for cursor and mark
Returns:
0 if no positions changed
See also:
position(int, int), position(), mark(int)

Definition at line 299 of file Fl_Input_.H.

References position().

Referenced by position().

int Fl_Input_::readonly ( ) const [inline]

Gets the read-only state of the input field.

Returns:
non-zero if this widget is read-only

Definition at line 434 of file Fl_Input_.H.

References FL_INPUT_READONLY, and Fl_Widget::type().

Referenced by drawtext(), Fl_Input::handle(), handletext(), and static_value().

void Fl_Input_::readonly ( int  b) [inline]

Sets the read-only state of the input field.

Parameters:
[in]bif b is 0, the text in this widget can be edited by the user

Definition at line 438 of file Fl_Input_.H.

References FL_INPUT_READONLY, and Fl_Widget::type().

int Fl_Input_::replace ( int  b,
int  e,
const char *  text,
int  ilen = 0 
)

Deletes text from b to e and inserts the new string text.

All changes to the text buffer go through this function. It deletes the region between a and b (either one may be less or equal to the other), and then inserts the string text at that point and moves the mark() and position() to the end of the insertion. Does the callback if when() & FL_WHEN_CHANGED and there is a change.

Set b and e equal to not delete anything. Set text to NULL to not insert anything.

ilen can be zero or strlen(text), which saves a tiny bit of time if you happen to already know the length of the insertion, or can be used to insert a portion of a string.

b and e are clamped to the 0..size() range, so it is safe to pass any values.

cut() and insert() are just inline functions that call replace().

Parameters:
[in]bbeginning index of text to be deleted
[in]eending index of text to be deleted and insertion position
[in]textstring that will be inserted
[in]ilenlength of text or 0 for nul terminated strings
Returns:
0 if nothing changed

Definition at line 745 of file Fl_Input_.cxx.

References b, Fl_Widget::do_callback(), FL_SECRET_INPUT, fl_utf8len(), FL_WHEN_CHANGED, i, index(), input_type(), Fl_Widget::set_changed(), Fl_Widget::when(), and wrap().

Referenced by handletext().

void Fl_Input_::resize ( int  X,
int  Y,
int  W,
int  H 
) [virtual]

Changes the size of the widget. This call updates the text layout so that the cursor is visible.

Parameters:
[in]X,Y,W,Hnew size of the widget
See also:
Fl_Widget::resize(int, int, int, int)

Reimplemented from Fl_Widget.

Definition at line 1213 of file Fl_Input_.cxx.

References Fl_Widget::h(), and Fl_Widget::w().

Referenced by Fl_Value_Input::resize(), and resizeform().

int Fl_Input_::shortcut ( ) const [inline]

Return the shortcut key associated with this widget.

Returns:
shortcut keystroke
See also:
Fl_Button::shortcut()

Definition at line 375 of file Fl_Input_.H.

Referenced by Fl_Widget_Type::copy_properties(), Fl_Input_Type::copy_properties(), handletext(), shortcut_in_cb(), and Fl_Widget_Type::write_properties().

void Fl_Input_::shortcut ( int  s) [inline]

Sets the shortcut key associated with this widget. Pressing the shortcut key gives text editing focus to this widget.

Parameters:
[in]snew shortcut keystroke
See also:
Fl_Button::shortcut()

Definition at line 383 of file Fl_Input_.H.

int Fl_Input_::size ( ) const [inline]

Returns the number of bytes in value().

This may be greater than strlen(value()) if there are nul characters in the text.

Returns:
number of bytes in the text

Definition at line 265 of file Fl_Input_.H.

Referenced by Fl_File_Input::draw(), drawtext(), Fl_Input::handle(), handle_mouse(), handletext(), line_end(), position(), static_value(), and word_end().

void Fl_Input_::size ( int  W,
int  H 
) [inline]

Sets the width and height of this widget.

Parameters:
[in]W,Hnew width and height
See also:
Fl_Widget::size(int, int)

Reimplemented from Fl_Widget.

Definition at line 270 of file Fl_Input_.H.

References size.

int Fl_Input_::static_value ( const char *  str)

Changes the widget text.

This function changes the text and sets 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.

Parameters:
[in]strthe new text
Returns:
non-zero if the new value is different than the current one

Definition at line 1167 of file Fl_Input_.cxx.

Referenced by image_cb(), inactive_cb(), label_cb(), name_cb(), Fl_Class_Type::open(), Fl_DeclBlock_Type::open(), Fl_Data_Type::open(), Fl_Decl_Type::open(), Fl_CodeBlock_Type::open(), Fl_Function_Type::open(), subclass_cb(), tooltip_cb(), user_data_cb(), user_data_type_cb(), v_input_cb(), and value().

int Fl_Input_::static_value ( const char *  str,
int  len 
)

Changes the widget text.

This function changes the text and sets 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.

You can use the len parameter to directly set the length if you know it already or want to put nul characters in the text.

Parameters:
[in]strthe new text
[in]lenthe length of the new text
Returns:
non-zero if the new value is different than the current one

Definition at line 1123 of file Fl_Input_.cxx.

References Fl_Widget::clear_changed(), i, position(), readonly(), and size().

void Fl_Input_::tab_nav ( int  val) [inline]

Sets whether the Tab key does focus navigation, or inserts tab characters into Fl_Multiline_Input.

By default this flag is enabled to provide the 'normal' behavior most users expect; Tab navigates focus to the next widget. To inserting an actual Tab character, users can use Ctrl-I or copy/paste.

Disabling this flag gives the old FLTK behavior where Tab inserts a tab character into the text field, in which case only the mouse can be used to navigate to the next field.

History: This flag was provided for backwards support of FLTK's old 1.1.x behavior where Tab inserts a tab character instead of navigating focus to the next widget. This behavior was unique to Fl_Multiline_Input. With the advent of Fl_Text_Editor, this old behavior has been deprecated.

Parameters:
[in]valIf val is 1, Tab advances focus (default).
If val is 0, Tab inserts a tab character (old FLTK behavior).

Definition at line 475 of file Fl_Input_.H.

References val.

int Fl_Input_::tab_nav ( ) const [inline]

Gets whether the Tab key causes focus navigation in multiline input fields or not.

If enabled (default), hitting Tab causes focus navigation to the next widget.

If disabled, hitting Tab inserts a tab character into the text field.

Returns:
1 if Tab advances focus (default), 0 if Tab inserts tab characters.
See also:
tab_nav(int)

Definition at line 488 of file Fl_Input_.H.

Referenced by Fl_Input_(), and Fl_Input::handle().

Fl_Color Fl_Input_::textcolor ( ) const [inline]

Gets the color of the text in the input field.

Returns:
the text color
See also:
textcolor(Fl_Color)

Definition at line 406 of file Fl_Input_.H.

Referenced by Fl_Input_Type::copy_properties(), and drawtext().

void Fl_Input_::textcolor ( Fl_Color  n) [inline]

Sets the color of the text in the input field. The text color defaults to FL_FOREGROUND_COLOR.

Parameters:
[in]nnew text color
See also:
textcolor()

Definition at line 412 of file Fl_Input_.H.

void Fl_Input_::textfont ( Fl_Font  s) [inline]

Sets the font of the text in the input field. The text font defaults to FL_HELVETICA.

Parameters:
[in]sthe new text font

Definition at line 392 of file Fl_Input_.H.

void Fl_Input_::textsize ( Fl_Fontsize  s) [inline]

Sets the size of the text in the input field. The text height defaults to FL_NORMAL_SIZE.

Parameters:
[in]sthe new font height in pixel units

Definition at line 401 of file Fl_Input_.H.

int Fl_Input_::undo ( )

Undoes previous changes to the text buffer.

This call undoes a number of previous calls to replace().

Returns:
non-zero if any change was made.

Definition at line 847 of file Fl_Input_.cxx.

References b, Fl_Widget::do_callback(), FL_WHEN_CHANGED, index(), Fl_Widget::set_changed(), Fl_Widget::when(), and wrap().

int Fl_Input_::up_down_position ( int  i,
int  keepmark = 0 
) [protected]

Moves the cursor to the column given by up_down_pos.

This function is helpful when implementing up and down cursor movement. It moves the cursor from the beginning of a line to the column indicated by the global variable up_down_pos in pixel units.

Parameters:
[in]iindex into the beginning of a line of text
[in]keepmarkif set, move only the cursor, but not the mark
Returns:
index to new cursor position

Definition at line 650 of file Fl_Input_.cxx.

References f, i, int, MAXBUF, position(), and value().

Referenced by Fl_Input::handle().

const char* Fl_Input_::value ( ) const [inline]

Returns the text displayed in the widget.

This function returns the current value, which is a pointer to the internal buffer and is valid only until the next event is handled.

Returns:
pointer to an internal buffer - do not free() this
See also:
Fl_Input_::value(const char*)

Definition at line 252 of file Fl_Input_.H.

Referenced by copy(), drawtext(), handle_mouse(), line_end(), line_start(), position(), up_down_position(), and value().

int Fl_Input_::value ( const char *  str,
int  len 
)

Changes the widget text.

This function changes the text and sets the mark and the point to the end of it. The string is copied to the internal buffer. Passing NULL is the same as "".

You can use the length parameter to directly set the length if you know it already or want to put nul characters in the text.

Parameters:
[in]strthe new text
[in]lenthe length of the new text
Returns:
non-zero if the new value is different than the current one
See also:
Fl_Input_::value(const char* str), Fl_Input_::value()

Reimplemented in Fl_File_Input.

Definition at line 1186 of file Fl_Input_.cxx.

References static_value().

int Fl_Input_::value ( const char *  str)

Changes the widget text.

This function changes the text and sets the mark and the point to the end of it. The string is copied to the internal buffer. Passing NULL is the same as "".

Parameters:
[in]strthe new text
Returns:
non-zero if the new value is different than the current one
See also:
Fl_Input_::value(const char* str, int len), Fl_Input_::value()

Reimplemented in Fl_File_Input.

Definition at line 1203 of file Fl_Input_.cxx.

References value().

Referenced by code_input_cb(), grid_cb(), header_input_cb(), i18n_int_cb(), i18n_text_cb(), i18n_type_cb(), image_browse_cb(), image_cb(), inactive_browse_cb(), inactive_cb(), label_cb(), make_shell_window(), name_cb(), new_cb(), Fl_Class_Type::open(), Fl_DeclBlock_Type::open(), Fl_Data_Type::open(), Fl_Decl_Type::open(), Fl_CodeBlock_Type::open(), Fl_Function_Type::open(), print_cb(), save_template_cb(), show_grid_cb(), show_project_cb(), Fl_PostScript_Printer::start_job(), subclass_cb(), tooltip_cb(), user_data_cb(), user_data_type_cb(), v_input_cb(), Fl_Output_Type::widget(), Fl_Input_Type::widget(), and xclass_cb().

int Fl_Input_::word_end ( int  i) const [protected]

Finds the end of a word.

This call calculates the end of a word based on the given index i. Calling this function repeatedly will move forwards to the end of the text.

Parameters:
[in]istarting index for the search
Returns:
end of the word

Definition at line 414 of file Fl_Input_.cxx.

References FL_SECRET_INPUT, i, index(), input_type(), and size().

Referenced by handle_mouse().

int Fl_Input_::word_start ( int  i) const [protected]

Finds the start of a word.

This call calculates the start of a word based on the given index i. Calling this function repeatedly will move backwards to the beginning of the text.

Parameters:
[in]istarting index for the search
Returns:
start of the word

Definition at line 432 of file Fl_Input_.cxx.

References FL_SECRET_INPUT, i, index(), and input_type().

Referenced by handle_mouse().

void Fl_Input_::wrap ( int  b) [inline]

Sets the word wrapping state of the input field. Word wrap is only functional with multi-line input fields.

Definition at line 451 of file Fl_Input_.H.

References FL_INPUT_WRAP, and Fl_Widget::type().

int Fl_Input_::wrap ( ) const [inline]

Gets the word wrapping state of the input field. Word wrap is only functional with multi-line input fields.

Definition at line 445 of file Fl_Input_.H.

References FL_INPUT_WRAP, and Fl_Widget::type().

Referenced by line_end(), line_start(), replace(), and undo().

int Fl_Input_::xscroll ( ) const [inline, protected]

Definition at line 210 of file Fl_Input_.H.

int Fl_Input_::yscroll ( ) const [inline, protected]

Definition at line 213 of file Fl_Input_.H.

void Fl_Input_::yscroll ( int  y) [inline, protected]

Definition at line 214 of file Fl_Input_.H.

References Fl_Widget::damage(), FL_DAMAGE_EXPOSE, and Fl_Widget::y().


The documentation for this class was generated from the following files: