~ubuntu-branches/ubuntu/precise/fltk1.1/precise

« back to all changes in this revision

Viewing changes to fluid/Fl_Widget_Type.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2010-01-06 22:05:04 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100106220504-nwj8m1sa90s760yt
Tags: 1.1.10-2
* src/Makefile: link libfltk.so.1.1 against -lpthread, as fluid now
  otherwise fails to link on the Hurd (with complaints that libfltk.so.1
  contains undefined references to pthread_mutexattr_*).
* debian/source.lintian-overrides: retire per Lintian 2.3.1.  (See #553264.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: Fl_Widget_Type.cxx 6012 2008-01-04 21:45:49Z matt $"
 
2
// "$Id: Fl_Widget_Type.cxx 6801 2009-06-28 22:09:25Z matt $"
3
3
//
4
4
// Widget type code for the Fast Light Tool Kit (FLTK).
5
5
//
2124
2124
  }
2125
2125
  const char *var = is_class() ? "this" : name() ? name() : "o";
2126
2126
  if (color_name) {
2127
 
    write_c("%s%s->%s(%s);\n", indent(), var, field, color_name);
 
2127
    write_c("%s%s->%s((Fl_Color)%s);\n", indent(), var, field, color_name);
 
2128
    // we still must cast ^^^^^ here because a few widgets have the wrong argument type. Ouch!
2128
2129
  } else {
2129
2130
    write_c("%s%s->%s((Fl_Color)%d);\n", indent(), var, field, color);
2130
2131
  }
2230
2231
      write_c("%s%s->maximum(%g);\n", indent(), var, v->maximum());
2231
2232
    if (v->step()!=f->step())
2232
2233
      write_c("%s%s->step(%g);\n", indent(), var, v->step());
2233
 
    if (v->value())
 
2234
    if (v->value()!=1.0f)
2234
2235
      write_c("%s%s->value(%g);\n", indent(), var, v->value());
2235
2236
  }
2236
2237
 
2238
2239
    Fl_Font f; int s; Fl_Color c; textstuff(0,f,s,c);
2239
2240
    if (f != ff) write_c("%s%s->textfont(%d);\n", indent(), var, f);
2240
2241
    if (s != fs) write_c("%s%s->textsize(%d);\n", indent(), var, s);
2241
 
    if (c != fc) write_c("%s%s->textcolor(%d);\n",indent(), var, c);
 
2242
    if (c != fc) write_color("textcolor", c);
2242
2243
  }}
2243
2244
  const char* ud = user_data();
2244
2245
  if (class_name(1) && !parent->is_widget()) ud = "this";
2385
2386
    if (v->minimum()!=f->minimum()) write_string("minimum %g",v->minimum());
2386
2387
    if (v->maximum()!=f->maximum()) write_string("maximum %g",v->maximum());
2387
2388
    if (v->step()!=f->step()) write_string("step %g",v->step());
2388
 
    if (v->value()!=0.0) write_string("value %g",v->value());
 
2389
    if (v->value()!=1.0) write_string("value %g",v->value());
2389
2390
  }
2390
2391
  {Fl_Font ff; int fs; Fl_Color fc; if (textstuff(4,ff,fs,fc)) {
2391
2392
    Fl_Font f; int s; Fl_Color c; textstuff(0,f,s,c);
2740
2741
}
2741
2742
 
2742
2743
//
2743
 
// End of "$Id: Fl_Widget_Type.cxx 6012 2008-01-04 21:45:49Z matt $".
 
2744
// End of "$Id: Fl_Widget_Type.cxx 6801 2009-06-28 22:09:25Z matt $".
2744
2745
//