Changeset 3415 for trunk/src


Ignore:
Timestamp:
Apr 17, 2000, 7:04:14 PM (25 years ago)
Author:
cbratschi
Message:

* empty log message *

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:39 cbratschi Exp $ */
     1/* $Id: header.cpp,v 1.9 2000-04-17 17:04:11 cbratschi Exp $ */
    22/*
    33 *  Header control
     
    55 *  Copyright 1998 Eric Kohl
    66 *  Copyright 1999 Achim Hasenmueller
    7  *  Copyright 1999 Christoph Bratschi
     7 *  Copyright 1999-2000 Christoph Bratschi (cbratschi@datacomm.ch)
    88 *
    99 *  TODO:
    10  *   - HDS_FILTERBAR
     10 *   - HDS_FILTERBAR (inconsistent parts in Microsoft SDK documentation)
    1111 *   - HEADER_SetHotDivider()
    1212 *
    13  * Status: ready (inconsistent parts in Microsoft SDK documentation)
     13 * Status: complete
    1414 * Version: 5.00
    1515 */
    1616
    1717/*
     18 Most identical with:
    1819 - Corel 20000317 level
    1920*/
  • trunk/src/comctl32/listview.cpp

    r3410 r3415  
    1 /*$Id: listview.cpp,v 1.15 2000-04-16 18:52:39 cbratschi Exp $*/
     1/*$Id: listview.cpp,v 1.16 2000-04-17 17:04:12 cbratschi Exp $*/
    22/*
    33 * Listview control
     
    1818 *   - work area not used
    1919 *   - custom draw
    20  *   - drag'n'drop (-> treeview)
     20 *   - drag'n'drop (-> treeview (CCBase: need drag'n'dop framework))
    2121 *   - edit timer
    2222 *   - LISTVIEW_SetBkImage
     
    4040 *
    4141 * Data structure:
    42  *   LISTVIEW_SetItemCount : not completed
     42 *   LISTVIEW_SetItemCount : not implemented
    4343 *
    4444 * Status: all messages done, many styles not (yet) implemented
     
    4747
    4848/*
     49 Most identical with:
    4950 - Corel 20000317 level
    5051 - (WINE 20000130 level)
     
    6061#include "ctype.h"
    6162
    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
    8071#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
    10882#define LISTVIEW_GetInfoPtr(hwnd) ((LISTVIEW_INFO*)getInfoPtr(hwnd))
    10983
    110 /*
    111  * forward declarations
    112  */
     84/* forward declarations */
     85
     86HWND CreateEditLabel(LPCSTR text,DWORD style,INT x,INT y,INT width,INT height,HWND parent,HINSTANCE hinst,EditlblCallback EditLblCb,DWORD param);
    11387
    11488static INT     LISTVIEW_HitTestItem(HWND, LPLVHITTESTINFO);
     
    11690static INT     LISTVIEW_GetCountPerRow(HWND);
    11791static 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);
    12292static LISTVIEW_ITEMDATA* LISTVIEW_GetItemData(HDPA hdpaSubItems,INT nSubItem);
    123 static INT     LISTVIEW_FindInsertPosition(HDPA, INT);
    124 static INT     LISTVIEW_GetItemHeight(HWND);
    12593static BOOL    LISTVIEW_GetItemPosition(HWND, INT, LPPOINT);
    12694static LRESULT LISTVIEW_GetItemRect(HWND hwnd,INT nItem,LPRECT lprc,INT code);
    127 static INT     LISTVIEW_GetItemWidth(HWND);
    12895static INT     LISTVIEW_GetLabelWidth(HWND,INT,INT);
    12996static LRESULT LISTVIEW_GetOrigin(HWND, LPPOINT);
    130 static INT     LISTVIEW_CalculateWidth(HWND hwnd, INT nItem);
    13197static 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);
    13598static VOID    LISTVIEW_RemoveSelections(HWND, INT, INT);
    13699static BOOL    LISTVIEW_RemoveItemData(HDPA,INT);
    137 static VOID    LISTVIEW_SetGroupSelection(HWND, INT);
    138 static LRESULT LISTVIEW_SetItem(HWND, LPLVITEMW,BOOL);
    139100static BOOL    LISTVIEW_SetItemFocus(HWND, INT);
    140101static BOOL    LISTVIEW_SetItemPosition(HWND,INT,INT,INT,BOOL);
    141 static VOID    LISTVIEW_UpdateScroll(HWND);
    142 static VOID    LISTVIEW_SetSelection(HWND, INT);
    143102static VOID    LISTVIEW_UpdateSize(HWND);
    144 static BOOL    LISTVIEW_SetSubItem(HWND, LPLVITEMW,BOOL);
    145103static 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);
    151104static LRESULT LISTVIEW_GetItem(HWND hwnd,LPLVITEMW lpLVItem,BOOL unicode,BOOL internal);
    152105static INT     LISTVIEW_GetTopIndex(HWND hwnd);
     
    156109static BOOL    LISTVIEW_EnsureVisible(HWND hwnd,INT nItem,BOOL bPartial);
    157110static VOID    LISTVIEW_UpdateHeaderSize(HWND hwnd,INT nNewScrollPos,INT xScroll);
     111
     112/* code */
    158113
    159114static 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 $ */
    22/*
    33 * Progress control
     
    66 * Copyright 1998, 1999 Eric Kohl
    77 * Copyright 1999 Achim Hasenmueller
    8  * Copyright 1999 Christoph Bratschi
     8 * Copyright 1999 Christoph Bratschi (cbratschi@datacomm.ch)
    99 *
    1010 * Status: complete
     
    3939  RECT rect;
    4040  DWORD dwStyle;
    41 
    42 //  TRACE(progress, "refresh pos=%d min=%d, max=%d\n",
    43 //             infoPtr->CurVal, infoPtr->MinVal, infoPtr->MaxVal);
    4441
    4542  if (infoPtr->MinVal == infoPtr->MaxVal) return; //Prevent division through 0
     
    330327  INT temp;
    331328
    332   //if(lParam) UNKNOWN_PARAM(PBM_DELTAPOS, wParam, lParam);
    333329  temp = infoPtr->CurVal;
    334330  if (wParam != 0)
     
    347343  INT temp;
    348344
    349   //if (lParam) UNKNOWN_PARAM(PBM_SETPOS, wParam, lParam);
    350345  temp = infoPtr->CurVal;
    351346  if (temp != wParam)
     
    364359  INT temp;
    365360
    366   //if (wParam) UNKNOWN_PARAM(PBM_SETRANGE, wParam, lParam);
    367361  temp = MAKELONG(infoPtr->MinVal,infoPtr->MaxVal);
    368362  if (temp != lParam)
     
    383377  INT temp;
    384378
    385   //if (lParam) UNKNOWN_PARAM(PBM_SETSTEP, wParam, lParam);
    386379  temp = infoPtr->Step;
    387380  infoPtr->Step = (INT)wParam; //CB: negative steps allowed
     
    395388  INT temp;
    396389
    397   //if (wParam || lParam) UNKNOWN_PARAM(PBM_STEPIT, wParam, lParam);
    398390  temp = infoPtr->CurVal;
    399391  infoPtr->CurVal += infoPtr->Step;
     
    439431  PROGRESS_INFO *infoPtr = PROGRESS_GetInfoPtr(hwnd);
    440432
    441   //if (wParam || lParam) UNKNOWN_PARAM(PBM_STEPIT, wParam, lParam);
    442 
    443433  return (infoPtr->CurVal);
    444434}
     
    449439  COLORREF oldColorBar = infoPtr->ColorBar;
    450440
    451   //if (wParam) UNKNOWN_PARAM(PBM_SETBARCOLOR, wParam, lParam);
    452441  infoPtr->ColorBar = (COLORREF)lParam;
    453442  if (infoPtr->ColorBar != oldColorBar) PROGRESS_Refresh(hwnd);
     
    461450  COLORREF oldColorBk = infoPtr->ColorBk;
    462451
    463   //if (wParam) UNKNOWN_PARAM(PBM_SETBKCOLOR, wParam, lParam);
    464452  infoPtr->ColorBk = (COLORREF)lParam;
    465453  if (infoPtr->ColorBk != oldColorBk) PROGRESS_Refresh (hwnd);
     
    531519
    532520    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 );
    536524      return defComCtl32ProcA( hwnd, message, wParam, lParam );
    537525    }
  • trunk/src/comctl32/treeview.cpp

    r3410 r3415  
    1 /* $Id: treeview.cpp,v 1.11 2000-04-16 18:48:53 cbratschi Exp $ */
     1/* $Id: treeview.cpp,v 1.12 2000-04-17 17:04:14 cbratschi Exp $ */
    22/* Treeview control
    33 *
     
    88 * Copyright 1999-2000 Christoph Bratschi (cbratschi@datacomm.ch)
    99 *
    10  *
    11  * TODO:
    12  *   Using DPA to store the item ptr would be good.
    13  *  -check custom draw
    14  *   use separate routine to get item text/image.
    1510 *
    1611 * FIXMEs  (for personal use)
Note: See TracChangeset for help on using the changeset viewer.