Tk Source Code

Check-in [c7e4b683]
Login

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

Overview
Comment:make it build
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c7e4b683ea3542afdff72c03a622751f3fd2d26e
User & Date: dkf 2012-06-11 10:21:13
Context
2012-06-11
13:07
fix test failure check-in: bd0a0ac3 user: dkf tags: trunk
10:21
make it build check-in: c7e4b683 user: dkf tags: trunk
10:20
make it build check-in: 00b9436f user: dkf tags: core-8-5-branch
09:33
fix the clipping in entries too check-in: bf81f828 user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/ttk/ttkEntry.c.

1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
    int showSelection, showCursor;
    Ttk_Box textarea;
    TkRegion clipRegion;
    XRectangle rect;

    EntryInitStyleData(entryPtr, &es);

    textarea = Ttk_ClientRegion(corePtr->layout, "textarea");
    showCursor =
	   (entryPtr->core.flags & CURSOR_ON) != 0
	&& EntryEditable(entryPtr)
	&& entryPtr->entry.insertPos >= leftIndex
	&& entryPtr->entry.insertPos <= rightIndex
	;
    showSelection =







|







1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
    int showSelection, showCursor;
    Ttk_Box textarea;
    TkRegion clipRegion;
    XRectangle rect;

    EntryInitStyleData(entryPtr, &es);

    textarea = Ttk_ClientRegion(entryPtr->core.layout, "textarea");
    showCursor =
	   (entryPtr->core.flags & CURSOR_ON) != 0
	&& EntryEditable(entryPtr)
	&& entryPtr->entry.insertPos >= leftIndex
	&& entryPtr->entry.insertPos <= rightIndex
	;
    showSelection =
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
		borderWidth, TK_RELIEF_RAISED);
	}
    }

    /* Initialize the clip region:
     */

    rect.x = textarea.x;
    rect.y = textarea.y;
    rect.width = textarea.width;
    rect.height = textarea.height;
    clipRegion = TkCreateRegion();
    TkUnionRectWithRegion(&rect, clipRegion, clipRegion);

    /* Draw cursor:
     */
    if (showCursor) {
	int cursorX = EntryCharPosition(entryPtr, entryPtr->entry.insertPos),







|
|

|







1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
		borderWidth, TK_RELIEF_RAISED);
	}
    }

    /* Initialize the clip region:
     */

    rect.x = entryPtr->entry.layoutX;
    rect.y = entryPtr->entry.layoutY;
    rect.width = textarea.width;
    rect.height = entryPtr->entry.layoutHeight;
    clipRegion = TkCreateRegion();
    TkUnionRectWithRegion(&rect, clipRegion, clipRegion);

    /* Draw cursor:
     */
    if (showCursor) {
	int cursorX = EntryCharPosition(entryPtr, entryPtr->entry.insertPos),