Skip to content

Commit

Permalink
docs: add missing class-level documentation to ColorSelector
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya Agarwal <[email protected]>
  • Loading branch information
Aditya-A-garwal committed Mar 25, 2024
1 parent 4f0e8da commit d0bb428
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/gui/include/widgets/colorselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#include "widget.h"
#include "frame.h"

/**
* @brief Class that implements a widget which is used to create a grid of colors to pick from from
*
*/
class ColorSelector : public BasicWidget, public InteractiveWidget {

protected:
Expand Down Expand Up @@ -49,11 +53,6 @@ class ColorSelector : public BasicWidget, public InteractiveWidget {
/** Y-coordinate of the color selector relative to the display (offset from top-edge) */
unsigned widget_absolute_y;

/** Width of color selector (number of columns occupied) */
unsigned widget_w;
/** Height of color selector (number of rows occupied) */
unsigned widget_h;

/** Array of 16-bit colors to show */
uint16_t colors[9] {};

Expand Down Expand Up @@ -82,11 +81,13 @@ class ColorSelector : public BasicWidget, public InteractiveWidget {
/**
* @brief Dynamically create a new color selector instance
*
* @warning This method returns a nullptr if a color selector instance could not be created
*
* @param parent The frame that should own this color selector
* @param x X-coordinate of the color selector, within `parent` (offset from left-edge)
* @param y Y-coordinate of the color selector, within `parent` (offset from top-edge)
*
* @return A pointer to the color selector instance
* @return A pointer to the color selector instance (nullptr if the creation fails)
*
*/
static ColorSelector *create(Frame *parent, unsigned x, unsigned y);
Expand Down

0 comments on commit d0bb428

Please sign in to comment.