16#ifndef LIEF_PE_RESOURCE_DIALOG_EXTENDED_H
17#define LIEF_PE_RESOURCE_DIALOG_EXTENDED_H
65 uint32_t help_id_ = 0;
90 operator bool()
const {
98 os <<
font.to_string();
118 std::unique_ptr<ResourceDialog>
clone()
const override {
119 return std::unique_ptr<ResourceDialogExtended>(
165 items_.push_back(item);
189 uint8_t charset, std::u16string typeface) {
190 font_.point_size = point_size;
191 font_.weight = weight;
192 font_.italic = italic;
193 font_.charset = charset;
194 font_.typeface = std::move(typeface);
199 font_ = std::move(f);
204 uint16_t version_ = 0;
205 uint16_t signature_ = 0;
206 uint32_t help_id_ = 0;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
This class represents a DLGTEMPLATEEX item (DLGITEMTEMPLATEEX).
Definition ResourceDialogExtended.hpp:37
Item & operator=(const Item &)=default
static result< Item > parse(BinaryStream &stream)
Item(const Item &)=default
std::string to_string() const override
uint32_t help_id() const
The help context identifier for the control. When the system sends a WM_HELP message,...
Definition ResourceDialogExtended.hpp:53
Item & operator=(Item &&)=default
Item & help_id(uint32_t value)
Definition ResourceDialogExtended.hpp:57
std::vector< Item > items_t
Definition ResourceDialogExtended.hpp:103
ResourceDialogExtended(ResourceDialogExtended &&)=default
uint16_t version() const
The version number of the extended dialog box template. This member must be set to 1.
Definition ResourceDialogExtended.hpp:136
void add_item(const Item &item)
Add a new control item to the dialog.
Definition ResourceDialogExtended.hpp:164
ResourceDialogExtended & font(font_t f)
Definition ResourceDialogExtended.hpp:198
uint16_t signature() const
Indicates whether a template is an extended dialog box template. If signature is 0xFFFF,...
Definition ResourceDialogExtended.hpp:143
ResourceDialogExtended & help_id(uint32_t value)
Definition ResourceDialogExtended.hpp:178
static std::unique_ptr< ResourceDialogExtended > create(BinaryStream &stream)
ResourceDialogExtended & signature(uint16_t value)
Definition ResourceDialogExtended.hpp:173
~ResourceDialogExtended() override=default
ResourceDialogExtended & font(uint16_t point_size, uint16_t weight, bool italic, uint8_t charset, std::u16string typeface)
Definition ResourceDialogExtended.hpp:188
const font_t & font() const
Additional font information.
Definition ResourceDialogExtended.hpp:184
ResourceDialogExtended & version(uint16_t value)
Definition ResourceDialogExtended.hpp:168
std::unique_ptr< ResourceDialog > clone() const override
Definition ResourceDialogExtended.hpp:118
void accept(Visitor &visitor) const override
ResourceDialogExtended(const ResourceDialogExtended &)=default
static bool classof(const ResourceDialog *dialog)
Definition ResourceDialogExtended.hpp:124
ResourceDialogExtended & operator=(const ResourceDialogExtended &)=default
it_const_items items() const
Definition ResourceDialogExtended.hpp:159
ref_iterator< items_t & > it_items
Definition ResourceDialogExtended.hpp:104
std::string to_string() const override
it_items items()
Iterator over the control items of this dialog box.
Definition ResourceDialogExtended.hpp:155
uint32_t help_id() const
The help context identifier for the dialog box window. When the system sends a WM_HELP message,...
Definition ResourceDialogExtended.hpp:150
const_ref_iterator< const items_t & > it_const_items
Definition ResourceDialogExtended.hpp:105
ResourceDialogExtended()
Definition ResourceDialogExtended.hpp:107
ResourceDialogExtended & operator=(ResourceDialogExtended &&)=default
This class represents an element of the dialog. It can be for instance, a button, or a caption.
Definition ResourceDialog.hpp:159
TYPE
Enum for discriminating the kind of the Dialog (regular vs extended).
Definition ResourceDialog.hpp:65
@ EXTENDED
Definition ResourceDialog.hpp:68
TYPE type() const
Definition ResourceDialog.hpp:360
Definition Visitor.hpp:212
Iterator which returns reference on container's values.
Definition iterators.hpp:45
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:77
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which return const ref on container's values.
Definition iterators.hpp:286
Font information for the font to use for the text in the dialog box and its controls.
Definition ResourceDialogExtended.hpp:70
bool is_defined() const
Definition ResourceDialogExtended.hpp:86
uint16_t point_size
The point size of the font.
Definition ResourceDialogExtended.hpp:72
std::u16string typeface
The name of the typeface for the font.
Definition ResourceDialogExtended.hpp:84
std::string to_string() const
friend std::ostream & operator<<(std::ostream &os, const font_t &font)
Definition ResourceDialogExtended.hpp:96
uint8_t charset
The character set to be used.
Definition ResourceDialogExtended.hpp:81
uint16_t weight
The weight of the font.
Definition ResourceDialogExtended.hpp:75
bool italic
Indicates whether the font is italic.
Definition ResourceDialogExtended.hpp:78
#define LIEF_API
Definition visibility.h:43