Iridescence 1.00
Embedded Graphic Framework
Loading...
Searching...
No Matches
ds_divider.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_DIVIDER_H
8#define _DS_DIVIDER_H
9
10
11#include <ds_view.h>
12
16class DsDivider: public DsView
17{
18 public:
29 DsDivider(DsView* parent, const DsPoint &pos, const DsSize &size, DsColor color): DsView(parent, pos, size), mColor(color)
30 {
31 }
32
33
43 DsDivider(DsView* parent, uint32_t thickness, DsColor color): DsView(parent, DsPoint(), DsSize(thickness, thickness)), mColor(color)
44 {
45 }
46
47
48private:
49 DsColor mColor;
50 void onPaint(DsRenderer &renderer) override final;
51};
52
53
54#endif
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsDivider is a class representing a simple line divider.
Definition ds_divider.h:17
DsDivider(DsView *parent, uint32_t thickness, DsColor color)
Creates a DsDivider view for use with the auto-layout system of the parent view.
Definition ds_divider.h:43
DsDivider(DsView *parent, const DsPoint &pos, const DsSize &size, DsColor color)
Creates a DsDivider view.
Definition ds_divider.h:29
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
DsSize is class that represents the 2D size of a graphic object (width, height) as integer values.
Definition ds_geometry.h:780
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40