ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
July 2005
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
563 discussions
Start a n
N
ew thread
[ion] 16411: Dprint fixes by our lovely Filip
by ion@svn.reactos.com
Dprint fixes by our lovely Filip Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c Modified: trunk/reactos/ntoskrnl/io/file.c Modified: trunk/reactos/ntoskrnl/mm/anonmem.c _____ Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c --- trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-07-04 17:22:18 UTC (rev 16410) +++ trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-07-04 21:01:46 UTC (rev 16411) @@ -122,7 +122,7 @@ CurrentHeader = BODY_TO_HEADER(CurrentObject); DPRINT("Current ObjectType %wZ\n", - &CurrentHeader->Type->TypeName); + &CurrentHeader->Type->Name); if (CurrentHeader->Type->TypeInfo.ParseProcedure == NULL) { _____ Modified: trunk/reactos/ntoskrnl/io/file.c --- trunk/reactos/ntoskrnl/io/file.c 2005-07-04 17:22:18 UTC (rev 16410) +++ trunk/reactos/ntoskrnl/io/file.c 2005-07-04 21:01:46 UTC (rev 16411) @@ -69,7 +69,7 @@ ParentObjectType != IoFileObjectType) { DPRINT("Parent [%wZ] is a %S which is neither a file type nor a device type ; remaining path = %S\n", - &BODY_TO_HEADER(Parent)->NameInfo->Name, + &HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(Parent))->Name, BODY_TO_HEADER(Parent)->Type->Name.Buffer, RemainingPath); return(STATUS_UNSUCCESSFUL); @@ -399,7 +399,7 @@ ULONG Length, PULONG ReturnLength) { - PVOID LocalInfo; + POBJECT_NAME_INFORMATION LocalInfo; PFILE_OBJECT FileObject; ULONG LocalReturnLength; NTSTATUS Status; @@ -428,7 +428,7 @@ /* Write Device Path */ Status = RtlAppendUnicodeStringToString(&ObjectNameInfo->Name, - &((POBJECT_NAME_INFORMATION)LocalInfo)->Name); + &(LocalInfo)->Name); /* Query the File name */ Status = IoQueryFileInformation(FileObject, _____ Modified: trunk/reactos/ntoskrnl/mm/anonmem.c --- trunk/reactos/ntoskrnl/mm/anonmem.c 2005-07-04 17:22:18 UTC (rev 16410) +++ trunk/reactos/ntoskrnl/mm/anonmem.c 2005-07-04 21:01:46 UTC (rev 16411) @@ -140,7 +140,7 @@ NTSTATUS Status; DPRINT("MmPageOutVirtualMemory(Address 0x%.8X) PID %d\n", - Address, MemoryArea->Process->UniqueProcessId); + Address, AddressSpace->Process->UniqueProcessId); /* * Check for paging out from a deleted virtual memory area.
19 years, 6 months
1
0
0
0
[weiden] 16410: add a quick search feature to the checklist control
by weiden@svn.reactos.com
add a quick search feature to the checklist control Modified: trunk/reactos/lib/aclui/aclui.c Modified: trunk/reactos/lib/aclui/acluilib.h Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/aclui.c --- trunk/reactos/lib/aclui/aclui.c 2005-07-04 13:37:02 UTC (rev 16409) +++ trunk/reactos/lib/aclui/aclui.c 2005-07-04 17:22:18 UTC (rev 16410) @@ -705,6 +705,12 @@ ShowWindow(GetDlgItem(hwndDlg, IDC_LABEL_ADVANCED), SW_HIDE); } + + /* enable quicksearch for the permissions checklist control */ + SendMessage(sp->hAceCheckList, + CLM_ENABLEQUICKSEARCH, + TRUE, + 0); } break; } _____ Modified: trunk/reactos/lib/aclui/acluilib.h --- trunk/reactos/lib/aclui/acluilib.h 2005-07-04 13:37:02 UTC (rev 16409) +++ trunk/reactos/lib/aclui/acluilib.h 2005-07-04 17:22:18 UTC (rev 16410) @@ -102,6 +102,9 @@ #define CLM_GETCHECKBOXCOLUMN (WM_USER + 6) #define CLM_CLEARCHECKBOXES (WM_USER + 7) #define CLM_SETITEMSTATE (WM_USER + 8) +#define CLM_ENABLEQUICKSEARCH (WM_USER + 9) +#define CLM_SETQUICKSEARCH_TIMEOUT_RESET (WM_USER + 10) +#define CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS (WM_USER + 11) BOOL RegisterCheckListControl(HINSTANCE hInstance); _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-04 13:37:02 UTC (rev 16409) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 17:22:18 UTC (rev 16410) @@ -28,6 +28,16 @@ */ #include "acluilib.h" +#define CI_TEXT_MARGIN_WIDTH (8) +#define CI_TEXT_MARGIN_HEIGHT (3) +#define CI_TEXT_SELECTIONMARGIN (1) + +#define TIMER_ID_SETHITFOCUS (1) +#define TIMER_ID_RESETQUICKSEARCH (2) + +#define DEFAULT_QUICKSEARCH_SETFOCUS_DELAY (2000) +#define DEFAULT_QUICKSEARCH_RESET_DELAY (3000) + typedef struct _CHECKITEM { struct _CHECKITEM *Next; @@ -54,6 +64,15 @@ COLORREF TextColor[2]; UINT CheckBoxLeft[2]; + + BOOL QuickSearchEnabled; + PCHECKITEM QuickSearchHitItem; + WCHAR QuickSearchText[65]; + UINT QuickSearchSetFocusDelay; + UINT QuickSearchResetDelay; + + DWORD CaretWidth; + BOOL ShowingCaret; #if SUPPORT_UXTHEME PCHECKITEM HoveredCheckItem; @@ -64,9 +83,18 @@ #endif } CHECKLISTWND, *PCHECKLISTWND; -#define CI_TEXT_MARGIN_WIDTH (8) -#define CI_TEXT_MARGIN_HEIGHT (3) +static VOID EscapeQuickSearch(IN PCHECKLISTWND infoPtr); +#if SUPPORT_UXTHEME +static VOID ChangeCheckItemHotTrack(IN PCHECKLISTWND infoPtr, + IN PCHECKITEM NewHotTrack, + IN UINT NewHotTrackBox); +#endif +static VOID ChangeCheckItemFocus(IN PCHECKLISTWND infoPtr, + IN PCHECKITEM NewFocus, + IN UINT NewFocusBox); +/********************************************************************** ********/ + static PCHECKITEM FindCheckItemByIndex(IN PCHECKLISTWND infoPtr, IN UINT Index) @@ -113,6 +141,27 @@ } static PCHECKITEM +FindCheckItem(IN PCHECKLISTWND infoPtr, + IN LPWSTR SearchText) +{ + PCHECKITEM CurItem; + SIZE_T Count = wcslen(SearchText); + + for (CurItem = infoPtr->CheckItemListHead; + CurItem != NULL; + CurItem = CurItem->Next) + { + if ((CurItem->State & CIS_DISABLED) != CIS_DISABLED && + !wcsnicmp(CurItem->Name, SearchText, Count)) + { + break; + } + } + + return CurItem; +} + +static PCHECKITEM FindFirstEnabledCheckBox(IN PCHECKLISTWND infoPtr, OUT UINT *CheckBox) { @@ -366,6 +415,27 @@ { if (CurItem == Item) { + if (Item == infoPtr->QuickSearchHitItem && infoPtr->QuickSearchEnabled) + { + EscapeQuickSearch(infoPtr); + } + +#if SUPPORT_UXTHEME + if (Item == infoPtr->HoveredCheckItem) + { + ChangeCheckItemHotTrack(infoPtr, + NULL, + 0); + } +#endif + + if (Item == infoPtr->FocusedCheckItem) + { + ChangeCheckItemFocus(infoPtr, + NULL, + 0); + } + *PrevPtr = CurItem->Next; HeapFree(GetProcessHeap(), 0, @@ -608,7 +678,7 @@ NULL, NULL, NULL, - SW_INVALIDATE); + SW_INVALIDATE | SW_SCROLLCHILDREN); RedrawWindow(infoPtr->hSelf, NULL, @@ -664,7 +734,16 @@ { infoPtr->ItemHeight = (2 * CI_TEXT_MARGIN_HEIGHT) + GetIdealItemHeight(infoPtr); } - + + if (infoPtr->ShowingCaret) + { + DestroyCaret(); + CreateCaret(infoPtr->hSelf, + NULL, + 0, + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)); + } + UpdateControl(infoPtr, TRUE); @@ -788,14 +867,73 @@ #if SUPPORT_UXTHEME ItemHovered = (Enabled && infoPtr->HoveredCheckItem == Item); #endif + + if (infoPtr->QuickSearchHitItem == Item) + { + COLORREF OldBkColor, OldFgColor; + SIZE TextSize; + SIZE_T TextLen, HighlightLen = wcslen(infoPtr->QuickSearchText); + + /* highlight the quicksearch text */ + if (GetTextExtentPoint32(hDC, + Item->Name, + HighlightLen, + &TextSize)) + { + COLORREF HighlightTextColor, HighlightBackground; + RECT rcHighlight = TextRect; + + HighlightTextColor = GetSysColor(COLOR_HIGHLIGHTTEXT); + HighlightBackground = GetSysColor(COLOR_HIGHLIGHT); + + rcHighlight.right = rcHighlight.left + TextSize.cx; + + InflateRect(&rcHighlight, + 0, + CI_TEXT_SELECTIONMARGIN); + + OldBkColor = SetBkColor(hDC, + HighlightBackground); + OldFgColor = SetTextColor(hDC, + HighlightTextColor); + + /* draw the highlighted text */ + DrawText(hDC, + Item->Name, + HighlightLen, + &rcHighlight, + DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); + + SetBkColor(hDC, + OldBkColor); + SetTextColor(hDC, + OldFgColor); + + /* draw the remaining part of the text */ + TextLen = wcslen(Item->Name); + if (HighlightLen < TextLen) + { + rcHighlight.left = rcHighlight.right; + rcHighlight.right = TextRect.right; + + DrawText(hDC, + Item->Name + HighlightLen, + -1, + &rcHighlight, + DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); + } + } + } + else + { + /* draw the text */ + DrawText(hDC, + Item->Name, + -1, + &TextRect, + DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); + } - /* draw the text */ - DrawText(hDC, - Item->Name, - -1, - &TextRect, - DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); - CheckBox.top = TextRect.top; CheckBox.bottom = TextRect.bottom; @@ -1059,6 +1197,295 @@ CheckItem->State = NewState; } +static VOID +DisplayCaret(IN PCHECKLISTWND infoPtr) +{ + if (IsWindowEnabled(infoPtr->hSelf) && !infoPtr->ShowingCaret) + { + infoPtr->ShowingCaret = TRUE; + + CreateCaret(infoPtr->hSelf, + NULL, + infoPtr->CaretWidth, + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)); + + ShowCaret(infoPtr->hSelf); + } +} + +static VOID +RemoveCaret(IN PCHECKLISTWND infoPtr) +{ + if (IsWindowEnabled(infoPtr->hSelf) && infoPtr->ShowingCaret) + { + infoPtr->ShowingCaret = FALSE; + + HideCaret(infoPtr->hSelf); + DestroyCaret(); + } +} + +static VOID +KillQuickSearchTimers(IN PCHECKLISTWND infoPtr) +{ + KillTimer(infoPtr->hSelf, + TIMER_ID_SETHITFOCUS); + KillTimer(infoPtr->hSelf, + TIMER_ID_RESETQUICKSEARCH); +} + +static VOID +MapItemToRect(IN PCHECKLISTWND infoPtr, + IN PCHECKITEM CheckItem, + OUT RECT *prcItem) +{ + INT Index = CheckItemToIndex(infoPtr, + CheckItem); + if (Index != -1) + { + RECT rcClient; + LONG Style; + INT VisibleFirst; + + GetClientRect(infoPtr->hSelf, &rcClient); + + Style = GetWindowLong(infoPtr->hSelf, + GWL_STYLE); + + if (Style & WS_VSCROLL) + { + VisibleFirst = GetScrollPos(infoPtr->hSelf, + SB_VERT); + } + else + { + VisibleFirst = 0; + } + + prcItem->left = rcClient.left; + prcItem->right = rcClient.right; + prcItem->top = (Index - VisibleFirst) * infoPtr->ItemHeight; + prcItem->bottom = prcItem->top + infoPtr->ItemHeight; + } + else + { + prcItem->left = 0; + prcItem->top = 0; + prcItem->right = 0; + prcItem->bottom = 0; + } +} + +static VOID +UpdateCaretPos(IN PCHECKLISTWND infoPtr) +{ + if (infoPtr->ShowingCaret && infoPtr->QuickSearchHitItem != NULL) + { + HDC hDC = GetDC(infoPtr->hSelf); + if (hDC != NULL) + { + SIZE TextSize; + HGDIOBJ hOldFont = SelectObject(hDC, + infoPtr->hFont); + + TextSize.cx = 0; + TextSize.cy = 0; + + if (infoPtr->QuickSearchText[0] == L'\0' || + GetTextExtentPoint32(hDC, + infoPtr->QuickSearchHitItem->Name, + wcslen(infoPtr->QuickSearchText), + &TextSize)) + { + RECT rcItem; + + MapItemToRect(infoPtr, + infoPtr->QuickSearchHitItem, + &rcItem); + + /* actually change the caret position */ + SetCaretPos(rcItem.left + CI_TEXT_MARGIN_WIDTH + TextSize.cx, + rcItem.top + CI_TEXT_MARGIN_HEIGHT); + } + + SelectObject(hDC, + hOldFont); + + ReleaseDC(infoPtr->hSelf, + hDC); + } + } +} + +static VOID +EscapeQuickSearch(IN PCHECKLISTWND infoPtr) +{ + if (infoPtr->QuickSearchEnabled && infoPtr->QuickSearchHitItem != NULL) + { + PCHECKITEM OldHit = infoPtr->QuickSearchHitItem; + + infoPtr->QuickSearchHitItem = NULL; + infoPtr->QuickSearchText[0] = L'\0'; + + /* scroll back to the focused item */ + if (infoPtr->FocusedCheckItem != NULL) + { + MakeCheckItemVisible(infoPtr, + infoPtr->FocusedCheckItem); + } + + /* repaint the old search hit item if it's still visible */ + UpdateCheckItem(infoPtr, + OldHit); + + KillQuickSearchTimers(infoPtr); + + RemoveCaret(infoPtr); + } +} + +static VOID +ChangeSearchHit(IN PCHECKLISTWND infoPtr, + IN PCHECKITEM NewHit) +{ + PCHECKITEM OldHit = infoPtr->QuickSearchHitItem; + + infoPtr->QuickSearchHitItem = NewHit; + + if (OldHit != NewHit) + { + /* scroll to the new search hit */ + MakeCheckItemVisible(infoPtr, + NewHit); + + /* repaint the old hit if present and visible */ + if (OldHit != NULL) + { + UpdateCheckItem(infoPtr, + OldHit); + } + else + { + /* show the caret the first time we find an item */ + DisplayCaret(infoPtr); + } + } + + UpdateCaretPos(infoPtr); + + UpdateCheckItem(infoPtr, + NewHit); + + /* kill the reset timer and restart the set hit focus timer */ + KillTimer(infoPtr->hSelf, + TIMER_ID_RESETQUICKSEARCH); + if (infoPtr->QuickSearchSetFocusDelay != 0) + { + SetTimer(infoPtr->hSelf, + TIMER_ID_SETHITFOCUS, + infoPtr->QuickSearchSetFocusDelay, + NULL); + } +} + +static BOOL +QuickSearchFindHit(IN PCHECKLISTWND infoPtr, + IN WCHAR c) +{ + if (infoPtr->QuickSearchEnabled) + { + BOOL Ret = FALSE; + PCHECKITEM NewHit; + + switch (c) + { + case '\r': + case '\n': + { + Ret = infoPtr->QuickSearchHitItem != NULL; + if (Ret) + { + /* NOTE: QuickSearchHitItem definitely has at least one + enabled check box, the user can't search for disabled + check items */ + + ChangeCheckItemFocus(infoPtr, + infoPtr->QuickSearchHitItem, + ((!(infoPtr->QuickSearchHitItem->State & CIS_ALLOWDISABLED)) ? CLB_ALLOW : CLB_DENY)); + + EscapeQuickSearch(infoPtr); + } + break; + } + + case VK_BACK: + { + if (infoPtr->QuickSearchHitItem != NULL) + { + INT SearchLen = wcslen(infoPtr->QuickSearchText); + if (SearchLen > 0) + { + /* delete the last character */ + infoPtr->QuickSearchText[--SearchLen] = L'\0'; + + if (SearchLen > 0) + { + /* search again */ + NewHit = FindCheckItem(infoPtr, + infoPtr->QuickSearchText); + + if (NewHit != NULL) + { + /* change the search hit */ + ChangeSearchHit(infoPtr, + NewHit); + + Ret = TRUE; + } + } + } + + if (!Ret) + { + EscapeQuickSearch(infoPtr); + } + } + break; + } + + default: + { + INT SearchLen = wcslen(infoPtr->QuickSearchText); + if (SearchLen < (sizeof(infoPtr->QuickSearchText) / sizeof(infoPtr->QuickSearchText[0])) - 1) + { + infoPtr->QuickSearchText[SearchLen++] = c; + infoPtr->QuickSearchText[SearchLen] = L'\0'; + + NewHit = FindCheckItem(infoPtr, + infoPtr->QuickSearchText); + if (NewHit != NULL) + { + /* change the search hit */ + ChangeSearchHit(infoPtr, + NewHit); + + Ret = TRUE; + } + else + { + /* reset the input */ + infoPtr->QuickSearchText[--SearchLen] = L'\0'; + } + } + break; + } + } + return Ret; + } + + return FALSE; +} + static LRESULT CALLBACK CheckListWndProc(IN HWND hwnd, IN UINT uMsg, @@ -1292,7 +1719,7 @@ NULL, NULL, NULL, - SW_INVALIDATE); + SW_INVALIDATE | SW_SCROLLCHILDREN); RedrawWindow(hwnd, NULL, @@ -1427,6 +1854,28 @@ break; } + case CLM_ENABLEQUICKSEARCH: + { + if (wParam == 0) + { + EscapeQuickSearch(infoPtr); + } + infoPtr->QuickSearchEnabled = (wParam != 0); + break; + } + + case CLM_SETQUICKSEARCH_TIMEOUT_RESET: + { + infoPtr->QuickSearchResetDelay = (UINT)wParam; + break; + } + + case CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS: + { + infoPtr->QuickSearchSetFocusDelay = (UINT)wParam; + break; + } + case WM_SETFONT: { Ret = (LRESULT)RetChangeControlFont(infoPtr, @@ -1461,6 +1910,8 @@ case WM_ENABLE: { + EscapeQuickSearch(infoPtr); + UpdateControl(infoPtr, TRUE); break; @@ -1515,7 +1966,7 @@ NULL, NULL, NULL, - SW_INVALIDATE); + SW_INVALIDATE | SW_SCROLLCHILDREN); RedrawWindow(hwnd, NULL, @@ -1552,6 +2003,8 @@ case WM_KILLFOCUS: { + EscapeQuickSearch(infoPtr); + infoPtr->HasFocus = FALSE; if (infoPtr->FocusedCheckItem != NULL) { @@ -1617,6 +2070,12 @@ if (ChangeFocus) { + if (infoPtr->QuickSearchEnabled && infoPtr->QuickSearchHitItem != NULL && + infoPtr->QuickSearchHitItem != NewFocus) + { + EscapeQuickSearch(infoPtr); + } + ChangeCheckItemFocus(infoPtr, NewFocus, NewFocusBox); @@ -1680,19 +2139,26 @@ { case VK_SPACE: { - if (infoPtr->FocusedCheckItem != NULL && GetCapture() == NULL) + if (GetCapture() == NULL && + !QuickSearchFindHit(infoPtr, + L' ')) { - BOOL OldPushed = infoPtr->FocusedPushed; - infoPtr->FocusedPushed = TRUE; - - if (infoPtr->FocusedPushed != OldPushed) + if (infoPtr->FocusedCheckItem != NULL && + (infoPtr->QuickSearchHitItem == NULL || + infoPtr->QuickSearchHitItem == infoPtr->FocusedCheckItem)) { - MakeCheckItemVisible(infoPtr, - infoPtr->FocusedCheckItem); + BOOL OldPushed = infoPtr->FocusedPushed; + infoPtr->FocusedPushed = TRUE; - UpdateCheckItemBox(infoPtr, - infoPtr->FocusedCheckItem, - infoPtr->FocusedCheckItemBox); + if (infoPtr->FocusedPushed != OldPushed) + { + MakeCheckItemVisible(infoPtr, + infoPtr->FocusedCheckItem); + + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } } } break; @@ -1700,18 +2166,24 @@ case VK_RETURN: { - if (infoPtr->FocusedCheckItem != NULL && GetCapture() == NULL) + if (GetCapture() == NULL && + !QuickSearchFindHit(infoPtr, + L'\n')) { - MakeCheckItemVisible(infoPtr, - infoPtr->FocusedCheckItem); + if (infoPtr->FocusedCheckItem != NULL && + infoPtr->QuickSearchHitItem == NULL) + { + MakeCheckItemVisible(infoPtr, + infoPtr->FocusedCheckItem); - ChangeCheckBox(infoPtr, - infoPtr->FocusedCheckItem, - infoPtr->FocusedCheckItemBox); - - UpdateCheckItemBox(infoPtr, + ChangeCheckBox(infoPtr, infoPtr->FocusedCheckItem, infoPtr->FocusedCheckItemBox); + + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } } break; } @@ -1723,6 +2195,8 @@ PCHECKITEM NewFocus; UINT NewFocusBox = 0; BOOL Shift = GetKeyState(VK_SHIFT) & 0x8000; + + EscapeQuickSearch(infoPtr); NewFocus = FindEnabledCheckBox(infoPtr, Shift, @@ -1779,16 +2253,23 @@ { INT virtKey; - Ret = DLGC_HASSETSEL; + Ret = 0; virtKey = (lParam != 0 ? (INT)((LPMSG)lParam)->wParam : 0); switch (virtKey) { case VK_RETURN: { - Ret |= DLGC_WANTMESSAGE; + if (infoPtr->QuickSearchEnabled && infoPtr->QuickSearchHitItem != NULL) + { + Ret |= DLGC_WANTCHARS | DLGC_WANTMESSAGE; + } + else + { + Ret |= DLGC_WANTMESSAGE; + } break; } - + case VK_TAB: { INT CheckBox; @@ -1801,10 +2282,26 @@ Ret |= (EnabledBox ? DLGC_WANTTAB : DLGC_WANTCHARS); break; } + + default: + { + if (infoPtr->QuickSearchEnabled) + { + Ret |= DLGC_WANTCHARS; + } + break; + } } break; } + case WM_CHAR: + { + QuickSearchFindHit(infoPtr, + (WCHAR)wParam); + break; + } + case WM_SYSCOLORCHANGE: { infoPtr->TextColor[0] = GetSysColor(COLOR_GRAYTEXT); @@ -1843,6 +2340,8 @@ case WM_SETTINGCHANGE: { + DWORD OldCaretWidth = infoPtr->CaretWidth; + #if SUPPORT_UXTHEME /* update the hover time */ if (!SystemParametersInfo(SPI_GETMOUSEHOVERTIME, @@ -1853,6 +2352,23 @@ infoPtr->HoverTime = HOVER_DEFAULT; } #endif + + /* update the caret */ + if (!SystemParametersInfo(SPI_GETCARETWIDTH, + 0, + &infoPtr->CaretWidth, + 0)) + { + infoPtr->CaretWidth = 2; + } + if (OldCaretWidth != infoPtr->CaretWidth && infoPtr->ShowingCaret) + { + DestroyCaret(); + CreateCaret(hwnd, + NULL, + infoPtr->CaretWidth, + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)); + } break; } @@ -1881,7 +2397,50 @@ } break; } + + case WM_TIMER: + { + switch (wParam) + { + case TIMER_ID_SETHITFOCUS: + { + /* kill the timer */ + KillTimer(hwnd, + wParam); + if (infoPtr->QuickSearchEnabled && infoPtr->QuickSearchHitItem != NULL) + { + /* change the focus to the hit item, this item has to have + at least one enabled checkbox! */ + ChangeCheckItemFocus(infoPtr, + infoPtr->QuickSearchHitItem, + ((!(infoPtr->QuickSearchHitItem->State & CIS_ALLOWDISABLED)) ? CLB_ALLOW : CLB_DENY)); + + /* start the timer to reset quicksearch */ + if (infoPtr->QuickSearchResetDelay != 0) + { + SetTimer(hwnd, + TIMER_ID_RESETQUICKSEARCH, + infoPtr->QuickSearchResetDelay, + NULL); + } + } + break; + } + case TIMER_ID_RESETQUICKSEARCH: + { + /* kill the timer */ + KillTimer(hwnd, + wParam); + + /* escape quick search */ + EscapeQuickSearch(infoPtr); + break; + } + } + break; + } + case WM_CREATE: { infoPtr = HeapAlloc(GetProcessHeap(), @@ -1901,7 +2460,15 @@ infoPtr->CheckItemListHead = NULL; infoPtr->CheckItemCount = 0; + if (!SystemParametersInfo(SPI_GETCARETWIDTH, + 0, + &infoPtr->CaretWidth, + 0)) + { + infoPtr->CaretWidth = 2; + } infoPtr->ItemHeight = 10; + infoPtr->ShowingCaret = FALSE; infoPtr->HasFocus = FALSE; infoPtr->FocusedCheckItem = NULL; @@ -1915,7 +2482,13 @@ infoPtr->CheckBoxLeft[0] = rcClient.right - 30; infoPtr->CheckBoxLeft[1] = rcClient.right - 15; + + infoPtr->QuickSearchEnabled = FALSE; + infoPtr->QuickSearchText[0] = L'\0'; + infoPtr->QuickSearchSetFocusDelay = DEFAULT_QUICKSEARCH_SETFOCUS_DELAY; + infoPtr->QuickSearchResetDelay = DEFAULT_QUICKSEARCH_RESET_DELAY; + #if SUPPORT_UXTHEME infoPtr->HoveredCheckItem = NULL; infoPtr->HoveredCheckItemBox = 0; @@ -1952,6 +2525,11 @@ case WM_DESTROY: { + if (infoPtr->ShowingCaret) + { + DestroyCaret(); + } + ClearCheckItems(infoPtr); #if SUPPORT_UXTHEME
19 years, 6 months
1
0
0
0
[weiden] 16409: properly handle WM_UPDATEUISTATE
by weiden@svn.reactos.com
properly handle WM_UPDATEUISTATE Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-04 13:21:14 UTC (rev 16408) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 13:37:02 UTC (rev 16409) @@ -1865,30 +1865,20 @@ case WM_UPDATEUISTATE: { - BOOL OldFocusVisible = infoPtr->FocusVisible; - - switch(LOWORD(wParam)) + if (HIWORD(wParam) & UISF_HIDEFOCUS) { - case UIS_CLEAR: + BOOL OldFocusVisible = infoPtr->FocusVisible; + + infoPtr->FocusVisible = (LOWORD(wParam) == UIS_CLEAR); + + if (infoPtr->FocusVisible != OldFocusVisible && + infoPtr->FocusedCheckItem != NULL) { - infoPtr->FocusVisible = (HIWORD(wParam) & UISF_HIDEFOCUS); - break; + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); } - case UIS_SET: - case UIS_INITIALIZE: - { - infoPtr->FocusVisible = !(HIWORD(wParam) & UISF_HIDEFOCUS); - break; - } } - - if (infoPtr->FocusVisible != OldFocusVisible && - infoPtr->FocusedCheckItem != NULL) - { - UpdateCheckItemBox(infoPtr, - infoPtr->FocusedCheckItem, - infoPtr->FocusedCheckItemBox); - } break; }
19 years, 6 months
1
0
0
0
[weiden] 16408: - hide the keyboard focus when appropriate
by weiden@svn.reactos.com
- hide the keyboard focus when appropriate - add missing definitions to w32api Modified: trunk/reactos/lib/aclui/checklist.c Modified: trunk/reactos/w32api/include/winuser.h _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-04 11:52:16 UTC (rev 16407) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 13:21:14 UTC (rev 16408) @@ -50,6 +50,7 @@ PCHECKITEM FocusedCheckItem; UINT FocusedCheckItemBox; BOOL FocusedPushed; + BOOL FocusVisible; COLORREF TextColor[2]; UINT CheckBoxLeft[2]; @@ -840,7 +841,7 @@ ((Item->State & CIS_ALLOW) ? DFCS_CHECKED : 0) | (IsPushed ? DFCS_PUSHED : 0)); } - if (Item == infoPtr->FocusedCheckItem && + if (Item == infoPtr->FocusedCheckItem && infoPtr->FocusVisible && infoPtr->HasFocus && infoPtr->FocusedCheckItemBox != CLB_DENY) { @@ -895,7 +896,7 @@ ((Item->State & CIS_DENY) ? DFCS_CHECKED : 0) | (IsPushed ? DFCS_PUSHED : 0)); } - if (infoPtr->HasFocus && + if (infoPtr->HasFocus && infoPtr->FocusVisible && Item == infoPtr->FocusedCheckItem && infoPtr->FocusedCheckItemBox == CLB_DENY) { @@ -995,8 +996,8 @@ rcUpdate.left = rcClient.left + infoPtr->CheckBoxLeft[ItemBox] - (infoPtr->ItemHeight / 2); rcUpdate.right = rcUpdate.left + infoPtr->ItemHeight; - rcUpdate.top = ((Index - VisibleFirst) * infoPtr->ItemHeight) + CI_TEXT_MARGIN_HEIGHT; - rcUpdate.bottom = rcUpdate.top + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT); + rcUpdate.top = ((Index - VisibleFirst) * infoPtr->ItemHeight); + rcUpdate.bottom = rcUpdate.top + infoPtr->ItemHeight; RedrawWindow(infoPtr->hSelf, &rcUpdate, @@ -1727,6 +1728,15 @@ Shift, &NewFocusBox); + if (!infoPtr->FocusVisible) + { + /* change the UI status */ + SendMessage(GetAncestor(hwnd, GA_ROOT), + WM_CHANGEUISTATE, + MAKEWPARAM(UIS_INITIALIZE, UISF_HIDEFOCUS), + 0); + } + ChangeCheckItemFocus(infoPtr, NewFocus, NewFocusBox); @@ -1852,6 +1862,35 @@ TRUE); break; } + + case WM_UPDATEUISTATE: + { + BOOL OldFocusVisible = infoPtr->FocusVisible; + + switch(LOWORD(wParam)) + { + case UIS_CLEAR: + { + infoPtr->FocusVisible = (HIWORD(wParam) & UISF_HIDEFOCUS); + break; + } + case UIS_SET: + case UIS_INITIALIZE: + { + infoPtr->FocusVisible = !(HIWORD(wParam) & UISF_HIDEFOCUS); + break; + } + } + + if (infoPtr->FocusVisible != OldFocusVisible && + infoPtr->FocusedCheckItem != NULL) + { + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } + break; + } case WM_CREATE: { @@ -1908,6 +1947,11 @@ infoPtr->ThemeHandle = NULL; } #endif + + infoPtr->FocusVisible = !(SendMessage(hwnd, + WM_QUERYUISTATE, + 0, + 0) & UISF_HIDEFOCUS); } else { _____ Modified: trunk/reactos/w32api/include/winuser.h --- trunk/reactos/w32api/include/winuser.h 2005-07-04 11:52:16 UTC (rev 16407) +++ trunk/reactos/w32api/include/winuser.h 2005-07-04 13:21:14 UTC (rev 16408) @@ -1316,7 +1316,24 @@ #define WM_CANCELMODE 31 #define WM_CAPTURECHANGED 533 #define WM_CHANGECBCHAIN 781 + +#if (WINVER >= 0x0500) #define WM_CHANGEUISTATE 295 +#define WM_UPDATEUISTATE 296 +#define WM_QUERYUISTATE 297 + +#define UIS_SET 1 +#define UIS_CLEAR 2 +#define UIS_INITIALIZE 3 + +#define UISF_HIDEFOCUS 0x1 +#define UISF_HIDEACCEL 0x2 +#if (WINVER >= 0x0501) +#define UISF_ACTIVE 0x4 +#endif + +#endif + #define WM_CHAR 258 #define WM_CHARTOITEM 47 #define WM_CHILDACTIVATE 34
19 years, 6 months
1
0
0
0
[weiden] 16407: fixed some scrolling issues
by weiden@svn.reactos.com
fixed some scrolling issues Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-04 11:05:04 UTC (rev 16406) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 11:52:16 UTC (rev 16407) @@ -310,17 +310,16 @@ if (DirectlyInCheckBox != NULL) { INT y = ppt->y % infoPtr->ItemHeight; + INT cxBox = infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT); if ((y >= CI_TEXT_MARGIN_HEIGHT && y < infoPtr->ItemHeight - CI_TEXT_MARGIN_HEIGHT) && - (((ppt->x >= (infoPtr->CheckBoxLeft[CLB_ALLOW] - (infoPtr->ItemHeight / 2))) && - (ppt->x < (infoPtr->CheckBoxLeft[CLB_ALLOW] - (infoPtr->ItemHeight / 2) + - infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)))) + (((ppt->x >= (infoPtr->CheckBoxLeft[CLB_ALLOW] - (cxBox / 2))) && + (ppt->x < (infoPtr->CheckBoxLeft[CLB_ALLOW] - (cxBox / 2) + cxBox))) || - ((ppt->x >= (infoPtr->CheckBoxLeft[CLB_DENY] - (infoPtr->ItemHeight / 2))) && - (ppt->x < (infoPtr->CheckBoxLeft[CLB_DENY] - (infoPtr->ItemHeight / 2) + - infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)))))) + ((ppt->x >= (infoPtr->CheckBoxLeft[CLB_DENY] - (cxBox / 2))) && + (ppt->x < (infoPtr->CheckBoxLeft[CLB_DENY] - (cxBox / 2) + cxBox))))) { *DirectlyInCheckBox = TRUE; } @@ -446,6 +445,7 @@ RECT rcClient; SCROLLINFO ScrollInfo; LONG Style; + INT VisibleItems; GetClientRect(infoPtr->hSelf, &rcClient); @@ -457,33 +457,40 @@ ScrollInfo.nPage = ((rcClient.bottom - rcClient.top) + infoPtr->ItemHeight - 1) / infoPtr->ItemHeight; ScrollInfo.nPos = 0; ScrollInfo.nTrackPos = 0; + + VisibleItems = (rcClient.bottom - rcClient.top) / infoPtr->ItemHeight; + + if (ScrollInfo.nPage == VisibleItems && ScrollInfo.nMax > 0) + { + ScrollInfo.nMax--; + } + SetScrollInfo(infoPtr->hSelf, + SB_VERT, + &ScrollInfo, + TRUE); + if (AllowChangeStyle) { Style = GetWindowLong(infoPtr->hSelf, GWL_STYLE); /* determine whether the vertical scrollbar has to be visible or not */ - if (ScrollInfo.nMax > ScrollInfo.nPage && + if (ScrollInfo.nMax > VisibleItems && !(Style & WS_VSCROLL)) { SetWindowLong(infoPtr->hSelf, GWL_STYLE, Style | WS_VSCROLL); } - else if (ScrollInfo.nMax < ScrollInfo.nPage && - Style & WS_VSCROLL) + else if (ScrollInfo.nMax <= VisibleItems && + (Style & WS_VSCROLL)) { SetWindowLong(infoPtr->hSelf, GWL_STYLE, Style & ~WS_VSCROLL); } } - - SetScrollInfo(infoPtr->hSelf, - SB_VERT, - &ScrollInfo, - TRUE); RedrawWindow(infoPtr->hSelf, NULL,
19 years, 6 months
1
0
0
0
[weiden] 16406: handle resizing of the control
by weiden@svn.reactos.com
handle resizing of the control Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-04 09:46:50 UTC (rev 16405) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 11:05:04 UTC (rev 16406) @@ -63,8 +63,8 @@ #endif } CHECKLISTWND, *PCHECKLISTWND; -#define CI_TEXT_MARGIN_WIDTH (6) -#define CI_TEXT_MARGIN_HEIGHT (2) +#define CI_TEXT_MARGIN_WIDTH (8) +#define CI_TEXT_MARGIN_HEIGHT (3) static PCHECKITEM FindCheckItemByIndex(IN PCHECKLISTWND infoPtr, @@ -153,10 +153,9 @@ { /* return the Deny checkbox in case both check boxes are enabled! */ *CheckBox = ((!(LastEnabledItem->State & CIS_DENYDISABLED)) ? CLB_DENY : CLB_ALLOW); - return LastEnabledItem; } - return NULL; + return LastEnabledItem; } static PCHECKITEM @@ -631,7 +630,7 @@ } else { - height = 0; + height = 2; } SelectObject(hdc, @@ -655,7 +654,7 @@ if (hOldFont != hFont) { - infoPtr->ItemHeight = 4 + GetIdealItemHeight(infoPtr); + infoPtr->ItemHeight = (2 * CI_TEXT_MARGIN_HEIGHT) + GetIdealItemHeight(infoPtr); } UpdateControl(infoPtr, @@ -762,7 +761,7 @@ Item != NULL && CurrentIndex <= LastTouchedIndex; Item = Item->Next, CurrentIndex++) { - TextRect.bottom = TextRect.top + infoPtr->ItemHeight; + TextRect.bottom = TextRect.top + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT); ItemRect.bottom = ItemRect.top + infoPtr->ItemHeight; SetBrushOrgEx(hDC, @@ -789,15 +788,16 @@ &TextRect, DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); + CheckBox.top = TextRect.top; + CheckBox.bottom = TextRect.bottom; + /* draw the Allow checkbox */ IsPushed = (Enabled && Item == infoPtr->FocusedCheckItem && infoPtr->HasFocus && !(Item->State & CIS_ALLOWDISABLED) && infoPtr->FocusedCheckItemBox != CLB_DENY && infoPtr->FocusedPushed); CheckBox.left = infoPtr->CheckBoxLeft[CLB_ALLOW] - ((TextRect.bottom - TextRect.top) / 2); - CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT); - CheckBox.top = TextRect.top; - CheckBox.bottom = CheckBox.top + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT); + CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top); #if SUPPORT_UXTHEME if (infoPtr->ThemeHandle != NULL) { @@ -853,7 +853,7 @@ infoPtr->FocusedPushed); CheckBox.left = infoPtr->CheckBoxLeft[CLB_DENY] - ((TextRect.bottom - TextRect.top) / 2); - CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT); + CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top); #if SUPPORT_UXTHEME if (infoPtr->ThemeHandle != NULL) { @@ -1111,7 +1111,7 @@ #if SUPPORT_UXTHEME /* handle hovering checkboxes */ - if (hWndCapture == NULL) + if (hWndCapture == NULL && infoPtr->ThemeHandle != NULL) { TRACKMOUSEEVENT tme; PCHECKITEM HotTrackItem; @@ -1547,6 +1547,8 @@ infoPtr->HasFocus = FALSE; if (infoPtr->FocusedCheckItem != NULL) { + infoPtr->FocusedPushed = FALSE; + UpdateCheckItem(infoPtr, infoPtr->FocusedCheckItem); } @@ -1836,6 +1838,13 @@ #endif break; } + + case WM_SIZE: + { + UpdateControl(infoPtr, + TRUE); + break; + } case WM_CREATE: {
19 years, 6 months
1
0
0
0
[weiden] 16405: get rid of the obsolete Makefile.ros-template files
by weiden@svn.reactos.com
get rid of the obsolete Makefile.ros-template files Deleted: trunk/reactos/lib/icmp/Makefile.ros-template Deleted: trunk/reactos/lib/iphlpapi/Makefile.ros-template Deleted: trunk/reactos/lib/msacm/Makefile.ros-template Deleted: trunk/reactos/lib/msi/Makefile.ros-template Deleted: trunk/reactos/lib/msimg32/Makefile.ros-template Deleted: trunk/reactos/lib/odbc32/Makefile.ros-template Deleted: trunk/reactos/lib/oledlg/Makefile.ros-template Deleted: trunk/reactos/lib/wininet/Makefile.ros-template _____ Deleted: trunk/reactos/lib/icmp/Makefile.ros-template --- trunk/reactos/lib/icmp/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/icmp/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,21 +0,0 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = icmp - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ ws2_32.a wine.a wine_uuid.a ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_COMCTL32) - -#TARGET_RC_SRCS = @RC_SRCS@ -#TARGET_RC_BINSRC = @RC_BINSRC@ -#TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/iphlpapi/Makefile.ros-template --- trunk/reactos/lib/iphlpapi/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/iphlpapi/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,21 +0,0 @@ -# $Id$ - -TARGET_NAME = iphlpapi - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ wine.a advapi32.a kernel32.a ws2_32.a wine_uuid.a ntdll.a rtl.a - -TARGET_BASE = $(TARGET_BASE_LIB_IPHLPAPI) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/msacm/Makefile.ros-template --- trunk/reactos/lib/msacm/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/msacm/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,21 +0,0 @@ -# $Id$ - -TARGET_NAME = msacm32 - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ ntdll.a wine.a - -TARGET_BASE = $(TARGET_BASE_LIB_MSACM) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/msi/Makefile.ros-template --- trunk/reactos/lib/msi/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/msi/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,39 +0,0 @@ -# $Id: Makefile.ros-template - -TARGET_NAME = msi - -TARGET_OBJECTS = @C_SRCS@ @EXTRA_OBJS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_WINMM) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -#TARGET_CLEAN = *.tab.c *.tab.h - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk - -# -# Optional use of bison, this will allow independent building from -# Wine. -# -# Bison is requiered for building msi.dll. If MingW32 for windows, -# download bison from
http://gnuwin32.sourceforge.net/
-# Make sure bison.exe is placed in your command path for execution. -# -# - -#sql.tab.c sql.tab.h: sql.y -# bison -p SQL_ -d ./sql.y -o sql.tab.c - -#cond.tab.c cond.tab.h: cond.y -# bison -p COND_ -d ./cond.y -o cond.tab.c _____ Deleted: trunk/reactos/lib/msimg32/Makefile.ros-template --- trunk/reactos/lib/msimg32/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/msimg32/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,17 +0,0 @@ -TARGET_NAME = msimg32 - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_MSIMG32) - -TARGET_NORC = yes - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/odbc32/Makefile.ros-template --- trunk/reactos/lib/odbc32/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/odbc32/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,21 +0,0 @@ -# $Id$ - -TARGET_NAME = odbc32 - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -D__WINESRC__ - -TARGET_SDKLIBS = @IMPORTS@ wine.a ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_ODBC32) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/oledlg/Makefile.ros-template --- trunk/reactos/lib/oledlg/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/oledlg/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,21 +0,0 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = oledlg - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ - -TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_OLEDLG) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/wininet/Makefile.ros-template --- trunk/reactos/lib/wininet/Makefile.ros-template 2005-07-04 00:30:23 UTC (rev 16404) +++ trunk/reactos/lib/wininet/Makefile.ros-template 2005-07-04 09:46:50 UTC (rev 16405) @@ -1,21 +0,0 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = wininet - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a ws2_32.a - -TARGET_BASE = $(TARGET_BASE_LIB_WININET) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk
19 years, 6 months
1
0
0
0
[weiden] 16404: properly handle clicks outside a checkbox
by weiden@svn.reactos.com
properly handle clicks outside a checkbox Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-04 00:06:52 UTC (rev 16403) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 00:30:23 UTC (rev 16404) @@ -1593,7 +1593,7 @@ ChangeFocus = TRUE; } - if (ChangeFocus && GetCapture() == NULL && + if (InCheckBox && ChangeFocus && GetCapture() == NULL && (uMsg == WM_LBUTTONDOWN || uMsg == WM_LBUTTONDBLCLK)) { infoPtr->FocusedPushed = TRUE;
19 years, 6 months
1
0
0
0
[weiden] 16403: minor bugfixes
by weiden@svn.reactos.com
minor bugfixes Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-03 23:29:36 UTC (rev 16402) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-04 00:06:52 UTC (rev 16403) @@ -1592,6 +1592,13 @@ { ChangeFocus = TRUE; } + + if (ChangeFocus && GetCapture() == NULL && + (uMsg == WM_LBUTTONDOWN || uMsg == WM_LBUTTONDBLCLK)) + { + infoPtr->FocusedPushed = TRUE; + Capture = TRUE; + } } else { @@ -1600,14 +1607,6 @@ if (ChangeFocus) { - if (uMsg == WM_LBUTTONDOWN && - InCheckBox && GetCapture() != hwnd) - { - infoPtr->FocusedPushed = TRUE; - - Capture = TRUE; - } - ChangeCheckItemFocus(infoPtr, NewFocus, NewFocusBox); @@ -1637,6 +1636,9 @@ BOOL InCheckBox; POINT pt; + pt.x = (LONG)LOWORD(lParam); + pt.y = (LONG)HIWORD(lParam); + infoPtr->FocusedPushed = FALSE; PtItem = PtToCheckItemBox(infoPtr, @@ -1644,7 +1646,7 @@ &PtItemBox, &InCheckBox); - if (InCheckBox && PtItem == infoPtr->FocusedCheckItem && + if (PtItem == infoPtr->FocusedCheckItem && InCheckBox && PtItemBox == infoPtr->FocusedCheckItemBox) { ChangeCheckBox(infoPtr, @@ -1938,7 +1940,7 @@ ZeroMemory(&wc, sizeof(WNDCLASS)); - wc.style = 0; + wc.style = CS_DBLCLKS; wc.lpfnWndProc = CheckListWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = sizeof(PCHECKLISTWND);
19 years, 6 months
1
0
0
0
[weiden] 16402: enable editing of the checkboxes and minor bugfixes
by weiden@svn.reactos.com
enable editing of the checkboxes and minor bugfixes Modified: trunk/reactos/lib/aclui/checklist.c _____ Modified: trunk/reactos/lib/aclui/checklist.c --- trunk/reactos/lib/aclui/checklist.c 2005-07-03 21:37:16 UTC (rev 16401) +++ trunk/reactos/lib/aclui/checklist.c 2005-07-03 23:29:36 UTC (rev 16402) @@ -49,6 +49,7 @@ BOOL HasFocus; PCHECKITEM FocusedCheckItem; UINT FocusedCheckItemBox; + BOOL FocusedPushed; COLORREF TextColor[2]; UINT CheckBoxLeft[2]; @@ -124,11 +125,11 @@ { /* return the Allow checkbox in case both check boxes are enabled! */ *CheckBox = ((!(CurItem->State & CIS_ALLOWDISABLED)) ? CLB_ALLOW : CLB_DENY); - return CurItem; + break; } } - return NULL; + return CurItem; } static PCHECKITEM @@ -312,13 +313,15 @@ INT y = ppt->y % infoPtr->ItemHeight; if ((y >= CI_TEXT_MARGIN_HEIGHT && - y <= infoPtr->ItemHeight - CI_TEXT_MARGIN_HEIGHT) && + y < infoPtr->ItemHeight - CI_TEXT_MARGIN_HEIGHT) && (((ppt->x >= (infoPtr->CheckBoxLeft[CLB_ALLOW] - (infoPtr->ItemHeight / 2))) && - (ppt->x <= (infoPtr->CheckBoxLeft[CLB_ALLOW] - (infoPtr->ItemHeight / 2) + infoPtr->ItemHeight))) + (ppt->x < (infoPtr->CheckBoxLeft[CLB_ALLOW] - (infoPtr->ItemHeight / 2) + + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)))) || ((ppt->x >= (infoPtr->CheckBoxLeft[CLB_DENY] - (infoPtr->ItemHeight / 2))) && - (ppt->x <= (infoPtr->CheckBoxLeft[CLB_DENY] - (infoPtr->ItemHeight / 2) + infoPtr->ItemHeight))))) + (ppt->x < (infoPtr->CheckBoxLeft[CLB_DENY] - (infoPtr->ItemHeight / 2) + + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT)))))) { *DirectlyInCheckBox = TRUE; } @@ -663,19 +666,24 @@ #if SUPPORT_UXTHEME static INT -CalculateChkBoxStyle(IN BOOL Checked, - IN BOOL Enabled, - IN BOOL HotTrack) +CalculateCheckBoxStyle(IN BOOL Checked, + IN BOOL Enabled, + IN BOOL HotTrack, + IN BOOL Pushed) { INT BtnState; if (Checked) { - BtnState = (Enabled ? (HotTrack ? CBS_CHECKEDHOT : CBS_CHECKEDNORMAL) : CBS_CHECKEDDISABLED); + BtnState = (Enabled ? + (Pushed ? CBS_CHECKEDPRESSED : (HotTrack ? CBS_CHECKEDHOT : CBS_CHECKEDNORMAL)) : + CBS_CHECKEDDISABLED); } else { - BtnState = (Enabled ? (HotTrack ? CBS_UNCHECKEDHOT : CBS_UNCHECKEDNORMAL) : CBS_UNCHECKEDDISABLED); + BtnState = (Enabled ? + (Pushed ? CBS_UNCHECKEDPRESSED : (HotTrack ? CBS_UNCHECKEDHOT : CBS_UNCHECKEDNORMAL)) : + CBS_UNCHECKEDDISABLED); } return BtnState; @@ -721,7 +729,7 @@ HFONT hOldFont; DWORD CurrentIndex; COLORREF OldTextColor; - BOOL Enabled, PrevEnabled; + BOOL Enabled, PrevEnabled, IsPushed; POINT hOldBrushOrg; #if SUPPORT_UXTHEME HRESULT hDrawResult; @@ -780,8 +788,12 @@ -1, &TextRect, DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); - + /* draw the Allow checkbox */ + IsPushed = (Enabled && Item == infoPtr->FocusedCheckItem && infoPtr->HasFocus && + !(Item->State & CIS_ALLOWDISABLED) && infoPtr->FocusedCheckItemBox != CLB_DENY && + infoPtr->FocusedPushed); + CheckBox.left = infoPtr->CheckBoxLeft[CLB_ALLOW] - ((TextRect.bottom - TextRect.top) / 2); CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT); CheckBox.top = TextRect.top; @@ -789,9 +801,10 @@ #if SUPPORT_UXTHEME if (infoPtr->ThemeHandle != NULL) { - INT BtnState = CalculateChkBoxStyle(Item->State & CIS_ALLOW, - Enabled && !(Item->State & CIS_ALLOWDISABLED), - (ItemHovered && infoPtr->HoveredCheckItemBox != CLB_DENY)); + INT BtnState = CalculateCheckBoxStyle(Item->State & CIS_ALLOW, + Enabled && !(Item->State & CIS_ALLOWDISABLED), + (ItemHovered && infoPtr->HoveredCheckItemBox != CLB_DENY), + IsPushed); hDrawResult = DrawThemeBackground(infoPtr->ThemeHandle, @@ -817,10 +830,11 @@ DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_FLAT | ((Item->State & CIS_ALLOWDISABLED) || !Enabled ? DFCS_INACTIVE : 0) | - ((Item->State & CIS_ALLOW) ? DFCS_CHECKED : 0)); + ((Item->State & CIS_ALLOW) ? DFCS_CHECKED : 0) | + (IsPushed ? DFCS_PUSHED : 0)); } - if (infoPtr->HasFocus && - Item == infoPtr->FocusedCheckItem && + if (Item == infoPtr->FocusedCheckItem && + infoPtr->HasFocus && infoPtr->FocusedCheckItemBox != CLB_DENY) { RECT rcFocus = CheckBox; @@ -834,14 +848,19 @@ } /* draw the Deny checkbox */ + IsPushed = (Enabled && Item == infoPtr->FocusedCheckItem && infoPtr->HasFocus && + !(Item->State & CIS_DENYDISABLED) && infoPtr->FocusedCheckItemBox == CLB_DENY && + infoPtr->FocusedPushed); + CheckBox.left = infoPtr->CheckBoxLeft[CLB_DENY] - ((TextRect.bottom - TextRect.top) / 2); CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT); #if SUPPORT_UXTHEME if (infoPtr->ThemeHandle != NULL) { - INT BtnState = CalculateChkBoxStyle(Item->State & CIS_DENY, - Enabled && !(Item->State & CIS_DENYDISABLED), - (ItemHovered && infoPtr->HoveredCheckItemBox == CLB_DENY)); + INT BtnState = CalculateCheckBoxStyle(Item->State & CIS_DENY, + Enabled && !(Item->State & CIS_DENYDISABLED), + (ItemHovered && infoPtr->HoveredCheckItemBox == CLB_DENY), + IsPushed); hDrawResult = DrawThemeBackground(infoPtr->ThemeHandle, hDC, @@ -866,7 +885,8 @@ DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_FLAT | ((Item->State & CIS_DENYDISABLED) || !Enabled ? DFCS_INACTIVE : 0) | - ((Item->State & CIS_DENY) ? DFCS_CHECKED : 0)); + ((Item->State & CIS_DENY) ? DFCS_CHECKED : 0) | + (IsPushed ? DFCS_PUSHED : 0)); } if (infoPtr->HasFocus && Item == infoPtr->FocusedCheckItem && @@ -930,7 +950,6 @@ } } -#if SUPPORT_UXTHEME static VOID UpdateCheckItemBox(IN PCHECKLISTWND infoPtr, IN PCHECKITEM Item, @@ -971,7 +990,6 @@ rcUpdate.right = rcUpdate.left + infoPtr->ItemHeight; rcUpdate.top = ((Index - VisibleFirst) * infoPtr->ItemHeight) + CI_TEXT_MARGIN_HEIGHT; rcUpdate.bottom = rcUpdate.top + infoPtr->ItemHeight - (2 * CI_TEXT_MARGIN_HEIGHT); - DbgPrint("Repaint hot item\n"); RedrawWindow(infoPtr->hSelf, &rcUpdate, @@ -982,6 +1000,7 @@ } } +#if SUPPORT_UXTHEME static VOID ChangeCheckItemHotTrack(IN PCHECKLISTWND infoPtr, IN PCHECKITEM NewHotTrack, @@ -1016,6 +1035,22 @@ } #endif +static VOID +ChangeCheckBox(IN PCHECKLISTWND infoPtr, + IN PCHECKITEM CheckItem, + IN UINT CheckItemBox) +{ + DWORD NewState, OldState = CheckItem->State; + DWORD CheckedBit = ((infoPtr->FocusedCheckItemBox == CLB_DENY) ? CIS_DENY : CIS_ALLOW); + BOOL Checked = (CheckItem->State & CheckedBit) != 0; + + NewState = (Checked ? OldState & ~CheckedBit : OldState | CheckedBit); + + /* FIXME - send a notification message */ + + CheckItem->State = NewState; +} + static LRESULT CALLBACK CheckListWndProc(IN HWND hwnd, IN UINT uMsg, @@ -1067,20 +1102,20 @@ case WM_MOUSEMOVE: { -#if SUPPORT_UXTHEME + POINT pt; + BOOL InCheckBox; HWND hWndCapture = GetCapture(); + pt.x = (LONG)LOWORD(lParam); + pt.y = (LONG)HIWORD(lParam); + +#if SUPPORT_UXTHEME /* handle hovering checkboxes */ if (hWndCapture == NULL) { TRACKMOUSEEVENT tme; PCHECKITEM HotTrackItem; UINT HotTrackItemBox; - BOOL InCheckBox; - POINT pt; - - pt.x = (LONG)LOWORD(lParam); - pt.y = (LONG)HIWORD(lParam); HotTrackItem = PtToCheckItemBox(infoPtr, &pt, @@ -1111,6 +1146,30 @@ TrackMouseEvent(&tme); } #endif + + if (hWndCapture == hwnd && infoPtr->FocusedCheckItem != NULL) + { + PCHECKITEM PtItem; + UINT PtItemBox; + BOOL OldPushed; + + PtItem = PtToCheckItemBox(infoPtr, + &pt, + &PtItemBox, + &InCheckBox); + + OldPushed = infoPtr->FocusedPushed; + infoPtr->FocusedPushed = InCheckBox && infoPtr->FocusedCheckItem == PtItem && + infoPtr->FocusedCheckItemBox == PtItemBox; + + if (OldPushed != infoPtr->FocusedPushed) + { + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } + } + break; } @@ -1494,6 +1553,7 @@ break; } + case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: @@ -1504,7 +1564,7 @@ INT NewFocusBox = 0; BOOL InCheckBox; POINT pt; - BOOL ChangeFocus; + BOOL ChangeFocus, Capture = FALSE; pt.x = (LONG)LOWORD(lParam); pt.y = (LONG)HIWORD(lParam); @@ -1540,6 +1600,14 @@ if (ChangeFocus) { + if (uMsg == WM_LBUTTONDOWN && + InCheckBox && GetCapture() != hwnd) + { + infoPtr->FocusedPushed = TRUE; + + Capture = TRUE; + } + ChangeCheckItemFocus(infoPtr, NewFocus, NewFocusBox); @@ -1549,33 +1617,109 @@ { SetFocus(hwnd); } + + if (Capture) + { + SetCapture(hwnd); + } } break; } + case WM_LBUTTONUP: + { + if (GetCapture() == hwnd) + { + if (infoPtr->FocusedCheckItem != NULL && infoPtr->FocusedPushed) + { + PCHECKITEM PtItem; + UINT PtItemBox; + BOOL InCheckBox; + POINT pt; + + infoPtr->FocusedPushed = FALSE; + + PtItem = PtToCheckItemBox(infoPtr, + &pt, + &PtItemBox, + &InCheckBox); + + if (InCheckBox && PtItem == infoPtr->FocusedCheckItem && + PtItemBox == infoPtr->FocusedCheckItemBox) + { + ChangeCheckBox(infoPtr, + PtItem, + PtItemBox); + } + + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } + + ReleaseCapture(); + } + break; + } + case WM_KEYDOWN: { switch (wParam) { + case VK_SPACE: + { + if (infoPtr->FocusedCheckItem != NULL && GetCapture() == NULL) + { + BOOL OldPushed = infoPtr->FocusedPushed; + infoPtr->FocusedPushed = TRUE; + + if (infoPtr->FocusedPushed != OldPushed) + { + MakeCheckItemVisible(infoPtr, + infoPtr->FocusedCheckItem); + + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } + } + break; + } + case VK_RETURN: { - /* FIXME */ + if (infoPtr->FocusedCheckItem != NULL && GetCapture() == NULL) + { + MakeCheckItemVisible(infoPtr, + infoPtr->FocusedCheckItem); + + ChangeCheckBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } break; } case VK_TAB: { - PCHECKITEM NewFocus; - UINT NewFocusBox = 0; - BOOL Shift = GetKeyState(VK_SHIFT) & 0x8000; - - NewFocus = FindEnabledCheckBox(infoPtr, - Shift, - &NewFocusBox); + if (GetCapture() == NULL) + { + PCHECKITEM NewFocus; + UINT NewFocusBox = 0; + BOOL Shift = GetKeyState(VK_SHIFT) & 0x8000; - ChangeCheckItemFocus(infoPtr, - NewFocus, - NewFocusBox); + NewFocus = FindEnabledCheckBox(infoPtr, + Shift, + &NewFocusBox); + + ChangeCheckItemFocus(infoPtr, + NewFocus, + NewFocusBox); + } break; } @@ -1591,6 +1735,25 @@ break; } + case WM_KEYUP: + { + if (wParam == VK_SPACE && IsWindowEnabled(hwnd) && + infoPtr->FocusedCheckItem != NULL && + infoPtr->FocusedPushed) + { + infoPtr->FocusedPushed = FALSE; + + ChangeCheckBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + + UpdateCheckItemBox(infoPtr, + infoPtr->FocusedCheckItem, + infoPtr->FocusedCheckItemBox); + } + break; + } + case WM_GETDLGCODE: { INT virtKey; @@ -1631,7 +1794,6 @@ #if SUPPORT_UXTHEME case WM_MOUSELEAVE: { - DbgPrint("WM_MOUSELEAVE\n"); if (infoPtr->HoveredCheckItem != NULL) { /* reset and repaint the hovered check item box */ @@ -1649,7 +1811,7 @@ CloseThemeData(infoPtr->ThemeHandle); infoPtr->ThemeHandle = NULL; } - if (IsThemeActive()) + if (IsAppThemed()) { infoPtr->ThemeHandle = OpenThemeData(infoPtr->hSelf, L"BUTTON"); @@ -1697,6 +1859,7 @@ infoPtr->HasFocus = FALSE; infoPtr->FocusedCheckItem = NULL; infoPtr->FocusedCheckItemBox = 0; + infoPtr->FocusedPushed = FALSE; infoPtr->TextColor[0] = GetSysColor(COLOR_GRAYTEXT); infoPtr->TextColor[1] = GetSysColor(COLOR_WINDOWTEXT); @@ -1717,7 +1880,7 @@ infoPtr->HoverTime = HOVER_DEFAULT; } - if (IsThemeActive()) + if (IsAppThemed()) { infoPtr->ThemeHandle = OpenThemeData(infoPtr->hSelf, L"BUTTON");
19 years, 6 months
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
56
57
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Results per page:
10
25
50
100
200