libxputty 0.1
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
xadjustment.h File Reference

Go to the source code of this file.

Data Structures

struct  Adjustment_t
 Adjustment_t - struct to hold a controller adjustment. More...
 

Enumerations

enum  CL_type {
  CL_NONE = 0x0001 , CL_CONTINUOS = 0x0002 , CL_TOGGLE = 0x0004 , CL_BUTTON = 0x0008 ,
  CL_ENUM = 0x0016 , CL_VIEWPORT = 0x0032 , CL_METER = 0x0064 , CL_LOGARITHMIC = 0x0128 ,
  CL_LOGSCALE = 0x0256 , CL_VIEWPORTSLIDER = 0x0512
}
 CL_type - define the type of the controller adjustment one of this types must be given when set up a Adjustment_t for a Wdiget_t. More...
 

Functions

Adjustment_tadd_adjustment (Widget_t *w, float std_value, float value, float min_value, float max_value, float step, CL_type type)
 *add_adjustment - adding a adjustment to a Widget_t
 
void set_adjustment (Adjustment_t *adj, float std_value, float value, float min_value, float max_value, float step, CL_type type)
 *set_adjustment - set a new range to a existing Adjustment_t or create if it not exists yet
 
void * delete_adjustment (Adjustment_t *adj)
 delete_adjustment - freeing the memory of the Adjustment_t You usually don't need to call this, as it get handled by main_quit() -> destroy_widget()
 
float adj_get_state (Adjustment_t *adj)
 adj_get_state - get the current state of the Adjustment_t
 
void adj_set_state (Adjustment_t *adj, float state)
 adj_set_state - set the current state of the Adjustment_t
 
float adj_get_value (Adjustment_t *adj)
 adj_get_value - get the current value of the Adjustment_t
 
float adj_get_std_value (Adjustment_t *adj)
 adj_get_std_value - get the standart value of the Adjustment_t
 
float adj_get_min_value (Adjustment_t *adj)
 adj_get_min_value - get the minimal value of the Adjustment_t
 
float adj_get_max_value (Adjustment_t *adj)
 adj_get_max_value - get the maximal value of the Adjustment_t
 
void adj_set_value (Adjustment_t *adj, float value)
 adj_set_value - set the current value to the Adjustment_t
 
void adj_set_min_value (Adjustment_t *adj, float value)
 adj_set_min_value - set the minimal value to the Adjustment_t
 
void adj_set_max_value (Adjustment_t *adj, float value)
 adj_set_max_value - set the maximal value to the Adjustment_t
 
void adj_set_std_value (Adjustment_t *adj, float value)
 adj_set_std_value - set the standart value to the Adjustment_t
 
void adj_set_start_value (void *w)
 adj_set_start_value - internal use to store the value when pointer movment starts
 
void adj_set_scale (Adjustment_t *adj, float value)
 adj_set_scale - internal use to scale the pointer movement (0.1 -1.0)
 
void adj_set_log_scale (Adjustment_t *adj, float value)
 adj_set_log_scale - internal use to set the logarithmic scale
 
void adj_set_motion_state (void *w, float x, float y)
 adj_set_motion_state - internal use to set value and state of the Adjustment_t on mouse pointer movment
 
void check_value_changed (Adjustment_t *adj, float *value)
 check_value_changed - check if Adjustment_t value have changed and send value_changed_callback (VALUE_CHANGED) and adj_callback (ADJ_INTERN) if so
 

Enumeration Type Documentation

◆ CL_type

enum CL_type

CL_type - define the type of the controller adjustment one of this types must be given when set up a Adjustment_t for a Wdiget_t.

Parameters
CL_NONE- Widget_t didn't request a adjustment
CL_CONTINUOS- Widget_t request a continuos adjustment
CL_TOGGLE- Widget_t request a toggle adjustment
CL_BUTTON- Widget_t request a button adjustment
CL_ENUM- Widget_t request a enum adjustment
CL_LOGARITHMIC- Widget_t request a logarithmic adjustment
Enumerator
CL_NONE 

Widget_t didn't request a adjustment

CL_CONTINUOS 

Widget_t request a continuos adjustment

CL_TOGGLE 

Widget_t request a toggle adjustment

CL_BUTTON 

Widget_t request a button adjustment

CL_ENUM 

Widget_t request a enum adjustment

CL_VIEWPORT 

Widget_t request a viewport adjustment

CL_METER 

Widget_t request a viewport adjustment

CL_LOGARITHMIC 

Widget_t request a logarithmic adjustment

CL_LOGSCALE 

Widget_t request a logarithmic scaled adjustment

CL_VIEWPORTSLIDER 

Widget_t request a viewport slider adjustment

Definition at line 45 of file xadjustment.h.

45 {
47 CL_NONE = 0x0001,
49 CL_CONTINUOS = 0x0002,
51 CL_TOGGLE = 0x0004,
53 CL_BUTTON = 0x0008,
55 CL_ENUM = 0x0016,
57 CL_VIEWPORT = 0x0032,
59 CL_METER = 0x0064,
61 CL_LOGARITHMIC = 0x0128,
63 CL_LOGSCALE = 0x0256,
65 CL_VIEWPORTSLIDER = 0x0512,
66}CL_type;
CL_type
CL_type - define the type of the controller adjustment one of this types must be given when set up a ...
Definition xadjustment.h:45
@ CL_TOGGLE
Definition xadjustment.h:51
@ CL_METER
Definition xadjustment.h:59
@ CL_CONTINUOS
Definition xadjustment.h:49
@ CL_VIEWPORT
Definition xadjustment.h:57
@ CL_NONE
Definition xadjustment.h:47
@ CL_LOGARITHMIC
Definition xadjustment.h:61
@ CL_ENUM
Definition xadjustment.h:55
@ CL_BUTTON
Definition xadjustment.h:53
@ CL_LOGSCALE
Definition xadjustment.h:63
@ CL_VIEWPORTSLIDER
Definition xadjustment.h:65

Function Documentation

◆ add_adjustment()

Adjustment_t * add_adjustment ( Widget_t w,
float  std_value,
float  value,
float  min_value,
float  max_value,
float  step,
CL_type  type 
)

*add_adjustment - adding a adjustment to a Widget_t

Parameters
*w- pointer to the Widget_t request a Adjustment_t
std_value- standard value of the Adjustment_t
value- current value of the Adjustment_t
min_value- minimum value of the Adjustment_t
max_value- maximal value of the Adjustment_t
step- step to increase/decrease the Adjustment_t
type- set CL_type of Adjustment_t
Returns
*adj - pointer to the Adjustment_t

Definition at line 25 of file xadjustment.c.

26 {
27 Adjustment_t *adj = (Adjustment_t*)malloc(sizeof(Adjustment_t));
28 assert(adj);
29 adj->log_scale = 20.0;
30
31 switch(type) {
32 case (CL_LOGSCALE) :
33 *(adj) = (Adjustment_t) {
34 .w = w,
35 .std_value = powf(10,(std_value/adj->log_scale)),
36 .value = powf(10,(value/adj->log_scale)),
37 .min_value = powf(10,(min_value/adj->log_scale)),
38 .max_value = powf(10,(max_value/adj->log_scale)),
39 .step = step,
40 .start_value = powf(10,(value/adj->log_scale)),
41 .scale = 1.0,
42 .type = type,
43 .log_scale = adj->log_scale
44 };
45 break;
46 case (CL_LOGARITHMIC) :
47 *(adj) = (Adjustment_t) {
48 .w = w,
49 .std_value = log10(std_value),
50 .value = log10(value),
51 .min_value = log10(min_value),
52 .max_value = log10(max_value),
53 .step = step,
54 .start_value = log10(value),
55 .scale = 1.0,
56 .type = type,
57 .log_scale = adj->log_scale
58 };
59 break;
60 default:
61 *(adj) = (Adjustment_t) {
62 .w = w,
63 .std_value = std_value,
64 .value = value,
65 .min_value = min_value,
66 .max_value = max_value,
67 .step = step,
68 .start_value = value,
69 .scale = 1.0,
70 .type = type,
71 .log_scale = adj->log_scale
72 };
73 break;
74 }
75
76 debug_print("Widget_t add adjustment\n");
77 return adj;
78}
Adjustment_t - struct to hold a controller adjustment.
Definition xadjustment.h:82
Resize_t scale
Definition xwidget.h:525

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, and Widget_t::scale.

