Exemplo n.º 1
0
Dialog *stage5_post_mid_dialog(void) {
	Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", NULL);
		
	dadd_msg(d, Left, "Hey! Stop!");
		
	return d;
}
Exemplo n.º 2
0
GList *
get_all_widgets (void)
{
  GList *retval = NULL;

  retval = g_list_append (retval, create_browser ());
  retval = g_list_append (retval, create_button ());
  retval = g_list_append (retval, create_chain_button ());
  retval = g_list_append (retval, create_color_area ());
  retval = g_list_append (retval, create_color_button ());
  retval = g_list_append (retval, create_color_hex_entry ());
  retval = g_list_append (retval, create_color_profile_combo_box ());
  retval = g_list_append (retval, create_color_scale ());
  retval = g_list_append (retval, create_color_selection ());
  retval = g_list_append (retval, create_dialog ());
  retval = g_list_append (retval, create_enum_combo_box ());
  retval = g_list_append (retval, create_enum_label ());
  retval = g_list_append (retval, create_file_entry ());
  retval = g_list_append (retval, create_frame ());
  retval = g_list_append (retval, create_hint_box ());
  retval = g_list_append (retval, create_int_combo_box ());
  retval = g_list_append (retval, create_memsize_entry ());
  retval = g_list_append (retval, create_number_pair_entry ());
  retval = g_list_append (retval, create_offset_area ());
  retval = g_list_append (retval, create_page_selector ());
  retval = g_list_append (retval, create_path_editor ());
  retval = g_list_append (retval, create_pick_button ());
  retval = g_list_append (retval, create_preview_area ());
  retval = g_list_append (retval, create_string_combo_box ());
  retval = g_list_append (retval, create_unit_menu ());

  return retval;
}
Exemplo n.º 3
0
void
properties_show(Diagram *dia, Object *obj)
{
  GtkWidget *properties;

  if (obj != NULL) 
    properties = obj->ops->get_properties(obj);

  if (dialog == NULL)
    create_dialog();

  if ((obj==NULL) || (properties == NULL)) { /* No properties or no object */
    properties = no_properties_dialog;
    obj = NULL;
    dia = NULL;
  }

  if (object_part != NULL) {
    gtk_widget_ref(object_part);
    gtk_container_remove(GTK_CONTAINER(dialog_vbox), object_part);
    gtk_widget_unparent(object_part);
    object_part = NULL;
    current_obj = NULL;
    current_dia = NULL;
  }
  gtk_signal_connect (GTK_OBJECT (properties), "destroy",
		      GTK_SIGNAL_FUNC(properties_dialog_destroyed), NULL);
  gtk_box_pack_start(GTK_BOX(dialog_vbox), properties, TRUE, TRUE, 0);
  gtk_widget_show (properties);
  gtk_widget_show (dialog);
  object_part = properties;
  current_obj = obj;
  current_dia = dia;
}
Exemplo n.º 4
0
void iPluginDlg::init()
{
	CKXPluginGUI::init();

	int cnt=plugin->get_param_count();

	#define SLIDER_HEIGHT		25
	#define SLIDER_WIDTH		250
	#define SLIDER_WIDTH_GAP	5
	#define SLIDER_HEIGHT_GAP	5
	#define MAX_HEIGHT		((SLIDER_HEIGHT+SLIDER_HEIGHT_GAP)*10)

	int x=10;
	int y=10;
	int max_y=y+SLIDER_HEIGHT_GAP+SLIDER_HEIGHT;
        int max_x=x+SLIDER_WIDTH_GAP+SLIDER_WIDTH;

        // re-calculate sizes
	for(int i=0;i<cnt;i++)
	{
	 if((i==cnt-1)) // last one?
	  break;

	 y+=SLIDER_HEIGHT+SLIDER_HEIGHT_GAP;
	 if(y>=MAX_HEIGHT)
	 {
	  y=10;
	  x+=SLIDER_WIDTH+SLIDER_WIDTH_GAP;
	 }
	 if(max_y<=y)
	  max_y=y+SLIDER_HEIGHT_GAP+SLIDER_HEIGHT;
	 if(max_x<=x)
	  max_x=x+SLIDER_WIDTH_GAP+SLIDER_WIDTH;
	}

	create_dialog(plugin->name, max_x+30, max_y+10);

	x=10; y=10;

	controls_enabled=1;

	for(int i=0;i<cnt;i++)
	{
	 kx_fxparam_descr descr;
	 plugin->describe_param(i,&descr);
	 create_hfader(faders[i], i, descr.name, 0, 0x7fffffff, x, y, SLIDER_WIDTH, 60, 7);

	 sync(i);

	 if((i==cnt-1)) // last one?
	  break;

	 y+=SLIDER_HEIGHT+SLIDER_HEIGHT_GAP;
	 if(y>=MAX_HEIGHT)
	 {
	  y=10;
	  x+=SLIDER_WIDTH+SLIDER_WIDTH_GAP;
	 }
	}
}
Exemplo n.º 5
0
void iTimbrePluginDlg::init()
{
	CKXPluginGUI::init();

	// custom dialog initialization here...
	// MAKEUP_DLG(Caption, Width, Height)
	create_dialog(plugin_name(timbre), 240, 220,-1,KXFX_NO_RESIZE);

	// SHOW_VFADER(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Height)
	
	create_vfader(fdrSetVol, SETVOL_ID, "Eq 100%", -120, -1, 5, 12, 60, 170);
	create_vfader(fdrBass, BASS_ID, " Bass"      , -120, 120, 60, 12, 50, 170);
	create_vfader(fdrTreble, TREBLE_ID, " Treble", -120, 120, 105, 12, 50, 170);
	create_vfader(fdrVol, VOL_ID, " Vol"         , -120, 0, 150, 12, 60, 170);
	
	fdrBass.slider.set_page_size(10);
	fdrTreble.slider.set_page_size(10);	
	fdrVol.slider.set_page_size(10);	
	fdrSetVol.slider.set_page_size(10);

	// SHOW_CHECKBOX(CheckBox, Ctrl_ID, Caption, Left, Top, Width)

	controls_enabled = TRUE;

	for (int i = 0; i < TIMBRE_PARAMS_COUNT; i++)
	 sync(i);

        redraw();
}
Exemplo n.º 6
0
/* assemble call as string in C code */
void menu_ttest2()
{
    char cmd[256];

    done = 0;
    create_dialog();
    setaction(bCancel, cancel2);
    show(win);
    for(;;) {
        R_WaitEvent();
        R_ProcessEvents();
        if(done > 0) break;
    }
    if(done == 1) {
        sprintf(cmd, "t.test(x=%s, y=%s, alternative=\"%s\",\n      paired=%s, var.equal=%s, conf.level=%s)\n", v[0], v[1],
                alts[getlistitem(alt)],
                ischecked(paired) ? "TRUE" : "FALSE",
                ischecked(varequal) ? "TRUE" : "FALSE",
                GA_gettext(lvl));
        Rconsolecmd(cmd);
    }
    hide(win);
    delobj(bApply);
    delobj(win);
}
Exemplo n.º 7
0
void
defaults_show(ObjectType *objtype)
{
  GtkWidget *defaults;

  if ((objtype != NULL) && (objtype->ops->get_defaults != NULL)) {
    defaults = objtype->ops->get_defaults();
  } else {
    defaults = NULL;
  }
  
  if (dialog == NULL)
    create_dialog();

  if ((objtype==NULL) || (defaults == NULL)) { 
    /* No defaults or no object */
    defaults = no_defaults_dialog;
    objtype = NULL;
  }

  if (object_part != NULL) {
    gtk_widget_ref(object_part);
    gtk_container_remove(GTK_CONTAINER(dialog_vbox), object_part);
    gtk_widget_unparent(object_part);
    object_part = NULL;
  }
  gtk_signal_connect (GTK_OBJECT (defaults), "destroy",
		      GTK_SIGNAL_FUNC(defaults_dialog_destroyed), NULL);
  gtk_box_pack_start(GTK_BOX(dialog_vbox), defaults, TRUE, TRUE, 0);
  gtk_widget_show (defaults);
  gtk_widget_show (dialog);
  object_part = defaults;
  current_objtype = objtype;
}
Exemplo n.º 8
0
/* ---------------------------------------------------------------------
 * Callback when the menu item is clicked.
 * ---------------------------------------------------------------------
 */
static void
menu_item_activate(guint key_id)
{
	GtkWidget* dialog;
	GtkWidget* dialog_new = NULL;
	GtkWidget* dialog_entry;
	GtkTreeModel* completion_list;
	GeanyDocument* current_doc = document_get_current();
	gchar *chosen_path;
	const gchar *chosen_file;
	gint response;

	log_func();

	if(current_doc == NULL || current_doc->file_name == NULL || current_doc->file_name[0] == '\0')
		return;
		
	/* Build current directory listing */
	directory_ref = g_path_get_dirname(current_doc->file_name);
	completion_list = build_file_list(directory_ref, "");

	/* Create the user dialog and get response */
	dialog_entry = create_dialog(&dialog, completion_list);
	response = gtk_dialog_run(GTK_DIALOG(dialog));

	/* Filename */
	chosen_file = gtk_entry_get_text(GTK_ENTRY(dialog_entry));
	/* Path + Filename */
	chosen_path = g_build_filename(directory_ref, chosen_file, NULL);

	if ( response == GTK_RESPONSE_ACCEPT )
	{
		log_debug("Trying to open: %s", chosen_path);
		if ( ! g_file_test(chosen_path, G_FILE_TEST_EXISTS) )
		{
			log_debug("File not found.");

			dialog_new = gtk_message_dialog_new(GTK_WINDOW(geany_data->main_widgets->window),
													GTK_DIALOG_MODAL,
													GTK_MESSAGE_QUESTION,
													GTK_BUTTONS_OK_CANCEL,
													_("%s not found, create it?"), chosen_file);
			gtk_window_set_title(GTK_WINDOW(dialog_new), "Geany");
			if(gtk_dialog_run(GTK_DIALOG(dialog_new)) == GTK_RESPONSE_OK)
			{
				document_new_file(chosen_path, current_doc->file_type, NULL);
				document_set_text_changed(document_get_current(), TRUE);
			}
			gtk_widget_destroy(dialog_new);
		}
		else
			document_open_file(chosen_path, FALSE, NULL, NULL);
	}

	/* Freeing memory */
	gtk_widget_destroy(dialog);
	g_free(directory_ref);
	g_object_unref (completion_list);
}
Exemplo n.º 9
0
Dialog *stage5_post_boss_dialog(void) {
	Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", NULL);
	
	dadd_msg(d, Left, "I can see the top!");
	dadd_msg(d, Left, "Hopefully climbing all those stairs\nwas worth it.");
		
	return d;
}
Exemplo n.º 10
0
Dialog *stage3_dialog() {
	Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
	
	dadd_msg(d, Left, "Ugh, it's like bugs being attracted by the light...");
	dadd_msg(d, Right, "That's right! The light makes us strong!");
	dadd_msg(d, Right, "This place is full of it, so feel my tremendous power!");
		
	return d;
}
Exemplo n.º 11
0
void about_dialog_show(void)
{
	GtkWidget *dialog;

	dialog = create_dialog();

	gtk_dialog_run(GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);
}
Exemplo n.º 12
0
Arquivo: em_menu.c Projeto: Exim/exim
static void markdelAction(Widget w, XtPointer client_data, XtPointer call_data)
{
w = w;      /* Keep picky compilers happy */
call_data = call_data;
Ustrncpy(actioned_message, client_data, 24);
actioned_message[23] = '\0';
action_required = US"-Mmd";
dialog_ref_widget = menushell;
create_dialog(US"Recipient address to mark delivered?", US"");
}
Exemplo n.º 13
0
static void
open_dialog (struct select_keys_s *sk)
{
    if (!sk->window)
        create_dialog (sk);
    manage_window_set_transient (GTK_WINDOW (sk->window));
    sk->okay = 0;
    sk->sort_column = N_COL_TITLES; /* use an invalid value */
    sk->sort_type = GTK_SORT_ASCENDING;
}
Exemplo n.º 14
0
static void on_connected() {
    create_dialog("BRAS is now successfully connected",
                  Gtk::MESSAGE_INFO,
                  Gtk::BUTTONS_NONE);

    cur_dlg->add_button(GTK_STOCK_DISCONNECT, Gtk::RESPONSE_DISCONNECT);
    cur_dlg->add_button(GTK_STOCK_CLOSE, Gtk::RESPONSE_CLOSE)->grab_focus();

    cur_dlg->show();
}
Exemplo n.º 15
0
int
main (int argc, char *argv[])
{
	GConfClient	*client;
	GConfChangeSet	*changeset;
	GladeXML	*dialog = NULL;
	GtkWidget	*dialog_win;
	
	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);

	gnome_program_init ("brightside-properties", VERSION,
			LIBGNOMEUI_MODULE, argc, argv,
			NULL);

	client = gconf_client_get_default ();
	gconf_client_add_dir (client, BRIGHTSIDE_KEY_ROOT,
			GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
	conf_client = client;

	changeset = gconf_change_set_new ();
	dialog = create_dialog ();
	setup_dialog (dialog, changeset);

	dialog_win = gtk_dialog_new_with_buttons(
			_("Screen Actions"), NULL, 
			GTK_DIALOG_NO_SEPARATOR,
			GTK_STOCK_HELP, GTK_RESPONSE_HELP,
			GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
			NULL);
	gtk_container_set_border_width (GTK_CONTAINER (dialog_win), 5);
	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG(dialog_win)->vbox), 2);
	gtk_dialog_set_default_response (GTK_DIALOG (dialog_win), 
			GTK_RESPONSE_CLOSE);
	g_signal_connect (G_OBJECT (dialog_win), "response", 
			(GCallback) dialog_button_clicked_cb, changeset);
	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_win)->vbox), 
			WID ("prefs_widget"), TRUE, TRUE, 0);
	gtk_window_set_resizable (GTK_WINDOW (dialog_win), FALSE);
	gtk_window_set_icon_from_file (GTK_WINDOW (dialog_win), 
			BRIGHTSIDE_DATA "brightside.svg", NULL);
	gtk_widget_show_all (dialog_win);
	
	if (is_running () == FALSE)
		g_spawn_command_line_async ("brightside", NULL);
	
	gtk_main ();

	gconf_change_set_unref (changeset);

	g_object_unref (dialog);

	return 0;
}
Exemplo n.º 16
0
void
object_list_properties_show(Diagram *dia, GList *objects)
{
  GtkWidget *properties;
  DiaObject *one_obj;
  GtkWidget *parent = ddisplay_active() ? ddisplay_active()->shell : NULL;
  if (!dialog)
      create_dialog(parent);
  clear_dialog_globals();

  if (!objects) {
    /* Hide dialog when no object is selected */
    properties_dialog_hide();
    return;
  }

  /* Prefer object-specific UI when only one object is selected. */
  one_obj = (g_list_length(objects) == 1) ? objects->data : NULL;
  if (one_obj)
    properties = one_obj->ops->get_properties(one_obj, FALSE);
  else
    properties = object_list_create_props_dialog(objects, FALSE);
  if (properties == NULL) {
    properties = no_properties_dialog;
  }

  if (one_obj) {
    DiaObjectType *otype = one_obj->type;
    gchar *buf;

    buf = g_strconcat(_("Properties: "), _(otype->name), NULL);
    gtk_window_set_title(GTK_WINDOW(dialog), buf);
    g_free(buf);
  } else {
    gtk_window_set_title(GTK_WINDOW(dialog), _("Object properties:"));
  }

  g_signal_connect (G_OBJECT (properties), "destroy",
		  G_CALLBACK(properties_part_destroyed), NULL);
  gtk_box_pack_start(GTK_BOX(dialog_vbox), properties, TRUE, TRUE, 0);

  gtk_widget_show (properties);

  properties_give_focus(properties, NULL);

  /* resize to minimum */
  /* if (obj != current_obj) */
  gtk_window_resize (GTK_WINDOW(dialog), 1, 1);
  if (parent)
    gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW (parent));
  gtk_window_present (GTK_WINDOW (dialog));
  object_part = properties;
  current_objects = g_list_copy(objects);
  current_dia = dia;
}
Exemplo n.º 17
0
gint
create_gimpressionist (void)
{
  pcvals.run = FALSE;

  create_dialog ();

  gtk_main ();

  return pcvals.run;
}
void
_pluma_cmd_search_replace (GtkAction   *action,
			   PlumaWindow *window)
{
	gpointer data;
	GtkWidget *replace_dialog;
	PlumaDocument *doc;
	gboolean selection_exists;
	gchar *find_text = NULL;
	gint sel_len;

	pluma_debug (DEBUG_COMMANDS);

	data = g_object_get_data (G_OBJECT (window), PLUMA_SEARCH_DIALOG_KEY);

	if (data == NULL)
	{
		replace_dialog = create_dialog (window, TRUE);
	}
	else
	{
		g_return_if_fail (PLUMA_IS_SEARCH_DIALOG (data));
		
		replace_dialog = GTK_WIDGET (data);
		
		/* turn the dialog into a find dialog if needed */
		if (!pluma_search_dialog_get_show_replace (PLUMA_SEARCH_DIALOG (replace_dialog)))
			pluma_search_dialog_set_show_replace (PLUMA_SEARCH_DIALOG (replace_dialog),
							      TRUE);
	}

	doc = pluma_window_get_active_document (window);
	g_return_if_fail (doc != NULL);

	selection_exists = get_selected_text (GTK_TEXT_BUFFER (doc),
					      &find_text,
					      &sel_len);

	if (selection_exists && find_text != NULL && sel_len < 80)
	{
		pluma_search_dialog_set_search_text (PLUMA_SEARCH_DIALOG (replace_dialog),
						     find_text);
		g_free (find_text);
	}
	else
	{
		g_free (find_text);
	}

	gtk_widget_show (replace_dialog);
	last_search_data_restore_position (PLUMA_SEARCH_DIALOG (replace_dialog));
	pluma_search_dialog_present_with_time (PLUMA_SEARCH_DIALOG (replace_dialog),
					       GDK_CURRENT_TIME);
}
Exemplo n.º 19
0
int dialog_open()
{
	if (gtk_failed) return(0);

	dialog_window = create_dialog();
	exit_dialog = 0;

	set_from_settings(&current_settings);

	return(1);
}
/**
 * @brief Creates a new dialog.
 *
 * The index of the selection may change, since dialog are sorted
 * alphabetically.
 * Emits rowsAboutToBeInserted(), adds the new dialog
 * and then emits rowsInserted(), as required by QAbstractItemModel.
 *
 * Then, emits dialog_created().
 *
 * The newly created dialog is not initially selected.
 * The existing selection is preserved, though the index of many
 * dialogs can change.
 * The selection is cleared before the operations and restored after,
 * updated with the new index.
 *
 * @param id Id of the dialog to create.
 * @param text Text value of the dialog to create.
 * @param properties Properties of the dialog to create.
 * @throws EditorException in case of error.
 */
void DialogsModel::create_dialog(
    const QString &id, const QString &text,
    const QMap<QString, QString>& properties) {

  DialogData data;
  data.set_text(text.toStdString());
  for (QString key : properties.keys()) {
    data.set_property(key.toStdString(), properties.value(key).toStdString());
  }
  create_dialog(id, data);
}
Exemplo n.º 21
0
Dialog *stage5_boss_dialog(void) {
	Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
	
	dadd_msg(d, Left, "Finally!");
	dadd_msg(d, Right, "Stop following me!");
	dadd_msg(d, Left, "Why? You aren't involved in this, are you?");
	dadd_msg(d, Right, "I don't have time for your suspicions now.");
	dadd_msg(d, Left, "Sounds very suspicious, actually.");
	dadd_msg(d, Right, "Ok, let's finish this quickly.");	
		
	return d;
}
Exemplo n.º 22
0
void iCross_2_PluginDlg::init()
{	CKXPluginGUI::init(); // this is necessary
	// custom dialog initialization here...
	// (title, Width, Height)
	create_dialog(plugin_name(Crossover_2), 350, 100);
    // you can add any label; the ID should be >PARAM_COUNT
    create_label(label,CROSS_2_PARAMS_COUNT+1,"Crossover freqency: 600 Hz",10,15,320);
	// create_hfader(	Fader,	Ctrl_ID,	Label,			MinVal,		MaxVal,	Left,	Top,	Width,	Label_Width) 
	create_hslider(		freq_1,	FREQ_ID,	"Frequency",	__LowerFreq_Cr2,			__UpperFreq_Cr2,	10,		35,		340,	30);
	controls_enabled = TRUE; // enable updating GUI when the parameters are changed
	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}
