PageRenderTime 27ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 0ms app.codeStats 1ms

/packages/univint/src/HIDataBrowser.pas

https://github.com/slibre/freepascal
Pascal | 3927 lines | 552 code | 414 blank | 2961 comment | 0 complexity | 41ae207593f8851d27d36822a1399985 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0

Large files files are truncated, but you can click here to view the full file

   1{
   2     File:       HIToolbox/HIDataBrowser.h
   3 
   4     Contains:   API and type definitions related to Data Browser.
   5 
   6     Version:    HIToolbox-624~3
   7 
   8     Copyright:  � 1999-2008 by Apple Computer, Inc., all rights reserved.
   9 
  10     Bugs?:      For bug reports, consult the following page on
  11                 the World Wide Web:
  12 
  13                     http://www.freepascal.org/bugs.html
  14 
  15}
  16{       Initial Pascal Translation:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
  17{       Pascal Translation Updated:  Gorazd Krosl, <gorazd_1957@yahoo.ca>, October 2009 }
  18{       Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
  19{
  20    Modified for use with Free Pascal
  21    Version 308
  22    Please report any bugs to <gpc@microbizz.nl>
  23}
  24
  25{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  26{$mode macpas}
  27{$packenum 1}
  28{$macro on}
  29{$inline on}
  30{$calling mwpascal}
  31
  32unit HIDataBrowser;
  33interface
  34{$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  35{$setc GAP_INTERFACES_VERSION := $0308}
  36
  37{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  38    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  39{$endc}
  40
  41{$ifc defined CPUPOWERPC and defined CPUI386}
  42	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  43{$endc}
  44{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  45	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  46{$endc}
  47
  48{$ifc not defined __ppc__ and defined CPUPOWERPC32}
  49	{$setc __ppc__ := 1}
  50{$elsec}
  51	{$setc __ppc__ := 0}
  52{$endc}
  53{$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  54	{$setc __ppc64__ := 1}
  55{$elsec}
  56	{$setc __ppc64__ := 0}
  57{$endc}
  58{$ifc not defined __i386__ and defined CPUI386}
  59	{$setc __i386__ := 1}
  60{$elsec}
  61	{$setc __i386__ := 0}
  62{$endc}
  63{$ifc not defined __x86_64__ and defined CPUX86_64}
  64	{$setc __x86_64__ := 1}
  65{$elsec}
  66	{$setc __x86_64__ := 0}
  67{$endc}
  68{$ifc not defined __arm__ and defined CPUARM}
  69	{$setc __arm__ := 1}
  70{$elsec}
  71	{$setc __arm__ := 0}
  72{$endc}
  73
  74{$ifc defined cpu64}
  75  {$setc __LP64__ := 1}
  76{$elsec}
  77  {$setc __LP64__ := 0}
  78{$endc}
  79
  80
  81{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  82	{$error Conflicting definitions for __ppc__ and __i386__}
  83{$endc}
  84
  85{$ifc defined __ppc__ and __ppc__}
  86	{$setc TARGET_CPU_PPC := TRUE}
  87	{$setc TARGET_CPU_PPC64 := FALSE}
  88	{$setc TARGET_CPU_X86 := FALSE}
  89	{$setc TARGET_CPU_X86_64 := FALSE}
  90	{$setc TARGET_CPU_ARM := FALSE}
  91	{$setc TARGET_OS_MAC := TRUE}
  92	{$setc TARGET_OS_IPHONE := FALSE}
  93	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
  94	{$setc TARGET_OS_EMBEDDED := FALSE}
  95{$elifc defined __ppc64__ and __ppc64__}
  96	{$setc TARGET_CPU_PPC := FALSE}
  97	{$setc TARGET_CPU_PPC64 := TRUE}
  98	{$setc TARGET_CPU_X86 := FALSE}
  99	{$setc TARGET_CPU_X86_64 := FALSE}
 100	{$setc TARGET_CPU_ARM := FALSE}
 101	{$setc TARGET_OS_MAC := TRUE}
 102	{$setc TARGET_OS_IPHONE := FALSE}
 103	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 104	{$setc TARGET_OS_EMBEDDED := FALSE}
 105{$elifc defined __i386__ and __i386__}
 106	{$setc TARGET_CPU_PPC := FALSE}
 107	{$setc TARGET_CPU_PPC64 := FALSE}
 108	{$setc TARGET_CPU_X86 := TRUE}
 109	{$setc TARGET_CPU_X86_64 := FALSE}
 110	{$setc TARGET_CPU_ARM := FALSE}
 111{$ifc defined(iphonesim)}
 112 	{$setc TARGET_OS_MAC := FALSE}
 113	{$setc TARGET_OS_IPHONE := TRUE}
 114	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
 115{$elsec}
 116	{$setc TARGET_OS_MAC := TRUE}
 117	{$setc TARGET_OS_IPHONE := FALSE}
 118	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 119{$endc}
 120	{$setc TARGET_OS_EMBEDDED := FALSE}
 121{$elifc defined __x86_64__ and __x86_64__}
 122	{$setc TARGET_CPU_PPC := FALSE}
 123	{$setc TARGET_CPU_PPC64 := FALSE}
 124	{$setc TARGET_CPU_X86 := FALSE}
 125	{$setc TARGET_CPU_X86_64 := TRUE}
 126	{$setc TARGET_CPU_ARM := FALSE}
 127	{$setc TARGET_OS_MAC := TRUE}
 128	{$setc TARGET_OS_IPHONE := FALSE}
 129	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 130	{$setc TARGET_OS_EMBEDDED := FALSE}
 131{$elifc defined __arm__ and __arm__}
 132	{$setc TARGET_CPU_PPC := FALSE}
 133	{$setc TARGET_CPU_PPC64 := FALSE}
 134	{$setc TARGET_CPU_X86 := FALSE}
 135	{$setc TARGET_CPU_X86_64 := FALSE}
 136	{$setc TARGET_CPU_ARM := TRUE}
 137	{ will require compiler define when/if other Apple devices with ARM cpus ship }
 138	{$setc TARGET_OS_MAC := FALSE}
 139	{$setc TARGET_OS_IPHONE := TRUE}
 140	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 141	{$setc TARGET_OS_EMBEDDED := TRUE}
 142{$elsec}
 143	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
 144{$endc}
 145
 146{$ifc defined __LP64__ and __LP64__ }
 147  {$setc TARGET_CPU_64 := TRUE}
 148{$elsec}
 149  {$setc TARGET_CPU_64 := FALSE}
 150{$endc}
 151
 152{$ifc defined FPC_BIG_ENDIAN}
 153	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
 154	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 155{$elifc defined FPC_LITTLE_ENDIAN}
 156	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
 157	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 158{$elsec}
 159	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 160{$endc}
 161{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 162{$setc CALL_NOT_IN_CARBON := FALSE}
 163{$setc OLDROUTINENAMES := FALSE}
 164{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 165{$setc OPAQUE_UPP_TYPES := TRUE}
 166{$setc OTCARBONAPPLICATION := TRUE}
 167{$setc OTKERNEL := FALSE}
 168{$setc PM_USE_SESSION_APIS := TRUE}
 169{$setc TARGET_API_MAC_CARBON := TRUE}
 170{$setc TARGET_API_MAC_OS8 := FALSE}
 171{$setc TARGET_API_MAC_OSX := TRUE}
 172{$setc TARGET_CARBON := TRUE}
 173{$setc TARGET_CPU_68K := FALSE}
 174{$setc TARGET_CPU_MIPS := FALSE}
 175{$setc TARGET_CPU_SPARC := FALSE}
 176{$setc TARGET_OS_UNIX := FALSE}
 177{$setc TARGET_OS_WIN32 := FALSE}
 178{$setc TARGET_RT_MAC_68881 := FALSE}
 179{$setc TARGET_RT_MAC_CFM := FALSE}
 180{$setc TARGET_RT_MAC_MACHO := TRUE}
 181{$setc TYPED_FUNCTION_POINTERS := TRUE}
 182{$setc TYPE_BOOL := FALSE}
 183{$setc TYPE_EXTENDED := FALSE}
 184{$setc TYPE_LONGLONG := TRUE}
 185uses MacTypes,TextEdit,AXUIElement,AEDataModel,CFBase,Events,QuickdrawTypes,IconsCore,Icons,CFData,CFDictionary,DateTimeUtils,Drag,TextCommon,Appearance,CarbonEvents,Controls,Lists,MacHelp,Menus,CFString,CGBase,HIObject;
 186{$endc} {not MACOSALLINCLUDE}
 187
 188
 189{$ifc TARGET_OS_MAC}
 190
 191
 192{��������������������������������������������������������������������������������������}
 193{    � DATA BROWSER                                                                    }
 194{     (CDEF 29)                                                                        }
 195{��������������������������������������������������������������������������������������}
 196{  This control implements a user interface component for browsing (optionally)        }
 197{  hiearchical data structures. The browser supports multiple presentation styles      }
 198{  including, but not limited to:                                                      }
 199{      kDataBrowserListView   - items and item properties in                           }
 200{                               multi-column (optionally outline) format               }
 201{      kDataBrowserColumnView - in-place browsing using fixed navigation columns       }
 202{  The browser manages all view styles through a single high-level interface.          }
 203{  The high-level interface makes the following assumptions:                           }
 204{      - Items have unique 32-bit identifiers (0 is reserved)                          }
 205{      - Items have two kinds of named and typed properties:                           }
 206{           - Predefined attribute properties ( < 1024 )                               }
 207{             (including some display properties)                                      }
 208{           - Client-defined display properties ( >= 1024 )                            }
 209{      - Some items are containers of other items                                      }
 210{      - Items may be sorted by any property                                           }
 211{  Because a browser doesn't know all details about the type of objects it manages,    }
 212{  some implementation responsibility is best handled by its client. The client must   }
 213{  provide a set of callback routines which define the item hierarchy and help to      }
 214{  populate the browser with items. The client may also provide callbacks for handling }
 215{  custom data types and doing low-level event management.                             }
 216{  The API is subdivided into a "universal" set of routines that applies to all view   }
 217{  styles, and a set of routines unique to each view style. kDataBrowserListView and   }
 218{  kDataBrowserColumnView share an (internal) TableView abstract base class. The       }
 219{  TableView formatting options and API applies to both of these view styles.          }
 220{  NOTE: This control is only available with CarbonLib 1.1.                            }
 221{  NOTE: This control must be created with the CreateDataBrowserControl API in         }
 222{        CarbonLib 1.1 through 1.4. In Mac OS X and CarbonLib 1.5 and later, you       }
 223{        may use the control's procID (29) to create the control with NewControl       }
 224{        or with a 'CNTL' resource.                                                    }
 225{ The HIObject class ID for the HIDataBrowser class. }
 226
 227
 228{$ALIGN MAC68K}
 229
 230{$ifc USE_CFSTR_CONSTANT_MACROS}
 231{$definec kHIDataBrowserClassID CFSTRP('com.apple.HIDataBrowser')}
 232{$endc}
 233{ Control Kind Tag }
 234const
 235	kControlKindDataBrowser = FourCharCode('datb');
 236
 237{ Error Codes }
 238const
 239	errDataBrowserNotConfigured = -4970;
 240	errDataBrowserItemNotFound = -4971;
 241	errDataBrowserItemNotAdded = -4975;
 242	errDataBrowserPropertyNotFound = -4972;
 243	errDataBrowserInvalidPropertyPart = -4973;
 244	errDataBrowserInvalidPropertyData = -4974;
 245	errDataBrowserPropertyNotSupported = -4979; { Return from DataBrowserGetSetItemDataProc }
 246
 247const
 248{ Generic Control Tags }
 249	kControlDataBrowserIncludesFrameAndFocusTag = FourCharCode('brdr'); { Boolean }
 250	kControlDataBrowserKeyFilterTag = kControlKeyFilterTag;
 251	kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag;
 252	kControlDataBrowserEditTextValidationProcTag = FourCharCode('vali'); { ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc.}
 253
 254{ Data Browser View Styles }
 255type
 256	DataBrowserViewStyle = OSType;
 257const
 258	kDataBrowserNoView = $3F3F3F3F; { Error State }
 259	kDataBrowserListView = FourCharCode('lstv');
 260	kDataBrowserColumnView = FourCharCode('clmv');
 261
 262{ Selection Flags }
 263type
 264	DataBrowserSelectionFlags = UInt32;
 265const
 266	kDataBrowserDragSelect = 1 shl 0; { � ListMgr lNoRect }
 267	kDataBrowserSelectOnlyOne = 1 shl 1; { � ListMgr lOnlyOne }
 268	kDataBrowserResetSelection = 1 shl 2; { � ListMgr lNoExtend }
 269	kDataBrowserCmdTogglesSelection = 1 shl 3; { � ListMgr lUseSense }
 270	kDataBrowserNoDisjointSelection = 1 shl 4; { � ListMgr lNoDisjoint }
 271	kDataBrowserAlwaysExtendSelection = 1 shl 5; { � ListMgr lExtendDrag }
 272	kDataBrowserNeverEmptySelectionSet = 1 shl 6; { � ListMgr lNoNilHilite }
 273
 274{ Data Browser Sorting }
 275type
 276	DataBrowserSortOrder = UInt16;
 277const
 278	kDataBrowserOrderUndefined = 0;    { Not currently supported }
 279	kDataBrowserOrderIncreasing = 1;
 280	kDataBrowserOrderDecreasing = 2;
 281
 282{ Data Browser Item Management }
 283type
 284	DataBrowserItemID = UNSIGNEDLONG;
 285	DataBrowserItemIDPtr = ^DataBrowserItemID;
 286const
 287	kDataBrowserNoItem = 0;     { Reserved DataBrowserItemID }
 288
 289type
 290	DataBrowserItemState = UInt32;
 291const
 292	kDataBrowserItemNoState = 0;
 293	kDataBrowserItemAnyState = $FFFFFFFF;
 294	kDataBrowserItemIsSelected = 1 shl 0;
 295	kDataBrowserContainerIsOpen = 1 shl 1;
 296	kDataBrowserItemIsDragTarget = 1 shl 2; { During a drag operation }
 297
 298{ Options for use with RevealDataBrowserItem }
 299type
 300	DataBrowserRevealOptions = UInt8;
 301const
 302	kDataBrowserRevealOnly = 0;
 303	kDataBrowserRevealAndCenterInView = 1 shl 0;
 304	kDataBrowserRevealWithoutSelecting = 1 shl 1;
 305
 306{ Set operations for use with SetDataBrowserSelectedItems }
 307type
 308	DataBrowserSetOption = UInt32;
 309const
 310	kDataBrowserItemsAdd = 0;    { add specified items to existing set }
 311	kDataBrowserItemsAssign = 1;    { assign destination set to specified items }
 312	kDataBrowserItemsToggle = 2;    { toggle membership state of specified items }
 313	kDataBrowserItemsRemove = 3;     { remove specified items from existing set }
 314
 315{ Commands for use with MoveDataBrowserSelectionAnchor }
 316type
 317	DataBrowserSelectionAnchorDirection = UInt32;
 318const
 319	kDataBrowserSelectionAnchorUp = 0;
 320	kDataBrowserSelectionAnchorDown = 1;
 321	kDataBrowserSelectionAnchorLeft = 2;
 322	kDataBrowserSelectionAnchorRight = 3;
 323
 324{ Edit menu command IDs for use with Enable/ExecuteDataBrowserEditCommand }
 325type
 326	DataBrowserEditCommand = UInt32;
 327const
 328	kDataBrowserEditMsgUndo = kHICommandUndo;
 329	kDataBrowserEditMsgRedo = kHICommandRedo;
 330	kDataBrowserEditMsgCut = kHICommandCut;
 331	kDataBrowserEditMsgCopy = kHICommandCopy;
 332	kDataBrowserEditMsgPaste = kHICommandPaste;
 333	kDataBrowserEditMsgClear = kHICommandClear;
 334	kDataBrowserEditMsgSelectAll = kHICommandSelectAll;
 335
 336{ Notifications used in DataBrowserItemNotificationProcPtr }
 337type
 338	DataBrowserItemNotification = UInt32;
 339const
 340	kDataBrowserItemAdded = 1;    { The specified item has been added to the browser }
 341	kDataBrowserItemRemoved = 2;    { The specified item has been removed from the browser }
 342	kDataBrowserEditStarted = 3;    { Starting an EditText session for specified item }
 343	kDataBrowserEditStopped = 4;    { Stopping an EditText session for specified item }
 344	kDataBrowserItemSelected = 5;    { Item has just been added to the selection set }
 345	kDataBrowserItemDeselected = 6;    { Item has just been removed from the selection set }
 346	kDataBrowserItemDoubleClicked = 7;
 347	kDataBrowserContainerOpened = 8;    { Container is open }
 348	kDataBrowserContainerClosing = 9;    { Container is about to close (and will real soon now, y'all) }
 349	kDataBrowserContainerClosed = 10;   { Container is closed (y'all come back now!) }
 350	kDataBrowserContainerSorting = 11;   { Container is about to be sorted (lock any volatile properties) }
 351	kDataBrowserContainerSorted = 12;   { Container has been sorted (you may release any property locks) }
 352	kDataBrowserUserToggledContainer = 16; { _User_ requested container open/close state to be toggled }
 353	kDataBrowserTargetChanged = 15;   { The target has changed to the specified item }
 354	kDataBrowserUserStateChanged = 13;   { The user has reformatted the view for the target }
 355	kDataBrowserSelectionSetChanged = 14;  { The selection set has been modified (net result may be the same) }
 356
 357
 358{
 359 *  DataBrowserPropertyID
 360 *  
 361 *  Discussion:
 362 *    Properties with values 0 through 1023 are reserved for Apple's
 363 *    use. Values greater than or equal to 1024 are for client use.
 364 }
 365const
 366{ Predefined attribute properties, optional & non-display unless otherwise stated }
 367	kDataBrowserItemNoProperty = 0;    { The anti-property (no associated data) }
 368	kDataBrowserItemIsActiveProperty = 1; { Boolean typed data (defaults to true) }
 369	kDataBrowserItemIsSelectableProperty = 2; { Boolean typed data (defaults to true) }
 370	kDataBrowserItemIsEditableProperty = 3; { Boolean typed data (defaults to false, used for editable properties) }
 371	kDataBrowserItemIsContainerProperty = 4; { Boolean typed data (defaults to false) }
 372	kDataBrowserContainerIsOpenableProperty = 5; { Boolean typed data (defaults to true) }
 373	kDataBrowserContainerIsClosableProperty = 6; { Boolean typed data (defaults to true) }
 374	kDataBrowserContainerIsSortableProperty = 7; { Boolean typed data (defaults to true) }
 375	kDataBrowserItemSelfIdentityProperty = 8; { kDataBrowserIconAndTextType (display property; ColumnView only) }
 376
 377  {
 378   * kDataBrowserContainerAliasIDProperty is sent to your
 379   * DataBrowserItemDataProcPtr callback to give you a chance to follow
 380   * an alias or symlink that the item might represent. If the incoming
 381   * item is an alias to another item, you can call
 382   * SetDataBrowserItemDataItemID to let Data Browser know which other
 383   * item the incoming item points to. 
 384   * 
 385   * This is only sent from column view, and your support for it is
 386   * optional. It allows Data Browser to be more memory efficient with
 387   * its internal storage. If a given container item is an alias to an
 388   * item whose contents are already displayed in an existing column
 389   * view column, the contents can be shared between those two columns.
 390   }
 391	kDataBrowserContainerAliasIDProperty = 9; { DataBrowserItemID (alias/symlink an item to a container item) }
 392
 393  {
 394   * kDataBrowserColumnViewPreviewProperty is sent to various callbacks
 395   * to give you a chance to draw or track in the preview column of
 396   * column view. 
 397   * 
 398   * You can also pass kDataBrowserColumnViewPreviewProperty in the
 399   * property parameter of RevealDataBrowserItem in conjunction with
 400   * the appropriate DataBrowserItemID of the item whose preview is
 401   * being displayed when you want to make sure the preview column is
 402   * visible to the user. 
 403   * 
 404   * kDataBrowserColumnViewPreviewProperty is only supported in column
 405   * view.
 406   }
 407	kDataBrowserColumnViewPreviewProperty = 10; { kDataBrowserCustomType (display property; ColumnView only) }
 408
 409  {
 410   * kDataBrowserItemParentContainerProperty is sent to your
 411   * DataBrowserItemDataProcPtr callback when Data Browser needs to
 412   * know the parent container item for a given item. 
 413   * 
 414   * In column view, this allows the internals of SetDataBrowserTarget
 415   * to work. The target is the container whose contents you wish to
 416   * display, which is the rightmost column in column view. However,
 417   * unlike SetDataBrowserColumnViewPath, SetDataBrowserTarget doesn't
 418   * offer a way for you to communicate the DataBrowserItemIDs of the
 419   * rest of the column containers, so SetDataBrowserTarget needs to
 420   * ask for them explicitly by asking for the container's parent, then
 421   * the container's parent's parent, and so on. 
 422   * 
 423   * In list view, this allows you to pass a non-container to
 424   * SetDataBrowserTarget. In this situation, Data Browser will ask you
 425   * for the parent of the target so it knows which container to
 426   * display the contents of in the list view. 
 427   * 
 428   * In both list and column views, your DataBrowserItemDataProcPtr
 429   * callback might be called with
 430   * kDataBrowserItemParentContainerProperty at a variety of other
 431   * times, so you should be sure to support this property if your Data
 432   * Browser displays a containment hierarchy.
 433   }
 434	kDataBrowserItemParentContainerProperty = 11; { DataBrowserItemID (the parent of the specified item, used by ColumnView) }
 435
 436type
 437	DataBrowserPropertyID = UNSIGNEDLONG;
 438{ DataBrowser Property Types (for display properties; i.e. ListView columns) }
 439{      These are primarily presentation types (or styles) although         }
 440{      they also imply a particular set of primitive types or structures.  }
 441type
 442	DataBrowserPropertyType = OSType;
 443const
 444{ == Corresponding data type or structure == }
 445	kDataBrowserCustomType = $3F3F3F3F; { No associated data, custom callbacks used }
 446	kDataBrowserIconType = FourCharCode('icnr'); { IconRef, IconTransformType, RGBColor }
 447	kDataBrowserTextType = FourCharCode('text'); { CFStringRef }
 448	kDataBrowserDateTimeType = FourCharCode('date'); { DateTime or LongDateTime }
 449	kDataBrowserSliderType = FourCharCode('sldr'); { Min, Max, Value }
 450	kDataBrowserCheckboxType = FourCharCode('chbx'); { ThemeButtonValue }
 451	kDataBrowserProgressBarType = FourCharCode('prog'); { Min, Max, Value }
 452	kDataBrowserRelevanceRankType = FourCharCode('rank'); { Min, Max, Value }
 453	kDataBrowserPopupMenuType = FourCharCode('menu'); { MenuRef, Value }
 454	kDataBrowserIconAndTextType = FourCharCode('ticn'); { IconRef, CFStringRef, etc }
 455
 456{ DataBrowser Property Parts }
 457{      Visual components of a property type.      }
 458{      For use with GetDataBrowserItemPartBounds. }
 459type
 460	DataBrowserPropertyPart = OSType;
 461const
 462	kDataBrowserPropertyEnclosingPart = 0;
 463	kDataBrowserPropertyContentPart = FourCharCode('----');
 464	kDataBrowserPropertyDisclosurePart = FourCharCode('disc');
 465	kDataBrowserPropertyTextPart = kDataBrowserTextType;
 466	kDataBrowserPropertyIconPart = kDataBrowserIconType;
 467	kDataBrowserPropertySliderPart = kDataBrowserSliderType;
 468	kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType;
 469	kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType;
 470	kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType;
 471
 472{ Modify appearance/behavior of display properties }
 473type
 474	DataBrowserPropertyFlags = UInt32;
 475{ Low 8 bits apply to all property types }
 476const
 477	kDataBrowserUniversalPropertyFlagsMask = $FF;
 478	kDataBrowserPropertyIsMutable = 1 shl 0;
 479	kDataBrowserDefaultPropertyFlags = 0 shl 0;
 480	kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask; { support for an old name}
 481	kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable; { support for an old name}
 482
 483{ Next 8 bits contain property-specific modifiers }
 484
 485{
 486 *  Summary:
 487 *    Data Browser Property Flags
 488 }
 489const
 490	kDataBrowserPropertyFlagsOffset = 8;
 491	kDataBrowserPropertyFlagsMask = $FF shl kDataBrowserPropertyFlagsOffset;
 492	kDataBrowserCheckboxTriState = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserCheckboxType}
 493	kDataBrowserDateTimeRelative = 1 shl (kDataBrowserPropertyFlagsOffset); { kDataBrowserDateTimeType }
 494	kDataBrowserDateTimeDateOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 1); { kDataBrowserDateTimeType }
 495	kDataBrowserDateTimeTimeOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 2); { kDataBrowserDateTimeType }
 496	kDataBrowserDateTimeSecondsToo = 1 shl (kDataBrowserPropertyFlagsOffset + 3); { kDataBrowserDateTimeType }
 497	kDataBrowserSliderPlainThumb = kThemeThumbPlain shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
 498	kDataBrowserSliderUpwardThumb = kThemeThumbUpward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
 499	kDataBrowserSliderDownwardThumb = kThemeThumbDownward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
 500	kDataBrowserDoNotTruncateText = 3 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
 501	kDataBrowserTruncateTextAtEnd = 2 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
 502	kDataBrowserTruncateTextMiddle = 0 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
 503	kDataBrowserTruncateTextAtStart = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
 504
 505  {
 506   * This flag is only for use with columns of type
 507   * kDataBrowserPopupMenuType. This flag indicates that the popup be
 508   * drawn in a sleek buttonless fashion. The text will be drawn next
 509   * to a popup glyph, and the whole cell will be clickable. Available
 510   * on 10.4 and later.
 511   }
 512	kDataBrowserPopupMenuButtonless = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserPopupMenuType}
 513	kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask; { support for an old name}
 514	kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative; { support for an old name}
 515
 516{
 517   Next 8 bits contain viewStyle-specific modifiers 
 518   See individual ViewStyle sections below for flag definitions 
 519}
 520const
 521	kDataBrowserViewSpecificFlagsOffset = 16;
 522	kDataBrowserViewSpecificFlagsMask = $FF shl kDataBrowserViewSpecificFlagsOffset;
 523	kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask; { support for an old name}
 524
 525{ High 8 bits are reserved for client application use }
 526const
 527	kDataBrowserClientPropertyFlagsOffset = 24;
 528	kDataBrowserClientPropertyFlagsMask = $FF shl kDataBrowserClientPropertyFlagsOffset;
 529
 530{ Client defined property description }
 531type
 532	DataBrowserPropertyDescPtr = ^DataBrowserPropertyDesc;
 533	DataBrowserPropertyDesc = record
 534		propertyID: DataBrowserPropertyID;
 535		propertyType: DataBrowserPropertyType;
 536		propertyFlags: DataBrowserPropertyFlags;
 537	end;
 538{ Callback definition for use with ForEachDataBrowserItem }
 539type
 540	DataBrowserItemProcPtr = procedure( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr );
 541	DataBrowserItemUPP = DataBrowserItemProcPtr;
 542{
 543 *  NewDataBrowserItemUPP()
 544 *  
 545 *  Availability:
 546 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 547 *    CarbonLib:        in CarbonLib 1.1 and later
 548 *    Non-Carbon CFM:   not available
 549 }
 550function NewDataBrowserItemUPP( userRoutine: DataBrowserItemProcPtr ): DataBrowserItemUPP; external name '_NewDataBrowserItemUPP';
 551(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 552
 553{
 554 *  DisposeDataBrowserItemUPP()
 555 *  
 556 *  Availability:
 557 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 558 *    CarbonLib:        in CarbonLib 1.1 and later
 559 *    Non-Carbon CFM:   not available
 560 }
 561procedure DisposeDataBrowserItemUPP( userUPP: DataBrowserItemUPP ); external name '_DisposeDataBrowserItemUPP';
 562(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 563
 564{
 565 *  InvokeDataBrowserItemUPP()
 566 *  
 567 *  Availability:
 568 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 569 *    CarbonLib:        in CarbonLib 1.1 and later
 570 *    Non-Carbon CFM:   not available
 571 }
 572procedure InvokeDataBrowserItemUPP( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr; userUPP: DataBrowserItemUPP ); external name '_InvokeDataBrowserItemUPP';
 573(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 574
 575{ Creation/Configuration }
 576{$ifc not TARGET_CPU_64}
 577{
 578 *  CreateDataBrowserControl()
 579 *  
 580 *  Mac OS X threading:
 581 *    Not thread safe
 582 *  
 583 *  Availability:
 584 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 585 *    CarbonLib:        in CarbonLib 1.1 and later
 586 *    Non-Carbon CFM:   not available
 587 }
 588function CreateDataBrowserControl( window: WindowRef; const (*var*) boundsRect: Rect; style: DataBrowserViewStyle; var outControl: ControlRef ): OSStatus; external name '_CreateDataBrowserControl';
 589(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 590
 591
 592{
 593 *  GetDataBrowserViewStyle()
 594 *  
 595 *  Mac OS X threading:
 596 *    Not thread safe
 597 *  
 598 *  Availability:
 599 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 600 *    CarbonLib:        in CarbonLib 1.1 and later
 601 *    Non-Carbon CFM:   not available
 602 }
 603function GetDataBrowserViewStyle( browser: ControlRef; var style: DataBrowserViewStyle ): OSStatus; external name '_GetDataBrowserViewStyle';
 604(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 605
 606
 607{
 608 *  SetDataBrowserViewStyle()
 609 *  
 610 *  Mac OS X threading:
 611 *    Not thread safe
 612 *  
 613 *  Availability:
 614 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 615 *    CarbonLib:        in CarbonLib 1.1 and later
 616 *    Non-Carbon CFM:   not available
 617 }
 618function SetDataBrowserViewStyle( browser: ControlRef; style: DataBrowserViewStyle ): OSStatus; external name '_SetDataBrowserViewStyle';
 619(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 620
 621
 622{$endc} {not TARGET_CPU_64}
 623
 624
 625{
 626 *  Summary:
 627 *    Data Browser attributes
 628 *  
 629 *  Discussion:
 630 *    For use with DataBrowserChangeAttributes and
 631 *    DataBrowserGetAttributes. Available in Mac OS X 10.4 and later.
 632 }
 633const
 634{
 635   * A constant with value zero; the lack of any attributes.
 636   }
 637	kDataBrowserAttributeNone = 0;
 638
 639  {
 640   * In Column View, this Data Browser is allowed to resize the owning
 641   * window whenever necessary. This includes, but is not necessarily
 642   * limited to, situations where column resize operations need more
 643   * visible space in the window. If you turn this attribute on, your
 644   * window must tolerate being resized behind your app's back. If your
 645   * window needs to react to bounds changes, use a
 646   * kEventWindowBoundsChanged event handler. If you need to constrain
 647   * your window's minimum and maximum bounds, use
 648   * kEventWindowGetMinimum/MaximumSize handlers, the
 649   * SetWindowResizeLimits API, or something similar.
 650   }
 651	kDataBrowserAttributeColumnViewResizeWindow = 1 shl 0;
 652
 653  {
 654   * In List View, this Data Browser should draw alternating row
 655   * background colors.
 656   }
 657	kDataBrowserAttributeListViewAlternatingRowColors = 1 shl 1;
 658
 659  {
 660   * In List View, this Data Browser should draw a vertical line
 661   * between the columns.
 662   }
 663	kDataBrowserAttributeListViewDrawColumnDividers = 1 shl 2;
 664
 665  {
 666   * Whether the Data Browser should hide scroll bar when they are not
 667   * necessary, and use the additional space to draw more content. By
 668   * default this attribute is turned off. This attribute is available
 669   * on Mac OS X 10.5 and later. 
 670   * As of Mac OS X 10.5, this is only respected in list view, but it
 671   * may be respected in column view in the future. If you set this now
 672   * for a Data Browser instance that uses column view, you must be
 673   * prepared for the scroll bars to auto hide in the future. This
 674   * attribute is only respected in compositing mode; it will be
 675   * ignored in non-compositing mode. 
 676   * When this attribute is turned on for a Data Browser instance that
 677   * is allowed to use both horizontal and vertical scroll bars (see
 678   * SetDataBrowserHasScrollBars), the Data Browser will attempt to use
 679   * the square space at the bottom right of the scroll bar area
 680   * whenever necessary. In other words, when the vertical scroll bar
 681   * is not necessary, the Data Browser will stretch the horizontal
 682   * scroll bar across the entire width. If your code needs Data
 683   * Browser to *not* use that square space - possibly because your
 684   * window's grow box will overlap that area - you should also turn on
 685   * the kDataBrowserAttributeReserveGrowBoxSpace attribute whenever
 686   * you turn on scroll bar auto hiding.
 687   }
 688	kDataBrowserAttributeAutoHideScrollBars = 1 shl 3;
 689
 690  {
 691   * Whether the Data Browser should avoid positioning either of its
 692   * scroll bars such that they overlap the very bottom right of the
 693   * content area, where you'd typically have a grow box. By default,
 694   * this attribute is turned off. This attribute is available on Mac
 695   * OS X 10.5 and later.
 696   }
 697	kDataBrowserAttributeReserveGrowBoxSpace = 1 shl 4;
 698
 699{$ifc not TARGET_CPU_64}
 700{
 701 *  DataBrowserChangeAttributes()
 702 *  
 703 *  Summary:
 704 *    Set the attributes for the given Data Browser.
 705 *  
 706 *  Mac OS X threading:
 707 *    Not thread safe
 708 *  
 709 *  Parameters:
 710 *    
 711 *    inDataBrowser:
 712 *      The Data Browser whose attributes to change.
 713 *    
 714 *    inAttributesToSet:
 715 *      The attributes to set.
 716 *    
 717 *    inAttributesToClear:
 718 *      The attributes to clear.
 719 *  
 720 *  Result:
 721 *    An operating system status code.
 722 *  
 723 *  Availability:
 724 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 725 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 726 *    Non-Carbon CFM:   not available
 727 }
 728function DataBrowserChangeAttributes( inDataBrowser: ControlRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_DataBrowserChangeAttributes';
 729(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 730
 731
 732{
 733 *  DataBrowserGetAttributes()
 734 *  
 735 *  Summary:
 736 *    Returns the attributes of a given Data Browser.
 737 *  
 738 *  Mac OS X threading:
 739 *    Not thread safe
 740 *  
 741 *  Parameters:
 742 *    
 743 *    inDataBrowser:
 744 *      The Data Browser whose attributes to query.
 745 *    
 746 *    outAttributes:
 747 *      On exit, will contain the attributes of the Data Browser. This
 748 *      parameter cannot be NULL.
 749 *  
 750 *  Result:
 751 *    An operating system status code.
 752 *  
 753 *  Availability:
 754 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 755 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 756 *    Non-Carbon CFM:   not available
 757 }
 758function DataBrowserGetAttributes( inDataBrowser: ControlRef; var outAttributes: OptionBits ): OSStatus; external name '_DataBrowserGetAttributes';
 759(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 760
 761
 762{$endc} {not TARGET_CPU_64}
 763
 764
 765{
 766 *  Summary:
 767 *    DataBrowserMetric values
 768 *  
 769 *  Discussion:
 770 *    For use with DataBrowserSetMetric.
 771 }
 772const
 773{
 774   * The content (icon, text, etc.) within a cell is drawn a certain
 775   * amount in from the left & right edges of the cell. This metric
 776   * governs the amount of inset.
 777   }
 778	kDataBrowserMetricCellContentInset = 1;
 779
 780  {
 781   * This metric controls the space between the icon and text within a
 782   * column of type kDataBrowserIconAndTextType.
 783   }
 784	kDataBrowserMetricIconAndTextGap = 2;
 785
 786  {
 787   * In List View only, this metric is similar to
 788   * kDataBrowserMetricCellContentInset, but it only affects the
 789   * disclosure column and it only affects the side of the cell that
 790   * displays the disclosure triangle. In other words, this metric is
 791   * used instead of (not in addition to)
 792   * DataBrowserMetricCellContentInset for one side of the disclosure
 793   * column.
 794   }
 795	kDataBrowserMetricDisclosureColumnEdgeInset = 3;
 796
 797  {
 798   * In List View only, this metric controls the amount of space
 799   * between the disclosure triangle and the cell's content.
 800   }
 801	kDataBrowserMetricDisclosureTriangleAndContentGap = 4;
 802
 803  {
 804   * In List View only, this metric controls the amount of space in the
 805   * disclosure column for each level of indentation in progressively
 806   * deeper hierarchies of disclosed items.
 807   }
 808	kDataBrowserMetricDisclosureColumnPerDepthGap = 5;
 809	kDataBrowserMetricLast = kDataBrowserMetricDisclosureColumnPerDepthGap;
 810
 811
 812type
 813	DataBrowserMetric = UInt32;
 814{$ifc not TARGET_CPU_64}
 815{
 816 *  DataBrowserSetMetric()
 817 *  
 818 *  Summary:
 819 *    Sets a value for a specified Data Browser metric.
 820 *  
 821 *  Mac OS X threading:
 822 *    Not thread safe
 823 *  
 824 *  Parameters:
 825 *    
 826 *    inDataBrowser:
 827 *      The Data Browser instance whose metric is being changed.
 828 *    
 829 *    inMetric:
 830 *      The DataBrowserMetric whose value is being changed.
 831 *    
 832 *    inUseDefaultValue:
 833 *      A Boolean indicating whether you want the Data Browser instance
 834 *      to revert to the default value for the metric. If you pass
 835 *      true, inValue will be ignored and a suitable default value will
 836 *      be used. If you pass false, inValue will be used as the value
 837 *      of the metric.
 838 *    
 839 *    inValue:
 840 *      When you pass false for inUseDefaultValue, this parameter is
 841 *      the value to use for the metric.
 842 *  
 843 *  Result:
 844 *    An operating system status code. If the incoming ControlRef isn't
 845 *    a Data Browser instance, or if the incoming metric isn't known,
 846 *    this function will return paramErr.
 847 *  
 848 *  Availability:
 849 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 850 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 851 *    Non-Carbon CFM:   not available
 852 }
 853function DataBrowserSetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; inUseDefaultValue: Boolean; inValue: CGFloat ): OSStatus; external name '_DataBrowserSetMetric';
 854(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 855
 856
 857{
 858 *  DataBrowserGetMetric()
 859 *  
 860 *  Summary:
 861 *    Gets the value for a specified Data Browser metric.
 862 *  
 863 *  Mac OS X threading:
 864 *    Not thread safe
 865 *  
 866 *  Parameters:
 867 *    
 868 *    inDataBrowser:
 869 *      The Data Browser instance whose metric value to get.
 870 *    
 871 *    inMetric:
 872 *      The DataBrowserMetric value to get.
 873 *    
 874 *    outUsingDefaultValue:
 875 *      On exit, this is a Boolean indicating whether the metric's
 876 *      value is determined by Data Browser's default values. You may
 877 *      pass NULL if you don't need this information.
 878 *    
 879 *    outValue:
 880 *      On exit, this is the value of the metric.
 881 *  
 882 *  Result:
 883 *    An operating system status code. If the incoming ControlRef isn't
 884 *    a Data Browser instance, or if the incoming metric isn't known,
 885 *    this function will return paramErr.
 886 *  
 887 *  Availability:
 888 *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
 889 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 890 *    Non-Carbon CFM:   not available
 891 }
 892function DataBrowserGetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; outUsingDefaultValue: BooleanPtr { can be NULL }; var outValue: CGFloat ): OSStatus; external name '_DataBrowserGetMetric';
 893(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 894
 895
 896{ Item Manipulation }
 897{ Passing NULL for "items" argument to RemoveDataBrowserItems and }
 898{ UpdateDataBrowserItems refers to all items in the specified container. }
 899{ Passing NULL for "items" argument to AddDataBrowserItems means }
 900{ "generate IDs starting from 1." }
 901{
 902 *  AddDataBrowserItems()
 903 *  
 904 *  Mac OS X threading:
 905 *    Not thread safe
 906 *  
 907 *  Availability:
 908 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 909 *    CarbonLib:        in CarbonLib 1.1 and later
 910 *    Non-Carbon CFM:   not available
 911 }
 912function AddDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: ItemCount; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_AddDataBrowserItems';
 913(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 914
 915
 916{
 917 *  RemoveDataBrowserItems()
 918 *  
 919 *  Mac OS X threading:
 920 *    Not thread safe
 921 *  
 922 *  Availability:
 923 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 924 *    CarbonLib:        in CarbonLib 1.1 and later
 925 *    Non-Carbon CFM:   not available
 926 }
 927function RemoveDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: ItemCount; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_RemoveDataBrowserItems';
 928(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 929
 930
 931{
 932 *  UpdateDataBrowserItems()
 933 *  
 934 *  Mac OS X threading:
 935 *    Not thread safe
 936 *  
 937 *  Availability:
 938 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 939 *    CarbonLib:        in CarbonLib 1.1 and later
 940 *    Non-Carbon CFM:   not available
 941 }
 942function UpdateDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: ItemCount; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID; propertyID: DataBrowserPropertyID ): OSStatus; external name '_UpdateDataBrowserItems';
 943(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 944
 945
 946{ Edit Menu Enabling and Handling }
 947{
 948 *  EnableDataBrowserEditCommand()
 949 *  
 950 *  Mac OS X threading:
 951 *    Not thread safe
 952 *  
 953 *  Availability:
 954 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 955 *    CarbonLib:        in CarbonLib 1.1 and later
 956 *    Non-Carbon CFM:   not available
 957 }
 958function EnableDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): Boolean; external name '_EnableDataBrowserEditCommand';
 959(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 960
 961
 962{
 963 *  ExecuteDataBrowserEditCommand()
 964 *  
 965 *  Mac OS X threading:
 966 *    Not thread safe
 967 *  
 968 *  Availability:
 969 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 970 *    CarbonLib:        in CarbonLib 1.1 and later
 971 *    Non-Carbon CFM:   not available
 972 }
 973function ExecuteDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): OSStatus; external name '_ExecuteDataBrowserEditCommand';
 974(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 975
 976
 977{
 978 *  GetDataBrowserSelectionAnchor()
 979 *  
 980 *  Mac OS X threading:
 981 *    Not thread safe
 982 *  
 983 *  Availability:
 984 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
 985 *    CarbonLib:        in CarbonLib 1.1 and later
 986 *    Non-Carbon CFM:   not available
 987 }
 988function GetDataBrowserSelectionAnchor( browser: ControlRef; var first: DataBrowserItemID; var last: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserSelectionAnchor';
 989(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 990
 991
 992{
 993 *  MoveDataBrowserSelectionAnchor()
 994 *  
 995 *  Mac OS X threading:
 996 *    Not thread safe
 997 *  
 998 *  Availability:
 999 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1000 *    CarbonLib:        in CarbonLib 1.1 and later
1001 *    Non-Carbon CFM:   not available
1002 }
1003function MoveDataBrowserSelectionAnchor( browser: ControlRef; direction: DataBrowserSelectionAnchorDirection; extendSelection: Boolean ): OSStatus; external name '_MoveDataBrowserSelectionAnchor';
1004(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1005
1006
1007{ Container Manipulation }
1008{
1009 *  OpenDataBrowserContainer()
1010 *  
1011 *  Mac OS X threading:
1012 *    Not thread safe
1013 *  
1014 *  Availability:
1015 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1016 *    CarbonLib:        in CarbonLib 1.1 and later
1017 *    Non-Carbon CFM:   not available
1018 }
1019function OpenDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_OpenDataBrowserContainer';
1020(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1021
1022
1023{
1024 *  CloseDataBrowserContainer()
1025 *  
1026 *  Mac OS X threading:
1027 *    Not thread safe
1028 *  
1029 *  Availability:
1030 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1031 *    CarbonLib:        in CarbonLib 1.1 and later
1032 *    Non-Carbon CFM:   not available
1033 }
1034function CloseDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_CloseDataBrowserContainer';
1035(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1036
1037
1038{
1039 *  SortDataBrowserContainer()
1040 *  
1041 *  Mac OS X threading:
1042 *    Not thread safe
1043 *  
1044 *  Availability:
1045 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1046 *    CarbonLib:        in CarbonLib 1.1 and later
1047 *    Non-Carbon CFM:   not available
1048 }
1049function SortDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID; sortChildren: Boolean ): OSStatus; external name '_SortDataBrowserContainer';
1050(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1051
1052
1053{ Aggregate Item Access and Iteration }
1054{
1055 *  GetDataBrowserItems()
1056 *  
1057 *  Mac OS X threading:
1058 *    Not thread safe
1059 *  
1060 *  Availability:
1061 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1062 *    CarbonLib:        in CarbonLib 1.1 and later
1063 *    Non-Carbon CFM:   not available
1064 }
1065function GetDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; items: Handle ): OSStatus; external name '_GetDataBrowserItems';
1066(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1067
1068
1069{
1070 *  GetDataBrowserItemCount()
1071 *  
1072 *  Mac OS X threading:
1073 *    Not thread safe
1074 *  
1075 *  Availability:
1076 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1077 *    CarbonLib:        in CarbonLib 1.1 and later
1078 *    Non-Carbon CFM:   not available
1079 }
1080function GetDataBrowserItemCount( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; var numItems: ItemCount ): OSStatus; external name '_GetDataBrowserItemCount';
1081(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1082
1083
1084{
1085 *  ForEachDataBrowserItem()
1086 *  
1087 *  Mac OS X threading:
1088 *    Not thread safe
1089 *  
1090 *  Availability:
1091 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1092 *    CarbonLib:        in CarbonLib 1.1 and later
1093 *    Non-Carbon CFM:   not available
1094 }
1095function ForEachDataBrowserItem( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; callback: DataBrowserItemUPP; clientData: UnivPtr ): OSStatus; external name '_ForEachDataBrowserItem';
1096(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1097
1098
1099{ Individual Item Access and Display }
1100{
1101 *  IsDataBrowserItemSelected()
1102 *  
1103 *  Mac OS X threading:
1104 *    Not thread safe
1105 *  
1106 *  Availability:
1107 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1108 *    CarbonLib:        in CarbonLib 1.1 and later
1109 *    Non-Carbon CFM:   not available
1110 }
1111function IsDataBrowserItemSelected( browser: ControlRef; item: DataBrowserItemID ): Boolean; external name '_IsDataBrowserItemSelected';
1112(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1113
1114
1115{
1116 *  GetDataBrowserItemState()
1117 *  
1118 *  Mac OS X threading:
1119 *    Not thread safe
1120 *  
1121 *  Availability:
1122 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1123 *    CarbonLib:        in CarbonLib 1.1 and later
1124 *    Non-Carbon CFM:   not available
1125 }
1126function GetDataBrowserItemState( browser: ControlRef; item: DataBrowserItemID; var state: DataBrowserItemState ): OSStatus; external name '_GetDataBrowserItemState';
1127(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1128
1129
1130{
1131 *  RevealDataBrowserItem()
1132 *  
1133 *  Mac OS X threading:
1134 *    Not thread safe
1135 *  
1136 *  Availability:
1137 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1138 *    CarbonLib:        in CarbonLib 1.1 and later
1139 *    Non-Carbon CFM:   not available
1140 }
1141function RevealDataBrowserItem( browser: ControlRef; item: DataBrowserItemID; propertyID: DataBrowserPropertyID; options: DataBrowserRevealOptions ): OSStatus; external name '_RevealDataBrowserItem';
1142(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1143
1144
1145{ Selection Set Manipulation }
1146{
1147 *  SetDataBrowserSelectedItems()
1148 *  
1149 *  Mac OS X threading:
1150 *    Not thread safe
1151 *  
1152 *  Availability:
1153 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1154 *    CarbonLib:        in CarbonLib 1.1 and later
1155 *    Non-Carbon CFM:   not available
1156 }
1157function SetDataBrowserSelectedItems( browser: ControlRef; numItems: ItemCount; items: DataBrowserItemIDPtr; operation: DataBrowserSetOption ): OSStatus; external name '_SetDataBrowserSelectedItems';
1158(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1159
1160
1161{ DataBrowser Attribute Manipulation }
1162{ The user customizable portion of the current view style settings }
1163{
1164 *  SetDataBrowserUserState()
1165 *  
1166 *  Mac OS X threading:
1167 *    Not thread safe
1168 *  
1169 *  Availability:
1170 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1171 *    CarbonLib:        in CarbonLib 1.1 and later
1172 *    Non-Carbon CFM:   not available
1173 }
1174function SetDataBrowserUserState( browser: ControlRef; stateInfo: CFDictionaryRef ): OSStatus; external name '_SetDataBrowserUserState';
1175(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1176
1177
1178{
1179 *  GetDataBrowserUserState()
1180 *  
1181 *  Mac OS X threading:
1182 *    Not thread safe
1183 *  
1184 *  Availability:
1185 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1186 *    CarbonLib:        in CarbonLib 1.1 and later
1187 *    Non-Carbon CFM:   not available
1188 }
1189function GetDataBrowserUserState( browser: ControlRef; var stateInfo: CFDictionaryRef ): OSStatus; external name '_GetDataBrowserUserState';
1190(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1191
1192
1193{ All items are active/enabled or not }
1194{
1195 *  SetDataBrowserActiveItems()
1196 *  
1197 *  Mac OS X threading:
1198 *    Not thread safe
1199 *  
1200 *  Availability:
1201 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1202 *    CarbonLib:        in CarbonLib 1.1 and later
1203 *    Non-Carbon CFM:   not available
1204 }
1205function SetDataBrowserActiveItems( browser: ControlRef; active: Boolean ): OSStatus; external name '_SetDataBrowserActiveItems';
1206(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1207
1208
1209{
1210 *  GetDataBrowserActiveItems()
1211 *  
1212 *  Mac OS X threading:
1213 *    Not thread safe
1214 *  
1215 *  Availability:
1216 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1217 *    CarbonLib:        in CarbonLib 1.1 and later
1218 *    Non-Carbon CFM:   not available
1219 }
1220function GetDataBrowserActiveItems( browser: ControlRef; var active: Boolean ): OSStatus; external name '_GetDataBrowserActiveItems';
1221(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1222
1223
1224{ Inset the scrollbars within the DataBrowser bounds }
1225{
1226 *  SetDataBrowserScrollBarInset()
1227 *  
1228 *  Mac OS X threading:
1229 *    Not thread safe
1230 *  
1231 *  Availability:
1232 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1233 *    CarbonLib:        in CarbonLib 1.1 and later
1234 *    Non-Carbon CFM:   not available
1235 }
1236function SetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_SetDataBrowserScrollBarInset';
1237(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1238
1239
1240{
1241 *  GetDataBrowserScrollBarInset()
1242 *  
1243 *  Mac OS X threading:
1244 *    Not thread safe
1245 *  
1246 *  Availability:
1247 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1248 *    CarbonLib:        in CarbonLib 1.1 and later
1249 *    Non-Carbon CFM:   not available
1250 }
1251function GetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_GetDataBrowserScrollBarInset';
1252(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1253
1254
1255{ The "user focused" item }
1256{ For the ListView, this means the root container }
1257{ For the ColumnView, this means the rightmost container column }
1258{
1259 *  SetDataBrowserTarget()
1260 *  
1261 *  Mac OS X threading:
1262 *    Not thread safe
1263 *  
1264 *  Availability:
1265 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1266 *    CarbonLib:        in CarbonLib 1.1 and later
1267 *    Non-Carbon CFM:   not available
1268 }
1269function SetDataBrowserTarget( browser: ControlRef; target: DataBrowserItemID ): OSStatus; external name '_SetDataBrowserTarget';
1270(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1271
1272
1273{
1274 *  GetDataBrowserTarget()
1275 *  
1276 *  Mac OS X threading:
1277 *    Not thread safe
1278 *  
1279 *  Availability:
1280 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1281 *    CarbonLib:        in CarbonLib 1.1 and later
1282 *    Non-Carbon CFM:   not available
1283 }
1284function GetDataBrowserTarget( browser: ControlRef; var target: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserTarget';
1285(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1286
1287
1288{ Current sort ordering }
1289{ ListView tracks this per-column }
1290{
1291 *  SetDataBrowserSortOrder()
1292 *  
1293 *  Mac OS X threading:
1294 *    Not thread safe
1295 *  
1296 *  Availability:
1297 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1298 *    CarbonLib:        in CarbonLib 1.1 and later
1299 *    Non-Carbon CFM:   not available
1300 }
1301function SetDataBrowserSortOrder( browser: ControlRef; order: DataBrowserSortOrder ): OSStatus; external name '_SetDataBrowserSortOrder';
1302(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1303
1304
1305{
1306 *  GetDataBrowserSortOrder()
1307 *  
1308 *  Mac OS X threading:
1309 *    Not thread safe
1310 *  
1311 *  Availability:
1312 *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1313 *    CarbonLib:        in CarbonLib 1.1 and later
1314 *    Non-Carbon CFM:   not available
1315 }
1316function Ge…

Large files files are truncated, but you can click here to view the full file