diff src/glyphs.h @ 863:42375619fa45

[xemacs-hg @ 2002-06-04 06:03:59 by andyp] merge 21.4 windows changes, minimally tested
author andyp
date Tue, 04 Jun 2002 06:05:53 +0000
parents 6728e641994e
children 804517e16990
line wrap: on
line diff
--- a/src/glyphs.h	Mon Jun 03 12:24:14 2002 +0000
+++ b/src/glyphs.h	Tue Jun 04 06:05:53 2002 +0000
@@ -97,8 +97,9 @@
 #define IMAGE_UNSPECIFIED_GEOMETRY -1
 #define IMAGE_UNCHANGED_GEOMETRY -2
 
-#define WIDGET_BORDER_HEIGHT 4
-#define WIDGET_BORDER_WIDTH 4
+#define DEFAULT_WIDGET_BORDER_WIDTH 2
+#define DEFAULT_WIDGET_SPACING 3
+#define DEFAULT_WIDGET_SHADOW_WIDTH 2
 
 enum governing_domain
 {
@@ -598,7 +599,8 @@
       unsigned int v_resize : 1;	/* Whether the vsize is allowed to change. */
       unsigned int h_resize : 1;	/* Whether the hsize is allowed to change. */
       unsigned int orientation : 1; /* Vertical or horizontal. */
-      unsigned int justification : 2; /* Left, right or center. */
+      unsigned int h_justification : 2; /* left, right or center. */
+      unsigned int v_justification : 2; /* top, bottom or center. */
       /* Face for colors and font. We specify this here because we
 	 want people to be able to put :face in the instantiator
 	 spec. Using glyph-face is more inconvenient, although more
@@ -627,7 +629,9 @@
 #define LAYOUT_VERTICAL	1
 
 #define LAYOUT_JUSTIFY_LEFT 0
+#define LAYOUT_JUSTIFY_TOP 0
 #define LAYOUT_JUSTIFY_RIGHT 1
+#define LAYOUT_JUSTIFY_BOTTOM 1
 #define LAYOUT_JUSTIFY_CENTER 2
 
 #define IMAGE_INSTANCE_HASH_DEPTH 0
@@ -719,8 +723,26 @@
 ((i)->u.subwindow.h_resize)
 #define IMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \
 ((i)->u.subwindow.orientation)
-#define IMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
-((i)->u.subwindow.justification)
+#define IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) \
+((i)->u.subwindow.h_justification)
+#define IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) \
+((i)->u.subwindow.v_justification)
+#define IMAGE_INSTANCE_SUBWINDOW_RIGHT_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_RIGHT)
+#define IMAGE_INSTANCE_SUBWINDOW_LEFT_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_LEFT)
+#define IMAGE_INSTANCE_SUBWINDOW_TOP_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_TOP)
+#define IMAGE_INSTANCE_SUBWINDOW_BOTTOM_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_BOTTOM)
+#define IMAGE_INSTANCE_SUBWINDOW_H_CENTERED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_CENTER)
+#define IMAGE_INSTANCE_SUBWINDOW_V_CENTERED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_CENTER)
+#define IMAGE_INSTANCE_SUBWINDOW_LOGICAL_LAYOUT(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_ORIENT (i) \
+  == LAYOUT_VERTICAL && !IMAGE_INSTANCE_SUBWINDOW_V_CENTERED (i))
+
 #define IMAGE_INSTANCE_SUBWINDOW_FACE(i) \
 ((i)->u.subwindow.face)
 
@@ -1161,4 +1183,6 @@
 			      int height);
 extern int hold_ignored_expose_registration;
 
+#define ROUND_UP(arg, unit) (((int)((arg) + (unit) - 1) / (int)(unit)) * (int)(unit))
+
 #endif /* INCLUDED_glyphs_h_ */