Brian Tilley wrote:
> Attempted to build FLTK-1.3.0rc3 in visualC++ V6 today.
> Used fltk.dsw in the visualc6 folder under ide.
> Selected fltk and Win32 release
> Got the following Errors...........
> 
> Fl_Text_Display.cxx
> C:\fltk\fltk-1.3.0rc3\src\Fl_Text_Display.cxx(1941) : error C2446: '==' : no 
> conversion from 'const class Fl_Text_Display *const ' to 'class Fl_Widget *'
>         Conversion loses qualifiers
> C:\fltk\fltk-1.3.0rc3\src\Fl_Text_Display.cxx(1941) : error C2230: '==' : 
> indirection to different types
[..]
> Is this a RC3 bug or a problem with VisualC++ V6  ?

        Might be both.

        Please report this using the STR.

        Here's a patch I've been using.. basically casting
        instances of 'this' to a (void*) for the equality tests:

[root@tahoe] ## ROOT ## 325 # svn diff Fl_Text_Display.cxx
Index: Fl_Text_Display.cxx
===================================================================
--- Fl_Text_Display.cxx (revision 8193)
+++ Fl_Text_Display.cxx (working copy)
@@ -1938,19 +1938,19 @@
     fsize = styleRec->size;

     if (style & PRIMARY_MASK) {
-      if (Fl::focus() == this) background = selection_color();
+      if (Fl::focus() == (void*)this) background = selection_color();
       else background = fl_color_average(color(), selection_color(), 0.4f);
     } else if (style & HIGHLIGHT_MASK) {
-      if (Fl::focus() == this) background = fl_color_average(color(), 
selection_color(), 0.5f);
+      if (Fl::focus() == (void*)this) background = fl_color_average(color(), 
selection_color(), 0.5f);
       else background = fl_color_average(color(), selection_color(), 0.6f);
     } else background = color();
     foreground = fl_contrast(styleRec->color, background);
   } else if (style & PRIMARY_MASK) {
-    if (Fl::focus() == this) background = selection_color();
+    if (Fl::focus() == (void*)this) background = selection_color();
     else background = fl_color_average(color(), selection_color(), 0.4f);
     foreground = fl_contrast(textcolor(), background);
   } else if (style & HIGHLIGHT_MASK) {
-    if (Fl::focus() == this) background = fl_color_average(color(), 
selection_color(), 0.5f);
+    if (Fl::focus() == (void*)this) background = fl_color_average(color(), 
selection_color(), 0.5f);
     else background = fl_color_average(color(), selection_color(), 0.6f);
     foreground = fl_contrast(textcolor(), background);
   } else {
@@ -2011,13 +2011,13 @@
     return;

   if (style & PRIMARY_MASK) {
-    if (Fl::focus()==this) {
+    if (Fl::focus()==(void*)this) {
       fl_color(selection_color());
     } else {
       fl_color(fl_color_average(color(), selection_color(), 0.4f));
     }
   } else if (style & HIGHLIGHT_MASK) {
-    if (Fl::focus()==this) {
+    if (Fl::focus()==(void*)this) {
       fl_color(fl_color_average(color(), selection_color(), 0.5f));
     } else {
       fl_color(fl_color_average(color(), selection_color(), 0.6f));
@@ -3448,7 +3448,7 @@
   // draw the text cursor
   if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)
       && !buffer()->primary_selection()->selected() &&
-      mCursorOn && Fl::focus() == this ) {
+      mCursorOn && Fl::focus() == (void*)this ) {
     fl_push_clip(text_area.x-LEFT_MARGIN,
                  text_area.y,
                  text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
@@ -3578,7 +3578,7 @@
         else window()->cursor(FL_CURSOR_DEFAULT);
       }

-      if (Fl::focus() != this) {
+      if (Fl::focus() != (void*)this) {
         Fl::focus(this);
         handle(FL_FOCUS);
       }
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to