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

C++ GTK_TOGGLE_TOOL_BUTTON函数代码示例

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

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



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

示例1: on_view_offsets

NOT IMPLEMENTED YET

/* callback to show and hide the offsets columns pane */
G_MODULE_EXPORT void 
on_view_offsets (GtkObject *object, gpointer user_data)
{
  /* NOT YET TESTED */
     GtkWidget *offsets_w, *menu_w, *btn_w;

     offsets_w = get_widget("inst_list");
     menu_w = get_widget("m_view_metrics");
     btn_w = get_widget("view_metrics_btn");

     g_print("on_view_offsets\n");

     g_signal_handlers_block_by_func(G_OBJECT(object), 
				     G_CALLBACK(on_view_offsets), NULL);

     if (GTK_WIDGET_VISIBLE(offsets_w)) {
	  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_w), FALSE);
	  gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(btn_w),
					    FALSE);
  	  gtk_widget_hide(offsets_w);
     } else {
	  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_w), TRUE);
	  gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(btn_w),
					    TRUE);
	  gtk_widget_show(offsets_w);
     }

     g_signal_handlers_unblock_by_func(G_OBJECT(object), 
				       G_CALLBACK(on_view_offsets), NULL);
}
开发者ID:SystemGarden,项目名称:habitat,代码行数:33,代码来源:callbacks.c


示例2: XOJ_CHECK_TYPE_OBJ

void AbstractToolItem::toolButtonCallback(GtkToolButton* toolbutton, AbstractToolItem* item)
{
	XOJ_CHECK_TYPE_OBJ(item, AbstractToolItem);

	if (toolbutton && GTK_IS_TOGGLE_TOOL_BUTTON(toolbutton))
	{
		bool selected = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(toolbutton));

		// ignore this event... GTK Broadcast to much events, e.g. if you call set_active
		if (item->toolToggleButtonActive == selected)
		{
			return;
		}

		// don't allow deselect this button
		if (item->toolToggleOnlyEnable && selected == false)
		{
			gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(toolbutton), true);
			return;
		}

		item->toolToggleButtonActive = selected;
	}

	item->activated(NULL, NULL, toolbutton);
}
开发者ID:xournalpp,项目名称:xournalpp,代码行数:26,代码来源:AbstractToolItem.cpp


示例3: XOJ_CHECK_TYPE

void ToolDrawCombocontrol::selected(ActionGroup group, ActionType action)
{
	XOJ_CHECK_TYPE(ToolDrawCombocontrol);

	if (!this->item)
	{
		return;
	}

	if (!GTK_IS_TOGGLE_TOOL_BUTTON(this->item))
	{
		g_warning("ToolDrawCombocontrol: selected action %i which is not a toggle action!", action);
		return;
	}

	string description;

	for (ToolDrawType* t : drawTypes)
	{
		if (action == t->type && this->action != t->type)
		{
			this->action = t->type;
			gtk_image_set_from_icon_name(GTK_IMAGE(iconWidget), t->icon.c_str(), GTK_ICON_SIZE_SMALL_TOOLBAR);
			description = t->name;
			break;
		}
	}

	gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(item), description.c_str());
	if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(this->item)) != (this->action == action))
	{
		this->toolToggleButtonActive = (this->action == action);
		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(this->item), this->toolToggleButtonActive);
	}
}
开发者ID:xournalpp,项目名称:xournalpp,代码行数:35,代码来源:ToolDrawCombocontrol.cpp


示例4: XOJ_CHECK_TYPE

void ColorToolItem::enableColor(int color) {
	XOJ_CHECK_TYPE(ColorToolItem);

	if (isSelector()) {
		selectcolor_set_color(this->iconWidget, color);
		this->color = color;
		if (GTK_IS_TOGGLE_BUTTON(this->item)) {
			gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(this->item), false);
		}
	} else {
		bool active = colorEqualsMoreOreLess(color);

		if (this->item) {
			gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(this->item), active);
		}

		if (active) {
			this->toolHandler->setColorFound();

			// Only equals more ore less, so we will set it exact to the default color
			if (this->color != color) {
				this->toolHandler->setColor(this->color);
			}

		}
	}
}
开发者ID:wbrenna,项目名称:xournalpp,代码行数:27,代码来源:ColorToolItem.cpp


示例5: SetSelectMode

void CMatchingDlg::OnButtonClicked(GtkWidget *pBtn)
{
	if (!m_Updating) {
		m_Updating = true;
		if (pBtn==m_FrameBtn) {
			if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_FrameBtn))) {
				SetSelectMode(REFERENCE_FRAME);
				UpdatePreview(true);
				UpdateControls();
			}
		} else if (pBtn==m_CatalogBtn) {
			if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_CatalogBtn))) {
				SetSelectMode(CATALOG_FILE);
				UpdatePreview(true);
				UpdateControls();
			}
		} else if (pBtn==GTK_WIDGET(m_ShowChart)) {
			if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(m_ShowChart))) {
				SetDisplayMode(DISPLAY_CHART);
				UpdatePreview(true);
				UpdateControls();
			}
		} else if (pBtn==GTK_WIDGET(m_ShowImage)) {
			if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(m_ShowImage))) {
				SetDisplayMode(DISPLAY_IMAGE);
				UpdatePreview(true);
				UpdateControls();
			}
		} else if (pBtn==m_PathBtn) 
			ChangeCatalogPath();
		else if (pBtn==m_OptionsBtn)
			EditPreferences();
		m_Updating = false;
	}
}
开发者ID:mvancompernolle,项目名称:ai_project,代码行数:35,代码来源:matching_dlg.cpp


示例6: switch

void CMatchingDlg::SetSelectMode(tSelectMode mode)
{
	m_SelectMode = mode;
	switch (mode)
	{
	case REFERENCE_FRAME:
		gtk_label_set_markup(GTK_LABEL(m_SelLabel), "<b>Select a reference frame</b>");
		gtk_widget_hide(m_CatalogBox);
		gtk_widget_hide(m_PathLabel);
		gtk_widget_hide(m_PathEntry);
		gtk_widget_hide(m_PathBtn);
		gtk_widget_show(m_FrameBox);
		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(m_ShowChart), 
			m_DMFrame == DISPLAY_CHART);
		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(m_ShowImage), 
			m_DMFrame == DISPLAY_IMAGE);
		break;

	case CATALOG_FILE:
		gtk_label_set_markup(GTK_LABEL(m_SelLabel), "<b>Select a catalog file</b>");
		gtk_widget_hide(m_FrameBox);
		gtk_widget_show(m_PathLabel);
		gtk_widget_show(m_PathEntry);
		gtk_widget_show(m_PathBtn);
		gtk_widget_show(m_CatalogBox);
		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(m_ShowChart), 
			m_DMCatalog == DISPLAY_CHART);
		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(m_ShowImage), 
			m_DMCatalog == DISPLAY_IMAGE);
		break;
	}
}
开发者ID:mvancompernolle,项目名称:ai_project,代码行数:32,代码来源:matching_dlg.cpp


示例7: library_view_adjust_aspect_buttons

static void library_view_adjust_aspect_buttons(library_view_t* view, aspect_enum aspect)
{
  GtkToggleToolButton* g_btn = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(view->builder, "tbtn_genres"));
  GtkToggleToolButton* ar_btn = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(view->builder, "tbtn_artists"));
  GtkToggleToolButton* al_btn = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(view->builder, "tbtn_albums"));

  switch (aspect) {
    case GENRE_ASPECT: {
        SET_TOGGLE(ar_btn, FALSE);
        SET_TOGGLE(al_btn, FALSE);
        SET_TOGGLE(g_btn, TRUE);
    }
    break;
    case ARTIST_ASPECT: {
        SET_TOGGLE(ar_btn, TRUE);
        SET_TOGGLE(al_btn, FALSE);
        SET_TOGGLE(g_btn, FALSE);
    }
    break;
    case ALBUM_ASPECT: {
        SET_TOGGLE(ar_btn, FALSE);
        SET_TOGGLE(al_btn, TRUE);
        SET_TOGGLE(g_btn, FALSE);
    }
    break;
    default:
    break;
  }
}
开发者ID:hdijkema,项目名称:BackToBasics,代码行数:29,代码来源:library_view.c


示例8: on_view_choices

/* callback to show and hide the choice pane */
G_MODULE_EXPORT void 
on_view_choices (GtkObject *object, gpointer user_data)
{
     GtkWidget *scroll_w, *menu_w, *btn_w;

     scroll_w = get_widget("choice_scrollwin");
     menu_w = get_widget("m_view_choices");
     btn_w = get_widget("view_choice_btn");

     g_signal_handlers_block_by_func(G_OBJECT(object), 
				     G_CALLBACK(on_view_choices), NULL);

     if (GTK_WIDGET_VISIBLE(scroll_w)) {
	  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_w), FALSE);
	  gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(btn_w),
					    FALSE);
  	  gtk_widget_hide(scroll_w);
     } else {
	  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_w), TRUE);
	  gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(btn_w),
					    TRUE);
	  gtk_widget_show(scroll_w);
     }

     g_signal_handlers_unblock_by_func(G_OBJECT(object), 
				       G_CALLBACK(on_view_choices), NULL);
}
开发者ID:SystemGarden,项目名称:habitat,代码行数:28,代码来源:callbacks.c


示例9: enableInterpolationButtonSignals

		void CTopographicMap3DView::init()
		{
			//reflect default interpolation type
			m_rTopographicMapDatabase.setInterpolationType(m_ui64CurrentInterpolation);
			enableInterpolationButtonSignals(false);
			gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(m_pMapPotentials), m_ui64CurrentInterpolation == OVP_TypeId_SphericalLinearInterpolationType_Spline);
			gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(m_pMapCurrents), m_ui64CurrentInterpolation == OVP_TypeId_SphericalLinearInterpolationType_Laplacian);
			enableInterpolationButtonSignals(true);
		}
开发者ID:pborky,项目名称:openvibe,代码行数:9,代码来源:ovpCTopographicMap3DView.cpp


示例10: ui_callback_on_enable_filters

gboolean ui_callback_on_enable_filters(GtkWidget *widget, gpointer data)
{
    gboolean enabled;

    enabled = gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON(ui_main_data.filters_enabled));
    gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON(ui_main_data.filters_enabled), !enabled);

    return TRUE;
}
开发者ID:2fumin,项目名称:EPC-openAir4G,代码行数:9,代码来源:ui_callbacks.c


示例11: XOJ_CHECK_TYPE_OBJ

void Sidebar::buttonClicked(GtkToolButton * toolbutton, SidebarPageButton * buttonData) {
	XOJ_CHECK_TYPE_OBJ(buttonData->sidebar, Sidebar);

	if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(toolbutton))) {
		if (buttonData->sidebar->visiblePage != buttonData->page->getWidget()) {
			buttonData->sidebar->setSelectedPage(buttonData->index);
		}
	} else if (buttonData->sidebar->visiblePage == buttonData->page->getWidget()) {
		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(toolbutton), true);
	}
}
开发者ID:yolanother,项目名称:Xournal,代码行数:11,代码来源:Sidebar.cpp


示例12: UI_setAProcessToggleStatus

/**
	Set/unset the toggle button audio process
*/
void UI_setAProcessToggleStatus( uint8_t status )
{
gint b;
	 if(status) b=TRUE;
  	else			b=FALSE;

	if(b!=gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(guiAudioToggle)))
     		gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON(guiAudioToggle),b);
	aprintf("++ audio toggle : %d(%d)\n",b,status);

}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:14,代码来源:GUI_bindings.cpp


示例13: Interface_iniciar

void Interface_iniciar() {
  GtkWidget *window;
  GdkGLConfig *glconfig;

  gtk_init(NULL, NULL);
  gtk_gl_init(NULL, NULL);


  GtkBuilder *builderPrincipal=Interface_carregarXML(INTERFACE_PRINCIPAL);
  window = GTK_WIDGET(gtk_builder_get_object (builderPrincipal, "window"));
  drawOpengl=GTK_WIDGET(gtk_builder_get_object(builderPrincipal, "drawOpengl"));
  frameProgresso=GTK_WIDGET(gtk_builder_get_object(builderPrincipal, "frameProgresso"));
  progress=GTK_PROGRESS_BAR(gtk_builder_get_object(builderPrincipal, "progressbar"));
  labelPosicaoXY=GTK_LABEL(gtk_builder_get_object(builderPrincipal, "labelPosicaoXY"));
  ajustScrollHorizGL=GTK_ADJUSTMENT(gtk_builder_get_object(builderPrincipal, "ajustScrollHorizGL"));
  ajustScrollVertGL=GTK_ADJUSTMENT(gtk_builder_get_object(builderPrincipal, "ajustScrollVertGL"));
  adjustAlpha=GTK_ADJUSTMENT(gtk_builder_get_object(builderPrincipal, "adjustAlpha"));
  tbAddEntidade=GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builderPrincipal, "tbAddEntidade"));
  tbAddImagem=GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builderPrincipal, "tbAddImagem"));
  tbAddTexto=GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builderPrincipal, "tbAddTexto"));
  tbAmpliar=GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builderPrincipal, "tbAmpliar"));
  tbReduzir=GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builderPrincipal, "tbReduzir"));
  frameFerramentas=GTK_WIDGET(gtk_builder_get_object(builderPrincipal, "frameFerramentas"));

  /*gtk_adjustment_set_value(GTK_ADJUSTMENT(gtk_builder_get_object(builderPrincipal, "ajustScrollHorizGL")),500);
  gtk_adjustment_set_value(GTK_ADJUSTMENT(gtk_builder_get_object(builderPrincipal, "ajustScrollVertGL")),500);*/

  //Configura widget para opengl
  glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB    |
                                        GDK_GL_MODE_DEPTH  |
                                        GDK_GL_MODE_DOUBLE);

  if (!glconfig) {
      g_print ("*** Cannot find the double-buffered visual.\n");
      g_print ("*** Trying single-buffered visual.\n");

      /* Try single-buffered visual */
      glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB  | GDK_GL_MODE_DEPTH);
      if (!glconfig) {
          g_print ("*** No appropriate OpenGL-capable visual found.\n");
          g_assert_not_reached();
        }
    }

  if (!gtk_widget_set_gl_capability(drawOpengl, glconfig, NULL, TRUE, GDK_GL_RGBA_TYPE))
    g_assert_not_reached();

  gtk_builder_connect_signals(builderPrincipal, NULL);
  gtk_widget_show(window);

  g_object_unref(G_OBJECT(builderPrincipal));
}
开发者ID:laburb,项目名称:Morphometrics,代码行数:52,代码来源:interface.c


示例14: UI_setVProcessToggleStatus

/*
	Set/unset the toggle button video process
*/
void UI_setVProcessToggleStatus( uint8_t status )
{
gint b;
	 if(status) 		b=TRUE;
  	else			b=FALSE;
	if(b!=gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(guiVideoToggle)))
	{
     		gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON(guiVideoToggle),b);
		aprintf("Changing it to %d\n",b);
	}
	aprintf("++ video toggle : %d\n",b);

}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:16,代码来源:GUI_bindings.cpp


示例15: modify_dice

/* Callback on dice press */
gint
modify_dice (GtkWidget * widget, gpointer data)
{
  DiceInfo *tmp = (DiceInfo *) data;
  GtkToggleToolButton *button = GTK_TOGGLE_TOOL_BUTTON (widget);

  /* Don't modify dice if player is marked finished or computer is playing */
  if (players[CurrentPlayer].finished || players[CurrentPlayer].comp) {
    if (gtk_toggle_tool_button_get_active (button))
      gtk_toggle_tool_button_set_active (button, FALSE);
    return TRUE;
  }

  if (NumberOfRolls >= NUM_ROLLS) {
    say (_("You are only allowed three rolls. Choose a score slot."));
    gtk_toggle_tool_button_set_active (button, FALSE);
    return TRUE;
  }

  tmp->sel = gtk_toggle_tool_button_get_active (button);

  UpdateAllDicePixmaps ();

  update_roll_button_sensitivity ();
  return TRUE;
}
开发者ID:bellau,项目名称:gnome-games,代码行数:27,代码来源:gyahtzee.c


示例16: emoticon_tool_button_button_release_event_cb

static gboolean
emoticon_tool_button_button_release_event_cb (EEmoticonToolButton *button,
                                              GdkEventButton *event)
{
	GtkToggleToolButton *tool_button;
	GtkWidget *event_widget;
	gboolean popup_in_progress;

	tool_button = GTK_TOGGLE_TOOL_BUTTON (button);
	event_widget = gtk_get_event_widget ((GdkEvent *) event);

	popup_in_progress = button->priv->popup_in_progress;
	button->priv->popup_in_progress = FALSE;

	if (event_widget != GTK_WIDGET (button))
		goto popdown;

	if (popup_in_progress)
		return FALSE;

	if (gtk_toggle_tool_button_get_active (tool_button))
		goto popdown;

	return FALSE;

popdown:
	e_emoticon_tool_button_popdown (button);

	return TRUE;
}
开发者ID:lantw44,项目名称:gsoc2013-evolution,代码行数:30,代码来源:e-emoticon-tool-button.c


