Add mouse wheel handling

Add mouse wheel handling to Fl_Counter, Fl_Spinner and Fl_Valuator,
Fl_Slider, Fl_Value_Slider and Fl_Value_Input widgets.
pull/2/head
Stelios Bounanos 2010-03-18 12:39:58 +00:00
rodzic b66e4565bc
commit bdcca8c39f
19 zmienionych plików z 1198 dodań i 406 usunięć

Wyświetl plik

@ -294,6 +294,7 @@ fldigi_SOURCES += \
include/fldigi-config.h \
include/flinput2.h \
include/flmisc.h \
include/flslider2.h \
include/flstring.h \
include/font_browser.h \
include/fontdef.h \
@ -473,6 +474,7 @@ fldigi_SOURCES += \
widgets/Fl_Tile_Check.cxx \
widgets/flinput2.cxx \
widgets/flmisc.cxx \
widgets/flslider2.cxx \
widgets/picture.cxx \
widgets/progress.cxx \
wwv/analysis.cxx \
@ -534,6 +536,7 @@ flarq_SOURCES += \
include/fileselect.h \
include/flinput2.h \
include/flmisc.h \
include/flslider2.h \
include/font_browser.h \
include/icons.h \
include/pixmaps.h \
@ -555,6 +558,7 @@ flarq_SOURCES += \
misc/timeops.cxx \
widgets/flinput2.cxx \
widgets/flmisc.cxx \
widgets/flslider2.cxx \
misc/icons.cxx \
misc/pixmaps.cxx \
misc/re.cxx \

Wyświetl plik

