Tab control update
wine-patch at kievinfo.com
Fri Oct 1 22:49:07 CDT 2004
Looks ok to me with few exceptions:
It would be really nice to separate formatting changes from other changes.
It's hard to see what's got changed and what not.
>+#define MIN_ICONTAB_WIDTH 54 /* Magic number, but it works */
>+ if (icon_width > MIN_ICONTAB_WIDTH)
>+ curr->rect.right += icon_width;
>+ curr->rect.right += MIN_ICONTAB_WIDTH;
This is wrong (see below).
>"Only create a scroll control when/if we need one (like native)"
Nothing got changed. It's being created when needed, and hidden when not
longed used. Is there something else I missed?
> Combine all Unicode/Ascii calls together
I'm not sure here, but should it be based on the unicode state of the whole
control rather which message got sent to it? I can see how you can send ASCII
message first and then send UNICODE message which will screw things up.
>+/* Since items are variable sized, cannot directly access them */
>+#define TAB_GetItem(info,i) \
>+ ((TAB_ITEM*)((LPBYTE)info->items + (i) * TAB_ITEM_SIZE(info)))
If this is the case we need to store pointers in array of pointers.
>+ hwTab = create_tabcontrol(0, TCIF_TEXT|TCIF_IMAGE);
>+ trace_tab ("Testing non fixed width no imagelist...\n");
You missed insert items with text part inside create_tabcontrol. Besides as is
it's failing for me. When I change text of the first tab "Tab 123" it's changing
returned width. The reason why I didn't test this is because the width of the
tab depends on it's text width. Which is kind of hard to test (different fonts,
different font sizes etc.).
Friday, October 1, 2004, 8:58:23 AM, Vitaliy Margolen wrote:
> A fairly large update to the tab control. This makes it work as per
> native in my app.
> +dlls/comctl32/tab.c dlls/comctl32/tests/tab.c
> Items can be variable sized; use an accessor to retrieve them
> Send WM_NOTIFYFORMAT/WM_QUERYUISTATE to match native messages
> Only create a scroll control when/if we need one (like native)
> Dump tab extra data when tracing
> Pass infoPtr around instead of fetching it multiple times, store
> hwnd and focus state in it too.
> Calculate correct tab widths when TCS_FIXEDWIDTH is not given
> Code simplifications/const correctness/formatting fixes
> Add some new combinations to tests for correct tab sizes
> "Don't wait for the seas to part, or messiahs to come;
> Don't you sit around and waste this chance..." - Live
> jon_p_griffiths at yahoo.com
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
More information about the wine-devel