Back to index

tetex-bin  3.0
TipP.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2004 Marcin Dalecki and others
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a copy
00005  * of this software and associated documentation files (the "Software"), to
00006  * deal in the Software without restriction, including without limitation the
00007  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00008  * sell copies of the Software, and to permit persons to whom the Software is
00009  * furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included in
00012  * all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00017  * PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY CLAIM,
00018  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00020  * OTHER DEALINGS IN THE SOFTWARE.
00021  *
00022  */
00023 
00024 #ifndef TIPP_h
00025 #define TIPP_h
00026 
00027 #include <X11/ShellP.h>
00028 
00029 #include "Tip.h"
00030 
00031 /* Doubly Linked List Processing.
00032  */
00033 struct list_thread_str {
00034     struct list_thread_str *forw;
00035     struct list_thread_str *back;
00036 };
00037 typedef struct list_thread_str ListThread;
00038 
00039 typedef struct {
00040     int __empty;
00041 } TipClassPart;
00042 
00043 /* Full class record declaration.
00044  */
00045 typedef struct _TipClassRec {
00046     CoreClassPart core_class;
00047     CompositeClassPart composite_class;
00048     ShellClassPart shell_class;
00049     OverrideShellClassPart override_shell_class;
00050     TipClassPart tip_class;
00051 } TipClassRec;
00052 
00053 extern TipClassRec xmTipClassRec;
00054 
00055 /* New fields for the widget record.
00056  */
00057 typedef struct {
00058     /* resources */
00059     Pixel foreground;
00060     XFontSet fontset;              /* the font for text in box */
00061     int waitPeriod;         /* the delay resource - pointer must be
00062                                in watched widget this long before
00063                                tooltip is displayed - in milliseconds
00064                              */
00065     int cancelWaitPeriod;   /* after help is popped-down - normal
00066                                wait period is cancelled for this
00067                                period - in milliseconds
00068                              */
00069 
00070     /* -------- private state --------- */
00071     ListThread widget_list; /* list of widgets we are liteClue-ing */
00072     Dimension font_width;   /* width of '1' character */
00073     Dimension font_height;  /* height of font, rows are spaced using this */
00074     Dimension font_baseline;       /* relative displacement to baseline from top */
00075     GC text_GC;                    /* for drawing text */
00076     XtIntervalId tid;              /* holds timer id */
00077     XtIntervalId pid;              /* holds pooler id for insensitive widgets */
00078     Widget parent;
00079     Widget isup;            /* the help popup is up on this widget */
00080     Time HelpPopDownTime;   /* the time at which help popup was popped down */
00081 } TipPart;
00082 
00083 
00084 /*
00085  * Full instance record declaration
00086  */
00087 typedef struct _TipRec {
00088     CorePart core;
00089     CompositePart composite;
00090     ShellPart shell;
00091     OverrideShellPart override;
00092     TipPart tip;
00093 } TipRec;
00094 
00095 #endif