当前位置: 首页>>代码示例>>C++>>正文


C++ GTK_FONT_BUTTON函数代码示例

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


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

示例1: update_theme_from_controls

static void
update_theme_from_controls (GthContactSheetThemeDialog *self)
{
	self->priv->theme->display_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("name_entry"))));

	/* background */

	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("solid_color_radiobutton")))) {
		self->priv->theme->background_type = GTH_CONTACT_SHEET_BACKGROUND_TYPE_SOLID;
		gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("solid_color_colorpicker")), &self->priv->theme->background_color1);
	}
	else {
		gboolean h_gradient_active = FALSE;
		gboolean v_gradient_active = FALSE;

		h_gradient_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("h_gradient_checkbutton")));
		v_gradient_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("v_gradient_checkbutton")));

		if (h_gradient_active && v_gradient_active) {
			self->priv->theme->background_type = GTH_CONTACT_SHEET_BACKGROUND_TYPE_FULL;
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_1_colorpicker")), &self->priv->theme->background_color1);
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_2_colorpicker")), &self->priv->theme->background_color2);
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_1_colorpicker")), &self->priv->theme->background_color3);
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_2_colorpicker")), &self->priv->theme->background_color4);
		}
		else if (h_gradient_active) {
			self->priv->theme->background_type = GTH_CONTACT_SHEET_BACKGROUND_TYPE_HORIZONTAL;
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_1_colorpicker")), &self->priv->theme->background_color1);
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_2_colorpicker")), &self->priv->theme->background_color2);
		}
		else if (v_gradient_active) {
			self->priv->theme->background_type = GTH_CONTACT_SHEET_BACKGROUND_TYPE_VERTICAL;
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_1_colorpicker")), &self->priv->theme->background_color1);
			gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_2_colorpicker")), &self->priv->theme->background_color2);
		}
	}

	/* frame */

	self->priv->theme->frame_style = gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("frame_style_combobox")));
	gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("frame_colorpicker")), &self->priv->theme->frame_color);

	/* header */

	self->priv->theme->header_font_name = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (GET_WIDGET ("header_fontpicker"))));
	gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("header_colorpicker")), &self->priv->theme->header_color);

	/* footer */

	self->priv->theme->footer_font_name = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (GET_WIDGET ("footer_fontpicker"))));
	gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("footer_colorpicker")), &self->priv->theme->footer_color);

	/* caption */

	self->priv->theme->caption_font_name = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (GET_WIDGET ("caption_fontpicker"))));
	gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("caption_colorpicker")), &self->priv->theme->caption_color);
}
开发者ID:cristiklein,项目名称:gthumb,代码行数:57,代码来源:gth-contact-sheet-theme-dialog.c

示例2: update_controls_from_theme

static void
update_controls_from_theme (GthContactSheetThemeDialog *self,
			    GthContactSheetTheme       *theme)
{
	if (theme == NULL)
		theme = _gth_contact_sheet_theme_new_default ();
	self->priv->theme = gth_contact_sheet_theme_dup (theme);

	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("name_entry")), theme->display_name);

	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("solid_color_radiobutton")), theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_SOLID);
	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("gradient_radiobutton")), theme->background_type != GTH_CONTACT_SHEET_BACKGROUND_TYPE_SOLID);
	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("h_gradient_checkbutton")), (theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_HORIZONTAL) || (theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_FULL));
	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("v_gradient_checkbutton")), (theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_VERTICAL) || (theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_FULL));

	if (theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_SOLID) {
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("solid_color_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_1_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_2_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_1_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_2_colorpicker")), &theme->background_color1);
	}
	else if (theme->background_type == GTH_CONTACT_SHEET_BACKGROUND_TYPE_FULL) {
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("solid_color_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_1_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_2_colorpicker")), &theme->background_color2);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_1_colorpicker")), &theme->background_color3);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_2_colorpicker")), &theme->background_color4);
	}
	else {
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("solid_color_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_1_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("h_gradient_2_colorpicker")), &theme->background_color2);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_1_colorpicker")), &theme->background_color1);
		gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("v_gradient_2_colorpicker")), &theme->background_color2);
	}

	gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("frame_style_combobox")), theme->frame_style);
	gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("frame_colorpicker")), &theme->frame_color);

	gtk_font_button_set_font_name (GTK_FONT_BUTTON (GET_WIDGET ("header_fontpicker")), theme->header_font_name);
	gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("header_colorpicker")), &theme->header_color);

	gtk_font_button_set_font_name (GTK_FONT_BUTTON (GET_WIDGET ("footer_fontpicker")), theme->footer_font_name);
	gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("footer_colorpicker")), &theme->footer_color);

	gtk_font_button_set_font_name (GTK_FONT_BUTTON (GET_WIDGET ("caption_fontpicker")), theme->caption_font_name);
	gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (GET_WIDGET ("caption_colorpicker")), &theme->caption_color);

	update_preview (self);
}
开发者ID:cristiklein,项目名称:gthumb,代码行数:51,代码来源:gth-contact-sheet-theme-dialog.c

