LMMS
Loading...
Searching...
No Matches
Fl_Osc_Value.cpp
Go to the documentation of this file.
1/*
2 ZynAddSubFX - a software synthesizer
3
4 Fl_Osc_Value.cpp - OSC Based Fl_Value
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 "Fl_Osc_Value.H"
13
14static void callback_fn_value(Fl_Widget *w, void *)
15{
16 ((Fl_Osc_Value*)w)->cb();
17}
18
19Fl_Osc_Value::Fl_Osc_Value(int X, int Y, int W, int H, const char *label)
20 :Fl_Value_Input(X,Y,W,H, label), Fl_Osc_Widget(this)
21{
22 Fl_Value_Input::callback(callback_fn_value);
23}
24
27
28void Fl_Osc_Value::init(const char *path_)
29{
30 ext = path_;
31 oscRegister(path_);
32}
33
35{
36 //static char value[1024];
37 //snprintf(value, sizeof(value), "%f", v);
38 this->value(v);
39}
40
42{
43 assert(osc);
44 oscWrite(ext, "f", (float)(value()));
45}
static void callback_fn_value(Fl_Widget *w, void *)
Definition Fl_Osc_Value.cpp:14
assert(0)
Definition Fl_Osc_Value.H:17
virtual ~Fl_Osc_Value(void)
Definition Fl_Osc_Value.cpp:25
void cb()
Definition Fl_Osc_Value.cpp:41
Fl_Osc_Value(int X, int Y, int W, int H, const char *label=NULL)
Definition Fl_Osc_Value.cpp:19
void init(const char *path)
Definition Fl_Osc_Value.cpp:28
void OSC_value(float v)
Definition Fl_Osc_Value.cpp:34
Fl_Osc_Interface * osc
Definition Fl_Osc_Widget.H:65
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
void oscWrite(std::string path, const char *args,...)
Definition Fl_Osc_Widget.cpp:60
UINT_D64 w
Definition inflate.c:942
unsigned v[N_MAX]
Definition inflate.c:1584
static PuglViewHint int value
Definition pugl.h:1708
#define X(str)
Definition juce_LV2Common.h:197