- Timestamp:
- Apr 17, 2000, 7:04:14 PM (25 years ago)
- Location:
- trunk/src/comctl32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/header.cpp
r3410 r3415 1 /* $Id: header.cpp,v 1. 8 2000-04-16 18:52:39cbratschi Exp $ */1 /* $Id: header.cpp,v 1.9 2000-04-17 17:04:11 cbratschi Exp $ */ 2 2 /* 3 3 * Header control … … 5 5 * Copyright 1998 Eric Kohl 6 6 * Copyright 1999 Achim Hasenmueller 7 * Copyright 1999 Christoph Bratschi7 * Copyright 1999-2000 Christoph Bratschi (cbratschi@datacomm.ch) 8 8 * 9 9 * TODO: 10 * - HDS_FILTERBAR 10 * - HDS_FILTERBAR (inconsistent parts in Microsoft SDK documentation) 11 11 * - HEADER_SetHotDivider() 12 12 * 13 * Status: ready (inconsistent parts in Microsoft SDK documentation)13 * Status: complete 14 14 * Version: 5.00 15 15 */ 16 16 17 17 /* 18 Most identical with: 18 19 - Corel 20000317 level 19 20 */ -
trunk/src/comctl32/listview.cpp
r3410 r3415 1 /*$Id: listview.cpp,v 1.1 5 2000-04-16 18:52:39cbratschi Exp $*/1 /*$Id: listview.cpp,v 1.16 2000-04-17 17:04:12 cbratschi Exp $*/ 2 2 /* 3 3 * Listview control … … 18 18 * - work area not used 19 19 * - custom draw 20 * - drag'n'drop (-> treeview )20 * - drag'n'drop (-> treeview (CCBase: need drag'n'dop framework)) 21 21 * - edit timer 22 22 * - LISTVIEW_SetBkImage … … 40 40 * 41 41 * Data structure: 42 * LISTVIEW_SetItemCount : not completed42 * LISTVIEW_SetItemCount : not implemented 43 43 * 44 44 * Status: all messages done, many styles not (yet) implemented … … 47 47 48 48 /* 49 Most identical with: 49 50 - Corel 20000317 level 50 51 - (WINE 20000130 level) … … 60 61 #include "ctype.h" 61 62 62 /* 63 * constants 64 */ 65 66 /* maximum size of a label */ 67 #define DISP_TEXT_SIZE 128 68 69 /* padding for items in list and small icon display modes */ 70 #define WIDTH_PADDING 12 71 72 /* padding for items in list, report and small icon display modes */ 73 #define HEIGHT_PADDING 1 74 75 /* offset of items in report display mode */ 76 #define REPORT_MARGINX 2 77 78 /* padding for icon in large icon display mode */ 79 #define ICON_TOP_PADDING 2 63 /* constants */ 64 65 #define DISP_TEXT_SIZE 128 // maximum size of a label 66 67 #define WIDTH_PADDING 12 // padding for items in list and small icon display modes 68 #define HEIGHT_PADDING 1 // padding for items in list, report and small icon display modes 69 #define REPORT_MARGINX 2 // offset of items in report display mode 70 #define ICON_TOP_PADDING 2 // padding for icon in large icon display mode 80 71 #define ICON_BOTTOM_PADDING 2 81 82 /* padding for label in large icon display mode */ 83 #define LABEL_VERT_OFFSET 2 84 85 /* default label width for items in list and small icon display modes */ 86 #define DEFAULT_LABEL_WIDTH 40 87 88 /* default column width for items in list display mode */ 89 #define DEFAULT_COLUMN_WIDTH 96 90 91 /* Increment size of the horizontal scroll bar */ 92 #define LISTVIEW_SCROLL_DIV_SIZE 1 93 94 #define DEFAULT_HOVERTIME 500 95 #define LV_ISEARCH_DELAY 1000 //documented in ListView_Message_Processing.htm 96 97 /* 98 * macros 99 */ 100 101 /* retrieve the number of items in the listview */ 102 #define GETITEMCOUNT(infoPtr) ((infoPtr)->hdpaItems->nItemCount) 103 104 HWND CreateEditLabel(LPCSTR text, DWORD style, INT x, INT y, 105 INT width, INT height, HWND parent, HINSTANCE hinst, 106 EditlblCallback EditLblCb, DWORD param); 107 72 #define LABEL_VERT_OFFSET 2 // padding for label in large icon display mode 73 #define DEFAULT_LABEL_WIDTH 40 // default label width for items in list and small icon display modes 74 #define DEFAULT_COLUMN_WIDTH 96 // default column width for items in list display mode 75 #define LISTVIEW_SCROLL_DIV_SIZE 1 // Increment size of the horizontal scroll bar 76 #define DEFAULT_HOVERTIME 500 // hover delay 77 #define LV_ISEARCH_DELAY 1000 // documented in ListView_Message_Processing.htm 78 79 /* macros */ 80 81 #define GETITEMCOUNT(infoPtr) ((infoPtr)->hdpaItems->nItemCount) // retrieve the number of items in the listview 108 82 #define LISTVIEW_GetInfoPtr(hwnd) ((LISTVIEW_INFO*)getInfoPtr(hwnd)) 109 83 110 /* 111 * forward declarations 112 */ 84 /* forward declarations */ 85 86 HWND CreateEditLabel(LPCSTR text,DWORD style,INT x,INT y,INT width,INT height,HWND parent,HINSTANCE hinst,EditlblCallback EditLblCb,DWORD param); 113 87 114 88 static INT LISTVIEW_HitTestItem(HWND, LPLVHITTESTINFO); … … 116 90 static INT LISTVIEW_GetCountPerRow(HWND); 117 91 static INT LISTVIEW_GetCountPerColumn(HWND); 118 static VOID LISTVIEW_AlignLeft(HWND);119 static VOID LISTVIEW_AlignTop(HWND);120 static VOID LISTVIEW_AddGroupSelection(HWND, INT);121 static VOID LISTVIEW_AddSelection(HWND, INT);122 92 static LISTVIEW_ITEMDATA* LISTVIEW_GetItemData(HDPA hdpaSubItems,INT nSubItem); 123 static INT LISTVIEW_FindInsertPosition(HDPA, INT);124 static INT LISTVIEW_GetItemHeight(HWND);125 93 static BOOL LISTVIEW_GetItemPosition(HWND, INT, LPPOINT); 126 94 static LRESULT LISTVIEW_GetItemRect(HWND hwnd,INT nItem,LPRECT lprc,INT code); 127 static INT LISTVIEW_GetItemWidth(HWND);128 95 static INT LISTVIEW_GetLabelWidth(HWND,INT,INT); 129 96 static LRESULT LISTVIEW_GetOrigin(HWND, LPPOINT); 130 static INT LISTVIEW_CalculateWidth(HWND hwnd, INT nItem);131 97 static LRESULT LISTVIEW_GetViewRect(HWND, LPRECT); 132 static BOOL LISTVIEW_InitItem(HWND, LISTVIEW_ITEM *, LPLVITEMW,BOOL);133 static LRESULT LISTVIEW_MouseSelection(HWND, POINT);134 static BOOL LISTVIEW_RemoveColumn(HDPA, INT);135 98 static VOID LISTVIEW_RemoveSelections(HWND, INT, INT); 136 99 static BOOL LISTVIEW_RemoveItemData(HDPA,INT); 137 static VOID LISTVIEW_SetGroupSelection(HWND, INT);138 static LRESULT LISTVIEW_SetItem(HWND, LPLVITEMW,BOOL);139 100 static BOOL LISTVIEW_SetItemFocus(HWND, INT); 140 101 static BOOL LISTVIEW_SetItemPosition(HWND,INT,INT,INT,BOOL); 141 static VOID LISTVIEW_UpdateScroll(HWND);142 static VOID LISTVIEW_SetSelection(HWND, INT);143 102 static VOID LISTVIEW_UpdateSize(HWND); 144 static BOOL LISTVIEW_SetSubItem(HWND, LPLVITEMW,BOOL);145 103 static LRESULT LISTVIEW_SetViewRect(HWND, LPRECT); 146 static BOOL LISTVIEW_ToggleSelection(HWND, INT);147 static HWND LISTVIEW_EditLabel(HWND hwnd,INT nItem,BOOL unicode);148 static BOOL LISTVIEW_EndEditLabel(HWND hwnd,LPSTR pszText,DWORD nItem,BOOL cancel);149 static LRESULT LISTVIEW_Command(HWND hwnd, WPARAM wParam, LPARAM lParam);150 static LRESULT LISTVIEW_SortItems(HWND hwnd, WPARAM wParam, LPARAM lParam);151 104 static LRESULT LISTVIEW_GetItem(HWND hwnd,LPLVITEMW lpLVItem,BOOL unicode,BOOL internal); 152 105 static INT LISTVIEW_GetTopIndex(HWND hwnd); … … 156 109 static BOOL LISTVIEW_EnsureVisible(HWND hwnd,INT nItem,BOOL bPartial); 157 110 static VOID LISTVIEW_UpdateHeaderSize(HWND hwnd,INT nNewScrollPos,INT xScroll); 111 112 /* code */ 158 113 159 114 static VOID LISTVIEW_Refresh(HWND hwnd) -
trunk/src/comctl32/progress.cpp
r3145 r3415 1 /* $Id: progress.cpp,v 1. 2 2000-03-17 17:13:23 cbratschi Exp $ */1 /* $Id: progress.cpp,v 1.3 2000-04-17 17:04:13 cbratschi Exp $ */ 2 2 /* 3 3 * Progress control … … 6 6 * Copyright 1998, 1999 Eric Kohl 7 7 * Copyright 1999 Achim Hasenmueller 8 * Copyright 1999 Christoph Bratschi 8 * Copyright 1999 Christoph Bratschi (cbratschi@datacomm.ch) 9 9 * 10 10 * Status: complete … … 39 39 RECT rect; 40 40 DWORD dwStyle; 41 42 // TRACE(progress, "refresh pos=%d min=%d, max=%d\n",43 // infoPtr->CurVal, infoPtr->MinVal, infoPtr->MaxVal);44 41 45 42 if (infoPtr->MinVal == infoPtr->MaxVal) return; //Prevent division through 0 … … 330 327 INT temp; 331 328 332 //if(lParam) UNKNOWN_PARAM(PBM_DELTAPOS, wParam, lParam);333 329 temp = infoPtr->CurVal; 334 330 if (wParam != 0) … … 347 343 INT temp; 348 344 349 //if (lParam) UNKNOWN_PARAM(PBM_SETPOS, wParam, lParam);350 345 temp = infoPtr->CurVal; 351 346 if (temp != wParam) … … 364 359 INT temp; 365 360 366 //if (wParam) UNKNOWN_PARAM(PBM_SETRANGE, wParam, lParam);367 361 temp = MAKELONG(infoPtr->MinVal,infoPtr->MaxVal); 368 362 if (temp != lParam) … … 383 377 INT temp; 384 378 385 //if (lParam) UNKNOWN_PARAM(PBM_SETSTEP, wParam, lParam);386 379 temp = infoPtr->Step; 387 380 infoPtr->Step = (INT)wParam; //CB: negative steps allowed … … 395 388 INT temp; 396 389 397 //if (wParam || lParam) UNKNOWN_PARAM(PBM_STEPIT, wParam, lParam);398 390 temp = infoPtr->CurVal; 399 391 infoPtr->CurVal += infoPtr->Step; … … 439 431 PROGRESS_INFO *infoPtr = PROGRESS_GetInfoPtr(hwnd); 440 432 441 //if (wParam || lParam) UNKNOWN_PARAM(PBM_STEPIT, wParam, lParam);442 443 433 return (infoPtr->CurVal); 444 434 } … … 449 439 COLORREF oldColorBar = infoPtr->ColorBar; 450 440 451 //if (wParam) UNKNOWN_PARAM(PBM_SETBARCOLOR, wParam, lParam);452 441 infoPtr->ColorBar = (COLORREF)lParam; 453 442 if (infoPtr->ColorBar != oldColorBar) PROGRESS_Refresh(hwnd); … … 461 450 COLORREF oldColorBk = infoPtr->ColorBk; 462 451 463 //if (wParam) UNKNOWN_PARAM(PBM_SETBKCOLOR, wParam, lParam);464 452 infoPtr->ColorBk = (COLORREF)lParam; 465 453 if (infoPtr->ColorBk != oldColorBk) PROGRESS_Refresh (hwnd); … … 531 519 532 520 default: 533 //if (message >= WM_USER)534 //ERR(progress, "unknown msg %04x wp=%04x lp=%08lx\n",535 //message, wParam, lParam );521 //if (message >= WM_USER) 522 //ERR(progress, "unknown msg %04x wp=%04x lp=%08lx\n", 523 // message, wParam, lParam ); 536 524 return defComCtl32ProcA( hwnd, message, wParam, lParam ); 537 525 } -
trunk/src/comctl32/treeview.cpp
r3410 r3415 1 /* $Id: treeview.cpp,v 1.1 1 2000-04-16 18:48:53cbratschi Exp $ */1 /* $Id: treeview.cpp,v 1.12 2000-04-17 17:04:14 cbratschi Exp $ */ 2 2 /* Treeview control 3 3 * … … 8 8 * Copyright 1999-2000 Christoph Bratschi (cbratschi@datacomm.ch) 9 9 * 10 *11 * TODO:12 * Using DPA to store the item ptr would be good.13 * -check custom draw14 * use separate routine to get item text/image.15 10 * 16 11 * FIXMEs (for personal use)
Note:
See TracChangeset
for help on using the changeset viewer.