Skip to content

Latest commit

 

History

History
243 lines (211 loc) · 17.7 KB

public-api-examples.md

File metadata and controls

243 lines (211 loc) · 17.7 KB

Public API examples

The shared Delphi/Lazarus demo exercises the Framework’s public classes, records, helpers, callbacks and aliases. Use Utilities for core, collection, disposal and UI recipes; Run complete cache API is in the Cache tab. Interactive grid and wizard walkthroughs remain in their own tabs.

Aliases reuse the underlying type’s example. Platform-specific APIs are marked below. Each table follows its unit’s supported public-type inventory; bundled third-party generics and compiler-exported implementation adapters are excluded.

UCache

Unit source

Public type Worked example Note
ICacheBulkValueFetcher<TKey,TValue> ShowBulkFetch
ICacheSizeEstimator<TValue> ShowCallbacks
ICacheValueFetcher<TKey,TValue> ShowCallbacks
TActionCache<TKey, TValue> ShowCallbacks
TBulkFetchActionCache<TKey, TValue> ShowBulkFetch
TBulkFetchCacheBase<TKey, TValue> ShowBulkFetch
TCacheBase<TKey, TValue> ShowSubclass
TCacheBulkValueFetcher<TKey,TValue> ShowBulkFetch
TCacheBulkValues<TKey,TValue> ShowBulkFetch
TCachedItem<TValue> ShowSubclass
TCacheExpirationPolicy ShowCallbacks Fixed/sliding expiration or no expiration.
TCacheGlobalBulkFetchProc<TKey,TValue> ShowBulkFetch
TCacheGlobalEstimateFunc<TValue> ShowCallbacks
TCacheGlobalFetchFunc<TKey,TValue> ShowCallbacks
TCacheItemDisposePolicy ShowSubclass
TCacheItemFetchingEvent<TKey> ShowCallbacks
TCacheItemRemovingEvent<TKey,TValue> ShowCallbacks
TCacheItemValueEvent<TKey,TValue> ShowCallbacks
TCacheNestedBulkFetchProc<TKey,TValue> ShowBulkFetch
TCacheNestedEstimateFunc<TValue> ShowCallbacks
TCacheNestedFetchFunc<TKey,TValue> ShowCallbacks
TCacheNullValuePolicy ShowCallbacks Retain, bypass or reject null values.
TCacheObjectBulkFetchProc<TKey,TValue> ShowBulkFetch
TCacheObjectEstimateFunc<TValue> ShowCallbacks
TCacheObjectFetchFunc<TKey,TValue> ShowCallbacks
TCacheReapPolicy ShowCallbacks Capacity eviction strategy.
TCacheSizeEstimator<TValue> ShowCallbacks
TCacheStaleValuePolicy ShowCallbacks Optional on-demand staleness checks.
TCacheValueFetcher<TKey,TValue> ShowCallbacks
TPreloadedCache<TKey, TValue> ShowPreloaded

UCommon

Unit source

Public type Worked example Note
DWord CommonValuesAndResults Delphi compatibility alias; FPC provides the corresponding built-in type.
PtrInt CommonValuesAndResults Delphi compatibility alias; FPC provides the corresponding built-in type.
QWord CommonValuesAndResults Delphi compatibility alias; FPC provides the corresponding built-in type.
SizeInt CommonValuesAndResults Delphi compatibility alias; FPC provides the corresponding built-in type.
TArrayTool<T> ArrayMethods Existing complete ArrayMethods group; additional typed array use in the core example.
TBox<T> CommonValuesAndResults
TCPUTool CommonValuesAndResults
TDateTimeHelper CommonValuesAndResults
TFileStreamHelper VariantAndFileTools WriteString is Delphi only; the FPC helper adds no methods.
TFileTool VariantAndFileTools
TLogMessage CommonValuesAndResults
TLogSeverity CommonValuesAndResults
TNotifyManyEvent Notifications
TNotifyManyEventHelper Notifications
TResult CommonValuesAndResults
TScope ScopedReadWriteLocking Managed record; copied scopes retain one cleanup until the last owner ends.
TStatistics CommonValuesAndResults
TThreadNotify Notifications
TTimeSpan CommonValuesAndResults
TVariantTool VariantAndFileTools

UCommon.Collections

Unit source

Public type Worked example Note
IPredicate<T> CollectionAdapters
ITransformer<T1, T2> CollectionAdapters
TComparerTool<T> CollectionAdapters
TGlobalComparerFunc<T> CollectionAdapters
TGlobalPredicateFunc<T> CollectionAdapters
TGlobalTransformFunc<T1, T2> CollectionAdapters
TListTool<T1, T2> CollectionAdapters
TListTool<T> CollectionAdapters
TNestedComparerFunc<T> CollectionAdapters
TNestedPredicateFunc<T> CollectionAdapters
TNestedTransformFunc<T1, T2> CollectionAdapters
TObjectComparerFunc<T> CollectionAdapters
TObjectPredicateFunc<T> CollectionAdapters
TObjectTransformFunc<T1, T2> CollectionAdapters
TPredicateTool<T> CollectionAdapters
TSortedHashSetTool<T> CollectionAdapters FPC only.

UCommon.Data

Unit source

Public type Worked example Note
EDataRow DataRowsAndPaging
EDataTable DataRowsAndPaging
ESearchExpressionParserException SearchExpressions
IDataSource DataRowsAndPaging
PDataTable DataRowsAndPaging
TApplyFilterDelegate<T> DataRowsAndPaging
TApplySortDelegate<T> DataRowsAndPaging
TColumnFilter DataRowsAndPaging
TCustomDataSource<T> DataRowsAndPaging
TDataColumn DataRowsAndPaging
TDataColumns DataRowsAndPaging
TDataFilter DataRowsAndPaging
TDataFilters DataRowsAndPaging
TDataRow DataRowsAndPaging
TDataRowData DataRowsAndPaging Borrow the backing of an existing row Variant; do not separately own raw storage.
TDataSourceTool<T> DataRowsAndPaging
TDataTable DataRowsAndPaging
TExpressionKind SearchExpressions
TExpressionRecord SearchExpressions
TFilterCriteria DataRowsAndPaging
TFilterOperand DataRowsAndPaging
TNumericComparisionKind SearchExpressions
TPageFetchParams DataRowsAndPaging
TPageFetchResult DataRowsAndPaging
TSearchExpressionService SearchExpressions
TSetKind SearchExpressions
TSortDirection DataRowsAndPaging
TSortNullPolicy DataRowsAndPaging
TTextMatchKind SearchExpressions

UCommon.UI

Unit source

Public type Worked example Note
TApplicationForm CommonVisuals
TFormHelper No added behavior Empty helper: adds no methods.
TImageHelper CommonVisuals
TLoadingCircle CommonVisuals Animated control in UCommon.UI.
TThrottledEvent CommonVisuals
TThrottledEventMode CommonVisuals
TWinControlHelper CommonVisuals

UConcurrency

Unit source

Public type Worked example Note
ELockDisposedException ReadWriteLocking
ELockRecursionException ReadWriteLocking
ESynchronizationLockException ReadWriteLocking
TLockRecursionPolicy ReadWriteLocking
TReadWriteLock ReadWriteLocking / ScopedReadWriteLocking Explicit Acquire/Release methods and automatic TScope read/write/upgradeable ownership.

UMemory

Unit source

Public type Worked example Note
TDisposables BuildLocalReport / TReportBuilder
TDisposePolicy BuildLocalReport / TReportBuilder Cleanup policies are also used by the collection and cache recipes.

UVisualGrid

Unit source

The unified demo’s Visual grid tab uses the real grid and 10,000 generated records. Its square footer button opens a checked menu for Single (all matching rows with native scrolling), Auto (complete rows fitting the viewport) and Manual (an editable finite page size). Changing modes starts at page zero; resizing Auto keeps the current page number. Manual size is retained across mode changes.

Grid.PageMode := vpmAuto;
Grid.ManualPageSize := 25;
Grid.PageMode := vpmManual;
Grid.PageMode := vpmSingle;

PageSize remains a positive setting in Single mode; the source receives an unbounded page request. Filtering and sorting still cover the complete result. The shared paging checks exercise the same controls in Delphi and Lazarus; the capture tool records all three modes in the actual demo.

Public type Worked example Note
EVisualGridError TGridRecipe.Run
TCheckComboBox TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TCheckComboItemChange TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TColumnInitializeEvent TGridRecipe.Run
TCustomVisualGrid TGridRecipe.Run
TDeselectionType TGridRecipe.Run
TDrawGrid TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TDrawVisualCellEvent TGridRecipe.Run
TGridColumn TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TGridZone TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TPreparePopupMenuEvent TGridRecipe.Run
TSearchMode TGridRecipe.Run
TSelectionEvent TGridRecipe.Run
TSelectionType TGridRecipe.Run
TSortMode TGridRecipe.Run
TVisualCellRenderers TForm1.FormCreate (DollarValue)
TVisualColumn TGridRecipe.Run
TVisualColumnDataSanitizer TGridRecipe.Run
TVisualColumnRenderer TGridRecipe.Run
TVisualGrid TGridRecipe.Run
TVisualGridCaption TGridRecipe.Run
TVisualGridCellSelected TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TVisualGridHeaderClick TGridRecipe.Run Delphi/VCL compatibility API; guarded in the shared recipe.
TVisualGridOptions TGridRecipe.Run
TVisualGridPageMode Visual grid tab Single loads every matching row; Auto fits complete rows; Manual uses a remembered finite size.
TVisualGridSearchExpressionService No added behavior Empty placeholder: no parser methods. Use TSearchExpressionService from UCommon.Data.
TVisualGridSelection TGridRecipe.Run

UWizard

Unit source

Public type Worked example Note
TActionWizard<T> TRecipeWizard.ShowHost / RunUiApiExamples
TActionWizard<T>.TActionWizardCancelFunc TRecipeWizard.ShowHost / RunUiApiExamples
TActionWizard<T>.TActionWizardFinishFunc TRecipeWizard.ShowHost / RunUiApiExamples
TGenericWizardBag TRecipeWizard.ShowHost / RunUiApiExamples
TPathUpdateType TRecipeWizard.ShowHost / RunUiApiExamples
TWizard<T> TRecipeWizard.ShowHost / RunUiApiExamples
TWizardForm<T> TRecipeWizard.ShowHost / RunUiApiExamples
TWizardFormBase TRecipeWizard.ShowHost / RunUiApiExamples
TWizardFormClass TRecipeWizard.ShowHost / RunUiApiExamples
TWizardHostForm TRecipeWizard.ShowHost / RunUiApiExamples
TWizardHostForm.TWizardHostFormCloseQueryDelegate TRecipeWizard.ShowHost / RunUiApiExamples
TWizardScreenPath TRecipeWizard.ShowHost / RunUiApiExamples
TWizardState TRecipeWizard.ShowHost / RunUiApiExamples
TWizardStepTrait TRecipeWizard.ShowHost / RunUiApiExamples
TWizardStepTraits TRecipeWizard.ShowHost / RunUiApiExamples