Add documentation for readonly() and input_type().

Fix "make distclean" so that it removes all of the library files.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-08 12:44:52 +00:00
parent 84bccaf8e7
commit c56bb65a97
3 changed files with 341 additions and 222 deletions

View File

@ -1,10 +1,15 @@
<HTML><BODY> <HTML>
<BODY>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<H2><A name=Fl_Input>class Fl_Input</A></H2> <H2><A name=Fl_Input>class Fl_Input</A></H2>
<HR> <HR>
<H3>Class Hierarchy</H3> <H3>Class Hierarchy</H3>
<UL>
<PRE> <UL><PRE>
<A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A> <A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A>
| |
+----<B>Fl_Input</B> +----<B>Fl_Input</B>
@ -12,22 +17,23 @@
+----<A href="Fl_File_Input.html">Fl_File_Input</A>, <A href=Fl_Float_Input.html#Fl_Float_Input>Fl_Float_Input</A>, +----<A href="Fl_File_Input.html">Fl_File_Input</A>, <A href=Fl_Float_Input.html#Fl_Float_Input>Fl_Float_Input</A>,
<A href=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A>, <A href=Fl_Multiline_Input.html#Fl_Multiline_Input>Fl_Multiline_Input</A>, <A href=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A>, <A href=Fl_Multiline_Input.html#Fl_Multiline_Input>Fl_Multiline_Input</A>,
<A href=Fl_Output.html#Fl_Output>Fl_Output</A>, <A href=Fl_Secret_Input.html#Fl_Secret_Input>Fl_Secret_Input</A> <A href=Fl_Output.html#Fl_Output>Fl_Output</A>, <A href=Fl_Secret_Input.html#Fl_Secret_Input>Fl_Secret_Input</A>
</PRE> </PRE></UL>
</UL>
<H3>Include Files</H3> <H3>Include Files</H3>
<UL>
<PRE> <UL><PRE>
#include &lt;FL/Fl_Input.H&gt; #include &lt;FL/Fl_Input.H&gt;
</PRE> </PRE></UL>
</UL>
<H3>Description</H3> <H3>Description</H3>
<P>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 <P>This is the FLTK text input widget. It displays a single line
a white background. The text may contain any characters (even 0), and of text and lets the user edit it. Normally it is drawn with an
will correctly display anything, using ^X notation for unprintable inset box and a white background. The text may contain any
control characters and \nnn notation for unprintable characters with characters (even 0), and will correctly display anything, using
the high bit set. It assumes the font can draw any characters in the ^X notation for unprintable control characters and \nnn notation
ISO-8859-1 character set. for unprintable characters with the high bit set. It assumes the
font can draw any characters in the ISO-8859-1 character set.
<CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings."> <CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings.">
@ -240,6 +246,7 @@ inserted.
</TD><TD align=left valign=top> </TD><TD align=left valign=top>
<UL> <UL>
<LI><A href=#Fl_Input.index>index</A></LI> <LI><A href=#Fl_Input.index>index</A></LI>
<LI><A href=#Fl_Input.readonly>readonly</A></LI>
<LI><A href=#Fl_Input.size>size</A></LI> <LI><A href=#Fl_Input.size>size</A></LI>
</UL> </UL>
</TD><TD align=left valign=top> </TD><TD align=left valign=top>
@ -260,78 +267,115 @@ inserted.
</TD></TR> </TD></TR>
</TABLE> </TABLE>
</CENTER> </CENTER>
<H4><A name=Fl_Input.Fl_Input>Fl_Input::Fl_Input(int x, int y, int w,
int h, const char *label = 0)</A></H4>
Creates a new <TT>Fl_Input</TT> widget using the given position, size,
and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
<H4><A name=Fl_Input.~Fl_Input>virtual Fl_Input::~Fl_Input()</A></H4>
Destroys the widget and any value associated with it.
<H4><A name=Fl_Input.value>const char *Fl_Input::value() const
<BR> int Fl_Input::value(const char*)
<BR> int Fl_Input::value(const char*, int)</A></H4>
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.
<P>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 <TT>
NULL</TT> is the same as &quot;&quot;. 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. </P>
<H4><A name=Fl_Input.static_value>int Fl_Input::static_value(const
char*)
<BR> int Fl_Input::static_value(const char*, int)</A></H4>
Change the text and set the mark and the point to the end of it. The
string is <I>not</I> 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 <TT>Fl_Input</TT> is destroyed or <TT>value()</TT> is called
again.
<H4><A name=Fl_Input.size>int Fl_Input::size() const</A></H4>
Returns the number of characters in <TT>value()</TT>. This may be
greater than <TT>strlen(value())</TT> if there are nul characters in
it.
<H4><A name=Fl_Input.index>char Fl_Input::index(int) const</A></H4>
Same as <TT>value()[n]</TT>, but may be faster in plausible
implementations. No bounds checking is done.
<H4><A name=Fl_Input.when>Fl_When Fl_Widget::when() const
<BR> void Fl_Widget::when(Fl_When)</A></H4>
Controls when callbacks are done. The following values are useful,
the default value is <TT>FL_WHEN_RELEASE</TT>:
<UL>
<LI><TT>0</TT>: The callback is not done, but <TT>changed()</TT> is
turned on. </LI>
<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each time the text
is changed by the user. </LI>
<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done when this
widget loses the focus, including when the window is unmapped. This
is a useful value for text fields in a panel where doing the callback
on every change is wasteful. However the callback will also happen if
the mouse is moved out of the window, which means it should not do
anything visible (like pop up an error message). You might do better
setting this to zero, and scanning all the items for <TT>changed()</TT>
when the OK button on a panel is pressed. </LI>
<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the Enter key, the
entire text is selected, and the callback is done if the text has
changed. Normally the Enter key will navigate to the next field (or
insert a newline for a <TT>Fl_Mulitline_Input</TT>), this changes the
behavior. </LI>
<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The Enter key will
do the callback even if the text has not changed. Useful for command
fields. </LI>
</UL>
<H4><A name=Fl_Input.textcolor>Fl_Color Fl_Input::textcolor() const
<BR> void Fl_Input::textcolor(Fl_Color)</A></H4>
Gets or sets the color of the text in the input field.
<H4><A name=Fl_Input.textfont>Fl_Font Fl_Input::textfont() const
<BR> void Fl_Input::textfont(Fl_Font)</A></H4>
Gets or sets the font of the text in the input field.
<H4><A name=Fl_Input.textsize>uchar Fl_Input::textsize() const
<BR> void Fl_Input::textsize(uchar)</A></H4>
Gets or sets the size of the text in the input field.
<H4><A name=Fl_Input.cursor_color>Fl_Color Fl_Input::cursor_color()
const
<BR> void Fl_Input::cursor_color(Fl_Color)</A></H4>
Get or set the color of the cursor. This is black by default.
</BODY></HTML> <H4><A name="Fl_Input.Fl_Input">Fl_Input::Fl_Input(int x, int y, int w,
int h, const char *label = 0)</A></H4>
<P>Creates a new <TT>Fl_Input</TT> widget using the given position, size,
and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
<H4><A name="Fl_Input.~Fl_Input">virtual Fl_Input::~Fl_Input()</A></H4>
<P>Destroys the widget and any value associated with it.
<H4><A name="Fl_Input.value">const char *Fl_Input::value() const
<BR>int Fl_Input::value(const char*)
<BR>int Fl_Input::value(const char*, int)</A></H4>
<P>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.
<P>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 <TT>NULL</TT> is the same as &quot;&quot;.
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.</P>
<H4><A name="Fl_Input.static_value">int Fl_Input::static_value(const
char*)
<BR>int Fl_Input::static_value(const char*, int)</A></H4>
<P>Change the text and set the mark and the point to the end of
it. The string is <I>not</I> 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
<TT>Fl_Input</TT> is destroyed or <TT>value()</TT> is called
again.
<H4><A name="Fl_Input.size">int Fl_Input::size() const</A></H4>
<P>Returns the number of characters in <TT>value()</TT>. This
may be greater than <TT>strlen(value())</TT> if there are nul
characters in it.
<H4><A name="Fl_Input.index">char Fl_Input::index(int) const</A></H4>
<P>Same as <TT>value()[n]</TT>, but may be faster in plausible
implementations. No bounds checking is done.
<H4><A name="Fl_Input.when">Fl_When Fl_Widget::when() const
<BR>void Fl_Widget::when(Fl_When)</A></H4>
<P>Controls when callbacks are done. The following values are useful,
the default value is <TT>FL_WHEN_RELEASE</TT>:
<UL>
<LI><TT>0</TT>: The callback is not done, but
<TT>changed()</TT> is turned on.</LI>
<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each
time the text is changed by the user.</LI>
<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done
when this widget loses the focus, including when the
window is unmapped. This is a useful value for text
fields in a panel where doing the callback on every
change is wasteful. However the callback will also
happen if the mouse is moved out of the window, which
means it should not do anything visible (like pop up an
error message). You might do better setting this to
zero, and scanning all the items for <TT>changed()</TT>
when the OK button on a panel is pressed.</LI>
<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the
Enter key, the entire text is selected, and the callback
is done if the text has changed. Normally the Enter key
will navigate to the next field (or insert a newline for
a <TT>Fl_Mulitline_Input</TT>), this changes the
behavior.</LI>
<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The
Enter key will do the callback even if the text has not
changed. Useful for command fields.</LI>
</UL>
<H4><A name="Fl_Input.textcolor">Fl_Color Fl_Input::textcolor() const
<BR>void Fl_Input::textcolor(Fl_Color)</A></H4>
<P>Gets or sets the color of the text in the input field.
<H4><A name="Fl_Input.textfont">Fl_Font Fl_Input::textfont() const
<BR>void Fl_Input::textfont(Fl_Font)</A></H4>
<P>Gets or sets the font of the text in the input field.
<H4><A name="Fl_Input.textsize">uchar Fl_Input::textsize() const
<BR>void Fl_Input::textsize(uchar)</A></H4>
<P>Gets or sets the size of the text in the input field.
<H4><A name="Fl_Input.cursor_color">Fl_Color Fl_Input::cursor_color()
const
<BR>void Fl_Input::cursor_color(Fl_Color)</A></H4>
<P>Get or set the color of the cursor. This is black by default.
</BODY>
</HTML>

