Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/include/constants.h
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/include/constants.h	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/include/constants.h	(revision 13401)
@@ -10,11 +10,11 @@
  | PointerMotionMask)
 
-# define PAD1  5
-# define PAD2  3
+# define PAD1  3
+# define PAD2  5
 # define TEXTPAD 25
 # define COLORPAD 10
 # define TEXT_Y 15
-# define ZOOM_X 170
-# define ZOOM_Y 170
+# define ZOOM_X 152
+# define ZOOM_Y 152
 # define NOVERLAYS 4
 # define BUTTON_WIDTH 28
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/include/structures.h
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/include/structures.h	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/include/structures.h	(revision 13401)
@@ -138,9 +138,10 @@
   Button   grey_button;
   Button   rainbow_button;
-  Button   puns_button;
+  Button    puns_button;
   Button   overlay_button[NOVERLAYS];
 
   // location of the status box
   int      text_x, text_y;
+  int      text_dx, text_dy;
   int      location;	      // position of the zoom/status widgets (0 = none, 1-4 = bottom,left,top,right)
   int      MovePointer;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/DefineSection.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/DefineSection.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/DefineSection.c	(revision 13401)
@@ -33,6 +33,5 @@
 
   if (MoveSection) {
-    SetGraphSize (section);
-    SetImageSize (section);
+    SetSectionSizes (section);
     Refresh (1);
   }
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Image.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Image.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Image.c	(revision 13401)
@@ -96,8 +96,8 @@
   graphic = GetGraphic ();
 
-  XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].fore);
-  XDrawRectangle (graphic[0].display, graphic[0].window, graphic[0].gc, 
-		  image[0].picture.x, image[0].picture.y, 
-		  image[0].picture.dx + 1, image[0].picture.dy + 1);
+  XSetForeground (graphic[0].display,  graphic[0].gc, graphic[0].fore);
+  XDrawRectangle (graphic[0].display,  graphic[0].window, graphic[0].gc, 
+		  image[0].picture.x,  image[0].picture.y, 
+		  image[0].picture.dx+1, image[0].picture.dy+1);
   
   XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
@@ -124,8 +124,9 @@
   
     /* erase everything below zoom box, then draw */
+    /*
     XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].back);
     XFillRectangle (graphic[0].display, graphic[0].window, graphic[0].gc, 
-		    image[0].text_x, image[0].text_x, image[0].zoom.dx, graphic[0].dy); 
-    
+		    image[0].text_x, image[0].text_x, image[0].text_dx, image[0].text_dy); 
+    */    
     DrawButton (graphic, &image[0].PS_button);
     DrawButton (graphic, &image[0].recenter_button);
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadFrame.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadFrame.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadFrame.c	(revision 13401)
@@ -11,5 +11,5 @@
   if (section->graph == NULL) {
     section->graph = InitGraph ();
-    SetGraphSize (section);
+    SetSectionSizes (section);
   }
   graph = section->graph;
@@ -62,5 +62,5 @@
   }
 
-  SetGraphSize (section);
+  SetSectionSizes (section);
   if (USE_XWINDOW) DrawFrame (graph);
   FlushDisplay ();
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadLabels.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadLabels.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadLabels.c	(revision 13401)
@@ -11,5 +11,5 @@
   if (section->graph == NULL) {
     section->graph = InitGraph ();
-    SetGraphSize (section);
+    SetSectionSizes (section);
   }
   graph = section->graph;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadObject.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadObject.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadObject.c	(revision 13401)
@@ -11,5 +11,5 @@
   if (section->graph == NULL) {
     section->graph = InitGraph ();
-    SetGraphSize (section);
+    SetSectionSizes (section);
   }
   graph = section->graph;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadOverlay.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadOverlay.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadOverlay.c	(revision 13401)
