more callbacks for the help menu
[xboard.git] / callback.c
index ca9f23e..4bc9210 100644 (file)
@@ -1,5 +1,6 @@
 #include <gtk/gtk.h>
 #include "common.h"
+#include "xboard.h"
 #include <errno.h>
 #include "backend.h"
 
@@ -32,6 +33,44 @@ QuitProc (object, user_data)
   ExitEvent(0);
 }
 
+/* Help Menu */
+void InfoProc(object, user_data)
+     GtkObject *object;
+     gpointer user_data;
+{
+    char buf[MSG_SIZ];
+    snprintf(buf, sizeof(buf), "xterm -e info --directory %s --directory . -f %s &",
+           INFODIR, INFOFILE);
+    system(buf);
+    return;
+}
+
+void ManProc(object, user_data)
+     GtkObject *object;
+     gpointer user_data;
+{
+    char buf[MSG_SIZ];
+    snprintf(buf, sizeof(buf), "xterm -e man xboard &");
+    system(buf);
+    return;
+}
+
+void HintProc(object, user_data)
+     GtkObject *object;
+     gpointer user_data;
+{
+    HintEvent();
+    return;
+}
+
+void BookProc(object, user_data)
+     GtkObject *object;
+     gpointer user_data;
+{
+    BookEvent();
+    return;
+}
+
 void AboutProc (object, user_data)
      GtkObject *object;
      gpointer user_data;
@@ -79,6 +118,8 @@ void AboutProc (object, user_data)
   gtk_widget_destroy(about);
 }
 
+/* End Help Menu */
+
 void IcsClientProc(object, user_data)
      GtkObject *object;
      gpointer user_data;
@@ -303,6 +344,18 @@ void RetractMoveProc(object, user_data)
     return;
 }
 
+/* Option Menu */
+void FlipViewProc(object, user_data)
+     GtkObject *object;
+     gpointer user_data;
+{
+  printf("DEBUG: in flip view\n");
+    flipView = !flipView;
+    DrawPosition(True, NULL);
+    return;
+}
+
+
 gboolean CloseWindowProc(GtkWidget *button)
 {
     gtk_widget_destroy(gtk_widget_get_toplevel(button));