OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [doc/] [ConfigWind.3] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1990-1993 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: ConfigWind.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
9
'\"
10
.so man.macros
11
.TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures"
12
.BS
13
.SH NAME
14
Tk_ConfigureWindow, Tk_MoveWindow, Tk_ResizeWindow, Tk_MoveResizeWindow, Tk_SetWindowBorderWidth, Tk_ChangeWindowAttributes, Tk_SetWindowBackground, Tk_SetWindowBackgroundPixmap, Tk_SetWindowBorder, Tk_SetWindowBorderPixmap, Tk_SetWindowColormap, Tk_DefineCursor, Tk_UndefineCursor \- change window configuration or attributes
15
.SH SYNOPSIS
16
.nf
17
\fB#include \fR
18
.sp
19
\fBTk_ConfigureWindow\fR(\fItkwin, valueMask, valuePtr\fR)
20
.sp
21
\fBTk_MoveWindow\fR(\fItkwin, x, y\fR)
22
.sp
23
\fBTk_ResizeWindow\fR(\fItkwin, width, height\fR)
24
.sp
25
\fBTk_MoveResizeWindow\fR(\fItkwin, x,  y, width, height\fR)
26
.sp
27
\fBTk_SetWindowBorderWidth\fR(\fItkwin, borderWidth\fR)
28
.sp
29
\fBTk_ChangeWindowAttributes\fR(\fItkwin, valueMask, attsPtr\fR)
30
.sp
31
\fBTk_SetWindowBackground\fR(\fItkwin, pixel\fR)
32
.sp
33
\fBTk_SetWindowBackgroundPixmap\fR(\fItkwin, pixmap\fR)
34
.sp
35
\fBTk_SetWindowBorder\fR(\fItkwin, pixel\fR)
36
.sp
37
\fBTk_SetWindowBorderPixmap\fR(\fItkwin, pixmap\fR)
38
.sp
39
\fBTk_SetWindowColormap\fR(\fItkwin, colormap\fR)
40
.sp
41
\fBTk_DefineCursor\fR(\fItkwin, cursor\fR)
42
.sp
43
\fBTk_UndefineCursor\fR(\fItkwin\fR)
44
.SH ARGUMENTS
45
.AS XSetWindowAttributes borderWidth
46
.AP Tk_Window tkwin in
47
Token for window.
48
.AP "unsigned int" valueMask in
49
OR-ed mask of values like \fBCWX\fR or \fBCWBorderPixel\fR,
50
indicating which fields of \fI*valuePtr\fR or \fI*attsPtr\fR to use.
51
.AP XWindowChanges *valuePtr in
52
Points to a structure containing new values for the configuration
53
parameters selected by \fIvalueMask\fR.  Fields not selected
54
by \fIvalueMask\fR are ignored.
55
.AP int x in
56
New x-coordinate for \fItkwin\fR's top left pixel (including
57
border, if any) within tkwin's parent.
58
.AP int y in
59
New y-coordinate for \fItkwin\fR's top left pixel (including
60
border, if any) within tkwin's parent.
61
.AP "int" width in
62
New width for \fItkwin\fR (interior, not including border).
63
.AP "int" height in
64
New height for \fItkwin\fR (interior, not including border).
65
.AP "int" borderWidth in
66
New width for \fItkwin\fR's border.
67
.AP XSetWindowAttributes *attsPtr in
68
Points to a structure containing new values for the attributes
69
given by the \fIvalueMask\fR argument.  Attributes not selected
70
by \fIvalueMask\fR are ignored.
71
.AP "unsigned long" pixel in
72
New background or border color for window.
73
.AP Pixmap pixmap in
74
New pixmap to use for background or border of \fItkwin\fR.  WARNING:
75
cannot necessarily be deleted immediately, as for Xlib calls.  See
76
note below.
77
.AP Colormap colormap in
78
New colormap to use for \fItkwin\fR.
79
.AP Tk_Cursor cursor in
80
New cursor to use for \fItkwin\fR.  If \fBNone\fR is specified, then
81
\fItkwin\fR will not have its own cursor;  it will use the cursor
82
of its parent.
83
.BE
84
 
