home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / PaneP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  6.4 KB  |  179 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /*-----------------------------------------*/
  19. /*                                                                        */
  20. /* Name:        <Xfe/PaneP.h>                                            */
  21. /* Description:    XfePane widget private header file.                        */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfePaneP_h_                            /* start PaneP.h        */
  28. #define _XfePaneP_h_
  29.  
  30. #include <Xfe/Pane.h>
  31. #include <Xfe/OrientedP.h>
  32.  
  33. #ifdef __cplusplus                                /* start C++            */
  34. extern "C" {
  35. #endif
  36.     
  37. /*----------------------------------------------------------------------*/
  38. /*                                                                        */
  39. /* XfePaneClassPart                                                        */
  40. /*                                                                        */
  41. /*----------------------------------------------------------------------*/
  42. typedef struct
  43. {
  44.     XtPointer            extension;                    /* extension        */ 
  45. } XfePaneClassPart;
  46.  
  47. /*----------------------------------------------------------------------*/
  48. /*                                                                        */
  49. /* XfePaneClassRec                                                        */
  50. /*                                                                        */
  51. /*----------------------------------------------------------------------*/
  52. typedef struct _XfePaneClassRec
  53. {
  54.     CoreClassPart                core_class;
  55.     CompositeClassPart            composite_class;
  56.     ConstraintClassPart            constraint_class;
  57.     XmManagerClassPart            manager_class;
  58.     XfeManagerClassPart            xfe_manager_class;
  59.     XfeOrientedClassPart        xfe_oriented_class;
  60.     XfePaneClassPart            xfe_pane_class;
  61. } XfePaneClassRec;
  62.  
  63. externalref XfePaneClassRec xfePaneClassRec;
  64.  
  65. /*----------------------------------------------------------------------*/
  66. /*                                                                        */
  67. /* XfePanePart                                                            */
  68. /*                                                                        */
  69. /*----------------------------------------------------------------------*/
  70. typedef struct _XfePanePart
  71. {
  72.     /* Sash resources */
  73.     Boolean                sash_always_visible;    /* Sash always visible    */
  74.     Pixel                sash_color;                /* Pane color            */
  75.     Dimension            sash_offset;            /* Sash offset            */
  76.     Position            sash_position;            /* Sash position        */
  77.     Dimension            sash_shadow_thickness;    /* Sash shadow thickness*/
  78.     unsigned char        sash_shadow_type;        /* Sash shadow type        */
  79.     Dimension            sash_spacing;            /* Sash spacing            */
  80.     Dimension            sash_thickness;            /* Sash thickness        */
  81.  
  82.     /* Drag resources */
  83.     unsigned char        pane_sash_type;            /* Pane sash type        */
  84.     unsigned char        pane_drag_mode;            /* Pane drag mode        */
  85.     Dimension            drag_threshold;            /* Drag threshold        */
  86.     /* Child one resources */
  87.     Widget                child_one;                /* Child one            */
  88.     Widget                attachment_one_bottom;    /* Child one bottom        */
  89.     Widget                attachment_one_left;    /* Child one left        */
  90.     Widget                attachment_one_right;    /* Child one right        */
  91.     Widget                attachment_one_top;        /* Child one top        */
  92.  
  93.     /* Child two resources */
  94.     Widget                child_two;                /* Child two            */
  95.     Widget                attachment_two_bottom;    /* Child two bottom        */
  96.     Widget                attachment_two_left;    /* Child two left        */
  97.     Widget                attachment_two_right;    /* Child two right        */
  98.     Widget                attachment_two_top;        /* Child two top        */
  99.  
  100.     /* Private data -- Dont even look past this comment -- */
  101.     GC                    sash_GC;                /* Sash GC                */
  102.     XRectangle            sash_rect;                /* Sash rect            */
  103.     XRectangle            sash_dragging_rect;        /* Sash dragging rect    */
  104.     int                    sash_dragging_last;        /* Sash dragging last    */
  105.     Position            sash_original_position;    /* Sash original pos    */
  106.  
  107.     Dimension            old_width;
  108.     Dimension            old_height;
  109.     Position            old_sash_position;        /* Old sash position    */
  110.  
  111. } XfePanePart;
  112.  
  113. /*----------------------------------------------------------------------*/
  114. /*                                                                        */
  115. /* XfePaneRec                                                            */
  116. /*                                                                        */
  117. /*----------------------------------------------------------------------*/
  118. typedef struct _XfePaneRec
  119. {
  120.     CorePart            core;
  121.     CompositePart        composite;
  122.     ConstraintPart        constraint;
  123.     XmManagerPart        manager;
  124.     XfeManagerPart        xfe_manager;
  125.     XfeOrientedPart        xfe_oriented;
  126.     XfePanePart            xfe_pane;
  127. } XfePaneRec;
  128.  
  129. /*----------------------------------------------------------------------*/
  130. /*                                                                        */
  131. /* XfePaneConstraintPart                                                */
  132. /*                                                                        */
  133. /*----------------------------------------------------------------------*/
  134. typedef struct _XfePaneConstraintPart
  135. {
  136.     Dimension            pane_minimum;
  137.     Dimension            pane_maximum;
  138.     unsigned char        pane_child_attachment;
  139.     unsigned char        pane_child_type;
  140.     Boolean                allow_resize;
  141.     Boolean                allow_expand;
  142.     Boolean                always_visible;
  143. } XfePaneConstraintPart;
  144.  
  145. /*----------------------------------------------------------------------*/
  146. /*                                                                        */
  147. /* XfePaneConstraintRec                                                    */
  148. /*                                                                        */
  149. /*----------------------------------------------------------------------*/
  150. typedef struct _XfePaneConstraintRec
  151. {
  152.     XmManagerConstraintPart            manager;
  153.     XfeManagerConstraintPart        xfe_manager;
  154.     XfeOrientedConstraintPart        xfe_oriented;
  155.     XfePaneConstraintPart            xfe_pane;
  156. } XfePaneConstraintRec;
  157.  
  158. /*----------------------------------------------------------------------*/
  159. /*                                                                        */
  160. /* XfePanePart Access Macro                                                */
  161. /*                                                                        */
  162. /*----------------------------------------------------------------------*/
  163. #define _XfePanePart(w) &(((XfePaneWidget) w) -> xfe_pane)
  164.  
  165. /*----------------------------------------------------------------------*/
  166. /*                                                                        */
  167. /* XfePanePart child constraint part access macro                        */
  168. /*                                                                        */
  169. /*----------------------------------------------------------------------*/
  170. #define _XfePaneConstraintPart(w) \
  171. (&(((XfePaneConstraintRec *) _XfeConstraints(w)) -> xfe_pane))
  172.  
  173. #ifdef __cplusplus                                /* end C++                */
  174. }
  175. #endif
  176.  
  177. #endif                                            /* end PaneP.h            */
  178.  
  179.