Documentation updates (STR #245, STR #250, STR #277, STR #281)

Fl_Preferences incorrectly created the preferences directory
before necessary (STR #247)

The WIN32 project files still defined the (obsolete) FL_STATIC
constant (STR #279)

Fl_Text_Display::buffer() did not support NULL values, making it
impossible to clean up text buffers from a subclass (STR #295)

Fl_Text_Display did not support a NULL unfinishedStyleCB
function (STR #241)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3219 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2004-03-01 02:05:02 +00:00
parent 2cbbe8180d
commit c5d30baf60
11 changed files with 66 additions and 40 deletions

11
CHANGES
View File

@ -1,5 +1,16 @@
CHANGES IN FLTK 1.1.5rc1
- Documentation updates (STR #245, STR #250, STR #277,
STR #281)
- Fl_Preferences incorrectly created the preferences
directory before necessary (STR #247)
- The WIN32 project files still defined the (obsolete)
FL_STATIC constant (STR #279)
- Fl_Text_Display::buffer() did not support NULL values,
making it impossible to clean up text buffers from a
subclass (STR #295)
- Fl_Text_Display did not support a NULL
unfinishedStyleCB function (STR #241)
- Fl::background2() incorrectly marked the foreground
color as initialized (STR #255)
- Fixed the X11 CTRL + "-" detection code to properly

View File

@ -29,8 +29,6 @@
#include <Win32Headers.h>
#define FL_STATIC
//
//
//

View File

@ -223,12 +223,13 @@ l=0)</A></H4>
leave the mark and position after it. If <TT>l</TT> is not zero
then it is assumed to be <TT>strlen(t)</TT>.
<H4><A name="Fl_Input_.copy">int Fl_Input_::copy()</A></H4>
<H4><A name="Fl_Input_.copy">int Fl_Input_::copy(int clipboard)</A></H4>
<P>Put the current selection between <TT>mark()</TT> and
<TT>position()</TT> into the clipboard. Does not replace the
old clipboard contents if <TT>position()</TT> and
<TT>mark()</TT> are equal.
<TT>position()</TT> into the specified clipboard. Does not
replace the old clipboard contents if <TT>position()</TT> and
<TT>mark()</TT> are equal. Clipboard 0 maps to the current text
selection and clipboard 1 maps to the cut/paste clipboard.
<H4><A name="Fl_Input_.undo">int Fl_Input_::undo()</A></H4>

View File

@ -50,22 +50,23 @@ be "private": a dynamically allocated array managed by the Fl_Menu_.
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Menu_.mode>mode</A></LI>
<LI><A href=#Fl_Menu_.mvalue>mvalue</A></LI>
<LI><A href=#Fl_Menu_.remove>remove</A></LI>
<LI><A href=#Fl_Menu_.replace>replace</A></LI>
<LI><A href=#Fl_Menu_.shortcut>shortcut</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Menu_.shortcut>shortcut</A></LI>
<LI><A href=#Fl_Menu_.size>size</A></LI>
<LI><A href=#Fl_Menu_.test_shortcut>test_shortcut</A></LI>
<LI><A href=#Fl_Menu_.text>text</A></LI>
<LI><A href=#Fl_Menu_.textcolor>textcolor</A></LI>
</UL>
</TD><TD align=left valign=top>
<UL>
<LI><A href=#Fl_Menu_.textfont>textfont</A></LI>
<LI><A href=#Fl_Menu_.textsize>textsize</A></LI>
<LI><A href=#Fl_Menu_.value>value</A></LI>
<LI><A href=#Fl_Menu_.textcolor>textcolor</A></LI>
</UL>
</TD></TR>
</TABLE>
@ -93,10 +94,19 @@ deleted. <tt>NULL</tt> is allowed and acts the same as a zero-length
menu. If you try to modify the array (with add(), replace(), or
delete()) a private copy is automatically done.
<H4><A name=Fl_Menu_.mvalue>const Fl_Menu_Item* Fl_Menu_::mvalue()
const</a></h4>
<P>Returns a pointer to the last menu item that was picked.
<H4><A name=Fl_Menu_.copy>void Fl_Menu_::copy(const
Fl_Menu_Item*)</A></H4>
The menu is set to a private copy of the passed Fl_Menu_Item array.
This is useful if you want to modify the flags of the menu items.
Fl_Menu_Item*, void* user_data = 0)</A></H4>
<P>The menu is set to a private copy of the passed Fl_Menu_Item
array. This is useful if you want to modify the flags of the
menu items. If the <tt>user_data</tt> argument is non-NULL, then
the <tt>user_data</tt> members of the menu items are set to the
given value.
<H4><A name=Fl_Menu_.clear>void Fl_Menu_::clear()</A></H4>
Same as <tt>menu(NULL)</tt>, set the array pointer to null, indicating

View File

@ -223,7 +223,8 @@ int* rectEnd);</A></H4>
<H4><A NAME="Fl_Text_Buffer.highlight_text">const char* highlight_text();</A></H4>
<P>Returns the highlighted text.
<P>Returns the highlighted text. When you are done with the
text, free it using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.insert_column">void insert_column(int column, int startPos, const char* text,
int* charsInserted, int* charsDeleted);</A></H4>
@ -253,7 +254,8 @@ int* charsInserted, int* charsDeleted);</A></H4>
<H4><A NAME="Fl_Text_Buffer.line_text">const char* line_text(int pos);</A></H4>
<P>Returns the text for the line containing the specified
character position.
character position. When you are done with the text, free it
using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.loadfile">int loadfile(const char *file, int buflen = 128*1024);</A></H4>
@ -340,7 +342,8 @@ int* rectStart, int* rectEnd);</A></H4>
<H4><A NAME="Fl_Text_Buffer.secondary_selection_text">const char* secondary_selection_text();</A></H4>
<P>Returns the text in the secondary selection.
<P>Returns the text in the secondary selection. When you are
done with the text, free it using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.secondary_select_rectangular">void secondary_select_rectangular(int start, int end, int rectStart,
int rectEnd);</A></H4>
@ -367,7 +370,8 @@ int selection_position(int* start, int* end, int* isRect, int* rectStart, int* r
<H4><A NAME="Fl_Text_Buffer.selection_text">const char* selection_text();</A></H4>
<P>Returns the currently selected text.
<P>Returns the currently selected text. When you are done with
the text, free it using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.select_rectangular">void select_rectangular(int start, int end, int rectStart, int rectEnd);</A></H4>
@ -399,16 +403,19 @@ void tab_distance(int tabDist);</A></H4>
<H4><A NAME="Fl_Text_Buffer.text_in_rectangle">const char* text_in_rectangle(int start, int end, int rectStart, int rectEnd);</A></H4>
<P>Returns the text from the given rectangle.
<P>Returns the text from the given rectangle. When you are done
with the text, free it using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.text_range">const char* text_range(int start, int end);</A></H4>
<P>Returns the text from the range of characters.
<P>Returns the text from the range of characters. When you are
done with the text, free it using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.text">const char* text();<BR>
void text(const char* text);</A></H4>
<P>Gets or sets the text in the buffer.
<P>Gets or sets the text in the buffer. When you are done with
the text, free it using the <tt>free()</tt> function.
<H4><A NAME="Fl_Text_Buffer.unhighlight">void unhighlight();</A></H4>

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $"
// "$Id: Fl_Preferences.cxx,v 1.1.2.26 2004/03/01 02:05:01 easysw Exp $"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@ -671,8 +671,6 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, Root root, const char
"%s/%s.prefs", vendor, application);
#endif
makePathForFile(filename);
prefs_ = prefs;
filename_ = strdup(filename);
vendor_ = strdup(vendor);
@ -689,8 +687,6 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, const char *path, con
snprintf(filename, sizeof(filename), "%s/%s.prefs", path, application);
makePathForFile(filename);
prefs_ = prefs;
filename_ = strdup(filename);
vendor_ = strdup(vendor);
@ -758,6 +754,7 @@ int Fl_Preferences::RootNode::read()
// write the group tree and all entry leafs
int Fl_Preferences::RootNode::write()
{
makePathForFile(filename_);
FILE *f = fopen( filename_, "wb" );
if ( !f ) return 1;
fprintf( f, "; FLTK preferences file format 1.0\n" );
@ -1116,5 +1113,5 @@ char Fl_Preferences::Node::remove()
//
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $".
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.26 2004/03/01 02:05:01 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.48 2003/11/01 01:32:40 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.49 2004/03/01 02:05:02 easysw Exp $"
//
// Copyright 2001-2003 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@ -163,11 +163,13 @@ void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) {
/* Add the buffer to the display, and attach a callback to the buffer for
receiving modification information when the buffer contents change */
mBuffer = buf;
if (mBuffer) {
mBuffer->add_modify_callback( buffer_modified_cb, this );
mBuffer->add_predelete_callback( buffer_predelete_cb, this );
/* Update the display */
buffer_modified_cb( 0, buf->length(), 0, 0, 0, this );
}
/* Resize the widget to update the screen... */
resize(x(), y(), w(), h());
@ -1745,7 +1747,7 @@ int Fl_Text_Display::position_style( int lineStartPos,
style = FILL_MASK;
else if ( styleBuf != NULL ) {
style = ( unsigned char ) styleBuf->character( pos );
if (style == mUnfinishedStyle) {
if (style == mUnfinishedStyle && mUnfinishedHighlightCB) {
/* encountered "unfinished" style, trigger parsing */
(mUnfinishedHighlightCB)( pos, mHighlightCBArg);
style = (unsigned char) styleBuf->character( pos);
@ -2701,7 +2703,7 @@ int Fl_Text_Display::measure_proportional_character(char c, int colNum, int pos)
style = 0;
} else {
style = (unsigned char)styleBuf->character(pos);
if (style == mUnfinishedStyle) {
if (style == mUnfinishedStyle && mUnfinishedHighlightCB) {
/* encountered "unfinished" style, trigger parsing */
(mUnfinishedHighlightCB)(pos, mHighlightCBArg);
style = (unsigned char)styleBuf->character(pos);
@ -3059,5 +3061,5 @@ int Fl_Text_Display::handle(int event) {
//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.48 2003/11/01 01:32:40 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.49 2004/03/01 02:05:02 easysw Exp $".
//

View File

@ -41,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "../visualc" /I ".." /D "FL_STATIC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "../visualc" /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# SUBTRACT CPP /Os
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
@ -65,7 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "../visualc" /I ".." /D "FL_STATIC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "../visualc" /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe

View File

@ -41,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I ".." /D "FL_STATIC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# SUBTRACT CPP /Os
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
@ -65,7 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I ".." /D "FL_STATIC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe

View File

@ -41,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I ".." /D "FL_STATIC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# SUBTRACT CPP /Os
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
@ -65,7 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I ".." /D "FL_STATIC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe

View File

@ -41,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I ".." /D "FL_STATIC" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# ADD CPP /nologo /MD /GX /Ot /Op /Ob2 /I "." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /FD /c
# SUBTRACT CPP /Os
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
@ -65,7 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I ".." /D "FL_STATIC" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD CPP /nologo /MDd /GX /Z7 /Od /I "." /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /FR /YX /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe