Buchempfehlung
Visual Basic 6 Kochbuch
Visual Basic 6 Kochbuch
Viele praktische Tipps zum Programmieren mit Visual Basic 6, die sich oft auch auf FB übertragen lassen. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

GTK - Vom Fenster bis zum Mini Text Editor - face_100

Uploader:Mitgliedrieselkalk
Datum/Zeit:22.04.2010 01:28:44

'- rieselkalk 2010
'- face_100.bas


'- UTF8 Zeichensatz Ä 195 132, Ö 195 150, Ü 195 156, ß 195 159, ä 195 164, ö 195 182, ü 195 188

'- Allgemein Gültige Widget Zeiger anlegen

Dim Shared As GtkWidget Ptr window_1
Dim Shared As GtkWidget Ptr vbox_1
Dim Shared As GtkWidget Ptr menubar_1
Dim Shared As GtkWidget Ptr menuitem_file
Dim Shared As GtkWidget Ptr menuitem_file_menu
Dim Shared As GtkWidget Ptr menuitem_new
Dim Shared As GtkWidget Ptr image103
Dim Shared As GtkWidget Ptr menuitem_open
Dim Shared As GtkWidget Ptr image104
Dim Shared As GtkWidget Ptr menuitem_save
Dim Shared As GtkWidget Ptr image105
Dim Shared As GtkWidget Ptr menuitem_saveas
Dim Shared As GtkWidget Ptr image106
Dim Shared As GtkWidget Ptr separator_11
Dim Shared As GtkWidget Ptr menuitem_print
Dim Shared As GtkWidget Ptr image107
Dim Shared As GtkWidget Ptr separator_12
Dim Shared As GtkWidget Ptr menuitem_quit
Dim Shared As GtkWidget Ptr image108
Dim Shared As GtkWidget Ptr menuitem_bearbeiten
Dim Shared As GtkWidget Ptr menuitem_bearbeiten_menu
Dim Shared As GtkWidget Ptr menuitem_cut
Dim Shared As GtkWidget Ptr image109
Dim Shared As GtkWidget Ptr menuitem_copy
Dim Shared As GtkWidget Ptr image110
Dim Shared As GtkWidget Ptr menuitem_paste
Dim Shared As GtkWidget Ptr image111
Dim Shared As GtkWidget Ptr menuitem_del
Dim Shared As GtkWidget Ptr image112
Dim Shared As GtkWidget Ptr separator_21
Dim Shared As GtkWidget Ptr menuitem_find
Dim Shared As GtkWidget Ptr image113
Dim Shared As GtkWidget Ptr menuitem_replace
Dim Shared As GtkWidget Ptr image114
Dim Shared As GtkWidget Ptr separator_22
Dim Shared As GtkWidget Ptr menuitem_markall
Dim Shared As GtkWidget Ptr menuitem_delmark
Dim Shared As GtkWidget Ptr menuitem_insert
Dim Shared As GtkWidget Ptr menuitem_insert_menu
Dim Shared As GtkWidget Ptr menuitem_date
Dim Shared As GtkWidget Ptr menuitem_time
Dim Shared As GtkWidget Ptr menuitem_format
Dim Shared As GtkWidget Ptr menuitem_format_menu
Dim Shared As GtkWidget Ptr menuitem_umbruch
Dim Shared As GtkWidget Ptr menuitem_font
Dim Shared As GtkWidget Ptr menuitem_anzeige
Dim Shared As GtkWidget Ptr menuitem_hilfe
Dim Shared As GtkWidget Ptr menuitem_hilfe_menu
Dim Shared As GtkWidget Ptr menuitem_help
Dim Shared As GtkWidget Ptr image115
Dim Shared As GtkWidget Ptr separator_61
Dim Shared As GtkWidget Ptr menuitem_about
Dim Shared As GtkWidget Ptr image116
Dim Shared As GtkWidget Ptr toolbar_1
Dim Shared As GtkWidget Ptr image203
Dim Shared As GtkWidget Ptr image204
Dim Shared As GtkWidget Ptr image205
Dim Shared As GtkWidget Ptr image206
Dim Shared As GtkWidget Ptr image207
Dim Shared As GtkWidget Ptr image208
Dim Shared As GtkWidget Ptr image209
Dim Shared As GtkWidget Ptr image210
Dim Shared As GtkWidget Ptr image211
Dim Shared As GtkWidget Ptr image212
Dim Shared As GtkWidget Ptr image213
Dim Shared As GtkWidget Ptr image214
Dim Shared As GtkIconSize tmp_toolbar_icon_size
Dim Shared As GtkWidget Ptr fixed_1
Dim Shared As GtkWidget Ptr hruler_1
Dim Shared As GtkWidget Ptr fixed_2
Dim Shared As GtkWidget Ptr entry_1
Dim Shared As GtkWidget Ptr entry_2
Dim Shared As GtkWidget Ptr entry_3
Dim Shared As GtkWidget Ptr entry_4
Dim Shared As GtkWidget Ptr entry_5
Dim Shared As GtkWidget Ptr entry_6
Dim Shared As GtkWidget Ptr scrolledwindow1
Dim Shared As GtkWidget Ptr textview_1
Dim Shared As GtkAccelGroup Ptr accel_group

' Menu Tasturkürzel mit AccelGroup bearbeiten
  accel_group = gtk_accel_group_new ()

  window_1 = gtk_window_new (GTK_WINDOW_TOPLEVEL)
  gtk_widget_set_name (window_1, "window_1")
  gtk_window_set_title (GTK_WINDOW (window_1), ("Mini Text Editor"))
  gtk_window_resize (GTK_WINDOW (window_1), 600, 400)
  gtk_window_set_position (GTK_WINDOW (window_1), GTK_WIN_POS_CENTER)
  gtk_window_add_accel_group (GTK_WINDOW (window_1), accel_group)

  vbox_1 = gtk_vbox_new (FALSE, 0)
  gtk_widget_set_name (GTK_WIDGET(vbox_1), "vbox_1")
  gtk_container_add (GTK_CONTAINER (window_1), vbox_1)

  menubar_1 = gtk_menu_bar_new ()
  gtk_widget_set_name (GTK_WIDGET(menubar_1), "menubar_1")
  gtk_box_pack_start (GTK_BOX (vbox_1), menubar_1, FALSE, FALSE, 0)

'- Haupt Menu Eintrag Datei
  menuitem_file = gtk_menu_item_new_with_mnemonic ("_Datei")
  gtk_widget_set_name (GTK_WIDGET(menuitem_file), "menuitem_file")
  gtk_container_add (GTK_CONTAINER (menubar_1), menuitem_file)

'- Sub Menu Eintrag Popup Datei
  menuitem_file_menu = gtk_menu_new ()
  gtk_widget_set_name (GTK_WIDGET(menuitem_file_menu), "menuitem_file_menu")
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem_file), GTK_WIDGET(menuitem_file_menu))

'- Menu Eintrag Neu
  menuitem_new = gtk_image_menu_item_new_with_mnemonic ("Neu")
  gtk_widget_set_name (GTK_WIDGET(menuitem_new), "menuitem_new")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), GTK_WIDGET(menuitem_new))

  gtk_signal_connect_object (GTK_OBJECT (menuitem_new), "activate", _
                           G_CALLBACK (@on_menuitem_new_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_new), "activate", accel_group, _
                              GDK_N, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image103 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image103), "image103")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_new), image103)


'- Menu Eintrag Öffnen
  menuitem_open = gtk_image_menu_item_new_with_mnemonic (Chr(195)+Chr(150)+"ffnen...")
  gtk_widget_set_name (GTK_WIDGET(menuitem_open), "menuitem_open")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), menuitem_open)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_open), "activate", _
                             G_CALLBACK (@on_menuitem_open_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_open), "activate", accel_group, _
                              GDK_O, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image104 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image104), "image104")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_open), image104)

'- Menu Eintrag Speichern
  menuitem_save = gtk_image_menu_item_new_with_mnemonic ("Speichern")
  gtk_widget_set_name (GTK_WIDGET(menuitem_save), "menuitem_save")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), menuitem_save)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_save), "activate", _
                             G_CALLBACK (@on_menuitem_save_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_save), "activate", accel_group, _
                              GDK_S, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image105 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image105), "image105")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_save), image105)

'- Menu Eintrag Speicher als
  menuitem_saveas = gtk_image_menu_item_new_with_mnemonic ("Speichern als...")
  gtk_widget_set_name (GTK_WIDGET(menuitem_saveas), "menuitem_saveas")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), menuitem_saveas)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_saveas), "activate", _
                             G_CALLBACK (@on_menuitem_saveas_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_saveas), "activate", accel_group, _
                              GDK_A, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image106 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image106), "image106")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_saveas), image106)

'- Menu Eintrag  separator 11
  separator_11 = gtk_menu_item_new ()
  gtk_widget_set_name (GTK_WIDGET(separator_11), "separator_11")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), separator_11)
  gtk_widget_set_sensitive (GTK_WIDGET(separator_11), FALSE)

'- Menu Eintrag Drucken
  menuitem_print = gtk_image_menu_item_new_with_mnemonic ("Drucken")
  gtk_widget_set_name (GTK_WIDGET(menuitem_print), "menuitem_print")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), menuitem_print)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_print), "activate", _
                             G_CALLBACK (@on_menuitem_print_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_print), "activate", accel_group, _
                              GDK_P, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image107 = gtk_image_new_from_stock ("gtk-print", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image107), "image107")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_print), image107)

'- Menu Eintrag separator 12
  separator_12 = gtk_menu_item_new ()
  gtk_widget_set_name (GTK_WIDGET(separator_12), "separator_12")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), separator_12)
  gtk_widget_set_sensitive (GTK_WIDGET(separator_12), FALSE)

'- Menu Eintrag Beenden
  menuitem_quit = gtk_image_menu_item_new_with_mnemonic ("Beenden")
  gtk_widget_set_name (GTK_WIDGET(menuitem_quit), "menuitem_quit")
  gtk_menu_append (GTK_MENU (menuitem_file_menu), menuitem_quit)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_quit), "activate", _
                             G_CALLBACK (@on_menuitem_quit_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_quit), "activate", accel_group, _
                              GDK_Q, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image108 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image108), "image108")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_quit), image108)

'- Haupt Menu Eintrag Bearbeiten
  menuitem_bearbeiten = gtk_menu_item_new_with_mnemonic ("_Bearbeiten")
  gtk_widget_set_name (GTK_WIDGET(menuitem_bearbeiten), "menuitem_bearbeiten")
  gtk_container_add (GTK_CONTAINER (menubar_1), menuitem_bearbeiten)

'- Sub Menu Eintrag Popup Bearbeiten
  menuitem_bearbeiten_menu = gtk_menu_new ()
  gtk_widget_set_name (GTK_WIDGET(menuitem_bearbeiten_menu), "menuitem_bearbeiten_menu")
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem_bearbeiten), menuitem_bearbeiten_menu)

'- Menu Eintrag Ausschneiden
  menuitem_cut = gtk_image_menu_item_new_with_mnemonic ("Ausschneiden")
  gtk_widget_set_name (GTK_WIDGET(menuitem_cut), "menuitem_cut")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_cut)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_cut), "activate", _
                             G_CALLBACK (@on_menuitem_cut_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_cut), "activate", accel_group, _
                              GDK_X, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image109 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image109), "image109")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_cut), image109)

'- Menu Eintrag Kopieren
  menuitem_copy = gtk_image_menu_item_new_with_mnemonic ("Kopieren")
  gtk_widget_set_name (GTK_WIDGET(menuitem_copy), "menuitem_copy")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_copy)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_copy), "activate", _
                             G_CALLBACK (@on_menuitem_copy_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_copy), "activate", accel_group, _
                              GDK_C, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image110 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image110), "image110")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_copy), image110)

'- Menu Eintrag Einfügen
  menuitem_paste = gtk_image_menu_item_new_with_mnemonic ("Einf"+Chr(195)+Chr(188)+"gen")
  gtk_widget_set_name (GTK_WIDGET(menuitem_paste), "menuitem_paste")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_paste)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_paste), "activate", _
                             G_CALLBACK (@on_menuitem_paste_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_paste), "activate", accel_group, _
                              GDK_V, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image111 = gtk_image_new_from_stock ("gtk-paste", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image111), "image111")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_paste), image111)

'- Menu Eintrag Löschen
  menuitem_del = gtk_image_menu_item_new_with_mnemonic ("L"+Chr(195)+Chr(182)+"schen")
  gtk_widget_set_name (GTK_WIDGET(menuitem_del), "menuitem_del")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_del)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_del), "activate", _
                             G_CALLBACK (@on_menuitem_del_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_del), "activate", accel_group, _
                              GDK_Del, 0, _
                              GTK_ACCEL_VISIBLE)

  image112 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image112), "image112")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_del), image112)

'- Menu Eintrag seperator 21
  separator_21 = gtk_menu_item_new ()
  gtk_widget_set_name (GTK_WIDGET(separator_21), "separator_21")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), separator_21)
  gtk_widget_set_sensitive (GTK_WIDGET(separator_21), FALSE)

'- Menu Eintrag Suchen
  menuitem_find = gtk_image_menu_item_new_with_mnemonic ("Suchen...")
  gtk_widget_set_name (GTK_WIDGET(menuitem_find), "menuitem_find")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_find)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_find), "activate", _
                             G_CALLBACK (@on_menuitem_find_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_find), "activate", accel_group, _
                              GDK_F, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image113 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image113), "image113")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_find), image113)

'- Menu Eintrag Ersetzen
  menuitem_replace = gtk_image_menu_item_new_with_mnemonic ("Ersetzen...")
  gtk_widget_set_name (GTK_WIDGET(menuitem_replace), "menuitem_replace")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_replace)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_replace), "activate", _
                             G_CALLBACK (@on_menuitem_replace_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_replace), "activate", accel_group, _
                              GDK_H, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

  image114 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image114), "image114")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_replace), image114)

'- Menu Eintrag separator 22
  separator_22 = gtk_menu_item_new ()
  gtk_widget_set_name (GTK_WIDGET(separator_22), "separator_22")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), separator_22)
  gtk_widget_set_sensitive (GTK_WIDGET(separator_22), FALSE)

'- Menu Eintrag Alles markieren
  menuitem_markall = gtk_menu_item_new_with_mnemonic ("Alles markieren")
  gtk_widget_set_name (GTK_WIDGET(menuitem_markall), "menuitem_markall")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_markall)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_markall), "activate", _
                             G_CALLBACK (@on_menuitem_markall_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_markall), "activate", accel_group, _
                              GDK_M, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

'- Menu Eintrag Markierung entfernen
  menuitem_delmark = gtk_menu_item_new_with_mnemonic ("Markierung entfernen")
  gtk_widget_set_name (GTK_WIDGET(menuitem_delmark), "menuitem_delmark")
  gtk_menu_append (GTK_MENU (menuitem_bearbeiten_menu), menuitem_delmark)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_delmark), "activate", _
                             G_CALLBACK (@on_menuitem_delmark_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_delmark), "activate", accel_group, _
                              GDK_E, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

'- Haupt Menu Eintrag Einfügen
  menuitem_insert = gtk_menu_item_new_with_mnemonic ("_Einf"+Chr(195)+Chr(188)+"gen")
  gtk_widget_set_name (GTK_WIDGET(menuitem_insert), "menuitem_insert")
  gtk_container_add (GTK_CONTAINER (menubar_1), menuitem_insert)

'- Sub Menu Eintrag Popup Einfügen
  menuitem_insert_menu = gtk_menu_new ()
  gtk_widget_set_name (GTK_WIDGET(menuitem_insert_menu), "menuitem_insert_menu")
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem_insert), menuitem_insert_menu)

'- Menu Eintrag Datum
  menuitem_date = gtk_menu_item_new_with_mnemonic ("Datum")
  gtk_widget_set_name (GTK_WIDGET(menuitem_date), "menuitem_date")
  gtk_menu_append (GTK_MENU (menuitem_insert_menu), menuitem_date)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_date), "activate", _
                             G_CALLBACK (@on_menuitem_date_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_date), "activate", accel_group, _
                              GDK_D, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

'- Menu Eintrag Uhrzeit
  menuitem_time = gtk_menu_item_new_with_mnemonic ("Uhrzeit")
  gtk_widget_set_name (GTK_WIDGET(menuitem_time), "menuitem_time")
  gtk_menu_append (GTK_MENU (menuitem_insert_menu), menuitem_time)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_time), "activate", _
                             G_CALLBACK (@on_menuitem_time_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_time), "activate", accel_group, _
                              GDK_U, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

'- Haupt Menu Eintrag Format
  menuitem_format = gtk_menu_item_new_with_mnemonic ("_Format")
  gtk_widget_set_name (GTK_WIDGET(menuitem_format), "menuitem_format")
  gtk_container_add (GTK_CONTAINER (menubar_1), menuitem_format)

'- Sub Menu Eintrag Popup Format
  menuitem_format_menu = gtk_menu_new ()
  gtk_widget_set_name (GTK_WIDGET(menuitem_format_menu), "menuitem_format_menu")
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem_format), menuitem_format_menu)

'- Menu Eintrag Zeilenumbruch
  menuitem_umbruch = gtk_check_menu_item_new_with_mnemonic ("Zeilenumbruch")
  gtk_widget_set_name (GTK_WIDGET(menuitem_umbruch), "menuitem_umbruch")
  gtk_menu_append (GTK_MENU (menuitem_format_menu), menuitem_umbruch)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_umbruch), "activate", _
                             G_CALLBACK (@on_menuitem_umbruch_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_umbruch), "activate", accel_group, _
                              GDK_Z, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem_umbruch), TRUE)

'- Menu Eintrag Schriftart
  menuitem_font = gtk_menu_item_new_with_mnemonic ("Schriftart...")
  gtk_widget_set_name (GTK_WIDGET(menuitem_font), "menuitem_font")
  gtk_menu_append (GTK_MENU (menuitem_format_menu), menuitem_font)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_font), "activate", _
                             G_CALLBACK (@on_menuitem_font_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_font), "activate", accel_group, _
                              GDK_T, GDK_CONTROL_MASK, _
                              GTK_ACCEL_VISIBLE)

'- Haupt Menu Eintrag Anzeige
  menuitem_anzeige = gtk_menu_item_new_with_mnemonic ("_Anzeige")
  gtk_widget_set_name (GTK_WIDGET(menuitem_anzeige), "menuitem_anzeige")
  gtk_container_add (GTK_CONTAINER (menubar_1), menuitem_anzeige)

'- Haupt Menu Eintrag Hilfe
  menuitem_hilfe = gtk_menu_item_new_with_mnemonic ("_Hilfe")
  gtk_widget_set_name (GTK_WIDGET(menuitem_hilfe), "menuitem_hilfe")
  gtk_container_add (GTK_CONTAINER (menubar_1), menuitem_hilfe)

'- Sub Menu Eintrag Popup Hilfe
  menuitem_hilfe_menu = gtk_menu_new ()
  gtk_widget_set_name (GTK_WIDGET(menuitem_hilfe_menu), "menuitem_hilfe_menu")
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem_hilfe), menuitem_hilfe_menu)

'- Menu Eintrag Hilfe
  menuitem_help = gtk_image_menu_item_new_with_mnemonic ("Hilfe")
  gtk_widget_set_name (GTK_WIDGET(menuitem_help), "menuitem_help")
  gtk_menu_append (GTK_MENU (menuitem_hilfe_menu), menuitem_help)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_help), "activate", _
                              G_CALLBACK (@on_help_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_help), "activate", accel_group, _
                              GDK_F1, 0, _
                              GTK_ACCEL_VISIBLE)

  image115 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image115), "image115")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_help), image115)

'- Menu Eintrag separator 61
  separator_61 = gtk_menu_item_new ()
  gtk_widget_set_name (GTK_WIDGET(separator_61), "separator_61")
  gtk_menu_append (GTK_MENU (menuitem_hilfe_menu), separator_61)
  gtk_widget_set_sensitive (GTK_WIDGET(separator_61), FALSE)

'- Menu Eintrag Über
  menuitem_about = gtk_image_menu_item_new_with_mnemonic (chr(195)+chr(156)+"ber")
  gtk_widget_set_name (GTK_WIDGET(menuitem_about), "menuitem_about")
  gtk_menu_append (GTK_MENU (menuitem_hilfe_menu), menuitem_about)

  gtk_signal_connect_object (GTK_OBJECT (menuitem_about), "activate", _
                             G_CALLBACK (@on_about1_activate), NULL)

  gtk_widget_add_accelerator (GTK_WIDGET(menuitem_about), "activate", accel_group, _
                              GDK_F12, 0, _
                              GTK_ACCEL_VISIBLE)

  image116 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU)
  gtk_widget_set_name (GTK_WIDGET(image116), "image116")
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem_about), image116)

'- Image für die Toolbar vom Stock laden
  image203 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image204 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image205 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image206 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image207 = gtk_image_new_from_stock ("gtk-print", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image208 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image209 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image210 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image211 = gtk_image_new_from_stock ("gtk-paste", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image212 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image213 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_SMALL_TOOLBAR)
  image214 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_SMALL_TOOLBAR)