View File

@ -1,176 +1,247 @@
<HTML><BODY> <HTML>
<BODY>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<H2><A name="Fl_Input_">class Fl_Input_</A></H2> <H2><A name="Fl_Input_">class Fl_Input_</A></H2>
<HR> <HR>
<H3>Class Hierarchy</H3> <H3>Class Hierarchy</H3>
<UL>
<PRE> <UL><PRE>
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A> <A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
| |
+----<B>Fl_Input_</B> +----<B>Fl_Input_</B>
| |
+----<A href=Fl_Input.html#Fl_Input>Fl_Input</A> +----<A href=Fl_Input.html#Fl_Input>Fl_Input</A>
</PRE> </PRE></UL>
</UL>
<H3>Include Files</H3> <H3>Include Files</H3>
<UL>
<PRE> <UL><PRE>
#include &lt;FL/Fl_Input_.H&gt; #include &lt;FL/Fl_Input_.H&gt;
</PRE> </PRE></UL>
</UL>
<H3>Description</H3> <H3>Description</H3>
This is a virtual base class below <A href=Fl_Input.html#Fl_Input><TT>
Fl_Input</TT></A>. It has all the same interfaces, but lacks the <TT> <P>This is a virtual base class below <A
handle()</TT> and <TT>draw()</TT> method. You may want to subclass it href="Fl_Input.html#Fl_Input"><TT>Fl_Input</TT></A>. It has all
if you are one of those people who likes to change how the editing keys the same interfaces, but lacks the <TT>handle()</TT> and
<TT>draw()</TT> method. You may want to subclass it if you are
one of those people who likes to change how the editing keys
work. work.
<P>This can act like any of the subclasses of Fl_Input, by setting <TT>
type()</TT> to one of the following values: </P> <P>This can act like any of the subclasses of Fl_Input, by
<UL> setting <TT>type()</TT> to one of the following values:</P>
<PRE>
<UL><PRE>
#define FL_NORMAL_INPUT 0 #define FL_NORMAL_INPUT 0
#define FL_FLOAT_INPUT 1 #define FL_FLOAT_INPUT 1
#define FL_INT_INPUT 2 #define FL_INT_INPUT 2
#define FL_MULTILINE_INPUT 4 #define FL_MULTILINE_INPUT 4
#define FL_SECRET_INPUT 5 #define FL_SECRET_INPUT 5
</PRE> </PRE></UL>
</UL>
<H3>Methods</H3> <H3>Methods</H3>
<CENTER> <CENTER>
<TABLE width=90% summary="Fl_Input_ methods."> <TABLE width="90%" summary="Fl_Input_ methods.">
<TR><TD align=left valign=top> <TR><TD align="left" valign="top">
<UL> <UL>
<LI><A href=#Fl_Input_.Fl_Input_>Fl_Input_</A></LI> <LI><A href="#Fl_Input_.Fl_Input_">Fl_Input_</A></LI>
<LI><A href=#Fl_Input_.~Fl_Input_>~Fl_Input_</A></LI> <LI><A href="#Fl_Input_.~Fl_Input_">~Fl_Input_</A></LI>
<LI><A href=#Fl_Input_.copy>copy</A></LI> <LI><A href="#Fl_Input_.copy">copy</A></LI>
<LI><A href=#Fl_Input_.copy_cuts>copy_cuts</A></LI> <LI><A href="#Fl_Input_.copy_cuts">copy_cuts</A></LI>
</UL> </UL>
</TD><TD align=left valign=top> </TD><TD align="left" valign="top">
<UL> <UL>
<LI><A href=#Fl_Input_.cut>cut</A></LI> <LI><A href="#Fl_Input_.cut">cut</A></LI>
<LI><A href=#Fl_Input_.drawtext>drawtext</A></LI> <LI><A href="#Fl_Input_.drawtext">drawtext</A></LI>
<LI><A href=#Fl_Input_.handletext>handletext</A></LI> <LI><A href="#Fl_Input_.handletext">handletext</A></LI>
<LI><A href=#Fl_Input_.insert>insert</A></LI> <LI><A href="#Fl_Input_.input_type">input_type</A></LI>
</UL> </UL>
</TD><TD align=left valign=top> </TD><TD align="left" valign="top">
<UL> <UL>
<LI><A href=#Fl_Input_.lineboundary>lineboundary</A></LI> <LI><A href="#Fl_Input_.insert">insert</A></LI>
<LI><A href=#Fl_Input_.mark>mark</A></LI> <LI><A href="#Fl_Input_.lineboundary">lineboundary</A></LI>
<LI><A href=#Fl_Input_.maybe_do_callback>maybe_do_callback</A></LI> <LI><A href="#Fl_Input_.mark">mark</A></LI>
<LI><A href="#Fl_Input_.maybe_do_callback">maybe_do_callback</A></LI>
</UL> </UL>
</TD><TD align=left valign=top> </TD><TD align="left" valign="top">
<UL> <UL>
<LI><A href=#Fl_Input_.maximum_size>maximum_size</A></LI> <LI><A href="#Fl_Input_.maximum_size">maximum_size</A></LI>
<LI><A href=#Fl_Input_.position>position</A></LI> <LI><A href="#Fl_Input_.position">position</A></LI>
<LI><A href=#Fl_Input_.replace>replace</A></LI> <LI><A href="#Fl_Input_.readonly">readonly</A></LI>
<LI><A href="#Fl_Input_.replace">replace</A></LI>
</UL> </UL>
</TD><TD align=left valign=top> </TD><TD align="left" valign="top">
<UL> <UL>
<LI><A href=#Fl_Input_.undo>undo</A></LI> <LI><A href="#Fl_Input_.undo">undo</A></LI>
<LI><A href=#Fl_Input_.up_down_position>up_down_position</A></LI> <LI><A href="#Fl_Input_.up_down_position">up_down_position</A></LI>
<LI><A href=#Fl_Input_.wordboundary>wordboundary</A></LI> <LI><A href="#Fl_Input_.wordboundary">wordboundary</A></LI>
</UL> </UL>
</TD></TR> </TD></TR>
</TABLE> </TABLE>
</CENTER> </CENTER>
<H4><A name=Fl_Input_.Fl_Input_>Fl_Input_::Fl_Input_(int x, int y, int
<H4><A name="Fl_Input_.Fl_Input_">Fl_Input_::Fl_Input_(int x, int y, int
w, int h, const char *label = 0)</A></H4> w, int h, const char *label = 0)</A></H4>
Creates a new <TT>Fl_Input_</TT> widget using the given position,
size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>. <P>Creates a new <TT>Fl_Input_</TT> widget using the given
<H4><A name=Fl_Input_.~Fl_Input_>virtual Fl_Input_::~Fl_Input_()</A></H4> position, size, and label string. The default boxtype is
The destructor removes the widget and any value associated with it. <TT>FL_DOWN_BOX</TT>.
<H4><A name=Fl_Input_.wordboundary>int Fl_Input_::wordboundary(int i)
<H4><A name="Fl_Input_.~Fl_Input_">virtual Fl_Input_::~Fl_Input_()</A></H4>
<P>The destructor removes the widget and any value associated with it.
<H4><A name="Fl_Input_.wordboundary">int Fl_Input_::wordboundary(int i)
const</A></H4> const</A></H4>
Returns true if position <TT>i</TT> is at the start or end of a word.
<H4><A name=Fl_Input_.lineboundary>int Fl_Input_::lineboundary(int i) <P>Returns true if position <TT>i</TT> is at the start or end of a word.
<H4><A name="Fl_Input_.lineboundary">int Fl_Input_::lineboundary(int i)
const</A></H4> const</A></H4>
Returns true if position <TT>i</TT> is at the start or end of a line.
<H4><A name=Fl_Input_.drawtext>void Fl_Input_::drawtext(int,int,int,int)</A> <P>Returns true if position <TT>i</TT> is at the start or end of a line.
</H4>
Draw the text in the passed bounding box. If <TT>damage() <H4><A name="Fl_Input_.drawtext">void Fl_Input_::drawtext(int,int,int,int)</A></H4>
FL_DAMAGE_ALL</TT> is true, this assumes the area has already been
erased to <TT>color()</TT>. Otherwise it does minimal update and <P>Draw the text in the passed bounding box. If <TT>damage()
erases the area itself. &amp; FL_DAMAGE_ALL</TT> is true, this assumes the area has
<H4><A name=Fl_Input_.handletext>void Fl_Input_::handletext(int already been erased to <TT>color()</TT>. Otherwise it does
minimal update and erases the area itself.
<H4><A name="Fl_Input_.handletext">void Fl_Input_::handletext(int
e,int,int,int,int)</A></H4> e,int,int,int,int)</A></H4>
Default handler for all event types. Your <TT>handle()</TT> method
should call this for all events that it does not handle completely. <P>Default handler for all event types. Your <TT>handle()</TT>
You must pass it the same bounding box as passed to <TT>draw()</TT>. method should call this for all events that it does not handle
Handles <TT>FL_PUSH</TT>, <TT>FL_DRAG</TT>, <TT>FL_RELEASE</TT> to completely. You must pass it the same bounding box as passed to
select text, handles <TT>FL_FOCUS</TT> and <TT>FL_UNFOCUS</TT> to show <TT>draw()</TT>. Handles <TT>FL_PUSH</TT>, <TT>FL_DRAG</TT>,
and hide the cursor. <TT>FL_RELEASE</TT> to select text, handles <TT>FL_FOCUS</TT>
<H4><A name=Fl_Input_.up_down_position>int and <TT>FL_UNFOCUS</TT> to show and hide the cursor.
<H4><A name="Fl_Input_.up_down_position">int
Fl_Input_::up_down_position(int i, int keepmark=0)</A></H4> Fl_Input_::up_down_position(int i, int keepmark=0)</A></H4>
Do the correct thing for arrow keys. Sets the position (and mark if <I>
keepmark</I> is zero) to somewhere in the same line as <I>i</I>, such <P>Do the correct thing for arrow keys. Sets the position (and
that pressing the arrows repeatedly will cause the point to move up and mark if <I>keepmark</I> is zero) to somewhere in the same line
down. as <I>i</I>, such that pressing the arrows repeatedly will cause
<H4><A name=Fl_Input_.maybe_do_callback>void the point to move up and down.
<H4><A name="Fl_Input_.maybe_do_callback">void
Fl_Input_::maybe_do_callback()</A></H4> Fl_Input_::maybe_do_callback()</A></H4>
Does the callback if <TT>changed()</TT> is true or if <TT>when()
FL_WHEN_NOT_CHANGED</TT> is non-zero. You should call this at any <P>Does the callback if <TT>changed()</TT> is true or if
point you think you should generate a callback. <TT>when() &amp; FL_WHEN_NOT_CHANGED</TT> is non-zero. You
should call this at any point you think you should generate a
callback.
<H4><A name="Fl_Input_.maximum_size">void Fl_Input_::maximum_size(int m)<BR> <H4><A name="Fl_Input_.maximum_size">void Fl_Input_::maximum_size(int m)<BR>
int Fl_Input_::maximum_size() const</A></H4> int Fl_Input_::maximum_size() const</A></H4>
<P>Sets or returns the maximum length of the input field. <P>Sets or returns the maximum length of the input field.
<H4><A name=Fl_Input_.position>int Fl_Input_::position() const
<BR> int Fl_Input_::position(int new_position, int new_mark) <H4><A name="Fl_Input_.position">int Fl_Input_::position() const
<BR> int Fl_Input_::position(int new_position_and_new_mark)</A></H4> <BR>int Fl_Input_::position(int new_position, int new_mark)
The input widget maintains two pointers into the string. The <BR>int Fl_Input_::position(int new_position_and_new_mark)</A></H4>
&quot;position&quot; is where the cursor is. The &quot;mark&quot; is the other end of the
selected text. If they are equal then there is no selection. Changing <P>The input widget maintains two pointers into the string. The
this does not affect the clipboard (use <TT>copy()</TT> to do that). &quot;position&quot; is where the cursor is. The
<P>Changing these values causes a <TT>redraw()</TT>. The new values &quot;mark&quot; is the other end of the selected text. If they
are bounds checked. The return value is non-zero if the new position are equal then there is no selection. Changing this does not
is different than the old one. <TT>position(n)</TT> is the same as <TT> affect the clipboard (use <TT>copy()</TT> to do that).
position(n,n)</TT>. <TT>mark(n)</TT> is the same as <TT>
position(position(),n)</TT>. </P> <P>Changing these values causes a <TT>redraw()</TT>. The new
<H4><A name=Fl_Input_.mark>int Fl_Input_::mark() const values are bounds checked. The return value is non-zero if the
new position is different than the old one. <TT>position(n)</TT>
is the same as <TT>position(n,n)</TT>. <TT>mark(n)</TT> is the
same as <TT>position(position(),n)</TT>.</P>
<H4><A name="Fl_Input_.mark">int Fl_Input_::mark() const
<BR> int Fl_Input_::mark(int new_mark)</A></H4> <BR> int Fl_Input_::mark(int new_mark)</A></H4>
Gets or sets the current selection mark. <TT>mark(n)</TT> is the same
as <TT>position(position(),n)</TT>. <P>Gets or sets the current selection mark. <TT>mark(n)</TT> is
<H4><A name=Fl_Input_.replace>int Fl_Input_::replace(int a, int b, the same as <TT>position(position(),n)</TT>.
<H4><A name="Fl_Input_.replace">int Fl_Input_::replace(int a, int b,
const char *insert, int length=0)</A></H4> const char *insert, int length=0)</A></H4>
This call does all editing of the text. It deletes the region between <TT>
a</TT> and <TT>b</TT> (either one may be less or equal to the other), <P>This call does all editing of the text. It deletes the region
and then inserts the string <TT>insert</TT> at that point and leaves between <TT>a</TT> and <TT>b</TT> (either one may be less or
the <TT>mark()</TT> and <TT>position()</TT> after the insertion. Does equal to the other), and then inserts the string <TT>insert</TT>
the callback if <TT>when() FL_WHEN_CHANGED</TT> and there is a change. at that point and leaves the <TT>mark()</TT> and
<P>Set <TT>start</TT> and <TT>end</TT> equal to not delete anything. <TT>position()</TT> after the insertion. Does the callback if
Set <TT>insert</TT> to <TT>NULL</TT> to not insert anything. </P> <TT>when() &amp; FL_WHEN_CHANGED</TT> and there is a change.
<P><TT>length</TT> must be zero or <TT>strlen(insert)</TT>, this saves
a tiny bit of time if you happen to already know the length of the <P>Set <TT>start</TT> and <TT>end</TT> equal to not delete
insertion, or can be used to insert a portion of a string or a string anything. Set <TT>insert</TT> to <TT>NULL</TT> to not insert
containing nul's. </P> anything.</P>
<P><TT>a</TT> and <TT>b</TT> are clamped to the 0..<TT>size()</TT>
range, so it is safe to pass any values. </P> <P><TT>length</TT> must be zero or <TT>strlen(insert)</TT>, this
<P><TT>cut()</TT> and <TT>insert()</TT> are just inline functions that saves a tiny bit of time if you happen to already know the
call <TT>replace()</TT>. </P> length of the insertion, or can be used to insert a portion of a
<H4><A name=Fl_Input_.cut>int Fl_Input_::cut() string or a string containing nul's.</P>
<P><TT>a</TT> and <TT>b</TT> are clamped to the
0..<TT>size()</TT> range, so it is safe to pass any values.</P>
<P><TT>cut()</TT> and <TT>insert()</TT> are just inline
functions that call <TT>replace()</TT>.</P>
<H4><A name="Fl_Input_.cut">int Fl_Input_::cut()
<BR> int Fl_Input_::cut(int n) <BR> int Fl_Input_::cut(int n)
<BR> int Fl_Input_::cut(int a, int b);</A></H4> <BR> int Fl_Input_::cut(int a, int b);</A></H4>
<TT>Fl_Input_::cut()</TT> deletes the current selection. <TT>cut(n)</TT>
deletes <TT>n</TT> characters after the <TT>position()</TT>. <TT> <P><TT>Fl_Input_::cut()</TT> deletes the current selection.
cut(-n)</TT> deletes <TT>n</TT> characters before the <TT>position()</TT> <TT>cut(n)</TT> deletes <TT>n</TT> characters after the
. <TT>cut(a,b)</TT> deletes the characters between offsets <TT>a</TT> <TT>position()</TT>. <TT>cut(-n)</TT> deletes <TT>n</TT>
and <TT>b</TT>. <TT>A</TT>, <TT>b</TT>, and <TT>n</TT> are all clamped characters before the <TT>position()</TT>. <TT>cut(a,b)</TT>
to the size of the string. The mark and point are left where the deletes the characters between offsets <TT>a</TT> and
deleted text was. <TT>b</TT>. <TT>A</TT>, <TT>b</TT>, and <TT>n</TT> are all
<P>If you want the data to go into the clipboard, do <TT> clamped to the size of the string. The mark and point are left
Fl_Input_::copy()</TT> before calling <TT>Fl_Input_::cut()</TT>, or do <TT> where the deleted text was.
Fl_Input_::copy_cuts()</TT> afterwards. </P>
<H4><A name=Fl_Input_.insert>int Fl_Input_::insert(const char *t,int <P>If you want the data to go into the clipboard, do
<TT>Fl_Input_::copy()</TT> before calling
<TT>Fl_Input_::cut()</TT>, or do <TT>Fl_Input_::copy_cuts()</TT>
afterwards.</P>
<H4><A name="Fl_Input_.insert">int Fl_Input_::insert(const char *t,int
l=0)</A></H4> l=0)</A></H4>
Insert the string <TT>t</TT> at the current position, and leave the
mark and position after it. If <TT>l</TT> is not zero then it is <P>Insert the string <TT>t</TT> at the current position, and
assumed to be <TT>strlen(t)</TT>. leave the mark and position after it. If <TT>l</TT> is not zero
<H4><A name=Fl_Input_.copy>int Fl_Input_::copy()</A></H4> then it is assumed to be <TT>strlen(t)</TT>.
Put the current selection between <TT>mark()</TT> and <TT>position()</TT>
into the clipboard. Does not replace the old clipboard contents if <TT> <H4><A name="Fl_Input_.copy">int Fl_Input_::copy()</A></H4>
position()</TT> and <TT>mark()</TT> are equal.
<H4><A name=Fl_Input_.undo>int Fl_Input_::undo()</A></H4> <P>Put the current selection between <TT>mark()</TT> and
Does undo of several previous calls to <TT>replace()</TT>. Returns <TT>position()</TT> into the clipboard. Does not replace the
non-zero if any change was made. old clipboard contents if <TT>position()</TT> and
<H4><A name=Fl_Input_.copy_cuts>int Fl_Input_::copy_cuts()</A></H4> <TT>mark()</TT> are equal.
Copy all the previous contiguous cuts from the undo information to the
clipboard. This is used to make ^K work. </BODY></HTML> <H4><A name="Fl_Input_.undo">int Fl_Input_::undo()</A></H4>
<P>Does undo of several previous calls to <TT>replace()</TT>.
Returns non-zero if any change was made.
<H4><A name="Fl_Input_.copy_cuts">int Fl_Input_::copy_cuts()</A></H4>
<P>Copy all the previous contiguous cuts from the undo
information to the clipboard. This is used to make ^K work.
<H4><A name="Fl_Input.input_type">int Fl_Input::input_type() const
<BR>void Fl_Input::input_type(int)</A></H4>
<P>Gets or sets the input field type.
<H4><A name="Fl_Input.readonly">int Fl_Input::readonly() const
<BR>void Fl_Input::readonly(int)</A></H4>
<P>Gets or sets the read-only state of the input field.
</BODY>
</HTML>

