• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GTK_COMBO函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_COMBO函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_COMBO函数的具体用法?C++ GTK_COMBO怎么用?C++ GTK_COMBO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_COMBO函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: idle_do_action

/*
 * This action is the pressing of the button on the combo box.
 * The behavior is different depending on whether the list is being
 * displayed or removed.
 *
 * A button press event is simulated on the appropriate widget and 
 * a button release event is simulated in an idle function.
 */
static gboolean
idle_do_action (gpointer data)
{
  GtkCombo *combo;
  GtkWidget *action_widget;
  GtkWidget *widget;
  GailCombo *gail_combo;
  gboolean do_popup;
  GdkEvent tmp_event;

  gail_combo = GAIL_COMBO (data);
  gail_combo->action_idle_handler = 0;
  widget = GTK_ACCESSIBLE (gail_combo)->widget;
  if (widget == NULL /* State is defunct */ ||
      !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
    return FALSE;

  combo = GTK_COMBO (widget);

  do_popup = !gtk_widget_get_mapped (combo->popwin);

  tmp_event.button.type = GDK_BUTTON_PRESS; 
  tmp_event.button.window = widget->window;
  tmp_event.button.button = 1; 
  tmp_event.button.send_event = TRUE;
  tmp_event.button.time = GDK_CURRENT_TIME;
  tmp_event.button.axes = NULL;

  if (do_popup)
    {
      /* Pop up list */
      action_widget = combo->button;

      gtk_widget_event (action_widget, &tmp_event);

      /* FIXME !*/
      g_idle_add (_gail_combo_button_release, combo);
    }
    else
    {
      /* Pop down list */
      tmp_event.button.window = combo->list->window;
      gdk_window_set_user_data (combo->list->window, combo->button);
      action_widget = combo->popwin;
    
      gtk_widget_event (action_widget, &tmp_event);
      /* FIXME !*/
      g_idle_add (_gail_combo_popup_release, combo);
    }

  return FALSE;
}
开发者ID:Aridna,项目名称:gtk2,代码行数:60,代码来源:gailcombo.c


示例2: set_dsn_combos

static void
set_dsn_combos (GtkWidget * check, gpointer widget)
{
  GtkWidget **combos = (GtkWidget **) widget;
  ServerDSN *dsn = SERVER_DSN (check);
  if (dsn->dsn_info.dsns)
    {
      int inx;
      for (inx = 0; inx < 9; inx++)
	gtk_combo_set_popdown_strings (GTK_COMBO (combos[inx]),
	    dsn->dsn_info.dsns);
    }
}
开发者ID:openlink,项目名称:odbc-bench,代码行数:13,代码来源:TPCCTableProps.c


示例3: gtk_entry_get_text

/*
 * Get text of an Entry or a ComboBox
 */
static gchar *gtk_entry_get_text_1 (GtkWidget *widget)
{
	if (GTK_IS_COMBO(widget))
	{
		return gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(widget)->entry));
	}else if (GTK_IS_ENTRY(widget))
	{
		return gtk_entry_get_text(GTK_ENTRY(widget));
	}else
	{
		return NULL;
	}
}
开发者ID:Erikhht,项目名称:TCPMP,代码行数:16,代码来源:configure.c


示例4: g_signal_connect_after

void wxComboBox::EnableEvents()
{
#ifdef __WXGTK24__
    if (!gtk_check_version(2,4,0))
    {
        g_signal_connect_after (GTK_BIN(m_widget)->child, "changed",
                            G_CALLBACK (gtkcombobox_text_changed_callback), this);

        g_signal_connect_after (m_widget, "changed",
                            G_CALLBACK (gtkcombobox_changed_callback), this);
    }
    else
#endif
    {
        g_signal_connect_after (GTK_COMBO(m_widget)->list, "select-child",
                            G_CALLBACK (gtkcombo_combo_select_child_callback),
                            this);
        g_signal_connect_after (GTK_COMBO(m_widget)->entry, "changed",
                            G_CALLBACK (gtkcombo_text_changed_callback),
                            this );
    }
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:22,代码来源:combobox.cpp


示例5: gmdb_export_get_quotechar

char
gmdb_export_get_quotechar(GladeXML *xml)
{
	GtkWidget *combo;
	gchar *str;
	char quotechar;

	combo = glade_xml_get_widget(xml, "qchar_combo");
	str = (gchar *) gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry));
	quotechar = str[0];

	return quotechar;
}
开发者ID:ockham,项目名称:mdbtools,代码行数:13,代码来源:table_export.c


示例6: wxCHECK_RET

void wxComboBox::SetSelection( int n )
{
    wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );

    DisableEvents();

    GtkWidget *list = GTK_COMBO(m_widget)->list;
    gtk_list_unselect_item( GTK_LIST(list), m_prevSelection );
    gtk_list_select_item( GTK_LIST(list), n );
    m_prevSelection = n;

    EnableEvents();
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:13,代码来源:combobox.cpp


