API referenceRendering & Viewer

rasSetSelectionMode

Select the entire current page (rasSelectAll), and

C
void __stdcall rasSelectAll(IPGC CachePtr, TSelectObjType ObjTypes);
TSelectObjType __stdcall rasGetSelectionMode(IPGC CachePtr);
void __stdcall rasSetSelectionMode(IPGC CachePtr, TSelectObjType Value);
Delphi
procedure rasSelectAll(CachePtr: IPGC; ObjTypes: TSelectObjType); stdcall;
function rasGetSelectionMode(CachePtr: IPGC): TSelectObjType; stdcall;
procedure rasSetSelectionMode(CachePtr: IPGC; Value: TSelectObjType); stdcall;

Purpose. Select the entire current page (rasSelectAll), and get/set the cache's selection-mode flag (SelectionMode) that other functions in this cluster (e.g. rasSelectAnnotOrField) also write as a side effect to record what kind of thing was last selected.

Description. rasSelectAll sets C.SelectionMode := Ord(ObjTypes) and calls SelectWholePage(C) (the same whole-page marquee helper rasKeyStroke's Ctrl+A uses, Mouse and Keyboard Input) — it selects the whole current page as one rectangle, not individual objects filtered by ObjTypes; ObjTypes only ends up stored as the mode, not used to scope which objects get selected. rasSetSelectionMode/ rasGetSelectionMode are plain accessors on the same field.

Parameters.

ParameterDescription
CachePtrTarget page cache.
ObjTypes / ValueStored as SelectionMode; rasSelectAll's ObjTypes does not scope the selection to that object type — the whole page is always selected as one rect.

Return value. rasGetSelectionMode: the stored mode (TSelectObjType(0) if CachePtr doesn't resolve).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern void rasSetSelectionMode(IntPtr CachePtr, uint Value);
Area
Rendering & Viewer
Category

Rasterizer/Rendering

Exported names

rasSetSelectionMode

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.