diff --git a/CHANGES b/CHANGES index 7aacbd906..8c6e00eaf 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/CodeWarrior/Win32/CWStaticPrefix.H b/CodeWarrior/Win32/CWStaticPrefix.H index 46bd6e378..6bfa2ee42 100644 --- a/CodeWarrior/Win32/CWStaticPrefix.H +++ b/CodeWarrior/Win32/CWStaticPrefix.H @@ -29,8 +29,6 @@ #include -#define FL_STATIC - // // // diff --git a/documentation/Fl_Input_.html b/documentation/Fl_Input_.html index 72792528f..5123405f3 100644 --- a/documentation/Fl_Input_.html +++ b/documentation/Fl_Input_.html @@ -223,12 +223,13 @@ l=0) leave the mark and position after it. If l is not zero then it is assumed to be strlen(t). -

int Fl_Input_::copy()

+

int Fl_Input_::copy(int clipboard)

Put the current selection between mark() and -position() into the clipboard. Does not replace the -old clipboard contents if position() and -mark() are equal. +position() into the specified clipboard. 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.

int Fl_Input_::undo()

diff --git a/documentation/Fl_Menu_.html b/documentation/Fl_Menu_.html index 7a1bbe7f5..19aebbe7d 100644 --- a/documentation/Fl_Menu_.html +++ b/documentation/Fl_Menu_.html @@ -50,22 +50,23 @@ be "private": a dynamically allocated array managed by the Fl_Menu_. @@ -93,10 +94,19 @@ deleted. NULL 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. +

const Fl_Menu_Item* Fl_Menu_::mvalue() +const

+ +

Returns a pointer to the last menu item that was picked. +

void Fl_Menu_::copy(const -Fl_Menu_Item*)

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

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 user_data argument is non-NULL, then +the user_data members of the menu items are set to the +given value.

void Fl_Menu_::clear()

Same as menu(NULL), set the array pointer to null, indicating diff --git a/documentation/Fl_Text_Buffer.html b/documentation/Fl_Text_Buffer.html index a7629e26b..5fe02c47c 100644 --- a/documentation/Fl_Text_Buffer.html +++ b/documentation/Fl_Text_Buffer.html @@ -223,7 +223,8 @@ int* rectEnd);

const char* highlight_text();

-

Returns the highlighted text. +

Returns the highlighted text. When you are done with the +text, free it using the free() function.

void insert_column(int column, int startPos, const char* text, int* charsInserted, int* charsDeleted);

@@ -253,7 +254,8 @@ int* charsInserted, int* charsDeleted);

const char* line_text(int pos);

Returns the text for the line containing the specified -character position. +character position. When you are done with the text, free it +using the free() function.

int loadfile(const char *file, int buflen = 128*1024);

@@ -340,7 +342,8 @@ int* rectStart, int* rectEnd);

const char* secondary_selection_text();

-

Returns the text in the secondary selection. +

Returns the text in the secondary selection. When you are +done with the text, free it using the free() function.

void secondary_select_rectangular(int start, int end, int rectStart, int rectEnd);

@@ -367,7 +370,8 @@ int selection_position(int* start, int* end, int* isRect, int* rectStart, int* r

const char* selection_text();

-

Returns the currently selected text. +

Returns the currently selected text. When you are done with +the text, free it using the free() function.

void select_rectangular(int start, int end, int rectStart, int rectEnd);

@@ -399,16 +403,19 @@ void tab_distance(int tabDist);

const char* text_in_rectangle(int start, int end, int rectStart, int rectEnd);

-

Returns the text from the given rectangle. +

Returns the text from the given rectangle. When you are done +with the text, free it using the free() function.

const char* text_range(int start, int end);

-

Returns the text from the range of characters. +

Returns the text from the range of characters. When you are +done with the text, free it using the free() function.

const char* text();
void text(const char* text);

-

Gets or sets the text in the buffer. +

Gets or sets the text in the buffer. When you are done with +the text, free it using the free() function.

void unhighlight();

diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index 54cbbb804..c6fa4b982 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -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 $". // diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index aec0a1f4d..9ec01939d 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -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; - mBuffer->add_modify_callback( buffer_modified_cb, this ); - mBuffer->add_predelete_callback( buffer_predelete_cb, this ); + 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 ); + /* 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 $". // diff --git a/visualc/fltk.lib.dsp b/visualc/fltk.lib.dsp index 5d789e029..7f7b3ab29 100644 --- a/visualc/fltk.lib.dsp +++ b/visualc/fltk.lib.dsp @@ -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 diff --git a/visualc/fltkforms.dsp b/visualc/fltkforms.dsp index 8b9f1c2d5..f291b353a 100644 --- a/visualc/fltkforms.dsp +++ b/visualc/fltkforms.dsp @@ -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 diff --git a/visualc/fltkgl.dsp b/visualc/fltkgl.dsp index c8dd5ac7c..0792182ff 100644 --- a/visualc/fltkgl.dsp +++ b/visualc/fltkgl.dsp @@ -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 diff --git a/visualc/fltkimages.dsp b/visualc/fltkimages.dsp index 3df36a91f..5cc8c135f 100644 --- a/visualc/fltkimages.dsp +++ b/visualc/fltkimages.dsp @@ -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