Referenced by add_button(), add_check_box(), add_check_button(), add_combobox(), add_hmeter(), add_hslider(), add_image_button(), add_image_knob(), add_image_toggle_button(), add_knob(), add_listbox(), add_listview(), add_menu(), add_multi_listview(), add_on_off_button(), add_playhead(), add_switch_image_button(), add_tabbox(), add_toggle_button(), add_tuner(), add_valuedisplay(), add_vmeter(), add_vslider(), cmenu_add_submenu(), create_combobox_viewport(), create_listbox_viewport(), create_listview_viewport(), create_multi_listview_viewport(), create_viewport(), menu_add_check_item(), menu_add_submenu(), menu_add_value_entry(), and menu_add_value_item().

◆ adj_get_max_value()

float adj_get_max_value ( Adjustment_t adj)

adj_get_max_value - get the maximal value of the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
Returns
float - return the Adjustment_t value

Definition at line 181 of file xadjustment.c.

181 {
182 if (!adj) return 0.0;
183 if (adj->type == CL_LOGSCALE)
184 return log10(adj->max_value)*adj->log_scale;
185 else if (adj->type == CL_LOGARITHMIC)
186 return powf(10,adj->max_value);
187 return (adj->max_value);
188}
float max_value
Definition xadjustment.h:92

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Adjustment_t::max_value, and Adjustment_t::type.

◆ adj_get_min_value()

float adj_get_min_value ( Adjustment_t adj)

adj_get_min_value - get the minimal value of the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
Returns
float - return the Adjustment_t value

Definition at line 172 of file xadjustment.c.

172 {
173 if (!adj) return 0.0;
174 if (adj->type == CL_LOGSCALE)
175 return log10(adj->min_value)*adj->log_scale;
176 else if (adj->type == CL_LOGARITHMIC)
177 return powf(10,adj->min_value);
178 return (adj->min_value);
179}
float min_value
Definition xadjustment.h:90

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Adjustment_t::min_value, and Adjustment_t::type.

◆ adj_get_state()

float adj_get_state ( Adjustment_t adj)

◆ adj_get_std_value()

float adj_get_std_value ( Adjustment_t adj)

adj_get_std_value - get the standart value of the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
Returns
float - return the Adjustment_t value

Definition at line 163 of file xadjustment.c.

163 {
164 if (!adj) return 0.0;
165 if (adj->type == CL_LOGSCALE)
166 return log10(adj->std_value)*adj->log_scale;
167 else if (adj->type == CL_LOGARITHMIC)
168 return powf(10,adj->std_value);
169 return (adj->std_value);
170}
float std_value
Definition xadjustment.h:86

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Adjustment_t::std_value, and Adjustment_t::type.

◆ adj_get_value()

float adj_get_value ( Adjustment_t adj)

◆ adj_set_log_scale()

void adj_set_log_scale ( Adjustment_t adj,
float  value 
)

adj_set_log_scale - internal use to set the logarithmic scale

Parameters
*adj- pointer to the Adjustment_t
value- value to set the scaleing factor to

Definition at line 237 of file xadjustment.c.

237 {
238 adj->log_scale = value;
239}

References Adjustment_t::log_scale.

◆ adj_set_max_value()

void adj_set_max_value ( Adjustment_t adj,
float  value 
)

adj_set_max_value - set the maximal value to the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
value- value to set the Adjustment_t to

Definition at line 209 of file xadjustment.c.

209 {
210 if (!adj) return;
211 if (adj->type == CL_LOGSCALE)
212 v = powf(10,(v/adj->log_scale));
213 else if (adj->type == CL_LOGARITHMIC)
214 v = log10(v);
215 adj->max_value = v;
216}

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Adjustment_t::max_value, and Adjustment_t::type.

◆ adj_set_min_value()

void adj_set_min_value ( Adjustment_t adj,
float  value 
)

adj_set_min_value - set the minimal value to the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
value- value to set the Adjustment_t to

Definition at line 200 of file xadjustment.c.

200 {
201 if (!adj) return;
202 if (adj->type == CL_LOGSCALE)
203 v = powf(10,(v/adj->log_scale));
204 else if (adj->type == CL_LOGARITHMIC)
205 v = log10(v);
206 adj->min_value = v;
207}

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Adjustment_t::min_value, and Adjustment_t::type.

◆ adj_set_motion_state()

void adj_set_motion_state ( void *  w,
float  x,
float  y 
)

adj_set_motion_state - internal use to set value and state of the Adjustment_t on mouse pointer movment

Parameters
*w- pointer to Widget_t containing Adjustment_t
x- movment on the x-axis
y- movement on the y-axis

