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


C++ GCIN_module_main_functions::mf_set_label_font_size方法代码示例

本文整理汇总了C++中GCIN_module_main_functions::mf_set_label_font_size方法的典型用法代码示例。如果您正苦于以下问题:C++ GCIN_module_main_functions::mf_set_label_font_size方法的具体用法?C++ GCIN_module_main_functions::mf_set_label_font_size怎么用?C++ GCIN_module_main_functions::mf_set_label_font_size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GCIN_module_main_functions的用法示例。


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

示例1:

void
module_change_font_size (void)
{
    GdkColor colorFG;
    GtkWidget *pLabel;
    int n;

    gdk_color_parse (*g_gcinModMainFuncs.mf_gcin_win_color_fg, &colorFG);
    g_gcinModMainFuncs.mf_change_win_bg (g_pWinChewing);
    g_gcinModMainFuncs.mf_change_win_bg (g_pEvBoxChewing);

    for (n = 0; n < MAX_SEG_NUM; n++)
    {
        pLabel = g_pSeg[n].label;
        g_gcinModMainFuncs.mf_set_label_font_size (pLabel,
            *g_gcinModMainFuncs.mf_gcin_font_size);

        if (*g_gcinModMainFuncs.mf_gcin_win_color_use) {
#if !GTK_CHECK_VERSION(2,91,6)
            gtk_widget_modify_fg (pLabel, GTK_STATE_NORMAL, &colorFG);
#else
            GdkRGBA rgbfg;
            gdk_rgba_parse(&rgbfg, gdk_color_to_string(&colorFG));
            gtk_widget_override_color(pLabel, GTK_STATE_FLAG_NORMAL, &rgbfg);
#endif
        }
    }
}
开发者ID:RJHsiao,项目名称:gcin-debian,代码行数:28,代码来源:chewing.cpp

示例2: module_change_font_size

void module_change_font_size()
{
  dbg("change_anthy_font_size\n");
  GdkColor fg;
  gdk_color_parse(*gmf.mf_gcin_win_color_fg, &fg);
#if GTK_CHECK_VERSION(2,91,6)
  GdkRGBA rgbfg;
  gdk_rgba_parse(&rgbfg, gdk_color_to_string(&fg));
#endif
  gmf.mf_change_win_bg(win_anthy);
  gmf.mf_change_win_bg(event_box_anthy);

  int i;
  for(i=0; i < MAX_SEG_N; i++) {
    GtkWidget *label = seg[i].label;
    gmf.mf_set_label_font_size(label, *gmf.mf_gcin_font_size);
    if (*gmf.mf_gcin_win_color_use) {
#if !GTK_CHECK_VERSION(2,91,6)
      gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &fg);
#else
      gtk_widget_override_color(label, GTK_STATE_FLAG_NORMAL, &rgbfg);
#endif
    }
  }
}
开发者ID:mangoicestar,项目名称:gcin-debian,代码行数:25,代码来源:anthy.cpp

示例3: create_win_intcode

void create_win_intcode()
{
  if (gwin_int) {
    module_show_win();
    return;
  }

  gwin_int = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_has_resize_grip(GTK_WINDOW(gwin_int), FALSE);
  gtk_window_set_resizable(GTK_WINDOW(gwin_int), FALSE);

#if WIN32
  gmf.mf_set_no_focus(gwin_int);
#endif

//  gtk_window_set_default_size(GTK_WINDOW (gwin_int), 1, 1);
  gtk_container_set_border_width (GTK_CONTAINER (gwin_int), 0);

  GdkWindow *gdkwin = gtk_widget_get_window(gwin_int);

  GtkWidget *frame = gtk_frame_new(NULL);
  gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
  gtk_container_add (GTK_CONTAINER(gwin_int), frame);


  GtkWidget *hbox_top = gtk_hbox_new (FALSE, 0);
  gtk_container_add (GTK_CONTAINER (frame), hbox_top);

  GtkWidget *button_intcode = gtk_button_new_with_label(_(_L("內碼")));
  g_signal_connect (G_OBJECT (button_intcode), "button_press_event",
        G_CALLBACK (gmf.mf_inmd_switch_popup_handler), NULL);
  gtk_box_pack_start (GTK_BOX (hbox_top), button_intcode, FALSE, FALSE, 0);

  button_int = gtk_button_new();
  gtk_container_set_border_width (GTK_CONTAINER (button_int), 0);
  gtk_box_pack_start (GTK_BOX (hbox_top), button_int, FALSE, FALSE, 0);
  GtkWidget *hbox_int = gtk_hbox_new (FALSE, 0);
  gtk_container_add (GTK_CONTAINER (button_int), hbox_int);

  int i;
  for(i=0; i < MAX_INTCODE;i ++) {
    GtkWidget *label = gtk_label_new(_(full_space));
    labels_int[i] = label;
    gtk_box_pack_start (GTK_BOX (hbox_int), label, FALSE, FALSE, 0);
    gmf.mf_set_label_font_size(label, *gmf.mf_gcin_font_size);
  }

  GtkWidget *intsel = create_int_opts();
  gtk_box_pack_start (GTK_BOX (hbox_top), intsel, FALSE, FALSE, 0);

  gtk_widget_show_all (gwin_int);

  gtk_widget_realize (gwin_int);
#if WIN32
  gmf.mf_win32_init_win(gwin_int);
#else
  set_no_focus(gwin_int);
#endif

  adj_intcode_buttons();
  minimize_win();

//  dbg("create %x\n",gwin_int);
}
开发者ID:RJHsiao,项目名称:gcin-debian,代码行数:64,代码来源:win-int.cpp


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