OOFILE  1.9
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Specify or calculate a set of column widths & alignments. More...

#include <oofsize.h>

Inheritance diagram for oofColSizer:
Inheritance graph
[legend]
Collaboration diagram for oofColSizer:
Collaboration graph
[legend]

Public Types

enum  { kNotSet =ULONG_MAX }
 
enum  colAlignT {
  alignLeft, alignCentre, alignRight, alignJust,
  alignNatural
}
 

Public Member Functions

oofColSizer::colAlignT alignment (unsigned short colNum) const
 
virtual void calculateWidths (unsigned long widthToDivide, unsigned short colSepWidth=0)
 
virtual oofColSizerclone (OOF_mixColSizable *newOwner) const
 
unsigned long fixedPercentage (unsigned short colNum) const
 
unsigned long fixedWidth (unsigned short colNum) const
 
 oofColSizer (unsigned short numCols)
 
void setAlignment (unsigned short colNum, colAlignT)
 
void setFixedPercentage (unsigned short colNum, unsigned long)
 
void setFixedWidth (unsigned short colNum, unsigned long)
 
unsigned long width (unsigned short colNum)
 
virtual ~oofColSizer ()
 

Static Public Member Functions

static oofColSizer::colAlignT naturalAlignmentForField (OOF_fieldTypes)
 

Protected Member Functions

virtual void CalculateDefaultWidths (unsigned long widthToDivide, unsigned int numberNotSet)
 

Protected Attributes

OOF_ExpandableLongArray mColAlignments
 
OOF_ExpandableLongArray mColCalcWidths
 
OOF_ExpandableLongArray mColFixedWidths
 
OOF_ExpandableLongArray mColPercentages
 
bool mHaveCalculatedWidth
 
const unsigned short mNumCols
 

Detailed Description

Specify or calculate a set of column widths & alignments.

Fixed widths can be specified as points or percentages. Columns left unspecified have widths calculated varying on data type. It tries hard to create a reasonable looking set of widths, to be used in a report or GUI multi-column browser.

Definition at line 51 of file oofsize.h.

Constructor & Destructor Documentation

oofColSizer::oofColSizer ( unsigned short  numCols)

Definition at line 98 of file oofsize.cpp.

Referenced by clone().

virtual oofColSizer::~oofColSizer ( )
inlinevirtual

Definition at line 58 of file oofsize.h.

Member Function Documentation

oofColSizer::colAlignT oofColSizer::alignment ( unsigned short  colNum) const
void oofColSizer::CalculateDefaultWidths ( unsigned long  widthToDivide,
unsigned int  numberNotSet 
)
protectedvirtual

Reimplemented in oofViewFieldDefaultsColSizer.

Definition at line 181 of file oofsize.cpp.

References kNotSet, mColCalcWidths, mNumCols, and OOF_ExpandableLongArray::value().

Referenced by calculateWidths().

void oofColSizer::calculateWidths ( unsigned long  widthToDivide,
unsigned short  colSepWidth = 0 
)
virtual
oofColSizer * oofColSizer::clone ( OOF_mixColSizable newOwner) const
virtual

Reimplemented in oofViewFieldDefaultsColSizer.

Definition at line 110 of file oofsize.cpp.

References oofColSizer().

Referenced by OOF_mixColSizable::OOF_mixColSizable().

unsigned long oofColSizer::fixedPercentage ( unsigned short  colNum) const
unsigned long oofColSizer::fixedWidth ( unsigned short  colNum) const
oofColSizer::colAlignT oofColSizer::naturalAlignmentForField ( OOF_fieldTypes  inType)
static
void oofColSizer::setAlignment ( unsigned short  colNum,
oofColSizer::colAlignT  n 
)

Definition at line 242 of file oofsize.cpp.

References mColAlignments.

void oofColSizer::setFixedPercentage ( unsigned short  colNum,
unsigned long  n 
)

Definition at line 235 of file oofsize.cpp.

References mColPercentages.

void oofColSizer::setFixedWidth ( unsigned short  colNum,
unsigned long  n 
)

Definition at line 228 of file oofsize.cpp.

References mColFixedWidths.

unsigned long oofColSizer::width ( unsigned short  colNum)

Member Data Documentation

OOF_ExpandableLongArray oofColSizer::mColAlignments
protected

Definition at line 82 of file oofsize.h.

Referenced by alignment(), and setAlignment().

OOF_ExpandableLongArray oofColSizer::mColCalcWidths
protected
OOF_ExpandableLongArray oofColSizer::mColFixedWidths
protected

Definition at line 82 of file oofsize.h.

Referenced by calculateWidths(), fixedWidth(), and setFixedWidth().

OOF_ExpandableLongArray oofColSizer::mColPercentages
protected

Definition at line 82 of file oofsize.h.

Referenced by calculateWidths(), fixedPercentage(), and setFixedPercentage().

bool oofColSizer::mHaveCalculatedWidth
protected

Definition at line 83 of file oofsize.h.

Referenced by alignment(), calculateWidths(), fixedPercentage(), fixedWidth(), and width().

const unsigned short oofColSizer::mNumCols
protected

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