mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-29 03:14:41 -04:00
* [EGD-2548] added AddContactIcon * [EGD-2548] added send message Icon - still need to use it in Call Window * [EGD-2548] SendSmsIcon used in callwindow * [EGD-2548] rewritten Icon class to be template based Created all missing Icons * [EGD-2548] integranio of new icons in callwindow and some fixes * [EGD-2548] code clean up and tune up constants * [EGD-2548] clang formatter and fix speaker icons * [EGD-2548] revert of USE_DAEFAULT_BAUDRATE * [EGD-2648] destruktor fix
47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
/*
|
|
* Image.hpp
|
|
*
|
|
* Created on: 17 mar 2019
|
|
* Author: robert
|
|
*/
|
|
|
|
#ifndef MIDDLEWARES_GUI_WIDGETS_IMAGE_HPP_
|
|
#define MIDDLEWARES_GUI_WIDGETS_IMAGE_HPP_
|
|
|
|
#include <list>
|
|
|
|
#include "Rect.hpp"
|
|
#include "../core/DrawCommand.hpp"
|
|
#include "../core/PixMap.hpp"
|
|
#include "utf8/UTF8.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
|
|
/// image element on screen, it will automatically set it's size to fit space of selected image
|
|
class Image : public Rect
|
|
{
|
|
protected:
|
|
/// internal representation of the image
|
|
ImageMap *imageMap = nullptr;
|
|
|
|
public:
|
|
Image();
|
|
/// create new Image element and resize it to size needed by selected Image
|
|
Image(const UTF8 &);
|
|
/// Create new Image element on position x,y w&h will be *ignored*
|
|
Image(Item *parent, uint32_t x, uint32_t y, uint32_t w, uint32_t h, const UTF8 = UTF8{""});
|
|
virtual ~Image() = default;
|
|
/// set image with id
|
|
bool set(int id);
|
|
/// set image with string name
|
|
void set(const UTF8 &name);
|
|
|
|
// virtual methods from Item
|
|
std::list<DrawCommand *> buildDrawList();
|
|
};
|
|
|
|
} /* namespace gui */
|
|
|
|
#endif /* MIDDLEWARES_GUI_WIDGETS_IMAGE_HPP_ */
|