85
.SH DESCRIPTION
86
.PP
87
These procedures are analogous to the X library procedures
88
with similar names, such as \fBXConfigureWindow\fR.  Each
89
one of the above procedures calls the corresponding X procedure
90
and also saves the configuration information in Tk's local
91
structure for the window.  This allows the information to
92
be retrieved quickly by the application (using macros such
93
as \fBTk_X\fR and \fBTk_Height\fR) without having to contact
94
the X server.  In addition, if no X window has actually been
95
created for \fItkwin\fR yet, these procedures do not issue
96
X operations or cause event handlers to be invoked;  they save
97
the information in Tk's local
98
structure for the window;  when the window is created later,
99
the saved information will be used to configure the window.
100
.PP
101
See the X library documentation for details on what these
102
procedures do and how they use their arguments.
103
.PP
104
In the procedures \fBTk_ConfigureWindow\fR, \fBTk_MoveWindow\fR,
105
\fBTk_ResizeWindow\fR, \fBTk_MoveResizeWindow\fR, and
106
\fBTk_SetWindowBorderWidth\fR,
107
if \fItkwin\fR is an internal window then event handlers interested
108
in configure events are invoked immediately, before the procedure
109
returns.  If \fItkwin\fR is a top-level window
110
then the event handlers will be invoked later, after X has seen
111
the request and returned an event for it.
112
.PP
113
Applications using Tk should never call procedures like
114
\fBXConfigureWindow\fR directly;  they should always use the
115
corresponding Tk procedures.
116
.PP
117
The size and location of a window should only be modified by the
118
appropriate geometry manager for that window and never by a window
119
itself (but see \fBTk_MoveToplevelWindow\fR for moving a top-level
120
window).
121
.PP
122
You may not use \fBTk_ConfigureWindow\fR to change the
123
stacking order of a window (\fIvalueMask\fR may not contain the
124
\fBCWSibling\fR or \fBCWStackMode\fR bits).
125
To change the stacking order, use the procedure \fBTk_RestackWindow\fR.
126
.PP
127
The procedure \fBTk_SetWindowColormap\fR will automatically add
128
\fItkwin\fR to the \fBTK_COLORMAP_WINDOWS\fR property of its
129
nearest top-level ancestor if the new colormap is different from
130
that of \fItkwin\fR's parent and \fItkwin\fR isn't already in
131
the \fBTK_COLORMAP_WINDOWS\fR property.
132
 
133
.SH BUGS
134
.PP
135
\fBTk_SetWindowBackgroundPixmap\fR and \fBTk_SetWindowBorderPixmap\fR
136
differ slightly from their Xlib counterparts in that the \fIpixmap\fR
137
argument may not necessarily be deleted immediately after calling
138
one of these procedures.  This is because \fItkwin\fR's window
139
may not exist yet at the time of the call, in which case \fIpixmap\fR
140
is merely saved and used later when \fItkwin\fR's window is actually
141
created.  If you wish to delete \fIpixmap\fR, then call
142
\fBTk_MakeWindowExist\fR first to be sure that \fItkwin\fR's window exists
143
and \fIpixmap\fR has been passed to the X server.
144
.PP
145
A similar problem occurs for the \fIcursor\fR argument passed to
146
\fBTk_DefineCursor\fR.  The solution is the same as for pixmaps above:
147
call \fBTk_MakeWindowExist\fR before freeing the cursor.
148
 
149
.SH "SEE ALSO"
150
Tk_MoveToplevelWindow, Tk_RestackWindow
151
 
152
.SH KEYWORDS
153
attributes, border, color, configure, height, pixel, pixmap, width, window, x, y

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.