LMMS
Loading...
Searching...
No Matches
Fl_Osc_Numeric_Input.cpp
Go to the documentation of this file.
1/*
2 ZynAddSubFX - a software synthesizer
3
4 Fl_Osc_Numeric_Input.cpp - OSC Based Numeric Input
5 Copyright (C) 2016 Mark McCurry
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11*/
12#include <stdlib.h>
14
15Fl_Osc_Numeric_Input::Fl_Osc_Numeric_Input(int X, int Y, int W, int H, const char *label)
16 :Fl_Input(X,Y,W,H, label), Fl_Osc_Widget(this)
17{
19}
20
23
24void Fl_Osc_Numeric_Input::init(const char *path)
25{
26 ext = path;
27 oscRegister(path);
28}
29
31{
32 OSC_value((int)f);
33}
34
36{
37 char buf[128];
38 snprintf(buf, 128, "%d", i);
39 value(buf);
40}
41
43{
44 auto &ww = *(Fl_Osc_Numeric_Input *)w;
45 int x = atoi(ww.value());
46 if(x)
47 ww.oscWrite(ww.ext, "i", x);
48}
virtual ~Fl_Osc_Numeric_Input(void)
Definition Fl_Osc_Numeric_Input.cpp:21
static void numeric_callback(Fl_Widget *w)
Definition Fl_Osc_Numeric_Input.cpp:42
void init(const char *path)
Definition Fl_Osc_Numeric_Input.cpp:24
virtual void OSC_value(int i) override
Definition Fl_Osc_Numeric_Input.cpp:35
Fl_Osc_Numeric_Input(int X, int Y, int W, int H, const char *label=NULL)
Definition Fl_Osc_Numeric_Input.cpp:15
std::string ext
Definition Fl_Osc_Widget.H:64
Fl_Osc_Widget(void)
Definition Fl_Osc_Widget.cpp:16
void oscRegister(const char *path)
Definition Fl_Osc_Widget.cpp:91
UINT_D64 w
Definition inflate.c:942
register unsigned i
Definition inflate.c:1575
unsigned x[BMAX+1]
Definition inflate.c:1586
unsigned f
Definition inflate.c:1572
static Wave_Writer * ww
Definition Wave_Writer.cpp:166
static PuglViewHint int value
Definition pugl.h:1708
#define X(str)
Definition juce_LV2Common.h:197
RECT const char void(* callback)(const char *droppath))) SWELL_API_DEFINE(BOOL
Definition swell-functions.h:1004