View File

@ -1,5 +1,5 @@
# #
# "$Id: Makefile,v 1.18.2.14.2.41 2002/04/30 21:50:16 easysw Exp $" # "$Id: Makefile,v 1.18.2.14.2.42 2002/05/08 12:44:52 easysw Exp $"
# #
# Library makefile for the Fast Light Tool Kit (FLTK). # Library makefile for the Fast Light Tool Kit (FLTK).
# #
@ -239,7 +239,11 @@ libfltk_gl_s.a: $(GLOBJECTS)
chmod +x libfltk_gl_s.a chmod +x libfltk_gl_s.a
clean : clean :
-@ rm -f *.o $(DSONAME) $(GLDSONAME) $(LIBRARY) $(CLEAN) libfltk.so libfltk_gl.so -@ rm -f *.o $(DSONAME) $(FLDSONAME) $(GLDSONAME) \
../lib/$(LIBNAME) ../lib/$(FLLIBNAME) ../lib/$(GLLIBNAME) \
libfltk.so libfltk_forms.so libfltk_gl.so \
libfltk.sl libfltk_forms.sl libfltk_gl.sl \
$(CLEAN)
depend: $(CPPFILES) $(FLCPPFILES) $(GLCPPFILES) $(CFILES) depend: $(CPPFILES) $(FLCPPFILES) $(GLCPPFILES) $(CFILES)
makedepend -Y -I.. -f makedepend $(CPPFILES) $(GLCPPFILES) $(CFILES) makedepend -Y -I.. -f makedepend $(CPPFILES) $(GLCPPFILES) $(CFILES)
@ -429,5 +433,5 @@ uninstall:
# #
# End of "$Id: Makefile,v 1.18.2.14.2.41 2002/04/30 21:50:16 easysw Exp $". # End of "$Id: Makefile,v 1.18.2.14.2.42 2002/05/08 12:44:52 easysw Exp $".
# #