File: Utils.h

package info (click to toggle)
xbae 4.60.4-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,020 kB
  • sloc: ansic: 22,089; sh: 8,293; makefile: 522; tcl: 1
file content (103 lines) | stat: -rw-r--r-- 3,958 bytes parent folder | download | duplicates (5)
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
/*
 * Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore)
 * Copyright(c) 1995-99 Andrew Lister
 * Copyright (c) 1999-2002, 2004 by the LessTif Developers.
 *
 *                        All rights reserved
 * Permission to use, copy, modify and distribute this material for
 * any purpose and without fee is hereby granted, provided that the
 * above copyright notice and this permission notice appear in all
 * copies, and that the name of Bellcore not be used in advertising
 * or publicity pertaining to this material without the specific,
 * prior written permission of an authorized representative of
 * Bellcore.
 *
 * BELLCORE MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EX-
 * PRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE, INCLUDING, BUT
 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY AGAINST IN-
 * FRINGEMENT OF PATENTS OR OTHER INTELLECTUAL PROPERTY RIGHTS.  THE
 * SOFTWARE IS PROVIDED "AS IS", AND IN NO EVENT SHALL BELLCORE OR
 * ANY OF ITS AFFILIATES BE LIABLE FOR ANY DAMAGES, INCLUDING ANY
 * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT-
 * ING TO THE SOFTWARE.
 *
 * $Id: Utils.h,v 1.45 2006/05/16 19:59:53 tobiasoed Exp $
 */

/*
 * Utils.h created by Andrew Lister (6 August, 1995)
 */
#ifndef _Xbae_Utils_h
#define _Xbae_Utils_h

#include <X11/Intrinsic.h>
#include <Xbae/MatrixP.h>

#include <Xbae/Macros.h>


#ifdef __cplusplus
extern "C" {
#endif

void xbaeGetColumnPositions(XbaeMatrixWidget);
void xbaeGetRowPositions(XbaeMatrixWidget);
int xbaeCheckRowPosition(XbaeMatrixWidget mw, int row);
int xbaeCheckColumnPosition(XbaeMatrixWidget mw, int column);

int xbaeTopRow(XbaeMatrixWidget mw);
int xbaeBottomRow(XbaeMatrixWidget mw);
int xbaeLeftColumn(XbaeMatrixWidget mw);
int xbaeRightColumn(XbaeMatrixWidget mw);
void xbaeGetVisibleRows(XbaeMatrixWidget, int *, int *);
void xbaeGetVisibleColumns(XbaeMatrixWidget, int *, int *);
void xbaeGetVisibleCells(XbaeMatrixWidget mw, int *, int *, int *, int *);

int xbaeCalculateHorizOrigin(XbaeMatrixWidget mw, int left_column);
int xbaeCalculateVertOrigin(XbaeMatrixWidget mw, int top_row);

Boolean xbaeIsRowVisible(XbaeMatrixWidget, int);
Boolean xbaeIsColumnVisible(XbaeMatrixWidget, int);
Boolean xbaeIsCellVisible(XbaeMatrixWidget, int, int);

void xbaeMakeRowVisible(XbaeMatrixWidget, int);
void xbaeMakeColumnVisible(XbaeMatrixWidget, int);
void xbaeMakeCellVisible(XbaeMatrixWidget, int, int);

void xbaeComputeSize(XbaeMatrixWidget, Boolean, Boolean);
int xbaeCalculateLabelMaxLength(XbaeMatrixWidget mw, String *labels, XmString *xmlabels, int n_labels);
int xbaeCalculateLabelMaxLines(String *labels, XmString *xmlabels, int n_labels);

XbaeMatrixWidget xbaeEventToMatrixWidget(Widget w, XEvent *event);
XbaeMatrixWidget xbaeEventToMatrixXY(Widget w, XEvent *event, int *x, int *y);
int xbaeEventToRowColumn(Widget w, XEvent * event, int *row, int *column, int *x, int *y);

int xbaeMatrixXtoColumn(XbaeMatrixWidget mw,int *x, int *column);
int xbaeMatrixYtoRow(XbaeMatrixWidget mw,int *y, int *row);
int xbaeMatrixXYToRowCol(XbaeMatrixWidget mw,
    int *x, int *y, int *row,int *column);

int xbaeColumnToMatrixX(XbaeMatrixWidget mw, int column);
int xbaeRowToMatrixY(XbaeMatrixWidget mw, int row);
Widget xbaeRowColToClipXY(XbaeMatrixWidget, int, int, int *, int *);

void xbaeHideCellWidget(XbaeMatrixWidget mw, Widget cw);
void xbaePositionCellWidget(XbaeMatrixWidget mw, int row, int column);
void xbaeHideTextField(XbaeMatrixWidget mw);
void xbaePositionTextField(XbaeMatrixWidget mw);
void xbaeSetInitialFocus(XbaeMatrixWidget mw);

void xbaeSaneRectangle(XbaeMatrixWidget mw, XRectangle *rect_p,int rs, int cs, int re, int ce);

void xbaeObjectLock(Widget);
void xbaeObjectUnlock(Widget);

void xbaeScrollRows(XbaeMatrixWidget, int step);
void xbaeScrollColumns(XbaeMatrixWidget, int step);

#ifdef __cplusplus
}
#endif

#endif /* _Xbae_Utils_h */