16#ifndef LIEF_PE_RESOURCE_DIALOG_EXTENDED_H
17#define LIEF_PE_RESOURCE_DIALOG_EXTENDED_H
66 uint32_t help_id_ = 0;
91 operator bool()
const {
98 os <<
font.to_string();
119 std::unique_ptr<ResourceDialog>
clone()
const override {
164 items_.push_back(item);
188 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:38
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:54
Item & operator=(Item &&)=default
Item & help_id(uint32_t value)
Definition ResourceDialogExtended.hpp:58
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:135
void add_item(const Item &item)
Add a new control item to the dialog.
Definition ResourceDialogExtended.hpp:163
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:142
ResourceDialogExtended & help_id(uint32_t value)
Definition ResourceDialogExtended.hpp:177
static std::unique_ptr< ResourceDialogExtended > create(BinaryStream &stream)
ResourceDialogExtended & signature(uint16_t value)
Definition ResourceDialogExtended.hpp:172
~ResourceDialogExtended() override=default
ResourceDialogExtended & font(uint16_t point_size, uint16_t weight, bool italic, uint8_t charset, std::u16string typeface)
Definition ResourceDialogExtended.hpp:187
const font_t & font() const
Additional font information.
Definition ResourceDialogExtended.hpp:183
ResourceDialogExtended & version(uint16_t value)
Definition ResourceDialogExtended.hpp:167
std::unique_ptr< ResourceDialog > clone() const override
Definition ResourceDialogExtended.hpp:119
void accept(Visitor &visitor) const override
ResourceDialogExtended(const ResourceDialogExtended &)=default
static bool classof(const ResourceDialog *dialog)
Definition ResourceDialogExtended.hpp:123
ResourceDialogExtended & operator=(const ResourceDialogExtended &)=default
it_const_items items() const
Definition ResourceDialogExtended.hpp:158
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:154
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:149
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:154
TYPE
Enum for discriminating the kind of the Dialog (regular vs extended).
Definition ResourceDialog.hpp:64
@ EXTENDED
Definition ResourceDialog.hpp:66
TYPE type() const
Definition ResourceDialog.hpp:333
Definition Visitor.hpp:210
Iterator which returns reference on container's values.
Definition iterators.hpp:46
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:257
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:75
Font information for the font to use for the text in the dialog box and its controls.
Definition ResourceDialogExtended.hpp:71
bool is_defined() const
Definition ResourceDialogExtended.hpp:87
uint16_t point_size
The point size of the font.
Definition ResourceDialogExtended.hpp:73
std::u16string typeface
The name of the typeface for the font.
Definition ResourceDialogExtended.hpp:85
std::string to_string() const
friend std::ostream & operator<<(std::ostream &os, const font_t &font)
Definition ResourceDialogExtended.hpp:97
uint8_t charset
The character set to be used.
Definition ResourceDialogExtended.hpp:82
uint16_t weight
The weight of the font.
Definition ResourceDialogExtended.hpp:76
bool italic
Indicates whether the font is italic.
Definition ResourceDialogExtended.hpp:79
#define LIEF_API
Definition visibility.h:41