Exemplo n.º 23
0
void ap_gtk_start () {
  progress_bars = g_hash_table_new (NULL, NULL);
        
  // Message queueing 
  queue_pref_cb = purple_prefs_connect_callback (
    ap_get_plugin_handle (), 
    "/plugins/gtk/autoprofile/queue_messages_when_away", queue_cb, NULL);

  // Create window
  create_dialog ();
  update_summary_visibility ();
}
int
main (int argc, char **argv)
{
  bindtextdomain (PACKAGE, LOCALEDIR);
  bind_textdomain_codeset (PACKAGE, "UTF-8");
  textdomain (PACKAGE);

  gtk_init (&argc, &argv);

  if (g_file_test ("gksu-properties.glade", G_FILE_TEST_EXISTS) == TRUE)
    {
      gui = glade_xml_new ("gksu-properties.glade", NULL, NULL);
    }
  else if (g_file_test (PREFIX "/share/" PACKAGE "/gksu-properties.glade",
			G_FILE_TEST_EXISTS) == TRUE)
    {
      gui = glade_xml_new (PREFIX "/share/" PACKAGE "/gksu-properties.glade", NULL,
			   NULL);
    }

  if (!gui) {
    GtkWidget *dialog;

    dialog = gtk_message_dialog_new (NULL,
				     0,
				     GTK_MESSAGE_ERROR,
				     GTK_BUTTONS_CLOSE,
				     _("Failed to load glade file; please check your installation."));

    gtk_dialog_run (GTK_DIALOG (dialog));
    gtk_widget_destroy (dialog);

    return 1;
  }

  glade_xml_signal_autoconnect (gui);

  gconf_client = gconf_client_get_default ();

  update_from_gconf ();
  create_dialog ();
  setup_notifications ();

  if (main_window)
    gtk_main ();

  g_object_unref (gconf_client);

  return 0;
}
Exemplo n.º 25
0
Arquivo: em_menu.c Projeto: Exim/exim
static void editsenderAction(Widget w, XtPointer client_data,
  XtPointer call_data)
{
queue_item *q;
uschar *sender;
w = w;      /* Keep picky compilers happy */
call_data = call_data;
Ustrncpy(actioned_message, client_data, 24);
actioned_message[23] = '\0';
q = find_queue(actioned_message, queue_noop, 0);
sender = !q ? US"" : q->sender[0] == 0 ? US"<>" : q->sender;
action_required = US"-Mes";
dialog_ref_widget = menushell;
create_dialog(US"New sender address?", sender);
}
Exemplo n.º 26
0
void iWavegen2PluginDlg::init()
{
	CKXPluginGUI::init();
	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight = 25)
	create_dialog(plugin_name(wavegen2), 300, 100);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(level		, LEVEL_ID		, "Level (dB):"		,-600,0   , 7, 12, 275, 110);
	create_hfader(frecuency , FRECUENCY_ID	, "Frecuency (Hz):"	,0,20000, 7, 48, 275, 110);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
