1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
/* ########################################################################
browser_init.h
File: browser_init.h
Path: /home/fournigault/c/X11/xcoral-2.31/browser_init.h
Description:
Created: Fri Jan 27 10:48:04 MET 1995
Author: Lionel Fournigault
Modified: Fri Jan 27 10:48:05 MET 1995
Last maintained by: Lionel Fournigault
RCS $Revision$ $State$
########################################################################
Note:
########################################################################
Copyright (c) : Lionel Fournigault
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
######################################################################## */
#ifndef _BROWSER_INIT_H_
#define _BROWSER_INIT_H_
#include <sys/param.h>
#include "main_text.h"
#include "proto_decl.h"
#include "xc_conf.h"
#define B_MAP 1
#define B_UNMAP 2
#define B_ADD 5
#define B_DEL 6
#define DEC_MODE 0
#define B_BUTTON_WIDTH 60
#define B_INTER 5
#define B_SPACE 2
#define W_CLASS 0
#define W_PARENT 1
#define W_CHILD 2
#define W_METHOD 3
#define W_ATTRIBUTES 4
#define W_GLOBALS 5
#define W_PROC 6
#define W_FILES 7
#define W_VISIT 8
#define C_FIRST_WIN 6
#define B_NB_WIN 9
#define RECURSIVE 0
#define NO_RECURSIVE 1
#define B_BUFFER_SIZE 5000
#define B_SEARCH "Search"
/*
* Les Infos des fenetres de texte.
*/
typedef struct _BWin {
Window frame, title, main; /* Les fenetres principales */
int f_width, f_height; /* Les dimensions */
int t_width, t_height;
int m_width, m_height;
int x, y; /* La position */
Text *text; /* Les infos sur le texte */
Buf *buf; /* Le buffer */
SWin *scroll;/* Les Infos sur le scroll */
int select; /* Ligne selectionnee */
}BWin;
/*
* Le browser.
*/
typedef struct _Browser {
int width, height; /* Larguer hauteur du browser */
unsigned long fg, bg, text_fg, text_bg;/* Les couleurs */
#ifdef WITH_BR_TITLE
Window frame, title, main; /* Les fenetres principales */
#else
Window frame, main; /* Les fenetres principales */
#endif
char *title_name; /* L'objet selectionne */
Window dec,add, smac,del, close, edit,pp; /* Les boutons */
Window dump, restore, hide; /* Les boutons */
BWin tbw [B_NB_WIN]; /* Les fenetres de texte */
Buf *filebuf; /* Pour les noms de fichiers */
GC gc; /* Le contexte graphique */
XFontStruct *font; /* La fonte */
int title_height; /* La hauteur du titre */
int button_height; /* la hauteur des boutons */
int button_width; /* La largeur des boutons */
unsigned long ts, bs; /* Les couleurs pour le 3D */
int dec_imp_flag; /* Toggle flag pour les methodes */
char **attributes_save; /* Sauvegarde des divers pointeurs */
char **procs_save;
char **globals_save;
char **methods_save; /* Sauvegarde des divers pointeurs */
char **class_save;
char **files_save;
int stat; /* Browser mappe ou non */
int visible; /* Visibilite */
Mode *mode; /* Le mode */
char dir [MAXPATHLEN];/* La directorie courante */
int visit_raise;
Time click_time;
Time old_click;
int parse_flag; /* Recursif ou pas */
Window rec; /* Toggle button */
} Browser;
FCT (void, InitBrowser, () );
FCT (char *, GetBrowserModeName, () );
FCT (void, SetBrowserDir, (char *) );
FCT (void, LoadDir, (char *dir) );
FCT (void, SetInfos, () );
FCT (void, ExtractInfos, (char **names, int type) );
FCT (void, ConfigScroll, (BWin *bw) );
FCT (void, ConfigBrowser, (int width, int height) );
FCT (void, ConfigVisitWindow, (int width, int height) );
FCT (void, DisplayBrowser, () );
FCT (void, DisplayBrowserIfNeverMap,());
FCT (void, UnmapBrowser, () );
FCT (void, SetBrowserMode, (Mode *mode) );
FCT (void, RefreshBrowserControl, () );
FCT (void, BrowserClearSelection, () );
#define GetBrowserFrame() ( br.frame )
#define GetBrowserVisit() ( br.tbw[W_VISIT].frame )
/*
* Engine
*/
#include "result_types.h"
#include "browser_eng.h"
#endif /* _BROWSER_INIT_H_ */
|