Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* $XConsortium: DialogSavvyT.h /main/5 1995/07/15 20:50:29 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 _XmDialogSavvyT_H
0028 #define _XmDialogSavvyT_H
0029 
0030 #include <Xm/Xm.h>
0031 
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035 
0036 externalref XrmQuark XmQTdialogShellSavvy;
0037 /* This trait also requires a resource named "defaultPosition".
0038    If the child has the trait, the resource will be get and set by 
0039    the DialogShell ChangeManaged */
0040    
0041 /* Trait structures and typedefs, place typedefs first */
0042 
0043 typedef void (*XmDialogSavvyMapUnmapProc)(Widget wid, 
0044                       Boolean map_unmap);
0045 
0046 
0047 /* Version 0: initial release. */
0048 
0049 typedef struct _XmDialogSavvyTraitRec    {
0050   int               version;        /* 0 */
0051   XmDialogSavvyMapUnmapProc callMapUnmapCB;
0052 } XmDialogSavvyTraitRec,*XmDialogSavvyTrait;
0053 
0054 
0055 /* This macro is part of the trait and is used for the following situation
0056    DialogShells always mimic the child position on themselves.
0057    If the SetValues on a bb child position was 0,
0058    which is always the _current_ position of the bb in a DialogShell,
0059    Xt does not see a change and therefore not trigerred a geometry request.
0060    So BB (or any dialogShellSavvy child) has to catch this case
0061    and change the position request to use a special value in its
0062    SetValues method, XmDIALOG_SAVVY_FORCE_ORIGIN, to notify the Dialog that 
0063    it really wants to move in 0 */
0064 
0065 #define XmDIALOG_SAVVY_FORCE_ORIGIN ((Position)~0L)
0066 
0067 #ifdef __cplusplus
0068 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0069 #endif
0070 
0071 #endif /* _XmDialogSavvyT_H */