ObjectivelyMVC
Object oriented MVC framework for SDL3 and GNU C
Loading...
Searching...
No Matches
ScrollHandle.h File Reference

The draggable handle of a ScrollBar. More...

Go to the source code of this file.

Data Structures

struct  ScrollHandle
 A draggable scrollbar handle. More...
 
struct  ScrollHandleDelegate
 The ScrollHandle delegate protocol. More...
 

Functions

OBJECTIVELYMVC_EXPORT Class * _ScrollHandle (void)
 

Detailed Description

The draggable handle of a ScrollBar.

ScrollHandle is the only interactive part of a ScrollBar: a Control that, while grabbed, reports each increment of vertical mouse motion to its delegate. Its owner (ScrollBar) maps that motion onto the scrolled content's offset. Kept generic (no knowledge of what it scrolls).

Definition in file ScrollHandle.h.

Function Documentation

◆ _ScrollHandle()

OBJECTIVELYMVC_EXPORT Class * _ScrollHandle ( void  )

Definition at line 102 of file ScrollHandle.c.

102 {
103 static Class *clazz;
104 static Once once;
105
106 do_once(&once, {
107 clazz = _initialize(&(const ClassDef) {
108 .name = "ScrollHandle",
109 .superclass = _Control(),
110 .instanceSize = sizeof(ScrollHandle),
111 .interfaceOffset = offsetof(ScrollHandle, interface),
112 .interfaceSize = sizeof(ScrollHandleInterface),
114 });
115 });
116
117 return clazz;
118}
Class * _Control(void)
Definition Control.c:391
static void initialize(Class *clazz)
A draggable scrollbar handle.