示例17: ui_callback_on_filters_enabled

gboolean ui_callback_on_filters_enabled(GtkToolButton *button, gpointer data)
{
    gboolean enabled;
    gboolean changed;

    enabled = gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON(button));

    g_info("Filters enabled event occurred %d", enabled);

    changed = ui_filters_enable (enabled);

    if (changed)
    {
        /* Set the tool tip text */
        if (enabled)
        {
            gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM(button), "Disable messages filtering");
        }
        else
        {
            gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM(button), "Enable messages filtering");
        }
        ui_tree_view_refilter ();
    }

    return TRUE;
}
开发者ID:2fumin,项目名称:EPC-openAir4G,代码行数:27,代码来源:ui_callbacks.c


示例18: emoticon_tool_button_press_event

static gboolean
emoticon_tool_button_press_event (GtkWidget *widget,
                                  GdkEventButton *event)
{
	EEmoticonToolButton *button;
	GtkToggleToolButton *toggle_button;
	GtkWidget *event_widget;

	button = E_EMOTICON_TOOL_BUTTON (widget);

	event_widget = gtk_get_event_widget ((GdkEvent *) event);

	if (event_widget == button->priv->window)
		return TRUE;

	if (event_widget != widget)
		return FALSE;

	toggle_button = GTK_TOGGLE_TOOL_BUTTON (widget);
	if (gtk_toggle_tool_button_get_active (toggle_button))
		return FALSE;

	e_emoticon_tool_button_popup (button);

	button->priv->popup_in_progress = TRUE;

	return TRUE;
}
开发者ID:lantw44,项目名称:gsoc2013-evolution,代码行数:28,代码来源:e-emoticon-tool-button.c


示例19: emoticon_tool_button_popdown

static void
emoticon_tool_button_popdown (EEmoticonToolButton *button)
{
	GtkToggleToolButton *tool_button;

	if (!gtk_widget_get_realized (GTK_WIDGET (button)))
		return;

	if (!button->priv->popup_shown)
		return;

	/* Hide the pop-up. */
	gtk_device_grab_remove (button->priv->window, button->priv->grab_mouse);
	gtk_widget_hide (button->priv->window);

	/* Deactivate the tool button. */
	tool_button = GTK_TOGGLE_TOOL_BUTTON (button);
	gtk_toggle_tool_button_set_active (tool_button, FALSE);

	if (button->priv->grab_keyboard)
		gdk_device_ungrab (button->priv->grab_keyboard, GDK_CURRENT_TIME);
	if (button->priv->grab_mouse)
		gdk_device_ungrab (button->priv->grab_mouse, GDK_CURRENT_TIME);

	button->priv->grab_keyboard = NULL;
	button->priv->grab_mouse = NULL;
}
开发者ID:lantw44,项目名称:gsoc2013-evolution,代码行数:27,代码来源:e-emoticon-tool-button.c


示例20: ghb_preview_set_visible

void
ghb_preview_set_visible(signal_user_data_t *ud)
{
    gint title_id, titleindex;
    const hb_title_t *title;
    GtkToggleToolButton *button;
    GtkWidget *widget;
    gboolean active;

    button = GTK_TOGGLE_TOOL_BUTTON(GHB_WIDGET(ud->builder, "show_preview"));
    active = gtk_toggle_tool_button_get_active(button);

    title_id = ghb_dict_get_int(ud->settings, "title");
    title = ghb_lookup_title(title_id, &titleindex);
    active &= title != NULL;
    widget = GHB_WIDGET(ud->builder, "preview_window");
    gtk_widget_set_visible(widget, active);
    if (active)
    {
        gint x, y;
        x = ghb_dict_get_int(ud->prefs, "preview_x");
        y = ghb_dict_get_int(ud->prefs, "preview_y");
        if (x >= 0 && y >= 0)
            gtk_window_move(GTK_WINDOW(widget), x, y);
    }
}
开发者ID:TotalCaesar659,项目名称:HandBrake,代码行数:26,代码来源:preview.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_TOOLBAR函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_TOGGLE_BUTTON函数代码示例发布时间: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