mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
-Fixed Dial label()
This commit is contained in:
parent
61a45d13e4
commit
559f4ca436
1 changed files with 7 additions and 13 deletions
|
@ -20,6 +20,7 @@
|
|||
#ifndef AVTK_DIAL_H
|
||||
#define AVTK_DIAL_H
|
||||
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <FL/Fl_Dial.H>
|
||||
#include <FL/Fl_Slider.H>
|
||||
|
@ -31,8 +32,7 @@ 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),
|
||||
_label ( 0 )
|
||||
Fl_Slider(_x, _y, _w, _h, _lab)
|
||||
{
|
||||
x = _x;
|
||||
y = _y;
|
||||
|
@ -45,19 +45,17 @@ class Dial : public Fl_Slider
|
|||
mouseClicked = false;
|
||||
|
||||
highlight = false;
|
||||
if ( _lab != 0 )
|
||||
_label = strdup( _lab );
|
||||
_label = _lab;
|
||||
}
|
||||
|
||||
~Dial()
|
||||
{
|
||||
if( _label )
|
||||
free( _label );
|
||||
}
|
||||
|
||||
bool highlight;
|
||||
int x, y, w, h;
|
||||
char* _label;
|
||||
//char* _label;
|
||||
std::string _label;
|
||||
|
||||
float radius;
|
||||
float lineWidth;
|
||||
|
@ -69,12 +67,8 @@ class Dial : public Fl_Slider
|
|||
|
||||
void setLabel( const char* newLabel )
|
||||
{
|
||||
//if( _label )
|
||||
// free( _label );
|
||||
|
||||
//_label = strdup( newLabel );
|
||||
|
||||
//label( _label );
|
||||
_label = newLabel;
|
||||
label( _label.c_str() );
|
||||
redraw();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue