Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
dw::core::SizeParams Class Reference

Hold arguments passed to dw::core::Widget::sizeRequest and dw::core::Widget::getExtremes, as described in Size requisitions depending on positions. More...

#include <tools.hh>

Public Member Functions

 SizeParams ()
 
 SizeParams (int numPos, Widget **references, int *x, int *y)
 
 SizeParams (const SizeParams &other)
 
 ~SizeParams ()
 
SizeParamsoperator= (const SizeParams &other)
 
void fill (int numPos, Widget **references, int *x, int *y)
 
void forChild (Widget *parent, Widget *child, int xRel, int yRel, SizeParams *childParams)
 
bool findReference (Widget *reference, int *x, int *y)
 
bool isEquivalent (SizeParams *other)
 Compares two instances, but considers a change in the order of the reference widgets as equivalent.
 
int getNumPos ()
 
Widget ** getReferences ()
 
int * getX ()
 
int * getY ()
 
WidgetgetReference (int i)
 
int getX (int i)
 
int getY (int i)
 

Private Member Functions

void init ()
 
void cleanup ()
 
void debugPrint ()
 

Private Attributes

int numPos
 
Widget ** references
 
int * x
 
int * y
 

Detailed Description

Hold arguments passed to dw::core::Widget::sizeRequest and dw::core::Widget::getExtremes, as described in Size requisitions depending on positions.

Definition at line 18 of file tools.hh.

Constructor & Destructor Documentation

◆ SizeParams() [1/3]

dw::core::SizeParams::SizeParams ( )

Definition at line 8 of file tools.cc.

References DBG_OBJ_CREATE, debugPrint(), and init().

◆ SizeParams() [2/3]

dw::core::SizeParams::SizeParams ( int  numPos,
Widget **  references,
int *  x,
int *  y 
)

Definition at line 15 of file tools.cc.

References DBG_OBJ_CREATE, debugPrint(), fill(), init(), numPos, references, x, and y.

◆ SizeParams() [3/3]

dw::core::SizeParams::SizeParams ( const SizeParams other)

Definition at line 23 of file tools.cc.

References DBG_OBJ_CREATE, debugPrint(), fill(), init(), numPos, references, x, and y.

◆ ~SizeParams()

dw::core::SizeParams::~SizeParams ( )

Definition at line 31 of file tools.cc.

References cleanup(), and DBG_OBJ_DELETE.

Member Function Documentation

◆ cleanup()

void dw::core::SizeParams::cleanup ( )
private

Definition at line 53 of file tools.cc.

References init(), references, x, and y.

Referenced by fill(), forChild(), operator=(), and ~SizeParams().

◆ debugPrint()

void dw::core::SizeParams::debugPrint ( )
inlineprivate

◆ fill()

void dw::core::SizeParams::fill ( int  numPos,
Widget **  references,
int *  x,
int *  y 
)

◆ findReference()

bool dw::core::SizeParams::findReference ( Widget reference,
int *  x,
int *  y 
)

Definition at line 130 of file tools.cc.

References DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, numPos, references, x, and y.

Referenced by dw::Textblock::findSizeRequestReference().

◆ forChild()

void dw::core::SizeParams::forChild ( Widget parent,
Widget child,
int  xRel,
int  yRel,
SizeParams childParams 
)

◆ getNumPos()

int dw::core::SizeParams::getNumPos ( )
inline

Definition at line 54 of file tools.hh.

References numPos.

Referenced by dw::Textblock::calcSizeOfWidgetInFlow().

◆ getReference()

Widget * dw::core::SizeParams::getReference ( int  i)
inline

Definition at line 58 of file tools.hh.

References references.

◆ getReferences()

Widget ** dw::core::SizeParams::getReferences ( )
inline

Definition at line 55 of file tools.hh.

References references.

Referenced by dw::Textblock::calcSizeOfWidgetInFlow().

◆ getX() [1/2]

int * dw::core::SizeParams::getX ( )
inline

Definition at line 56 of file tools.hh.

References x.

Referenced by dw::Textblock::calcSizeOfWidgetInFlow().

◆ getX() [2/2]

int dw::core::SizeParams::getX ( int  i)
inline

Definition at line 59 of file tools.hh.

References x.

◆ getY() [1/2]

int * dw::core::SizeParams::getY ( )
inline

Definition at line 57 of file tools.hh.

References y.

Referenced by dw::Textblock::calcSizeOfWidgetInFlow().

◆ getY() [2/2]

int dw::core::SizeParams::getY ( int  i)
inline

Definition at line 60 of file tools.hh.

References y.

◆ init()

void dw::core::SizeParams::init ( )
private

Definition at line 46 of file tools.cc.

References numPos, references, x, and y.

Referenced by cleanup(), operator=(), SizeParams(), SizeParams(), and SizeParams().

◆ isEquivalent()

bool dw::core::SizeParams::isEquivalent ( SizeParams other)

Compares two instances, but considers a change in the order of the reference widgets as equivalent.

Definition at line 164 of file tools.cc.

References lout::misc::boolToStr(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSGF, numPos, references, x, and y.

Referenced by dw::core::Widget::getExtremes(), and dw::core::Widget::sizeRequest().

◆ operator=()

SizeParams & dw::core::SizeParams::operator= ( const SizeParams other)

Definition at line 37 of file tools.cc.

References cleanup(), debugPrint(), fill(), init(), numPos, references, x, and y.

Member Data Documentation

◆ numPos

int dw::core::SizeParams::numPos
private

◆ references

Widget** dw::core::SizeParams::references
private

◆ x

int* dw::core::SizeParams::x
private

◆ y

int * dw::core::SizeParams::y
private

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