• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/tcl-102/tk84/tk/generic/

Lines Matching refs:slot

32 #define CHECK_ONLY	(1)	/* check max slot constraint */
38 * required, the layout calculations overwehlm them. [A "slot" contains
53 * However, the space is proportional to the highest numbered slot with
69 * Structure to hold information for grid masters. A slot is either
74 int minSize; /* The minimum size of this slot (in pixels).
77 int weight; /* The resize weight of this slot. (0) means
78 * this slot doesn't resize. Extra space in
82 * this slot. This amount is "added" to the
83 * largest slave in the slot. */
90 * of this slot from the beginning of the
100 * is one of these for each slot, an array for each of the rows or columns.
107 * right edges fall in this slot. */
108 int minSize; /* Minimum size needed for this slot,
111 * in this slot, adjusted for any slot
113 int pad; /* Padding needed for this slot */
120 * right/bottom edge of the slot calculated
124 * right-or-bottom edge of the slot calculated
258 static int CheckSlotData _ANSI_ARGS_((Gridder *masterPtr, int slot,
847 int slot; /* the column or row number */
898 if (Tcl_GetIntFromObj(interp, lObjv[j], &slot) != TCL_OK) {
902 ok = CheckSlotData(masterPtr, slot, slotType, checkOnly);
926 minsize = slotPtr[slot].minSize;
927 pad = slotPtr[slot].pad;
928 weight = slotPtr[slot].weight;
929 uniform = slotPtr[slot].uniform;
965 (ok == TCL_OK) ? slotPtr[slot].minSize : 0));
971 slotPtr[slot].minSize = size;
977 (ok == TCL_OK) ? slotPtr[slot].weight : 0));
989 slotPtr[slot].weight = wt;
994 value = (ok == TCL_OK) ? slotPtr[slot].uniform : "";
1000 slotPtr[slot].uniform = Tk_GetUid(Tcl_GetString(objv[i+1]));
1001 if (slotPtr[slot].uniform != NULL &&
1002 slotPtr[slot].uniform[0] == 0) {
1003 slotPtr[slot].uniform = NULL;
1009 (ok == TCL_OK) ? slotPtr[slot].pad : 0));
1021 slotPtr[slot].pad = size;
1281 * the minsize specified for that slot.
1288 * The slot offsets are modified to shrink the layout.
1297 register SlotInfo *slotPtr; /* Pointer to slot array. */
1299 register int slot; /* Current slot. */
1322 for (slot = 0; slot < slots; slot++) {
1323 totalWeight += slotPtr[slot].weight;
1331 * Add extra space according to the slot weights. This is done
1337 for (slot = 0; slot < slots; slot++) {
1338 weight += slotPtr[slot].weight;
1339 slotPtr[slot].offset += diff * weight / totalWeight;
1346 * minimum possible size by looking at the slot minSizes.
1347 * Store each slot's minimum size in temp.
1351 for (slot = 0; slot < slots; slot++) {
1352 if (slotPtr[slot].weight > 0) {
1353 slotPtr[slot].temp = slotPtr[slot].minSize;
1354 } else if (slot > 0) {
1355 slotPtr[slot].temp = slotPtr[slot].offset - slotPtr[slot-1].offset;
1357 slotPtr[slot].temp = slotPtr[slot].offset;
1359 minSize += slotPtr[slot].temp;
1364 * set the slot sizes to their minimum values, then clip on the
1370 for (slot = 0; slot < slots; slot++) {
1371 offset += slotPtr[slot].temp;
1372 slotPtr[slot].offset = offset;
1379 * get renormalized anytime a slot shrinks to its minimum size.
1388 for (totalWeight=slot=0; slot < slots; slot++) {
1389 int current = (slot == 0) ? slotPtr[slot].offset :
1390 slotPtr[slot].offset - slotPtr[slot-1].offset;
1391 if (current > slotPtr[slot].minSize) {
1392 totalWeight += slotPtr[slot].weight;
1393 slotPtr[slot].temp = slotPtr[slot].weight;
1395 slotPtr[slot].temp = 0;
1407 for (slot = 0; slot < slots; slot++) {
1408 int current; /* current size of this slot */
1410 * this slot to equal its minsize */
1411 if (slotPtr[slot].temp == 0) {
1414 current = (slot == 0) ? slotPtr[slot].offset :
1415 slotPtr[slot].offset - slotPtr[slot-1].offset;
1416 maxDiff = totalWeight * (slotPtr[slot].minSize - current)
1417 / slotPtr[slot].temp;
1427 for (weight=slot=0; slot < slots; slot++) {
1428 weight += slotPtr[slot].temp;
1429 slotPtr[slot].offset += newDiff * weight / totalWeight;
1593 * window size, then adjust the slot offsets according to the
1621 int width, height; /* slot or slave size */
1695 * The slot offsets are copied into the SlotInfo structure for the
1721 * current slot from the beginning of the
1723 int slot; /* The current slot. */
1724 int start; /* The first slot of a contiguous set whose
1726 int end; /* The Last slot of a contiguous set whose
1766 * Allocate an extra layout slot to represent the left/top edge of
1767 * the 0th slot to make it easier to calculate slot widths from
1769 * Initialize the "dummy" slot to the left/top of the table.
1770 * This slot avoids special casing the first slot.
1779 * Copy the slot constraints into the layout structure,
1783 for (slot=0; slot < constraintCount; slot++) {
1784 layoutPtr[slot].minSize = slotPtr[slot].minSize;
1785 layoutPtr[slot].weight = slotPtr[slot].weight;
1786 layoutPtr[slot].uniform = slotPtr[slot].uniform;
1787 layoutPtr[slot].pad = slotPtr[slot].pad;
1788 layoutPtr[slot].binNextPtr = NULL;
1790 for(;slot<gridCount;slot++) {
1791 layoutPtr[slot].minSize = 0;
1792 layoutPtr[slot].weight = 0;
1793 layoutPtr[slot].uniform = NULL;
1794 layoutPtr[slot].pad = 0;
1795 layoutPtr[slot].binNextPtr = NULL;
1801 * each slot. Slaves whose span is two or more slots don't
1802 * contribute to the minimum size of each slot directly, but can cause
1808 * sizes at each slot boundary, without the need to re-sort the slaves.
1857 for (slot = 0; slot < gridCount; slot++) {
1858 if (layoutPtr[slot].uniform != NULL) {
1860 if (uniformGroupPtr[start].group == layoutPtr[slot].uniform) {
1888 uniformGroupPtr[start].group = layoutPtr[slot].uniform;
1891 weight = layoutPtr[slot].weight;
1893 minSize = (layoutPtr[slot].minSize + weight - 1) / weight;
1905 for (slot = 0; slot < gridCount; slot++) {
1906 if (layoutPtr[slot].uniform != NULL) {
1909 layoutPtr[slot].uniform) {
1910 weight = layoutPtr[slot].weight;
1912 layoutPtr[slot].minSize =
1927 * Determine the minimum slot offsets going from left to right
1931 for (offset=slot=0; slot < gridCount; slot++) {
1932 layoutPtr[slot].minOffset = layoutPtr[slot].minSize + offset;
1933 for (slavePtr = layoutPtr[slot].binNextPtr; slavePtr != NULL;
1936 int required = slavePtr->size + layoutPtr[slot - span].minOffset;
1937 if (required > layoutPtr[slot].minOffset) {
1938 layoutPtr[slot].minOffset = required;
1941 offset = layoutPtr[slot].minOffset;
1957 * Determine the minimum slot offsets going from right to left,
1958 * bounding the pixel range of each slot boundary.
1963 for (slot=0; slot < gridCount; slot++) {
1964 layoutPtr[slot].maxOffset = offset;
1966 for (slot=gridCount-1; slot > 0;) {
1967 for (slavePtr = layoutPtr[slot].binNextPtr; slavePtr != NULL;
1971 int startSlot = slot - span;
1976 offset -= layoutPtr[slot].minSize;
1977 slot--;
1978 if (layoutPtr[slot].maxOffset < offset) {
1979 offset = layoutPtr[slot].maxOffset;
1981 layoutPtr[slot].maxOffset = offset;
1987 * At this point, each slot boundary has a range of values that
1990 * spans of slot boundaries where the minOffsets are less than
1991 * the maxOffsets, and adjust the offsets according to the slot
1992 * weights. At each pass, at least one slot boundary will have
2010 * slot boundaries have a range of possible positions.
2030 for (slot=start; slot<=end; slot++) {
2031 totalWeight += layoutPtr[slot].weight;
2032 need += layoutPtr[slot].minSize;
2049 * of one or more of the internal slot boundaries.
2051 * entire span, would cause a slot boundary to have its possible
2059 for (weight=0,slot=start; slot<end; slot++) {
2060 int diff = layoutPtr[slot].maxOffset - layoutPtr[slot].minOffset;
2061 weight += noWeights ? 1 : layoutPtr[slot].weight;
2062 if ((noWeights || layoutPtr[slot].weight>0) &&
2073 for (weight=0,slot=start; slot<end; slot++) {
2074 weight += noWeights ? 1 : layoutPtr[slot].weight;
2075 layoutPtr[slot].minOffset +=
2077 layoutPtr[slot].minSize = layoutPtr[slot].minOffset
2078 - layoutPtr[slot-1].minOffset;
2080 layoutPtr[slot].minSize = layoutPtr[slot].minOffset
2081 - layoutPtr[slot-1].minOffset;
2089 for (slot=end; slot > start; slot--) {
2090 layoutPtr[slot-1].maxOffset =
2091 layoutPtr[slot].maxOffset-layoutPtr[slot].minSize;
2102 for (slot=0; slot < gridCount; slot++) {
2103 slotPtr[slot].offset = layoutPtr[slot].minOffset;
2313 * row and column (slot) constraints.
2328 CheckSlotData(masterPtr, slot, slotType, checkOnly)
2330 int slot; /* which slot to look at */
2338 * If slot is out of bounds, return immediately.
2341 if (slot < 0 || slot >= MAX_ELEMENT) {
2359 return (end < slot) ? TCL_ERROR : TCL_OK;
2363 if (slot >= numSlot) {
2364 int newNumSlot = slot + PREALLOC ;
2382 if (slot >= end && checkOnly != CHECK_SPACE) {
2384 masterPtr->masterDataPtr->rowMax = slot+1;
2386 masterPtr->masterDataPtr->columnMax = slot+1;