home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / ComboBoxP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  6.1 KB  |  169 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/ComboBoxP.h>                                        */
  21. /* Description:    XfeComboBox widget private header file.                    */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfeComboBoxP_h_                        /* start ComboBoxP.h    */
  28. #define _XfeComboBoxP_h_
  29.  
  30. #include <Xfe/ComboBox.h>
  31. #include <Xfe/ManagerP.h>
  32.  
  33. #ifdef __cplusplus                                /* start C++            */
  34. extern "C" {
  35. #endif
  36.     
  37. /*----------------------------------------------------------------------*/
  38. /*                                                                        */
  39. /* XfeComboBoxClassPart                                                    */
  40. /*                                                                        */
  41. /*----------------------------------------------------------------------*/
  42. typedef struct
  43. {
  44.     XtWidgetProc            layout_title;        /* layout_title            */
  45.     XtWidgetProc            layout_arrow;        /* layout_arrow            */
  46.     XfeExposeProc            draw_highlight;        /* draw_highlight        */
  47.     XfeExposeProc            draw_title_shadow;    /* draw_title_shadow    */
  48.     XtPointer                extension;            /* extension            */
  49. } XfeComboBoxClassPart;
  50.  
  51. /*----------------------------------------------------------------------*/
  52. /*                                                                        */
  53. /* XfeComboBoxClassRec                                                    */
  54. /*                                                                        */
  55. /*----------------------------------------------------------------------*/
  56. typedef struct _XfeComboBoxClassRec
  57. {
  58.     CoreClassPart                core_class;
  59.     CompositeClassPart            composite_class;
  60.     ConstraintClassPart            constraint_class;
  61.     XmManagerClassPart            manager_class;
  62.     XfeManagerClassPart            xfe_manager_class;
  63.     XfeComboBoxClassPart        xfe_combo_box_class;
  64. } XfeComboBoxClassRec;
  65.  
  66. externalref XfeComboBoxClassRec xfeComboBoxClassRec;
  67.  
  68. /*----------------------------------------------------------------------*/
  69. /*                                                                        */
  70. /* XfeComboBoxPart                                                        */
  71. /*                                                                        */
  72. /*----------------------------------------------------------------------*/
  73. typedef struct _XfeComboBoxPart
  74. {
  75.     /* Title resources */
  76.     unsigned char        combo_box_type;            /* Combo box type        */
  77.     Widget                title;                    /* Title                */
  78.     Dimension            spacing;                /* Spacing                */
  79.     XmFontList            title_font_list;        /* Title font list        */
  80.     Dimension            title_shadow_thickness;    /* Title shadow thickness*/
  81.     unsigned char        title_shadow_type;        /* Title shadow type    */
  82.  
  83.     /* List resources */
  84.     Widget                list;                    /* List                    */
  85.     XmStringTable        items;                    /* Items                */
  86.     int                    item_count;                /* Item count            */
  87.     XmFontList            list_font_list;            /* List font list        */
  88.     Dimension            list_margin_height;        /* List margin height    */
  89.     Dimension            list_margin_width;        /* List margin width    */
  90.     Dimension            list_spacing;            /* List spacing            */
  91.     int                    top_item_position;        /* Top item position    */
  92.     int                    visible_item_count;        /* Visible item count    */
  93.  
  94.     /* Arrow resources */
  95.     Widget                arrow;                    /* Arrow                */
  96.  
  97.     /* Shell resources */
  98.     Boolean                share_shell;            /* Share shell            */
  99.     Widget                shell;                    /* Shell                */
  100.     Boolean                popped_up;                /* Popped up ?            */
  101.  
  102.     /* Selected resources */
  103.     XmString            selected_item;            /* Selected                */
  104.     int                    selected_position;        /* Selected position    */
  105.  
  106.     /* Traversal resources */
  107.     Dimension            highlight_thickness;    /* Highlight thickness    */
  108.     Boolean                traversal_on;            /* Traversal on ?        */
  109.  
  110.     /* Private data -- Dont even look past this comment -- */
  111.     Boolean                highlighted;            /* Highlighted ?        */
  112.     Boolean                remain_popped_up;        /* Remain popped up ?    */
  113.     XtIntervalId        delay_timer_id;            /* Delay timer id        */
  114.  
  115. } XfeComboBoxPart;
  116.  
  117. /*----------------------------------------------------------------------*/
  118. /*                                                                        */
  119. /* XfeComboBoxRec                                                        */
  120. /*                                                                        */
  121. /*----------------------------------------------------------------------*/
  122. typedef struct _XfeComboBoxRec
  123. {
  124.     CorePart            core;
  125.     CompositePart        composite;
  126.     ConstraintPart        constraint;
  127.     XmManagerPart        manager;
  128.     XfeManagerPart        xfe_manager;
  129.     XfeComboBoxPart        xfe_combo_box;
  130. } XfeComboBoxRec;
  131.  
  132. /*----------------------------------------------------------------------*/
  133. /*                                                                        */
  134. /* XfeComboBoxPart Access Macro                                            */
  135. /*                                                                        */
  136. /*----------------------------------------------------------------------*/
  137. #define _XfeComboBoxPart(w) &(((XfeComboBoxWidget) w) -> xfe_combo_box)
  138.  
  139. /*----------------------------------------------------------------------*/
  140. /*                                                                        */
  141. /* XfeComboBox method invocation functions                                */
  142. /*                                                                        */
  143. /*----------------------------------------------------------------------*/
  144. extern void
  145. _XfeComboBoxLayoutTitle            (Widget            w);
  146. /*----------------------------------------------------------------------*/
  147. extern void
  148. _XfeComboBoxLayoutArrow            (Widget            w);
  149. /*----------------------------------------------------------------------*/
  150. extern void
  151. _XfeComboBoxDrawHighlight        (Widget            w,
  152.                                  XEvent *        event,
  153.                                  Region            region,
  154.                                  XRectangle *    clip_rect);
  155. /*----------------------------------------------------------------------*/
  156. extern void
  157. _XfeComboBoxDrawTitleShadow        (Widget            w,
  158.                                  XEvent *        event,
  159.                                  Region            region,
  160.                                  XRectangle *    clip_rect);
  161. /*----------------------------------------------------------------------*/
  162.  
  163. #ifdef __cplusplus                                /* end C++                */
  164. }
  165. #endif
  166.  
  167. #endif                                            /* end ComboBoxP.h        */
  168.  
  169.