@@ -17,5 +17,5 @@
   if (section->image == NULL) {
     section->image = InitImage ();
-    SetImageSize (section);
+    SetSectionSizes (section);
   }
   image   = section->image;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadPicture.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadPicture.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadPicture.c	(revision 13401)
@@ -14,5 +14,5 @@
   if (section->image == NULL) {
     section->image = InitImage ();
-    SetImageSize (section);
+    SetSectionSizes (section);
   }
   image = section->image;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTextlines.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTextlines.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTextlines.c	(revision 13401)
@@ -13,5 +13,5 @@
     if (section->graph == NULL) {
     section->graph = InitGraph ();
-    SetGraphSize (section);
+    SetSectionSizes (section);
   }
 
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTickmarks.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTickmarks.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/LoadTickmarks.c	(revision 13401)
@@ -12,5 +12,5 @@
   if (section->image == NULL) {
     section->image = InitImage ();
-    SetImageSize (section);
+    SetSectionSizes (section);
   }
   image   = section->image;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Reconfig.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Reconfig.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Reconfig.c	(revision 13401)
@@ -25,6 +25,5 @@
   for (i = 0; i < Nsection; i++) {
       section = GetSectionByNumber (i);
-      SetGraphSize (section);
-      SetImageSize (section);
+      SetSectionSizes (section);
   }
 
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Resize.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Resize.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Resize.c	(revision 13401)
@@ -30,6 +30,5 @@
   for (i = 0; i < Nsection; i++) {
       section = GetSectionByNumber (i);
-      SetGraphSize (section);
-      SetImageSize (section);
+      SetSectionSizes (section);
   }
 
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Sections.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Sections.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/Sections.c	(revision 13401)
@@ -147,2 +147,9 @@
   return (TRUE);
 }
+
+void SetSectionSizes (Section *section) {
+
+    SetGraphSize (section);
+    SetImageSize (section);
+    return;
+}
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetImageSize.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetImageSize.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetImageSize.c	(revision 13401)
@@ -8,5 +8,7 @@
 
   int Xs, Ys, Xe, Ye, dX, dY;
+  int textpad, textdY, WdY; 
   KapaImageWidget *image;
+  KapaGraphWidget *graph;
   Graphic *graphic;
 
@@ -14,4 +16,5 @@
   image = section->image;
   if (image == NULL) return;
+  graph = section->graph;
 
   graphic = GetGraphic ();
