home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / XfeWidgets / Xfe / ProgressBarP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  4.3 KB  |  118 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/ProgressBarP.h>                                    */
  21. /* Description:    XfeProgressBar widget private header file.                */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27. #ifndef _XfeProgressBarP_h_                    /* start ProgressBarP.h        */
  28. #define _XfeProgressBarP_h_
  29.  
  30. #include <Xfe/ProgressBar.h>
  31. #include <Xfe/LabelP.h>
  32.  
  33. #ifdef __cplusplus                                /* start C++            */
  34. extern "C" {
  35. #endif
  36.  
  37. /*----------------------------------------------------------------------*/
  38. /*                                                                        */
  39. /* XfeProgressBarClassRec                                                */
  40. /*                                                                        */
  41. /*----------------------------------------------------------------------*/
  42. typedef struct
  43. {
  44.     XtPointer        extension;                    /* Extension            */
  45. } XfeProgressBarClassPart;
  46.  
  47. /*----------------------------------------------------------------------*/
  48. /*                                                                        */
  49. /* XfeProgressBarPart                                                    */
  50. /*                                                                        */
  51. /*----------------------------------------------------------------------*/
  52. typedef struct _XfeProgressBarClassRec
  53. {
  54.     CoreClassPart            core_class;                /* Core class        */
  55.     XmPrimitiveClassPart    primitive_class;        /* XmPrimitive        */
  56.     XfePrimitiveClassPart    xfe_primitive_class;    /* XfePrimitive        */
  57.     XfeLabelClassPart        xfe_label_class;        /* XfeLabel            */
  58.     XfeProgressBarClassPart    xfe_progress_bar_class;    /* XfeProgressBar    */
  59. } XfeProgressBarClassRec;
  60.  
  61. externalref XfeProgressBarClassRec xfeProgressBarClassRec;
  62.  
  63. /*----------------------------------------------------------------------*/
  64. /*                                                                        */
  65. /* XfeProgressBarRec                                                    */
  66. /*                                                                        */
  67. /*----------------------------------------------------------------------*/
  68. typedef struct _XfeProgressBarPart
  69. {
  70.     /* Callback resources */
  71.     Pixel                bar_color;                /* Bar color            */
  72.     int                    start_percent;            /* Start percent        */
  73.     int                    end_percent;            /* End percent            */
  74.  
  75.     int                    cylon_interval;            /* Cylon interval        */
  76.     int                    cylon_offset;            /* Cylon offset            */
  77.     Boolean                cylon_running;            /* Cylon running        */
  78.     int                    cylon_width;            /* Cylon width            */
  79.     
  80.     /* Private Data Members */
  81.     XRectangle            bar_rect;                /* Bar rectangle        */
  82.     GC                    bar_GC;                    /* Bar gc                */
  83.     GC                    bar_insens_GC;            /* Bar insensitive gc    */
  84.  
  85.     /* Private Data Members */
  86.     XtIntervalId        timer_id;                /* Timer id                */
  87.     Boolean                cylon_direction;        /* Cylon direction        */
  88.     int                    cylon_index;            /* Cylon index            */
  89.  
  90. } XfeProgressBarPart;
  91.  
  92. /*----------------------------------------------------------------------*/
  93. /*                                                                        */
  94. /* XfeProgressBarPart                                                    */
  95. /*                                                                        */
  96. /*----------------------------------------------------------------------*/
  97. typedef struct _XfeProgressBarRec
  98. {
  99.     CorePart            core;                    /* Core Part            */
  100.     XmPrimitivePart        primitive;                /* XmPrimitive Part        */
  101.     XfePrimitivePart    xfe_primitive;            /* XfePrimitive Part    */
  102.     XfeLabelPart        xfe_label;                /* XfeLabel Part        */
  103.     XfeProgressBarPart    xfe_progress_bar;        /* XfeProgressBar Part    */
  104. } XfeProgressBarRec;
  105.  
  106. /*----------------------------------------------------------------------*/
  107. /*                                                                        */
  108. /* XfeProgressBarPart Access Macro                                        */
  109. /*                                                                        */
  110. /*----------------------------------------------------------------------*/
  111. #define _XfeProgressBarPart(w) &(((XfeProgressBarWidget) w) -> xfe_progress_bar)
  112.  
  113. #ifdef __cplusplus                                /* end C++                */
  114. }
  115. #endif
  116.  
  117. #endif                                            /* end ProgressBarP.h    */
  118.