LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::ResourceDialogRegular Class Reference

Implementation for a regular/legacy dialog box. More...

#include <ResourceDialogRegular.hpp>

Inheritance diagram for LIEF::PE::ResourceDialogRegular:
Collaboration diagram for LIEF::PE::ResourceDialogRegular:

Classes

class  Item
 This class represents a DLGTEMPLATE item: DLGITEMTEMPLATE. More...
struct  font_t
 This structure represents additional font information that might be embedded at the end of the DLGTEMPLATE stream. More...

Public Types

using items_t = std::vector<Item>
using it_items = ref_iterator<items_t&>
using it_const_items = const_ref_iterator<const items_t&>
Public Types inherited from LIEF::PE::ResourceDialog
enum class  TYPE { UNKNOWN = 0 , REGULAR , EXTENDED }
 Enum for discriminating the kind of the Dialog (regular vs extended). More...
enum class  DIALOG_STYLES : uint32_t {
  ABSALIGN = 0x0001 , SYSMODAL = 0x0002 , LOCALEDIT = 0x0020 , SETFONT = 0x0040 ,
  MODALFRAME = 0x0080 , NOIDLEMSG = 0x0100 , SETFOREGROUND = 0x0200 , S3DLOOK = 0x0004 ,
  FIXEDSYS = 0x0008 , NOFAILCREATE = 0x0010 , CONTROL = 0x0400 , CENTER = 0x0800 ,
  CENTERMOUSE = 0x1000 , CONTEXTHELP = 0x2000 , SHELLFONT = SETFONT | FIXEDSYS
}
 From: https://learn.microsoft.com/en-us/windows/win32/dlgbox/dialog-box-styles. More...
enum class  WINDOW_STYLES : uint32_t {
  OVERLAPPED = 0x00000000 , POPUP = 0x80000000 , CHILD = 0x40000000 , MINIMIZE = 0x20000000 ,
  VISIBLE = 0x10000000 , DISABLED = 0x08000000 , CLIPSIBLINGS = 0x04000000 , CLIPCHILDREN = 0x02000000 ,
  MAXIMIZE = 0x01000000 , CAPTION = 0x00C00000 , BORDER = 0x00800000 , DLGFRAME = 0x00400000 ,
  VSCROLL = 0x00200000 , HSCROLL = 0x00100000 , SYSMENU = 0x00080000 , THICKFRAME = 0x00040000 ,
  GROUP = 0x00020000 , TABSTOP = 0x00010000
}
 From: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles. More...
enum class  WINDOW_EXTENDED_STYLES : uint32_t {
  DLGMODALFRAME = 0x00000001 , NOPARENTNOTIFY = 0x00000004 , TOPMOST = 0x00000008 , ACCEPTFILES = 0x00000010 ,
  TRANSPARENT_STY = 0x00000020 , MDICHILD = 0x00000040 , TOOLWINDOW = 0x00000080 , WINDOWEDGE = 0x00000100 ,
  CLIENTEDGE = 0x00000200 , CONTEXTHELP = 0x00000400 , RIGHT = 0x00001000 , LEFT = 0x00000000 ,
  RTLREADING = 0x00002000 , LEFTSCROLLBAR = 0x00004000 , CONTROLPARENT = 0x00010000 , STATICEDGE = 0x00020000 ,
  APPWINDOW = 0x00040000
}
 From https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles. More...
enum class  CONTROL_STYLES : uint32_t {
  TOP = 0x00000001 , NOMOVEY = 0x00000002 , BOTTOM = 0x00000003 , NORESIZE = 0x00000004 ,
  NOPARENTALIGN = 0x00000008 , ADJUSTABLE = 0x00000020 , NODIVIDER = 0x00000040 , VERT = 0x00000080 ,
  LEFT = VERT | TOP , RIGHT = VERT | BOTTOM , NOMOVEX = VERT | NOMOVEY
}
 From: https://learn.microsoft.com/en-us/windows/win32/controls/common-control-styles. More...
using dialogs_t = std::vector<std::unique_ptr<ResourceDialog>>
Public Types inherited from LIEF::Object
template<class T>
using output_t = add_pointer_t<decay_t<T>>
template<class T>
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>

Public Member Functions

 ResourceDialogRegular ()
 ResourceDialogRegular (const ResourceDialogRegular &)=default
ResourceDialogRegularoperator= (const ResourceDialogRegular &)=default
 ResourceDialogRegular (ResourceDialogRegular &&)=default
ResourceDialogRegularoperator= (ResourceDialogRegular &&)=default
std::unique_ptr< ResourceDialogclone () const override
std::string to_string () const override
uint32_t nb_items () const
 Number of control items.
it_items items ()
 Iterator over the different control items.
it_const_items items () const
void add_item (const Item &item)
 Add a new control item to the dialog.
const font_tfont () const
 Additional font information.
ResourceDialogRegularfont (uint16_t pointsize, std::u16string name)
ResourceDialogRegularfont (font_t f)
void accept (Visitor &visitor) const override
 ~ResourceDialogRegular () override=default
Public Member Functions inherited from LIEF::PE::ResourceDialog
 ResourceDialog ()=default
 ResourceDialog (const ResourceDialog &)=default
ResourceDialogoperator= (const ResourceDialog &)=default
 ResourceDialog (ResourceDialog &&)=default
ResourceDialogoperator= (ResourceDialog &&)=default
 ResourceDialog (TYPE ty)
TYPE type () const
uint32_t style () const
 The style of the dialog box. This member can be a combination of window style values (such as WINDOW_STYLES::CAPTION and WINDOW_STYLES::SYSMENU) and dialog box style values (such as DIALOG_STYLES::CENTER).
uint32_t extended_style () const
 The extended styles for a window. This member is not used to create dialog boxes, but applications that use dialog box templates can use it to create other types of windows. For a list of values, see WINDOW_EXTENDED_STYLES.
int16_t x () const
 The x-coordinate, in dialog box units, of the upper-left corner of the dialog box.
int16_t y () const
 The y-coordinate, in dialog box units, of the upper-left corner of the dialog box.
int16_t cx () const
 The width, in dialog box units, of the dialog box.
int16_t cy () const
 The height, in dialog box units, of the dialog box.
ResourceDialogstyle (uint32_t value)
ResourceDialogextended_style (uint32_t value)
ResourceDialogx (int16_t value)
ResourceDialogy (int16_t value)
ResourceDialogcx (int16_t value)
ResourceDialogcy (int16_t value)
ResourceDialogmenu (std::u16string title)
ResourceDialogmenu (uint16_t ord)
ResourceDialogwindow_class (std::u16string title)
ResourceDialogwindow_class (uint16_t ord)
ResourceDialogtitle (std::u16string value)
ResourceDialogtitle (const std::string &title)
bool has (DIALOG_STYLES style) const
 Check if the dialog used to given dialog style.
bool has (WINDOW_STYLES style) const
 Check if the dialog used to given window style.
bool has (WINDOW_EXTENDED_STYLES style) const
 Check if the dialog used to given extended window style.
std::vector< DIALOG_STYLESstyles_list () const
 List of DIALOG_STYLES used by this dialog.
std::vector< WINDOW_STYLESwindows_styles_list () const
 List of WINDOW_STYLES used by this dialog.
std::vector< WINDOW_EXTENDED_STYLESwindows_ext_styles_list () const
 List of WINDOW_EXTENDED_STYLES used by this dialog.
const std::u16string & title () const
 title of the dialog box
std::string title_utf8 () const
 title of the dialog box
const ordinal_or_str_tmenu () const
 ordinal or name value of a menu resource.
const ordinal_or_str_twindow_class () const
 ordinal of a predefined system window class or name of a registered window class
virtual ~ResourceDialog ()=default
template<class T>
const Tas () const
 Helper to downcast a ResourceDialog into a ResourceDialogRegular or a ResourceDialogExtended.
Public Member Functions inherited from LIEF::Object
 Object ()
 Object (const Object &other)
Objectoperator= (const Object &other)
 Object (Object &&other) noexcept=default
Objectoperator= (Object &&other) noexcept=default
template<class T>
output_t< T > as ()
template<class T>
output_const_t< T > as () const
virtual bool operator== (const Object &other) const
virtual bool operator!= (const Object &other) const
virtual ~Object ()

Static Public Member Functions

static std::unique_ptr< ResourceDialogRegularcreate (BinaryStream &stream)
static bool classof (const ResourceDialog *dialog)
Static Public Member Functions inherited from LIEF::PE::ResourceDialog
static dialogs_t parse (const ResourceData &node)
 Parse dialogs from the given resource data node.
static dialogs_t parse (const uint8_t *buffer, size_t size)

Detailed Description

Member Typedef Documentation

◆ it_const_items

◆ it_items

◆ items_t

Constructor & Destructor Documentation

◆ ResourceDialogRegular() [1/3]

LIEF::PE::ResourceDialogRegular::ResourceDialogRegular ( )
inline

◆ ResourceDialogRegular() [2/3]

LIEF::PE::ResourceDialogRegular::ResourceDialogRegular ( const ResourceDialogRegular & )
default

◆ ResourceDialogRegular() [3/3]

LIEF::PE::ResourceDialogRegular::ResourceDialogRegular ( ResourceDialogRegular && )
default

◆ ~ResourceDialogRegular()

LIEF::PE::ResourceDialogRegular::~ResourceDialogRegular ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::ResourceDialogRegular::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ add_item()

void LIEF::PE::ResourceDialogRegular::add_item ( const Item & item)
inline

Add a new control item to the dialog.

◆ classof()

bool LIEF::PE::ResourceDialogRegular::classof ( const ResourceDialog * dialog)
inlinestatic

◆ clone()

std::unique_ptr< ResourceDialog > LIEF::PE::ResourceDialogRegular::clone ( ) const
inlineoverridevirtual

◆ create()

std::unique_ptr< ResourceDialogRegular > LIEF::PE::ResourceDialogRegular::create ( BinaryStream & stream)
static

◆ font() [1/3]

const font_t & LIEF::PE::ResourceDialogRegular::font ( ) const
inline

Additional font information.

Referenced by LIEF::PE::ResourceDialogRegular::font_t::operator<<.

◆ font() [2/3]

ResourceDialogRegular & LIEF::PE::ResourceDialogRegular::font ( font_t f)
inline

◆ font() [3/3]

ResourceDialogRegular & LIEF::PE::ResourceDialogRegular::font ( uint16_t pointsize,
std::u16string name )
inline

◆ items() [1/2]

it_items LIEF::PE::ResourceDialogRegular::items ( )
inline

Iterator over the different control items.

◆ items() [2/2]

it_const_items LIEF::PE::ResourceDialogRegular::items ( ) const
inline

◆ nb_items()

uint32_t LIEF::PE::ResourceDialogRegular::nb_items ( ) const
inline

Number of control items.

◆ operator=() [1/2]

ResourceDialogRegular & LIEF::PE::ResourceDialogRegular::operator= ( const ResourceDialogRegular & )
default

◆ operator=() [2/2]

ResourceDialogRegular & LIEF::PE::ResourceDialogRegular::operator= ( ResourceDialogRegular && )
default

◆ to_string()

std::string LIEF::PE::ResourceDialogRegular::to_string ( ) const
overridevirtual

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