@@ -28,118 +31,255 @@
   switch (image[0].location) {
     case 0:
-      image[0].picture.dx = dX - 2*PAD1; 
-      image[0].picture.dy = dY - 2*PAD1;
-      image[0].picture.x = Xs + PAD1;
-      image[0].picture.y = Ys + PAD1;
+      if (section->graph) {
+	  image[0].picture.x = graph[0].axis[0].fx;
+	  image[0].picture.y = graph[0].axis[1].fy + graph[0].axis[1].dfy;
+	  image[0].picture.dx = graph[0].axis[0].dfx;
+	  image[0].picture.dy = -graph[0].axis[1].dfy;
+      } else {
+	  image[0].picture.dx = dX - 2*PAD1; 
+	  image[0].picture.dy = dY - 2*PAD1;
+	  image[0].picture.x = Xs + PAD1;
+	  image[0].picture.y = Ys + PAD1;
+      }
       if (USE_XWINDOW) CreatePicture (image, graphic);
       Remap (graphic, image, &image[0].matrix);
       return;
 
+    case 1:
+      textpad = graphic[0].font[0].ascent;
+      textdY = 6*textpad + 7*PAD1;
+      WdY = MAX (ZOOM_Y, textdY + 2*BUTTON_HEIGHT + PAD1);
+
+      image[0].picture.dx = dX - 2*PAD1; 
+      image[0].picture.dy = dY - 5*PAD1 - WdY - COLORPAD;
+      image[0].picture.x = Xs + PAD1;
+      image[0].picture.y = Ys + 2*PAD1 + COLORPAD;
+
+      image[0].cmapbar.dx = dX - 2*PAD1; 
+      image[0].cmapbar.dy = COLORPAD;
+      image[0].cmapbar.x = Xs + PAD1;
+      image[0].cmapbar.y = Ys + PAD1;
+
+      // XXX zoom should scale somewhat with the image? (with a min and a max)
+      // XXX actually, it is limited by the buttons and status region
+      image[0].zoom.dx = ZOOM_X; 
+      image[0].zoom.dy = ZOOM_Y;
+      image[0].zoom.x = Xs + PAD1;
+      image[0].zoom.y = image[0].picture.y + image[0].picture.dy + PAD1;
+
+      /** everything below is tied in x-dir to the zoom box **/
+      image[0].text_x = image[0].zoom.x + image[0].zoom.dx + PAD1;
+      image[0].text_y = image[0].zoom.y;
+      image[0].text_dx = ZOOM_X;
+      image[0].text_dy = 6*textpad + 7*PAD1;
+
+      image[0].overlay_button[0].x = image[0].text_x;
+      image[0].overlay_button[0].y = image[0].text_y + image[0].text_dy + PAD1;
+   
+      image[0].overlay_button[1].x = image[0].overlay_button[0].x + image[0].overlay_button[0].dx + PAD1;
+      image[0].overlay_button[1].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[2].x = image[0].overlay_button[1].x + image[0].overlay_button[1].dx + PAD1;
+      image[0].overlay_button[2].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[3].x = image[0].overlay_button[2].x + image[0].overlay_button[2].dx + PAD1;
+      image[0].overlay_button[3].y = image[0].overlay_button[0].y;
+
+      image[0].hms_button.x = image[0].overlay_button[3].x + image[0].overlay_button[3].dx + PAD1;
+      image[0].hms_button.y = image[0].overlay_button[0].y;
+
+      image[0].PS_button.x = image[0].text_x;
+      image[0].PS_button.y = image[0].overlay_button[0].y + BUTTON_HEIGHT + PAD1;
+
+      /** everything below is tied to the PS_button in y-dir + the neighbor in x-dir **/
+      image[0].grey_button.x = image[0].PS_button.x + image[0].PS_button.dx + PAD1;
+      image[0].grey_button.y = image[0].PS_button.y;
+
+      image[0].rainbow_button.x = image[0].grey_button.x + image[0].grey_button.dx + PAD1;
+      image[0].rainbow_button.y = image[0].PS_button.y;
+
+      image[0].puns_button.x = image[0].rainbow_button.x + image[0].rainbow_button.dx + PAD1;
+      image[0].puns_button.y = image[0].PS_button.y;
+
+      image[0].recenter_button.x = image[0].puns_button.x + image[0].puns_button.dx + PAD1;
+      image[0].recenter_button.y = image[0].PS_button.y;
+      break;
+
+    case 3:
+      textpad = graphic[0].font[0].ascent;
+      textdY = 6*textpad + 7*PAD1;
+      WdY = MAX (ZOOM_Y, textdY + 2*BUTTON_HEIGHT + PAD1);
+
+      image[0].picture.dx = dX - 2*PAD1; 
+      image[0].picture.dy = dY - 5*PAD1 - WdY - COLORPAD;
+      image[0].picture.x = Xs + PAD1;
+      image[0].picture.y = Ys + 4*PAD1 + COLORPAD + WdY;
+
+      image[0].cmapbar.dx = dX - 2*PAD1; 
+      image[0].cmapbar.dy = COLORPAD;
+      image[0].cmapbar.x = Xs + PAD1;
+      image[0].cmapbar.y = Ys + PAD1;
+
+      // XXX zoom should scale somewhat with the image? (with a min and a max)
+      // XXX actually, it is limited by the buttons and status region
+      image[0].zoom.dx = ZOOM_X; 
+      image[0].zoom.dy = ZOOM_Y;
+      image[0].zoom.x = Xs + PAD1;
+      image[0].zoom.y = Ys + 2*PAD1 + COLORPAD;
+
+      /** everything below is tied in x-dir to the zoom box **/
+      image[0].text_x = image[0].zoom.x + image[0].zoom.dx + PAD1;
+      image[0].text_y = image[0].zoom.y;
+      image[0].text_dx = ZOOM_X;
+      image[0].text_dy = 6*textpad + 7*PAD1;
+
+      image[0].overlay_button[0].x = image[0].text_x;
+      image[0].overlay_button[0].y = image[0].text_y + image[0].text_dy + PAD1;
+   
+      image[0].overlay_button[1].x = image[0].overlay_button[0].x + image[0].overlay_button[0].dx + PAD1;
+      image[0].overlay_button[1].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[2].x = image[0].overlay_button[1].x + image[0].overlay_button[1].dx + PAD1;
+      image[0].overlay_button[2].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[3].x = image[0].overlay_button[2].x + image[0].overlay_button[2].dx + PAD1;
+      image[0].overlay_button[3].y = image[0].overlay_button[0].y;
+
+      image[0].hms_button.x = image[0].overlay_button[3].x + image[0].overlay_button[3].dx + PAD1;
+      image[0].hms_button.y = image[0].overlay_button[0].y;
+
+      image[0].PS_button.x = image[0].text_x;
+      image[0].PS_button.y = image[0].overlay_button[0].y + BUTTON_HEIGHT + PAD1;
+
+      /** everything below is tied to the PS_button in y-dir + the neighbor in x-dir **/
+      image[0].grey_button.x = image[0].PS_button.x + image[0].PS_button.dx + PAD1;
+      image[0].grey_button.y = image[0].PS_button.y;
+
+      image[0].rainbow_button.x = image[0].grey_button.x + image[0].grey_button.dx + PAD1;
+      image[0].rainbow_button.y = image[0].PS_button.y;
+
+      image[0].puns_button.x = image[0].rainbow_button.x + image[0].rainbow_button.dx + PAD1;
+      image[0].puns_button.y = image[0].PS_button.y;
+
+      image[0].recenter_button.x = image[0].puns_button.x + image[0].puns_button.dx + PAD1;
+      image[0].recenter_button.y = image[0].PS_button.y;
+      break;
+
+    case 2:
+      image[0].picture.dx = dX - 3*PAD1 - ZOOM_X; 
+      image[0].picture.dy = dY - 3*PAD1 - COLORPAD;
+      image[0].picture.x = Xs + 2*PAD1 + ZOOM_X;
+      image[0].picture.y = Ys + 2*PAD1 + COLORPAD;
+
+      image[0].cmapbar.dx = dX - 2*PAD1; 
+      image[0].cmapbar.dy = COLORPAD;
+      image[0].cmapbar.x = Xs + PAD1;
+      image[0].cmapbar.y = Ys + PAD1;
+
+      // XXX zoom should scale somewhat with the image? (with a min and a max)
+      // XXX actually, it is limited by the buttons and status region
+      image[0].zoom.dx = ZOOM_X; 
+      image[0].zoom.dy = ZOOM_Y;
+      image[0].zoom.x = Xs + PAD1;
+      image[0].zoom.y = image[0].picture.y;
+
+      /** everything below is tied in x-dir to the zoom box **/
+      textpad = graphic[0].font[0].ascent;
+      image[0].text_x = image[0].zoom.x;
+      image[0].text_y = image[0].zoom.y + image[0].zoom.dy + PAD1;
+      image[0].text_dx = ZOOM_X;
+      image[0].text_dy = 6*textpad + 7*PAD1;
+
+      image[0].overlay_button[0].x = image[0].text_x;
+      image[0].overlay_button[0].y = image[0].text_y + image[0].text_dy + PAD1;
+   
+      image[0].overlay_button[1].x = image[0].overlay_button[0].x + image[0].overlay_button[0].dx + PAD1;
+      image[0].overlay_button[1].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[2].x = image[0].overlay_button[1].x + image[0].overlay_button[1].dx + PAD1;
+      image[0].overlay_button[2].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[3].x = image[0].overlay_button[2].x + image[0].overlay_button[2].dx + PAD1;
+      image[0].overlay_button[3].y = image[0].overlay_button[0].y;
+
+      image[0].hms_button.x = image[0].overlay_button[3].x + image[0].overlay_button[3].dx + PAD1;
+      image[0].hms_button.y = image[0].overlay_button[0].y;
+
+      image[0].PS_button.x = image[0].zoom.x;
+      image[0].PS_button.y = image[0].overlay_button[0].y + BUTTON_HEIGHT + PAD1;
+
+      /** everything below is tied to the PS_button in y-dir + the neighbor in x-dir **/
+      image[0].grey_button.x = image[0].PS_button.x + image[0].PS_button.dx + PAD1;
+      image[0].grey_button.y = image[0].PS_button.y;
+
+      image[0].rainbow_button.x = image[0].grey_button.x + image[0].grey_button.dx + PAD1;
+      image[0].rainbow_button.y = image[0].PS_button.y;
+
+      image[0].puns_button.x = image[0].rainbow_button.x + image[0].rainbow_button.dx + PAD1;
+      image[0].puns_button.y = image[0].PS_button.y;
+
+      image[0].recenter_button.x = image[0].puns_button.x + image[0].puns_button.dx + PAD1;
+      image[0].recenter_button.y = image[0].PS_button.y;
+      break;
+
     case 4:
-      image[0].picture.dx = dX - 2*PAD1 - ZOOM_X; 
-      image[0].picture.dy = dY - 2*PAD1 - PAD2 - COLORPAD - 25;
+      image[0].picture.dx = dX - 3*PAD1 - ZOOM_X; 
+      image[0].picture.dy = dY - 3*PAD1 - COLORPAD;
       image[0].picture.x = Xs + PAD1;
-      image[0].picture.y = Ys + PAD1 + PAD2 + COLORPAD;
-
-      image[0].cmapbar.dx = dX - 2*PAD1; 
-      image[0].cmapbar.dy = COLORPAD;
-      image[0].cmapbar.x = Xs + PAD1;
-      image[0].cmapbar.y = Ys + PAD1;
-
-      // XXX zoom should scale somewhat with the image (with a min and a max)
-      image[0].zoom.dx = ZOOM_X; 
-      image[0].zoom.dy = ZOOM_Y;
-      image[0].zoom.x = Xs + dX - PAD1 - ZOOM_X;
-      image[0].zoom.y = Ys + PAD1 + PAD2 + COLORPAD;
-
-      /** everything below is tied in x-dir to the zoom box **/
+      image[0].picture.y = Ys + 2*PAD1 + COLORPAD;
+
+      image[0].cmapbar.dx = dX - 2*PAD1; 
+      image[0].cmapbar.dy = COLORPAD;
+      image[0].cmapbar.x = Xs + PAD1;
+      image[0].cmapbar.y = Ys + PAD1;
+
+      // XXX zoom should scale somewhat with the image? (with a min and a max)
+      // XXX actually, it is limited by the buttons and status region
+      image[0].zoom.dx = ZOOM_X; 
+      image[0].zoom.dy = ZOOM_Y;
+      image[0].zoom.x = image[0].picture.x + image[0].picture.dx + PAD1;
+      image[0].zoom.y = image[0].picture.y;
+
+      /** everything below is tied in x-dir to the zoom box **/
+      textpad = graphic[0].font[0].ascent;
       image[0].text_x = image[0].zoom.x;
-      image[0].text_y = image[0].zoom.y + image[0].zoom.dy + PAD2;
-
-      /*  image[0].PS_button.y = graphic[0].dy - BUTTON_HEIGHT - PAD1; */
-      image[0].PS_button.x = image[0].zoom.x + 5;
-      image[0].PS_button.y = Ys + 2*ZOOM_Y;
-
-      /** everything below is tied to the PS_button in y-dir **/
-      image[0].grey_button.x = image[0].PS_button.x + image[0].PS_button.dx + PAD1;
-      image[0].grey_button.y = image[0].PS_button.y;
-
-      image[0].rainbow_button.x = image[0].grey_button.x + image[0].grey_button.dx + PAD1;
-      image[0].rainbow_button.y = image[0].PS_button.y;
-
-      image[0].puns_button.x = image[0].rainbow_button.x + image[0].rainbow_button.dx + PAD1;
-      image[0].puns_button.y = image[0].PS_button.y;
-
-      image[0].recenter_button.x = image[0].puns_button.x + image[0].puns_button.dx + PAD1;
-      image[0].recenter_button.y = image[0].PS_button.y;
-
-      image[0].overlay_button[0].x = image[0].zoom.x + 5;
-      image[0].overlay_button[0].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-   
-      image[0].overlay_button[1].x = image[0].overlay_button[0].x + image[0].overlay_button[0].dx + PAD1;
-      image[0].overlay_button[1].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-
-      image[0].overlay_button[2].x = image[0].overlay_button[1].x + image[0].overlay_button[1].dx + PAD1;
-      image[0].overlay_button[2].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-
-      image[0].overlay_button[3].x = image[0].overlay_button[2].x + image[0].overlay_button[2].dx + PAD1;
-      image[0].overlay_button[3].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-
-      image[0].hms_button.x = image[0].overlay_button[3].x + image[0].overlay_button[3].dx + PAD1;
-      image[0].hms_button.y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
+      image[0].text_y = image[0].zoom.y + image[0].zoom.dy + PAD1;
+      image[0].text_dx = ZOOM_X;
+      image[0].text_dy = 6*textpad + 7*PAD1;
+
+      image[0].overlay_button[0].x = image[0].text_x;
+      image[0].overlay_button[0].y = image[0].text_y + image[0].text_dy + PAD1;
+   
+      image[0].overlay_button[1].x = image[0].overlay_button[0].x + image[0].overlay_button[0].dx + PAD1;
+      image[0].overlay_button[1].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[2].x = image[0].overlay_button[1].x + image[0].overlay_button[1].dx + PAD1;
+      image[0].overlay_button[2].y = image[0].overlay_button[0].y;
+
+      image[0].overlay_button[3].x = image[0].overlay_button[2].x + image[0].overlay_button[2].dx + PAD1;
+      image[0].overlay_button[3].y = image[0].overlay_button[0].y;
+
+      image[0].hms_button.x = image[0].overlay_button[3].x + image[0].overlay_button[3].dx + PAD1;
+      image[0].hms_button.y = image[0].overlay_button[0].y;
+
+      image[0].PS_button.x = image[0].zoom.x;
+      image[0].PS_button.y = image[0].overlay_button[0].y + BUTTON_HEIGHT + PAD1;
+
+      /** everything below is tied to the PS_button in y-dir + the neighbor in x-dir **/
+      image[0].grey_button.x = image[0].PS_button.x + image[0].PS_button.dx + PAD1;
+      image[0].grey_button.y = image[0].PS_button.y;
+
+      image[0].rainbow_button.x = image[0].grey_button.x + image[0].grey_button.dx + PAD1;
+      image[0].rainbow_button.y = image[0].PS_button.y;
+
+      image[0].puns_button.x = image[0].rainbow_button.x + image[0].rainbow_button.dx + PAD1;
+      image[0].puns_button.y = image[0].PS_button.y;
+
+      image[0].recenter_button.x = image[0].puns_button.x + image[0].puns_button.dx + PAD1;
+      image[0].recenter_button.y = image[0].PS_button.y;
       break;
 
     default:
-      image[0].picture.dx = dX - 2*PAD1 - ZOOM_X; 
-      image[0].picture.dy = dY - 2*PAD1 - PAD2 - COLORPAD - 25;
-      image[0].picture.x = Xs + PAD1;
-      image[0].picture.y = Ys + PAD1 + PAD2 + COLORPAD;
-
-      image[0].cmapbar.dx = dX - 2*PAD1; 
-      image[0].cmapbar.dy = COLORPAD;
-      image[0].cmapbar.x = Xs + PAD1;
-      image[0].cmapbar.y = Ys + PAD1;
-
-      // XXX zoom should scale somewhat with the image (with a min and a max)
-      image[0].zoom.dx = ZOOM_X; 
-      image[0].zoom.dy = ZOOM_Y;
-      image[0].zoom.x = Xs + dX - PAD1 - ZOOM_X;
-      image[0].zoom.y = Ys + PAD1 + PAD2 + COLORPAD;
-
-      /** everything below is tied in x-dir to the zoom box **/
-      image[0].text_x = image[0].zoom.x;
-      image[0].text_y = image[0].zoom.y + image[0].zoom.dy + PAD2;
-
-      /*  image[0].PS_button.y = graphic[0].dy - BUTTON_HEIGHT - PAD1; */
-      image[0].PS_button.x = image[0].zoom.x + 5;
-      image[0].PS_button.y = Ys + 2*ZOOM_Y;
-
-      /** everything below is tied to the PS_button in y-dir **/
-      image[0].grey_button.x = image[0].PS_button.x + image[0].PS_button.dx + PAD1;
-      image[0].grey_button.y = image[0].PS_button.y;
-
-      image[0].rainbow_button.x = image[0].grey_button.x + image[0].grey_button.dx + PAD1;
-      image[0].rainbow_button.y = image[0].PS_button.y;
-
-      image[0].puns_button.x = image[0].rainbow_button.x + image[0].rainbow_button.dx + PAD1;
-      image[0].puns_button.y = image[0].PS_button.y;
-
-      image[0].recenter_button.x = image[0].puns_button.x + image[0].puns_button.dx + PAD1;
-      image[0].recenter_button.y = image[0].PS_button.y;
-
-      image[0].overlay_button[0].x = image[0].zoom.x + 5;
-      image[0].overlay_button[0].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-   
-      image[0].overlay_button[1].x = image[0].overlay_button[0].x + image[0].overlay_button[0].dx + PAD1;
-      image[0].overlay_button[1].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-
-      image[0].overlay_button[2].x = image[0].overlay_button[1].x + image[0].overlay_button[1].dx + PAD1;
-      image[0].overlay_button[2].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-
-      image[0].overlay_button[3].x = image[0].overlay_button[2].x + image[0].overlay_button[2].dx + PAD1;
-      image[0].overlay_button[3].y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
-
-      image[0].hms_button.x = image[0].overlay_button[3].x + image[0].overlay_button[3].dx + PAD1;
-      image[0].hms_button.y = image[0].PS_button.y - BUTTON_HEIGHT - PAD1;
+      abort ();
       break;
   }
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetLimits.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetLimits.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetLimits.c	(revision 13401)
@@ -16,5 +16,5 @@
   if (section->graph == NULL) {
     section->graph = InitGraph ();
-    SetGraphSize (section);
+    SetSectionSizes (section);
   }
   graph = section->graph;
@@ -59,8 +59,2 @@
   return (TRUE);
 }
-
-/* example for image:
-   
-    section->image = InitImage ();
-    SetImageSize (section);
-*/
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetNormalHints.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetNormalHints.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/SetNormalHints.c	(revision 13401)
@@ -17,5 +17,6 @@
 
   // XXX : can we drop the position flag 
-  sizehints[0].flags = USPosition | USSize | PMinSize;
+  // sizehints[0].flags = USPosition | USSize | PMinSize;
+  sizehints[0].flags = USSize | PMinSize;
 
   sizehints[0].base_width = graphic->dx;
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/UpdatePointer.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/UpdatePointer.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/UpdatePointer.c	(revision 13401)
@@ -14,4 +14,5 @@
   image   = section->image;
   if (image == NULL) return (TRUE);
+  if (!image[0].location) return (TRUE);
 
   if (image[0].MovePointer && InPicture ((XButtonEvent *)event, &image[0].picture)) {
Index: /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/UpdateStatusBox.c
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/UpdateStatusBox.c	(revision 13400)
+++ /branches/kapa-mods-2007-05/Ohana/src/kapa2/src/UpdateStatusBox.c	(revision 13401)
@@ -14,8 +14,8 @@
     XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].back);
     XFillRectangle (graphic[0].display, graphic[0].window, graphic[0].gc,
-		    image[0].text_x, image[0].text_y, ZOOM_X, 6*textpad+7*PAD1);  
+		    image[0].text_x, image[0].text_y, image[0].text_dx, image[0].text_dy);  
     XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].fore);
     XDrawRectangle (graphic[0].display, graphic[0].window, graphic[0].gc,
-		    image[0].text_x, image[0].text_y, ZOOM_X, 6*textpad+7*PAD1);
+		    image[0].text_x, image[0].text_y, image[0].text_dx, image[0].text_dy);
   
     bzero (line, 100);
@@ -38,14 +38,14 @@
     XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].back);
     XFillRectangle (graphic[0].display, graphic[0].window, graphic[0].gc,
-		    image[0].text_x + 1, image[0].text_y + 1, ZOOM_X - 2, 3*textpad+3*PAD1 +1);  
+		    image[0].text_x+1, image[0].text_y+1, image[0].text_dx-2, image[0].text_dy-2);  
     XSetForeground (graphic[0].display, graphic[0].gc, graphic[0].fore);
   }
   bzero (line, 100);
-  sprintf (line, "%25.3f", z);
+  sprintf (line, "%22.3f", z);
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 	       image[0].text_x + PAD1, image[0].text_y + textpad + PAD1, line, strlen(line));
   
   bzero (line, 100);
-  sprintf (line, "%12.1f %12.1f", x, y);
+  sprintf (line, "%10.1f %10.1f", x, y);
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 	       image[0].text_x + PAD1, image[0].text_y + 2*textpad + 2*PAD1, line, strlen(line));
@@ -53,5 +53,5 @@
   bzero (line, 100);
   if (image[0].DecimalDegrees) {
-    sprintf (line, "%12.6f %12.6f", ra, dec); 
+    sprintf (line, "%10.6f %10.6f", ra, dec); 
   } else {
     hh_hms (line, ra, dec, ':');
Index: /branches/kapa-mods-2007-05/Ohana/src/libkapa/doc/api.txt
===================================================================
--- /branches/kapa-mods-2007-05/Ohana/src/libkapa/doc/api.txt	(revision 13401)
+++ /branches/kapa-mods-2007-05/Ohana/src/libkapa/doc/api.txt	(revision 13401)
@@ -0,0 +1,32 @@
+
+COMM | Kapa Function  | libkapa API 
+-----------------------------------
+NCUR | !ACTIVE_CURSOR | KiiCursorOff
+QUIT | Quit           |  
+CURS
+PSIT
+PNGF
+PPMF
+DBOX
+PLOT
+LABL
+PTXT
+RSIZ
+LIMS
+SLIM
+SSEC
+LSEC
+DSEC
+FONT
+ERSC
+ERAS
+ERSS
+READ
+ERAS
+LOAD
+TICK
+SAVE
+CSVE
+JPEG
+CENT
+NPIX
