Image owns its alt text.
This commit is contained in:
@ -3,6 +3,9 @@
|
||||
|
||||
#include "core.hh"
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace dw {
|
||||
|
||||
/**
|
||||
@ -115,7 +118,7 @@ public:
|
||||
class Image: public core::Widget, public core::ImgRenderer
|
||||
{
|
||||
private:
|
||||
char *altText;
|
||||
std::optional< std::string > altText;
|
||||
core::Imgbuf *buffer;
|
||||
int bufWidth, bufHeight;
|
||||
int altTextWidth;
|
||||
@ -145,7 +148,7 @@ protected:
|
||||
//core::Iterator *iterator (Content::Type mask, bool atEnd);
|
||||
|
||||
public:
|
||||
Image(const char *altText);
|
||||
Image(std::optional< std::string_view > altText);
|
||||
~Image();
|
||||
|
||||
// For images, the minimal width is not well defined, and
|
||||
|
Reference in New Issue
Block a user