'- Toolbar
  toolbar_1 = gtk_toolbar_new ()
  gtk_widget_set_name (toolbar_1, "toolbar_1")
  gtk_box_pack_start (GTK_BOX (vbox_1), toolbar_1, FALSE, FALSE, 0)
  gtk_container_set_border_width (GTK_CONTAINER (toolbar_1), 2)
  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar_1), GTK_TOOLBAR_ICONS)
  gtk_toolbar_set_icon_size (GTK_TOOLBAR (toolbar_1), GTK_ICON_SIZE_SMALL_TOOLBAR)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Ein neues leeres Formular anzeigen", _
                           "", image203, G_CALLBACK (@on_menuitem_new_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Eine vorhandene Datei anzeigen", _
                           "", image204, G_CALLBACK (@on_menuitem_open_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Datei unter aktuellem Namen erneuern", _
                           "", image205, G_CALLBACK (@on_menuitem_save_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Datei unter neuem Namen speichern", _
                           "", image206, G_CALLBACK (@on_menuitem_saveas_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Formular drucken", _
                           "", image207, G_CALLBACK (@on_menuitem_print_activate), 0)

  gtk_toolbar_insert_space (GTK_TOOLBAR (toolbar_1), 5)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Markiertes in die Zwischenablage kopieren und ausschneiden", _
                           "", image209, G_CALLBACK (@on_menuitem_cut_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Markiertes in die Zwischenablage kopieren", _
                           "", image210, G_CALLBACK (@on_menuitem_copy_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "An Cursor position einf"+Chr(195)+Chr(188)+"gen", _
                           "", image211, G_CALLBACK (@on_menuitem_paste_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Markiertes l"+Chr(195)+Chr(182)+"schen", _
                           "", image212, G_CALLBACK (@on_menuitem_del_activate), 0)

  gtk_toolbar_insert_space (GTK_TOOLBAR (toolbar_1), 10)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Im Formular suchen", _
                           "", image213, G_CALLBACK (@on_menuitem_find_activate), 0)

  gtk_toolbar_append_item (GTK_TOOLBAR (toolbar_1), "", "Im Formular suchen und ersetzen", _
                           "", image214, G_CALLBACK (@on_menuitem_replace_activate), 0)

'- Box für das Lineal
  fixed_1 = gtk_fixed_new ()
  gtk_widget_set_name (fixed_1, "fixed_1")
  gtk_box_pack_start (GTK_BOX (vbox_1), fixed_1, FALSE, TRUE, 0)

  hruler_1 = gtk_hruler_new ()
  gtk_widget_set_name (hruler_1, "hruler_1")
  gtk_fixed_put (GTK_FIXED (fixed_1), hruler_1, 0, 0)
  gtk_widget_set_size_request (hruler_1, 450, 25)
  gtk_ruler_set_metric (GTK_RULER (hruler_1), GTK_CENTIMETERS)
  gtk_ruler_set_range (GTK_RULER (hruler_1), 0, 400, 160, 100)

  fixed_2 = gtk_fixed_new ()
  gtk_widget_set_name (fixed_2, "fixed_2")
  gtk_box_pack_end (GTK_BOX (vbox_1), fixed_2, FALSE, TRUE, 0)
  gtk_container_set_border_width (GTK_CONTAINER (fixed_2), 2)

  entry_1 = gtk_entry_new ()
  gtk_widget_set_name (entry_1, "entry_1")
  gtk_fixed_put (GTK_FIXED (fixed_2), entry_1, 0, 0)
  gtk_widget_set_size_request (entry_1, 25, 20)
  gtk_entry_set_max_length (GTK_ENTRY (entry_1), 3)
  gtk_editable_set_editable (GTK_EDITABLE (entry_1), FALSE)
  gtk_entry_set_text (GTK_ENTRY (entry_1), "---")

  entry_2 = gtk_entry_new ()
  gtk_widget_set_name (entry_2, "entry_2")
  gtk_fixed_put (GTK_FIXED (fixed_2), entry_2, 25, 0)
  gtk_widget_set_size_request (entry_2, 55, 20)
  gtk_entry_set_max_length (GTK_ENTRY (entry_2), 7)
  gtk_editable_set_editable (GTK_EDITABLE (entry_2), FALSE)
  gtk_entry_set_text (GTK_ENTRY (entry_2), "X-Pos:")

  entry_3 = gtk_entry_new ()
  gtk_widget_set_name (entry_3, "entry_3")
  gtk_fixed_put (GTK_FIXED (fixed_2), entry_3, 80, 0)
  gtk_widget_set_size_request (entry_3, 55, 20)
  gtk_entry_set_max_length (GTK_ENTRY (entry_3), 7)
  gtk_entry_set_text (GTK_ENTRY (entry_3), "0")

  entry_4 = gtk_entry_new ()
  gtk_widget_set_name (entry_4, "entry_4")
  gtk_fixed_put (GTK_FIXED (fixed_2), entry_4, 135, 0)
  gtk_widget_set_size_request (entry_4, 55, 20)
  gtk_entry_set_max_length (GTK_ENTRY (entry_4), 7)
  gtk_editable_set_editable (GTK_EDITABLE (entry_4), FALSE)
  gtk_entry_set_text (GTK_ENTRY (entry_4), "X-Pos:")

  entry_5 = gtk_entry_new ()
  gtk_widget_set_name (entry_5, "entry_5")
  gtk_fixed_put (GTK_FIXED (fixed_2), entry_5, 190, 0)
  gtk_widget_set_size_request (entry_5, 55, 20)
  gtk_entry_set_text (GTK_ENTRY (entry_5), "0")

  entry_6 = gtk_entry_new ()
  gtk_widget_set_name (entry_6, "entry_6")
  gtk_fixed_put (GTK_FIXED (fixed_2), entry_6, 245, 0)
  gtk_widget_set_size_request (entry_6, 200, 20)
  gtk_entry_set_text (GTK_ENTRY (entry_6), "Hier stehen Meldungen")

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL)
  gtk_widget_set_name (scrolledwindow1, "scrolledwindow1")
  gtk_box_pack_start (GTK_BOX (vbox_1), scrolledwindow1, TRUE, TRUE, 0)

  textview_1 = gtk_text_view_new ()
  gtk_widget_set_name (textview_1, "textview_1")
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview_1)

  gtk_widget_show_all (window_1)