本文整理汇总了C++中create_dialog函数的典型用法代码示例。如果您正苦于以下问题:C++ create_dialog函数的具体用法?C++ create_dialog怎么用?C++ create_dialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_dialog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: get_all_widgets
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;
}
开发者ID:LebedevRI,项目名称:gimp,代码行数:33,代码来源:widgets.c
示例2: properties_show
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;
}
开发者ID:TVilaboa,项目名称:Proyecto-Parser-C,代码行数:34,代码来源:properties.c
示例3: create_dialog
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;
}
}
}
开发者ID:ForbiddenEra,项目名称:kx-audio-driver,代码行数:60,代码来源:defplugingui.cpp
示例4: create_dialog
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();
}
开发者ID:ForbiddenEra,项目名称:kx-audio-driver,代码行数:29,代码来源:timbre.cpp
示例5: menu_ttest2
/* 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);
}
开发者ID:jeffreyhorner,项目名称:cxxr,代码行数:26,代码来源:ttest.c
示例6: defaults_show
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;
}
开发者ID:TVilaboa,项目名称:Proyecto-Parser-C,代码行数:34,代码来源:defaults.c
示例7: menu_item_activate
/* ---------------------------------------------------------------------
* 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);
}
开发者ID:federeghe,项目名称:geany-plugins,代码行数:63,代码来源:goto_file.c
示例8: create_dialog
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;
}
开发者ID:miton,项目名称:taisei,代码行数:9,代码来源:stage3_events.c
示例9: about_dialog_show
void about_dialog_show(void)
{
GtkWidget *dialog;
dialog = create_dialog();
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
开发者ID:Offlein,项目名称:geany,代码行数:9,代码来源:about.c
示例10: markdelAction
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"");
}
开发者ID:Exim,项目名称:exim,代码行数:10,代码来源:em_menu.c
示例11: open_dialog
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;
}
开发者ID:ctubio,项目名称:claws,代码行数:10,代码来源:select-keys.c
示例12: on_connected
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();
}
开发者ID:zcbenz,项目名称:brasd,代码行数:10,代码来源:main.cpp
示例13: main
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;
}
开发者ID:rswarbrick,项目名称:brightside,代码行数:55,代码来源:brightside-properties.c
示例14: object_list_properties_show
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;
}
开发者ID:GNOME,项目名称:dia,代码行数:55,代码来源:properties-dialog.c
示例15: create_gimpressionist
gint
create_gimpressionist (void)
{
pcvals.run = FALSE;
create_dialog ();
gtk_main ();
return pcvals.run;
}
开发者ID:WilfR,项目名称:Gimp-Matting,代码行数:11,代码来源:gimpressionist.c
示例16: _pluma_cmd_search_replace
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);
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:54,代码来源:pluma-commands-search.c
示例17: dialog_open
int dialog_open()
{
if (gtk_failed) return(0);
dialog_window = create_dialog();
exit_dialog = 0;
set_from_settings(¤t_settings);
return(1);
}
开发者ID:bbidulock,项目名称:wmblob,代码行数:11,代码来源:dialog.c
示例18: create_dialog
/**
* @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);
}
开发者ID:MORTAL2000,项目名称:solarus-quest-editor,代码行数:32,代码来源:dialogs_model.cpp
示例19: create_dialog
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
}
开发者ID:ForbiddenEra,项目名称:kx-audio-driver,代码行数:12,代码来源:Cross_2nd.cpp
示例20: ap_gtk_start
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 ();
}
开发者ID:Javran,项目名称:purple-plugin-pack,代码行数:12,代码来源:gtk_away_msgs.c
注:本文中的create_dialog函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论