diff --git a/lib/gui/include/widgets/app.h b/lib/gui/include/widgets/app.h index 8b8df0d..b82c1b4 100644 --- a/lib/gui/include/widgets/app.h +++ b/lib/gui/include/widgets/app.h @@ -212,7 +212,7 @@ class App : public BasicWidget, public DrawableWidget { /** * @brief Report if this widget's visibility was changed and it requires to be cleared/redrawn * - * @note See also `BasicWidget::get_dirty` + * @note See also `App::get_dirty` * * @return false Always * @@ -330,7 +330,7 @@ class App : public BasicWidget, public DrawableWidget { * @param y Y-coordiante of the pixel (offset from top-edge) * @param color 16-bit color of the pixel * - * @return Pointer to the app (allows for chaining method calls) + * @return Pointer to the app (allows chaining method calls) * */ App *set_at(unsigned x, unsigned y, uint16_t color) override; @@ -357,7 +357,7 @@ class App : public BasicWidget, public DrawableWidget { * @param y1 Y-coordinate of the second point (offset from top-edge) * @param color 16-bit color of the line * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *draw_line(unsigned x0, unsigned y0, unsigned x1, unsigned y1, uint16_t color) override; @@ -371,7 +371,7 @@ class App : public BasicWidget, public DrawableWidget { * @param h Height of the rectangle * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *draw_rect(unsigned x, unsigned y, unsigned w, unsigned h, uint16_t color) override; @@ -385,7 +385,7 @@ class App : public BasicWidget, public DrawableWidget { * @param h Height of the rectangle * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *fill_rect(unsigned x, unsigned y, unsigned w, unsigned h, uint16_t color) override; @@ -400,7 +400,7 @@ class App : public BasicWidget, public DrawableWidget { * @param r Radius of the rounded-corners * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *draw_round_rect(unsigned x, unsigned y, unsigned w, unsigned h, unsigned r, uint16_t color) override; @@ -414,7 +414,7 @@ class App : public BasicWidget, public DrawableWidget { * @param r Radius of the rounded-corners * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *fill_round_rect(unsigned x, unsigned y, unsigned w, unsigned h, unsigned r, uint16_t color) override; @@ -427,7 +427,7 @@ class App : public BasicWidget, public DrawableWidget { * @param r Radius of the circle * @param color 16-bit color of the circle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) */ App *draw_circle(unsigned x, unsigned y, unsigned r, uint16_t color) override; @@ -439,7 +439,7 @@ class App : public BasicWidget, public DrawableWidget { * @param r Radius of the circle * @param color 16-bit color of the circle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *fill_circle(unsigned x, unsigned y, unsigned r, uint16_t color) override; @@ -456,7 +456,7 @@ class App : public BasicWidget, public DrawableWidget { * @param w Reference to variable where the width of the textbox will be stored * @param h Reference to variable where the height of the textbox will be stored * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *get_text_bounds(const char *text, unsigned text_size, unsigned x, unsigned y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h) override; @@ -466,7 +466,7 @@ class App : public BasicWidget, public DrawableWidget { * * @param f Pointer to font which should be used henceforth * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *set_font(const GFXfont *f) override; @@ -480,7 +480,7 @@ class App : public BasicWidget, public DrawableWidget { * @param text_size Size of the text * @param fg_color Color of the text * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *print(const char *text, unsigned x, unsigned y, unsigned text_size, uint16_t fg_color) override; @@ -497,7 +497,7 @@ class App : public BasicWidget, public DrawableWidget { * @param fg_color Color of the text * @param bg_color Color of the background * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ App *print_opaque(const char *text, unsigned x, unsigned y, unsigned text_size, uint16_t fg_color, uint16_t bg_color) override; @@ -511,7 +511,7 @@ class App : public BasicWidget, public DrawableWidget { * @param width Number of columns in the bitmap * @param height Number of rows in the bitmap * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) */ App *draw_rgb_bitmap(unsigned x, unsigned y, const uint16_t *data, unsigned width, unsigned height) override; diff --git a/lib/gui/include/widgets/bitmap.h b/lib/gui/include/widgets/bitmap.h index 38f26c9..4588589 100644 --- a/lib/gui/include/widgets/bitmap.h +++ b/lib/gui/include/widgets/bitmap.h @@ -20,7 +20,7 @@ class Bitmap : public BasicWidget, public InteractiveWidget { protected: /** The cooldown period between two pressed (used to prevent "bouncing", where a single press is detected as multiple) */ - constexpr static unsigned DEBOUNCE_THRESH = 150; + constexpr static unsigned DEBOUNCE_THRESH = 200; /** Reference to parent frame */ Frame *parent {nullptr}; @@ -51,9 +51,6 @@ class Bitmap : public BasicWidget, public InteractiveWidget { /** Height of widget (number of rows occupied) */ unsigned widget_h; - /** The epoch when the widget was last pressed */ - unsigned last_press_epoch {0}; - /** Pointer to the bitmap array */ const uint16_t *data; @@ -68,6 +65,9 @@ class Bitmap : public BasicWidget, public InteractiveWidget { /** Reference to event queue for posting events */ RingQueueInterface *event_queue {nullptr}; + /** The epoch when the widget was last pressed */ + unsigned last_press_epoch {0}; + public: /** diff --git a/lib/gui/include/widgets/button.h b/lib/gui/include/widgets/button.h index 8a04396..3b9ef81 100644 --- a/lib/gui/include/widgets/button.h +++ b/lib/gui/include/widgets/button.h @@ -1,7 +1,7 @@ /** - * @file bitmap.h + * @file button.h * @author Aditya Agarwal (aditya.agarwal@dumblebots.com) - * @brief File that declares the `Bitmap` class, which is used to show 16-bit color bitmap images + * @brief File that declares the `Button` class, which is a simple and flexible implementation of a button * */ @@ -135,6 +135,7 @@ class Button : public BasicWidget, public InteractiveWidget { protected: + /** The cooldown period between two pressed (used to prevent "bouncing", where a single press is detected as multiple) */ constexpr static unsigned DEBOUNCE_THRESH = 200; constexpr static unsigned DEFAULT_WIDTH = 64; diff --git a/lib/gui/include/widgets/frame.h b/lib/gui/include/widgets/frame.h index 58bb794..6148ea5 100644 --- a/lib/gui/include/widgets/frame.h +++ b/lib/gui/include/widgets/frame.h @@ -49,7 +49,7 @@ class Frame : public BasicWidget, public DrawableWidget { /** - * @brief Send the widget to a lower Z-index (higher up) + * @brief Send a widget to a lower Z-index (higher up) * * @warning If `child` is not a child of this widget, then this function does nothing * @see Frame::send_back(BasicWidget*,unsigned) @@ -63,7 +63,7 @@ class Frame : public BasicWidget, public DrawableWidget { virtual Frame *send_front(BasicWidget *child, unsigned amt) = 0; /** - * @brief Send the widget to a higher Z-index (lower down) + * @brief Send a widget to a higher Z-index (lower down) * * @warning If `child` is not a child of this widget, then this function does nothing * @see Frame::send_front(BasicWidget*,unsigned) diff --git a/lib/gui/include/widgets/view.h b/lib/gui/include/widgets/view.h index 05db9df..2333d44 100644 --- a/lib/gui/include/widgets/view.h +++ b/lib/gui/include/widgets/view.h @@ -237,7 +237,7 @@ class View : public Frame { * @param y Y-coordiante of the pixel (offset from top-edge) * @param color 16-bit color of the pixel * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *set_at(unsigned x, unsigned y, uint16_t color) override; @@ -263,7 +263,7 @@ class View : public Frame { * @param y1 Y-coordinate of the second point (offset from top-edge) * @param color 16-bit color of the line * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *draw_line(unsigned x0, unsigned y0, unsigned x1, unsigned y1, uint16_t color) override; @@ -277,7 +277,7 @@ class View : public Frame { * @param h Height of the rectangle * @param color 16-bit color of the rectangle * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *draw_rect(unsigned x, unsigned y, unsigned w, unsigned h, uint16_t color) override; @@ -291,7 +291,7 @@ class View : public Frame { * @param h Height of the rectangle * @param color 16-bit color of the rectangle * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *fill_rect(unsigned x, unsigned y, unsigned w, unsigned h, uint16_t color) override; @@ -306,7 +306,7 @@ class View : public Frame { * @param r Radius of the rounded-corners * @param color 16-bit color of the rectangle * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *draw_round_rect(unsigned x, unsigned y, unsigned w, unsigned h, unsigned r, uint16_t color) override; @@ -320,7 +320,7 @@ class View : public Frame { * @param r Radius of the rounded-corners * @param color 16-bit color of the rectangle * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *fill_round_rect(unsigned x, unsigned y, unsigned w, unsigned h, unsigned r, uint16_t color) override; @@ -333,7 +333,7 @@ class View : public Frame { * @param r Radius of the circle * @param color 16-bit color of the circle * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) */ View *draw_circle(unsigned x, unsigned y, unsigned r, uint16_t color) override; @@ -345,7 +345,7 @@ class View : public Frame { * @param r Radius of the circle * @param color 16-bit color of the circle * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *fill_circle(unsigned x, unsigned y, unsigned r, uint16_t color) override; @@ -362,7 +362,7 @@ class View : public Frame { * @param w Reference to variable where the width of the textbox will be stored * @param h Reference to variable where the height of the textbox will be stored * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *get_text_bounds(const char *text, unsigned text_size, unsigned x, unsigned y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h) override; @@ -372,7 +372,7 @@ class View : public Frame { * * @param f Pointer to font which should be used henceforth * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *set_font(const GFXfont *f) override; @@ -386,7 +386,7 @@ class View : public Frame { * @param text_size Size of the text * @param fg_color Color of the text * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *print(const char *text, unsigned x, unsigned y, unsigned text_size, uint16_t fg_color) override; @@ -403,7 +403,7 @@ class View : public Frame { * @param fg_color Color of the text * @param bg_color Color of the background * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) * */ View *print_opaque(const char *text, unsigned x, unsigned y, unsigned text_size, uint16_t fg_color, uint16_t bg_color) override; @@ -417,7 +417,7 @@ class View : public Frame { * @param width Number of columns in the bitmap * @param height Number of rows in the bitmap * - * @return Pointer to the view (allows for chaining method calls) + * @return Pointer to the view (allows chaining method calls) */ View *draw_rgb_bitmap(unsigned x, unsigned y, const uint16_t *data, unsigned width, unsigned height) override; diff --git a/lib/gui/include/widgets/widget.h b/lib/gui/include/widgets/widget.h index 13f55f7..67e2e59 100644 --- a/lib/gui/include/widgets/widget.h +++ b/lib/gui/include/widgets/widget.h @@ -176,9 +176,9 @@ class BasicWidget { public: /** - * @brief Get the parent of this widget + * @brief Get a reference to the parent of this widget * - * @return BasicWidget* Reference to the parent of this widget\ + * @return Reference to the parent of this widget * */ virtual BasicWidget *get_parent() = 0; @@ -248,7 +248,8 @@ class BasicWidget { * * @note See also `BasicWidget::get_dirty` * - * @return If the widget's visibility was changed + * @return false If the widget's visibility was not changed + * @return true If the widget's visibility was changed * */ virtual bool get_visibility_changed() const = 0; @@ -291,19 +292,6 @@ class BasicWidget { */ virtual bool get_intersection(unsigned x, unsigned y) const = 0; - /** - * @brief Check whether another widget intersects with this widget's bounding box - * - * @note The coordinates of the point must be relative to its parent, not necessarily the screen - * - * @param x X-coordinate of point (offset from parent's left-edge) - * @param y Y-coordiante of point (offset from parents' top-edge) - * - * @return false If the point intersects with the widget's bounding box - * @return true If the point does not intersect with the widget's bounding box - * - */ - /** * @brief Check whether another widget's bounding box intersects with this widget's bounding box * @@ -397,7 +385,7 @@ class InteractiveWidget { * * @param cb Reference to the callback function * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *set_onpress(callback_t new_onpress) = 0; @@ -405,7 +393,7 @@ class InteractiveWidget { /** * @brief Reset the callback to be called when the widget is pressed * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *reset_onpress() = 0; @@ -415,7 +403,7 @@ class InteractiveWidget { * * @param cb Reference to the callback function * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *set_onrelease(callback_t new_onrelease) = 0; @@ -423,7 +411,7 @@ class InteractiveWidget { /** * @brief Reset the callback to be called when the widget is released * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *reset_onrelease() = 0; @@ -433,14 +421,14 @@ class InteractiveWidget { * * @param new_event_queue Mutable reference to queue which should be used * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) */ virtual InteractiveWidget *set_event_queue(RingQueueInterface *new_event_queue) = 0; /** * @brief Reset the event queue so that the widget may not enqueue any events * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *reset_event_queue() = 0; @@ -450,7 +438,7 @@ class InteractiveWidget { * * @param new_args Reference to the new arguments * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *set_args(unsigned *new_args) = 0; @@ -460,7 +448,7 @@ class InteractiveWidget { * * @warning This method does not explicitly perform any garbage collection for the old arguments * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *reset_args() = 0; @@ -487,7 +475,7 @@ class InteractiveWidget { * * @param new_state Whether the widget should ignore press and release events (or not) * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual InteractiveWidget *set_interactable(bool new_state) = 0; @@ -520,7 +508,7 @@ class DrawableWidget { * @param y Y-coordiante of the pixel (offset from top-edge) * @param color 16-bit color of the pixel * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *set_at(unsigned x, unsigned y, uint16_t color) = 0; @@ -539,14 +527,14 @@ class DrawableWidget { /** * @brief Draw a line between two points * - + * * @param x0 X-coordinate of the first point (offset from left-edge) * @param y0 Y-coordinate of the first point (offset from top-edge) * @param x1 X-coordinate of the second point (offset from left-edge) * @param y1 Y-coordinate of the second point (offset from top-edge) * @param color 16-bit color of the line * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *draw_line(unsigned x0, unsigned y0, unsigned x1, unsigned y1, uint16_t color) = 0; @@ -560,7 +548,7 @@ class DrawableWidget { * @param h Height of the rectangle * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *draw_rect(unsigned x, unsigned y, unsigned w, unsigned h, uint16_t color) = 0; @@ -574,7 +562,7 @@ class DrawableWidget { * @param h Height of the rectangle * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *fill_rect(unsigned x, unsigned y, unsigned w, unsigned h, uint16_t color) = 0; @@ -589,7 +577,7 @@ class DrawableWidget { * @param r Radius of the rounded-corners * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *draw_round_rect(unsigned x, unsigned y, unsigned w, unsigned h, unsigned r, uint16_t color) = 0; @@ -603,7 +591,7 @@ class DrawableWidget { * @param r Radius of the rounded-corners * @param color 16-bit color of the rectangle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *fill_round_rect(unsigned x, unsigned y, unsigned w, unsigned h, unsigned r, uint16_t color) = 0; @@ -616,7 +604,7 @@ class DrawableWidget { * @param r Radius of the circle * @param color 16-bit color of the circle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) */ virtual DrawableWidget *draw_circle(unsigned x, unsigned y, unsigned r, uint16_t color) = 0; @@ -628,7 +616,7 @@ class DrawableWidget { * @param r Radius of the circle * @param color 16-bit color of the circle * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *fill_circle(unsigned x, unsigned y, unsigned r, uint16_t color) = 0; @@ -645,7 +633,7 @@ class DrawableWidget { * @param w Reference to variable where the width of the textbox will be stored * @param h Reference to variable where the height of the textbox will be stored * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *get_text_bounds(const char *text, unsigned text_size, unsigned x, unsigned y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h) = 0; @@ -655,7 +643,7 @@ class DrawableWidget { * * @param f Pointer to font which should be used henceforth * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *set_font(const GFXfont *f) = 0; @@ -669,7 +657,7 @@ class DrawableWidget { * @param text_size Size of the text * @param fg_color Color of the text * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *print(const char *text, unsigned x, unsigned y, unsigned text_size, uint16_t fg_color) = 0; @@ -686,7 +674,7 @@ class DrawableWidget { * @param fg_color Color of the text * @param bg_color Color of the background * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) * */ virtual DrawableWidget *print_opaque(const char *text, unsigned x, unsigned y, unsigned text_size, uint16_t fg_color, uint16_t bg_color) = 0; @@ -700,7 +688,7 @@ class DrawableWidget { * @param width Number of columns in the bitmap * @param height Number of rows in the bitmap * - * @return Pointer to the widget (allows for chaining method calls) + * @return Pointer to the widget (allows chaining method calls) */ virtual DrawableWidget *draw_rgb_bitmap(unsigned x, unsigned y, const uint16_t *data, unsigned width, unsigned height) = 0; }; diff --git a/lib/gui/include/widgets/window.h b/lib/gui/include/widgets/window.h index 5b43ca1..4a6fb51 100644 --- a/lib/gui/include/widgets/window.h +++ b/lib/gui/include/widgets/window.h @@ -61,6 +61,10 @@ class WindowStyle { unsigned get_border_radius() const; }; +/** + * @brief Class that provides a minimal and flexible implementation of `Frame` and also includes styling + * + */ class Window : public Frame { protected: @@ -76,19 +80,19 @@ class Window : public Frame { bool visible {true}; /** X-coordinate of the window relative to its parent (offset from left-edge) */ - unsigned widget_x {0}; + unsigned widget_x; /** Y-coordinate of the window relative to its parent (offset from top-edge) */ - unsigned widget_y {0}; + unsigned widget_y; /** X-coordinate of the window relative to the display (offset from left-edge) */ - unsigned widget_absolute_x {0}; + unsigned widget_absolute_x; /** Y-coordinate of the window relative to the display (offset from top-edge) */ - unsigned widget_absolute_y {0}; + unsigned widget_absolute_y; /** Width of window (number of columns occupied) */ - unsigned widget_w {0}; + unsigned widget_w; /** Height of window (number of rows occupied) */ - unsigned widget_h {0}; + unsigned widget_h; /** List of children of the window */ std::vector children; @@ -99,7 +103,7 @@ class Window : public Frame { public: /** - * @brief Default constructor disabled (use the `create` method)\ + * @brief Default constructor disabled (use the `create` method) * */ Window() = delete; @@ -121,11 +125,11 @@ class Window : public Frame { static Window *create(Frame *parent, unsigned x, unsigned y, unsigned width, unsigned height); /** - * @brief Get the style information of the window + * @brief Get a reference to the style object of the button to change its appearance * * @see `WindowStyle` * - * @return A pointer to the style object of the window + * @return Pointer to the style object * */ WindowStyle *get_style(); diff --git a/lib/gui/src/widgets/button.cpp b/lib/gui/src/widgets/button.cpp index 43c8ded..1d339bc 100644 --- a/lib/gui/src/widgets/button.cpp +++ b/lib/gui/src/widgets/button.cpp @@ -1,7 +1,7 @@ /** - * @file bitmap.cpp + * @file button.cpp * @author Aditya Agarwal (aditya.agarwal@dumblebots.com) - * @brief This file implements the methods of the `Bitmap` class + * @brief This file implements the methods of the `Button` class * */ diff --git a/lib/gui/src/widgets/drawablecanvas.cpp b/lib/gui/src/widgets/drawablecanvas.cpp index 373a5f2..8944e4d 100644 --- a/lib/gui/src/widgets/drawablecanvas.cpp +++ b/lib/gui/src/widgets/drawablecanvas.cpp @@ -386,7 +386,7 @@ void DrawableCanvas::set_visibility(bool new_visibility) { visible = new_visibility; } -void DrawableCanvas::reset_compressed() { //todo this is to be used in many places, not just clear +void DrawableCanvas::reset_compressed() { for (unsigned r = 0; r < DRAWABLE_H; ++r) { compressed_rows[r].pixel_count = DRAWABLE_W; compressed_rows[r].segment_count = 1; diff --git a/lib/gui/src/widgets/window.cpp b/lib/gui/src/widgets/window.cpp index d74d765..e1e8364 100644 --- a/lib/gui/src/widgets/window.cpp +++ b/lib/gui/src/widgets/window.cpp @@ -1,7 +1,7 @@ /** * @file window.cpp * @author Aditya Agarwal (aditya.agarwal@dumblebots.com) - * @brief This file implemented the methods of the `Window` class + * @brief This file implements the methods of the `Window` class * */