Re: [fltk.development] [RFE] STR #2942: Buttons keep the same color when clicked

2013-04-02 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature
Fix Version: 1.3-current


Thanks Albrecht!


Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature
Fix Version: 1.3-current

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2942: Buttons keep the same color when clicked

2013-04-02 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature
Fix Version: 1.3-current


Attached file down_button_color_r2.patch...


Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature
Fix Version: 1.3-currentIndex: fluid/Fl_Widget_Type.cxx
===
--- fluid/Fl_Widget_Type.cxx(revision 9857)
+++ fluid/Fl_Widget_Type.cxx(working copy)
@@ -2438,6 +2438,8 @@
 write_string(color %d, o-color());
   if (o-selection_color()!=tplate-selection_color())
 write_string(selection_color %d, o-selection_color());
+  else
+write_string(selection_color %d, o-color());
   if (o-labeltype()!=tplate-labeltype()) {
 write_string(labeltype);
 write_word(item_name(labeltypemenu, o-labeltype()));
___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2942: Buttons keep the same color when clicked

2013-04-02 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature
Fix Version: 1.3-current


In the updated patch (r2) FLUID set selection_color to color by default. I
think I like this way instead to do it by hand everywhere.


Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature
Fix Version: 1.3-current

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2942: Buttons keep the same color when clicked

2013-04-01 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature


Thanks for your analysis, I think this patch should be closed. However, I
will use it until a better one is out.


Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2942: Buttons keep the same color when clicked

2013-03-31 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2942
Version: 1.3-feature


Attached file down_button_color_r1.patch...


Link: http://www.fltk.org/str.php?L2942
Version: 1.3-featureIndex: src/Fl_Button.cxx
===
--- src/Fl_Button.cxx   (revision 9855)
+++ src/Fl_Button.cxx   (working copy)
@@ -68,7 +68,8 @@
 
 void Fl_Button::draw() {
   if (type() == FL_HIDDEN_BUTTON) return;
-  Fl_Color col = value() ? selection_color() : color();
+  //Fl_Color col = value() ? selection_color() : color();
+  Fl_Color col = value() ? fl_darker(color()) : color();
   draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col);
   draw_backdrop();
   if (labeltype() == FL_NORMAL_LABEL  value()) {
___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-16 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fltk-1.3.x-r9835-gleam-4.3.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,131 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file COPYING which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012-2013 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, 
Fl_Color fg2, float th) {
+  // Draws the shiny using maximum limits
+  int h_top  = min(h/2,20);
+  int h_bottom = min(h/6,15);
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = h_top1?(0.999/(float)(h_top)):1;
+  float step_size_bottom = h_bottom1?(0.999/(float)(h_bottom)):1;
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_top_bottom_up(int x, int y, int w, int h, Fl_Color bc, 
float th) {
+  shade_rect_top_bottom(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_top_bottom_down(int x, int y, int w, int h, Fl_Color 
bc, float th) {
+  shade_rect_top_bottom(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
Fl_Color lc) {
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+  gleam_color(lc);
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-1, x+w-3, y+h-1); //Go across the bottom
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, Fl_Color 
lc, float th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2),lc);
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, Fl_Color 
lc, float th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th1),fl_color_average(FL_BLACK, bc, th2),lc);
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, fl_color_average(c, FL_WHITE, .25f), .55f, 
.05f);
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_top_bottom_up(x+2, y+1, w-5, h-3, c, .15f);
+  frame_rect_up(x, y, w-1, h-1, c, fl_color_average(c, FL_WHITE, .05f), .15f, 
.05f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_top_bottom_up(x+2, y+1, w-5, h-3, c, .25f);
+  frame_rect_up(x, y, w-1, h-1, c, fl_color_average(c, FL_WHITE, .45f), .25f, 
.15f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), fl_darker(c), .25f, .95f);
+}
+
+static void down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_top_bottom_down(x+1, y+1, w-3, h-3, c, .65f);
+  frame_rect_down(x, y, w-1, h-1, c, fl_color_average(c, FL_BLACK, .05f), 
.05f, .95f);
+}
+
+static void thin_down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_top_bottom_down(x+1, y+1, w-3, h-3, c, .85f);
+  frame_rect_down(x, y, w-1, h-1, c, fl_color_average(c, FL_BLACK, .45f), 
.35f, 0.85f

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-16 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Gleam 4.3 against fltk-1.3.x-r9835 with some improvements as suggested by
Albrecht.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-10 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fltk-1.3.2-gleam-4.3e.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,160 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file COPYING which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, 
Fl_Color fg2, float th) {
+  // Draws the shiny but use maximum limits
+  int h_top  = min(h/2,20);
+  int h_bottom = min(h/6,20);
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = h_top1?(0.999/(float)(h_top)):1;
+  float step_size_bottom = h_bottom1?(0.999/(float)(h_bottom)):1;
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_left_right(int x, int y, int w, int h, Fl_Color fg1, 
Fl_Color fg2, float th) {
+  // Draws the shiny useing maximum limits
+  int w_left  = min(w/8,10);
+  int w_right = min(w/8,10);
+  int w_flat = w-(w_left+w_right);
+  int j = 0;
+  float step_size_left = w_left1?(0.999/(float)(w_left)):1;
+  float step_size_right = w_right1?(0.999/(float)(w_right)):1;
+  // This loop generates the gradient on the left side of the widget
+  for (float k = 1; k = 0; k -= step_size_left){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x+j, y, x+j, y+h);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x+w_left, y, w_flat, h+1);
+  // This loop generates the gradient on the right side of the widget
+  for (float k = 1; k = 0; k -= step_size_right){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x+j+w_flat-1, y, x+j+w_flat-1, y+h);
+j++;
+  }
+}
+
+static void shade_rect_top_bottom_up(int x, int y, int w, int h, Fl_Color bc, 
float th) {
+  shade_rect_top_bottom(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_top_bottom_down(int x, int y, int w, int h, Fl_Color 
bc, float th) {
+  shade_rect_top_bottom(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_top_bottom_up(x+2, y+1, w-5, h-3, c

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-10 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


// Looking forward to seeing the left-right gradients, too.

Done, but you need to change shade_rect_top_bottom to
shade_rect_left_right in src/fl_gleam.cxx

// I can see the difference in white box backgrounds in your new patch
(4.3d), and I believe it's better now, but IMHO it could still be a little
brighter...

Now it is a bit brighter.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-09 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fltk-1.3.2-gleam-4.3d.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,136 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file COPYING which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
float th) {
+  // Draws the shiny but use maximum limits
+  int h_top  = min(h/2,20);
+  int h_bottom = min(h/6,20);
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = h_top1?(0.999/(float)(h_top)):1;
+  float step_size_bottom = h_bottom1?(0.999/(float)(h_bottom)):1;
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  shade_rect(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  shade_rect(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.15f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.25f, 0.25f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, c, 0.75f, 0.35f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.35f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.35f);
+}
+
+static void thin_down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.45f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.55f);
+}
+
+extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
+
+Fl_Boxtype fl_define_FL_GLEAM_UP_BOX

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-09 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Fixed the bug reported by Albrecht (04:32 Mar 09, 2013)

The gleam uses front light 3d effect. I didn’t work on that for a while,
but I will work in some improvements.

I will include left-right gradients, I think it would be nice and it will
be small piece of code.

IMHO, I think the front light effect looks more modern.

// (1) The white selection box(es) seem too dark at the top and at the
bottom. 

I have made some improvement to this.

// (2) The colored buttons become black'n'white (gray) when clicked, i.e.
they lose ther colors. Wouldn't it be better if they only changed their
up-down-box, but not the color? Again, this is what I see, not something I
read in the code.

This seems to be the default behaviour of FLTK.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-08 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


// Oh, and I'll do that -- don't worry, not asking you to do it for us ;)
// Just letting you know we might implement it that way.

Anyway, I am glad to help, but great! :D


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-08 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


// A possible solution, hoping you can implement: perhaps when the
// gradient area's height is larger than some amount, the gradient
// doesn't scale quite as large, so that a line of text at the top
// can still be readable? Or perhaps scale the brightness of the
// starting edge color a bit when the area height exceeds e.g.
// 100 pixels or some such.

I will work on a fix using either of your approaches.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-08 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fltk-1.3.2-gleam-4.3c.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,136 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file COPYING which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
float th) {
+  // Draws the shiny but use maximum limits
+  int h_top  = min(h/2,20);
+  int h_bottom = min(h/6,20);
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  shade_rect(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  shade_rect(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.15f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.25f, 0.25f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, c, 0.75f, 0.35f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.25f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.35f);
+}
+
+static void thin_down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.35f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.55f);
+}
+
+extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
+
+Fl_Boxtype fl_define_FL_GLEAM_UP_BOX() {
+  fl_internal_boxtype

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-08 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Here the fixed patch, the first approach worked like a charm, thanks Greg.
I removed the test program, so to test with: unittests -s gleam


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-07 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fltk-1.3.2-gleam-4.3.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,140 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file COPYING which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
float th) {
+  // Draws the shiny
+  int h_top  = h/2;
+  int h_bottom = h/6;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  shade_rect(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  shade_rect(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.15f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.25f, 0.25f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, c, 0.75f, 0.35f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.25f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.35f);
+}
+
+static void thin_down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.35f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.55f);
+}
+
+extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
+
+Fl_Boxtype

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-07 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Here a Gleam 4.3 patch for the fltk-1.3.2. Here the steps to use it;

