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

Arranges items in a horizontal row and starts a new row if the space runs out. More...

#include <Sizer.h>

Inheritance diagram for FlowSizer:
ISizer

Public Member Functions

void SetPadding (int pad)
 
void SetOuterPadding (int pad)
 
void Add (ISizer *item)
 
void Add (HWND window)
 
void RemoveAll ()
 
virtual void OnCalcSizes ()
 
virtual void OnRectChanged (int x, int y, int w, int h)
 
virtual size_t GetItemCount ()
 
virtual ISizerGetItem (size_t i)
 
- 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

Arranges items in a horizontal row and starts a new row if the space runs out.

Member Function Documentation

void FlowSizer::Add ( ISizer item)

Add a sizer

void FlowSizer::Add ( HWND  window)
inline

Shortcut to add a window.

virtual ISizer* FlowSizer::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 FlowSizer::GetItemCount ( )
inlinevirtual
Returns
Number of sizer items contained by this sizer. Used in conjunction with GetItem().

Reimplemented from ISizer.

void FlowSizer::OnCalcSizes ( )
virtual

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 FlowSizer::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 FlowSizer::RemoveAll ( )

Removes all items.

void FlowSizer::SetOuterPadding ( int  pad)

Set padding around this sizer.

void FlowSizer::SetPadding ( int  pad)

Set padding between items.


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