1Tk_GeometryRequest(3) Tk Library Procedures Tk_GeometryRequest(3)
2
3
4
5______________________________________________________________________________
6
8 Tk_GeometryRequest, Tk_SetMinimumRequestSize, Tk_SetInternalBorder,
9 Tk_SetInternalBorderEx - specify desired geometry or internal border
10 for a window
11
13 #include <tk.h>
14
15 Tk_GeometryRequest(tkwin, reqWidth, reqHeight)
16
17 Tk_SetMinimumRequestSize(tkwin, minWidth, minHeight)
18
19 Tk_SetInternalBorder(tkwin, width)
20
21 Tk_SetInternalBorderEx(tkwin, left, right, top, bottom)
22
24 Tk_Window tkwin (in) Window for which geometry is being
25 requested.
26
27 int reqWidth (in) Desired width for tkwin, in pixel
28 units.
29
30 int reqHeight (in) Desired height for tkwin, in pixel
31 units.
32
33 int minWidth (in) Desired minimum requested width for
34 tkwin, in pixel units.
35
36 int minHeight (in) Desired minimum requested height
37 for tkwin, in pixel units.
38
39 int width (in) Space to leave for internal border
40 for tkwin, in pixel units.
41
42 int left (in) Space to leave for left side of
43 internal border for tkwin, in pixel
44 units.
45
46 int right (in) Space to leave for right side of
47 internal border for tkwin, in pixel
48 units.
49
50 int top (in) Space to leave for top side of
51 internal border for tkwin, in pixel
52 units.
53
54 int bottom (in) Space to leave for bottom side of
55 internal border for tkwin, in pixel
56 units.
57_________________________________________________________________
58
59
61 Tk_GeometryRequest is called by widget code to indicate its preference
62 for the dimensions of a particular window. The arguments to Tk_Geome‐
63 tryRequest are made available to the geometry manager for the window,
64 which then decides on the actual geometry for the window. Although
65 geometry managers generally try to satisfy requests made to Tk_Geome‐
66 tryRequest, there is no guarantee that this will always be possible.
67 Widget code should not assume that a geometry request will be satisfied
68 until it receives a ConfigureNotify event indicating that the geometry
69 change has occurred. Widget code should never call procedures like
70 Tk_ResizeWindow directly. Instead, it should invoke Tk_GeometryRequest
71 and leave the final geometry decisions to the geometry manager.
72
73 If tkwin is a top-level window, then the geometry information will be
74 passed to the window manager using the standard ICCCM protocol.
75
76 Tk_SetInternalBorder is called by widget code to indicate that the wid‐
77 get has an internal border. This means that the widget draws a decora‐
78 tive border inside the window instead of using the standard X borders,
79 which are external to the window's area. For example, internal borders
80 are used to draw 3-D effects. Width specifies the width of the border
81 in pixels. Geometry managers will use this information to avoid plac‐
82 ing any children of tkwin overlapping the outermost width pixels of
83 tkwin's area.
84
85 Tk_SetInternalBorderEx works like Tk_SetInternalBorder but lets you
86 specify different widths for different sides of the window.
87
88 Tk_SetMinimumRequestSize is called by widget code to indicate that a
89 geometry manager should request at least this size for the widget.
90 This allows a widget to have some control over its size when a propa‐
91 gating geometry manager is used inside it.
92
93 The information specified in calls to Tk_GeometryRequest, Tk_SetMini‐
94 mumRequestSize, Tk_SetInternalBorder and Tk_SetInternalBorderEx can be
95 retrieved using the macros Tk_ReqWidth, Tk_ReqHeight, Tk_MinReqWidth,
96 Tk_MinReqHeight, Tk_MinReqWidth, Tk_InternalBorderLeft, Tk_InternalBor‐
97 derRight, Tk_InternalBorderTop and Tk_InternalBorderBottom. See the
98 Tk_WindowId manual entry for details.
99
100
102 geometry, request
103
104
105
106Tk 8.4 Tk_GeometryRequest(3)