/* * Attrs.h -- Header for the attribute manipulation routines. * * Authors : Patrick Lecoanet. * Creation date : Fri Dec 31 10:06:37 1999 * * $Id$ */ /* * Copyright (c) 1993 - 1999 CENA, Patrick Lecoanet -- * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This code is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this code; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef _Attrs_h #define _Attrs_h #ifdef __CPLUSPLUS__ extern "C" { #endif #include /* * Label Formats. */ /* * field flags. */ #define LF_ATTACH_PIXEL 0 #define LF_ATTACH_FWD 1 #define LF_ATTACH_BWD 2 #define LF_ATTACH_LEFT 3 /* Align left on left or top on top */ #define LF_ATTACH_RIGHT 4 /* Align right on right or bottom on bottom */ #define LF_DIM_PIXEL 0 #define LF_DIM_FONT 1 #define LF_DIM_ICON 2 #define LF_DIM_AUTO 3 #define LF_DIM_LABEL 4 typedef struct { int x_spec; int y_spec; short width_spec; short height_spec; char x_attach; char y_attach; char x_dim; char y_dim; } ZnFieldFormatStruct, *ZnFieldFormat; typedef struct { short clip_width; short clip_height; int num_fields; Tcl_HashEntry *entry; int ref_count; ZnFieldFormatStruct fields[1]; } ZnLabelFormatStruct, *ZnLabelFormat; ZnLabelFormat LabelFormatCreate(Tcl_Interp * /* interp */, char * /* format_str */, int /* num_fields */); ZnLabelFormat LabelFormatDuplicate(ZnLabelFormat /* label_format */); void LabelFormatDelete(ZnLabelFormat /* label_format */); char * LabelFormatGetString(ZnLabelFormat /* label_format */); ZnBool LabelFormatGetClipBox(ZnLabelFormat /* label_format */, ZnDim */* width */, ZnDim */* height */); #define LabelFormatNumFields(lf) ((lf)->num_fields) void LabelFormatGetField(ZnLabelFormat /* label_format */, int /* field */, char */* x_attach */, char */* y_attach */, char */* x_dim */, char */* y_dim */, int */* x_spec */, int */* y_spec */, short */* width_spec */, short */* height_spec */); /* * Line Ends. */ typedef struct { ZnReal shape_a; ZnReal shape_b; ZnReal shape_c; Tcl_HashEntry *entry; int ref_count; } ZnLineEndStruct, *ZnLineEnd; ZnLineEnd LineEndCreate(Tcl_Interp *interp, char *line_end_str); ZnLineEnd LineEndDuplicate(ZnLineEnd le); void LineEndDelete(ZnLineEnd le); char * LineEndGetString(ZnLineEnd le); /* * Gradient Geometry. */ typedef struct { int d1; int d2; int angle; Tcl_HashEntry *entry; int ref_count; } ZnGradientGeomStruct, *ZnGradientGeom; ZnGradientGeom GradientGeomCreate(Tcl_Interp *interp, char *grad_geom_str); ZnGradientGeom GradientGeomDuplicate(ZnGradientGeom gg); void GradientGeomDelete(ZnGradientGeom gg); char * GradientGeomGetString(ZnGradientGeom gg); #ifdef __CPLUSPLUS__ } #endif #endif /* _Attrs_h */