forked from external/yambar
Since we're typically interrested in *where* (on the progress-bar) the user clicked, we need a way to pass the clicked position to the handler. Normally, the on-click handler is expanded when a particle instantiates its exposable. At this point, we (obviously) don't have the click position. This is solved by expanding the handler a second time, when the bar is clicked. Thus, the user can use the "{where}" tag in the click handler. "where" will be expanded to a percentage value (0-100).
8 lines
330 B
C
8 lines
330 B
C
#pragma once
|
|
#include "../particle.h"
|
|
|
|
struct particle * particle_progress_bar_new(
|
|
const char *tag, int width,
|
|
struct particle *start_marker, struct particle *end_marker,
|
|
struct particle *fill, struct particle *empty, struct particle *indicator,
|
|
int left_margin, int right_margin, const char *on_click_template);
|