Fix some problems with the filename field and handling selections in the
root directory (Fl_File_Chooser). Add documentation for the fl_cursor() function. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2558 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
1cea00ad00
commit
9456baab50
4
CHANGES
4
CHANGES
@ -1,6 +1,10 @@
|
||||
CHANGES IN FLTK 1.1.0
|
||||
|
||||
- Documentation updates.
|
||||
- Fixed filename problems with Fl_File_Chooser -
|
||||
changing the filename field directly or choosing files
|
||||
from the root directory could yield interesting
|
||||
filenames.
|
||||
- Fl_Input_ could crash if it received an empty paste
|
||||
event.
|
||||
- The mouse pointer now changes to the I beam
|
||||
|
@ -19,6 +19,7 @@ A</A>.
|
||||
<LI><A HREF="#fl_color_chooser_func"><TT>fl_color_chooser</TT></A></LI>
|
||||
<LI><A HREF="#fl_color_cube"><TT>fl_color_cube</TT></A></LI>
|
||||
<LI><A HREF="#fl_contrast"><TT>fl_contrast</TT></A></LI>
|
||||
<LI><A HREF="#fl_cursor"><TT>fl_cursor</TT></A></LI>
|
||||
<LI><A HREF="#fl_darker"><TT>fl_darker</TT></A></LI>
|
||||
<LI><A HREF="#fl_dir_chooser"><TT>fl_dir_chooser</TT></A></LI>
|
||||
<LI><A HREF="#fl_file_chooser2"><TT>fl_file_chooser</TT></A></LI>
|
||||
@ -74,6 +75,7 @@ A</A>.
|
||||
<LI><A HREF="#fl_average_color"><TT>fl_average_color</TT></A></LI>
|
||||
<LI><A HREF="#fl_color_cube"><TT>fl_color_cube</TT></A></LI>
|
||||
<LI><A HREF="#fl_contrast"><TT>fl_contrast</TT></A></LI>
|
||||
<LI><A HREF="#fl_cursor"><TT>fl_cursor</TT></A></LI>
|
||||
<LI><A HREF="#fl_darker"><TT>fl_darker</TT></A></LI>
|
||||
<LI><A HREF="#fl_gray_ramp"><TT>fl_gray_ramp</TT></A></LI>
|
||||
<LI><A HREF="#fl_lighter"><TT>fl_lighter</TT></A></LI>
|
||||
@ -367,6 +369,31 @@ with the background color. Otherwise, returns
|
||||
which color provides the best contrast.
|
||||
|
||||
|
||||
<!-- NEED 4in -->
|
||||
<H2><A NAME="fl_cursor">fl_cursor</A></H2>
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>Include Files</H3>
|
||||
|
||||
<UL><PRE>
|
||||
#include <FL/fl_draw.H>
|
||||
</PRE></UL>
|
||||
|
||||
<H3>Prototype</H3>
|
||||
|
||||
<UL><PRE>
|
||||
Fl_Color fl_cursor(Fl_Cursor cursor, Fl_Color fg, Fl_Color bg);
|
||||
</PRE></UL>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>Sets the cursor for the current window to the specified shape
|
||||
and colors. The cursors are defined in the <A
|
||||
HREF="enumerations.html#cursor"><CODE><FL/Enumerations.H></CODE>
|
||||
header file</A>.
|
||||
|
||||
|
||||
<!-- NEED 4in -->
|
||||
<H2><A NAME="fl_darker">fl_darker</A></H2>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.20 2002/07/14 18:26:54 easysw Exp $"
|
||||
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.21 2002/07/30 18:33:49 easysw Exp $"
|
||||
//
|
||||
// More Fl_File_Chooser routines.
|
||||
//
|
||||
@ -382,10 +382,12 @@ Fl_File_Chooser::fileListCB()
|
||||
if (!filename)
|
||||
return;
|
||||
|
||||
if (directory_[0] != '\0') {
|
||||
snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
|
||||
} else {
|
||||
if (!directory_[0]) {
|
||||
strlcpy(pathname, filename, sizeof(pathname));
|
||||
} else if (strcmp(directory_, "/") == 0) {
|
||||
snprintf(pathname, sizeof(pathname), "/%s", filename);
|
||||
} else {
|
||||
snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
|
||||
}
|
||||
|
||||
if (Fl::event_clicks()) {
|
||||
@ -449,8 +451,7 @@ Fl_File_Chooser::fileNameCB()
|
||||
// Get the filename from the text field...
|
||||
filename = (char *)fileName->value();
|
||||
|
||||
if (filename == NULL || filename[0] == '\0')
|
||||
{
|
||||
if (filename == NULL || filename[0] == '\0') {
|
||||
okButton->deactivate();
|
||||
return;
|
||||
}
|
||||
@ -538,8 +539,12 @@ Fl_File_Chooser::fileNameCB()
|
||||
|
||||
directory(pathname);
|
||||
|
||||
snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
|
||||
fileName->value(pathname);
|
||||
if (filename[0]) {
|
||||
char tempname[1024];
|
||||
|
||||
snprintf(tempname, sizeof(tempname), "%s/%s", directory_, filename);
|
||||
fileName->value(tempname);
|
||||
}
|
||||
|
||||
fileName->position(p, m);
|
||||
}
|
||||
@ -1138,5 +1143,5 @@ unquote_pathname(char *dst, // O - Destination string
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.20 2002/07/14 18:26:54 easysw Exp $".
|
||||
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.21 2002/07/30 18:33:49 easysw Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user