@ -37,10 +37,10 @@
#include "gettext.h"
#include "flmisc.h"
#include "flinput2.h"
#include "flslider2.h"
#include "spot.h"
#include <FL/Enumerations.H>
#include <FL/Fl_Slider.H>
#include <FL/Fl_Pack.H>
#include <string>
@ -143,7 +143,7 @@ Fl_Button *btnCloseViewer=(Fl_Button *)0;
Fl_Button *btnClearViewer=(Fl_Button *)0;
pskBrowser *brwsViewer=(pskBrowser *)0;
Fl_Input2 *inpSeek = (Fl_Input2 *)0;
Fl_Slider *sldrViewerSquelch = (Fl_Slider *)0;
Fl_Value_Slider2 *sldrViewerSquelch = (Fl_Value_Slider2 *)0;
//Fl_Light_Button *chkBeep = 0;
static void make_colors()
@ -337,7 +337,7 @@ Fl_Double_Window* createViewer() {
btnCloseViewer = new Fl_Button(85, viewerheight - 25, 65, 25, _("Close"));
btnCloseViewer->callback((Fl_Callback*)cb_btnCloseViewer);
bx = new Fl_Box(140, viewerheight - 25, 5, 25);
sldrViewerSquelch = new Fl_Slider(145, viewerheight - 25, 200, 25);
sldrViewerSquelch = new Fl_Value_Slider2(145, viewerheight - 25, 200, 25);
sldrViewerSquelch->tooltip(_("Set Viewer Squelch"));
sldrViewerSquelch->type(FL_HOR_NICE_SLIDER);
sldrViewerSquelch->range(0.0, 100.0);

Plik diff jest za duży Load Diff

Wyświetl plik

@ -47,6 +47,9 @@ decl {\#include "pskrep.h"} {global
decl {\#include "flinput2.h"} {public
}
decl {\#include "flslider2.h"} {public
}
decl {\#include "flmisc.h"} {public
}
@ -170,6 +173,7 @@ progdefaults.changed = true;}
callback {progdefaults.s2n = o->value();}
xywh {40 279 89 21} type Simple align 4 minimum -18 maximum 60 step 1 value 20
code0 {o->value(progdefaults.s2n);}
class Fl_Counter2
}
}
}
@ -348,12 +352,14 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Starting number} xywh {221 176 45 20} align 1 maximum 10000 step 1
code0 {o->value(progdefaults.ContestStart);}
class Fl_Value_Input2
}
Fl_Value_Input nbrContestDigits {
label Digits
callback {progdefaults.ContestDigits = (int)o->value();
progdefaults.changed = true;}
tooltip {Number of digits in serial number} xywh {303 175 45 20} align 1 minimum 1 maximum 5 step 1 value 3
class Fl_Value_Input2
}
Fl_Button btnResetSerNbr {
label Reset
@ -413,6 +419,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Enter time span in minutes} xywh {285 313 53 20} align 8 maximum 1440 step 1 value 120
code0 {o->value(progdefaults.timespan);}
class Fl_Value_Input2
}
Fl_Button btnDupColor {
label {Dup Color}
@ -775,6 +782,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Set level for good viewing} xywh {270 315 200 20} type Horizontal align 1 step 0.05 value 0.5 textsize 14
code0 {o->value(progdefaults.TxMonitorLevel);}
class Fl_Value_Slider2
}
}
}
@ -792,6 +800,7 @@ progdefaults.changed = true;
setwfrange();}
tooltip {Low frequency limit in Hz} xywh {50 72 70 20} type Simple align 8 minimum 0 maximum 500 step 50 value 300
code0 {o->value(progdefaults.LowFreqCutoff);}
class Fl_Counter2
}
Fl_Counter valLatency {
label {FFT latency (scan merging)}
@ -800,6 +809,7 @@ progdefaults.changed = true;}
tooltip {Latency increases frequency resolution,
decreases time resolution. 1 = no scan merging} xywh {50 102 70 21} type Simple align 8 minimum 1 maximum 8 step 1 value 4
code0 {o->value(progdefaults.latency);}
class Fl_Counter2
}
Fl_Check_Button btnWFaveraging {
label {FFT averaging}
@ -825,6 +835,7 @@ progdefaults.changed = true;
setwfrange();}
tooltip {High frequency limit in Hz} xywh {273 72 95 21} type Simple align 8 minimum 2000 maximum 4000 step 100 value 3000
code0 {o->value(progdefaults.HighFreqCutoff);}
class Fl_Counter2
}
}
Fl_Group {} {
@ -837,6 +848,7 @@ setwfrange();}
progdefaults.changed = true;}
tooltip {CPU usage increases with waterfall height} xywh {50 242 95 21} type Simple align 8 minimum 100 maximum 160 step 5 value 120
code0 {o->value(progdefaults.wfheight);}
class Fl_Counter2
}
}
}
@ -919,6 +931,7 @@ behaves inside the waterfall} xywh {15 196 150 22} down_box BORDER_BOX align 8
progdefaults.changed = true;}
tooltip {CW dsp filter bandwidth} xywh {40 115 290 20} type Horizontal align 8 minimum 10 maximum 500 step 10 value 150 textsize 14
code0 {o->value(progdefaults.CWbandwidth);}
class Fl_Value_Slider2
}
Fl_Check_Button btnCWrcvTrack {
label Tracking
@ -933,6 +946,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Range +/- wpm} xywh {225 150 65 20} type Simple align 8 minimum 5 maximum 25 step 1 value 10
code0 {o->value(progdefaults.CWrange);}
class Fl_Counter2
}
Fl_Value_Output valCWrcvWPM {
callback {progdefaults.changed = true;}
@ -959,6 +973,7 @@ sldrCWfarnsworth->value(o->value());
progdefaults.changed = true;}
tooltip {My transmit CW WPM} xywh {20 240 400 20} type Horizontal align 8 minimum 5 maximum 100 step 1 value 20 textsize 14
code0 {o->value(progdefaults.CWspeed);}
class Fl_Value_Slider2
}
Fl_Counter cntCWdefWPM {
label Default
@ -966,6 +981,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {The default CW speed} xywh {40 281 64 20} type Simple align 1 minimum 5 maximum 200 step 1 value 18
code0 {o->value(progdefaults.defCWspeed);}
class Fl_Counter2
}
Fl_Counter cntCWlowerlimit {
label {Lower limit}
@ -995,6 +1011,7 @@ cntCWlowerlimit->maximum(o->value()-20);}
progdefaults.changed = true;}
tooltip {My transmit CW WPM} xywh {20 335 400 20} type Horizontal align 8 minimum 5 maximum 100 step 1 value 20 textsize 14
code0 {o->value(progdefaults.CWfarnsworth);}
class Fl_Value_Slider2
}
Fl_Check_Button btnCWusefarnsworth {
label {Use Farnsworth timing}
@ -1019,6 +1036,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Dot to dot-space ratio} xywh {15 114 65 20} type Simple align 8 minimum 20 maximum 80 step 1 value 50
code0 {o->value(progdefaults.CWweight);}
class Fl_Counter2
}
Fl_Counter cntCWdash2dot {
label {Dash to dot ratio}
@ -1026,6 +1044,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Dash to dot ratio} xywh {240 114 64 20} type Simple align 8 minimum 2.5 maximum 4 value 3
code0 {o->value(progdefaults.CWdash2dot);}
class Fl_Counter2
}
Fl_Counter cntCWrisetime {
label {Edge timing}
@ -1033,6 +1052,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Leading and Trailing edge risetimes (msec)} xywh {240 145 65 20} type Simple align 8 minimum 0 maximum 15 value 4
code0 {o->value(progdefaults.CWrisetime);}
class Fl_Counter2
}
Fl_Choice mnuQSKshape {
label {Edge shape}
@ -1071,6 +1091,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Msec pre-keydown (+ is earlier in time)} xywh {15 275 64 20} type Simple align 8 minimum 0 maximum 20 step 0.5
code0 {o->value(progdefaults.CWpre);}
class Fl_Counter2
}
Fl_Counter cntPostTiming {
label {Post-keydown timing (ms)}
@ -1078,6 +1099,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Msec post-keydown (+ is earlier in time)} xywh {15 305 64 20} type Simple align 8 minimum -20 maximum 20 step 0.5
code0 {o->value(progdefaults.CWpre);}
class Fl_Counter2
}
Fl_Check_Button btnQSKadjust {
label {Send continuous}
@ -1127,6 +1149,7 @@ resetDOMEX();
progdefaults.changed = true;}
tooltip {Filter bandwidth relative to signal width} xywh {156 141 63 20} type Simple align 8 minimum 1 maximum 2 value 1.5
code0 {o->value(progdefaults.DOMINOEX_BW);}
class Fl_Counter2
}
Fl_Check_Button chkDominoEX_FEC {
label FEC
@ -1141,6 +1164,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {CWI detection and suppression} xywh {15 207 260 20} type Horizontal align 1 textsize 14
code0 {o->value(progdefaults.DomCWI);}
class Fl_Value_Slider2
}
Fl_Counter valDominoEX_PATHS {
label {Paths (hidden)}
@ -1149,6 +1173,7 @@ progdefaults.changed = true;}
xywh {339 194 63 20} type Simple minimum 4 maximum 8 step 1 value 5
code0 {o->value(progdefaults.DOMINOEX_PATHS);}
code1 {o->hide();}
class Fl_Counter2
}
}
}
@ -1181,6 +1206,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {\# of multiple scans / character line} xywh {15 100 40 20} align 8 maximum 3
code0 {o->value(progdefaults.HellXmtWidth);}
class Fl_Spinner2
}
Fl_Check_Button btnHellRcvWidth {
label {Halve receive width}
@ -1203,6 +1229,7 @@ progdefaults.changed = true;} open
callback {progdefaults.HELL_BW = sldrHellBW->value();}
tooltip {Adjust the DSP bandwidth} xywh {206 147 246 20} type Horizontal align 5 minimum 10 maximum 2400 step 5 value 400 textsize 14
code0 {o->value(progdefaults.HELL_BW);}
class Fl_Value_Slider2
}
Fl_Check_Button btnFeldHellIdle {
label {Transmit periods (.) when idle}
@ -1284,6 +1311,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
xywh {150 240 40 25} align 8 maximum 10 value 4
code0 {o->value(progdefaults.mt63_tone_duration);}
class Fl_Spinner2
}
}
}
@ -1324,6 +1352,7 @@ progdefaults.changed = true;} open
resetOLIVIA();
progdefaults.changed = true;}
tooltip {Change ONLY to experiment} xywh {80 150 70 20} type Simple align 8 minimum 2 maximum 128 step 1 value 8
class Fl_Counter2
}
Fl_Counter cntOlivia_sinteg {
label {Integration period (FEC blocks)}
@ -1331,6 +1360,7 @@ progdefaults.changed = true;}
resetOLIVIA();
progdefaults.changed = true;}
tooltip {Change ONLY to experiment} xywh {80 180 70 20} type Simple align 8 minimum 2 maximum 128 step 1 value 4
class Fl_Counter2
}
}
Fl_Check_Button btnOlivia_8bit {
@ -1363,6 +1393,7 @@ wf->redraw_marker();
progdefaults.changed = true;}
tooltip {Capture signals within this frequency range} xywh {15 117 75 20} type Simple align 8 minimum 10 maximum 500 step 10 value 200
code0 {o->value(progdefaults.SearchRange);}
class Fl_Counter2
}
Fl_Counter cntACQsn {
label {Acquisition S/N (dB)}
@ -1370,6 +1401,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Capture signals over this threshold} xywh {15 146 75 20} type Simple align 8 minimum 3 maximum 20 step 1 value 6
code0 {o->value(progdefaults.ACQsn);}
class Fl_Counter2
}
}
Fl_Group {} {
@ -1390,6 +1422,7 @@ progdefaults.changed = true;} open
progdefaults.changed = true;}
tooltip {Will occur after this time in seconds} xywh {156 214 75 20} type Simple align 8 minimum 0 maximum 30 step 1
code0 {o->value(progdefaults.StatusTimeout);}
class Fl_Counter2
}
}
}
@ -1418,6 +1451,7 @@ initViewer();}
code1 {o->maximum(30);}
code2 {o->step(1);}
code3 {o->value(progdefaults.VIEWERchannels);}
class Fl_Spinner2
}
Fl_Spinner cntStartFrequency {
label {Start frequency}
@ -1429,6 +1463,7 @@ initViewer();}
code1 {o->maximum(1000);}
code2 {o->step(100);}
code3 {o->value(progdefaults.VIEWERstart);}
class Fl_Spinner2
}
Fl_Spinner cntTimeout {
label {Inactivity timeout}
@ -1440,6 +1475,7 @@ progdefaults.changed = true;}
code1 {o->maximum(180);}
code2 {o->step(1);}
code3 {o->value(progdefaults.VIEWERtimeout);}
class Fl_Spinner2
}
Fl_Choice mnuViewerLabel {
label {Channel label}
@ -1533,6 +1569,7 @@ progdefaults.changed = true;}
callback {progdefaults.rtty_autocount = (int)o->value();
progdefaults.changed = true;}
tooltip {Set page width} xywh {335 118 65 20} type Simple align 8 minimum 68 maximum 80 step 1 value 72
class Fl_Counter2
}
Fl_Box {} {
label {after:}
@ -1597,6 +1634,7 @@ progdefaults.changed = true;}
callback {progdefaults.RTTY_BW = o->value();}
tooltip {Adjust the DSP bandwidth} xywh {100 325 300 20} type Horizontal align 5 minimum 5 maximum 200 step 1 value 25 textsize 14
code0 {o->value(progdefaults.RTTY_BW);}
class Fl_Value_Slider2
}
Fl_Counter selCustomShift {
label {Custom shift}
@ -1605,6 +1643,7 @@ resetRTTY();
progdefaults.changed = true;}
tooltip {Input carrier shift} xywh {15 100 100 20} align 8 minimum 10 maximum 1000 step 1 value 450
code0 {o->lstep(10.0);}
class Fl_Counter2
}
}
}
@ -1638,6 +1677,7 @@ resetTHOR();
progdefaults.changed = true;}
tooltip {Filter bandwidth relative to signal width} xywh {156 141 63 20} type Simple align 8 minimum 1 maximum 2 value 1.5
code0 {o->value(progdefaults.THOR_BW);}
class Fl_Counter2
}
Fl_Value_Slider valThorCWI {
label {CWI threshold}
@ -1645,6 +1685,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {CWI detection and suppression} xywh {15 194 260 20} type Horizontal align 1 textsize 14
code0 {o->value(progdefaults.ThorCWI);}
class Fl_Value_Slider2
}
Fl_Counter valTHOR_PATHS {
label {Paths (hidden)}
@ -1653,6 +1694,7 @@ progdefaults.changed = true;}
xywh {353 193 75 21} type Simple align 1 minimum 4 maximum 8 step 1 value 5
code0 {o->value(progdefaults.THOR_PATHS);}
code1 {o->hide();}
class Fl_Counter2
}
}
}
@ -1820,24 +1862,27 @@ btnRevertRIGCAT->activate();} open
callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
tooltip {\# retries before giving up} xywh {30 150 60 22} align 5
tooltip {\# retries before giving up} xywh {30 150 60 22} align 5 maximum 1000 step 1
code0 {o->value(progdefaults.RigCatRetries);}
class Fl_Value_Input2
}
Fl_Value_Input cntRigCatTimeout {
label {Retry interval (ms)}
callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
tooltip {Time between retires in msec} xywh {148 150 60 22} align 5
tooltip {Time between retires in msec} xywh {148 150 60 22} align 5 maximum 10000 step 1
code0 {o->value(progdefaults.RigCatTimeout);}
class Fl_Value_Input2
}
Fl_Value_Input cntRigCatWait {
label {Write delay (ms)}
callback {btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
btnRevertRIGCAT->activate();}
xywh {30 190 60 22} align 5
xywh {30 190 60 22} align 5 maximum 10000 step 1
code0 {o->value(progdefaults.RigCatWait);}
class Fl_Value_Input2
}
Fl_Choice mnuXmlRigBaudrate {
label {Baud rate:}
@ -1855,6 +1900,7 @@ btnInitRIGCAT->redraw();
btnRevertRIGCAT->activate();}
xywh {388 184 95 21} type Simple align 4 minimum 1 maximum 2 step 1 value 1
code0 {o->value(progdefaults.RigCatStopbits);}
class Fl_Counter2
}
Fl_Button btnInitRIGCAT {
label Initialize
@ -1995,32 +2041,36 @@ btnRevertHAMLIB->activate();} open
callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
tooltip {\# times to resend command before giving up} xywh {30 133 70 24} align 5
tooltip {\# times to resend command before giving up} xywh {30 133 70 24} align 5 maximum 1000 step 1
code0 {o->value(progdefaults.HamlibRetries);}
class Fl_Value_Input2
}
Fl_Value_Input cntHamlibTimeout {
label {Retry Interval (ms)}
callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
tooltip {Msec's between retries} xywh {155 133 70 24} align 5
tooltip {Msec's between retries} xywh {155 133 70 24} align 5 maximum 10000 step 1
code0 {o->value(progdefaults.HamlibTimeout);}
class Fl_Value_Input2
}
Fl_Value_Input cntHamlibWriteDelay {
label {Write delay (ms)}
callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
tooltip {Msec's between sequential commands} xywh {30 176 70 24} align 5
tooltip {Msec's between sequential commands} xywh {30 176 70 24} align 5 maximum 10000 step 1
code0 {o->value(progdefaults.HamlibWriteDelay);}
class Fl_Value_Input2
}
Fl_Value_Input cntHamlibWait {
label {Post write delay (ms)}
callback {btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
btnRevertHAMLIB->activate();}
tooltip {Wait interval (msecs) before reading response} xywh {156 176 70 24} align 5
tooltip {Wait interval (msecs) before reading response} xywh {156 176 70 24} align 5 maximum 10000 step 1
code0 {o->value(progdefaults.HamlibWait);}
class Fl_Value_Input2
}
Fl_Choice mnuBaudRate {
label {Baud rate:}
@ -2038,6 +2088,7 @@ btnRevertHAMLIB->activate();
progdefaults.changed = true;}
xywh {389 163 95 21} type Simple align 4 minimum 1 maximum 2 step 1 value 1
code0 {o->value(progdefaults.HamRigStopbits);}
class Fl_Counter2
}
Fl_Counter cntHamlibTimeout0 {
label {Retry interval (ms)}
@ -2046,6 +2097,7 @@ btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();}
tooltip {Msec's between retries} xywh {150 140 100 20} type Simple align 5 minimum 2 maximum 20000 step 1 value 10 hide
code0 {o->value(progdefaults.HamlibTimeout);}
class Fl_Counter2
}
Fl_Input inpHamlibConfig {
label {Advanced configuration:}
@ -2363,6 +2415,7 @@ progdefaults.changed = true;}
code0 {o->step(1);}
code1 {o->minimum(-50000);}
code2 {o->maximum(50000);}
class Fl_Spinner2
}
Fl_Spinner cntTxRateCorr {
label {TX ppm}
@ -2372,6 +2425,7 @@ progdefaults.changed = true;}
code0 {o->step(1);}
code1 {o->minimum(-50000);}
code2 {o->maximum(50000);}
class Fl_Spinner2
}
Fl_Spinner cntTxOffset {
label {TX offset}
@ -2382,6 +2436,7 @@ progdefaults.changed = true;}
code1 {o->step(1);}
code2 {o->minimum(-50);}
code3 {o->maximum(50);}
class Fl_Spinner2
}
}
Fl_Check_Button chkAudioStereoOut {
@ -2456,6 +2511,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Set the sound card PCM level} xywh {15 167 340 20} type Horizontal selection_color 15 align 8 value 0.8 textsize 14
code0 {extern void setPCMvolume(double);}
class Fl_Value_Slider2
}
}
}
@ -2511,6 +2567,7 @@ progdefaults.changed = true;}
tooltip {Set the number of characters per row} xywh {365 127 120 20} type Horizontal align 4 minimum 1 maximum 4 step 1 value 1 textsize 14
code0 {o->value(progdefaults.videowidth);}
code1 {if (progdefaults.ID_SMALL) o->deactivate();}
class Fl_Value_Slider2
}
Fl_Button bVideoIDModes {
label {Video ID modes}
@ -2538,6 +2595,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Send at this WPM} xywh {165 185 180 20} type Horizontal align 1 minimum 15 maximum 40 step 1 value 18 textsize 14
code0 {o->value(progdefaults.CWIDwpm);}
class Fl_Value_Slider2
}
Fl_Button bCWIDModes {
label {CW ID modes}
@ -2642,6 +2700,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Default CW tracking point} xywh {42 71 65 20} minimum 200 maximum 4000 step 1 value 1000
code0 {o->value(progdefaults.CWsweetspot);}
class Fl_Value_Input2
}
Fl_Value_Input valRTTYsweetspot {
label RTTY
@ -2649,6 +2708,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Default RTTY tracking point} xywh {220 71 65 20} minimum 200 maximum 4000 step 1 value 1000
code0 {o->value(progdefaults.RTTYsweetspot);}
class Fl_Value_Input2
}
Fl_Value_Input valPSKsweetspot {
label {PSK et al.}
@ -2656,6 +2716,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Default for all other modems} xywh {420 71 65 20} minimum 200 maximum 4000 step 1 value 1000
code0 {o->value(progdefaults.PSKsweetspot);}
class Fl_Value_Input2
}
Fl_Check_Button btnStartAtSweetSpot {
label {Always start new modems at these frequencies}
@ -2859,6 +2920,7 @@ wf->redraw_marker();
progdefaults.changed = true;}
tooltip {Default listen / transmit frequency} xywh {56 86 80 20} type Simple align 8 minimum 500 maximum 2500 step 25 value 1500
code0 {o->value(progdefaults.ServerCarrier);}
class Fl_Counter2
}
Fl_Counter cntServerOffset {
label {Search range (Hz)}
@ -2867,6 +2929,7 @@ wf->redraw_marker();
progdefaults.changed = true;}
tooltip {Listen for signals within this range} xywh {56 123 80 20} type Simple align 8 minimum 10 maximum 500 step 10 value 100
code0 {o->value(progdefaults.SearchRange);}
class Fl_Counter2
}
Fl_Counter cntServerACQsn {
label {Acquisition S/N (dB)}
@ -2874,6 +2937,7 @@ progdefaults.changed = true;}
progdefaults.changed = true;}
tooltip {Capture signals over this threshold} xywh {56 160 80 20} type Simple align 8 minimum 3 maximum 20 step 1 value 6
code0 {o->value(progdefaults.ServerACQsn);}
class Fl_Counter2
}
Fl_Counter cntServerAFCrange {
label {AFC range (Hz)}
@ -2882,6 +2946,7 @@ wf->redraw_marker();
progdefaults.changed = true;}
tooltip {Limit AFC movement to this range} xywh {56 197 80 20} type Simple align 8 minimum 10 maximum 500 step 10 value 25
code0 {o->value(progdefaults.SearchRange);}
class Fl_Counter2
}
Fl_Check_Button btnPSKmailSweetSpot {
label {Reset to Carrier}

Wyświetl plik

@ -264,8 +264,8 @@ Fl_Button *qso_btnAct = 0;
Fl_Input2 *qso_inpAct = 0;
Fl_Group *MixerFrame;
Fl_Value_Slider *valRcvMixer;
Fl_Value_Slider *valXmtMixer;
Fl_Value_Slider2 *valRcvMixer;
Fl_Value_Slider2 *valXmtMixer;
int pad = 1;
int Hentry = 24;
@ -328,7 +328,7 @@ waterfall *wf = (waterfall *)0;
Digiscope *digiscope = (Digiscope *)0;
//Digiscope *wfscope = (Digiscope *)0;
Fl_Slider *sldrSquelch = (Fl_Slider *)0;
Fl_Slider2 *sldrSquelch = (Fl_Slider2 *)0;
Progress *pgrsSquelch = (Progress *)0;
Fl_RGB_Image *feld_image = 0;
@ -3399,7 +3399,7 @@ void create_fl_digi_main_primary() {
int Hxmttxt = (Htext - (Hrcvtxt));
int sw = DEFAULT_SW;
MixerFrame = new Fl_Group(0,Y,sw, Hrcvtxt + Hxmttxt);
valRcvMixer = new Fl_Value_Slider(0, Y, sw, (Htext)/2, "");
valRcvMixer = new Fl_Value_Slider2(0, Y, sw, (Htext)/2, "");
valRcvMixer->type(FL_VERT_NICE_SLIDER);
valRcvMixer->color(fl_rgb_color(0,110,30));
valRcvMixer->labeltype(FL_ENGRAVED_LABEL);
@ -3409,7 +3409,7 @@ void create_fl_digi_main_primary() {
valRcvMixer->value(100.0);
valRcvMixer->step(1.0);
valRcvMixer->callback( (Fl_Callback *)cb_RcvMixer);
valXmtMixer = new Fl_Value_Slider(0, Y + (Htext)/2, sw, (Htext)/2, "");
valXmtMixer = new Fl_Value_Slider2(0, Y + (Htext)/2, sw, (Htext)/2, "");
valXmtMixer->type(FL_VERT_NICE_SLIDER);
valXmtMixer->color(fl_rgb_color(110,0,30));
valXmtMixer->labeltype(FL_ENGRAVED_LABEL);
@ -3509,7 +3509,7 @@ void create_fl_digi_main_primary() {
pgrsSquelch->color(FL_BACKGROUND2_COLOR, FL_DARK_GREEN);
pgrsSquelch->type(Progress::VERTICAL);
pgrsSquelch->tooltip(_("Detected signal level"));
sldrSquelch = new Fl_Slider(
sldrSquelch = new Fl_Slider2(
rightof(pgrsSquelch), Y + 4,
DEFAULT_SW, Hwfall - 8,
"");
@ -3924,8 +3924,8 @@ void noop_controls() // create and then hide all controls not being used
qso_btnAct = new Fl_Button(defwidget); qso_btnAct->hide();
qso_inpAct = new Fl_Input2(defwidget); qso_inpAct->hide();
valRcvMixer = new Fl_Value_Slider(defwidget); valRcvMixer->hide();
valXmtMixer = new Fl_Value_Slider(defwidget); valXmtMixer->hide();
valRcvMixer = new Fl_Value_Slider2(defwidget); valRcvMixer->hide();
valXmtMixer = new Fl_Value_Slider2(defwidget); valXmtMixer->hide();
dummywindow->end();
dummywindow->hide();
@ -4023,7 +4023,7 @@ void create_fl_digi_main_WF_only() {
pgrsSquelch->type(Progress::VERTICAL);
pgrsSquelch->tooltip(_("Detected signal level"));
sldrSquelch = new Fl_Slider(
sldrSquelch = new Fl_Slider2(
rightof(pgrsSquelch), Y + pad,
DEFAULT_SW, Hwfall - 2 * pad,
"");

Wyświetl plik

@ -35,6 +35,7 @@
#include <FL/fl_draw.H>
#include "font_browser.h"
#include "flslider2.h"
#include "gettext.h"
using namespace std;
@ -120,7 +121,7 @@ Font_Browser::Font_Browser(int x, int y, int w, int h, const char *lbl )
lst_Font->type(FL_HOLD_BROWSER);
lst_Font->callback(fb_callback, this);
txt_Size = new Fl_Value_Input(290, 15, 50, 22, _("Size:"));
txt_Size = new Fl_Value_Input2(290, 15, 50, 22, _("Size:"));
txt_Size->align(FL_ALIGN_TOP_LEFT);
txt_Size->range(1.0, 48.0);
txt_Size->step(1.0);

Wyświetl plik

@ -55,7 +55,7 @@ Fl_Check_Button *chkNotifyDupIgnore=(Fl_Check_Button *)0;
Fl_Choice *mnuNotifyDupWhich=(Fl_Choice *)0;
Fl_Spinner *cntNotifyDupTime=(Fl_Spinner *)0;
Fl_Spinner2 *cntNotifyDupTime=(Fl_Spinner2 *)0;
Fl_Check_Button *chkNotifyDupBand=(Fl_Check_Button *)0;
@ -63,13 +63,13 @@ Fl_Check_Button *chkNotifyDupMode=(Fl_Check_Button *)0;
Fl_Group *grpNotifyAction=(Fl_Group *)0;
Fl_Spinner *cntNotifyActionLimit=(Fl_Spinner *)0;
Fl_Spinner2 *cntNotifyActionLimit=(Fl_Spinner2 *)0;
Fl_Input2 *inpNotifyActionDialog=(Fl_Input2 *)0;
Fl_Button *btnNotifyActionDialogDefault=(Fl_Button *)0;
Fl_Spinner *cntNotifyActionDialogTimeout=(Fl_Spinner *)0;
Fl_Spinner2 *cntNotifyActionDialogTimeout=(Fl_Spinner2 *)0;
Fl_Input2 *inpNotifyActionRXMarker=(Fl_Input2 *)0;
@ -170,11 +170,20 @@ Fl_Double_Window* make_notify_window() {
{ mnuNotifyDupWhich = new Fl_Choice(33, 367, 120, 20, _("in:"));
mnuNotifyDupWhich->down_box(FL_BORDER_BOX);
} // Fl_Choice* mnuNotifyDupWhich
{ cntNotifyDupTime = new Fl_Spinner(77, 397, 60, 20, _("Time (s):"));
{ cntNotifyDupTime = new Fl_Spinner2(77, 397, 60, 20, _("Time (s):"));
cntNotifyDupTime->box(FL_NO_BOX);
cntNotifyDupTime->color((Fl_Color)FL_BACKGROUND_COLOR);
cntNotifyDupTime->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
cntNotifyDupTime->labeltype(FL_NORMAL_LABEL);
cntNotifyDupTime->labelfont(0);
cntNotifyDupTime->labelsize(14);
cntNotifyDupTime->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
cntNotifyDupTime->minimum(0);
cntNotifyDupTime->maximum(97200);
cntNotifyDupTime->value(600);
} // Fl_Spinner* cntNotifyDupTime
cntNotifyDupTime->align(FL_ALIGN_LEFT);
cntNotifyDupTime->when(FL_WHEN_RELEASE);
} // Fl_Spinner2* cntNotifyDupTime
{ chkNotifyDupBand = new Fl_Check_Button(12, 427, 65, 20, _("Band"));
chkNotifyDupBand->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyDupBand
@ -186,11 +195,20 @@ Fl_Double_Window* make_notify_window() {
{ grpNotifyAction = new Fl_Group(222, 2, 276, 394, _("Action"));
grpNotifyAction->box(FL_ENGRAVED_FRAME);
grpNotifyAction->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
{ cntNotifyActionLimit = new Fl_Spinner(343, 31, 52, 20, _("Trigger limit (s):"));
{ cntNotifyActionLimit = new Fl_Spinner2(343, 31, 52, 20, _("Trigger limit (s):"));
cntNotifyActionLimit->tooltip(_("Minimum time between events"));
cntNotifyActionLimit->box(FL_NO_BOX);
cntNotifyActionLimit->color((Fl_Color)FL_BACKGROUND_COLOR);
cntNotifyActionLimit->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
cntNotifyActionLimit->labeltype(FL_NORMAL_LABEL);
cntNotifyActionLimit->labelfont(0);
cntNotifyActionLimit->labelsize(14);
cntNotifyActionLimit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
cntNotifyActionLimit->minimum(0);
cntNotifyActionLimit->maximum(3600);
} // Fl_Spinner* cntNotifyActionLimit
cntNotifyActionLimit->align(FL_ALIGN_LEFT);
cntNotifyActionLimit->when(FL_WHEN_RELEASE);
} // Fl_Spinner2* cntNotifyActionLimit
{ Fl_Input2* o = inpNotifyActionDialog = new Fl_Input2(232, 78, 218, 60, _("Show alert window:"));
inpNotifyActionDialog->type(4);
inpNotifyActionDialog->box(FL_DOWN_BOX);
@ -207,11 +225,20 @@ Fl_Double_Window* make_notify_window() {
{ btnNotifyActionDialogDefault = new Fl_Button(460, 96, 28, 23);
btnNotifyActionDialogDefault->tooltip(_("Insert default text"));
} // Fl_Button* btnNotifyActionDialogDefault
{ cntNotifyActionDialogTimeout = new Fl_Spinner(383, 148, 52, 20, _("Hide window after (s):"));
{ cntNotifyActionDialogTimeout = new Fl_Spinner2(383, 148, 52, 20, _("Hide window after (s):"));
cntNotifyActionDialogTimeout->box(FL_NO_BOX);
cntNotifyActionDialogTimeout->color((Fl_Color)FL_BACKGROUND_COLOR);
cntNotifyActionDialogTimeout->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
cntNotifyActionDialogTimeout->labeltype(FL_NORMAL_LABEL);
cntNotifyActionDialogTimeout->labelfont(0);
cntNotifyActionDialogTimeout->labelsize(14);
cntNotifyActionDialogTimeout->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
cntNotifyActionDialogTimeout->minimum(0);
cntNotifyActionDialogTimeout->maximum(3600);
cntNotifyActionDialogTimeout->value(5);
} // Fl_Spinner* cntNotifyActionDialogTimeout
cntNotifyActionDialogTimeout->align(FL_ALIGN_LEFT);
cntNotifyActionDialogTimeout->when(FL_WHEN_RELEASE);
} // Fl_Spinner2* cntNotifyActionDialogTimeout
{ Fl_Input2* o = inpNotifyActionRXMarker = new Fl_Input2(232, 195, 218, 60, _("Append to RX text:"));
inpNotifyActionRXMarker->type(4);
inpNotifyActionRXMarker->box(FL_DOWN_BOX);

Wyświetl plik

@ -13,6 +13,9 @@ decl {\#include "table.h"} {public global
decl {\#include "flinput2.h"} {public global
}
decl {\#include "flslider2.h"} {public global
}
decl {\#include "notify.h"} {}
Function {make_notify_window()} {open
@ -100,6 +103,7 @@ chkNotifyFilterCall->value(0);}
Fl_Spinner cntNotifyDupTime {
label {Time (s):}
xywh {77 397 60 20} minimum 0 maximum 97200 value 600
class Fl_Spinner2
}
Fl_Check_Button chkNotifyDupBand {
label Band
@ -117,6 +121,7 @@ chkNotifyFilterCall->value(0);}
Fl_Spinner cntNotifyActionLimit {
label {Trigger limit (s):}
tooltip {Minimum time between events} xywh {343 31 52 20} minimum 0 maximum 3600 value 1
class Fl_Spinner2
}
Fl_Input inpNotifyActionDialog {
label {Show alert window:}
@ -130,6 +135,7 @@ chkNotifyFilterCall->value(0);}
Fl_Spinner cntNotifyActionDialogTimeout {
label {Hide window after (s):}
xywh {383 148 52 20} minimum 0 maximum 3600 value 5
class Fl_Spinner2
}
Fl_Input inpNotifyActionRXMarker {
label {Append to RX text:}

Wyświetl plik

@ -284,37 +284,37 @@ static void cb_txtBEACONTXT(Fl_Input2* o, void*) {
changeBeaconText(o->value());
}
Fl_Spinner *spnRetries=(Fl_Spinner *)0;
Fl_Spinner2 *spnRetries=(Fl_Spinner2 *)0;
static void cb_spnRetries(Fl_Spinner* o, void*) {
static void cb_spnRetries(Fl_Spinner2* o, void*) {
iretries = (int)o->value();
cbSetConfig();
}
Fl_Spinner *spnWaitTime=(Fl_Spinner *)0;
Fl_Spinner2 *spnWaitTime=(Fl_Spinner2 *)0;
static void cb_spnWaitTime(Fl_Spinner* o, void*) {
static void cb_spnWaitTime(Fl_Spinner2* o, void*) {
iwaittime = (int)(1000 * o->value());
cbSetConfig();
}
Fl_Spinner *spnTimeout=(Fl_Spinner *)0;
Fl_Spinner2 *spnTimeout=(Fl_Spinner2 *)0;
static void cb_spnTimeout(Fl_Spinner* o, void*) {
static void cb_spnTimeout(Fl_Spinner2* o, void*) {
itimeout = (int)(o->value() * 1000.0);
cbSetConfig();
}
Fl_Spinner *spnTxDelay=(Fl_Spinner *)0;
Fl_Spinner2 *spnTxDelay=(Fl_Spinner2 *)0;
static void cb_spnTxDelay(Fl_Spinner* o, void*) {
static void cb_spnTxDelay(Fl_Spinner2* o, void*) {
txdelay = (int)o->value();
cbSetConfig();
}
Fl_Spinner *spnBcnInterval=(Fl_Spinner *)0;
Fl_Spinner2 *spnBcnInterval=(Fl_Spinner2 *)0;
static void cb_spnBcnInterval(Fl_Spinner* o, void*) {
static void cb_spnBcnInterval(Fl_Spinner2* o, void*) {
bcnInterval = (int)o->value();
cbSetConfig();
}
@ -364,46 +364,91 @@ Fl_Double_Window* arq_configure() {
Fl_Group::current()->resizable(txtBEACONTXT);
o->value(beacontext.c_str());
} // Fl_Input2* txtBEACONTXT
{ Fl_Spinner* o = spnRetries = new Fl_Spinner(146, 71, 45, 22, "Retries:");
{ Fl_Spinner2* o = spnRetries = new Fl_Spinner2(146, 71, 45, 22, "Retries:");
spnRetries->tooltip("# retries before connection declared down");
spnRetries->box(FL_NO_BOX);
spnRetries->color((Fl_Color)FL_BACKGROUND_COLOR);
spnRetries->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
spnRetries->labeltype(FL_NORMAL_LABEL);
spnRetries->labelfont(0);
spnRetries->labelsize(14);
spnRetries->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
spnRetries->callback((Fl_Callback*)cb_spnRetries);
spnRetries->align(FL_ALIGN_LEFT);
spnRetries->when(FL_WHEN_RELEASE);
o->minimum(2);
o->maximum(20);
o->step(1);
o->value(iretries);
} // Fl_Spinner* spnRetries
{ Fl_Spinner* o = spnWaitTime = new Fl_Spinner(121, 98, 70, 22, "Wait time (sec):");
} // Fl_Spinner2* spnRetries
{ Fl_Spinner2* o = spnWaitTime = new Fl_Spinner2(121, 98, 70, 22, "Wait time (sec):");
spnWaitTime->tooltip("Time between retries");
spnWaitTime->box(FL_NO_BOX);
spnWaitTime->color((Fl_Color)FL_BACKGROUND_COLOR);
spnWaitTime->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
spnWaitTime->labeltype(FL_NORMAL_LABEL);
spnWaitTime->labelfont(0);
spnWaitTime->labelsize(14);
spnWaitTime->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
spnWaitTime->callback((Fl_Callback*)cb_spnWaitTime);
spnWaitTime->align(FL_ALIGN_LEFT);
spnWaitTime->when(FL_WHEN_RELEASE);
o->minimum(10);
o->maximum(30);
o->step(5);
o->value(iwaittime/1000);
} // Fl_Spinner* spnWaitTime
{ Fl_Spinner* o = spnTimeout = new Fl_Spinner(121, 126, 70, 22, "Timeout (sec):");
} // Fl_Spinner2* spnWaitTime
{ Fl_Spinner2* o = spnTimeout = new Fl_Spinner2(121, 126, 70, 22, "Timeout (sec):");
spnTimeout->tooltip("Time out for dead connection");
spnTimeout->box(FL_NO_BOX);
spnTimeout->color((Fl_Color)FL_BACKGROUND_COLOR);
spnTimeout->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
spnTimeout->labeltype(FL_NORMAL_LABEL);
spnTimeout->labelfont(0);
spnTimeout->labelsize(14);
spnTimeout->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
spnTimeout->callback((Fl_Callback*)cb_spnTimeout);
spnTimeout->align(FL_ALIGN_LEFT);
spnTimeout->when(FL_WHEN_RELEASE);
o->minimum(30);
o->maximum(300);
o->step(15);
o->value(itimeout / 1000);
} // Fl_Spinner* spnTimeout
{ Fl_Spinner* o = spnTxDelay = new Fl_Spinner(317, 98, 70, 22, "Tx delay (msec):");
} // Fl_Spinner2* spnTimeout
{ Fl_Spinner2* o = spnTxDelay = new Fl_Spinner2(317, 98, 70, 22, "Tx delay (msec):");
spnTxDelay->tooltip("delay from Rx to Tx");
spnTxDelay->box(FL_NO_BOX);
spnTxDelay->color((Fl_Color)FL_BACKGROUND_COLOR);
spnTxDelay->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
spnTxDelay->labeltype(FL_NORMAL_LABEL);
spnTxDelay->labelfont(0);
spnTxDelay->labelsize(14);
spnTxDelay->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
spnTxDelay->callback((Fl_Callback*)cb_spnTxDelay);
spnTxDelay->align(FL_ALIGN_LEFT);
spnTxDelay->when(FL_WHEN_RELEASE);
o->minimum(200);
o->maximum(2000);
o->step(100);
o->value(txdelay);
} // Fl_Spinner* spnTxDelay
{ Fl_Spinner* o = spnBcnInterval = new Fl_Spinner(398, 71, 70, 22, "Beacon interval (sec)");
} // Fl_Spinner2* spnTxDelay
{ Fl_Spinner2* o = spnBcnInterval = new Fl_Spinner2(398, 71, 70, 22, "Beacon interval (sec)");
spnBcnInterval->tooltip("Time between beacon transmissions");
spnBcnInterval->box(FL_NO_BOX);
spnBcnInterval->color((Fl_Color)FL_BACKGROUND_COLOR);
spnBcnInterval->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
spnBcnInterval->labeltype(FL_NORMAL_LABEL);
spnBcnInterval->labelfont(0);
spnBcnInterval->labelsize(14);
spnBcnInterval->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
spnBcnInterval->value(120);
spnBcnInterval->callback((Fl_Callback*)cb_spnBcnInterval);
spnBcnInterval->align(FL_ALIGN_LEFT);
spnBcnInterval->when(FL_WHEN_RELEASE);
o->minimum(60); o->maximum(3600);
o->step(30);
o->value(bcnInterval);
} // Fl_Spinner* spnBcnInterval
} // Fl_Spinner2* spnBcnInterval
{ btnOK = new Fl_Button(406, 126, 62, 24, "Ok");
btnOK->callback((Fl_Callback*)cb_btnOK);
} // Fl_Button* btnOK

Wyświetl plik

@ -11,6 +11,9 @@ decl {\#include "flarq.h"} {}
decl {\#include "flinput2.h"} {public
}
decl {\#include "flslider2.h"} {public
}
decl {\#include "combo.h"} {public
}
@ -212,6 +215,7 @@ cbSetConfig();}
code1 {o->maximum(20);}
code2 {o->step(1);}
code3 {o->value(iretries);}
class Fl_Spinner2
}
Fl_Spinner spnWaitTime {
label {Wait time (sec):}
@ -222,6 +226,7 @@ cbSetConfig();}
code1 {o->maximum(30);}
code2 {o->step(5);}
code3 {o->value(iwaittime/1000);}
class Fl_Spinner2
}
Fl_Spinner spnTimeout {
label {Timeout (sec):}
@ -232,6 +237,7 @@ cbSetConfig();}
code1 {o->maximum(300);}
code2 {o->step(15);}
code3 {o->value(itimeout / 1000);}
class Fl_Spinner2
}
Fl_Spinner spnTxDelay {
label {Tx delay (msec):}
@ -242,6 +248,7 @@ cbSetConfig();}
code1 {o->maximum(2000);}
code2 {o->step(100);}
code3 {o->value(txdelay);}
class Fl_Spinner2
}
Fl_Spinner spnBcnInterval {
label {Beacon interval (sec)}
@ -251,6 +258,7 @@ cbSetConfig();}
code0 {o->minimum(60); o->maximum(3600);}
code1 {o->step(30);}
code2 {o->value(bcnInterval);}
class Fl_Spinner2
}
Fl_Button btnOK {
label Ok

Wyświetl plik

@ -4,6 +4,7 @@
#define arqdialogs_h
#include <FL/Fl.H>
#include "flinput2.h"
#include "flslider2.h"
#include "combo.h"
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Menu_Bar.H>
@ -46,12 +47,11 @@ extern Fl_Menu_Item menu_mnu[];
#define mnuAbout (menu_mnu+13)
extern Fl_Input2 *txtMyCall;
extern Fl_Input2 *txtBEACONTXT;
#include <FL/Fl_Spinner.H>
extern Fl_Spinner *spnRetries;
extern Fl_Spinner *spnWaitTime;
extern Fl_Spinner *spnTimeout;
extern Fl_Spinner *spnTxDelay;
extern Fl_Spinner *spnBcnInterval;
extern Fl_Spinner2 *spnRetries;
extern Fl_Spinner2 *spnWaitTime;
extern Fl_Spinner2 *spnTimeout;
extern Fl_Spinner2 *spnTxDelay;
extern Fl_Spinner2 *spnBcnInterval;
extern Fl_Button *btnOK;
extern Fl_ComboBox *choiceBlockSize;
Fl_Double_Window* arq_configure();

Wyświetl plik

@ -8,6 +8,7 @@
#include "configuration.h"
#include "combo.h"
#include "flinput2.h"
#include "flslider2.h"
#include "flmisc.h"
extern Fl_Double_Window *dlgConfig;
extern Mode_Browser* mode_browser;
@ -25,8 +26,7 @@ extern Fl_Input2 *inpMyAntenna;
extern Fl_Group *grpNoise;
#include <FL/Fl_Check_Button.H>
extern Fl_Check_Button *btnNoiseOn;
#include <FL/Fl_Counter.H>
extern Fl_Counter *noiseDB;
extern Fl_Counter2 *noiseDB;
extern Fl_Group *tabUI;
extern Fl_Tabs *tabsUI;
extern Fl_Group *tabUserInterface;
@ -51,9 +51,8 @@ extern Fl_Input2 *inpSend1;
extern Fl_Check_Button *btn599;
extern Fl_Check_Button *btnCutNbrs;
extern Fl_Check_Button *btnUseLeadingZeros;
#include <FL/Fl_Value_Input.H>
extern Fl_Value_Input *nbrContestStart;
extern Fl_Value_Input *nbrContestDigits;
extern Fl_Value_Input2 *nbrContestStart;
extern Fl_Value_Input2 *nbrContestDigits;
extern Fl_Button *btnResetSerNbr;
#include <FL/Fl_Light_Button.H>
extern Fl_Light_Button *btnDupCheckOn;
@ -62,7 +61,7 @@ extern Fl_Check_Button *btnDupMode;
extern Fl_Check_Button *btnDupState;
extern Fl_Check_Button *btnDupXchg1;
extern Fl_Check_Button *btnDupTimeSpan;
extern Fl_Value_Input *nbrTimeSpan;
extern Fl_Value_Input2 *nbrTimeSpan;
#include <FL/Fl_Color_Chooser.H>
extern Fl_Button *btnDupColor;
extern Fl_Group *tabWF_UI;
@ -97,14 +96,13 @@ extern Fl_Button *btnBwTracksColor;
extern Fl_Check_Button *chkShowAudioScale;
extern Fl_Button *btnWaterfallFont;
extern Fl_Check_Button *btnViewXmtSignal;
#include <FL/Fl_Value_Slider.H>
extern Fl_Value_Slider *valTxMonitorLevel;
extern Fl_Counter *cntLowFreqCutoff;
extern Fl_Counter *valLatency;
extern Fl_Value_Slider2 *valTxMonitorLevel;
extern Fl_Counter2 *cntLowFreqCutoff;
extern Fl_Counter2 *valLatency;
extern Fl_Check_Button *btnWFaveraging;
extern Fl_Choice *mnuFFTPrefilter;
extern Fl_Counter *cntrWfwidth;
extern Fl_Counter *cntrWfheight;
extern Fl_Counter2 *cntrWfwidth;
extern Fl_Counter2 *cntrWfheight;
extern Fl_Check_Button *btnWaterfallHistoryDefault;
extern Fl_Check_Button *btnWaterfallQSY;
extern Fl_Check_Button *btnWaterfallClickInsert;
@ -114,46 +112,46 @@ extern Fl_Group *tabModems;
extern Fl_Tabs *tabsModems;
extern Fl_Group *tabCW;
extern Fl_Tabs *tabsCW;
extern Fl_Value_Slider *sldrCWbandwidth;
extern Fl_Value_Slider2 *sldrCWbandwidth;
extern Fl_Check_Button *btnCWrcvTrack;
extern Fl_Counter *cntCWrange;
extern Fl_Counter2 *cntCWrange;
#include <FL/Fl_Value_Output.H>
extern Fl_Value_Output *valCWrcvWPM;
#include <FL/Fl_Progress.H>
extern Fl_Progress *prgsCWrcvWPM;
extern Fl_Value_Slider *sldrCWxmtWPM;
extern Fl_Counter *cntCWdefWPM;
extern Fl_Value_Slider2 *sldrCWxmtWPM;
extern Fl_Counter2 *cntCWdefWPM;
#include <FL/Fl_Counter.H>
extern Fl_Counter *cntCWlowerlimit;
extern Fl_Counter *cntCWupperlimit;
extern Fl_Value_Slider *sldrCWfarnsworth;
extern Fl_Value_Slider2 *sldrCWfarnsworth;
extern Fl_Check_Button *btnCWusefarnsworth;
extern Fl_Counter *cntCWweight;
extern Fl_Counter *cntCWdash2dot;
extern Fl_Counter *cntCWrisetime;
extern Fl_Counter2 *cntCWweight;
extern Fl_Counter2 *cntCWdash2dot;
extern Fl_Counter2 *cntCWrisetime;
extern Fl_Choice *mnuQSKshape;
extern Fl_Check_Button *btnCWnarrow;
extern Fl_Check_Button *btnQSK;
extern Fl_Counter *cntPreTiming;
extern Fl_Counter *cntPostTiming;
extern Fl_Counter2 *cntPreTiming;
extern Fl_Counter2 *cntPostTiming;
extern Fl_Check_Button *btnQSKadjust;
extern char szTestChar[];
extern Fl_Choice *mnuTestChar;
extern Fl_Group *tabDomEX;
extern Fl_Input2 *txtSecondary;
extern Fl_Check_Button *valDominoEX_FILTER;
extern Fl_Counter *valDominoEX_BW;
extern Fl_Counter2 *valDominoEX_BW;
extern Fl_Check_Button *chkDominoEX_FEC;
extern Fl_Value_Slider *valDomCWI;
extern Fl_Counter *valDominoEX_PATHS;
extern Fl_Value_Slider2 *valDomCWI;
extern Fl_Counter2 *valDominoEX_PATHS;
extern Fl_Group *tabFeld;
#include "fontdef.h"
extern Fl_Choice *selHellFont;
extern Fl_Check_Button *btnBlackboard;
#include <FL/Fl_Spinner.H>
extern Fl_Spinner *valHellXmtWidth;
extern Fl_Spinner2 *valHellXmtWidth;
extern Fl_Check_Button *btnHellRcvWidth;
extern Fl_Choice *mnuHellPulse;
extern Fl_Value_Slider *sldrHellBW;
extern Fl_Value_Slider2 *sldrHellBW;
extern Fl_Check_Button *btnFeldHellIdle;
extern Fl_Check_Button *btnHellXmtWidth;
extern Fl_Group *tabMT63;
@ -162,22 +160,22 @@ extern Fl_Check_Button *btnMT63_8bit;
extern Fl_Check_Button *btnMT63_rx_integration;
extern Fl_Check_Button *btnMT63_usetones;
extern Fl_Check_Button *btnMT63_upper_lower;
extern Fl_Spinner *MT63_tone_duration;
extern Fl_Spinner2 *MT63_tone_duration;
extern Fl_Group *tabOlivia;
extern Fl_Choice *mnuOlivia_Bandwidth;
extern Fl_Choice *mnuOlivia_Tones;
extern Fl_Counter *cntOlivia_smargin;
extern Fl_Counter *cntOlivia_sinteg;
extern Fl_Counter2 *cntOlivia_smargin;
extern Fl_Counter2 *cntOlivia_sinteg;
extern Fl_Check_Button *btnOlivia_8bit;
extern Fl_Group *tabPSK;
extern Fl_Tabs *tabsPSK;
extern Fl_Counter *cntSearchRange;
extern Fl_Counter *cntACQsn;
extern Fl_Counter2 *cntSearchRange;
extern Fl_Counter2 *cntACQsn;
extern Fl_Choice *mnuPSKStatusTimeout;
extern Fl_Check_Button *btnMarquee;
extern Fl_Spinner *cntChannels;
extern Fl_Spinner *cntStartFrequency;
extern Fl_Spinner *cntTimeout;
extern Fl_Spinner2 *cntChannels;
extern Fl_Spinner2 *cntStartFrequency;
extern Fl_Spinner2 *cntTimeout;
extern Fl_Choice *mnuViewerLabel;
extern Fl_Group *tabRTTY;
extern Fl_Choice *selShift;
@ -187,21 +185,21 @@ extern Fl_Choice *selParity;
extern Fl_Choice *selStopBits;
extern Fl_Check_Button *btnAUTOCRLF;
extern Fl_Check_Button *btnCRCRLF;
extern Fl_Counter *cntrAUTOCRLF;
extern Fl_Counter2 *cntrAUTOCRLF;
extern Fl_Check_Button *chkUOSrx;
extern Fl_Check_Button *chkUOStx;
extern Fl_Check_Button *btnPreferXhairScope;
extern Fl_Check_Button *chkPseudoFSK;
extern Fl_Choice *mnuRTTYAFCSpeed;
extern Fl_Check_Button *chkXagc;
extern Fl_Value_Slider *sldrRTTYbandwidth;
extern Fl_Counter *selCustomShift;
extern Fl_Value_Slider2 *sldrRTTYbandwidth;
extern Fl_Counter2 *selCustomShift;
extern Fl_Group *tabTHOR;
extern Fl_Input2 *txtTHORSecondary;
extern Fl_Check_Button *valTHOR_FILTER;
extern Fl_Counter *valTHOR_BW;
extern Fl_Value_Slider *valThorCWI;
extern Fl_Counter *valTHOR_PATHS;
extern Fl_Counter2 *valTHOR_BW;
extern Fl_Value_Slider2 *valThorCWI;
extern Fl_Counter2 *valTHOR_PATHS;
extern Fl_Group *tabRig;
extern Fl_Tabs *tabsRig;
extern Fl_Group *grpHWPTT;
@ -223,11 +221,11 @@ extern Fl_Group *grpRigCAT;
extern Fl_Output *txtXmlRigFilename;
extern Fl_Button *btnSelectRigXmlFile;
extern Fl_Input_Choice *inpXmlRigDevice;
extern Fl_Value_Input *cntRigCatRetries;
extern Fl_Value_Input *cntRigCatTimeout;
extern Fl_Value_Input *cntRigCatWait;
extern Fl_Value_Input2 *cntRigCatRetries;
extern Fl_Value_Input2 *cntRigCatTimeout;
extern Fl_Value_Input2 *cntRigCatWait;
extern Fl_Choice *mnuXmlRigBaudrate;
extern Fl_Counter *valRigCatStopbits;
extern Fl_Counter2 *valRigCatStopbits;
extern Fl_Button *btnInitRIGCAT;
extern Fl_Check_Button *btnRigCatEcho;
extern Fl_Round_Button *btnRigCatCMDptt;
@ -243,13 +241,13 @@ extern Fl_Check_Button *chkUSEHAMLIB;
extern Fl_Group *grpHamlib;
extern Fl_ComboBox *cboHamlibRig;
extern Fl_Input_Choice *inpRIGdev;
extern Fl_Value_Input *cntHamlibRetries;
extern Fl_Value_Input *cntHamlibTimeout;
extern Fl_Value_Input *cntHamlibWriteDelay;
extern Fl_Value_Input *cntHamlibWait;
extern Fl_Value_Input2 *cntHamlibRetries;
extern Fl_Value_Input2 *cntHamlibTimeout;
extern Fl_Value_Input2 *cntHamlibWriteDelay;
extern Fl_Value_Input2 *cntHamlibWait;
extern Fl_Choice *mnuBaudRate;
extern Fl_Counter *valHamRigStopbits;
extern Fl_Counter *cntHamlibTimeout0;
extern Fl_Counter2 *valHamRigStopbits;
extern Fl_Counter2 *cntHamlibTimeout0;
extern Fl_Input2 *inpHamlibConfig;
extern Fl_Button *btnInitHAMLIB;
extern Fl_Choice *mnuSideband;
@ -285,9 +283,9 @@ extern Fl_Choice *menuInSampleRate;
extern Fl_Choice *menuOutSampleRate;
#include <FL/fl_ask.H>
extern Fl_Choice *menuSampleConverter;
extern Fl_Spinner *cntRxRateCorr;
extern Fl_Spinner *cntTxRateCorr;
extern Fl_Spinner *cntTxOffset;
extern Fl_Spinner2 *cntRxRateCorr;
extern Fl_Spinner2 *cntTxRateCorr;
extern Fl_Spinner2 *cntTxOffset;
extern Fl_Check_Button *chkAudioStereoOut;
extern Fl_Group *tabMixer;
extern void resetMixerControls();
@ -297,17 +295,17 @@ extern Fl_Light_Button *btnMicIn;
extern void setMixerInput(int);
extern Fl_Light_Button *btnLineIn;
extern void setPCMvolume(double);
extern Fl_Value_Slider *valPCMvolume;
extern Fl_Value_Slider2 *valPCMvolume;
extern Fl_Group *tabID;
extern Fl_Check_Button *btnsendid;
extern Fl_Check_Button *btnsendvideotext;
extern Fl_Input2 *valVideotext;
extern Fl_Check_Button *chkID_SMALL;
extern Fl_Value_Slider *sldrVideowidth;
extern Fl_Value_Slider2 *sldrVideowidth;
extern Fl_Button *bVideoIDModes;
extern Fl_Group *sld;
extern Fl_Check_Button *btnCWID;
extern Fl_Value_Slider *sldrCWIDwpm;
extern Fl_Value_Slider2 *sldrCWIDwpm;
extern Fl_Button *bCWIDModes;
extern Fl_Check_Button *chkRSidWideSearch;
extern Fl_Check_Button *chkRSidMark;
@ -319,9 +317,9 @@ extern Fl_Button *bRSIDTxModes;
extern Fl_Group *tabMisc;
extern Fl_Tabs *tabsMisc;
extern Fl_Group *tabSweetSpot;
extern Fl_Value_Input *valCWsweetspot;
extern Fl_Value_Input *valRTTYsweetspot;
extern Fl_Value_Input *valPSKsweetspot;
extern Fl_Value_Input2 *valCWsweetspot;
extern Fl_Value_Input2 *valRTTYsweetspot;
extern Fl_Value_Input2 *valPSKsweetspot;
extern Fl_Check_Button *btnStartAtSweetSpot;
extern Fl_Group *tabSpot;
extern Fl_Check_Button *btnPSKRepAuto;
@ -345,10 +343,10 @@ extern Fl_Group *grpTalker;
extern void open_talker();
extern Fl_Button *btnConnectTalker;
extern Fl_Group *tabPskmail;
extern Fl_Counter *cntServerCarrier;
extern Fl_Counter *cntServerOffset;
extern Fl_Counter *cntServerACQsn;
extern Fl_Counter *cntServerAFCrange;
extern Fl_Counter2 *cntServerCarrier;
extern Fl_Counter2 *cntServerOffset;
extern Fl_Counter2 *cntServerACQsn;
extern Fl_Counter2 *cntServerAFCrange;
extern Fl_Check_Button *btnPSKmailSweetSpot;
extern Fl_Check_Button *btn_arq_s2n_report;
extern Fl_Group *tabQRZ;

Wyświetl plik

@ -26,8 +26,6 @@
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Browser.H>
#include <FL/Fl_Value_Slider.H>
#include <FL/Fl_Input.H>
#include "combo.h"
#include "Fl_Tile_Check.h"
@ -40,7 +38,7 @@
#include "progress.h"
#include "FreqControl.h"
#include "flinput2.h"
#include "flslider2.h"
extern Fl_Double_Window *fl_digi_main;
extern Fl_Double_Window *scopeview;
@ -55,7 +53,7 @@ extern Fl_Box *Status2;
extern Fl_Box *Status1;
extern Fl_Box *WARNstatus;
extern Fl_Button *MODEstatus;
extern Fl_Slider *sldrSquelch;
extern Fl_Slider2 *sldrSquelch;
extern Progress *pgrsSquelch;
extern Fl_Button *btnMacro[];
extern Fl_Input2 *inpFreq;
@ -110,8 +108,8 @@ extern Fl_Button *qso_btnSelFreq;
extern Fl_Button *qso_btnDelFreq;
extern Fl_Button *qso_btnClearList;
extern Fl_Value_Slider *valRcvMixer;
extern Fl_Value_Slider *valXmtMixer;
extern Fl_Value_Slider2 *valRcvMixer;
extern Fl_Value_Slider2 *valXmtMixer;
extern Fl_Button *btnAFC;
extern Fl_Button *btnSQL;
extern Fl_Light_Button *btnRSID;

Wyświetl plik

@ -0,0 +1,72 @@
// ----------------------------------------------------------------------------
// flslider2.h
//
// Copyright (C) 2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FL_SLIDER2_
#define FL_SLIDER2_
#include <FL/Fl_Slider.H>
#include <FL/Fl_Value_Slider.H>
#include <FL/Fl_Counter.H>
#include <FL/Fl_Value_Input.H>
#include <FL/Fl_Spinner.H>
class Fl_Slider2 : public Fl_Slider
{
public:
Fl_Slider2(int x, int y, int w, int h, const char* l = 0)
: Fl_Slider(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Value_Slider2 : public Fl_Value_Slider
{
public:
Fl_Value_Slider2(int x, int y, int w, int h, const char* l = 0)
: Fl_Value_Slider(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Counter2 : public Fl_Counter
{
public:
Fl_Counter2(int x, int y, int w, int h, const char* l = 0)
: Fl_Counter(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Value_Input2 : public Fl_Value_Input
{
public:
Fl_Value_Input2(int x, int y, int w, int h, const char* l = 0)
: Fl_Value_Input(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Spinner2 : public Fl_Spinner
{
public:
Fl_Spinner2(int x, int y, int w, int h, const char* l = 0)
: Fl_Spinner(x, y, w, h, l) { }
int handle(int event);
};
#endif // FL_SLIDER2_

Wyświetl plik

@ -30,9 +30,9 @@
#include <FL/Fl_Window.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Browser.H>
#include <FL/Fl_Value_Input.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Return_Button.H>
#include "flslider2.h"
// Preview box for showing font
class Preview_Box : public Fl_Widget
@ -60,7 +60,7 @@ private:
Fl_Browser *lst_Font;
Fl_Browser *lst_Size;
Fl_Value_Input *txt_Size;
Fl_Value_Input2 *txt_Size;
Fl_Return_Button *btn_OK;
Fl_Button *btn_Cancel;
Fl_Button *btn_Color;

Wyświetl plik

@ -5,6 +5,7 @@
#include <FL/Fl.H>
#include "table.h"
#include "flinput2.h"
#include "flslider2.h"
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
extern Fl_Group *grpNotifyEvent;
@ -27,15 +28,14 @@ extern Fl_Check_Button *chkNotifyFilterEQSL;
extern Fl_Group *grpNotifyDup;
extern Fl_Check_Button *chkNotifyDupIgnore;
extern Fl_Choice *mnuNotifyDupWhich;
#include <FL/Fl_Spinner.H>
extern Fl_Spinner *cntNotifyDupTime;
extern Fl_Spinner2 *cntNotifyDupTime;
extern Fl_Check_Button *chkNotifyDupBand;
extern Fl_Check_Button *chkNotifyDupMode;
extern Fl_Group *grpNotifyAction;
extern Fl_Spinner *cntNotifyActionLimit;
extern Fl_Spinner2 *cntNotifyActionLimit;
extern Fl_Input2 *inpNotifyActionDialog;
extern Fl_Button *btnNotifyActionDialogDefault;
extern Fl_Spinner *cntNotifyActionDialogTimeout;
extern Fl_Spinner2 *cntNotifyActionDialogTimeout;
extern Fl_Input2 *inpNotifyActionRXMarker;
extern Fl_Button *btnNotifyActionMarkerDefault;
extern Fl_Input2 *inpNotifyActionMacro;

Wyświetl plik

@ -46,8 +46,6 @@
#include <xmlrpc-c/registry.hpp>
#include <xmlrpc-c/server_abyss.hpp>
#include <FL/Fl_Value_Slider.H>
#include "globals.h"
#include "socket.h"
#include "threads.h"
@ -559,9 +557,6 @@ public:
// =============================================================================
class Fl_Counter;
extern Fl_Counter* cntSearchRange; // FIXME: export in header
class Modem_get_afc_sr : public xmlrpc_c::method
{
public:
@ -621,8 +616,6 @@ public:
// =============================================================================
extern Fl_Value_Slider* sldrHellBW; // FIXME: export in header
extern Fl_Value_Slider* sldrCWbandwidth; // FIXME: export in header
static Fl_Valuator* get_bw_val(void)
{
if (!(active_modem->get_cap() & modem::CAP_BW))

Wyświetl plik

@ -1610,19 +1610,6 @@ int waterfall::handle(int event)
if ( !((d = Fl::event_dy()) || (d = Fl::event_dx())) )
return 1;
Fl_Valuator* v[] = { sldrSquelch, wfcarrier, wfRefLevel, wfAmpSpan, valRcvMixer, valXmtMixer };
for (size_t i = 0; i < sizeof(v)/sizeof(v[0]); i++) {
if (Fl::event_inside(v[i])) {
if (v[i] == sldrSquelch ||
v[i] == valRcvMixer ||
v[i] == valXmtMixer)
d = -d;
v[i]->value(v[i]->clamp(v[i]->increment(v[i]->value(), -d)));
v[i]->do_callback();
return 1;
}
}
// this does not belong here, but we don't have access to this widget's
// handle method (or its parent's)
if (Fl::event_inside(MODEstatus)) {

Wyświetl plik

@ -0,0 +1,82 @@
// ----------------------------------------------------------------------------
// flslider2.cxx
//
// Copyright (C) 2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <FL/Fl.H>
#include "flslider2.h"
inline static int handle_scroll(Fl_Valuator* w, int event)
{
if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w)))
return 0;
double d;
if ((d = Fl::event_dy()) || (d = Fl::event_dx())) {
if (Fl::event_state() & FL_SHIFT)
d *= 10.0;
if (!dynamic_cast<Fl_Value_Input*>(w) && !(w->type() & FL_HOR_SLIDER))
d = -d;
w->value(w->clamp(w->increment(w->value(), -d)));
w->do_callback();
}
return 1;
}
int Fl_Slider2::handle(int event)
{
return handle_scroll(this, event) ? 1 : Fl_Slider::handle(event);
}
int Fl_Value_Slider2::handle(int event)
{
return handle_scroll(this, event) ? 1 : Fl_Value_Slider::handle(event);
}
int Fl_Counter2::handle(int event)
{
return handle_scroll(this, event) ? 1 : Fl_Counter::handle(event);
}
int Fl_Value_Input2::handle(int event)
{
return handle_scroll(this, event) ? 1 : Fl_Value_Input::handle(event);
}
inline static int handle_scroll(Fl_Spinner* w, int event)
{
if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w)))
return 0;
double d;
if ((d = Fl::event_dy()) || (d = Fl::event_dx())) {
if (Fl::event_state() & FL_SHIFT)
d *= 10.0;
d = w->value() - d * w->step();
w->value(WCLAMP(d, w->minimum(), w->maximum()));
w->do_callback();
}
return 1;
}
int Fl_Spinner2::handle(int event)
{
return handle_scroll(this, event) ? 1 : Fl_Spinner::handle(event);
}