示例7: GTK_ENTRY

wxTextPos wxComboBox::GetLastPosition() const
{
    GtkEntry *entry = NULL;
#ifdef __WXGTK24__
    if (!gtk_check_version(2,4,0))
        entry = GTK_ENTRY( GTK_BIN(m_widget)->child );
    else
#endif
        entry = GTK_ENTRY( GTK_COMBO(m_widget)->entry );

    int pos = entry->text_length;
    return (long) pos-1;
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:13,代码来源:combobox.cpp


示例8: wxCHECK_MSG

int wxComboBox::FindString( const wxString &item, bool bCase ) const
{
    wxCHECK_MSG( m_widget != NULL, wxNOT_FOUND, wxT("invalid combobox") );

#ifdef __WXGTK24__
    if (!gtk_check_version(2,4,0))
    {
        GtkComboBox* combobox = GTK_COMBO_BOX( m_widget );
        GtkTreeModel* model = gtk_combo_box_get_model( combobox );
        GtkTreeIter iter;
        gtk_tree_model_get_iter_first( model, &iter );
        if (!gtk_list_store_iter_is_valid(GTK_LIST_STORE(model), &iter ))
            return -1;
        int count = 0;
        do
        {
            GValue value = { 0, };
            gtk_tree_model_get_value( model, &iter, 0, &value );
            wxString str = wxGTK_CONV_BACK( g_value_get_string( &value ) );
            g_value_unset( &value );

            if (item.IsSameAs( str, bCase ) )
                return count;

            count++;

        } while (gtk_tree_model_iter_next( model, &iter ));
    }
    else
#endif
    {
        GtkWidget *list = GTK_COMBO(m_widget)->list;

        GList *child = GTK_LIST(list)->children;
        int count = 0;
        while (child)
        {
            GtkBin *bin = GTK_BIN( child->data );
            GtkLabel *label = GTK_LABEL( bin->child );
            wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );

            if (item.IsSameAs( str , bCase ) )
                return count;

            count++;
            child = child->next;
        }
    }

    return wxNOT_FOUND;
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:51,代码来源:combobox.cpp


示例9: clip_GTK_COMBOSETPOPDOWNSTRINGS

int
clip_GTK_COMBOSETPOPDOWNSTRINGS(ClipMachine * ClipMachineMemory)
{
   C_widget *ccmb = _fetch_cw_arg(ClipMachineMemory);

   ClipArrVar *astr = (ClipArrVar *) _clip_vptr(_clip_spar(ClipMachineMemory, 2));

   GList    *str_list = NULL;

   ClipStrVar *s;

   int       i;

   CHECKCWID(ccmb, GTK_IS_COMBO);
   CHECKOPT(2, ARRAY_type_of_ClipVarType);

   for (i = 0; i < astr->count_of_ClipArrVar; i++)
    {
       if (astr->ClipVar_items_of_ClipArrVar[i].ClipType_t_of_ClipVar.ClipVartype_type_of_ClipType !=
	   CHARACTER_type_of_ClipVarType)
	  continue;
       s = (ClipStrVar *) _clip_vptr(&astr->ClipVar_items_of_ClipArrVar[i]);
       if (ccmb->objtype == GTK_WIDGET_COMBO_SIMPLE)
	  str_list = g_list_append(str_list, gtk_list_item_new_with_label(s->ClipBuf_str_of_ClipStrVar.buf_of_ClipBuf));
       else
	  str_list = g_list_append(str_list, s->ClipBuf_str_of_ClipStrVar.buf_of_ClipBuf);
    }
   if (ccmb->objtype == GTK_WIDGET_COMBO_SIMPLE)
    {
       gtk_list_clear_items(GTK_LIST(GTK_COMBO(ccmb->widget)->list), 0, -1);
       gtk_list_append_items(GTK_LIST(GTK_COMBO(ccmb->widget)->list), str_list);
    }
   else
      gtk_combo_set_popdown_strings(GTK_COMBO(ccmb->widget), str_list);
   return 0;
 err:
   return 1;
}
开发者ID:amery,项目名称:clip-angelo,代码行数:38,代码来源:combo.c


示例10: selectedAudioAttribIndex

static int
selectedAudioAttribIndex()
{
	int i, codec = selectedAudioCodecIndex();
	const char *selectedAttrib = gtk_entry_get_text( GTK_ENTRY(GTK_COMBO(g_VcrCompDialog.audioAttribCombo)->entry) );

	for (i = 0; i < VCRComp_numAudioCodecAttribs( codec ); i++)
	{
		if (!strcmp( selectedAttrib, VCRComp_audioCodecAttribName( codec, i ) ))
			return i;
	}

	return -1;
}
开发者ID:GPDP2,项目名称:mupen64,代码行数:14,代码来源:vcrcomp_dialog.c


示例11: wxCHECK_RET

void wxComboBox::Paste()
{
    wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );

    GtkEntry *entry = NULL;
#ifdef __WXGTK24__
    if (!gtk_check_version(2,4,0))
        entry = GTK_ENTRY( GTK_BIN(m_widget)->child );
    else
#endif
        entry = GTK_ENTRY( GTK_COMBO(m_widget)->entry );

    gtk_editable_paste_clipboard(GTK_EDITABLE(entry));
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:14,代码来源:combobox.cpp


示例12: read_rek

  void read_rek()
   {

    zap_zaktaxi.telef.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_TELEF]))));
    zap_zaktaxi.kodk.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_KODKL]))));
    zap_zaktaxi.fio.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_FIO]))));
    zap_zaktaxi.kolp.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_KOLIH_PAS]))));
    zap_zaktaxi.adreso.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_ADRES_POD]))));
    zap_zaktaxi.adresk.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_ADRES_POEZ]))));
    zap_zaktaxi.koment.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_KOMENT]))));
    zap_zaktaxi.suma.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_SUMA]))));
    zap_zaktaxi.datvz.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_DATA_ZAK]))));
    zap_zaktaxi.vremvz.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(entry[E_VREM_ZAK]))));


    zap_zaktaxi.kodzav.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(windowkodzav)->entry))));
    zap_zaktaxi.kv.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(windowvoditel)->entry))));


