diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-05-16 08:30:48 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-05-16 08:30:48 +0000 |
| commit | 2c7bea98fe956a88fbe34d14d4f289d3fc866c26 (patch) | |
| tree | 5cf2d1fe997f3d8d9ec8fa65c92cfda1a688acf9 | |
| parent | 1feb3ed69ccc5466bfcecf34f585d36465cbed68 (diff) | |
STR #1678: improved fl_down, fl_frame, added fl_box, updated documentation. Fixed indent in Fl_Input_Choice.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | FL/Enumerations.H | 11 | ||||
| -rw-r--r-- | FL/Fl_Input_Choice.H | 6 | ||||
| -rw-r--r-- | documentation/common.html | 7 | ||||
| -rw-r--r-- | documentation/functions.html | 1 |
5 files changed, 21 insertions, 5 deletions
@@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.8 - Documentation fixes (STR #1454, STR #1455, STR #1456, STR #1457, STR #1458, STR #1460, STR #1481, STR #1578, STR #1639, STR #1645, STR #1644) + - Improved fl_down, fl_frame, added fl_box (STR #1678) - Fixed selection of submenu items in input_choice (STR #1676) - Fixed calculation of stride for image scaling and diff --git a/FL/Enumerations.H b/FL/Enumerations.H index aabf1baf8..c86c42166 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -229,8 +229,15 @@ extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX(); #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9) // conversions of box types to other boxtypes: -inline Fl_Boxtype fl_down(Fl_Boxtype b) {return (Fl_Boxtype)(b|1);} -inline Fl_Boxtype fl_frame(Fl_Boxtype b) {return (Fl_Boxtype)(b|2);} +inline Fl_Boxtype fl_box(Fl_Boxtype b) { + return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2)); +} +inline Fl_Boxtype fl_down(Fl_Boxtype b) { + return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1)); +} +inline Fl_Boxtype fl_frame(Fl_Boxtype b) { + return (Fl_Boxtype)((b%4<2)?b:(b+2)); +} // back-compatability box types: #define FL_FRAME FL_ENGRAVED_FRAME diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H index 45fbe70db..45971bc4b 100644 --- a/FL/Fl_Input_Choice.H +++ b/FL/Fl_Input_Choice.H @@ -98,9 +98,9 @@ public: void add(const char *s) { menu_->add(s); } - int changed() const { - return inp_->changed(); - } + int changed() const { + return inp_->changed(); + } void clear() { menu_->clear(); } diff --git a/documentation/common.html b/documentation/common.html index f25477f99..18fbc22c5 100644 --- a/documentation/common.html +++ b/documentation/common.html @@ -335,6 +335,13 @@ If no frame version of a given box exists, the behavior of this function is undefined and some random box or frame is returned. See also: <A HREF="drawing.html#fl_frame">fl_frame drawing</A>. +<H4><A name="fl_box">Fl_Boxtype fl_box(Fl_Boxtype)</A></H4> + +<P><tt>fl_box</tt> returns the filled version of a frame. +If no filled version of a given frame exists, the behavior of this function +is undefined and some random box or frame is returned. +See also: <TT><A HREF="#fl_frame">fl_frame</A></TT>. + <H4>Adding Your Box Type</H4> <P>The <TT>Fl::set_boxtype()</TT> method adds or replaces the diff --git a/documentation/functions.html b/documentation/functions.html index aaf8789e9..bcd4d099d 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -29,6 +29,7 @@ A</A>. <LI><A HREF="drawing.html#fl_begin_offscreen"><TT>fl_begin_offscreen</TT></A></LI> <LI><A HREF="drawing.html#fl_begin_points"><TT>fl_begin_points</TT></A></LI> <LI><A HREF="drawing.html#fl_begin_polygon"><TT>fl_begin_polygon</TT></A></LI> + <LI><A HREF="common.html#fl_box"><TT>fl_box</TT></A></LI> <LI><A HREF="osissues.html#WIN32.gdi"><TT>fl_brush</TT></A> (WIN32)</LI> <LI><A HREF="drawing.html#fl_can_do_alpha_blending"><TT>fl_can_do_alpha_blending</TT></A></LI> <LI><A HREF="#fl_casealphasort"><TT>fl_casealphasort</TT></A></LI> |
