~ubuntu-branches/ubuntu/karmic/gmsh/karmic

« back to all changes in this revision

Viewing changes to Fltk/Colorbar_Window.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Daniel Leidert
  • Date: 2008-05-18 12:46:05 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080518124605-716xqbqeo07o497k
Tags: 2.2.0-2
[Christophe Prud'homme]
* Bug fix: "gmsh ships no .desktop", thanks to Vassilis Pandis (Closes:
  #375770). Applied the Ubuntu patch.

[Daniel Leidert]
* debian/control (Vcs-Svn): Fixed.
  (Build-Depends): Use texlive instead of tetex-bin.
* debian/gmsh.doc-base (Section): Fixed accordingly to doc-base (>= 0.8.10).
* debian/rules: Removed some variable declarations, that lead to double
  configuration and seem to be useless.
  (build/gmsh): Try to avoid multiple runs by using a stamp.
  (orig-tarball): Renamed to get-orig-source and changed to use uscan.
* debian/watch: Added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: Colorbar_Window.cpp,v 1.58 2007-06-12 07:04:08 geuzaine Exp $
 
1
// $Id: Colorbar_Window.cpp,v 1.63 2008-03-20 11:44:03 geuzaine Exp $
2
2
//
3
 
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 
3
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
4
4
//
5
5
// This program is free software; you can redistribute it and/or modify
6
6
// it under the terms of the GNU General Public License as published by
24
24
// Copyright (C) 1990 - 1995 Bill Hibbard, Brian Paul, Dave Santek,
25
25
// and Andre Battaiola.
26
26
   
27
 
#include "Gmsh.h"
28
27
#include "GmshUI.h"
29
28
#include "GUI.h"
30
29
#include "ColorTable.h"
320
319
  marker_y = label_y - marker_height - font_height;
321
320
  wedge_y = marker_y - wedge_height;
322
321
  color_bg = fl_color_cube(CTX.UNPACK_RED(CTX.color.bg) * FL_NUM_RED / 256,
323
 
                           CTX.UNPACK_GREEN(CTX.color.bg) * FL_NUM_GREEN / 256,
324
 
                           CTX.UNPACK_BLUE(CTX.color.bg) * FL_NUM_BLUE / 256);
 
322
                           CTX.UNPACK_GREEN(CTX.color.bg) * FL_NUM_GREEN / 256,
 
323
                           CTX.UNPACK_BLUE(CTX.color.bg) * FL_NUM_BLUE / 256);
325
324
  redraw_range(0, ct->size - 1);
326
325
  redraw_marker();
327
326
}
328
327
 
329
328
// Update
330
329
 
331
 
void Colorbar_Window::update(char *name, double min, double max,
332
 
                             GmshColorTable * table, int *changed)
 
330
void Colorbar_Window::update(const char *name, double min, double max,
 
331
                             GmshColorTable *table, bool *changed)
333
332
{
334
333
  label = name;
335
334
  ct = table;
453
452
    else if(Fl::test_shortcut(FL_CTRL + 'v')) {
454
453
      ColorTable_Paste(ct);
455
454
      redraw();
456
 
      *viewchanged = 1;
 
455
      *viewchanged = true;
457
456
    }
458
457
    else if(Fl::test_shortcut('h')) {
459
458
      help_flag = !help_flag;
545
544
    if(compute) {
546
545
      ColorTable_Recompute(ct);
547
546
      redraw();
548
 
      *viewchanged = 1;
 
547
      *viewchanged = true;
549
548
      do_callback();
550
549
    }
551
550
    return 1;
659
658
      else
660
659
        redraw_range(entry - 1, pentry + 1);
661
660
      pentry = entry;
662
 
      *viewchanged = 1;
 
661
      *viewchanged = true;
663
662
    }
664
663
    return 1;
665
664
  }