//   gtk_signal_emit_by_name(GTK_OBJECT(GTK_COMBO(windowkodzav)->entry),"activate");
//   gtk_signal_emit_by_name(GTK_OBJECT(GTK_COMBO(windowvoditel)->entry),"activate");

   }
开发者ID:zaharchuktv,项目名称:linuxbuh,代码行数:23,代码来源:lzaktaxiv.c


示例13: input_dialog_create

gchar *input_dialog_combo(const gchar *title, const gchar *message,
			  const gchar *default_string, GList *list,
			  gboolean case_sensitive)
{
	if (dialog)
		return NULL;

	input_dialog_create(INPUT_DIALOG_COMBO);

	if (!list) {
		GList empty_list;

		empty_list.data = (gpointer)"";
		empty_list.next = NULL;
		empty_list.prev = NULL;
		gtk_combo_set_popdown_strings(GTK_COMBO(combo), &empty_list);
	} else
		gtk_combo_set_popdown_strings(GTK_COMBO(combo), list);

	gtk_combo_set_case_sensitive(GTK_COMBO(combo), case_sensitive);

	return input_dialog_open(title, message, default_string);
}
开发者ID:jan0sch,项目名称:sylpheed,代码行数:23,代码来源:inputdialog.c


示例14: gnoclComboCmd

int gnoclComboCmd ( ClientData data, Tcl_Interp *interp,
					int objc, Tcl_Obj * const objv[] )
{
	ComboParams *para;
	int ret;

	if ( gnoclParseOptions ( interp, objc, objv, comboOptions )
			!= TCL_OK )
	{
		gnoclClearOptions ( comboOptions );
		return TCL_ERROR;
	}

	para = g_new ( ComboParams, 1 );

	para->interp = interp;
	para->combo = GTK_COMBO ( gtk_combo_new( ) );
	para->variable = NULL;
	para->onChanged = NULL;
	para->inSetVar = 0;

	ret = gnoclSetOptions ( interp, comboOptions,
							G_OBJECT ( para->combo ), -1 );

	if ( ret == TCL_OK )
		ret = configure ( interp, para, comboOptions );

	gnoclClearOptions ( comboOptions );

	if ( ret != TCL_OK )
	{
		g_free ( para );
		gtk_widget_destroy ( GTK_WIDGET ( para->combo ) );
		return TCL_ERROR;
	}

	para->name = gnoclGetAutoWidgetId();

	g_signal_connect ( G_OBJECT ( para->combo ), "destroy",
					   G_CALLBACK ( destroyFunc ), para );

	gnoclMemNameAndWidget ( para->name, GTK_WIDGET ( para->combo ) );
	gtk_widget_show ( GTK_WIDGET ( para->combo ) );

	Tcl_CreateObjCommand ( interp, para->name, comboFunc, para, NULL );

	Tcl_SetObjResult ( interp, Tcl_NewStringObj ( para->name, -1 ) );

	return TCL_OK;
}
开发者ID:zdia,项目名称:gnocl,代码行数:50,代码来源:combo.c


示例15: do_timer

