Changeset 85


Ignore:
Timestamp:
Jul 6, 2001, 6:57:59 PM (24 years ago)
Author:
umoeller
Message:

Misc changes.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/dialog.h

    r82 r85  
    179179     ********************************************************************/
    180180
    181     APIRET dlghCreateDlg(HWND *phwndDlg,
    182                          HWND hwndOwner,
    183                          ULONG flCreateFlags,
    184                          PFNWP pfnwpDialogProc,
    185                          const char *pcszDlgTitle,
    186                          PDLGHITEM paDlgItems,
    187                          ULONG cDlgItems,
    188                          PVOID pCreateParams,
    189                          const char *pcszControlsFont);
     181    APIRET XWPENTRY dlghCreateDlg(HWND *phwndDlg,
     182                                  HWND hwndOwner,
     183                                  ULONG flCreateFlags,
     184                                  PFNWP pfnwpDialogProc,
     185                                  const char *pcszDlgTitle,
     186                                  PDLGHITEM paDlgItems,
     187                                  ULONG cDlgItems,
     188                                  PVOID pCreateParams,
     189                                  const char *pcszControlsFont);
     190    typedef APIRET XWPENTRY DLGHCREATEDLG(HWND *phwndDlg,
     191                                          HWND hwndOwner,
     192                                          ULONG flCreateFlags,
     193                                          PFNWP pfnwpDialogProc,
     194                                          const char *pcszDlgTitle,
     195                                          PDLGHITEM paDlgItems,
     196                                          ULONG cDlgItems,
     197                                          PVOID pCreateParams,
     198                                          const char *pcszControlsFont);
     199    typedef DLGHCREATEDLG *PDLGHCREATEDLG;
    190200
    191201    /*
  • trunk/include/helpers/textview.h

    r14 r85  
    160160    #define TXVWORDF_LINEFEED           4       // \r
    161161
     162    typedef struct _TXVRECTANGLE *PTXVRECTANGLE;
     163
    162164    /*
    163165     *@@ TXVWORD:
     
    211213        LONG        lX;             // X position to paint this word at;
    212214                                    // this is (re)set during word-to-rectangle correlation!
    213         PVOID       pvRectangle;    // reverse pointer to the TXVRECTANGLE structure to
     215        PTXVRECTANGLE pRectangle;   // reverse pointer to the TXVRECTANGLE structure to
    214216                                    // which this word belongs; useful for repainting;
    215217                                    // this is (re)set during word-to-rectangle correlation!
     
    256258                                        // So one allocated TXVWORD structure can
    257259                                        // have two pointers pointing to it.
    258         } TXVRECTANGLE, *PTXVRECTANGLE;
     260        } TXVRECTANGLE;
    259261    #endif
    260262
  • trunk/include/helpers/winh.h

    r84 r85  
    161161     ********************************************************************/
    162162
     163    ULONG XWPENTRY winhQueryWindowStyle(HWND hwnd);
     164
    163165    BOOL XWPENTRY winhEnableDlgItem(HWND hwndDlg, SHORT id, BOOL fEnable);
    164166
     
    356358                                         ULONG max,
    357359                                         ULONG current);
     360    typedef VOID XWPENTRY WINHSETDLGITEMSPINDATA(HWND hwndDlg,
     361                                                 ULONG idSpinButton,
     362                                                 ULONG min,
     363                                                 ULONG max,
     364                                                 ULONG current);
     365    typedef WINHSETDLGITEMSPINDATA *PWINHSETDLGITEMSPINDATA;
    358366
    359367    LONG XWPENTRY winhAdjustDlgItemSpinData(HWND hwndDlg,
     
    361369                                            LONG lGrid,
    362370                                            USHORT usNotifyCode);
     371    typedef LONG XWPENTRY WINHADJUSTDLGITEMSPINDATA(HWND hwndDlg,
     372                                                    USHORT usItemID,
     373                                                    LONG lGrid,
     374                                                    USHORT usNotifyCode);
     375    typedef WINHADJUSTDLGITEMSPINDATA *PWINHADJUSTDLGITEMSPINDATA;
    363376
    364377    /* ******************************************************************
  • trunk/readme.txt

    r35 r85  
    11XWP Helpers 0.9.7 README
    22(W) Ulrich M”ller, October 26, 2000
    3 Last updated January 6, 2001, Ulrich M”ller
     3Last updated July 5, 2001, Ulrich M”ller
    44
    55
     
    6161    sorts of OS/2 programs, including:
    6262
    63     --  standard C code which is independent of the OS/2 platform;
     63    --  standard C code which is independent of the OS/2 platform
     64        (and should even work for Unix or Windows);
    6465
    6566    --  OS/2-specific code which can be used in any OS/2 program
    66         (text mode or PM);
     67        (VIO or PM);
    6768
    6869    --  PM-specific code which assists you in writing PM programs.
    6970
    7071    The XWPHelpers can be compiled with EMX/GCC or IBM VisualAge
    71     C++ 3.08. They can be used with C or C++ programs.
     72    C++ 3.08. They can be used with C or C++ programs. All typecasts
     73    should be C++-compatible.
    7274
    7375
     
    98100
    99101    The XWPHelpers do not come with pre-made documentation. However,
    100     you can automatically have documentation generated from the sources
    101     using my "xdoc" utility, which resides in the main directory of
    102     the helpers. (The source code for xdoc is in the WarpIN CVS
    103     repository because it shares some C++ code with WarpIN.)
    104 
    105     To have the code generated, call "createdoc.cmd" in the main
    106     directory. This will call xdoc in turn with the proper parameters
    107     and create a new "HTML" directory, from where you should start
    108     with the "index.html" file.
     102    you can automatically have extensive, categorized documentation
     103    generated automatically from the C sources using my "xdoc"
     104    utility, which resides in the main directory of the helpers.
     105    (The source code for xdoc is in the WarpIN CVS repository
     106    because it shares some C++ code with WarpIN.)
     107
     108    To have the code generated, simply call "createdoc.cmd" in the
     109    main directory. This will call xdoc in turn with the proper
     110    parameters and create a new "HTML" directory, from where you
     111    should start with the "index.html" file.
    109112
    110113
    1111144. COMPILING
    112115============
     116
     117    You don't have to worry about compilation if you only want
     118    to compile XWorkplace or WarpIN. The makefiles of those two
     119    projects are set up properly to automatically compile the
     120    XWPHelpers as well. This section is only for people who
     121    want to compile the XWPHelpers separately for use in a
     122    different project.
    113123
    114124    Compiling is a bit tricky because the code and the makefiles
  • trunk/src/helpers/dialog.c

    r83 r85  
    212212 ********************************************************************/
    213213
    214 #define PM_GROUP_SPACING_X          20
    215 #define PM_GROUP_SPACING_TOP        30
     214#define PM_GROUP_SPACING_X          10
     215#define PM_GROUP_SPACING_TOP        20
    216216
    217217VOID ProcessTable(PTABLEDEF pTableDef,
  • trunk/src/helpers/textview.c

    r47 r85  
    12661266                            {
    12671267                                pWordThis->lX = flbuf.lXCurrent;
    1268                                 pWordThis->pvRectangle = (PVOID)pRect;
     1268                                pWordThis->pRectangle = pRect;
    12691269                                lstAppendItem(&pRect->llWords, pWordThis);
    12701270                                ulWordsInThisRect++;
     
    13101310
    13111311                                // store word in rectangle
    1312                                 pWordThis->pvRectangle = (PVOID)pRect;
     1312                                pWordThis->pRectangle = pRect;
    13131313                                lstAppendItem(&pRect->llWords, pWordThis);
    1314                                             // ### memory leak right here!!!
     1314                                            // @@todo memory leak right here!!!
    13151315                                ulWordsInThisRect++;
    13161316
     
    21382138    POINTL ptlStart;
    21392139    ULONG flOptions = pWordThis->flOptions;
    2140     PTXVRECTANGLE pLineRcl = (PTXVRECTANGLE)pWordThis->pvRectangle;
     2140    PTXVRECTANGLE pLineRcl = pWordThis->pRectangle;
    21412141
    21422142    RECTL           rclLine;
     
    30313031                    if (pWord)
    30323032                    {
    3033                         PTXVRECTANGLE pRect = (PTXVRECTANGLE)pWord->pvRectangle;
     3033                        PTXVRECTANGLE pRect = pWord->pRectangle;
    30343034                        ULONG ulWinCY = (ptxvd->rclViewText.yTop - ptxvd->rclViewText.yBottom);
    30353035
  • trunk/src/helpers/tree.c

    r83 r85  
    114114 *
    115115 *      -- Fully balanced trees can be quite expensive because on
    116  *         every insertion or deletion, the tree nodes must be reordered.
     116 *         every insertion or deletion, the tree nodes must be rotated.
    117117 *         By contrast, "Red-black" binary balanced trees contain
    118118 *         an additional bit in each node which marks the node as
    119119 *         either red or black. This bit is used only for efficient
    120120 *         rebalancing when inserting or deleting nodes.
    121  *
    122  *         The color of each node is instrumental in determining the
    123  *         balance of the tree. During insert and delete operations,
    124  *         nodes may be rotated to maintain tree balance.
    125121 *
    126122 *         I don't fully understand why this works, but if you really
  • trunk/src/helpers/winh.c

    r83 r85  
    258258 *
    259259 ********************************************************************/
     260
     261/*
     262 *@@ winhQueryWindowStyle:
     263 *
     264 *@@added V0.9.13 (2001-07-02) [umoeller]
     265 */
     266
     267ULONG winhQueryWindowStyle(HWND hwnd)
     268{
     269    return (WinQueryWindowULong(hwnd, QWL_STYLE));
     270}
    260271
    261272/*
Note: See TracChangeset for help on using the changeset viewer.