EGUIAlignment.h
Code: Select all
// Preceded by GUIAlignmentNames [] ...
//! Convenient packaging of alignment info
struct AlignmentInfo
{
EGUI_ALIGNMENT left;
EGUI_ALIGNMENT right;
EGUI_ALIGNMENT top;
EGUI_ALIGNMENT bottom;
AlignmentInfo() : left( EGUIA_UPPERLEFT ), right( EGUIA_UPPERLEFT ), top( EGUIA_UPPERLEFT ), bottom( EGUIA_UPPERLEFT ) {}
AlignmentInfo( EGUI_ALIGNMENT l, EGUI_ALIGNMENT r, EGUI_ALIGNMENT t, EGUI_ALIGNMENT b ) : left(l), right(r), top(t), bottom(b) {}
};
Code: Select all
// Preceded by setAlignment() {} ...
//! Set the alignment with an info struct
void setAlignment( AlignmentInfo info )
{
setAlignment( info.left, info.right, info.top, info.bottom );
}
//! Retrieve the alignment.
AlignmentInfo getAlignment() const
{
return AlignmentInfo( AlignLeft, AlignRight, AlignTop, AlignBottom );
}