示例3: wxFAIL_MSG

bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
                        const wxFont &initial,
                        const wxPoint &pos, const wxSize &size,
                        long style, const wxValidator& validator,
                        const wxString &name )
{
    if (!gtk_check_version(2,4,0))
    {
        m_needParent = true;
        m_acceptsFocus = true;

        if (!PreCreation( parent, pos, size ) ||
            !wxControl::CreateBase(parent, id, pos, size, style, validator, name))
        {
            wxFAIL_MSG( wxT("wxFontButton creation failed") );
            return false;
        }

        m_widget = gtk_font_button_new();

        // set initial font
        m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
        UpdateFont();

        // honour the fontbutton styles
        bool showall = (style & wxFNTP_FONTDESC_AS_LABEL) != 0,
             usefont = (style & wxFNTP_USEFONT_FOR_LABEL) != 0;
        gtk_font_button_set_show_style(GTK_FONT_BUTTON(m_widget), showall);
        gtk_font_button_set_show_size(GTK_FONT_BUTTON(m_widget), showall);

        gtk_font_button_set_use_size(GTK_FONT_BUTTON(m_widget), usefont);
        gtk_font_button_set_use_font(GTK_FONT_BUTTON(m_widget), usefont);

        gtk_widget_show( GTK_WIDGET(m_widget) );

        // GtkFontButton signals
        g_signal_connect(m_widget, "font-set",
                        G_CALLBACK(gtk_fontbutton_setfont_callback), this);


        m_parent->DoAddChild( this );

        PostCreation(size);
        SetInitialSize(size);
    }
    else
        return wxGenericFontButton::Create(parent, id, initial, pos, size,
                                           style, validator, name);
    return true;
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:50,代码来源:fontpicker.cpp

示例4: reset_text_controls

void reset_text_controls()
{
	GtkWidget * widget = NULL;

	if ((!toplevel) || (!gauge))
		return;

	hold_handlers = TRUE;

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"precision_spin"));
	gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),0);

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"value_font_scale_spin"));
	gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),0);

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"value_xpos_spin"));
	gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),0);

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"value_ypos_spin"));
	gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget),0);

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"value_font_button"));
	gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget),g_strdup(""));

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"show_value_check"));
	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),TRUE);

	widget = GTK_WIDGET (gtk_builder_get_object(toplevel,"value_color_button"));
	gtk_color_button_set_color(GTK_COLOR_BUTTON(widget),&white);

	hold_handlers = FALSE;
}
开发者ID:toxicgumbo,项目名称:MegaTunix,代码行数:32,代码来源:handlers.c

示例5: gw_settingswindow_sync_custom_font_cb

//!
//! @brief Sets the text in the custom document font button
//! @param font_description_string The font description in the form "Sans 10"
//!
G_MODULE_EXPORT void 
gw_settingswindow_sync_custom_font_cb (GSettings *settings, gchar *KEY, gpointer data)
{
    //Declarations
    GwSettingsWindow *window;
    GwSettingsWindowPrivate *priv;
    GwApplication *application;
    LwPreferences *preferences;
    GtkWidget *toplevel;
    GtkButton *button;
    char font[50];

    //Initializations
    window = GW_SETTINGSWINDOW (data);
    g_return_if_fail (window != NULL);
    priv = window->priv;
    toplevel = gw_window_get_toplevel (GW_WINDOW (window));
    application = gw_window_get_application (GW_WINDOW (window));
    preferences = gw_application_get_preferences (application);
    lw_preferences_get_string_by_schema (preferences, font, LW_SCHEMA_FONT, LW_KEY_FONT_CUSTOM_FONT, 50);
    button = GTK_BUTTON (priv->custom_font_fontbutton);

    //Body
    G_GNUC_EXTENSION g_signal_handlers_block_by_func (button, gw_settingswindow_custom_document_font_changed_cb, toplevel);
    gtk_font_button_set_font_name (GTK_FONT_BUTTON (button), font);
    G_GNUC_EXTENSION g_signal_handlers_unblock_by_func (button, gw_settingswindow_custom_document_font_changed_cb, toplevel);
}
开发者ID:kyoushuu,项目名称:gwaei,代码行数:31,代码来源:settingswindow-callbacks.c

示例6: widget_fontbutton_input_by_file

static void widget_fontbutton_input_by_file(variable *var, char *filename)
{
	FILE             *infile;
	gchar             line[512];
	gint              count;

#ifdef DEBUG_TRANSITS
	fprintf(stderr, "%s(): Entering.\n", __func__);
#endif

	if (infile = fopen(filename, "r")) {
		/* Just one line */
		if (fgets(line, 512, infile)) {
			/* Enforce end of string in case of max chars read */
			line[512 - 1] = 0;
			/* Remove the trailing [CR]LFs */
			for (count = strlen(line) - 1; count >= 0; count--)
				if (line[count] == 13 || line[count] == 10) line[count] = 0;

			gtk_font_button_set_font_name(GTK_FONT_BUTTON(var->Widget), line);

		}
		/* Close the file */
		fclose(infile);
	} else {
		fprintf(stderr, "%s(): Couldn't open '%s' for reading.\n", __func__,
			filename);
	}

#ifdef DEBUG_TRANSITS
	fprintf(stderr, "%s(): Exiting.\n", __func__);
#endif
}
开发者ID:ElAdnan,项目名称:gtkdialog,代码行数:33,代码来源:widget_fontbutton.c

示例7: create_text_block_event

EXPORT gboolean create_text_block_event(GtkWidget * widget, gpointer data)
{
	GtkWidget *dialog = NULL;
	MtxTextBlock *tblock = NULL;
	GladeXML *xml = NULL;
	gchar * filename = NULL;
	gint result = 0;

	if (!GTK_IS_WIDGET(gauge))
		return FALSE;

	filename = get_file(g_build_filename(GAUGEDESIGNER_GLADE_DIR,"gaugedesigner.glade",NULL),NULL);
	if (filename)
	{
		xml = glade_xml_new(filename, "tblock_dialog", NULL);
		g_free(filename);
	}
	else
	{
		printf("Can't locate primary glade file!!!!\n");
		exit(-1);
	}

	glade_xml_signal_autoconnect(xml);
	dialog = glade_xml_get_widget(xml,"tblock_dialog");
	gtk_color_button_set_color(GTK_COLOR_BUTTON(glade_xml_get_widget(xml,"tblock_day_colorbutton")),&white);
	gtk_color_button_set_color(GTK_COLOR_BUTTON(glade_xml_get_widget(xml,"tblock_nite_colorbutton")),&black);
	if (!GTK_IS_WIDGET(dialog))
	{
		return FALSE;
	}

	result = gtk_dialog_run(GTK_DIALOG(dialog));
	switch (result)
	{
		case GTK_RESPONSE_APPLY:
			tblock = g_new0(MtxTextBlock, 1);
			tblock->font_scale = gtk_spin_button_get_value(GTK_SPIN_BUTTON(glade_xml_get_widget(xml,"tblock_font_scale_spin")));
			tblock->x_pos = gtk_spin_button_get_value(GTK_SPIN_BUTTON(glade_xml_get_widget(xml,"tblock_xpos_spin")));
			tblock->y_pos = gtk_spin_button_get_value(GTK_SPIN_BUTTON(glade_xml_get_widget(xml,"tblock_ypos_spin")));
			tblock->text = gtk_editable_get_chars(GTK_EDITABLE(glade_xml_get_widget(xml,"tblock_text_entry")),0,-1);
			gtk_color_button_get_color(GTK_COLOR_BUTTON(glade_xml_get_widget(xml,"tblock_day_colorbutton")),&tblock->color[MTX_DAY]);
			gtk_color_button_get_color(GTK_COLOR_BUTTON(glade_xml_get_widget(xml,"tblock_nite_colorbutton")),&tblock->color[MTX_NITE]);
			tblock->font = (gchar *)gtk_font_button_get_font_name (GTK_FONT_BUTTON(glade_xml_get_widget(xml,"tblock_fontbutton")));
			tblock->font = g_strchomp(g_strdelimit(tblock->font,"0123456789",' '));
			changed = TRUE;
			mtx_gauge_face_set_text_block_struct(MTX_GAUGE_FACE(gauge),tblock);
			g_free(tblock->text);
			g_free(tblock);
			update_onscreen_tblocks();

			break;
		default:
			break;
	}
	if (GTK_IS_WIDGET(dialog))
		gtk_widget_destroy(dialog);

	return (FALSE);
}
开发者ID:Torture,项目名称:MegaTunix,代码行数:60,代码来源:tblocks.c

示例8: gtk_font_button_font_chooser_get_font_map

static PangoFontMap *
gtk_font_button_font_chooser_get_font_map (GtkFontChooser *chooser)
{
  GtkFontButton *font_button = GTK_FONT_BUTTON (chooser);

  return font_button->priv->font_map;
}
开发者ID:Vort,项目名称:gtk,代码行数:7,代码来源:gtkfontbutton.c

示例9: ly_3lrc_config_on_desktop_font_set_cb

gboolean ly_3lrc_config_on_desktop_font_set_cb(GtkWidget *widget, gpointer data)
{
	gchar font[1024]="Sans Regular 25";
	g_strlcpy(font, gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget)), sizeof(font));
	ly_reg_set("3lrc_desktop_font", "%s", font);
	return FALSE;
}		
开发者ID:lovesnow,项目名称:linnya,代码行数:7,代码来源:lrc_config.c

示例10: gnoclFontButtonCmd

/**
/brief
/author     William J Giddings
**/
int gnoclFontButtonCmd ( ClientData data, Tcl_Interp *interp,
						 int objc, Tcl_Obj * const objv[] )
{
	int       ret;
	GtkFontButton *button;

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

	button = GTK_FONT_BUTTON ( gtk_font_button_new( ) );

	gtk_widget_show ( GTK_WIDGET ( button ) );

	ret = gnoclSetOptions ( interp, fontButtonOptions, G_OBJECT ( button ), -1 );
	gnoclClearOptions ( fontButtonOptions );

	if ( ret != TCL_OK )
	{
		gtk_widget_destroy ( GTK_WIDGET ( button ) );
		return TCL_ERROR;
	}

	return gnoclRegisterWidget ( interp, GTK_WIDGET ( button ), fontButtonFunc );
}
开发者ID:zdia,项目名称:gnocl,代码行数:31,代码来源:fontButton.c

示例11: fcitx_wizard_candidate_widget_load_conf

static void
fcitx_wizard_candidate_widget_load_conf(FcitxWizardCandidateWidget *self)
{
    FcitxConfigValueType value;
    File_Conf_Data* config_conf = self->config_conf_data->conf_data;
    File_Conf_Data* classic_ui_conf = self->classic_ui_conf_data->conf_data;

    value = FcitxConfigGetBindValue(&config_conf->config->config, "Output", 
        "CandidateWordNumber");
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(self->candidate_word_number_spin_button), 
        *value.integer);

    value = FcitxConfigGetBindValue(&classic_ui_conf->config->config, "ClassicUI", 
        "FontSize");
    gtk_spin_button_set_value(GTK_SPIN_BUTTON(self->font_size_spin_button), 
        *value.integer);

    value = FcitxConfigGetBindValue(&classic_ui_conf->config->config, "ClassicUI", 
        "Font");
    gtk_font_button_set_font_name(GTK_FONT_BUTTON(self->font_button), 
        *value.string);

    value = FcitxConfigGetBindValue(&classic_ui_conf->config->config, "ClassicUI", 
        "VerticalList");
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->vertical_candidate_button),
        *value.boolvalue); 

}
开发者ID:lenky0401,项目名称:fcitx-configtool,代码行数:28,代码来源:wizard_candidate_widget.c

示例12: gtk_font_button_get_property

static void
gtk_font_button_get_property (GObject    *object,
                              guint       param_id,
                              GValue     *value,
                              GParamSpec *pspec)
{
  GtkFontButton *font_button = GTK_FONT_BUTTON (object);
  
  switch (param_id) 
    {
    case PROP_TITLE:
      g_value_set_string (value, gtk_font_button_get_title (font_button));
      break;
    case PROP_FONT_NAME:
      g_value_set_string (value, gtk_font_button_get_font_name (font_button));
      break;
    case PROP_USE_FONT:
      g_value_set_boolean (value, gtk_font_button_get_use_font (font_button));
      break;
    case PROP_USE_SIZE:
      g_value_set_boolean (value, gtk_font_button_get_use_size (font_button));
      break;
    case PROP_SHOW_STYLE:
      g_value_set_boolean (value, gtk_font_button_get_show_style (font_button));
      break;
    case PROP_SHOW_SIZE:
      g_value_set_boolean (value, gtk_font_button_get_show_size (font_button));
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
      break;
    }
} 
开发者ID:batman52,项目名称:dingux-code,代码行数:33,代码来源:gtkfontbutton.c

示例13: gui_update

void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_watermark_gui_data_t *g = (dt_iop_watermark_gui_data_t *)self->gui_data;
  dt_iop_watermark_params_t *p = (dt_iop_watermark_params_t *)module->params;
  dt_bauhaus_slider_set(g->opacity, p->opacity);
  dt_bauhaus_slider_set_soft(g->scale, p->scale);
  dt_bauhaus_slider_set(g->rotate, p->rotate);
  dt_bauhaus_slider_set(g->x_offset, p->xoffset);
  dt_bauhaus_slider_set(g->y_offset, p->yoffset);
  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g->align[p->alignment]), TRUE);
  _combo_box_set_active_text(g->watermarks, p->filename);
  dt_bauhaus_combobox_set(g->sizeto, p->sizeto);
  gtk_entry_set_text(GTK_ENTRY(g->text), p->text);
  GdkRGBA color = (GdkRGBA){.red = p->color[0], .green = p->color[1], .blue = p->color[2], .alpha = 1.0 };
  gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(g->colorpick), &color);
  gtk_font_button_set_font_name(GTK_FONT_BUTTON(g->fontsel), p->font);
}

void init(dt_iop_module_t *module)
{
  module->params = calloc(1, sizeof(dt_iop_watermark_params_t));
  module->params_size = sizeof(dt_iop_watermark_params_t);
  module->default_params = calloc(1, sizeof(dt_iop_watermark_params_t));
  module->default_enabled = 0;
  module->priority = 969; // module order created by iop_dependencies.py, do not edit!
  module->params_size = sizeof(dt_iop_watermark_params_t);
  module->gui_data = NULL;
  dt_iop_watermark_params_t tmp = (dt_iop_watermark_params_t){
    100.0, 100.0, 0.0, 0.0, 4, 0.0, DT_SCALE_IMAGE, { "darktable.svg" }, { "" }, {0.0, 0.0, 0.0}, {"DejaVu Sans 10"}
  }; // opacity,scale,xoffs,yoffs,alignment
  memcpy(module->params, &tmp, sizeof(dt_iop_watermark_params_t));
  memcpy(module->default_params, &tmp, sizeof(dt_iop_watermark_params_t));
}
开发者ID:edgomez,项目名称:darktable,代码行数:34,代码来源:watermark.c

示例14: preferences_font_cb

/* Preferences Callback : Change font. */
void preferences_font_cb (GtkWidget *button, gpointer data)
{
	const char *font_str;

	font_str = gtk_font_button_get_font_name (GTK_FONT_BUTTON (button));
	g_settings_set_string (stickynotes->settings, "default-font", font_str);
}
开发者ID:alexandervdm,项目名称:mate-applets,代码行数:8,代码来源:stickynotes_applet_callbacks.c

示例15: mud_window_prefs_update_font

static void
mud_window_prefs_update_font(MudWindowPrefs *self,
                             MudPrefs *preferences)
{
    gtk_font_button_set_font_name(GTK_FONT_BUTTON(self->priv->font_button),
                                  preferences->FontName);
}
开发者ID:ghoulsblade,项目名称:gnome-mud,代码行数:7,代码来源:mud-window-prefs.c


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