From c322bc83b41ede369017dd0d5d9283dab40b3cb9 Mon Sep 17 00:00:00 2001 From: Mathias Buhr Date: Sun, 23 Apr 2017 17:13:45 +0200 Subject: [PATCH] Make label code consistent --- src/avtk/avtk_dial.h | 6 +++--- src/avtk/avtk_image.h | 6 ++---- src/avtk/avtk_light_button.h | 2 ++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/avtk/avtk_dial.h b/src/avtk/avtk_dial.h index 543aa47..294f491 100644 --- a/src/avtk/avtk_dial.h +++ b/src/avtk/avtk_dial.h @@ -30,9 +30,10 @@ namespace Avtk class Dial : public Fl_Slider { public: - Dial(int _x, int _y, int _w, int _h, const char* _lab=0): - Fl_Slider(_x, _y, _w, _h, _lab) + Dial(int _x, int _y, int _w, int _h, const char* _label=0): + Fl_Slider(_x, _y, _w, _h) { + copy_label(_label); x = _x; y = _y; w = _w; @@ -49,7 +50,6 @@ public: bool highlight; bool pan_style; int x, y, w, h; - char* _label; float radius; float lineWidth; diff --git a/src/avtk/avtk_image.h b/src/avtk/avtk_image.h index 09fe8c0..2546ffe 100644 --- a/src/avtk/avtk_image.h +++ b/src/avtk/avtk_image.h @@ -40,15 +40,14 @@ class Image : public Fl_Widget { public: Image(int _x, int _y, int _w, int _h, const char *_label=0 ): - Fl_Widget(_x, _y, _w, _h, _label) + Fl_Widget(_x, _y, _w, _h) { + copy_label(_label); x = _x; y = _y; w = _w; h = _h; - label = _label; - bits = -1; imageDataPtr = 0; @@ -65,7 +64,6 @@ public: } int x, y, w, h; - const char* label; int bits; const unsigned char* imageDataPtr; diff --git a/src/avtk/avtk_light_button.h b/src/avtk/avtk_light_button.h index c664e76..ee3a46c 100644 --- a/src/avtk/avtk_light_button.h +++ b/src/avtk/avtk_light_button.h @@ -31,6 +31,8 @@ public: LightButton(int _x, int _y, int _w, int _h, const char *_label): Fl_Button(_x, _y, _w, _h) { + copy_label(_label); + x = _x; y = _y; w = _w;