Exemplo n.º 27
0
void iEQ_HighpassPluginDlg::init()
{
	CKXPluginGUI::init();
	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight = 25)
	create_dialog(plugin_name(EQ_Highpass), 420, 100);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(freq, FREQ_ID, "Freq.(Hz):",20,19980, 7, 12, 393, 75);
	create_hfader(band, BAND_ID, "Width (Q):",1, 2000, 7, 48, 393, 75);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
Exemplo n.º 28
0
void iGainPluginDlg::init()
{
	CKXPluginGUI::init();

	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight)
	create_dialog(plugin_name(gain), 380, 45); //w=275

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(fdrGain, GAIN_ID, "Gain:",1,0x7fffffff, 5, 10, 350, 50,12);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
/**
 * @brief Duplicates dialog(s).
 * @param id Id of the dialog to duplicate.
 * @param new_id Id of the duplicate dialog.
 * @throws EditorException in case of error.
 */
void DialogsModel::duplicate_dialogs(
  const QString& prefix, const QString& new_prefix) {

  // Check if dialogs can be duplicated.
  QString id;
  if (!can_duplicate_dialogs(prefix, new_prefix, id)) {
    throw EditorException(tr("Dialog '%1' already exists").arg(id));
  }

  // Duplicate dialogs.
  for (QString id : get_ids(prefix)) {
    const auto& data = get_dialog_data(id);
    id.replace(QRegExp(QString("^") + prefix), new_prefix);
    create_dialog(id, data);
  }
}
Exemplo n.º 30
0
void iPitchPluginDlg::init()
{
	CKXPluginGUI::init(); // this is necessary

	// custom dialog initialization here...
	// (title, Width, Height)
	create_dialog(plugin_name(pitch), 350, 85);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	
	create_hfader(fdrLevel, LEVEL_ID, "Level (%):",0,100, 7, 12, 283, 110);
	create_hfader(fdrPitch, PITCH_ID, "Pitch (semitones):",-1250,1250, 7, 48, 283, 110);

	controls_enabled = 1; // enable updating GUI when the parameters are changed

	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}