- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UInsets Class Reference

This class desribes insets to a rectangle which is used to distinguish between the whole rectangle and the actual client size. More...

#include <uinsets.hpp>

Inheritance diagram for ufo::UInsets:

ufo::UInsetsObject List of all members.

Public Member Functions

 UInsets ()
 UInsets (int top, int left, int bottom, int right)
int getTop () const
int getLeft () const
int getBottom () const
int getRight () const
int getHorizontal () const
int getVertical () const
void grow (const UInsets &add)
bool isEmpty () const
bool operator() ()
bool operator! ()
UInsetsoperator+= (const UInsets &in)
UInsetsoperator-= (const UInsets &in)

Public Attributes

int top
int left
int bottom
int right

Friends

std::ostream & operator<< (std::ostream &os, const UInsets &o)

Detailed Description

This class desribes insets to a rectangle which is used to distinguish between the whole rectangle and the actual client size.

Instances of this class are mainly used to describe insets of widget borders and widget margins.

This class is not part of the UObject inheritance structure. Use instead UInsetsObject if you need insets derived from UObject.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UInsets::UInsets  )  [inline]
 

Creates an empty insets object.

ufo::UInsets::UInsets int  top,
int  left,
int  bottom,
int  right
[inline]
 

Creates an insets object with the given values.

Parameters:
top The inset at top
top The inset at left
top The inset at bottom
top The inset at right


Member Function Documentation

int ufo::UInsets::getHorizontal  )  const [inline]
 

Returns:
The total insets in horizontal direction, i.e. left + right.

int ufo::UInsets::getVertical  )  const [inline]
 

Returns:
The total insets in vertical direction, i.e. top + bottom.

void ufo::UInsets::grow const UInsets add  )  [inline]
 

Increases the insets by the given insets, that means add add.top to this.top etc.

bool ufo::UInsets::isEmpty  )  const [inline]
 

Returns:
True if all insets are exactly 0.

bool ufo::UInsets::operator!  )  [inline]
 

Returns:
True if all insets are exactly 0.

bool ufo::UInsets::operator()  )  [inline]
 

Returns:
True if one of the insets is non-zero.

UInsets & ufo::UInsets::operator+= const UInsets in  )  [inline]
 

Increases the insets by the given insets, that means add add.top to this.top etc.

Returns:
Reference to this insets object.

UInsets & ufo::UInsets::operator-= const UInsets in  )  [inline]
 

Decreases the insets by the given insets, that means substract add.top to this.top etc.

Returns:
Reference to this insets object.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt