· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Gtk Plus

처음에는 GIMP를 개발하는 도구로 사용되었는데 지금은 다양한 응용프로그램에 사용되고 있다.


[http]http://gtk.org/tutorial/ Undocumented Widgets중에 Font Selection Dialog이 있다. 아래에 Font Selection Dialog 예제가 있다.

#include <gtk/gtk.h>

void font_cb(GtkWidget* w, GtkFontSelectionDialog* fs)
{
  g_print("%s\n", gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fs)));
}

int main(int argc, char** argv)
{
  GtkWidget* f;

  gtk_init(&argc, &argv);

  f = gtk_font_selection_dialog_new("font sel");
  g_signal_connect(G_OBJECT(f), "destroy", G_CALLBACK(gtk_main_quit), NULL);
  g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(f)->ok_button), "clicked", G_CALLBACK(font_cb), (gpointer)f);
  g_signal_connect_swapped(G_OBJECT(GTK_FONT_SELECTION_DIALOG(f)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)f);

  gtk_widget_show(f);

  gtk_main();
  return 0;
}


[http]http://developer.gnome.org/doc/API/2.0/gtk/index.html 레퍼런스 매뉴얼. 이것을 잘 활용하려면 어느정도 GtkPlus에 대한 기본 지식이 있어야 된다.



See also:


ID
Password
Join
When the wind is great, bow before it; when the wind is heavy, yield to it.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-01-11 08:10:45
Processing time 0.0036 sec