Blame lib/Xm/NotebookP.h

Packit b099d7
/* $XConsortium: NotebookP.h /main/4 1995/07/15 20:53:46 drk $ */
Packit b099d7
/*
Packit b099d7
 * Motif
Packit b099d7
 *
Packit b099d7
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are free software; you can
Packit b099d7
 * redistribute them and/or modify them under the terms of the GNU
Packit b099d7
 * Lesser General Public License as published by the Free Software
Packit b099d7
 * Foundation; either version 2 of the License, or (at your option)
Packit b099d7
 * any later version.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are distributed in the hope that
Packit b099d7
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
 * PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
 * details.
Packit b099d7
 *
Packit b099d7
 * You should have received a copy of the GNU Lesser General Public
Packit b099d7
 * License along with these librararies and programs; if not, write
Packit b099d7
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
 * Floor, Boston, MA 02110-1301 USA
Packit b099d7
 */
Packit b099d7
/*
Packit b099d7
 * HISTORY
Packit b099d7
 */
Packit b099d7
#ifndef _XmNotebookP_h
Packit b099d7
#define _XmNotebookP_h
Packit b099d7
Packit b099d7
#include <Xm/XmP.h>
Packit b099d7
#include <Xm/ManagerP.h>
Packit b099d7
#include <Xm/ScrollFrameT.h>
Packit b099d7
#include <Xm/Notebook.h>
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
extern "C" {
Packit b099d7
#endif
Packit b099d7
Packit b099d7
/* Notebook's constraint info. fields */
Packit b099d7
typedef struct _XmNotebookConstraintPart
Packit b099d7
{
Packit b099d7
    /* resources */
Packit b099d7
    int page_number;			/* page number */
Packit b099d7
    unsigned char child_type;		/* notebook child type */
Packit b099d7
    Boolean resizable;			/* is this child resizable? */
Packit b099d7
Packit b099d7
    /* private variables */
Packit b099d7
    Boolean active;			/* True if the child is active */
Packit b099d7
} XmNotebookConstraintPart, *XmNotebookConstraint;
Packit b099d7
Packit b099d7
typedef struct _XmNotebookConstraintRec
Packit b099d7
{
Packit b099d7
    XmManagerConstraintPart manager;
Packit b099d7
    XmNotebookConstraintPart notebook;
Packit b099d7
} XmNotebookConstraintRec, *XmNotebookConstraintPtr;
Packit b099d7
Packit b099d7
Packit b099d7
/* New fields for the Notebook widget class record */
Packit b099d7
typedef struct _XmNotebookClassPart
Packit b099d7
{
Packit b099d7
    XtPointer extension;
Packit b099d7
} XmNotebookClassPart;
Packit b099d7
Packit b099d7
Packit b099d7
/* Full class record declaration */
Packit b099d7
typedef struct _NotebookClassRec
Packit b099d7
{
Packit b099d7
    CoreClassPart core_class;
Packit b099d7
    CompositeClassPart composite_class;
Packit b099d7
    ConstraintClassPart constraint_class;
Packit b099d7
    XmManagerClassPart manager_class;
Packit b099d7
    XmNotebookClassPart	notebook_class;
Packit b099d7
} XmNotebookClassRec;
Packit b099d7
Packit b099d7
externalref XmNotebookClassRec xmNotebookClassRec;
Packit b099d7
Packit b099d7
Packit b099d7
/* New fields for the Notebook widget instance record */
Packit b099d7
typedef struct _XmNotebookPart
Packit b099d7
{
Packit b099d7
    /* resources */
Packit b099d7
    int current_page_number;		/* the current page number */
Packit b099d7
    int first_page_number;		/* the first page number */
Packit b099d7
    int last_page_number;		/* the last page number */
Packit b099d7
    unsigned char orientation;		/* notebook orientation */
Packit b099d7
    unsigned char back_page_pos;	/* position of back pages */
Packit b099d7
    Cardinal back_page_number;		/* the of back page lines */
Packit b099d7
    Dimension back_page_size;		/* the thickness of back pages */
Packit b099d7
    Pixel back_page_foreground;         /* foreground color for bk pgs */
Packit b099d7
    Pixel back_page_background;         /* background color for bk pgs */
Packit b099d7
    Pixel frame_background;		/* background color for frame */
Packit b099d7
    unsigned char binding_type;		/* binding type */
Packit b099d7
    Pixmap binding_pixmap;		/* pixmap for the binding */
Packit b099d7
    Pixmap spiral_pixmap;		/* pixmap for the spiral binding */
Packit b099d7
    Dimension binding_width;		/* the width of the binding */
Packit b099d7
    Dimension margin_width;		/* horizontal margin between widgets */
Packit b099d7
    Dimension margin_height;		/* vertical margin between widgets */
Packit b099d7
    Dimension major_spacing;		/* gap between major tabs */
Packit b099d7
    Dimension minor_spacing;		/* gap between minor tabs */
Packit b099d7
    Dimension shadow_thickness;		/* notebook frame shadow thickness */
Packit b099d7
    XtCallbackList page_change_callback;/* the page change callback */
Packit b099d7
Packit b099d7
    /* child widgets */
Packit b099d7
    Widget scroller;			/* the page scroller widget */
Packit b099d7
    Widget scroller_child;		/* TextF child of def page scroller */
Packit b099d7
    Widget next_major;			/* next major tab scroll button */
Packit b099d7
    Widget prev_major;			/* prev major tab scroll button */
Packit b099d7
    Widget next_minor;			/* next minor tab scroll button */
Packit b099d7
    Widget prev_minor;			/* prev minor tab scroll button */
Packit b099d7
Packit b099d7
    /* preferred children sizes */
Packit b099d7
    Dimension real_binding_width;	/* real binding width */
Packit b099d7
    Dimension real_back_page_number;	/* real back page number */
Packit b099d7
    Dimension page_width;		/* width of page widgets */
Packit b099d7
    Dimension page_height;		/* height of page widgets */
Packit b099d7
    Dimension status_width;		/* width of the status areas */
Packit b099d7
    Dimension status_height;		/* height of the status  areas */
Packit b099d7
    Dimension major_width;		/* width of major tabs */
Packit b099d7
    Dimension major_height;		/* height of major tabs */
Packit b099d7
    Dimension minor_width;		/* width of minor tabs */
Packit b099d7
    Dimension minor_height;		/* height of minor tabs */
Packit b099d7
    Dimension scroller_width;		/* width of the page scroller */
Packit b099d7
    Dimension scroller_height;		/* height of the page scroller */
Packit b099d7
    Dimension major_scroller_width;	/* width of major scrollers */
Packit b099d7
    Dimension major_scroller_height;	/* height of major scroller */
Packit b099d7
    Dimension minor_scroller_width;	/* width of minor scrollers */
Packit b099d7
    Dimension minor_scroller_height;	/* height of minor scrollers */
Packit b099d7
    Dimension frame_width;		/* width of the frame */
Packit b099d7
    Dimension frame_height;		/* height of the frame */
Packit b099d7
Packit b099d7
    /* for layouting tabs */
Packit b099d7
    Widget first_major;			/* the first major tab */
Packit b099d7
    Widget old_top_major;		/* the old top major tab */
Packit b099d7
    Widget top_major;			/* the top major tab */
Packit b099d7
    Widget last_major;			/* the last major tab */
Packit b099d7
    Widget first_minor;			/* the first minor tab */
Packit b099d7
    Widget old_top_minor;		/* the old top minor tab */
Packit b099d7
    Widget top_minor;			/* the top minor tab */
Packit b099d7
    Widget last_minor;			/* the last minor tab */
Packit b099d7
    Widget constraint_child;		/* changing geom during ConstraintSV */
Packit b099d7
Packit b099d7
    /* shadow thickness state for current page major and minor tab */
Packit b099d7
    Dimension major_shadow_thickness;	/* joined major tab shadow thickness */
Packit b099d7
    Dimension minor_shadow_thickness;	/* joined minor tab shadow thickness */
Packit b099d7
    Widget major_shadow_child;		/* saved shadow thickness tab */
Packit b099d7
    Widget minor_shadow_child;		/* saved shadow thickness tab */
Packit b099d7
    Boolean in_setshadow;		/* setting tab shadow thickness */
Packit b099d7
Packit b099d7
    /* extra position information */
Packit b099d7
    unsigned char major_pos;		/* position of major tabs */
Packit b099d7
    unsigned char minor_pos;		/* position of minor tabs */
Packit b099d7
    unsigned char binding_pos;		/* binding position */
Packit b099d7
Packit b099d7
    /* other misc. variables */
Packit b099d7
    unsigned char which_tab;		/* currently active tab type */
Packit b099d7
    int last_alloc_num;			/* lastly allocated page number */
Packit b099d7
    unsigned char scroller_status;	/* status of the page scroller */
Packit b099d7
    unsigned short need_scroller;	/* need for tab scrollers */
Packit b099d7
    Boolean dynamic_last_page_num;	/* True if using dynamic last page# */
Packit b099d7
    Boolean in_callback;		/* True if processing a callback */
Packit b099d7
    GC back_page_gc;                    /* GC for drawing backpages */
Packit b099d7
    GC frame_gc;			/* GC for drawing frame */
Packit b099d7
    GC binding_gc;                      /* GC for drawing binding */
Packit b099d7
    GC foreground_gc;                   /* GC for drawing foreground */
Packit b099d7
    GC background_gc;                   /* GC for drawing background */
Packit b099d7
Packit b099d7
    Boolean first_change_managed;	/* flags 1st call to ChangeManaged */
Packit b099d7
    XmScrollFrameData scroll_frame_data; /* data for ScrollFrame trait */
Packit b099d7
} XmNotebookPart;
Packit b099d7
Packit b099d7
Packit b099d7
/* Full instance record declaration */
Packit b099d7
typedef struct _XmNotebookRec
Packit b099d7
{
Packit b099d7
    CorePart core;
Packit b099d7
    CompositePart composite;
Packit b099d7
    ConstraintPart constraint;
Packit b099d7
    XmManagerPart manager;
Packit b099d7
    XmNotebookPart notebook;
Packit b099d7
} XmNotebookRec;
Packit b099d7
Packit b099d7
Packit b099d7
/******************************************************************************
Packit b099d7
 *                                                                            *
Packit b099d7
 *                         constants & useful macros                          *
Packit b099d7
 *                                                                            *
Packit b099d7
 ******************************************************************************/
Packit b099d7
Packit b099d7
/* internal child types, must not conflict with XmRNBChildType enum */
Packit b099d7
#define XmMAJOR_TAB_SCROLLER            12
Packit b099d7
#define XmMINOR_TAB_SCROLLER            13
Packit b099d7
#define XmTAB_SCROLLER                  14
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
}
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#endif /* _XmNotebookP_h */
Packit b099d7