LiVES  3.2.0
paramspecial.c
Go to the documentation of this file.
1 // paramspecial.c
2 // LiVES
3 // (c) G. Finch 2004 - 2019 <salsaman+lives@gmail.com>
4 // released under the GNU GPL 3 or later
5 // see file ../COPYING or www.gnu.org for licensing details
6 
7 // dynamic window generation from parameter arrays :-)
8 // special widgets
9 
10 #include "main.h"
11 #include "resample.h"
12 #include "effects.h"
13 #include "paramwindow.h"
14 #include "framedraw.h"
15 #include "callbacks.h"
16 
17 static lives_special_aspect_t aspect;
18 static lives_special_fontchooser_t fchooser;
19 static lives_special_framedraw_rect_t framedraw;
20 static LiVESList *fileread;
21 static LiVESList *filewrite;
22 static LiVESList *passwd_widgets;
23 
24 static boolean special_inited = FALSE;
25 
26 
28 
29 
30 void init_special(void) {
31  if (special_inited) return;
32 
33  special_inited = TRUE;
34  fchooser.nwidgets = 0;
35  aspect.nwidgets = 0;
36 
37  framedraw.xstart_param = framedraw.ystart_param = framedraw.xend_param = framedraw.yend_param = NULL;
38  framedraw.stdwidgets = 0;
39  framedraw.extra_params = NULL;
40  framedraw.num_extra = 0;
41  framedraw.added = FALSE;
44  passwd_widgets = NULL;
45  fileread = NULL;
46  filewrite = NULL;
47 }
48 
49 
51 
52 
53 void add_to_special(const char *sp_string, lives_rfx_t *rfx) {
54  int num_widgets = get_token_count(sp_string, '|') - 2;
55  char **array = lives_strsplit(sp_string, "|", num_widgets + 2);
56 
57  // TODO - assert only one of each of these
58 
59  if (!strcmp(array[0], "aspect")) {
60  aspect.width_param = &rfx->params[atoi(array[1])];
61  aspect.height_param = &rfx->params[atoi(array[2])];
62  } else if (!strcmp(array[0], "fontchooser")) {
63 #if GTK_CHECK_VERSION(3, 2, 0)
64  fchooser.font_param = &rfx->params[atoi(array[1])];
65  fchooser.size_param = &rfx->params[atoi(array[2])];
66  if (!*((char *)fchooser.font_param->value))
68 #endif
69  } else if (!strcmp(array[0], "mergealign")) {
70  mergealign.start_param = &rfx->params[atoi(array[1])];
71  mergealign.end_param = &rfx->params[atoi(array[2])];
72  mergealign.rfx = rfx;
73  } else if (!strcmp(array[0], "framedraw")) {
74  if (fx_dialog[1]) {
75  lives_strfreev(array);
76  return;
77  }
78  framedraw.rfx = rfx;
79  if (!strcmp(array[1], "rectdemask")) {
81  framedraw.xstart_param = &rfx->params[atoi(array[2])];
82  framedraw.ystart_param = &rfx->params[atoi(array[3])];
83  framedraw.xend_param = &rfx->params[atoi(array[4])];
84  framedraw.yend_param = &rfx->params[atoi(array[5])];
85  framedraw.stdwidgets = 4;
86  } else if (!strcmp(array[1], "multirect") || !strcmp(array[1], "multrect")) { // allow for spelling errors in earlier RFX
88  framedraw.xstart_param = &rfx->params[atoi(array[2])];
89  framedraw.ystart_param = &rfx->params[atoi(array[3])];
90  framedraw.xend_param = &rfx->params[atoi(array[4])];
91  framedraw.yend_param = &rfx->params[atoi(array[5])];
92  framedraw.stdwidgets = 4;
93  } else if (!strcmp(array[1], "singlepoint")) {
95  framedraw.xstart_param = &rfx->params[atoi(array[2])];
96  framedraw.ystart_param = &rfx->params[atoi(array[3])];
97  framedraw.stdwidgets = 2;
98  } else if (!strcmp(array[1], "scaledpoint")) {
100  framedraw.xstart_param = &rfx->params[atoi(array[2])];
101  framedraw.ystart_param = &rfx->params[atoi(array[3])];
102  framedraw.scale_param = &rfx->params[atoi(array[4])];
103  framedraw.stdwidgets = 3;
104  }
105 
106  if (num_widgets > framedraw.stdwidgets) framedraw.extra_params =
107  (int *)lives_malloc(((framedraw.num_extra = (num_widgets - framedraw.stdwidgets))) * sizint);
108 
109  for (int i = 0; i < num_widgets; i++) {
110  int pnum = atoi(array[i + 2]);
111  if (rfx->status == RFX_STATUS_WEED) {
112  if (mainw->multitrack) {
113  if (rfx->params[pnum].multi == PVAL_MULTI_PER_CHANNEL) {
115  if ((rfx->params[pnum].hidden & HIDDEN_MULTI) == HIDDEN_MULTI) {
116  if (mainw->multitrack->track_index != -1) {
117  rfx->params[pnum].hidden ^= HIDDEN_MULTI; // multivalues allowed
118  } else {
119  rfx->params[pnum].hidden |= HIDDEN_MULTI; // multivalues hidden
120  // *INDENT-OFF*
121  }}}}}
122  // *INDENT-ON*
123  if (i >= framedraw.stdwidgets) framedraw.extra_params[i - framedraw.stdwidgets] = pnum;
124  }
125 
126  if (mainw->multitrack) {
127  mainw->multitrack->framedraw = &framedraw;
128  lives_widget_set_bg_color(mainw->multitrack->fd_frame, LIVES_WIDGET_STATE_NORMAL, &palette->light_red);
129  }
130  }
131 
132  // can be multiple of each of these
133 
134  else if (!strcmp(array[0], "fileread")) {
135  int idx = atoi(array[1]);
136  fileread = lives_list_append(fileread, (livespointer)&rfx->params[idx]);
137 
138  // ensure we get an entry and not a text_view
139  if ((int)rfx->params[idx].max > RFX_TEXT_MAGIC) rfx->params[idx].max = (double)RFX_TEXT_MAGIC;
140  } else if (!strcmp(array[0], "filewrite")) {
141  int idx = atoi(array[1]);
142  filewrite = lives_list_append(filewrite, (livespointer)&rfx->params[idx]);
143  rfx->params[idx].edited = TRUE;
144 
145  // ensure we get an entry and not a text_view
146  if ((int)rfx->params[idx].max > RFX_TEXT_MAGIC) rfx->params[idx].max = (double)RFX_TEXT_MAGIC;
147  } else if (!strcmp(array[0], "password")) {
148  int idx = atoi(array[1]);
149  passwd_widgets = lives_list_append(passwd_widgets, (livespointer)&rfx->params[idx]);
150 
151  // ensure we get an entry and not a text_view
152  if ((int)rfx->params[idx].max > RFX_TEXT_MAGIC) rfx->params[idx].max = (double)RFX_TEXT_MAGIC;
153  }
154 
155  lives_strfreev(array);
156 }
157 
158 
159 void fd_tweak(lives_rfx_t *rfx) {
160  if (rfx->props & RFX_PROPS_MAY_RESIZE) {
161  if (framedraw.type != LIVES_PARAM_SPECIAL_TYPE_NONE) {
162  // for effects which can resize, and have a special framedraw, we will use original sized image
166  }
167  }
168  if (framedraw.type != LIVES_PARAM_SPECIAL_TYPE_RECT_DEMASK) {
170  }
171 }
172 
173 
175 
176 
177 static void passwd_toggle_vis(LiVESToggleButton * b, livespointer entry) {
179 }
180 
181 static void reset_aspect(LiVESButton * button, livespointer user_data) {
182  if (lives_lock_button_get_locked(button)) {
183  lives_special_aspect_t *aspect = (lives_special_aspect_t *)user_data;
184  double width = lives_spin_button_get_value(LIVES_SPIN_BUTTON(aspect->width_param->widgets[0]));
185  double height = lives_spin_button_get_value(LIVES_SPIN_BUTTON(aspect->height_param->widgets[0]));
186  aspect->ratio = width / height;
187  }
188 }
189 
190 #if GTK_CHECK_VERSION(3, 2, 0)
191 static void font_set_cb(LiVESFontButton * button, livespointer data) {
192  lives_rfx_t *rfx = (lives_rfx_t *)data;
193  char *fname = lives_font_chooser_get_font(LIVES_FONT_CHOOSER(button));
194  LingoFontDescription *lfd = lives_font_chooser_get_font_desc(LIVES_FONT_CHOOSER(button));
195  int size = lingo_font_description_get_size(lfd);
196 
198  lives_entry_set_text(LIVES_ENTRY(fchooser.font_param->widgets[0]), fname);
199  after_param_text_changed(fchooser.font_param->widgets[0], rfx);
201 
203  lives_spin_button_set_value(LIVES_SPIN_BUTTON(fchooser.size_param->widgets[0]), size / LINGO_SCALE);
205 
206  lives_free(fname);
207  lingo_font_description_free(lfd);
208 }
209 
210 static void text_size_cb(LiVESSpinButton * button, livespointer data) {
211  int sval = lives_spin_button_get_value_as_int(button);
212  LingoFontDescription *lfd =
213  lives_font_chooser_get_font_desc(LIVES_FONT_CHOOSER(fchooser.font_param->widgets[1]));
214  lingo_font_description_set_size(lfd, sval * LINGO_SCALE);
215  lives_font_chooser_set_font_desc(LIVES_FONT_CHOOSER(fchooser.font_param->widgets[1]), lfd);
216  lingo_font_description_free(lfd);
217 }
218 
219 static void font_entry_cb(LiVESEntry * entry, livespointer data) {
220  LiVESFontButton *button = (LiVESFontButton *)fchooser.font_param->widgets[1];
221  //lives_font_chooser_set_font(LIVES_FONT_CHOOSER(button), lives_entry_get_text(entry));
222  text_size_cb(LIVES_SPIN_BUTTON(fchooser.size_param->widgets[0]), data);
223  font_set_cb(button, data);
224 }
225 #endif
226 
227 
228 void check_for_special_type(lives_rfx_t *rfx, lives_param_t *param, LiVESBox * pbox) {
229  LiVESList *slist;
230  // check if this parameter is part of a special window
231  // as we are drawing the paramwindow
232 
233  if (param == framedraw.xstart_param) {
234  param->special_type = framedraw.type;
235  param->special_type_index = 0;
236  }
237  if (param == framedraw.ystart_param) {
238  param->special_type = framedraw.type;
239  param->special_type_index = 1;
240  }
241  if (mainw->current_file > -1) {
242  if (param == framedraw.xend_param) {
243  param->special_type = framedraw.type;
244  param->special_type_index = 2;
245  }
246  if (param == framedraw.yend_param) {
247  param->special_type = framedraw.type;
248  param->special_type_index = 3;
249  }
250 
251  if (param == aspect.width_param) {
253  param->special_type_index = 0;
254  }
255 
256  if (param == aspect.height_param) {
258  param->special_type_index = 1;
259  }
260 
261  if (param == fchooser.font_param) {
263  param->special_type_index = 0;
264  }
265  if (param == fchooser.size_param) {
267  param->special_type_index = 1;
268  }
269  }
270 
271  slist = fileread;
272  while (slist) {
273  if (param == (lives_param_t *)(slist->data)) {
275  }
276  slist = slist->next;
277  }
278 
279  slist = filewrite;
280  while (slist) {
281  if (param == (lives_param_t *)(slist->data)) {
283  }
284  slist = slist->next;
285  }
286 
287  // password fields
288  slist = passwd_widgets;
289  while (slist) {
290  if (param == (lives_param_t *)(slist->data)) {
292  }
293  slist = slist->next;
294  }
295 }
296 
297 
298 void check_for_special(lives_rfx_t *rfx, lives_param_t *param, LiVESBox * pbox) {
299  LiVESWidget *checkbutton;
300  LiVESWidget *widget = param->widgets[0];
301  LiVESWidget *hbox;
302  LiVESWidget *box;
303  LiVESWidget *buttond;
304  LiVESList *slist;
305 
306  // check if this parameter is part of a special window
307  // as we are drawing the paramwindow
308 
309  if (param == framedraw.xstart_param) {
310  param->special_type = framedraw.type;
311  param->special_type_index = 0;
313  lives_spin_button_set_value(LIVES_SPIN_BUTTON(widget), 0.);
314  lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
315  LIVES_GUI_CALLBACK(after_framedraw_widget_changed), &framedraw);
316  }
317  if (param == framedraw.ystart_param) {
318  param->special_type = framedraw.type;
319  param->special_type_index = 1;
321  lives_spin_button_set_value(LIVES_SPIN_BUTTON(widget), 0.);
322  lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
323  LIVES_GUI_CALLBACK(after_framedraw_widget_changed), &framedraw);
324  }
325  if (mainw->current_file > -1) {
326  if (param == framedraw.xend_param) {
327  param->special_type = framedraw.type;
328  param->special_type_index = 2;
330  lives_spin_button_set_value(LIVES_SPIN_BUTTON(widget), (double)cfile->hsize);
331  lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
332  LIVES_GUI_CALLBACK(after_framedraw_widget_changed), &framedraw);
333  }
334  if (param == framedraw.yend_param) {
335  param->special_type = framedraw.type;
336  param->special_type_index = 3;
338  lives_spin_button_set_value(LIVES_SPIN_BUTTON(widget), (double)cfile->vsize);
339  lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
340  LIVES_GUI_CALLBACK(after_framedraw_widget_changed), &framedraw);
341  }
342 
343  if (framedraw.stdwidgets > 0 && !framedraw.added) {
344  if (framedraw.xstart_param && framedraw.xstart_param->widgets[0] &&
345  framedraw.ystart_param && framedraw.ystart_param->widgets[0]) {
346  if (framedraw.stdwidgets == 2 || (framedraw.stdwidgets == 3 && framedraw.scale_param &&
347  framedraw.scale_param->widgets[0]) || (framedraw.xend_param
348  && framedraw.xend_param->widgets[0] &&
349  framedraw.yend_param && framedraw.yend_param->widgets[0])) {
350  if (!mainw->multitrack) {
351  framedraw_connect(&framedraw, cfile->hsize, cfile->vsize, rfx); // turn passive preview->active
352  framedraw_add_reset(LIVES_VBOX(LIVES_WIDGET(pbox)), &framedraw);
353  } else {
355  }
356  framedraw.added = TRUE;
357  }
358  }
359  }
360 
361  if (param == aspect.width_param) {
362  if (CURRENT_CLIP_HAS_VIDEO) lives_spin_button_set_value(LIVES_SPIN_BUTTON(widget), cfile->hsize);
363  aspect.width_func = lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
364  LIVES_GUI_CALLBACK(after_aspect_width_changed), NULL);
365  aspect.nwidgets++;
366  }
367 
368  if (param == aspect.height_param) {
369  if (CURRENT_CLIP_HAS_VIDEO) lives_spin_button_set_value(LIVES_SPIN_BUTTON(widget), cfile->vsize);
370  aspect.height_func = lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
371  LIVES_GUI_CALLBACK(after_aspect_height_changed), NULL);
372  aspect.nwidgets++;
373  }
374 
375 #if GTK_CHECK_VERSION(3, 2, 0)
376  if (param == fchooser.font_param) {
377  LiVESWidget *tbox = widget;
378  int idx;
379  box = lives_widget_get_parent(widget);
380  while (box && !LIVES_IS_HBOX(box)) {
381  tbox = box;
382  box = lives_widget_get_parent(box);
383  }
384  if (!box) return;
385  idx = get_box_child_index(LIVES_BOX(box), tbox);
386  param->widgets[1] = buttond = lives_standard_font_chooser_new();
387  lives_font_chooser_set_font(LIVES_FONT_CHOOSER(param->widgets[1]), param->value);
388 
389  lives_box_pack_start(LIVES_BOX(box), buttond, TRUE, TRUE, 0);
390  lives_box_reorder_child(LIVES_BOX(box), buttond, idx);
391  if (lives_widget_is_visible(widget)) lives_widget_show_all(buttond);
392 
394  lives_widget_unparent(tbox);
395 
397  lives_widget_set_show_hide_with(widget, buttond);
398  lives_widget_set_sensitive_with(widget, buttond);
399 
400  lives_widget_destroy_with(buttond, tbox);
401 
402  lives_signal_sync_connect(LIVES_GUI_OBJECT(param->widgets[1]), LIVES_WIDGET_FONT_SET_SIGNAL,
403  LIVES_GUI_CALLBACK(font_set_cb), (livespointer)rfx);
404 
405  fchooser.entry_func = lives_signal_sync_connect(LIVES_GUI_OBJECT(widget),
406  LIVES_WIDGET_CHANGED_SIGNAL,
407  LIVES_GUI_CALLBACK(font_entry_cb), (livespointer)rfx);
408 
409  if (fchooser.nwidgets == 1) {
410  double fsize = get_double_param(fchooser.size_param);
411  lives_entry_set_text(LIVES_ENTRY(param->widgets[0]), param->value);
412  font_entry_cb(LIVES_ENTRY(param->widgets[0]), (livespointer)rfx);
413  lives_spin_button_set_value(LIVES_SPIN_BUTTON(fchooser.size_param->widgets[0]), fsize);
414  text_size_cb(LIVES_SPIN_BUTTON(fchooser.size_param->widgets[0]), (livespointer)rfx);
415  }
416  fchooser.nwidgets++;
417  }
418 
419  if (param == fchooser.size_param) {
420  fchooser.size_paramfunc = lives_signal_sync_connect_after(LIVES_GUI_OBJECT(widget),
421  LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
422  LIVES_GUI_CALLBACK(text_size_cb), (livespointer)rfx);
423  if (fchooser.nwidgets == 1) {
424  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), get_double_param(param->value));
425  text_size_cb(LIVES_SPIN_BUTTON(fchooser.size_param->widgets[0]), (livespointer)rfx);
426  }
427  fchooser.nwidgets++;
428  }
429 #endif
430 
431  if ((param == aspect.width_param || param == aspect.height_param) && aspect.nwidgets == 2) {
432  boolean expand = widget_opts.expand == LIVES_EXPAND_EXTRA;
433  char *labeltext = (_("Maintain _Aspect Ratio"));
434 
435  aspect.no_reset = TRUE;
437  ASPECT_BUTTON_HEIGHT, labeltext, NULL);
438  lives_free(labeltext);
439 
440  lives_signal_sync_connect(aspect.lockbutton, LIVES_WIDGET_CLICKED_SIGNAL,
441  LIVES_GUI_CALLBACK(reset_aspect), (livespointer)&aspect);
442 
443  reset_aspect(LIVES_BUTTON(aspect.lockbutton), &aspect);
444 
445  hbox = lives_hbox_new(FALSE, 0);
446  lives_widget_apply_theme(hbox, LIVES_WIDGET_STATE_NORMAL);
447 
448  if (!LIVES_IS_HBOX(pbox)) {
449  hbox = lives_hbox_new(FALSE, 0);
450  lives_widget_show(hbox);
451  lives_box_pack_start(LIVES_BOX(LIVES_WIDGET(pbox)), hbox, FALSE, FALSE, widget_opts.packing_height * 2);
452  lives_box_pack_end(LIVES_BOX(hbox), aspect.lockbutton, expand, FALSE, 0);
453  } else {
454  lives_box_pack_start(LIVES_BOX(LIVES_WIDGET(pbox)), hbox, FALSE, FALSE, widget_opts.packing_width * 1.5);
455  lives_box_pack_start(LIVES_BOX(hbox), aspect.lockbutton, expand, FALSE, 0);
456  }
457 
458  if (expand) add_fill_to_box(LIVES_BOX(hbox));
459  }
460  }
461 
462  slist = fileread;
463  while (slist) {
464  if (param == (lives_param_t *)(slist->data)) {
465  char *def_dir;
466  if (!widget) continue;
467 
468  box = lives_widget_get_parent(widget);
469 
470  while (box && !LIVES_IS_HBOX(box)) {
471  box = lives_widget_get_parent(box);
472  }
473 
474  if (!box) return;
475 
476  def_dir = lives_get_current_dir();
477 
478  if (LIVES_IS_ENTRY(widget)) {
479  if (*(lives_entry_get_text(LIVES_ENTRY(widget)))) {
480  char dirnamex[PATH_MAX];
481  lives_snprintf(dirnamex, PATH_MAX, "%s", lives_entry_get_text(LIVES_ENTRY(widget)));
482  get_dirname(dirnamex);
483  lives_free(def_dir);
484  def_dir = lives_strdup(dirnamex);
485  }
486  }
487 
488  param->widgets[2] = buttond = lives_standard_file_button_new(FALSE, def_dir);
489  lives_free(def_dir);
490  lives_box_pack_start(LIVES_BOX(box), buttond, FALSE, FALSE, widget_opts.packing_width);
491 
492  lives_signal_sync_connect(buttond, LIVES_WIDGET_CLICKED_SIGNAL, LIVES_GUI_CALLBACK(on_filesel_button_clicked),
493  (livespointer)widget);
494 
496  lives_widget_set_show_hide_with(widget, buttond);
497  lives_widget_set_sensitive_with(widget, buttond);
498 
499  if (LIVES_IS_ENTRY(widget)) {
500  lives_entry_set_editable(LIVES_ENTRY(widget), FALSE);
501  if (param->widgets[1] &&
502  LIVES_IS_LABEL(param->widgets[1]) &&
503  lives_label_get_mnemonic_widget(LIVES_LABEL(param->widgets[1])) != NULL)
504  lives_label_set_mnemonic_widget(LIVES_LABEL(param->widgets[1]), buttond);
505  lives_entry_set_max_length(LIVES_ENTRY(widget), PATH_MAX);
506  }
507  }
508 
509  slist = slist->next;
510  }
511 
512  slist = filewrite;
513  while (slist) {
514  if (param == (lives_param_t *)(slist->data)) {
515 
516  if (!widget) continue;
517 
518  box = lives_widget_get_parent(widget);
519 
520  while (box && !LIVES_IS_HBOX(box)) {
521  box = lives_widget_get_parent(box);
522  }
523 
524  if (!box) return;
525 
526  param->widgets[2] = buttond = lives_standard_file_button_new(FALSE, NULL);
527 
528  lives_widget_object_set_data(LIVES_WIDGET_OBJECT(buttond), FILESEL_TYPE_KEY, (livespointer)LIVES_FILE_SELECTION_SAVE);
529  lives_box_pack_start(LIVES_BOX(box), buttond, FALSE, FALSE, widget_opts.packing_width);
530  lives_signal_sync_connect(buttond, LIVES_WIDGET_CLICKED_SIGNAL, LIVES_GUI_CALLBACK(on_filesel_button_clicked),
531  (livespointer)widget);
532 
534  lives_widget_set_show_hide_with(widget, buttond);
535  lives_widget_set_sensitive_with(widget, buttond);
536 
537  if (LIVES_IS_ENTRY(widget)) {
538  lives_entry_set_editable(LIVES_ENTRY(widget), TRUE);
539  if (param->widgets[1] &&
540  LIVES_IS_LABEL(param->widgets[1]) &&
541  lives_label_get_mnemonic_widget(LIVES_LABEL(param->widgets[1])) != NULL)
542  lives_label_set_mnemonic_widget(LIVES_LABEL(param->widgets[1]), buttond);
543  lives_entry_set_max_length(LIVES_ENTRY(widget), PATH_MAX);
544  }
545  }
546 
547  slist = slist->next;
548  }
549 
550  // password fields
551 
552  for (slist = passwd_widgets; slist; slist = slist->next) {
553  if (param == (lives_param_t *)(slist->data)) {
554  if (!widget) continue;
555 
556  lives_entry_set_visibility(LIVES_ENTRY(widget), FALSE);
557 
558  box = lives_widget_get_parent(widget);
559 
560  while (box && !LIVES_IS_BOX(box)) {
561  box = lives_widget_get_parent(box);
562  }
563 
564  if (!box) continue;
565 
566  if (!LIVES_IS_HBOX(box)) {
567  hbox = lives_hbox_new(FALSE, 0);
568  lives_box_pack_start(LIVES_BOX(LIVES_WIDGET(box)), hbox, FALSE, FALSE, widget_opts.packing_height);
569  } else hbox = box;
570 
571  param->widgets[2] = checkbutton = lives_standard_check_button_new(_("Display Password"), FALSE, LIVES_BOX(hbox), NULL);
572 
573  lives_button_set_focus_on_click(LIVES_BUTTON(checkbutton), FALSE);
574 
575  if (!lives_widget_is_sensitive(widget)) lives_widget_set_sensitive(checkbutton, FALSE);
576  lives_widget_show_all(hbox);
577 
578  lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
579  LIVES_GUI_CALLBACK(passwd_toggle_vis), (livespointer)widget);
580  }
581  }
582 }
583 
584 
585 void after_aspect_width_changed(LiVESSpinButton * spinbutton, livespointer user_data) {
586  if (lives_lock_button_get_locked(LIVES_BUTTON(aspect.lockbutton))) {
587  int width = lives_spin_button_get_value_as_int(LIVES_SPIN_BUTTON(spinbutton));
588  double height = (double)width / aspect.ratio;
589  LiVESWidget *spbutton = aspect.height_param->widgets[0];
590  lives_signal_handler_block(spbutton, aspect.height_func);
591  aspect.width_param->change_blocked = TRUE;
592  height = lives_spin_button_get_snapval(LIVES_SPIN_BUTTON(spbutton), height);
593  lives_spin_button_set_value(LIVES_SPIN_BUTTON(spbutton), height);
594  lives_spin_button_update(LIVES_SPIN_BUTTON(spbutton));
595  lives_signal_handler_unblock(spbutton, aspect.height_func);
596  aspect.width_param->change_blocked = FALSE;
597  }
598 }
599 
600 
601 void after_aspect_height_changed(LiVESToggleButton * spinbutton, livespointer user_data) {
602  if (lives_lock_button_get_locked(LIVES_BUTTON(aspect.lockbutton))) {
603  int height = lives_spin_button_get_value_as_int(LIVES_SPIN_BUTTON(spinbutton));
604  double width = (double)height * aspect.ratio;
605  LiVESWidget *spbutton = aspect.width_param->widgets[0];
606  lives_signal_handler_block(spbutton, aspect.width_func);
607  aspect.height_param->change_blocked = TRUE;
608  width = lives_spin_button_get_snapval(LIVES_SPIN_BUTTON(spbutton), width);
609  lives_spin_button_set_value(LIVES_SPIN_BUTTON(spbutton), width);
610  lives_spin_button_update(LIVES_SPIN_BUTTON(spbutton));
611  lives_signal_handler_unblock(spbutton, aspect.width_func);
613  }
614 }
615 
616 
618  // check all writeable files which were user edited (param->edited), to make sure we don't overwrite without permission
619  // if the value was set by the file button we would have checked there, and param->edited will be FALSE
620 
621  if (filewrite) {
622  LiVESList *slist = filewrite;
623  while (slist) {
624  lives_param_t *param = (lives_param_t *)(slist->data);
625  if (param->edited) {
626  // check for overwrite
627  if (LIVES_IS_ENTRY(param->widgets[0])) {
628  if (*(lives_entry_get_text(LIVES_ENTRY(param->widgets[0])))) {
629  if (!check_file(lives_entry_get_text(LIVES_ENTRY(param->widgets[0])), TRUE)) {
630  return FALSE;
631  // *INDENT-OFF*
632  }}}}
633  slist = slist->next;
634  }}
635  // *INDENT-ON*
636 
637  return TRUE;
638 }
639 
640 
641 boolean special_cleanup(boolean is_ok) {
642  // free some memory now
643  if (special_inited) {
644  if (is_ok && !check_filewrite_overwrites()) return FALSE;
645  aspect.no_reset = FALSE;
646 
648  mainw->framedraw_spinbutton = NULL;
649 
651  mainw->fd_layer = NULL;
652 
654  mainw->fd_layer_orig = NULL;
655 
656  mainw->framedraw_preview = NULL;
657 
658  if (framedraw.extra_params) lives_free(framedraw.extra_params);
659  framedraw.extra_params = NULL;
660 
662 
663  if (fileread) lives_list_free(fileread);
664  fileread = NULL;
665 
666  if (filewrite) lives_list_free(filewrite);
667  filewrite = NULL;
668 
669  if (passwd_widgets) lives_list_free(passwd_widgets);
670  passwd_widgets = NULL;
671 
672  fchooser.nwidgets = 0;
673 
674  framedraw.added = FALSE;
675  special_inited = FALSE;
676  }
677  return TRUE;
678 }
679 
680 
682  aspect.width_param = w;
683  aspect.height_param = h;
684 }
685 
686 
687 void setmergealign(void) {
688  lives_param_t *param;
689  int cb_frames = clipboard->frames;
690 
691  if (prefs->ins_resample && clipboard->fps != cfile->fps) {
692  cb_frames = count_resampled_frames(clipboard->frames, clipboard->fps, cfile->fps);
693  }
694 
695  if (cfile->end - cfile->start + 1 > (cb_frames * ((merge_opts && merge_opts->spinbutton_loops) ?
697  && !merge_opts->loop_to_fit) {
698  // set special transalign widgets to their default values
699  if (mergealign.start_param && mergealign.start_param->widgets[0] && LIVES_IS_SPIN_BUTTON
700  (mergealign.start_param->widgets[0]) && (param = mergealign.start_param)->type == LIVES_PARAM_NUM) {
701  if (param->dp) {
702  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), get_double_param(param->def));
703  } else {
704  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), (double)get_int_param(param->def));
705  }
706  }
707  if (mergealign.end_param && mergealign.end_param->widgets[0] && LIVES_IS_SPIN_BUTTON
708  (mergealign.end_param->widgets[0]) && (param = mergealign.end_param)->type == LIVES_PARAM_NUM) {
709  if (param->dp) {
710  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), get_double_param(param->def));
711  } else {
712  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), (double)get_int_param(param->def));
713  }
714  }
715  } else {
716  if (merge_opts->align_start) {
717  // set special transalign widgets to min/max values
718  if (mergealign.start_param && mergealign.start_param->widgets[0] && LIVES_IS_SPIN_BUTTON
719  (mergealign.start_param->widgets[0]) && (param = mergealign.start_param)->type == LIVES_PARAM_NUM) {
720  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), (double)param->min);
721  }
722  if (mergealign.end_param && mergealign.end_param->widgets[0] && LIVES_IS_SPIN_BUTTON
723  (mergealign.end_param->widgets[0]) && (param = mergealign.end_param)->type == LIVES_PARAM_NUM) {
724  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), (double)param->max);
725  }
726  } else {
727  // set special transalign widgets to max/min values
728  if (mergealign.start_param && mergealign.start_param->widgets[0] && LIVES_IS_SPIN_BUTTON
729  (mergealign.start_param->widgets[0]) && (param = mergealign.start_param)->type == LIVES_PARAM_NUM) {
730  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), (double)param->max);
731  }
732  if (mergealign.end_param && mergealign.end_param->widgets[0] && LIVES_IS_SPIN_BUTTON
733  (mergealign.end_param->widgets[0]) && (param = mergealign.end_param)->type == LIVES_PARAM_NUM) {
734  lives_spin_button_set_value(LIVES_SPIN_BUTTON(param->widgets[0]), (double)param->min);
735  // *INDENT-OFF*
736  }}}
737  // *INDENT-OFF*
738 }
739 
740 
741 LiVESPixbuf *mt_framedraw(lives_mt * mt, weed_layer_t *layer) {
742  LiVESPixbuf *pixbuf = NULL;
743 
744  if (framedraw.added) {
745  switch (framedraw.type) {
747  if (mt->track_index == -1) {
748  // TODO - hide widgets
749  } else {
750  //
751  }
752  break;
753 
754  default:
755  break;
756  }
757 
758  // draw on top of layer
759  framedraw_redraw(&framedraw, layer);
760  }
761  return pixbuf;
762 }
763 
764 
765 boolean is_perchannel_multi(lives_rfx_t *rfx, int i) {
766  // updated for weed spec 1.1
767  if (rfx->params[i].multi == PVAL_MULTI_PER_CHANNEL) return TRUE;
768  return FALSE;
769 }
770 
LIVES_GLOBAL_INLINE
#define LIVES_GLOBAL_INLINE
Definition: main.h:239
widget_opts_t::packing_width
int packing_width
horizontal pixels between widgets
Definition: widget-helper.h:1410
_prefs::ins_resample
boolean ins_resample
Definition: preferences.h:184
merge_opts
_merge_opts * merge_opts
Definition: mainwindow.h:1849
lives_widget_destroy_with
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_destroy_with(LiVESWidget *widget, LiVESWidget *dieplease)
Definition: widget-helper.c:7221
lives_param_t::special_type
lives_param_special_t special_type
Definition: plugins.h:607
lives_lock_button_get_locked
WIDGET_HELPER_GLOBAL_INLINE boolean lives_lock_button_get_locked(LiVESButton *button)
Definition: widget-helper.c:10483
framedraw_add_reset
void framedraw_add_reset(LiVESVBox *box, lives_special_framedraw_rect_t *framedraw)
add "reset values" button
Definition: framedraw.c:200
lives_special_framedraw_rect_t::yend_param
lives_param_t * yend_param
Definition: paramspecial.h:23
lives_widget_set_sensitive_with
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_set_sensitive_with(LiVESWidget *w1, LiVESWidget *w2)
Definition: widget-helper.c:8857
lives_free
#define lives_free
Definition: machinestate.h:52
lives_box_pack_end
WIDGET_HELPER_GLOBAL_INLINE boolean lives_box_pack_end(LiVESBox *box, LiVESWidget *child, boolean expand, boolean fill, uint32_t padding)
Definition: widget-helper.c:3291
lives_label_get_mnemonic_widget
WIDGET_HELPER_GLOBAL_INLINE LiVESWidget * lives_label_get_mnemonic_widget(LiVESLabel *label)
Definition: widget-helper.c:6095
_palette::light_red
LiVESWidgetColor light_red
Definition: mainwindow.h:309
lives_malloc
#define lives_malloc
Definition: machinestate.h:46
lives_special_aspect_t::height_param
lives_param_t * height_param
Definition: paramspecial.h:32
LIVES_FILE_SELECTION_SAVE
#define LIVES_FILE_SELECTION_SAVE
Definition: interface.h:182
set_aspect_ratio_widgets
LIVES_GLOBAL_INLINE void set_aspect_ratio_widgets(lives_param_t *w, lives_param_t *h)
Definition: paramspecial.c:681
on_filesel_button_clicked
void on_filesel_button_clicked(LiVESButton *button, livespointer user_data)
callback for lives_standard filesel button same callback is used for dierctory buttons object_data in...
Definition: interface.c:3930
lives_special_fontchooser_t::size_paramfunc
ulong size_paramfunc
Definition: paramspecial.h:45
lives_special_framedraw_rect_t::stdwidgets
int stdwidgets
Definition: paramspecial.h:25
lives_param_t::special_type_index
int special_type_index
Definition: plugins.h:608
after_aspect_height_changed
void after_aspect_height_changed(LiVESToggleButton *spinbutton, livespointer user_data)
Definition: paramspecial.c:601
lives_spin_button_set_value
WIDGET_HELPER_GLOBAL_INLINE boolean lives_spin_button_set_value(LiVESSpinButton *button, double value)
Definition: widget-helper.c:5119
lives_spin_button_get_value_as_int
WIDGET_HELPER_GLOBAL_INLINE int lives_spin_button_get_value_as_int(LiVESSpinButton *button)
Definition: widget-helper.c:5091
lives_special_fontchooser_t::entry_func
ulong entry_func
Definition: paramspecial.h:46
lives_special_aspect_t::nwidgets
int nwidgets
Definition: paramspecial.h:38
lives_special_framedraw_rect_t::added
boolean added
Definition: paramspecial.h:17
mainwindow::current_file
int current_file
Definition: mainwindow.h:727
lives_button_set_focus_on_click
WIDGET_HELPER_GLOBAL_INLINE boolean lives_button_set_focus_on_click(LiVESButton *button, boolean focus)
Definition: widget-helper.c:4409
LIVES_PARAM_SPECIAL_TYPE_SCALEDPOINT
@ LIVES_PARAM_SPECIAL_TYPE_SCALEDPOINT
type may be used in framedraw
Definition: plugins.h:525
lives_rfx_t::status
lives_rfx_status_t status
Definition: plugins.h:631
LIVES_EXPAND_EXTRA
#define LIVES_EXPAND_EXTRA
Definition: widget-helper.h:1317
cfile
#define cfile
Definition: main.h:1833
lives_widget_hide
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_hide(LiVESWidget *widget)
Definition: widget-helper.c:1514
count_resampled_frames
int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps)
Definition: resample.c:72
lives_special_mergealign_t::rfx
lives_rfx_t * rfx
Definition: paramspecial.h:51
effects.h
lives_label_set_mnemonic_widget
WIDGET_HELPER_GLOBAL_INLINE boolean lives_label_set_mnemonic_widget(LiVESLabel *label, LiVESWidget *widget)
Definition: widget-helper.c:6086
get_dirname
void get_dirname(char *filename)
Definition: utils.c:3167
lives_rfx_t::params
lives_param_t * params
Definition: plugins.h:649
framedraw_connect_spinbutton
void framedraw_connect_spinbutton(lives_special_framedraw_rect_t *framedraw, lives_rfx_t *rfx)
connect spinbutton to preview
Definition: framedraw.c:152
lives_special_framedraw_rect_t::rfx
lives_rfx_t * rfx
Definition: paramspecial.h:16
prefs
_prefs * prefs
Definition: preferences.h:847
after_framedraw_widget_changed
void after_framedraw_widget_changed(LiVESWidget *widget, lives_special_framedraw_rect_t *framedraw)
callback for widgets
Definition: framedraw.c:1282
_merge_opts::align_start
boolean align_start
Definition: mainwindow.h:1830
invalidate_preview
void invalidate_preview(lives_special_framedraw_rect_t *frame_draw)
Definition: framedraw.c:42
set_rfx_param_by_name_string
boolean set_rfx_param_by_name_string(lives_rfx_t *rfx, const char *name, const char *value, boolean update_visual)
Definition: plugins.c:3124
lives_standard_lock_button_new
WIDGET_HELPER_GLOBAL_INLINE LiVESWidget * lives_standard_lock_button_new(boolean is_locked, int width, int height, const char *label, const char *tooltip)
Definition: widget-helper.c:10518
fd_tweak
void fd_tweak(lives_rfx_t *rfx)
Definition: paramspecial.c:159
lives_widget_set_no_show_all
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_set_no_show_all(LiVESWidget *widget, boolean set)
Definition: widget-helper.c:4868
mainwindow::framedraw_maskbox
LiVESWidget * framedraw_maskbox
box for opacity controls
Definition: mainwindow.h:1268
get_token_count
size_t get_token_count(const char *string, int delim)
Definition: utils.c:5430
lives_spin_button_get_snapval
WIDGET_HELPER_GLOBAL_INLINE double lives_spin_button_get_snapval(LiVESSpinButton *button, double val)
Definition: widget-helper.c:11553
add_fill_to_box
LiVESWidget * add_fill_to_box(LiVESBox *box)
Definition: widget-helper.c:12377
fx_dialog
_fx_dialog * fx_dialog[2]
Definition: mainwindow.h:1851
get_int_param
int get_int_param(void *value)
Definition: plugins.c:3079
lives_widget_is_sensitive
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_is_sensitive(LiVESWidget *widget)
Definition: widget-helper.c:4885
check_for_special
void check_for_special(lives_rfx_t *rfx, lives_param_t *param, LiVESBox *pbox)
Definition: paramspecial.c:298
FILESEL_TYPE_KEY
#define FILESEL_TYPE_KEY
Definition: widget-helper.h:1493
LIVES_PARAM_NUM
@ LIVES_PARAM_NUM
Definition: plugins.h:502
mergealign
lives_special_mergealign_t mergealign
Definition: paramspecial.h:100
lives_param_t::dp
int dp
decimals, 0 for int and bool
Definition: plugins.h:575
TRUE
#define TRUE
Definition: videoplugin.h:59
sizint
ssize_t sizint
type sizes
Definition: main.c:102
lives_param_t::edited
boolean edited
Definition: plugins.h:598
lives_special_aspect_t::lockbutton
LiVESWidget * lockbutton
Definition: paramspecial.h:34
lives_param_t::multi
short multi
multivalue type - single value, multi value, or per channel
Definition: plugins.h:585
LIVES_PARAM_SPECIAL_TYPE_SINGLEPOINT
@ LIVES_PARAM_SPECIAL_TYPE_SINGLEPOINT
type may be used in framedraw
Definition: plugins.h:524
mainwindow::fd_layer_orig
weed_plant_t * fd_layer_orig
original layer uneffected
Definition: mainwindow.h:1275
LIVES_PARAM_SPECIAL_TYPE_RECT_DEMASK
@ LIVES_PARAM_SPECIAL_TYPE_RECT_DEMASK
type may be used in framedraw
Definition: plugins.h:522
lives_rfx_t
Definition: plugins.h:625
lives_special_aspect_t
Definition: paramspecial.h:31
lives_param_t::max
double max
for string this is max characters
Definition: plugins.h:579
lives_widget_set_bg_color
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_set_bg_color(LiVESWidget *widget, LiVESWidgetState state, const LiVESWidgetColor *color)
Definition: widget-helper.c:2056
RFX_STATUS_WEED
@ RFX_STATUS_WEED
indicates an internal RFX, created from a weed instance
Definition: plugins.h:616
LIVES_PARAM_SPECIAL_TYPE_FILEREAD
@ LIVES_PARAM_SPECIAL_TYPE_FILEREAD
Definition: plugins.h:528
lives_widget_unparent
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_unparent(LiVESWidget *widget)
Definition: widget-helper.c:11295
callbacks.h
lives_toggle_button_get_active
WIDGET_HELPER_GLOBAL_INLINE boolean lives_toggle_button_get_active(LiVESToggleButton *button)
Definition: widget-helper.c:4472
lives_special_fontchooser_t::font_param
lives_param_t * font_param
Definition: paramspecial.h:43
lives_param_t
Definition: plugins.h:538
lives_special_mergealign_t::end_param
lives_param_t * end_param
Definition: paramspecial.h:53
reset_framedraw_preview
void reset_framedraw_preview(void)
Definition: paramspecial.c:27
lives_entry_set_visibility
WIDGET_HELPER_GLOBAL_INLINE boolean lives_entry_set_visibility(LiVESEntry *entry, boolean vis)
Definition: widget-helper.c:6176
lives_rfx_t::props
uint32_t props
Definition: plugins.h:633
lives_special_framedraw_rect_t::scale_param
lives_param_t * scale_param
Definition: paramspecial.h:21
lives_widget_object_ref
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_object_ref(livespointer object)
increase refcount by one
Definition: widget-helper.c:797
mainwindow::play_image
LiVESWidget * play_image
Definition: mainwindow.h:946
ASPECT_BUTTON_HEIGHT
#define ASPECT_BUTTON_HEIGHT
Definition: paramspecial.h:59
lives_spin_button_get_value
WIDGET_HELPER_GLOBAL_INLINE double lives_spin_button_get_value(LiVESSpinButton *button)
Definition: widget-helper.c:5083
lives_standard_file_button_new
WIDGET_HELPER_GLOBAL_INLINE LiVESWidget * lives_standard_file_button_new(boolean is_dir, const char *def_dir)
Definition: widget-helper.c:10470
HIDDEN_MULTI
#define HIDDEN_MULTI
Definition: plugins.h:552
lives_param_t::min
double min
Definition: plugins.h:578
lives_special_fontchooser_t
Definition: paramspecial.h:42
framedraw_redraw
weed_plant_t * framedraw_redraw(lives_special_framedraw_rect_t *framedraw, weed_layer_t *layer)
redraw when exposed/frame number changes
Definition: framedraw.c:423
CURRENT_CLIP_HAS_VIDEO
#define CURRENT_CLIP_HAS_VIDEO
Definition: main.h:815
lives_widget_get_parent
WIDGET_HELPER_GLOBAL_INLINE LiVESWidget * lives_widget_get_parent(LiVESWidget *widget)
Definition: widget-helper.c:4739
LIVES_PARAM_SPECIAL_TYPE_NONE
@ LIVES_PARAM_SPECIAL_TYPE_NONE
Definition: plugins.h:519
lives_special_framedraw_rect_t::xend_param
lives_param_t * xend_param
Definition: paramspecial.h:22
get_double_param
double get_double_param(void *value)
Definition: plugins.c:3086
LIVES_PARAM_SPECIAL_TYPE_PASSWORD
@ LIVES_PARAM_SPECIAL_TYPE_PASSWORD
Definition: plugins.h:530
mt_framedraw
LiVESPixbuf * mt_framedraw(lives_mt *mt, weed_layer_t *layer)
Definition: paramspecial.c:741
LIVES_PARAM_SPECIAL_TYPE_RECT_MULTIRECT
@ LIVES_PARAM_SPECIAL_TYPE_RECT_MULTIRECT
type may be used in framedraw
Definition: plugins.h:523
widget_opts_t::packing_height
int packing_height
vertical pixels between widgets
Definition: widget-helper.h:1411
add_to_special
void add_to_special(const char *sp_string, lives_rfx_t *rfx)
Definition: paramspecial.c:53
LIVES_PARAM_SPECIAL_TYPE_FONT_CHOOSER
@ LIVES_PARAM_SPECIAL_TYPE_FONT_CHOOSER
Definition: plugins.h:531
palette
_palette * palette
interface colour settings
Definition: main.c:101
lives_special_aspect_t::height_func
ulong height_func
Definition: paramspecial.h:36
lives_hbox_new
WIDGET_HELPER_GLOBAL_INLINE LiVESWidget * lives_hbox_new(boolean homogeneous, int spacing)
Definition: widget-helper.c:3253
lives_special_framedraw_rect_t
Definition: paramspecial.h:15
fd_connect_spinbutton
void fd_connect_spinbutton(lives_rfx_t *rfx)
Definition: paramspecial.c:174
clipboard
#define clipboard
Definition: main.h:1835
LIVES_PARAM_SPECIAL_TYPE_FILEWRITE
@ LIVES_PARAM_SPECIAL_TYPE_FILEWRITE
Definition: plugins.h:529
lives_special_mergealign_t::start_param
lives_param_t * start_param
Definition: paramspecial.h:52
mainwindow::framedraw_preview
LiVESWidget * framedraw_preview
the 'redraw' button
Definition: mainwindow.h:1265
after_param_text_changed
void after_param_text_changed(LiVESWidget *textwidget, lives_rfx_t *rfx)
Definition: paramwindow.c:2635
after_aspect_width_changed
void after_aspect_width_changed(LiVESSpinButton *spinbutton, livespointer user_data)
Definition: paramspecial.c:585
paramwindow.h
weed_layer_t
weed_plant_t weed_layer_t
Definition: colourspace.h:71
lives_special_aspect_t::width_param
lives_param_t * width_param
Definition: paramspecial.h:33
setmergealign
void setmergealign(void)
Definition: paramspecial.c:687
check_for_special_type
void check_for_special_type(lives_rfx_t *rfx, lives_param_t *param, LiVESBox *pbox)
Definition: paramspecial.c:228
is_perchannel_multi
boolean is_perchannel_multi(lives_rfx_t *rfx, int i)
Definition: paramspecial.c:765
lives_widget_set_show_hide_with
boolean lives_widget_set_show_hide_with(LiVESWidget *widget, LiVESWidget *other)
Definition: widget-helper.c:8902
lives_special_framedraw_rect_t::num_extra
int num_extra
Definition: paramspecial.h:27
mainwindow::framedraw
LiVESWidget * framedraw
for the framedraw special widget - TODO - use a sub-struct
Definition: mainwindow.h:1263
framedraw_connect
void framedraw_connect(lives_special_framedraw_rect_t *framedraw, int width, int height, lives_rfx_t *rfx)
activate the image for clicks and draws
Definition: framedraw.c:165
lives_param_t::hidden
uint32_t hidden
Definition: plugins.h:546
lives_widget_set_sensitive
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_set_sensitive(LiVESWidget *widget, boolean state)
Definition: widget-helper.c:1477
lives_special_fontchooser_t::nwidgets
int nwidgets
Definition: paramspecial.h:47
lives_special_aspect_t::no_reset
boolean no_reset
Definition: paramspecial.h:39
lives_param_t::name
char * name
Definition: plugins.h:540
mainwindow::multitrack
lives_mt * multitrack
holds a pointer to the entire multitrack environment; NULL in Clip Edit mode
Definition: mainwindow.h:1087
lives_special_framedraw_rect_t::xstart_param
lives_param_t * xstart_param
Definition: paramspecial.h:19
lives_box_reorder_child
WIDGET_HELPER_GLOBAL_INLINE boolean lives_box_reorder_child(LiVESBox *box, LiVESWidget *child, int pos)
Definition: widget-helper.c:3225
lives_widget_apply_theme
void lives_widget_apply_theme(LiVESWidget *widget, LiVESWidgetState state)
Definition: widget-helper.c:11156
lives_spin_button_update
WIDGET_HELPER_GLOBAL_INLINE boolean lives_spin_button_update(LiVESSpinButton *button)
Definition: widget-helper.c:5165
mainwindow::framedraw_spinbutton
LiVESWidget * framedraw_spinbutton
the frame number button
Definition: mainwindow.h:1266
RFX_PROPS_MAY_RESIZE
#define RFX_PROPS_MAY_RESIZE
is a tool
Definition: plugins.h:635
RFX_TEXT_MAGIC
#define RFX_TEXT_MAGIC
length at which entry turns into textview
Definition: paramwindow.h:16
PVAL_MULTI_PER_CHANNEL
#define PVAL_MULTI_PER_CHANNEL
Definition: plugins.h:588
main.h
ASPECT_BUTTON_WIDTH
#define ASPECT_BUTTON_WIDTH
Definition: paramspecial.h:58
resample.h
mainw
mainwindow * mainw
Definition: main.c:103
framedraw.h
lives_widget_is_visible
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_is_visible(LiVESWidget *widget)
Definition: widget-helper.c:4901
lives_special_aspect_t::ratio
double ratio
Definition: paramspecial.h:37
_merge_opts::spinbutton_loops
LiVESWidget * spinbutton_loops
Definition: mainwindow.h:1827
lives_entry_set_text
WIDGET_HELPER_GLOBAL_INLINE boolean lives_entry_set_text(LiVESEntry *entry, const char *text)
Definition: widget-helper.c:6211
lives_entry_set_editable
WIDGET_HELPER_GLOBAL_INLINE boolean lives_entry_set_editable(LiVESEntry *entry, boolean editable)
Definition: widget-helper.c:7422
mainwindow::fd_layer
weed_plant_t * fd_layer
framedraw preview layer
Definition: mainwindow.h:1276
lives_param_t::widgets
LiVESWidget * widgets[MAX_PARAM_WIDGETS]
TODO - change to LiVESWidget **widgets, terminated with a NULL.
Definition: plugins.h:594
mainwindow::framedraw_scale
LiVESWidget * framedraw_scale
the slider
Definition: mainwindow.h:1267
lives_widget_show_all
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_show_all(LiVESWidget *widget)
Definition: widget-helper.c:1523
weed_layer_free
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_free(weed_layer_t *layer)
frees pixel_data for a layer, then the layer itself
Definition: colourspace.c:13883
lives_special_framedraw_rect_t::type
lives_param_special_t type
Definition: paramspecial.h:18
widget_opts_t::font_name
char * font_name
readonly for now
Definition: widget-helper.h:1430
widget_opts
widget_opts_t widget_opts
Definition: widget-helper.h:1442
lives_entry_get_text
WIDGET_HELPER_GLOBAL_INLINE const char * lives_entry_get_text(LiVESEntry *entry)
Definition: widget-helper.c:6203
lives_param_t::value
void * value
current value(s)
Definition: plugins.h:576
PATH_MAX
#define PATH_MAX
Definition: main.h:255
widget_opts_t::expand
lives_expand_t expand
how much space to apply between widgets
Definition: widget-helper.h:1408
special_cleanup
boolean special_cleanup(boolean is_ok)
Definition: paramspecial.c:641
lives_signal_handler_unblock
WIDGET_HELPER_GLOBAL_INLINE boolean lives_signal_handler_unblock(livespointer instance, unsigned long handler_id)
Definition: widget-helper.c:947
lives_entry_set_max_length
WIDGET_HELPER_GLOBAL_INLINE boolean lives_entry_set_max_length(LiVESEntry *entry, int len)
Definition: widget-helper.c:6149
lives_standard_check_button_new
LiVESWidget * lives_standard_check_button_new(const char *labeltext, boolean active, LiVESBox *box, const char *tooltip)
Definition: widget-helper.c:9048
check_filewrite_overwrites
boolean check_filewrite_overwrites(void)
Definition: paramspecial.c:617
lives_special_fontchooser_t::size_param
lives_param_t * size_param
Definition: paramspecial.h:44
lives_special_aspect_t::width_func
ulong width_func
Definition: paramspecial.h:35
lives_param_t::change_blocked
boolean change_blocked
Definition: plugins.h:600
get_box_child_index
int get_box_child_index(LiVESBox *box, LiVESWidget *tchild)
Definition: widget-helper.c:11731
mainwindow::framedraw_reset
LiVESWidget * framedraw_reset
the 'redraw' button
Definition: mainwindow.h:1264
LIVES_PARAM_SPECIAL_TYPE_ASPECT_RATIO
@ LIVES_PARAM_SPECIAL_TYPE_ASPECT_RATIO
Definition: plugins.h:535
lives_signal_handler_block
WIDGET_HELPER_GLOBAL_INLINE boolean lives_signal_handler_block(livespointer instance, unsigned long handler_id)
Definition: widget-helper.c:933
lives_param_t::def
void * def
default values
Definition: plugins.h:581
FALSE
#define FALSE
Definition: videoplugin.h:60
init_special
void init_special(void)
Definition: paramspecial.c:30
check_file
boolean check_file(const char *file_name, boolean check_exists)
check if file exists
Definition: utils.c:4312
_
#define _(String)
Definition: support.h:44
lives_special_framedraw_rect_t::ystart_param
lives_param_t * ystart_param
Definition: paramspecial.h:20
lives_standard_font_chooser_new
WIDGET_HELPER_GLOBAL_INLINE LiVESWidget * lives_standard_font_chooser_new(void)
Definition: widget-helper.c:10081
lives_special_framedraw_rect_t::extra_params
int * extra_params
Definition: paramspecial.h:26
_merge_opts::loop_to_fit
boolean loop_to_fit
Definition: mainwindow.h:1829
lives_widget_show
WIDGET_HELPER_GLOBAL_INLINE boolean lives_widget_show(LiVESWidget *widget)
Definition: widget-helper.c:1505
paramspecial_get_aspect
const lives_special_aspect_t * paramspecial_get_aspect()
Definition: paramspecial.c:50
lives_box_pack_start
WIDGET_HELPER_GLOBAL_INLINE boolean lives_box_pack_start(LiVESBox *box, LiVESWidget *child, boolean expand, boolean fill, uint32_t padding)
Definition: widget-helper.c:3281