1 /* $TOG: ScrollFrameT.h /main/6 1997/07/25 16:49:23 samborn $ */ 2 /* 3 * Motif 4 * 5 * Copyright (c) 1987-2012, The Open Group. All rights reserved. 6 * 7 * These libraries and programs are free software; you can 8 * redistribute them and/or modify them under the terms of the GNU 9 * Lesser General Public License as published by the Free Software 10 * Foundation; either version 2 of the License, or (at your option) 11 * any later version. 12 * 13 * These libraries and programs are distributed in the hope that 14 * they will be useful, but WITHOUT ANY WARRANTY; without even the 15 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 16 * PURPOSE. See the GNU Lesser General Public License for more 17 * details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with these librararies and programs; if not, write 21 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth 22 * Floor, Boston, MA 02110-1301 USA 23 */ 24 /* 25 * HISTORY 26 */ 27 #ifndef _XmScrollFrameT_H 28 #define _XmScrollFrameT_H 29 30 #include <Xm/Xm.h> 31 #include <Xm/NavigatorT.h> 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 externalref XrmQuark XmQTscrollFrame; 38 39 /* Trait structures and typedefs, place typedefs first */ 40 41 typedef void (*XmScrollFrameInitProc)(Widget sf, 42 XtCallbackProc moveCB, 43 Widget scrollable); 44 typedef Boolean (*XmScrollFrameGetInfoProc)(Widget sf, 45 Cardinal * dimension, 46 Widget ** nav_list, 47 Cardinal * num_nav_list); 48 typedef void (*XmScrollFrameAddNavigatorProc)(Widget sf, 49 Widget nav, 50 Mask dimMask); 51 typedef void (*XmScrollFrameRemoveNavigatorProc)(Widget sf, 52 Widget nav); 53 typedef void (*XmScrollFrameUpdateOrigGeomProc)(Widget sf, 54 Widget child, 55 XtWidgetGeometry *geom); 56 57 58 /* Version 1: added updateOrigGeom */ 59 60 typedef struct _XmScrollFrameTraitRec { 61 int version; /* 1 */ 62 XmScrollFrameInitProc init; 63 XmScrollFrameGetInfoProc getInfo; 64 XmScrollFrameAddNavigatorProc addNavigator; 65 XmScrollFrameRemoveNavigatorProc removeNavigator; 66 XmScrollFrameUpdateOrigGeomProc updateOrigGeom; 67 } XmScrollFrameTraitRec, *XmScrollFrameTrait; 68 69 70 /* This one gets allocated per instance by the scrollFrame 71 class. It is just a convenient structure reusable by other scrollFrame 72 and it needs not to be part of the public trait API */ 73 74 typedef struct _XmScrollFrameDataRec { 75 XtCallbackProc move_cb ; 76 Widget scrollable ; 77 Widget * nav_list; 78 Cardinal num_nav_list ; 79 Cardinal num_nav_slots; 80 } XmScrollFrameDataRec, *XmScrollFrameData; 81 82 83 #ifdef __cplusplus 84 } /* Close scope of 'extern "C"' declaration which encloses file. */ 85 #endif 86 87 #endif /* _XmScrollFrameT_H */ 88