Definition at line 241 of file xadjustment.c.

241 {
242 Widget_t * wid = (Widget_t*)w;
243 if(wid->adj_x) {
244 float value= wid->adj_x->value;
245 switch(wid->adj_x->type) {
246 case (CL_LOGSCALE):
247 case (CL_LOGARITHMIC):
248 case (CL_CONTINUOS):
249 {
250 float state = (wid->adj_x->start_value - wid->adj_x->min_value) /
251 (wid->adj_x->max_value - wid->adj_x->min_value);
252 float nsteps = wid->adj_x->step / (wid->adj_x->max_value - wid->adj_x->min_value);
253 float nvalue = min(1.0,max(0.0,state + ((float)(x - wid->pos_x)*wid->adj_x->scale *nsteps)));
254 float prevalue = nvalue * (wid->adj_x->max_value - wid->adj_x->min_value) + wid->adj_x->min_value;
255 float mulscale = round(prevalue/wid->adj_x->step);
256 value = min(wid->adj_x->max_value,max(wid->adj_x->min_value,mulscale*wid->adj_x->step));
257 }
258 break;
259 case (CL_VIEWPORTSLIDER):
260 {
261 float state = (wid->adj_x->start_value - wid->adj_x->min_value) /
262 (wid->adj_x->max_value - wid->adj_x->min_value);
263 float nsteps = wid->adj_x->step / (wid->adj_x->max_value - wid->adj_x->min_value);
264 float nvalue = min(1.0,max(0.0,state - ((float)(x - wid->pos_x)*wid->adj_x->scale *nsteps)));
265 float prevalue = nvalue * (wid->adj_x->max_value - wid->adj_x->min_value) + wid->adj_x->min_value;
266 float mulscale = round(prevalue/wid->adj_x->step);
267 value = min(wid->adj_x->max_value,max(wid->adj_x->min_value,mulscale*wid->adj_x->step));
268 }
269 break;
270 case (CL_TOGGLE):
271 // dont toggle on motion!
272 // value = wid->adj_x->value ? 0.0 : 1.0;
273 break;
274 default:
275 break;
276 }
277 check_value_changed(wid->adj_x, &value);
278 }
279 if(wid->adj_y) {
280 float value = wid->adj_y->value;
281 switch(wid->adj_y->type) {
282 case (CL_LOGSCALE):
283 case (CL_LOGARITHMIC):
284 case (CL_CONTINUOS):
285 {
286 float state = (wid->adj_y->start_value - wid->adj_y->min_value) /
287 (wid->adj_y->max_value - wid->adj_y->min_value);
288 float nsteps = wid->adj_y->step / (wid->adj_y->max_value - wid->adj_y->min_value);
289 float nvalue = min(1.0,max(0.0,state + ((float)(wid->pos_y - y)*wid->adj_y->scale *nsteps)));
290 float prevalue = nvalue * (wid->adj_y->max_value - wid->adj_y->min_value) + wid->adj_y->min_value;
291 float mulscale = round(prevalue/wid->adj_y->step);
292 value = min(wid->adj_y->max_value,max(wid->adj_y->min_value,mulscale*wid->adj_y->step));
293 }
294 break;
295 case (CL_VIEWPORTSLIDER):
296 {
297 float state = (wid->adj_y->start_value - wid->adj_y->min_value) /
298 (wid->adj_y->max_value - wid->adj_y->min_value);
299 float nsteps = wid->adj_y->step / (wid->adj_y->max_value - wid->adj_y->min_value);
300 float nvalue = min(1.0,max(0.0,state - ((float)(wid->pos_y - y)*wid->adj_y->scale *nsteps)));
301 float prevalue = nvalue * (wid->adj_y->max_value - wid->adj_y->min_value) + wid->adj_y->min_value;
302 float mulscale = round(prevalue/wid->adj_y->step);
303 value = min(wid->adj_y->max_value,max(wid->adj_y->min_value,mulscale*wid->adj_y->step));
304 }
305 break;
306 case (CL_TOGGLE):
307 // dont toggle on motion!
308 // value = wid->adj_y->value ? 0.0 : 1.0;
309 break;
310 default:
311 break;
312 }
313 check_value_changed(wid->adj_y, &value);
314 }
315}
float start_value
Definition xadjustment.h:96
Widget_t - struct to hold the basic Widget_t info.
Definition xwidget.h:457
Adjustment_t * adj_y
Definition xwidget.h:495
Adjustment_t * adj_x
Definition xwidget.h:493
int pos_y
Definition xwidget.h:515
int pos_x
Definition xwidget.h:513
void check_value_changed(Adjustment_t *adj, float *value)
check_value_changed - check if Adjustment_t value have changed and send value_changed_callback (VALUE...

References Widget_t::adj_x, Widget_t::adj_y, check_value_changed(), CL_CONTINUOS, CL_LOGARITHMIC, CL_LOGSCALE, CL_TOGGLE, CL_VIEWPORTSLIDER, Adjustment_t::max_value, Adjustment_t::min_value, Widget_t::pos_x, Widget_t::pos_y, Adjustment_t::scale, Adjustment_t::start_value, Adjustment_t::step, Adjustment_t::type, and Adjustment_t::value.

Referenced by os_widget_event_loop(), and WndProc().

◆ adj_set_scale()

void adj_set_scale ( Adjustment_t adj,
float  value 
)

adj_set_scale - internal use to scale the pointer movement (0.1 -1.0)

Parameters
*adj- pointer to the Adjustment_t
value- value to set the scaleing factor to

Definition at line 233 of file xadjustment.c.

233 {
234 adj->scale = value;
235}

References Adjustment_t::scale.

Referenced by _configure_listview(), _configure_menu(), _reconfigure_combobox_viewport(), _reconfigure_multi_listview_viewport(), and mk_open_midi_keyboard().

◆ adj_set_start_value()

void adj_set_start_value ( void *  w)

adj_set_start_value - internal use to store the value when pointer movment starts

Parameters
*w- pointer to Widget_t containing the Adjustment_t

Definition at line 227 of file xadjustment.c.

227 {
228 Widget_t * wid = (Widget_t*)w;
229 if(wid->adj_x)wid->adj_x->start_value = wid->adj_x->value;
230 if(wid->adj_y)wid->adj_y->start_value = wid->adj_y->value;
231}

References Widget_t::adj_x, Widget_t::adj_y, Adjustment_t::start_value, and Adjustment_t::value.

Referenced by _toggle_event().

◆ adj_set_state()

void adj_set_state ( Adjustment_t adj,
float  state 
)

adj_set_state - set the current state of the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
state- set the Adjustment_t state mapped to (0<->1)

Definition at line 141 of file xadjustment.c.

141 {
142 if (!adj) return;
143 float nvalue = min(1.0,max(0.0,state));
144 float value = nvalue * (adj->max_value - adj->min_value) + adj->min_value;
145 check_value_changed(adj, &value);
146}

References check_value_changed(), Adjustment_t::max_value, and Adjustment_t::min_value.

Referenced by _reconfigure_combobox_viewport(), _reconfigure_listbox_viewport(), _reconfigure_listview_viewport(), _set_combobox_menu_viewport(), _set_combobox_viewpoint(), _set_entry(), _set_listview_viewpoint(), _set_listviewport(), _set_menu_viewpoint(), _set_multi_listview_viewpoint(), _set_multi_listviewport(), and _set_viewpoint().

◆ adj_set_std_value()

void adj_set_std_value ( Adjustment_t adj,
float  value 
)

adj_set_std_value - set the standart value to the Adjustment_t

Parameters
*adj- pointer to the Adjustment_t
value- value to set the Adjustment_t to

Definition at line 218 of file xadjustment.c.

218 {
219 if (!adj) return;
220 if (adj->type == CL_LOGSCALE)
221 v = powf(10,(v/adj->log_scale));
222 else if (adj->type == CL_LOGARITHMIC)
223 v = log10(v);
224 adj->std_value = v;
225}

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Adjustment_t::std_value, and Adjustment_t::type.

◆ adj_set_value()

void adj_set_value ( Adjustment_t adj,
float  value 
)

◆ check_value_changed()

void check_value_changed ( Adjustment_t adj,
float *  value 
)

check_value_changed - check if Adjustment_t value have changed and send value_changed_callback (VALUE_CHANGED) and adj_callback (ADJ_INTERN) if so

Parameters
*adj- pointer to the Adjustment_t
value- value to check

Definition at line 317 of file xadjustment.c.

317 {
318 debug_print("Adjustment_t check_value_changed %f\n", *(value));
319 if(fabs(*(value) - adj->value)>=0.00001) {
320 adj->value = *(value);
321 adj->w->func.adj_callback(adj->w, NULL);
322 adj->w->func.value_changed_callback(adj->w, value);
323 }
324}
Widget_t * w
Definition xadjustment.h:84
xevfunc adj_callback
Definition xwidget.h:89
xevfunc value_changed_callback
Definition xwidget.h:90
Func_t func
Definition xwidget.h:481

References Func_t::adj_callback, Widget_t::func, Adjustment_t::value, Func_t::value_changed_callback, and Adjustment_t::w.

Referenced by _check_enum(), _listbox_entry_released(), _scroll_event(), _set_adj_value(), adj_set_motion_state(), adj_set_state(), and adj_set_value().

◆ delete_adjustment()

void * delete_adjustment ( Adjustment_t adj)

delete_adjustment - freeing the memory of the Adjustment_t You usually don't need to call this, as it get handled by main_quit() -> destroy_widget()

Parameters
*adj- pointer to the Adjustment to free

Definition at line 133 of file xadjustment.c.

133 {
134 if(adj) {
135 free(adj);
136 debug_print("Widget_t delete adjustment\n");
137 }
138 return NULL;
139}

Referenced by destroy_widget().

◆ set_adjustment()

void set_adjustment ( Adjustment_t adj,
float  std_value,
float  value,
float  min_value,
float  max_value,
float  step,
CL_type  type 
)

*set_adjustment - set a new range to a existing Adjustment_t or create if it not exists yet

Parameters
*adj- pointer to the Adjustment_t
std_value- standard value of the Adjustment_t
value- current value of the Adjustment_t
min_value- minimum value of the Adjustment_t
max_value- maximal value of the Adjustment_t
step- step to increase/decrease the Adjustment_t
type- set CL_type of Adjustment_t

Definition at line 80 of file xadjustment.c.

81 {
82 if (!adj) adj = (Adjustment_t*)malloc(sizeof(Adjustment_t));
83 assert(adj);
84
85 switch(type) {
86 case (CL_LOGSCALE) :
87 *(adj) = (Adjustment_t) {
88 .w = adj->w,
89 .std_value = powf(10,(std_value/adj->log_scale)),
90 .value = powf(10,(value/adj->log_scale)),
91 .min_value = powf(10,(min_value/adj->log_scale)),
92 .max_value = powf(10,(max_value/adj->log_scale)),
93 .step = step,
94 .start_value = powf(10,(value/adj->log_scale)),
95 .scale = 1.0,
96 .type = type,
97 .log_scale = adj->log_scale
98 };
99 break;
100 case (CL_LOGARITHMIC) :
101 *(adj) = (Adjustment_t) {
102 .w = adj->w,
103 .std_value = log10(std_value),
104 .value = log10(value),
105 .min_value = log10(min_value),
106 .max_value = log10(max_value),
107 .step = step,
108 .start_value = log10(value),
109 .scale = 1.0,
110 .type = type,
111 .log_scale = adj->log_scale
112 };
113 break;
114 default:
115 *(adj) = (Adjustment_t) {
116 .w = adj->w,
117 .std_value = std_value,
118 .value = value,
119 .min_value = min_value,
120 .max_value = max_value,
121 .step = step,
122 .start_value = value,
123 .scale = 1.0,
124 .type = type,
125 .log_scale = adj->log_scale
126 };
127 break;
128 }
129
130 debug_print("Widget_t set adjustment\n");
131}

References CL_LOGARITHMIC, CL_LOGSCALE, Adjustment_t::log_scale, Widget_t::scale, and Adjustment_t::w.

Referenced by _configure_combobox_menu(), _configure_menu(), _reconfigure_combobox_viewport(), add_keyboard(), add_keyboard_knob(), cmenu_add_submenu(), combobox_add_entry(), combobox_delete_entrys(), create_combobox_menu(), create_menu(), listbox_add_entry(), listview_remove_list(), listview_set_list(), menu_add_accel_check_entry(), menu_add_check_entry(), menu_add_entry(), menu_add_item(), menu_add_numeric_items(), menu_add_radio_entry(), menu_add_submenu(), menu_add_value_entry(), menu_remove_item(), mk_open_midi_keyboard(), multi_listview_remove_list(), multi_listview_set_list(), open_file_dialog(), tabbox_add_tab(), and tabbox_remove_tab().