Iridescence 1.00
Embedded Graphic Framework
Loading...
Searching...
No Matches
ds_check.h
1/* Copyright (C) 2017 - 2024, Thornwave Labs Inc - All Rights Reserved.
2 * Unauthorized copying of this file, via any medium is strictly prohibited.
3 * Proprietary and confidential.
4 * Written by Razvan Turiac <razvan.turiac@thornwave.com>
5*/
6
7#ifndef _DS_CHECK_H
8#define _DS_CHECK_H
9
10
11#include <ds_view.h>
12#include <ds_selection_base.h>
13
14
20class DsCheck: public DsView, public DsSelectionBase
21{
22public:
31 DsCheck(DsView* parent, const DsPoint &pos, uint32_t size, uint32_t border_thickness = 2);
32
33
39
40
41private:
42 uint32_t mBorderThickness;
43
44 DsColor mCheckColor;
45
46 uint32_t mTouchTimestamp;
47 bool mIsTouchActive;
48
49 void onSizeChange(void) override final;
50 void onPaint(DsRenderer &renderer) override final;
51 bool onTouch(const DsTouchEvent &event) override final;
52
53 int32_t onSelectionChange(int32_t selection) override final;
54};
55
56
57#endif
DsCheck is a class that represents a checkbox view.
Definition ds_check.h:21
DsCheck(DsView *parent, const DsPoint &pos, uint32_t size, uint32_t border_thickness=2)
Creates a DsCheck object.
void setCheckColor(DsColor color)
Sets the check sign color.
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsPoint is a class that represents the X and Y 2D coordinates of a point as integer numbers.
Definition ds_geometry.h:24
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsSelectionBase is a base class that contains a selection value.
Definition ds_selection_base.h:19
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40
This structure implements a touch event.
Definition ds_event.h:25