Tk Source Code

Check-in [149ea1b1]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Documentation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip518-event-last-child-unmanaged
Files: files | file ages | folders
SHA3-256: 149ea1b1015ee66bbbb75d9e5b219df2cf24e1fbf68669d39143d77d0d019ce1
User & Date: dkf 2018-10-28 22:17:26
Context
2018-10-29
12:52
Tests for virtual event <<NoManagedChild>> check-in: eda5d55d user: oehhar tags: tip518-event-last-child-unmanaged
2018-10-28
22:17
Documentation check-in: 149ea1b1 user: dkf tags: tip518-event-last-child-unmanaged
22:06
merge trunk check-in: ba7406d3 user: dkf tags: tip518-event-last-child-unmanaged
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/grid.n.

198
199
200
201
202
203
204








205
206
207
208
209
210
211
...
274
275
276
277
278
279
280








281
282
283
284
285
286
287
.
Removes each of the \fIslave\fRs from grid for its
master and unmaps their windows.
The slaves will no longer be managed by the grid geometry manager.
The configuration options for that window are forgotten, so that if the
slave is managed once more by the grid geometry manager, the initial
default settings are used.








.TP
\fBgrid info \fIslave\fR
.
Returns a list whose elements are the current configuration state of
the slave given by \fIslave\fR in the same option-value form that
might be specified to \fBgrid configure\fR.
The first two elements of the list are
................................................................................
Removes each of the \fIslave\fRs from grid for its
master and unmaps their windows.
The slaves will no longer be managed by the grid geometry manager.
However, the configuration options for that window are remembered,
so that if the
slave is managed once more by the grid geometry manager, the previous
values are retained.








.TP
\fBgrid size \fImaster\fR
.
Returns the size of the grid (in columns then rows) for \fImaster\fR.
The size is determined either by the \fIslave\fR occupying the largest
row or column, or the largest column or row with a \fB\-minsize\fR,
\fB\-weight\fR, or \fB\-pad\fR that is non-zero.






>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
...
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
.
Removes each of the \fIslave\fRs from grid for its
master and unmaps their windows.
The slaves will no longer be managed by the grid geometry manager.
The configuration options for that window are forgotten, so that if the
slave is managed once more by the grid geometry manager, the initial
default settings are used.
.RS
.PP
.VS TIP518
If the last slave of the master becomes unmanaged, this will also send
the virtual event \fB<<NoManagedChild>>\fR to the master; the master
may choose to resize itself (or otherwise respond) to such a change.
.VE TIP518
.RE
.TP
\fBgrid info \fIslave\fR
.
Returns a list whose elements are the current configuration state of
the slave given by \fIslave\fR in the same option-value form that
might be specified to \fBgrid configure\fR.
The first two elements of the list are
................................................................................
Removes each of the \fIslave\fRs from grid for its
master and unmaps their windows.
The slaves will no longer be managed by the grid geometry manager.
However, the configuration options for that window are remembered,
so that if the
slave is managed once more by the grid geometry manager, the previous
values are retained.
.RS
.PP
.VS TIP518
If the last slave of the master becomes unmanaged, this will also send
the virtual event \fB<<NoManagedChild>>\fR to the master; the master
may choose to resize itself (or otherwise respond) to such a change.
.VE TIP518
.RE
.TP
\fBgrid size \fImaster\fR
.
Returns the size of the grid (in columns then rows) for \fImaster\fR.
The size is determined either by the \fIslave\fR occupying the largest
row or column, or the largest column or row with a \fB\-minsize\fR,
\fB\-weight\fR, or \fB\-pad\fR that is non-zero.

Changes to doc/pack.n.

125
126
127
128
129
130
131








132
133
134
135
136
137
138
than receiving default values.
.RE
.TP
\fBpack forget \fIslave \fR?\fIslave ...\fR?
Removes each of the \fIslave\fRs from the packing order for its
master and unmaps their windows.
The slaves will no longer be managed by the packer.








.TP
\fBpack info \fIslave\fR
Returns a list whose elements are the current configuration state of
the slave given by \fIslave\fR in the same option-value form that
might be specified to \fBpack configure\fR.
The first two elements of the list are
.QW "\fB\-in \fImaster\fR"






>
>
>
>
>
>
>
>







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
than receiving default values.
.RE
.TP
\fBpack forget \fIslave \fR?\fIslave ...\fR?
Removes each of the \fIslave\fRs from the packing order for its
master and unmaps their windows.
The slaves will no longer be managed by the packer.
.RS
.PP
.VS TIP518
If the last slave of the master becomes unmanaged, this will also send
the virtual event \fB<<NoManagedChild>>\fR to the master; the master
may choose to resize itself (or otherwise respond) to such a change.
.VE TIP518
.RE
.TP
\fBpack info \fIslave\fR
Returns a list whose elements are the current configuration state of
the slave given by \fIslave\fR in the same option-value form that
might be specified to \fBpack configure\fR.
The first two elements of the list are
.QW "\fB\-in \fImaster\fR"

Changes to generic/tkGrid.c.

1731
1732
1733
1734
1735
1736
1737
1738
1739

1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
    masterPtr->flags &= ~REQUESTED_RELAYOUT;

    /*
     * If the master has no slaves anymore, then don't change the master size.
     * Otherwise there is no way to "relinquish" control over the master
     * so another geometry manager can take over.
     * Send event to "NoManagedChild" to inform about no managed grid but
     * not resized.

     */

    if (masterPtr->slavePtr == NULL) {
        TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
	return;
    }

    if (masterPtr->masterDataPtr == NULL) {
	return;
    }







|
|
>



|







1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
    masterPtr->flags &= ~REQUESTED_RELAYOUT;

    /*
     * If the master has no slaves anymore, then don't change the master size.
     * Otherwise there is no way to "relinquish" control over the master
     * so another geometry manager can take over.
     *
     * Sends the event "NoManagedChild" to the master to inform it about there
     * being no managed children inside it.
     */

    if (masterPtr->slavePtr == NULL) {
	TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
	return;
    }

    if (masterPtr->masterDataPtr == NULL) {
	return;
    }

Changes to generic/tkPack.c.

609
610
611
612
613
614
615
616
617

618
619
620
621
622
623
624
625
626
627
628
    masterPtr->flags &= ~REQUESTED_REPACK;

    /*
     * If the master has no slaves anymore, then leave the master's size as-is.
     * Otherwise there is no way to "relinquish" control over the master
     * so another geometry manager can take over.
     * Send event to "NoManagedChild" to inform about no managed grid but
     * not resized.

     */

    if (masterPtr->slavePtr == NULL) {
        TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
	return;
    }

    /*
     * Abort any nested call to ArrangePacking for this window, since we'll do
     * everything necessary here, and set up so this call can be aborted if
     * necessary.






|
|
>



|







609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
    masterPtr->flags &= ~REQUESTED_REPACK;

    /*
     * If the master has no slaves anymore, then leave the master's size as-is.
     * Otherwise there is no way to "relinquish" control over the master
     * so another geometry manager can take over.
     *
     * Sends the event "NoManagedChild" to the master to inform it about there
     * being no managed children inside it.
     */

    if (masterPtr->slavePtr == NULL) {
	TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
	return;
    }

    /*
     * Abort any nested call to ArrangePacking for this window, since we'll do
     * everything necessary here, and set up so this call can be aborted if
     * necessary.