Sizer
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
HAlignSizer Class Reference

Aligns a fixed-size item in horizontal direction. More...

#include <Sizer.h>

Inheritance diagram for HAlignSizer:
ISizer

Public Member Functions

 HAlignSizer ()
 
 HAlignSizer (ISizer *pItem, SIZER_HALIGN pAlign)
 
 HAlignSizer (HWND window, SIZER_HALIGN pAlign)
 
virtual void OnCalcSizes ()
 
virtual void OnRectChanged (int x, int y, int w, int h)
 
virtual size_t GetItemCount ()
 
virtual ISizerGetItem (size_t i)
 
void SetItem (ISizer *pItem, SIZER_HALIGN pAlign)
 
void SetItem (HWND window, SIZER_HALIGN pAlign)
 
void RemoveAll ()
 
- Public Member Functions inherited from ISizer
void CalcSizes ()
 
SizerSize GetMinSize ()
 
void Move (int x, int y, int w, int h)
 
void Move (const SizerPoint &p, const SizerSize &s)
 
void Move (const SizerRect &r)
 
SizerRect GetRect () const
 
void WmSize (UINT type, int cx, int cy)
 
void WmGetMinMaxInfo (HWND window, MINMAXINFO *mmi)
 

Additional Inherited Members

- Protected Attributes inherited from ISizer
bool dirty
 
SizerRect rect
 
SizerSize minimumSize
 

Detailed Description

Aligns a fixed-size item in horizontal direction.

Constructor & Destructor Documentation

HAlignSizer::HAlignSizer ( )

Empty constructor. Call SetItem() to initialize this instance later.

HAlignSizer::HAlignSizer ( ISizer pItem,
SIZER_HALIGN  pAlign 
)

Creates a horizontal alignment wrapper around a sizer.

HAlignSizer::HAlignSizer ( HWND  window,
SIZER_HALIGN  pAlign 
)

Creates a horizontal alignment wrapper around a window.

Member Function Documentation

virtual ISizer* HAlignSizer::GetItem ( size_t  i)
inlinevirtual
Parameters
iIndex of the sizer item to get. GetItemCount() returns the maximum for this index.

Reimplemented from ISizer.

virtual size_t HAlignSizer::GetItemCount ( )
inlinevirtual
Returns
Number of sizer items contained by this sizer. Used in conjunction with GetItem().

Reimplemented from ISizer.

virtual void HAlignSizer::OnCalcSizes ( )
inlinevirtual

Calculates sizes, but does not move the sizer in any way.

Note
ISizer::minimumSize should be calculated here, because that's the place where it makes sense.

Implements ISizer.

void HAlignSizer::OnRectChanged ( int  x,
int  y,
int  w,
int  h 
)
virtual

Moves the sizer and all children.

This function will always be called, even if the sizer is not dirty.

Implements ISizer.

void HAlignSizer::RemoveAll ( )
inline

Removes all items.

void HAlignSizer::SetItem ( ISizer pItem,
SIZER_HALIGN  pAlign 
)
inline

Late initialization.

void HAlignSizer::SetItem ( HWND  window,
SIZER_HALIGN  pAlign 
)
inline

Late initialization.


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