Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HLayout Class Reference
[Graphical User Interface]

#include <HLayout.h>

Inheritance diagram for HLayout:

HWindow< HLayout > HArray< HLayoutInfo > HWidget HColorable HObj HObjNoCopy HObj HObj

Public Types

enum  Style {
  FIXED = 0, GROW_X = 1 << 0, MOVE_X = 1 << 1, GROW_Y = 1 << 2,
  MOVE_Y = 1 << 3, GROW_XY = (GROW_X | GROW_Y), MOVE_XY = (MOVE_X | MOVE_Y), DOCK_LEFT = 1 << 4,
  DOCK_TOP = 1 << 5, DOCK_RIGHT = 1 << 6, DOCK_BOTTOM = 1 << 7, DOCK_ALL = (DOCK_LEFT | DOCK_TOP | DOCK_RIGHT | DOCK_BOTTOM)
}

Public Member Functions

ErrCode Add (HWidget *pWidget, uint32 uFlags=FIXED, int32 nMinXDim=0, int32 nMinYDim=0)
 Adds a widget to the box.
virtual ErrCode Draw (HRect &rDirty)
 Draws the client area of the box.
ErrCode Remove (HWidget *pWidget)
 Removes a widget from the box.
virtual ErrCode UpdateLayout (void)
 Repositions all the widgets inside the window.
HWidgetGetNthWidget (uint32 udx) const
 Returns the Nth widget in the box.
ErrCode SetWidgetMinHeight (HWidget *pWidget, int32 nMinYDim=0)
 Sets the minimum allowed height for a given widget.
ErrCode SetWidgetMinWidth (HWidget *pWidget, int32 nMinXDim=0)
 Sets the minimum allowed height for a given widget.
ErrCode SetWidgetMinSize (HWidget *pWidget, int32 nMinXDim=0, int32 nMinYDim=0)
 Sets the minimum allowed size for a given widget.
ErrCode SetWidgetStyle (HWidget *pWidget, uint32 uFlags)
 Sets the style for a given widget.

Protected Types

typedef HArray< HLayoutInfo
>::iterator 
InfoIter

Protected Member Functions

uint32 findWidget (HWidget *pWidget)
 Finds a given widget in the HLayoutInfo array.
uint32 indexOf (InfoIter it)

Protected Attributes

HRect m_rClient
 !< Bounds of box client after last UpdateLayout() call

Member Function Documentation

ErrCode HLayout::Add HWidget pWidget,
uint32  uFlags = FIXED,
int32  nMinXDim = 0,
int32  nMinYDim = 0
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pWidget Ptr to widget to add
uFlags HLayout::Style flags
nMinXDim Minimum X dimension (width)
nMinYDim Minimum Y dimension (height)

Definition at line 91 of file HLayout.h.

virtual ErrCode HLayout::Draw HRect rDirty  )  [virtual]
 

Draws the contents of the window using the cached Context (m_gc) and the background color (m_clrBG).

Returns:
NO_ERROR on success, error code otherwise
Parameters:
rDirty Area of the client to be redrawn

Reimplemented from HWidget.

Definition at line 145 of file HLayout.h.

ErrCode HLayout::Remove HWidget pWidget  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pWidget Ptr to widget to remove

Definition at line 165 of file HLayout.h.

virtual ErrCode HLayout::UpdateLayout void   )  [virtual]
 

return NO_ERROR on success, error code otherwise

Reimplemented from HWindow< HLayout >.

Definition at line 196 of file HLayout.h.

uint32 HLayout::findWidget HWidget pWidget  )  [protected]
 

Returns:
Index if found, or Humble::BAD_INDEX otherwise
Parameters:
pWidget Ptr to widget to find

Definition at line 279 of file HLayout.h.

HWidget* HLayout::GetNthWidget uint32  udx  )  const
 

Returns:
Ptr to widget on success, NULL otherwise
Parameters:
udx Index of desired widget [0 <= udx < GetSize()]

Definition at line 297 of file HLayout.h.

ErrCode HLayout::SetWidgetMinHeight HWidget pWidget,
int32  nMinYDim = 0
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pWidget Desired widget
nMinYDim Minimum Y dimension (height) or zero for no minimum

Definition at line 305 of file HLayout.h.

ErrCode HLayout::SetWidgetMinWidth HWidget pWidget,
int32  nMinXDim = 0
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pWidget Desired widget
nMinXDim Minimum X dimension (width) or zero for no minimum

Definition at line 330 of file HLayout.h.

ErrCode HLayout::SetWidgetMinSize HWidget pWidget,
int32  nMinXDim = 0,
int32  nMinYDim = 0
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pWidget Desired widget
nMinXDim Minimum X dimension (width) or zero for no minimum
nMinYDim Minimum Y dimension (height) or zero for no minimum

Definition at line 356 of file HLayout.h.

ErrCode HLayout::SetWidgetStyle HWidget pWidget,
uint32  uFlags
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
pWidget Ptr to widget
uFlags New style

Definition at line 382 of file HLayout.h.


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

2006.01.09-16:37