1) get fltk-1.3.2-source.tar.gz

2) untar it

$ tar -xvzf fltk-1.3.2-source.tar.gz

3) copy the patch file fltk-1.3.2-gleam-4.3.patch to the fltk-1.3.2
directory

4) patch it:

$ patch -p0  fltk-1.3.2-gleam-4.3.patch

5) then compile it with make and run the example:

$ ./test/gleam

6) enjoy


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-07 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Yes, you are right, I will fix that asap!

// + Fl::scheme(gleam);
//..but support of the Fl::scheme() name 'gleam' is not actually
//implemented by the patch, is that correct?
//From what I can tell by a brief look at the patch, it seems to
//show it adds the new FL_GLEAM* box types, but I don't think
//I see it handling Fl::scheme() yet.. is that correct?


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-07 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fltk-1.3.2-gleam-4.3b.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,137 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file COPYING which should have been included with this file.  If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
float th) {
+  // Draws the shiny
+  int h_top  = h/2;
+  int h_bottom = h/6;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  shade_rect(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  shade_rect(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.15f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.25f, 0.25f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, c, 0.75f, 0.35f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.25f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.35f);
+}
+
+static void thin_down_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_down(x+1, y+1, w-3, h-3, c, 0.35f);
+  frame_rect_down(x, y, w-1, h-1, fl_darker(c), 0.65f, 0.55f);
+}
+
+extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
+
+Fl_Boxtype fl_define_FL_GLEAM_UP_BOX() {
+  fl_internal_boxtype(_FL_GLEAM_UP_BOX, up_box);
+  fl_internal_boxtype(_FL_GLEAM_DOWN_BOX, down_box

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2013-03-07 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Thank Greg for your feedback. I just updated the patch, hopefully
Fl::scheme() is working now.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-12-10 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fl_gleam-4.3.2-fltk-1.3-rev9209.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,148 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2011 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
float th) {
+  // Draws the shiny
+  int h_top  = h/2;
+  int h_bottom = h/6;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  shade_rect(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  shade_rect(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.15f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.25f, 0.25f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, c, 0.75f, 0.35f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-12-10 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Attached file fl_gleam-4.3.3-fltk-1.3-rev9209.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,148 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2011 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, 
float th) {
+  // Draws the shiny
+  int h_top  = h/2;
+  int h_bottom = h/6;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(fg1);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+j++;
+  }
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  shade_rect(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  shade_rect(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2) 
{
+  gleam_color(fg1);
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  gleam_color(fg2);
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, 
th1),fl_color_average(bc, FL_WHITE, th2));
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float th2) {
+  frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, 
th2),fl_color_average(FL_BLACK, bc, th1));
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.15f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.15f, 0.15f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+2, y+1, w-5, h-3, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, c, 0.25f, 0.25f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_down(x, y, w-1, h-1, c, 0.75f, 0.35f);
+  // frame decoration
+  gleam_color(fl_darker(c));
+  fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+  fl_line(x+2, y+h-2, x+w-3, y+h-2); //Go across the bottom

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-12-10 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Patch updated. The modification to Fl_get_system_colors.cxx were removed.
The gleam test program is created by fluid at build time.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-10-02 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature


Good to know. I am working in a slightly more rounded corners version, I am
keeping the code small and fast as possible, as the original GLEAM does! I
am removing the part that modify Fl_get_system_colors.cxx. I will only add
the .fl and then let FLUID generate the .cxx/.h at building time.


Link: http://www.fltk.org/str.php?L2672
Version: 1.4-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-08-04 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Attached file fl_gleam-4.3-fltk-1.3-rev8914.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,175 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2011 by Edmanuel Torres
+// This is a new fl_gleam theme. The gradients are on the top an the
+// bottom so the text area looks like in the classic FLTK way.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draws the shiny
+  int h_top  = h/2;
+  int h_bottom = h/6;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));  
+//gleam_color(fl_color_average(FL_WHITE, bc, k));  
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ //gleam_color(fl_color_average(bc, fl_color_average(bc, FL_WHITE, th), 
k));
+ gleam_color(fl_color_average(bc,fl_color_average(bc, FL_WHITE, th), k));
+ //gleam_color(fl_color_average(bc, FL_WHITE, k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+  }
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draws the shiny
+  int h_top  = (int)h/2;
+  int h_bottom = (int)h/6;
+  float h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)h_top);
+  float step_size_bottom = (0.999/(float)h_bottom);
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(bc, FL_BLACK, th), bc, k));
+//gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ //gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, 
k));
+ gleam_color(fl_color_average(bc, fl_color_average(bc, FL_BLACK, th), k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+  }
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th1, 
float th2) {
+  // Draw the outline around the perimeter of the box
+  gleam_color(fl_color_average(fl_darker(bc), FL_BLACK, th1));
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  
+  gleam_color(fl_color_average(FL_BLACK, bc, th1));
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+  //
+  gleam_color(fl_color_average(bc, FL_WHITE, th2));
+  fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+  //gleam_color(fl_color_average(bc, FL_WHITE, th2));
+  fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float 
th1, float

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-08-04 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Updated Gleam patch to Gleam 4.3.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-30 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


I have put full gradient, I think it really looks better.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-30 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Attached file fl_gleam-4.2.1-fltk-1.3-rev8842.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,163 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2011 by Edmanuel Torres
+// This is a new fl_gleam theme. The gradients are on the top an the
+// bottom so the text area looks like in the classic FLTK way.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draws the shiny
+  int h_top  = h/2;
+  int h_bottom = h/2;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));  
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ //gleam_color(fl_color_average(bc, fl_color_average(bc, FL_WHITE, th), 
k));
+ gleam_color(fl_color_average(bc,fl_color_average(bc, FL_BLACK, th), k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+  }
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draws the shiny
+  int h_top  = (int)h/2;
+  int h_bottom = (int)h/2;
+  float h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)h_top);
+  float step_size_bottom = (0.999/(float)h_bottom);
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(bc, FL_BLACK, th), bc, k));
+//gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ gleam_color(fl_color_average(bc, fl_color_average(bc, FL_BLACK, th), k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+  }
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draw the outline around the perimeter of the box
+  //gleam_color(FL_BLACK);
+  gleam_color(fl_color_average(bc, FL_WHITE, th)); 
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  gleam_color(fl_color_average(fl_darker(bc), FL_BLACK, th));
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draw the outline around the perimeter of the box
+  //gleam_color(FL_BLACK);
+  gleam_color(fl_color_average(fl_darker(bc), FL_BLACK, th));
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  gleam_color(fl_color_average(bc, FL_WHITE, th));
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-28 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Attached file gleam-4.2-fltk-1.3-rev8842.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,163 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2011 by Edmanuel Torres
+// This is a new fl_gleam theme. The gradients are on the top an the
+// bottom so the text area looks like in the classic FLTK way.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+#include iostream
+
+using namespace std;
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draws the shiny
+  int h_top  = h/3;
+  int h_bottom = h/3;
+  int h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)(h_top));
+  float step_size_bottom = (0.999/(float)(h_bottom));
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));  
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ //gleam_color(fl_color_average(bc, fl_color_average(bc, FL_WHITE, th), 
k));
+ gleam_color(fl_color_average(bc,fl_color_average(bc, FL_BLACK, th), k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+  }
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draws the shiny
+  int h_top  = (int)h/3;
+  int h_bottom = (int)h/3;
+  float h_flat = h-(h_top+h_bottom);
+  int j = 0;
+  float step_size_top = (0.999/(float)h_top);
+  float step_size_bottom = (0.999/(float)h_bottom);
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+gleam_color(fl_color_average(fl_color_average(bc, FL_BLACK, th), bc, k));
+//gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));
+fl_line(x, y+j, x+w, y+j);
+j++;
+  }
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w+1, h_flat);
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ gleam_color(fl_color_average(bc, fl_color_average(bc, FL_BLACK, th), k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+  }
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draw the outline around the perimeter of the box
+  //gleam_color(FL_BLACK);
+  gleam_color(fl_color_average(bc, FL_WHITE, th)); 
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  gleam_color(fl_color_average(fl_darker(bc), FL_BLACK, th));
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draw the outline around the perimeter of the box
+  //gleam_color(FL_BLACK);
+  gleam_color(fl_color_average(fl_darker(bc), FL_BLACK, th));
+  fl_line(x+1, y, x+w-1, y); //Go across the top
+  fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+  gleam_color(fl_color_average(bc, FL_WHITE, th));
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+  fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-28 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


New improvements to Gleam in the patch gleam-4.2-fltk-1.3-rev8842.patch. I
have debugged and cleaned up the code.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-23 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


The reason why I remove the shiny from the text area, it is because it
makes it a bit hard to read the text. I think it can be eye tiring with
the time. The buttons of Gleam 3.0 look great but not the boxes. I think
the thin box of gleam 4.1 does a better job in this case. Maybe it is
better idea to keep both.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-23 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Another good think of gleam 4.1 it is that with a little bit more coding
can be themed, so everyone will have control on the shading. Then gleam
3.0 and 4.1 can be just themes, I think is worth. I would do that if you
agree. You can leave either or a mix by default for FLTK.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-21 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


This is not Colin's code. I rewrote the whole drawing code, FLTK only needs
to acknowledge Colin for the inspiring work.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-20 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Here there is the modified version of fl_gleam. I think it looks better
with the gradients on the top and the bottom, so the the middle area of
the widgets it is no strongly affected. Here an screen shot:

https://sites.google.com/site/eetorres/fl_gleam

The new gleam can be found here

https://github.com/eetorres/fl_gleam/blob/master/fl_gleam.cxx


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-20 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Attached file gleam-fltk-1.3.x-rev8836.patch...


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-featureIndex: src/fl_gleam.cxx
===
--- src/fl_gleam.cxx(revision 0)
+++ src/fl_gleam.cxx(revision 0)
@@ -0,0 +1,158 @@
+//
+// Gleam drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include FL/Fl.H
+#include FL/fl_draw.H
+
+static void gleam_color(Fl_Color c) {
+  if (Fl::draw_box_active()) fl_color(c);
+  else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draws the shiny
+  int h_top  = h/4;
+  int h_bottom = h/6;
+  float h_flat = h-(float)(h_top+h_bottom);
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w, h_flat+1);
+
+  float step_size_top=0.10;
+  float step_size_bottom=0.10;
+  int j = 0;
+  step_size_top = (1.0/(float)h_top);
+  step_size_bottom = (1.0/(float)h_bottom);
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+j++;
+gleam_color(fl_color_average(fl_color_average(bc, FL_WHITE, th), bc, k));  
+fl_line(x, y+j, x+w-1, y+j);
+  }
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ j++;
+ gleam_color(fl_color_average(bc, fl_color_average(bc, FL_WHITE, th), k));
+ fl_line(x, y+j+h_flat-3, x+w-1, y+j+h_flat-3);
+  }
+}
+
+static void shade_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draws the shiny
+  int h_top  = h/4;
+  int h_bottom = h/6;
+  float h_flat = h-(float)(h_top+h_bottom);
+  gleam_color(bc);
+  fl_rectf(x, y+h_top, w, h_flat+1);
+
+  float step_size_top=0.10;
+  float step_size_bottom=0.10;
+  int j = 0;
+  step_size_top = (1.0/(float)h_top);
+  step_size_bottom = (1.0/(float)h_bottom);
+
+  // This loop generates the gradient at the top of the widget
+  for (float k = 1; k = 0; k -= step_size_top){
+j++;
+gleam_color(fl_color_average(fl_color_average(bc, FL_BLACK, th), bc, k));
+fl_line(x, y+j, x+w-1, y+j);
+  }
+  // This loop generates the gradient at the bottom of the widget
+  for (float k = 1; k = 0; k -= step_size_bottom){
+ j++;
+ gleam_color(fl_color_average(bc, fl_color_average(bc, FL_BLACK, th), k));
+ fl_line(x, y+j+h_flat-3, x+w-1, y+j+h_flat-3);
+  }
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+  // Draw the outline around the perimeter of the box
+  gleam_color(fl_color_average(bc, FL_WHITE, th));
+  fl_line(x+1, y, x+w-1, y); //Go across.
+  fl_line(x, y+h-1, x, y+1); //Go to top
+  gleam_color(fl_color_average(bc, FL_BLACK, th));
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across again!
+  fl_line(x+w, y+h-1, x+w, y+1); //Go to top
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, float th) 
{
+  // Draw the outline around the perimeter of the box
+  gleam_color(fl_color_average(fl_darker(bc), FL_BLACK, th));
+  fl_line(x+1, y, x+w-1, y); //Go across.
+  fl_line(x, y+h-1, x, y+1); //Go to top
+  gleam_color(fl_color_average(bc, FL_WHITE, th));
+  fl_line(x+1, y+h, x+w-1, y+h); //Go across again!
+  fl_line(x+w, y+h-1, x+w, y+1); //Go to top
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+  frame_rect_up(x, y, w-1, h-1, fl_darker(c),0.35);
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+1, y, w-2, h-1, c, 0.25f);
+  frame_rect_up(x, y, w-1, h-1, fl_darker(c),0.35);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+  shade_rect_up(x+1, y, w-2, h-1, c, 0.65f);
+  frame_rect_up(x, y, w-1, h-1, fl_darker(c),0.85);
+}
+

