LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::ResourceDialog::Item Class Referenceabstract

This class represents an element of the dialog. It can be for instance, a button, or a caption. More...

#include <ResourceDialog.hpp>

Inheritance diagram for LIEF::PE::ResourceDialog::Item:

Public Types

enum class  WINDOW_CLASS : uint32_t {
  BUTTON = 0x0080 , EDIT = 0x0081 , STATIC = 0x0082 , LIST_BOX = 0x0083 ,
  SCROLL_BAR = 0x0084 , COMBO_BOX = 0x0085
}
 

Public Member Functions

 Item ()=default
 
 Item (const Item &)=default
 
Itemoperator= (const Item &)=default
 
 Item (Item &&)=default
 
Itemoperator= (Item &&)=default
 
uint32_t style () const
 The style of the control. This can be a combination of WINDOW_STYLES or CONTROL_STYLES.
 
uint32_t extended_style () const
 The extended styles for a window. This member is not used to create controls in dialog boxes, but applications that use dialog box templates can use it to create other types of windows.
 
int32_t id () const
 The control identifier.
 
bool has (WINDOW_STYLES style) const
 Check if this item has the given WINDOW_STYLES.
 
bool has (CONTROL_STYLES style) const
 Check if this item has the given CONTROL_STYLES.
 
std::vector< WINDOW_STYLESwindow_styles () const
 List of WINDOW_STYLES used by this item.
 
std::vector< CONTROL_STYLEScontrol_styles () const
 List of CONTROL_STYLES used by this item.
 
int16_t x () const
 The x-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is always relative to the upper-left corner of the dialog box's client area.
 
int16_t y () const
 The y-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is always relative to the upper-left corner of the dialog box's client area.
 
int16_t cx () const
 The width, in dialog box units, of the control.
 
int16_t cy () const
 The height, in dialog box units, of the control.
 
Itemstyle (uint32_t value)
 
Itemextended_style (uint32_t value)
 
Itemx (int16_t value)
 
Itemy (int16_t value)
 
Itemcx (int16_t value)
 
Itemcy (int16_t value)
 
Itemid (int32_t value)
 
Itemdata (std::vector< uint8_t > creation_data)
 
Itemclazz (std::u16string title)
 
Itemclazz (uint16_t ord)
 
Itemtitle (std::u16string value)
 
Itemtitle (uint16_t ord)
 
const ordinal_or_str_tclazz () const
 Window class of the control. This can be either: a string that specifies the name of a registered window class or an ordinal value of a predefined system class.
 
const ordinal_or_str_ttitle () const
 Title of the item which can be either: a string that specifies the initial text or an ordinal value of a resource, such as an icon, in an executable file.
 
span< const uint8_t > creation_data () const
 Creation data that is passed to the control's window procedure.
 
span< uint8_t > creation_data ()
 
virtual ~Item ()=default
 
virtual std::string to_string () const =0
 

Detailed Description

This class represents an element of the dialog. It can be for instance, a button, or a caption.

This class is inherited by the regular or extended dialog's item:

Member Enumeration Documentation

◆ WINDOW_CLASS

enum class LIEF::PE::ResourceDialog::Item::WINDOW_CLASS : uint32_t
strong
Enumerator
BUTTON 
EDIT 
STATIC 
LIST_BOX 
SCROLL_BAR 
COMBO_BOX 

Constructor & Destructor Documentation

◆ Item() [1/3]

LIEF::PE::ResourceDialog::Item::Item ( )
default

◆ Item() [2/3]

LIEF::PE::ResourceDialog::Item::Item ( const Item & )
default

◆ Item() [3/3]

LIEF::PE::ResourceDialog::Item::Item ( Item && )
default

◆ ~Item()

virtual LIEF::PE::ResourceDialog::Item::~Item ( )
virtualdefault

Member Function Documentation

◆ clazz() [1/3]

const ordinal_or_str_t & LIEF::PE::ResourceDialog::Item::clazz ( ) const
inline

Window class of the control. This can be either: a string that specifies the name of a registered window class or an ordinal value of a predefined system class.

◆ clazz() [2/3]

Item & LIEF::PE::ResourceDialog::Item::clazz ( std::u16string title)
inline

References make_error_code(), and not_found.

◆ clazz() [3/3]

Item & LIEF::PE::ResourceDialog::Item::clazz ( uint16_t ord)
inline

◆ control_styles()

std::vector< CONTROL_STYLES > LIEF::PE::ResourceDialog::Item::control_styles ( ) const

List of CONTROL_STYLES used by this item.

◆ creation_data() [1/2]

span< uint8_t > LIEF::PE::ResourceDialog::Item::creation_data ( )
inline

◆ creation_data() [2/2]

span< const uint8_t > LIEF::PE::ResourceDialog::Item::creation_data ( ) const
inline

Creation data that is passed to the control's window procedure.

◆ cx() [1/2]

int16_t LIEF::PE::ResourceDialog::Item::cx ( ) const
inline

The width, in dialog box units, of the control.

◆ cx() [2/2]

Item & LIEF::PE::ResourceDialog::Item::cx ( int16_t value)
inline

◆ cy() [1/2]

int16_t LIEF::PE::ResourceDialog::Item::cy ( ) const
inline

The height, in dialog box units, of the control.

◆ cy() [2/2]

Item & LIEF::PE::ResourceDialog::Item::cy ( int16_t value)
inline

◆ data()

Item & LIEF::PE::ResourceDialog::Item::data ( std::vector< uint8_t > creation_data)
inline

◆ extended_style() [1/2]

uint32_t LIEF::PE::ResourceDialog::Item::extended_style ( ) const
inline

The extended styles for a window. This member is not used to create controls in dialog boxes, but applications that use dialog box templates can use it to create other types of windows.

It can take a combination of WINDOW_EXTENDED_STYLES

◆ extended_style() [2/2]

Item & LIEF::PE::ResourceDialog::Item::extended_style ( uint32_t value)
inline

◆ has() [1/2]

bool LIEF::PE::ResourceDialog::Item::has ( CONTROL_STYLES style) const
inline

Check if this item has the given CONTROL_STYLES.

◆ has() [2/2]

bool LIEF::PE::ResourceDialog::Item::has ( WINDOW_STYLES style) const
inline

Check if this item has the given WINDOW_STYLES.

◆ id() [1/2]

int32_t LIEF::PE::ResourceDialog::Item::id ( ) const
inline

The control identifier.

◆ id() [2/2]

Item & LIEF::PE::ResourceDialog::Item::id ( int32_t value)
inline

◆ operator=() [1/2]

Item & LIEF::PE::ResourceDialog::Item::operator= ( const Item & )
default

◆ operator=() [2/2]

Item & LIEF::PE::ResourceDialog::Item::operator= ( Item && )
default

◆ style() [1/2]

uint32_t LIEF::PE::ResourceDialog::Item::style ( ) const
inline

The style of the control. This can be a combination of WINDOW_STYLES or CONTROL_STYLES.

◆ style() [2/2]

Item & LIEF::PE::ResourceDialog::Item::style ( uint32_t value)
inline

◆ title() [1/3]

const ordinal_or_str_t & LIEF::PE::ResourceDialog::Item::title ( ) const
inline

Title of the item which can be either: a string that specifies the initial text or an ordinal value of a resource, such as an icon, in an executable file.

◆ title() [2/3]

Item & LIEF::PE::ResourceDialog::Item::title ( std::u16string value)
inline

References make_error_code(), and not_found.

◆ title() [3/3]

Item & LIEF::PE::ResourceDialog::Item::title ( uint16_t ord)
inline

◆ to_string()

virtual std::string LIEF::PE::ResourceDialog::Item::to_string ( ) const
pure virtual

◆ window_styles()

std::vector< WINDOW_STYLES > LIEF::PE::ResourceDialog::Item::window_styles ( ) const

List of WINDOW_STYLES used by this item.

◆ x() [1/2]

int16_t LIEF::PE::ResourceDialog::Item::x ( ) const
inline

The x-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is always relative to the upper-left corner of the dialog box's client area.

◆ x() [2/2]

Item & LIEF::PE::ResourceDialog::Item::x ( int16_t value)
inline

◆ y() [1/2]

int16_t LIEF::PE::ResourceDialog::Item::y ( ) const
inline

The y-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is always relative to the upper-left corner of the dialog box's client area.

◆ y() [2/2]

Item & LIEF::PE::ResourceDialog::Item::y ( int16_t value)
inline

The documentation for this class was generated from the following file: