home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / source / xcont.cpp < prev    next >
C/C++ Source or Header  |  1998-04-03  |  20KB  |  691 lines

  1. #include "XContInf.h"
  2. #include "XContObj.h"
  3. #include "XString.h"
  4. #include "XContain.h"
  5. #include "XContCol.h"
  6. #include "XDate.h"
  7. #include "XTime.h"
  8. #include "XBitmap.h"
  9. #include "XIcon.h"
  10. #include "xsize.h"
  11.  
  12. #include <string.h>
  13.  
  14. /*@
  15. @class XContainerColumn
  16. @parent XObject
  17. @type overview
  18. @symbol _
  19. */
  20.  
  21. /*@
  22. @class XContainerObject
  23. @parent XObject
  24. @type overview
  25. @symbol _
  26. */
  27. XContainerColumn :: ~XContainerColumn()
  28. {
  29.    if (owner && info)
  30.       WinSendMsg(owner->GetHandle(), CM_FREEDETAILFIELDINFO, MPARAM(info), MPFROMSHORT(1));
  31. }
  32.  
  33.  
  34. /*@ XContainerColumn::XContainerColumn( XContainerControl * ow, void * titleData, SHORT dataColumn, LONG dataSettings, LONG titleSettings, LONG width)
  35. @group constructors/destructors
  36. @remarks If a container should be displayed in detail-mode you must add columns to it. Therfore
  37. you construct one or more XContainerColums, add these with XContainerControll::AddColumn
  38. and finaly call XContainerControll::UpdateColumns.
  39. @parameters    <t '°' c=2>
  40.                °XContainerControl *   °the owner of the column
  41.                °void *                 °the title of the column, the parameter can be a
  42.                                                pointer to a string or contain a handle for a
  43.                                                bitmap or icon
  44.                °SHORT                °a zero-based index which points to the data-column
  45.                                                which will be used in XContainerObject::SetColumnData()
  46.                °LONG               °Information about the datas in the column
  47. <P>COL_LEFT field is left-justified
  48. <P>COL_RIGHT field is right-justified
  49. <P>COL_CENTER          field is horizontal centered
  50. <P>COL_TOP             field is top-justified
  51. <P>COL_VCENTER         field is vertictal centered
  52. <P>COL_BOTTOM          field is bottom-justified
  53. <P>COL_INVISIBLE       the column is invisible
  54. <P>COL_SEPARATOR       vertical separator
  55. <P>COL_HORZSEPARATOR   horizontal separator
  56. <P>COL_BITMAPORICON    the data contain a handle to a bitmap/icon
  57. <P>COL_STRING          the data contain a string
  58. <P>COL_DATE            the data contain a date
  59. <P>COL_TIME            the data contain a time-value
  60. <P>COL_ULONG           the data contain a ULONG value
  61. <P>COL_FIREADONLY      datas are readonly
  62. <P>Can be or-ed;
  63.                °LONG titleSettings              °Information about the title of the column
  64. <P>COL_LEFT            title is left-justified
  65. <P>COL_RIGHT           title is right-justified
  66. <P>COL_CENTER          title is horizontal centered
  67. <P>COL_TOP             title is top-justified
  68. <P>COL_VCENTER         title is vertictal centered
  69. <P>COL_BOTTOM          title is bottom-justified
  70. <P>COL_SEPARATOR       vertical separator
  71. <P>COL_HORZSEPARATOR   horizontal separator
  72. <P>COL_BITMAPORICON    the title contain is a bitmap/icon
  73. <P>COL_FTITLEREADONLY  title is readonly
  74. <P>Can be or-ed;
  75.                °LONG widthOfColumn              °the width of the column in window-pixel. If zero
  76.                                                the width of the column is set dynamicaly.<BR>
  77.                                             Default is zero.
  78.                </t>
  79. */
  80.  
  81. XContainerColumn :: XContainerColumn(XContainerControl * ow, void *titleData, SHORT dataColumn, LONG dataSettings, LONG titleSettings, LONG width)
  82. {
  83.    owner = ow;
  84.    info = (FIELDINFO *) WinSendMsg(owner->GetHandle(), CM_ALLOCDETAILFIELDINFO, MPFROMSHORT(1), 0);
  85.  
  86.    info->flData = dataSettings;
  87.    info->flTitle = titleSettings;
  88.    info->offStruct = sizeof(RECORDCORE) + dataColumn * 4 + sizeof(void *);
  89.    info->pUserData = this;
  90.    col = dataColumn;
  91.    if (width > 0)
  92.       info->cxWidth = width;
  93.    info->pTitleData = titleData;
  94.    if( info->flData & COL_STRING )
  95.    {
  96.       title = (char*) info->pTitleData;
  97.       info->pTitleData = (char*) title;
  98.    }
  99. }
  100.  
  101.  
  102. /*@ XContainerColumn::GetColumnNumber()
  103. @group misc
  104. @remarks Returns the number of the column in the container
  105. @returns SHORT number
  106. */
  107.  
  108.  
  109. /*@ XContainerColumn::SetTitle()
  110. @group title
  111. @remarks Set the title
  112. @parameters char * title
  113. */
  114.  
  115.  
  116. /*@ XContainerColumn::SetTitle()
  117. @group title
  118. @remarks Set the title
  119. @parameters XBitmap * bitmap for the title (tilt-attributes must have COL_BITMAPORICON)
  120. */
  121.  
  122.  
  123. /*@ XContainerColumn::SetTitle()
  124. @group title
  125. @remarks Set the title
  126. @parameters XIcon * bitmap for the title (tilt-attributes must have COL_BITMAPORICON)
  127. */
  128.  
  129.  
  130. /*@ XContainerColumn::SetTitleAttributes()
  131. @group title
  132. @remarks Set attributes for the title
  133. @parameters LONG attruibute (see constructor for details)
  134. */
  135.  
  136.  
  137. /*@ XContainerColumn::SetDataAttributes()
  138. @group data
  139. @remarks Set attributes for the datas
  140. @parameters LONG attruibute (see constructor for details)
  141. */
  142.  
  143.  
  144. /*@ XContainerColumn::GetDataAttributes()
  145. @group data
  146. @remarks Query attributes for the datas
  147. @returns LONG attruibute (see constructor for details)
  148. */
  149.  
  150.  
  151. /*@ XContainerColumn::GetTitleAttributes()
  152. @group title
  153. @remarks Query attributes for the title
  154. @returns LONG attruibute (see constructor for details)
  155. */
  156.  
  157.  
  158. /*@ XContainerColumn::GetTitle()
  159. @group title
  160. @remarks Query the title of a column
  161. @parameters   XString * buffer   buffer to hold the data
  162. */
  163. void XContainerColumn::GetTitle(XString * buffer)
  164. {
  165.    strcpy(buffer->GetBuffer(100), (char *) info->pTitleData);
  166.    buffer->ReleaseBuffer();
  167. }
  168.  
  169.  
  170. /*@ XContainerColumn::GetNextColumn()
  171. @group misc
  172. @remarks Returns a pointer to the next column of the container
  173. @returns XContainerColumn * column
  174. */
  175.  
  176.  
  177. /*@ XContainerObject::GetIcon( XIcon * icon )
  178. @group icon/bitmap
  179. @remarks Querry the icon of the object
  180. @parameters XIcon * buffer
  181. */
  182. void XContainerObject::GetIcon(XIcon * icon)
  183. {
  184.    if (icon->handle && icon->loaded)
  185.    {
  186.       WinFreeFileIcon(icon->handle);
  187.       icon->loaded = FALSE;
  188.    }
  189.    icon->handle = core->hptrIcon;
  190. }
  191.  
  192.  
  193. /*@ XContainerObject :: GetBitmap( XBitmap * bitmap )
  194. @group icon/bitmap
  195. @remarks Get the bitmap of the object
  196. @parameters XBitmap * buffer
  197. */
  198. void XContainerObject::GetBitmap(XBitmap * bitmap)
  199. {
  200.    if (bitmap->hbm)
  201.       GpiDeleteBitmap(bitmap->hbm);
  202.    bitmap->hbm = core->hbmBitmap;
  203. }
  204.  
  205.  
  206. /*@ XContainerObject::XContainerObject( XContainerControl * owner, SHORT columns, LONG emphasis)
  207. @group constructors/destructors
  208. @remarks Construct a container-item
  209. @parameters
  210. <t '°' c=2>
  211. °XContainerControl * °owner
  212. °SHORT °count of columns in detail-view (default is NULL)
  213. </t>
  214. */
  215. XContainerObject :: XContainerObject( const XContainerControl * owner, const SHORT columns, const LONG emphasis)
  216. {
  217.    core = (RECORDCORE *) WinSendMsg(owner->GetHandle(), CM_ALLOCRECORD, MPFROMLONG(sizeof(void *) + columns * sizeof(void *)), MPFROMSHORT(1));
  218.    core->flRecordAttr = emphasis;
  219.    RECORDCORE *pr = (RECORDCORE *) ((PBYTE) core + sizeof(RECORDCORE));
  220.    void *pp = this;
  221.  
  222.    memcpy(pr, &pp, sizeof(void *));
  223. }
  224.  
  225.  
  226. /*@ XContainerObject::SetColumnData()
  227. @group columns
  228. @remarks Set data for an column for detail-view
  229. @parameters
  230. <t '°' c=2>
  231. °SHORT °column-number (zero-based index)
  232. °char * °data
  233. </t>
  234. */
  235.  
  236. /*@ XContainerObject::SetColumnData()
  237. @group columns
  238. @remarks Set data for an column for detail-view
  239. @parameters
  240. <t '°' c=2>
  241. °SHORT °column-number (zero-based index)
  242. °LONG °data
  243. </t>
  244. */
  245.  
  246. /*@ XContainerObject::SetColumnData()
  247. @group columns
  248. @remarks Set data for an column for detail-view
  249. @parameters
  250. <t '°' c=2>
  251. °SHORT °column-number (zero-based index)
  252. °XBitmap * °data
  253. </t>
  254. */
  255.  
  256. /*@ XContainerObject::SetColumnData()
  257. @group columns
  258. @remarks Set data for an column for detail-view
  259. @parameters
  260. <t '°' c=2>
  261. °SHORT °column-number (zero-based index)
  262. °XIcon * °data
  263. </t>
  264. */
  265.  
  266. /*@ XContainerObject::SetColumnData()
  267. @group columns
  268. @remarks Set data for an column for detail-view
  269. @parameters
  270. <t '°' c=2>
  271. °SHORT °column-number (zero-based index)
  272. °XDate * °data
  273. </t>
  274. */
  275.  
  276.  
  277. /*@ XContainerObject::SetColumnData()
  278. @group columns
  279. @remarks Set data for an column for detail-view
  280. @parameters
  281. <t '°' c=2>
  282. °SHORT °column-number (zero-based index)
  283. °XTime * °data
  284. </t>
  285. */
  286.  
  287.  
  288. /*@ XContainerObject::SetIcon()
  289. @group icon/bitmap
  290. @remarks Set object-icon
  291. @parameters XIcon * icon
  292. */
  293.  
  294.  
  295. /*@ XContainerObject::SetMiniIcon()
  296. @group icon/bitmap
  297. @remarks Set object mini-icon
  298. @parameters XIcon * icon
  299. */
  300.  
  301. /*@ XContainerObject::SetBitmap()
  302. @group icon/bitmap
  303. @remarks Set object-bitmap.
  304. @parameters XBitmap * bitmap
  305. */
  306.  
  307. /*@ XContainerObject::SetMiniBitmap()
  308. @group icon/bitmap
  309. @remarks Set the mini-bitmap of the object
  310. @parameters XBitmap * bitmap
  311. */
  312.  
  313. /*@ XContainerObject::SetTitle()
  314. @group title
  315. @remarks Set the title of the object. Memory for the title is allocated by the object.
  316. @parameters char * title
  317. */
  318.  
  319. /*@ XContainerObject::GetEmphasis()
  320. @group emphasis
  321. @remarks Query emphasis of the object.
  322. @returns LONG emphasis (see XContainer::SetObjectEmphasis() for details)
  323. */
  324.  
  325.  
  326. /*@ XContainerObject :: GetTitle( XString * s)
  327. @group title
  328. @remarks Query the title of the object;
  329. @parameters XString * buffer
  330. */
  331. void XContainerObject::GetTitle(XString * s)
  332. {
  333.    *s = title;
  334. }
  335.  
  336.  
  337. SHORT EXPENTRY SortRecord(const PRECORDCORE p1, const PRECORDCORE p2, const void *)
  338. {
  339.    XContainerObject *obj1, *obj2;
  340.  
  341.    PRECORDCORE pr = (PRECORDCORE) ((PBYTE) p1 + sizeof(RECORDCORE));
  342.  
  343.    memcpy(&obj1, pr, 4);
  344.  
  345.    pr = (PRECORDCORE) ((PBYTE) p2 + sizeof(RECORDCORE));
  346.    memcpy(&obj2, pr, 4);
  347.  
  348.    return obj1->Sort(obj2);
  349. }
  350.  
  351.  
  352. /*@
  353. @class XContainerInfo
  354. @type overview
  355. @symbol _
  356. @remarks XContainerInfo is a class to set/query general attributes for a XContainerControl.
  357. To make changes to the settings:
  358. <OL COMPACT>
  359. <LI>query the current setting via XContainerControl::GetInfo()
  360. <LI>make the changes in the used instance of XContainerInfo
  361. <LI>call XContainerControl::SetInfo() with the used instance of XContainerInfo
  362. </OL>
  363. */
  364.  
  365.  
  366. /*@ XContainerInfo::XContainerInfo( char * title, LONG style)
  367. @group constructors/destructors
  368. @remarks Constructor of XContainerInfo
  369. @parameters    <t '°' c=2>
  370.                °char * theTitle           °The title of the container. Default is empty.
  371.                °LONG theStyle             °style of the container. Valid styles are:
  372. <P>CO_TEXT                  the container is in text-mode
  373. <P>CO_NAME                  the container is in name-mode
  374. <P>CO_ICON                  the container is in icon-mode
  375. <P>CO_DETAIL                the container is in detail-mode
  376. <P>CO_FLOW                  arrange objects dynamicaly (text and name mode only)
  377. <P>CO_MINI                  the container use small icons
  378. <P>CO_TREE              the container is in tree-mode
  379. <P>CO_OWNERPAINTBACKGROUND  the owner will draw the background see XBackgroundDrawEvent and XBackgroundDrawHandler)
  380. <P>CO_TREELINE              draw the tree-line in tree-mode
  381. <P>CO_DRAWBITMAP            draw icons
  382. <P>CO_DRAWICON              draw bitmaps
  383. <P>CO_TITLE                 show the container-title
  384. <P>CO_TITLELEFT             title is left-justified
  385. <P>CO_TITLERIGHT            title is right-justified
  386. <P>CO_TITLECENTER           title is centered
  387. <P>CO_TITLESEPARATOR        the title is drawn with a separator
  388. <P>CO_TITLEREADONLY         the title cannot been edited by the user
  389. <P>CO_DETAILTITLES          in detail-mode the titles of XContainerColumn are shown
  390. <P>The attributes can be or-ed, default is CO_ICON.
  391.                   </t>
  392. */
  393. XContainerInfo :: XContainerInfo(char *title, LONG style)
  394. {
  395.    memset(&cnrinfo, 0, sizeof(cnrinfo));
  396.    changes = 0;
  397.  
  398.    if (title)
  399.       SetTitle(title);
  400.    if (style)
  401.       SetAttributes(style);
  402. }
  403.  
  404.  
  405. /*@ XContainerInfo :: EnableSorting( const BOOL enable)
  406. @group misc
  407. @remarks Enables sorting records when they are inserted.
  408. @parameters    BOOL sort, set TRUE if the container items should be sorted
  409.                                          when they are inserted. Therefor you must override the
  410.                                          method XContainerObject::Sort().
  411.                                          Default is TRUE.
  412. */
  413. void XContainerInfo::EnableSorting(const BOOL enable)
  414. {
  415.    if (enable)
  416.       cnrinfo.pSortRecord = (void *) SortRecord;
  417.    else
  418.       cnrinfo.pSortRecord = NULL;
  419.    changes |= CMA_PSORTRECORD;
  420. }
  421.  
  422.  
  423. /*@ XContainerInfo :: SetAttributes( const LONG attribute )
  424. @group set/query attributes
  425. @remarks Specify here how the container should be displayed. After you have set
  426. up the XContainerInfo use XContainerColumn::SetInfo()
  427. @parameters   LONG attributes how the container should be displayed ( see XContainerInfo() )
  428. */
  429. void XContainerInfo::SetAttributes(const LONG attribute)
  430. {
  431.    cnrinfo.flWindowAttr = attribute;
  432.    changes |= CMA_FLWINDOWATTR;
  433. }
  434.  
  435.  
  436. /*@ XContainerInfo :: SetTitle( const char * t )
  437. @group set/query container title
  438. @remarks Set the title of the container.
  439. @parameters    char * theTitle
  440. */
  441. void XContainerInfo::SetTitle(const char *t)
  442. {
  443.    cnrinfo.pszCnrTitle = (PSZ) t;
  444.    changes |= CMA_CNRTITLE;
  445. }
  446.  
  447.  
  448. /*@ XContainerInfo :: EnableBackgroundPainting( const BOOL enable)
  449. @group set/query attributes
  450. @remarks Enable/disable background drawing by the application. To draw the background you must install
  451. a XBackgroundDrawHandler
  452. @parameters    BOOL enable, TRUE=enable, FALSE=disable
  453. */
  454. void XContainerInfo::EnableBackgroundPainting(const BOOL enable)
  455. {
  456.    if (enable)
  457.       cnrinfo.flWindowAttr |= CA_OWNERPAINTBACKGROUND;
  458.    else
  459.    {
  460.       if (cnrinfo.flWindowAttr & CA_OWNERPAINTBACKGROUND)
  461.          cnrinfo.flWindowAttr ^= CA_OWNERPAINTBACKGROUND;
  462.    }
  463.    changes |= CMA_FLWINDOWATTR;
  464. }
  465.  
  466.  
  467. /*@ XContainerInfo :: IsBackgroundPaintingEnabled()
  468. @group set/query attributes
  469. @remarks Query if owner-draw for the background is enabled or not.
  470. @returns BOOL  result
  471. */
  472. BOOL XContainerInfo::IsBackgroundPaintingEnabled() const
  473. {
  474.    return (cnrinfo.flWindowAttr & CA_OWNERPAINTBACKGROUND ? TRUE : FALSE);
  475. }
  476.  
  477.  
  478. /*@ XContainerInfo :: SetSplitbarColumn( const XContainerColumn * col)
  479. @group splitbar
  480. @remarks Set a splitbar in a container.
  481. @parameters    XContainerColumn * the XContainerColumn after that the splitbar will be displayed
  482. */
  483. void XContainerInfo::SetSplitbarColumn(const XContainerColumn * col)
  484. {
  485.    cnrinfo.pFieldInfoLast = col->info;
  486.    changes |= CMA_PFIELDINFOLAST;
  487. }
  488.  
  489.  
  490. /*@ XContainerInfo :: GetAttributes( void )
  491. @group set/query container title
  492. @remarks Query the attributes of the container.
  493. @returns       LONG  the attributes which are set for the container (can be or-ed). See XContainerInfo()
  494. */
  495. LONG XContainerInfo::GetAttributes(void) const
  496. {
  497.    return cnrinfo.flWindowAttr;
  498. }
  499.  
  500.  
  501. /*@ XContainerInfo :: GetTitle( XString * s )
  502. @group set/query container title
  503. @remarks Query the containers title
  504. @parameters    XString * buffer
  505. */
  506. void XContainerInfo::GetTitle(XString * s)
  507. {
  508.    char *b = s->GetBuffer((int) strlen((char *) cnrinfo.pszCnrTitle) + 1);
  509.  
  510.    strcpy(b, (char *) cnrinfo.pszCnrTitle);
  511. }
  512.  
  513.  
  514. /*@ XContainerInfo :: SetSplitbarPos( const LONG pos )
  515. @group splitbar
  516. @remarks Set the position of the splitbar of a container.
  517. @parameters    LONG the position in window-pixels
  518. */
  519. void XContainerInfo::SetSplitbarPos(const LONG pos)
  520. {
  521.    changes |= CMA_XVERTSPLITBAR;
  522.    cnrinfo.xVertSplitbar = pos;
  523. }
  524.  
  525.  
  526. /*@ XContainerInfo::GetSplitbarPos()
  527. @group splitbar
  528. @remarks Query the position of the splitbar of a container.
  529. @returns       LONG the position in window-pixels
  530. */
  531.  
  532.  
  533. /*@ XContainerInfo::SetTreeBitmapSize(const XSize * size)
  534. @group misc
  535. @remarks Set the size of the expanded and collapsed bitmaps/icons in tree-view
  536. @parameters XSize * size
  537. */
  538. void XContainerInfo::SetTreeBitmapSize(const XSize * size)
  539. {
  540.    changes |= CMA_SLTREEBITMAPORICON;
  541.    cnrinfo.slTreeBitmapOrIcon.cx = size->GetWidth();
  542.    cnrinfo.slTreeBitmapOrIcon.cy = size->GetHeight();
  543. }
  544.  
  545.  
  546. /*@ XContainerInfo::SetBitmapSize(const XSize * size)
  547. @group misc
  548. @remarks Set the size of bitmaps/icons
  549. @parameters XSize * size
  550. */
  551. void XContainerInfo::SetBitmapSize(const XSize * size)
  552. {
  553.    changes |= CMA_SLBITMAPORICON;
  554.    cnrinfo.slBitmapOrIcon.cx = size->GetWidth();
  555.    cnrinfo.slBitmapOrIcon.cy = size->GetHeight();
  556. }
  557.  
  558.  
  559. /*@ XContainerInfo :: GetBitmapSize( XSize * )
  560. @group misc
  561. @remarks Query the size of bitmaps/icons
  562. @parameters XSize * size   buffer to hold the size
  563. */
  564. void XContainerInfo::GetBitmapSize( XSize * s)
  565. {
  566.    s->SetWidth( cnrinfo.slBitmapOrIcon.cx );
  567.    s->SetHeight( cnrinfo.slBitmapOrIcon.cy );
  568. }
  569.  
  570.  
  571. /*@ XContainerInfo :: SetExpandedBitmap( const XBitmap * bmp)
  572. @group misc
  573. @remarks Replace the expanded-bitmap.
  574. @parameters XBitmap * the new bitmap
  575. */
  576. void XContainerInfo::SetExpandedBitmap(const XBitmap * bmp)
  577. {
  578.    changes |= CMA_TREEBITMAP;
  579.    cnrinfo.hbmExpanded = bmp->GetHandle();
  580. }
  581.  
  582.  
  583. /*@ XContainerInfo :: SetExpandedBitmap( const XIcon * ico)
  584. @group misc
  585. @remarks Replace the expanded-icon.
  586. @parameters XIcon * the new icon
  587. */
  588. void XContainerInfo::SetExpandedBitmap(const XIcon * ico)
  589. {
  590.    changes |= CMA_TREEICON;
  591.    cnrinfo.hptrExpanded = ico->GetHandle();
  592. }
  593.  
  594.  
  595. /*@ XContainerInfo :: SetCollapsedBitmap( const XBitmap * bmp)
  596. @group misc
  597. @remarks Replace the collapsed-bitmap.
  598. @parameters XBitmap * the new bitmap
  599. */
  600. void XContainerInfo::SetCollapsedBitmap(const XBitmap * bmp)
  601. {
  602.    changes |= CMA_TREEBITMAP;
  603.    cnrinfo.hbmCollapsed = bmp->GetHandle();
  604. }
  605.  
  606.  
  607. /*@ XContainerInfo :: SetCollapsedBitmap( const XIcon * ico)
  608. @group misc
  609. @remarks Replace the collapsed-icon.
  610. @parameters XIcon * the new icon
  611. */
  612. void XContainerInfo::SetCollapsedBitmap(const XIcon * ico)
  613. {
  614.    changes |= CMA_TREEICON;
  615.    cnrinfo.hptrCollapsed = ico->GetHandle();
  616. }
  617.  
  618.  
  619. /*@ XContainerInfo::GetObjectCount()
  620. @group misc
  621. @remarks Query the count of objects in the container.
  622. @returns LONG objectCount
  623. */
  624.  
  625.  
  626. /*@ XContainerInfo :: SetTreeLineWidth( const SHORT w)
  627. @group misc
  628. @remarks Set the width of the trees line in tree-view.
  629. @parameters SHORT width (in pixels)
  630. */
  631. void XContainerInfo::SetTreeLineWidth(const SHORT w)
  632. {
  633.    changes |= CMA_CXTREELINE;
  634.    cnrinfo.cxTreeLine = w;
  635. }
  636.  
  637.  
  638. /*@ XContainerInfo :: SetTreeLineSpacing( const SHORT w)
  639. @group misc
  640. @remarks Set the horizontal spacing between two levels in tree-view.
  641. @parameters SHORT width (in pixels)
  642. */
  643. void XContainerInfo::SetTreeLineSpacing(const SHORT w)
  644. {
  645.    changes |= CMA_CXTREEINDENT;
  646.    cnrinfo.cxTreeIndent = w;
  647. }
  648.  
  649.  
  650. /*@ XContainerInfo :: SetSpacing( const SHORT w)
  651. @group misc
  652. @remarks Set the vertical spacing between two objects.
  653. @parameters SHORT spacing (in pixels)
  654. */
  655. void XContainerInfo::SetSpacing(const SHORT w)
  656. {
  657.    changes |= CMA_LINESPACING;
  658.    cnrinfo.cyLineSpacing = w;
  659. }
  660.  
  661.  
  662. /*@ XContainerColumn::TitleEdited(const char * )
  663. @group misc
  664. @remarks This method is called if the user has edited the title of the column.
  665. Overwrite this method if you need the information
  666. @parameters char * the new Title
  667. */
  668.  
  669.  
  670. /*@ XContainerObject::TitleEdited(const char *, XContainerColumn* )
  671. @group misc
  672. @remarks This method is called if the user has edited the title of the object or the objects title of a column in detail view.
  673. Overwrite this method if you need the information
  674. @parameters
  675. <t '°' c=2>
  676. °char * °the new Title
  677. °XContainerColumn* °in detail view this parameter contains a pointer to the related column.
  678. </t>
  679. */
  680.  
  681. /*@ XContainerObject::AllocMemory( char * oldText, SHORT newTextLength, XContainerColumn* )
  682. @group misc
  683. @remarks This method is called if it is nessacary to realloc memory for objects in detail-view
  684. @parameters
  685. <t '°' c=2>
  686. °char * °the new Title
  687. °SHORT °lenght of the new text
  688. °XContainerColumn* °in detail view this parameter contains a pointer to the related column.
  689. </t>
  690. */
  691.