gint do_timer(gpointer data)
{
	if (port_timeout && --port_timeout == 0) {
		open_serial_port(gtk_entry_get_text(GTK_ENTRY(port_entry)));
	}
	if (baud_timeout && --baud_timeout == 0) {
		change_baud(gtk_entry_get_text(GTK_ENTRY(
			GTK_COMBO(baud_combo)->entry)));
	}
	if (download_in_progress) {
		download_timer();
	}
	return TRUE;
}
开发者ID:awe00,项目名称:boards,代码行数:14,代码来源:gui.c


示例16: list_select_child

static void list_select_child(GtkList *list, GtkWidget *child, 
			      gpointer user_data)
{
     Combo *combo = COMBO(user_data);          
     int idx;
     if (updating_flag) return;
     idx = gtk_list_child_position(list,child);
     if (GTK_WIDGET_VISIBLE(GTK_COMBO(combo)->popwin)) {
	  combo->next_chosen_index = idx;
	  return;
     }
     combo->chosen_index = idx;
     gtk_signal_emit(GTK_OBJECT(combo),combo_signals[CHANGED_SIGNAL]);
}
开发者ID:magnush,项目名称:mhwaveedit,代码行数:14,代码来源:combo.c


示例17: selectedAudioCodecIndex

static int
selectedAudioCodecIndex()
{
	int i;
	const char *selectedCodec = gtk_entry_get_text( GTK_ENTRY(GTK_COMBO(g_VcrCompDialog.audioCodecCombo)->entry) );

	for (i = 0; i < VCRComp_numAudioCodecs(); i++)
	{
		if (!strcmp( selectedCodec, VCRComp_audioCodecName( i ) ))
			return i;
	}

	return -1;
}
开发者ID:GPDP2,项目名称:mupen64,代码行数:14,代码来源:vcrcomp_dialog.c


示例18: if

static void *main_thread(void *p)
{
   if (GTK_TOGGLE_BUTTON(dynam)->active == 1) dynacore = 1;
   else if (GTK_TOGGLE_BUTTON(pure_interp)->active == 1) dynacore = 2;
   else dynacore = 0;
   
   SDL_Init(SDL_INIT_VIDEO);
   SDL_SetVideoMode(10, 10, 16, 0);
   SDL_SetEventFilter(filter);
   SDL_ShowCursor(0);
   SDL_EnableKeyRepeat(0, 0);
   
   init_memory();
   plugin_load_plugins(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_gfx)->entry)),
		       gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_audio)->entry)),
		       gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_input)->entry)),
		       gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo_RSP)->entry)));
   romOpen_gfx();
   romOpen_audio();
   romOpen_input();
   go();
   romClosed_RSP();
   romClosed_input();
   romClosed_audio();
   romClosed_gfx();
   closeDLL_RSP();
   closeDLL_input();
   closeDLL_audio();
   closeDLL_gfx();
   free(rom);
   rom = NULL;
   free(ROM_HEADER);
   ROM_HEADER = NULL;
   free_memory();
   file_selection_launched = 0;
   return 0;
}
开发者ID:anta-,项目名称:mupen64-rr-lua-2,代码行数:37,代码来源:main_gtk.c


示例19: gmdb_sql_select_hist_cb

static void
gmdb_sql_select_hist_cb(GtkList *list, GladeXML *xml)
{
	gchar *buf;
	GtkTextBuffer *txtbuffer;
	GtkWidget *combo, *textview;

	combo = glade_xml_get_widget(xml, "sql_combo");
	if (!combo) return;
	buf = (gchar *) gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry));
	if (!buf) return;
	textview = glade_xml_get_widget(xml, "sql_textview");
	txtbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
	gtk_text_buffer_set_text(txtbuffer, buf, strlen(buf));
}
开发者ID:rfc2616,项目名称:mdbtools,代码行数:15,代码来源:sql.c


示例20: catch_sig

void		catch_sig(t_editor *editor)
{
  g_signal_connect(G_OBJECT(editor->pWindow),
		   "destroy", G_CALLBACK(catch_event), NULL);
  g_signal_connect(G_OBJECT(editor->pQuitBtn),
		   "clicked", G_CALLBACK(gtk_main_quit), NULL);
  g_signal_connect(G_OBJECT(editor->pHelpBtn),
		   "clicked", G_CALLBACK(create_help_win), editor);
  g_signal_connect(G_OBJECT(editor->pSaveBtn),
		   "clicked", G_CALLBACK(create_save_win), editor);
  g_signal_connect(G_OBJECT(editor->pAddBtn),
		   "clicked", G_CALLBACK(add_obj), editor);
  g_signal_connect(G_OBJECT(GTK_COMBO(editor->combo)->entry),
		   "changed", G_CALLBACK(grising_cases), editor);
}
开发者ID:mabm,项目名称:raytracer,代码行数:15,代码来源:editor_4.c



注:本文中的GTK_COMBO函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_COMBO_BOX函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_COLOR_SWATCH函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap