~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to scipy/sandbox/xplt/src/gist/gtext.h

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GTEXT.H
 
3
 *
 
4
 * $Id: gtext.h 685 2003-03-08 15:26:51Z travo $
 
5
 *
 
6
 * Declare GIST text utilities
 
7
 *
 
8
 */
 
9
/*    Copyright (c) 1994.  The Regents of the University of California.
 
10
                    All rights reserved.  */
 
11
 
 
12
#ifndef GTEXT_H
 
13
#define GTEXT_H
 
14
 
 
15
#include "gist.h"
 
16
 
 
17
/* Return t->alignH, t->alignV, guaranteed not TH_NORMAL or TV_NORMAL */
 
18
extern void GtGetAlignment(const GpTextAttribs *t,
 
19
                           int *alignH, int *alignV);
 
20
 
 
21
/* Get shape of text input to GdText, given a function Width which can
 
22
   compute the width of a simple text string (no imbedded \n).  Returns
 
23
   largest value of Width for any line, and a line count.
 
24
   If gtDoEscapes==1 (default), and Width!=0, the Width function must
 
25
   handle the !, ^, and _ escape sequences.
 
26
   If Width==0, the default Width function is the number of
 
27
   non-escaped characters.  */
 
28
typedef GpReal (*WidthFunction)(const char *text, int nChars,
 
29
                                const GpTextAttribs *t);
 
30
extern int GtTextShape(const char *text, const GpTextAttribs *t,
 
31
                       WidthFunction Width, GpReal *widest);
 
32
 
 
33
/* Return the next line of text-- if text[0] is not '\n' and path not
 
34
   T_UP or T_DOWN, returns text and a count of the characters in the
 
35
   line, nChars (always 1 if T_UP or T_DOWN).  If text is '\0', or '\n'
 
36
   with path T_UP or T_DOWN, returns 0.  Otherwise, returns text+1 and
 
37
   a count of the number of characters to the next '\n' or '\0'.  */
 
38
extern const char *GtNextLine(const char *text, int *nChars, int path);
 
39
 
 
40
/* Use ^ (superscript), _ (subscript), and ! (symbol) escape sequences
 
41
   in GpText.  These are on (gtDoEscapes==1) by default.  */
 
42
extern int gtDoEscapes;
 
43
 
 
44
#endif