Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:27

0001 /* $XConsortium: NotebookP.h /main/4 1995/07/15 20:53:46 drk $ */
0002 /*
0003  * Motif
0004  *
0005  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0006  *
0007  * These libraries and programs are free software; you can
0008  * redistribute them and/or modify them under the terms of the GNU
0009  * Lesser General Public License as published by the Free Software
0010  * Foundation; either version 2 of the License, or (at your option)
0011  * any later version.
0012  *
0013  * These libraries and programs are distributed in the hope that
0014  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0015  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0016  * PURPOSE. See the GNU Lesser General Public License for more
0017  * details.
0018  *
0019  * You should have received a copy of the GNU Lesser General Public
0020  * License along with these librararies and programs; if not, write
0021  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0022  * Floor, Boston, MA 02110-1301 USA
0023  */
0024 /*
0025  * HISTORY
0026  */
0027 #ifndef _XmNotebookP_h
0028 #define _XmNotebookP_h
0029 
0030 #include <Xm/XmP.h>
0031 #include <Xm/ManagerP.h>
0032 #include <Xm/ScrollFrameT.h>
0033 #include <Xm/Notebook.h>
0034 
0035 #ifdef __cplusplus
0036 extern "C" {
0037 #endif
0038 
0039 /* Notebook's constraint info. fields */
0040 typedef struct _XmNotebookConstraintPart
0041 {
0042     /* resources */
0043     int page_number;            /* page number */
0044     unsigned char child_type;       /* notebook child type */
0045     Boolean resizable;          /* is this child resizable? */
0046 
0047     /* private variables */
0048     Boolean active;         /* True if the child is active */
0049 } XmNotebookConstraintPart, *XmNotebookConstraint;
0050 
0051 typedef struct _XmNotebookConstraintRec
0052 {
0053     XmManagerConstraintPart manager;
0054     XmNotebookConstraintPart notebook;
0055 } XmNotebookConstraintRec, *XmNotebookConstraintPtr;
0056 
0057 
0058 /* New fields for the Notebook widget class record */
0059 typedef struct _XmNotebookClassPart
0060 {
0061     XtPointer extension;
0062 } XmNotebookClassPart;
0063 
0064 
0065 /* Full class record declaration */
0066 typedef struct _NotebookClassRec
0067 {
0068     CoreClassPart core_class;
0069     CompositeClassPart composite_class;
0070     ConstraintClassPart constraint_class;
0071     XmManagerClassPart manager_class;
0072     XmNotebookClassPart notebook_class;
0073 } XmNotebookClassRec;
0074 
0075 externalref XmNotebookClassRec xmNotebookClassRec;
0076 
0077 
0078 /* New fields for the Notebook widget instance record */
0079 typedef struct _XmNotebookPart
0080 {
0081     /* resources */
0082     int current_page_number;        /* the current page number */
0083     int first_page_number;      /* the first page number */
0084     int last_page_number;       /* the last page number */
0085     unsigned char orientation;      /* notebook orientation */
0086     unsigned char back_page_pos;    /* position of back pages */
0087     Cardinal back_page_number;      /* the of back page lines */
0088     Dimension back_page_size;       /* the thickness of back pages */
0089     Pixel back_page_foreground;         /* foreground color for bk pgs */
0090     Pixel back_page_background;         /* background color for bk pgs */
0091     Pixel frame_background;     /* background color for frame */
0092     unsigned char binding_type;     /* binding type */
0093     Pixmap binding_pixmap;      /* pixmap for the binding */
0094     Pixmap spiral_pixmap;       /* pixmap for the spiral binding */
0095     Dimension binding_width;        /* the width of the binding */
0096     Dimension margin_width;     /* horizontal margin between widgets */
0097     Dimension margin_height;        /* vertical margin between widgets */
0098     Dimension major_spacing;        /* gap between major tabs */
0099     Dimension minor_spacing;        /* gap between minor tabs */
0100     Dimension shadow_thickness;     /* notebook frame shadow thickness */
0101     XtCallbackList page_change_callback;/* the page change callback */
0102 
0103     /* child widgets */
0104     Widget scroller;            /* the page scroller widget */
0105     Widget scroller_child;      /* TextF child of def page scroller */
0106     Widget next_major;          /* next major tab scroll button */
0107     Widget prev_major;          /* prev major tab scroll button */
0108     Widget next_minor;          /* next minor tab scroll button */
0109     Widget prev_minor;          /* prev minor tab scroll button */
0110 
0111     /* preferred children sizes */
0112     Dimension real_binding_width;   /* real binding width */
0113     Dimension real_back_page_number;    /* real back page number */
0114     Dimension page_width;       /* width of page widgets */
0115     Dimension page_height;      /* height of page widgets */
0116     Dimension status_width;     /* width of the status areas */
0117     Dimension status_height;        /* height of the status  areas */
0118     Dimension major_width;      /* width of major tabs */
0119     Dimension major_height;     /* height of major tabs */
0120     Dimension minor_width;      /* width of minor tabs */
0121     Dimension minor_height;     /* height of minor tabs */
0122     Dimension scroller_width;       /* width of the page scroller */
0123     Dimension scroller_height;      /* height of the page scroller */
0124     Dimension major_scroller_width; /* width of major scrollers */
0125     Dimension major_scroller_height;    /* height of major scroller */
0126     Dimension minor_scroller_width; /* width of minor scrollers */
0127     Dimension minor_scroller_height;    /* height of minor scrollers */
0128     Dimension frame_width;      /* width of the frame */
0129     Dimension frame_height;     /* height of the frame */
0130 
0131     /* for layouting tabs */
0132     Widget first_major;         /* the first major tab */
0133     Widget old_top_major;       /* the old top major tab */
0134     Widget top_major;           /* the top major tab */
0135     Widget last_major;          /* the last major tab */
0136     Widget first_minor;         /* the first minor tab */
0137     Widget old_top_minor;       /* the old top minor tab */
0138     Widget top_minor;           /* the top minor tab */
0139     Widget last_minor;          /* the last minor tab */
0140     Widget constraint_child;        /* changing geom during ConstraintSV */
0141 
0142     /* shadow thickness state for current page major and minor tab */
0143     Dimension major_shadow_thickness;   /* joined major tab shadow thickness */
0144     Dimension minor_shadow_thickness;   /* joined minor tab shadow thickness */
0145     Widget major_shadow_child;      /* saved shadow thickness tab */
0146     Widget minor_shadow_child;      /* saved shadow thickness tab */
0147     Boolean in_setshadow;       /* setting tab shadow thickness */
0148 
0149     /* extra position information */
0150     unsigned char major_pos;        /* position of major tabs */
0151     unsigned char minor_pos;        /* position of minor tabs */
0152     unsigned char binding_pos;      /* binding position */
0153 
0154     /* other misc. variables */
0155     unsigned char which_tab;        /* currently active tab type */
0156     int last_alloc_num;         /* lastly allocated page number */
0157     unsigned char scroller_status;  /* status of the page scroller */
0158     unsigned short need_scroller;   /* need for tab scrollers */
0159     Boolean dynamic_last_page_num;  /* True if using dynamic last page# */
0160     Boolean in_callback;        /* True if processing a callback */
0161     GC back_page_gc;                    /* GC for drawing backpages */
0162     GC frame_gc;            /* GC for drawing frame */
0163     GC binding_gc;                      /* GC for drawing binding */
0164     GC foreground_gc;                   /* GC for drawing foreground */
0165     GC background_gc;                   /* GC for drawing background */
0166 
0167     Boolean first_change_managed;   /* flags 1st call to ChangeManaged */
0168     XmScrollFrameData scroll_frame_data; /* data for ScrollFrame trait */
0169 } XmNotebookPart;
0170 
0171 
0172 /* Full instance record declaration */
0173 typedef struct _XmNotebookRec
0174 {
0175     CorePart core;
0176     CompositePart composite;
0177     ConstraintPart constraint;
0178     XmManagerPart manager;
0179     XmNotebookPart notebook;
0180 } XmNotebookRec;
0181 
0182 
0183 /******************************************************************************
0184  *                                                                            *
0185  *                         constants & useful macros                          *
0186  *                                                                            *
0187  ******************************************************************************/
0188 
0189 /* internal child types, must not conflict with XmRNBChildType enum */
0190 #define XmMAJOR_TAB_SCROLLER            12
0191 #define XmMINOR_TAB_SCROLLER            13
0192 #define XmTAB_SCROLLER                  14
0193 
0194 #ifdef __cplusplus
0195 }
0196 #endif
0197 
0198 #endif /* _XmNotebookP_h */
0199