GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Data Fields
gp_widget_choice_ops Struct Reference

A choice widget ops. More...

#include <gp_widget_class_choice.h>

Data Fields

const char *(* get_choice )(gp_widget *self, size_t idx)
 Returns a description for a choice.
 
size_t(* get )(gp_widget *self, enum gp_widget_choice_op op)
 Returns a selected choice or number of choices.
 
void(* set )(gp_widget *self, size_t sel)
 Sets the selected choice.
 

Detailed Description

A choice widget ops.

These are callbacks called by the widget implementation to get the choice values, selected choice and the number of choices.

The application needs to call gp_widget_choice_refresh() when the state changes, e.g. choice was added to or removed from the set.

Definition at line 35 of file gp_widget_class_choice.h.

Field Documentation

◆ get

size_t(* gp_widget_choice_ops::get) (gp_widget *self, enum gp_widget_choice_op op)

Returns a selected choice or number of choices.

Parameters
selfA choice widget.
opA value to return.
Returns
A value based on the op, either selected choice or number of choices.

Definition at line 54 of file gp_widget_class_choice.h.

◆ get_choice

const char *(* gp_widget_choice_ops::get_choice) (gp_widget *self, size_t idx)

Returns a description for a choice.

Parameters
selfA choice widget.
idxA choice index.
Returns
A choice description for a given index.

Definition at line 44 of file gp_widget_class_choice.h.

◆ set

void(* gp_widget_choice_ops::set) (gp_widget *self, size_t sel)

Sets the selected choice.

Parameters
selfA choice widget.
selA selected choice.

Definition at line 61 of file gp_widget_class_choice.h.


The documentation for this struct was generated from the following file: