Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

oofColSizer Class Reference
[OOFILE utility classes and functions.]

#include <oofsize.h>

Inheritance diagram for oofColSizer:

Inheritance graph
[legend]
Collaboration diagram for oofColSizer:

Collaboration graph
[legend]
List of all members.

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.


Public Types

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

Public Member Functions

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

Static Public Member Functions

oofColSizer::colAlignT naturalAlignmentForField (OOF_fieldTypes)

Protected Member Functions

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

Protected Attributes

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


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
kNotSet 

enum oofColSizer::colAlignT
 

Enumeration values:
alignLeft 
alignCentre 
alignRight 
alignJust 
alignNatural 


Constructor & Destructor Documentation

oofColSizer::oofColSizer unsigned short  numCols  ) 
 

virtual oofColSizer::~oofColSizer  )  [inline, virtual]
 


Member Function Documentation

oofColSizer::colAlignT oofColSizer::alignment unsigned short  colNum  )  const
 

void oofColSizer::CalculateDefaultWidths unsigned long  widthToDivide,
unsigned int  numberNotSet
[protected, virtual]
 

Reimplemented in oofViewFieldDefaultsColSizer.

void oofColSizer::calculateWidths unsigned long  widthToDivide,
unsigned short  colSepWidth = 0
[virtual]
 

oofColSizer * oofColSizer::clone OOF_mixColSizable newOwner  )  const [virtual]
 

Reimplemented in oofViewFieldDefaultsColSizer.

unsigned long oofColSizer::fixedPercentage unsigned short  colNum  )  const
 

unsigned long oofColSizer::fixedWidth unsigned short  colNum  )  const
 

oofColSizer::colAlignT oofColSizer::naturalAlignmentForField OOF_fieldTypes   )  [static]
 

void oofColSizer::setAlignment unsigned short  colNum,
colAlignT 
 

void oofColSizer::setFixedPercentage unsigned short  colNum,
unsigned  long
 

void oofColSizer::setFixedWidth unsigned short  colNum,
unsigned  long
 

unsigned long oofColSizer::width unsigned short  colNum  ) 
 


Member Data Documentation

OOF_ExpandableLongArray oofColSizer::mColAlignments [protected]
 

OOF_ExpandableLongArray oofColSizer::mColCalcWidths [protected]
 

OOF_ExpandableLongArray oofColSizer::mColFixedWidths [protected]
 

OOF_ExpandableLongArray oofColSizer::mColPercentages [protected]
 

bool oofColSizer::mHaveCalculatedWidth [protected]
 

const unsigned short oofColSizer::mNumCols [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 00:49:52 2004 for OOFILE by doxygen 1.3.5