Blame lib/Xm/IconBoxP.h

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
Packit b099d7
#ifndef _XmIconBoxP_h
Packit b099d7
#define _XmIconBoxP_h
Packit b099d7
Packit b099d7
#if defined(VMS) || defined(__VMS)
Packit b099d7
#include <X11/apienvset.h>
Packit b099d7
#endif
Packit b099d7
Packit b099d7
/************************************************************
Packit b099d7
*	INCLUDE FILES
Packit b099d7
*************************************************************/
Packit b099d7
#include <Xm/ManagerP.h>
Packit b099d7
#include <Xm/IconBox.h>
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
extern "C" {
Packit b099d7
#endif
Packit b099d7
Packit b099d7
/************************************************************
Packit b099d7
*	TYPEDEFS AND DEFINES
Packit b099d7
*************************************************************/
Packit b099d7
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Hack to get around naming conventions.  The XmConstraintPartOffset macro
Packit b099d7
 * requires our contraint part structure to have this name
Packit b099d7
 */
Packit b099d7
#define XmIconBoxConstraintPart IconInfo
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Access macros for widget instance fields
Packit b099d7
 */
Packit b099d7
#define XmIconBox_min_v_cells(w)	(((XmIconBoxWidget)(w))->box.min_v_cells)
Packit b099d7
#define XmIconBox_min_h_cells(w)	(((XmIconBoxWidget)(w))->box.min_h_cells)
Packit b099d7
#define XmIconBox_v_margin(w)	(((XmIconBoxWidget)(w))->box.v_margin)
Packit b099d7
#define XmIconBox_h_margin(w)	(((XmIconBoxWidget)(w))->box.h_margin)
Packit b099d7
#define XmIconBox_min_cell_width(w)  (((XmIconBoxWidget)(w))->box.min_cell_width)
Packit b099d7
#define XmIconBox_min_cell_height(w) (((XmIconBoxWidget)(w))->box.min_cell_height)
Packit b099d7
#define XmIconBox_cell_width(w)	(((XmIconBoxWidget)(w))->box.cell_width)
Packit b099d7
#define XmIconBox_cell_height(w)	(((XmIconBoxWidget)(w))->box.cell_height)
Packit b099d7
Packit b099d7
#define XmIconBoxC_cell_x(w)      (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.cell_x)
Packit b099d7
#define XmIconBoxC_cell_y(w)      (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.cell_y)
Packit b099d7
#define XmIconBoxC_pref_width(w)  (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.pref_width)
Packit b099d7
#define XmIconBoxC_pref_height(w) (((XmIconBoxConstraintsRec*)((w)->core.constraints))->icon.pref_height)
Packit b099d7
Packit b099d7
/************************************************************
Packit b099d7
*	MACROS
Packit b099d7
*************************************************************/
Packit b099d7
Packit b099d7
/************************************************************
Packit b099d7
*	GLOBAL DECLARATIONS
Packit b099d7
*************************************************************/
Packit b099d7
Packit b099d7
typedef struct {
Packit b099d7
    XtPointer extension;	/* Just in case we need it later. */
Packit b099d7
} XmIconBoxClassPart;
Packit b099d7
Packit b099d7
typedef struct _XmIconBoxClassRec {
Packit b099d7
    CoreClassPart		core_class;
Packit b099d7
    CompositeClassPart		composite_class;
Packit b099d7
    ConstraintClassPart		constraint_class;
Packit b099d7
    XmManagerClassPart		manager_class;
Packit b099d7
    XmIconBoxClassPart	        box_class;
Packit b099d7
} XmIconBoxClassRec;
Packit b099d7
Packit b099d7
typedef struct {
Packit b099d7
    /* resources */
Packit b099d7
Packit b099d7
    Dimension min_v_cells;	/* Default number of cells in the vert dir. */
Packit b099d7
    Dimension min_h_cells;	/* Default number of cells in the horiz dir. */
Packit b099d7
    Dimension v_margin;		/* Amount of space to leave between cells */
Packit b099d7
    Dimension h_margin;		/* and window edges. */
Packit b099d7
    Dimension min_cell_width;	/* Minimum width of the cells. */
Packit b099d7
    Dimension min_cell_height;	/* Minimum height of the cells. */
Packit b099d7
Packit b099d7
    /* private state */
Packit b099d7
Packit b099d7
    Dimension cell_width;	/* Width and height of all cells. */
Packit b099d7
    Dimension cell_height;
Packit b099d7
Packit b099d7
} XmIconBoxPart;
Packit b099d7
Packit b099d7
Packit b099d7
typedef struct _XmIconBoxRec {
Packit b099d7
    CorePart		core;
Packit b099d7
    CompositePart	composite;
Packit b099d7
    ConstraintPart	constraint;
Packit b099d7
    XmManagerPart	manager;
Packit b099d7
    XmIconBoxPart	box;
Packit b099d7
} XmIconBoxRec;
Packit b099d7
Packit b099d7
typedef struct _IconInfo {
Packit b099d7
Packit b099d7
    /*
Packit b099d7
     * Resources.
Packit b099d7
     */
Packit b099d7
Packit b099d7
    short cell_x;		/* X location of this icon in cell space. */
Packit b099d7
    short cell_y;		/* Y location of this icon in cell space. */
Packit b099d7
Packit b099d7
    /*
Packit b099d7
     * Private state.
Packit b099d7
     */
Packit b099d7
Packit b099d7
    Dimension pref_width, pref_height; /* The preferred size of this widget. */
Packit b099d7
} IconInfo;
Packit b099d7
Packit b099d7
typedef struct _XmIconBoxConstraintsRec {
Packit b099d7
    XmManagerConstraintPart	manager;
Packit b099d7
    IconInfo			icon;
Packit b099d7
} XmIconBoxConstraintsRec, *XmIconBoxConstraints;
Packit b099d7
Packit b099d7
/************************************************************
Packit b099d7
*	EXTERNAL DECLARATIONS
Packit b099d7
*************************************************************/
Packit b099d7
Packit b099d7
extern XmIconBoxClassRec xmIconBoxClassRec;
Packit b099d7
Packit b099d7
/************************************************************
Packit b099d7
*	STATIC DECLARATIONS
Packit b099d7
*************************************************************/
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
}	/* Closes scope of 'extern "C"' declaration */
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#if defined(VMS) || defined(__VMS)
Packit b099d7
#include <X11/apienvrst.h>
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#endif /* _XmIconBoxP_h */