home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _1da06693967cd568badaee0f68feef59 < prev    next >
Text File  |  2004-06-01  |  4KB  |  144 lines

  1.  
  2. /*    $Id: tixForm.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $    */
  3.  
  4. /*
  5.  * tixForm.h --
  6.  *
  7.  *    Declares the internal functions and data types for the Tix Form
  8.  *    geometry manager.
  9.  *
  10.  * Copyright (c) 1996, Expert Interface Technologies
  11.  *
  12.  * See the file "license.terms" for information on usage and redistribution
  13.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14.  *
  15.  */
  16.  
  17. #ifndef _TIX_FORM_H
  18. #define _TIX_FORM_H
  19.  
  20. #define SIDE0    0
  21. #define SIDE1    1
  22.  
  23. #define NEXT_SIDE(x) (!x)
  24.  
  25. #define SIDEX    0
  26. #define SIDEY    1
  27.  
  28. #define AXIS_X    0
  29. #define AXIS_Y    1
  30.  
  31. #define OPPO_SIDE0  1
  32. #define OPPO_SIDE1  2
  33. #define OPPO_ALL    3
  34.  
  35. #define PINNED_SIDE0  4
  36. #define PINNED_SIDE1  8
  37. #define PINNED_ALL   12
  38.  
  39. #define ATT_NONE        0
  40. #define ATT_GRID        1
  41. #define ATT_OPPOSITE        2
  42. #define ATT_PARALLEL        3
  43.  
  44. /*
  45.  * The following structures carry information about the client windows
  46.  */
  47. typedef union {
  48.     int            grid;
  49.     struct _FormInfo  * widget;
  50. } Attachment;
  51.  
  52. typedef struct {
  53.     int pcnt;        /* percentage anchor point */
  54.     int disp;        /* displacement from the percentage anchor point*/
  55. } Side;
  56.  
  57. typedef struct _FormInfo {
  58.     Tk_Window        tkwin;
  59.     struct _MasterInfo* master;        /* The master of this window */
  60.     struct _FormInfo  * next;
  61.  
  62.     int            depend;        /* used to detect circular dependency*/
  63.  
  64.     /* These are specified by the user and set by the "tixForm" command
  65.      */
  66.     Attachment        att[2][2];    /* anchor of attachment */
  67.     int            off[2][2];    /* offset of attachment */
  68.     char        isDefault[2][2];/* Is this side a default attachment*/
  69.  
  70.     char        attType[2][2];    /* type of attachment
  71.                        GRID or PIXEL*/
  72.     int            pad[2][2];    /* value of padding */
  73.  
  74.     /* These values are calculated by the PinnClient() functions
  75.      * and are used to calculated the required size of the master
  76.      * inside CalculateMasterGeometry(), as well as the positions
  77.      * of the clients inside ArrangeGeometry()
  78.      */
  79.     Side        side[2][2];
  80.     int            sideFlags[2];
  81.  
  82.     /* These values are used to place the clients into the clients
  83.      */
  84.     int            posn[2][2];
  85.  
  86.     /* These things are for Spring'ing */
  87.     int            spring[2][2];
  88.     struct _FormInfo  * strWidget[2][2];
  89.     int         springFail[2];
  90.     int            fill[2];
  91. } FormInfo;
  92.  
  93.  
  94. /*
  95.  * The following structures carry information about the master windows
  96.  */
  97. typedef struct {
  98.     unsigned int    isDeleted : 1;
  99.     unsigned int    repackPending : 1;
  100. } MasterFlags;
  101.  
  102. typedef struct _MasterInfo {
  103.     Tk_Window        tkwin;
  104.     struct _FormInfo  * client;
  105.     struct _FormInfo  * client_tail;
  106.     int            numClients;
  107.     int            reqSize[2];
  108.     int            numRequests;    /* This is used to detect
  109.                      * whether two geometry managers
  110.                      * are used to manage the same
  111.                      * master window
  112.                      */
  113.     int            grids[2];
  114.     MasterFlags        flags;
  115. } MasterInfo;
  116.  
  117. /* tixFormMisc.c */
  118.  
  119.  
  120. EXTERN int         TixFm_Configure _ANSI_ARGS_((FormInfo *clientPtr,
  121.                 Tk_Window topLevel,
  122.                 Tcl_Interp* interp, int argc, Tcl_Obj *CONST *objv));
  123.  
  124. /* tixForm.c */
  125. EXTERN FormInfo *     TixFm_GetFormInfo _ANSI_ARGS_((Tk_Window tkwin,
  126.                 int create));
  127. EXTERN void         TixFm_StructureProc _ANSI_ARGS_((ClientData clientData,
  128.                 XEvent * eventPtr));
  129. EXTERN void         TixFm_AddToMaster _ANSI_ARGS_((MasterInfo *masterPtr,
  130.                 FormInfo *clientPtr));
  131. EXTERN void         TixFm_DeleteMaster _ANSI_ARGS_((
  132.                 MasterInfo *masterPtr));
  133. EXTERN void        TixFm_FreeMasterInfo _ANSI_ARGS_((
  134.                 char *clientData));
  135. EXTERN FormInfo *     TixFm_FindClientPtrByName _ANSI_ARGS_((
  136.                 Tcl_Interp * interp, char * name,
  137.                 Tk_Window topLevel));
  138. EXTERN void        TixFm_ForgetOneClient _ANSI_ARGS_((
  139.                 FormInfo *clientPtr));
  140. EXTERN void          TixFm_Unlink _ANSI_ARGS_((FormInfo *clientPtr));
  141. EXTERN void          TixFm_UnlinkFromMaster _ANSI_ARGS_((
  142.                 FormInfo *clientPtr));
  143. #endif /* _TIX_FORM_H */
  144.