Re: [fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-19 Thread Edmanuel Torres

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


I am working on Gleam to make it more FLTK-like feel and look, and
considering more modern theme appealing.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature

___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


[fltk.development] [RFE] STR #2672: Updated Gleam patch against FLTK1.3.x-r8816

2011-06-18 Thread Edmanuel Torres
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2672
Version: 1.3-feature


Updated gleam patch to work with the main branch FLTK 1.3.x. I think this
patch should be included in FLTK 1.3. This is only the patch to include
Gleam in FLTK. Gleam itself can be found at
http://ergoeclectic.com/projects/fltk-gleam.html.


Link: http://www.fltk.org/str.php?L2672
Version: 1.3-featureIndex: src/makedepend
===
--- src/makedepend  (revision 8818)
+++ src/makedepend  (working copy)
@@ -814,6 +814,9 @@
 fl_font.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
 fl_font.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H Fl_Font.H
 fl_font.o: fl_font_xft.cxx
+fl_gleam.o: fl_gleam.cxx ../FL/Fl.H ../FL/Enumerations.H \
+  ../FL/Fl_Export.H ../FL/fl_draw.H flstring.h ../FL/Fl_Export.H \
+  ../config.h
 fl_gtk.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
 fl_gtk.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
 fl_gtk.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
Index: src/fl_boxtype.cxx
===
--- src/fl_boxtype.cxx  (revision 8818)
+++ src/fl_boxtype.cxx  (working copy)
@@ -302,6 +302,14 @@
   {fl_down_box,1,1,2,2,0}, // _FL_GTK_THIN_ROUND_DOWN_BOX,
   {fl_up_box,  2,2,4,4,0}, // _FL_GTK_ROUND_UP_BOX,
   {fl_down_box,2,2,4,4,0}, // _FL_GTK_ROUND_DOWN_BOX,
+  {fl_up_box,  2,2,3,3,0}, // _FL_GLEAM_UP_BOX,
+  {fl_down_box,2,2,3,3,0}, // _FL_GLEAM_DOWN_BOX,
+  {fl_up_frame,2,2,3,3,0}, // _FL_GLEAM_UP_FRAME,
+  {fl_down_frame,  2,2,3,3,0}, // _FL_GLEAM_DOWN_FRAME,
+  {fl_up_box,  1,1,1,1,0}, // _FL_GLEAM_THIN_UP_BOX,
+  {fl_down_box,1,1,1,1,0}, // _FL_GLEAM_THIN_DOWN_BOX,
+  {fl_up_box,  2,2,3,3,0}, // _FL_GLEAM_ROUND_UP_BOX,
+  {fl_down_box,2,2,3,3,0}, // _FL_GLEAM_ROUND_DOWN_BOX,
   {fl_up_box,  3,3,6,6,0}, // FL_FREE_BOX+0
   {fl_down_box,3,3,6,6,0}, // FL_FREE_BOX+1
   {fl_up_box,  3,3,6,6,0}, // FL_FREE_BOX+2
Index: src/Fl_get_system_colors.cxx
===
--- src/Fl_get_system_colors.cxx(revision 8818)
+++ src/Fl_get_system_colors.cxx(working copy)
@@ -235,9 +235,8 @@
   if (Fl::first_window()) key1 = Fl::first_window()-xclass();
   if (!key1) key1 = fltk;
   if (!fl_bg2_set) getsyscolor(Text,background,fl_bg2, #ff, 
Fl::background2);
-  if (!fl_fg_set) getsyscolor(key1,  foreground, fl_fg,  #00, 
Fl::foreground);
-  if (!fl_bg_set) getsyscolor(key1,  background, fl_bg,  #c0c0c0, 
Fl::background);
-  getsyscolor(Text, selectBackground, 0, #80, set_selection_color);
+  if (!fl_bg_set) getsyscolor(key1,  background,fl_bg,  #e4e4e4, 
Fl::background);
+  getsyscolor(Text, selectBackground, 0, #3465a4, set_selection_color);
 }
 
 #endif
@@ -386,6 +385,28 @@
 
 // Use slightly thinner scrollbars...
 Fl::scrollbar_size(15);
+  } else if (scheme_  !strcasecmp(scheme_, gleam)) {
+// Use a Gleam look-and-feel, similar to Clearlooks Glossy, made by Colin 
Jones
+if (scheme_bg_) {
+  delete scheme_bg_;
+  scheme_bg_ = (Fl_Image *)0;
+}
+
+set_boxtype(FL_UP_FRAME,FL_GLEAM_UP_FRAME);
+set_boxtype(FL_DOWN_FRAME,  FL_GLEAM_DOWN_FRAME);
+set_boxtype(FL_THIN_UP_FRAME,   FL_GLEAM_UP_FRAME);
+set_boxtype(FL_THIN_DOWN_FRAME, FL_GLEAM_DOWN_FRAME);
+
+set_boxtype(FL_UP_BOX,  FL_GLEAM_UP_BOX);
+set_boxtype(FL_DOWN_BOX,FL_GLEAM_DOWN_BOX);
+set_boxtype(FL_THIN_UP_BOX, FL_GLEAM_THIN_UP_BOX);
+set_boxtype(FL_THIN_DOWN_BOX,   FL_GLEAM_THIN_DOWN_BOX);
+set_boxtype(_FL_ROUND_UP_BOX,   FL_GLEAM_ROUND_UP_BOX);
+set_boxtype(_FL_ROUND_DOWN_BOX, FL_GLEAM_ROUND_DOWN_BOX);
+
+// Use slightly thinner scrollbars...
+Fl::scrollbar_size(10);
+
   } else {
 // Use the standard FLTK look-n-feel...
 if (scheme_bg_) {
Index: src/Makefile
===
--- src/Makefile(revision 8818)
+++ src/Makefile(working copy)
@@ -143,6 +143,7 @@
fl_engraved_label.cxx \
fl_file_dir.cxx \
fl_font.cxx \
+   fl_gleam.cxx \
fl_gtk.cxx \
fl_labeltype.cxx \
fl_line_style.cxx \
Index: FL/Enumerations.H
===
--- FL/Enumerations.H   (revision 8818)
+++ FL/Enumerations.H   (working copy)
@@ -511,6 +511,14 @@
   _FL_GTK_THIN_DOWN_FRAME, /// gtk+ version of FL_THIN_DOWN_FRAME
   _FL_GTK_ROUND_UP_BOX,/// gtk+ version of FL_ROUND_UP_BOX
   _FL_GTK_ROUND_DOWN_BOX,  /// gtk+ version of FL_ROUND_DOWN_BOX
+  _FL_GLEAM_UP_BOX,
+  

Re: [fltk.development] fltk-1.3 svn not building on ubuntu 8.04

2008-09-21 Thread Edmanuel Torres
Hi,

I think you are missing  libxt-dev

$ sudo apt-get install libxt-dev

Best,

Gnusci

On Sat, Sep 20, 2008 at 10:28 PM, Greg Ercolano [EMAIL PROTECTED] wrote:
 Ian MacArthur wrote:
 removing the reference to X11/Intrinsic.h seems to allow the build to 
 complete,
 it doesn't appear that we need it here.

And these warnings..

 xutf8/utf8Input.c:89: warning: incompatible implicit declaration of built-in 
 function 'memcpy'
 xutf8/utf8Input.c:150: warning: incompatible implicit declaration of 
 built-in function 'memcpy'
 [..]
 xutf8/utf8Input.c:378: warning: implicit declaration of function 'strstr'

..all sound like a missing #include string.h
 ___
 fltk-dev mailing list
 fltk-dev@easysw.com
 http://lists.easysw.com/mailman/listinfo/fltk-dev


___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev