mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 15:32:12 +08:00
Documentation updates (STR #365)
The value(const Fl_Menu_Item*) method was not implemented for Fl_Choice (STR #366) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3402 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
CHANGES IN FLTK 1.1.5rc2
|
CHANGES IN FLTK 1.1.5rc2
|
||||||
|
|
||||||
|
- Documentation updates (STR #365)
|
||||||
|
- The value(const Fl_Menu_Item*) method was not
|
||||||
|
implemented for Fl_Choice (STR #366)
|
||||||
- Fl_Pack didn't draw child widget labels the same way
|
- Fl_Pack didn't draw child widget labels the same way
|
||||||
as Fl_Group, causing display problems (STR #360)
|
as Fl_Group, causing display problems (STR #360)
|
||||||
- fl_read_image() didn't work when reading from an
|
- fl_read_image() didn't work when reading from an
|
||||||
|
|||||||
+3
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Choice.H,v 1.5.2.3.2.4 2004/04/11 04:38:54 easysw Exp $"
|
// "$Id: Fl_Choice.H,v 1.5.2.3.2.5 2004/04/29 02:47:09 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Choice header file for the Fast Light Tool Kit (FLTK).
|
// Choice header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -34,6 +34,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
int handle(int);
|
int handle(int);
|
||||||
Fl_Choice(int,int,int,int,const char * = 0);
|
Fl_Choice(int,int,int,int,const char * = 0);
|
||||||
|
int value(const Fl_Menu_Item*);
|
||||||
int value(int i);
|
int value(int i);
|
||||||
int value() const {return Fl_Menu_::value();}
|
int value() const {return Fl_Menu_::value();}
|
||||||
};
|
};
|
||||||
@@ -41,5 +42,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Choice.H,v 1.5.2.3.2.4 2004/04/11 04:38:54 easysw Exp $".
|
// End of "$Id: Fl_Choice.H,v 1.5.2.3.2.5 2004/04/29 02:47:09 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -746,6 +746,25 @@ function finds and returns the width and height. The return
|
|||||||
value is non-zero if the dimensions were parsed ok and zero if
|
value is non-zero if the dimensions were parsed ok and zero if
|
||||||
there was any problem.
|
there was any problem.
|
||||||
|
|
||||||
|
<H3>Direct Image Reading</H3>
|
||||||
|
|
||||||
|
<p>FLTK provides a single function for reading from the current
|
||||||
|
window or off-screen buffer into a RGB(A) image buffer.</p>
|
||||||
|
|
||||||
|
<H4><A NAME="fl_read_image">uchar *fl_read_image(uchar *p, int
|
||||||
|
X, int Y, int W, int H, int alpha = 0);</A></H4>
|
||||||
|
|
||||||
|
<p>Read a RGB(A) image from the current window or off-screen
|
||||||
|
buffer. The <tt>p</tt> argument points to a buffer that can hold
|
||||||
|
the image and must be at least <tt>W*H*3</tt> bytes when reading
|
||||||
|
RGB images and <tt>W*H*4</tt> bytes when reading RGBA images. If
|
||||||
|
<tt>NULL</tt>, <tt>fl_read_image()</tt> will create an array of
|
||||||
|
the proper size which can be freed using <tt>delete[]</tt>.</p>
|
||||||
|
|
||||||
|
<p>The <tt>alpha</tt> parameter controls whether an alpha
|
||||||
|
channel is created and the value that is placed in the alpha
|
||||||
|
channel. If 0, no alpha channel is generated.</p>
|
||||||
|
|
||||||
<H3><A name="Fl_Image">Image Classes</A></H3>
|
<H3><A name="Fl_Image">Image Classes</A></H3>
|
||||||
|
|
||||||
<P>FLTK provides a base image class called <A
|
<P>FLTK provides a base image class called <A
|
||||||
|
|||||||
+9
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.16 2004/04/11 04:38:57 easysw Exp $"
|
// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.17 2004/04/29 02:47:09 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Choice widget for the Fast Light Tool Kit (FLTK).
|
// Choice widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -106,6 +106,13 @@ Fl_Choice::Fl_Choice(int X, int Y, int W, int H, const char *l)
|
|||||||
color(FL_BACKGROUND2_COLOR);
|
color(FL_BACKGROUND2_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Fl_Choice::value(const Fl_Menu_Item *v) {
|
||||||
|
if (!v) return 0;
|
||||||
|
if (!Fl_Menu_::value(v)) return 0;
|
||||||
|
redraw();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int Fl_Choice::value(int v) {
|
int Fl_Choice::value(int v) {
|
||||||
if (v < 0 || v >= (size() - 1)) return 0;
|
if (v < 0 || v >= (size() - 1)) return 0;
|
||||||
if (!Fl_Menu_::value(v)) return 0;
|
if (!Fl_Menu_::value(v)) return 0;
|
||||||
@@ -152,5 +159,5 @@ int Fl_Choice::handle(int e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.16 2004/04/11 04:38:57 easysw Exp $".
|
// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.17 2004/04/29 02:47:09 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user